plugin.formatted.js 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392
  1. !function(t, e) {
  2. "object" == typeof module && "object" == typeof module.exports ? module.exports = t.document ? e(t, !0) : function(t) {
  3. if (!t.document)
  4. throw new Error("jQuery requires a window with a document");
  5. return e(t)
  6. }
  7. : e(t)
  8. }("undefined" != typeof window ? window : this, function(x, t) {
  9. function e(t, e) {
  10. return e.toUpperCase()
  11. }
  12. var n = []
  13. , C = x.document
  14. , l = n.slice
  15. , g = n.concat
  16. , a = n.push
  17. , i = n.indexOf
  18. , r = {}
  19. , o = r.toString
  20. , d = r.hasOwnProperty
  21. , m = {}
  22. , s = "2.2.4"
  23. , k = function(t, e) {
  24. return new k.fn.init(t, e)
  25. }
  26. , u = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
  27. , c = /^-ms-/
  28. , h = /-([\da-z])/gi;
  29. function f(t) {
  30. var e = !!t && "length" in t && t.length
  31. , n = k.type(t);
  32. return "function" !== n && !k.isWindow(t) && ("array" === n || 0 === e || "number" == typeof e && 0 < e && e - 1 in t)
  33. }
  34. k.fn = k.prototype = {
  35. jquery: s,
  36. constructor: k,
  37. selector: "",
  38. length: 0,
  39. toArray: function() {
  40. return l.call(this)
  41. },
  42. get: function(t) {
  43. return null != t ? t < 0 ? this[t + this.length] : this[t] : l.call(this)
  44. },
  45. pushStack: function(t) {
  46. t = k.merge(this.constructor(), t);
  47. return t.prevObject = this,
  48. t.context = this.context,
  49. t
  50. },
  51. each: function(t) {
  52. return k.each(this, t)
  53. },
  54. map: function(n) {
  55. return this.pushStack(k.map(this, function(t, e) {
  56. return n.call(t, e, t)
  57. }))
  58. },
  59. slice: function() {
  60. return this.pushStack(l.apply(this, arguments))
  61. },
  62. first: function() {
  63. return this.eq(0)
  64. },
  65. last: function() {
  66. return this.eq(-1)
  67. },
  68. eq: function(t) {
  69. var e = this.length
  70. , t = +t + (t < 0 ? e : 0);
  71. return this.pushStack(0 <= t && t < e ? [this[t]] : [])
  72. },
  73. end: function() {
  74. return this.prevObject || this.constructor()
  75. },
  76. push: a,
  77. sort: n.sort,
  78. splice: n.splice
  79. },
  80. k.extend = k.fn.extend = function() {
  81. var t, e, n, r, i, o = arguments[0] || {}, s = 1, a = arguments.length, u = !1;
  82. for ("boolean" == typeof o && (u = o,
  83. o = arguments[s] || {},
  84. s++),
  85. "object" == typeof o || k.isFunction(o) || (o = {}),
  86. s === a && (o = this,
  87. s--); s < a; s++)
  88. if (null != (t = arguments[s]))
  89. for (e in t)
  90. i = o[e],
  91. n = t[e],
  92. o !== n && (u && n && (k.isPlainObject(n) || (r = k.isArray(n))) ? (i = r ? (r = !1,
  93. i && k.isArray(i) ? i : []) : i && k.isPlainObject(i) ? i : {},
  94. o[e] = k.extend(u, i, n)) : void 0 !== n && (o[e] = n));
  95. return o
  96. }
  97. ,
  98. k.extend({
  99. expando: "jQuery" + (s + Math.random()).replace(/\D/g, ""),
  100. isReady: !0,
  101. error: function(t) {
  102. throw new Error(t)
  103. },
  104. noop: function() { },
  105. isFunction: function(t) {
  106. return "function" === k.type(t)
  107. },
  108. isArray: Array.isArray,
  109. isWindow: function(t) {
  110. return null != t && t === t.window
  111. },
  112. isNumeric: function(t) {
  113. var e = t && t.toString();
  114. return !k.isArray(t) && 0 <= e - parseFloat(e) + 1
  115. },
  116. isPlainObject: function(t) {
  117. if ("object" !== k.type(t) || t.nodeType || k.isWindow(t))
  118. return !1;
  119. if (t.constructor && !d.call(t, "constructor") && !d.call(t.constructor.prototype || {}, "isPrototypeOf"))
  120. return !1;
  121. for (var e in t)
  122. ;
  123. return void 0 === e || d.call(t, e)
  124. },
  125. isEmptyObject: function(t) {
  126. for (var e in t)
  127. return !1;
  128. return !0
  129. },
  130. type: function(t) {
  131. return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? r[o.call(t)] || "object" : typeof t
  132. },
  133. globalEval: function(t) {
  134. var e, n = eval;
  135. (t = k.trim(t)) && (1 === t.indexOf("use strict") ? ((e = C.createElement("script")).text = t,
  136. C.head.appendChild(e).parentNode.removeChild(e)) : n(t))
  137. },
  138. camelCase: function(t) {
  139. return t.replace(c, "ms-").replace(h, e)
  140. },
  141. nodeName: function(t, e) {
  142. return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase()
  143. },
  144. each: function(t, e) {
  145. var n, r = 0;
  146. if (f(t))
  147. for (n = t.length; r < n && !1 !== e.call(t[r], r, t[r]); r++)
  148. ;
  149. else
  150. for (r in t)
  151. if (!1 === e.call(t[r], r, t[r]))
  152. break;
  153. return t
  154. },
  155. trim: function(t) {
  156. return null == t ? "" : (t + "").replace(u, "")
  157. },
  158. makeArray: function(t, e) {
  159. e = e || [];
  160. return null != t && (f(Object(t)) ? k.merge(e, "string" == typeof t ? [t] : t) : a.call(e, t)),
  161. e
  162. },
  163. inArray: function(t, e, n) {
  164. return null == e ? -1 : i.call(e, t, n)
  165. },
  166. merge: function(t, e) {
  167. for (var n = +e.length, r = 0, i = t.length; r < n; r++)
  168. t[i++] = e[r];
  169. return t.length = i,
  170. t
  171. },
  172. grep: function(t, e, n) {
  173. for (var r = [], i = 0, o = t.length, s = !n; i < o; i++)
  174. !e(t[i], i) != s && r.push(t[i]);
  175. return r
  176. },
  177. map: function(t, e, n) {
  178. var r, i, o = 0, s = [];
  179. if (f(t))
  180. for (r = t.length; o < r; o++)
  181. null != (i = e(t[o], o, n)) && s.push(i);
  182. else
  183. for (o in t)
  184. i = e(t[o], o, n),
  185. null != i && s.push(i);
  186. return g.apply([], s)
  187. },
  188. guid: 1,
  189. proxy: function(t, e) {
  190. var n, r;
  191. return "string" == typeof e && (r = t[e],
  192. e = t,
  193. t = r),
  194. k.isFunction(t) ? (n = l.call(arguments, 2),
  195. (r = function() {
  196. return t.apply(e || this, n.concat(l.call(arguments)))
  197. }
  198. ).guid = t.guid = t.guid || k.guid++,
  199. r) : void 0
  200. },
  201. now: Date.now,
  202. support: m
  203. }),
  204. "function" == typeof Symbol && (k.fn[Symbol.iterator] = n[Symbol.iterator]),
  205. k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(t, e) {
  206. r["[object " + e + "]"] = e.toLowerCase()
  207. });
  208. var p = function(n) {
  209. function h(t, e, n) {
  210. var r = "0x" + e - 65536;
  211. return r != r || n ? e : r < 0 ? String.fromCharCode(65536 + r) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  212. }
  213. function e() {
  214. x()
  215. }
  216. var t, d, w, o, r, g, f, m, _, u, c, x, C, i, k, v, s, a, y, S = "sizzle" + +new Date, b = n.document, O = 0, l = 0, p = it(), E = it(), T = it(), A = function(t, e) {
  217. return t === e && (c = !0),
  218. 0
  219. }, I = {}.hasOwnProperty, j = [], P = j.pop, N = j.push, D = j.push, R = j.slice, M = function(t, e) {
  220. for (var n = 0, r = t.length; n < r; n++)
  221. if (t[n] === e)
  222. return n;
  223. return -1
  224. }, W = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", L = "[\\x20\\t\\r\\n\\f]", F = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", H = "\\[" + L + "*(" + F + ")(?:" + L + "*([*^$|!~]?=)" + L + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + F + "))|)" + L + "*\\]", B = ":(" + F + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + H + ")*)|.*)\\)|)", q = new RegExp(L + "+", "g"), z = new RegExp("^" + L + "+|((?:^|[^\\\\])(?:\\\\.)*)" + L + "+$", "g"), U = new RegExp("^" + L + "*," + L + "*"), G = new RegExp("^" + L + "*([>+~]|" + L + ")" + L + "*"), V = new RegExp("=" + L + "*([^\\]'\"]*?)" + L + "*\\]", "g"), $ = new RegExp(B), X = new RegExp("^" + F + "$"), Y = {
  225. ID: new RegExp("^#(" + F + ")"),
  226. CLASS: new RegExp("^\\.(" + F + ")"),
  227. TAG: new RegExp("^(" + F + "|[*])"),
  228. ATTR: new RegExp("^" + H),
  229. PSEUDO: new RegExp("^" + B),
  230. CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + L + "*(even|odd|(([+-]|)(\\d*)n|)" + L + "*(?:([+-]|)" + L + "*(\\d+)|))" + L + "*\\)|)", "i"),
  231. bool: new RegExp("^(?:" + W + ")$", "i"),
  232. needsContext: new RegExp("^" + L + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + L + "*((?:-\\d)?\\d*)" + L + "*\\)|)(?=[^-]|$)", "i")
  233. }, K = /^(?:input|select|textarea|button)$/i, Q = /^h\d$/i, J = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, tt = /[+~]/, et = /'|\\/g, nt = new RegExp("\\\\([\\da-f]{1,6}" + L + "?|(" + L + ")|.)", "ig");
  234. try {
  235. D.apply(j = R.call(b.childNodes), b.childNodes),
  236. j[b.childNodes.length].nodeType
  237. } catch (t) {
  238. D = {
  239. apply: j.length ? function(t, e) {
  240. N.apply(t, R.call(e))
  241. }
  242. : function(t, e) {
  243. for (var n = t.length, r = 0; t[n++] = e[r++];)
  244. ;
  245. t.length = n - 1
  246. }
  247. }
  248. }
  249. function rt(t, e, n, r) {
  250. var i, o, s, a, u, c, l, h, f = e && e.ownerDocument, p = e ? e.nodeType : 9;
  251. if (n = n || [],
  252. "string" != typeof t || !t || 1 !== p && 9 !== p && 11 !== p)
  253. return n;
  254. if (!r && ((e ? e.ownerDocument || e : b) !== C && x(e),
  255. e = e || C,
  256. k)) {
  257. if (11 !== p && (c = Z.exec(t)))
  258. if (i = c[1]) {
  259. if (9 === p) {
  260. if (!(s = e.getElementById(i)))
  261. return n;
  262. if (s.id === i)
  263. return n.push(s),
  264. n
  265. } else if (f && (s = f.getElementById(i)) && y(e, s) && s.id === i)
  266. return n.push(s),
  267. n
  268. } else {
  269. if (c[2])
  270. return D.apply(n, e.getElementsByTagName(t)),
  271. n;
  272. if ((i = c[3]) && d.getElementsByClassName && e.getElementsByClassName)
  273. return D.apply(n, e.getElementsByClassName(i)),
  274. n
  275. }
  276. if (d.qsa && !T[t + " "] && (!v || !v.test(t))) {
  277. if (1 !== p)
  278. f = e,
  279. h = t;
  280. else if ("object" !== e.nodeName.toLowerCase()) {
  281. for ((a = e.getAttribute("id")) ? a = a.replace(et, "\\$&") : e.setAttribute("id", a = S),
  282. o = (l = g(t)).length,
  283. u = X.test(a) ? "#" + a : "[id='" + a + "']"; o--;)
  284. l[o] = u + " " + ft(l[o]);
  285. h = l.join(","),
  286. f = tt.test(t) && lt(e.parentNode) || e
  287. }
  288. if (h)
  289. try {
  290. return D.apply(n, f.querySelectorAll(h)),
  291. n
  292. } catch (t) { } finally {
  293. a === S && e.removeAttribute("id")
  294. }
  295. }
  296. }
  297. return m(t.replace(z, "$1"), e, n, r)
  298. }
  299. function it() {
  300. var n = [];
  301. function r(t, e) {
  302. return n.push(t + " ") > w.cacheLength && delete r[n.shift()],
  303. r[t + " "] = e
  304. }
  305. return r
  306. }
  307. function ot(t) {
  308. return t[S] = !0,
  309. t
  310. }
  311. function st(t) {
  312. var e = C.createElement("div");
  313. try {
  314. return !!t(e)
  315. } catch (t) {
  316. return !1
  317. } finally {
  318. e.parentNode && e.parentNode.removeChild(e),
  319. e = null
  320. }
  321. }
  322. function at(t, e) {
  323. for (var n = t.split("|"), r = n.length; r--;)
  324. w.attrHandle[n[r]] = e
  325. }
  326. function ut(t, e) {
  327. var n = e && t
  328. , r = n && 1 === t.nodeType && 1 === e.nodeType && (~e.sourceIndex || 1 << 31) - (~t.sourceIndex || 1 << 31);
  329. if (r)
  330. return r;
  331. if (n)
  332. for (; n = n.nextSibling;)
  333. if (n === e)
  334. return -1;
  335. return t ? 1 : -1
  336. }
  337. function ct(s) {
  338. return ot(function(o) {
  339. return o = +o,
  340. ot(function(t, e) {
  341. for (var n, r = s([], t.length, o), i = r.length; i--;)
  342. t[n = r[i]] && (t[n] = !(e[n] = t[n]))
  343. })
  344. })
  345. }
  346. function lt(t) {
  347. return t && void 0 !== t.getElementsByTagName && t
  348. }
  349. for (t in d = rt.support = {},
  350. r = rt.isXML = function(t) {
  351. t = t && (t.ownerDocument || t).documentElement;
  352. return !!t && "HTML" !== t.nodeName
  353. }
  354. ,
  355. x = rt.setDocument = function(t) {
  356. var t = t ? t.ownerDocument || t : b;
  357. return t !== C && 9 === t.nodeType && t.documentElement && (i = (C = t).documentElement,
  358. k = !r(C),
  359. (t = C.defaultView) && t.top !== t && (t.addEventListener ? t.addEventListener("unload", e, !1) : t.attachEvent && t.attachEvent("onunload", e)),
  360. d.attributes = st(function(t) {
  361. return t.className = "i",
  362. !t.getAttribute("className")
  363. }),
  364. d.getElementsByTagName = st(function(t) {
  365. return t.appendChild(C.createComment("")),
  366. !t.getElementsByTagName("*").length
  367. }),
  368. d.getElementsByClassName = J.test(C.getElementsByClassName),
  369. d.getById = st(function(t) {
  370. return i.appendChild(t).id = S,
  371. !C.getElementsByName || !C.getElementsByName(S).length
  372. }),
  373. d.getById ? (w.find.ID = function(t, e) {
  374. if (void 0 !== e.getElementById && k) {
  375. t = e.getElementById(t);
  376. return t ? [t] : []
  377. }
  378. }
  379. ,
  380. w.filter.ID = function(t) {
  381. var e = t.replace(nt, h);
  382. return function(t) {
  383. return t.getAttribute("id") === e
  384. }
  385. }
  386. ) : (delete w.find.ID,
  387. w.filter.ID = function(t) {
  388. var e = t.replace(nt, h);
  389. return function(t) {
  390. t = void 0 !== t.getAttributeNode && t.getAttributeNode("id");
  391. return t && t.value === e
  392. }
  393. }
  394. ),
  395. w.find.TAG = d.getElementsByTagName ? function(t, e) {
  396. return void 0 !== e.getElementsByTagName ? e.getElementsByTagName(t) : d.qsa ? e.querySelectorAll(t) : void 0
  397. }
  398. : function(t, e) {
  399. var n, r = [], i = 0, o = e.getElementsByTagName(t);
  400. if ("*" !== t)
  401. return o;
  402. for (; n = o[i++];)
  403. 1 === n.nodeType && r.push(n);
  404. return r
  405. }
  406. ,
  407. w.find.CLASS = d.getElementsByClassName && function(t, e) {
  408. return void 0 !== e.getElementsByClassName && k ? e.getElementsByClassName(t) : void 0
  409. }
  410. ,
  411. s = [],
  412. v = [],
  413. (d.qsa = J.test(C.querySelectorAll)) && (st(function(t) {
  414. i.appendChild(t).innerHTML = "<a id='" + S + "'></a><select id='" + S + "-\r\\' msallowcapture=''><option selected=''></option></select>",
  415. t.querySelectorAll("[msallowcapture^='']").length && v.push("[*^$]=" + L + "*(?:''|\"\")"),
  416. t.querySelectorAll("[selected]").length || v.push("\\[" + L + "*(?:value|" + W + ")"),
  417. t.querySelectorAll("[id~=" + S + "-]").length || v.push("~="),
  418. t.querySelectorAll(":checked").length || v.push(":checked"),
  419. t.querySelectorAll("a#" + S + "+*").length || v.push(".#.+[+~]")
  420. }),
  421. st(function(t) {
  422. var e = C.createElement("input");
  423. e.setAttribute("type", "hidden"),
  424. t.appendChild(e).setAttribute("name", "D"),
  425. t.querySelectorAll("[name=d]").length && v.push("name" + L + "*[*^$|!~]?="),
  426. t.querySelectorAll(":enabled").length || v.push(":enabled", ":disabled"),
  427. t.querySelectorAll("*,:x"),
  428. v.push(",.*:")
  429. })),
  430. (d.matchesSelector = J.test(a = i.matches || i.webkitMatchesSelector || i.mozMatchesSelector || i.oMatchesSelector || i.msMatchesSelector)) && st(function(t) {
  431. d.disconnectedMatch = a.call(t, "div"),
  432. a.call(t, "[s!='']:x"),
  433. s.push("!=", B)
  434. }),
  435. v = v.length && new RegExp(v.join("|")),
  436. s = s.length && new RegExp(s.join("|")),
  437. t = J.test(i.compareDocumentPosition),
  438. y = t || J.test(i.contains) ? function(t, e) {
  439. var n = 9 === t.nodeType ? t.documentElement : t
  440. , e = e && e.parentNode;
  441. return t === e || !(!e || 1 !== e.nodeType || !(n.contains ? n.contains(e) : t.compareDocumentPosition && 16 & t.compareDocumentPosition(e)))
  442. }
  443. : function(t, e) {
  444. if (e)
  445. for (; e = e.parentNode;)
  446. if (e === t)
  447. return !0;
  448. return !1
  449. }
  450. ,
  451. A = t ? function(t, e) {
  452. if (t === e)
  453. return c = !0,
  454. 0;
  455. var n = !t.compareDocumentPosition - !e.compareDocumentPosition;
  456. return n || (1 & (n = (t.ownerDocument || t) === (e.ownerDocument || e) ? t.compareDocumentPosition(e) : 1) || !d.sortDetached && e.compareDocumentPosition(t) === n ? t === C || t.ownerDocument === b && y(b, t) ? -1 : e === C || e.ownerDocument === b && y(b, e) ? 1 : u ? M(u, t) - M(u, e) : 0 : 4 & n ? -1 : 1)
  457. }
  458. : function(t, e) {
  459. if (t === e)
  460. return c = !0,
  461. 0;
  462. var n, r = 0, i = t.parentNode, o = e.parentNode, s = [t], a = [e];
  463. if (!i || !o)
  464. return t === C ? -1 : e === C ? 1 : i ? -1 : o ? 1 : u ? M(u, t) - M(u, e) : 0;
  465. if (i === o)
  466. return ut(t, e);
  467. for (n = t; n = n.parentNode;)
  468. s.unshift(n);
  469. for (n = e; n = n.parentNode;)
  470. a.unshift(n);
  471. for (; s[r] === a[r];)
  472. r++;
  473. return r ? ut(s[r], a[r]) : s[r] === b ? -1 : a[r] === b ? 1 : 0
  474. }
  475. ),
  476. C
  477. }
  478. ,
  479. rt.matches = function(t, e) {
  480. return rt(t, null, null, e)
  481. }
  482. ,
  483. rt.matchesSelector = function(t, e) {
  484. if ((t.ownerDocument || t) !== C && x(t),
  485. e = e.replace(V, "='$1']"),
  486. d.matchesSelector && k && !T[e + " "] && (!s || !s.test(e)) && (!v || !v.test(e)))
  487. try {
  488. var n = a.call(t, e);
  489. if (n || d.disconnectedMatch || t.document && 11 !== t.document.nodeType)
  490. return n
  491. } catch (t) { }
  492. return 0 < rt(e, C, null, [t]).length
  493. }
  494. ,
  495. rt.contains = function(t, e) {
  496. return (t.ownerDocument || t) !== C && x(t),
  497. y(t, e)
  498. }
  499. ,
  500. rt.attr = function(t, e) {
  501. (t.ownerDocument || t) !== C && x(t);
  502. var n = w.attrHandle[e.toLowerCase()]
  503. , n = n && I.call(w.attrHandle, e.toLowerCase()) ? n(t, e, !k) : void 0;
  504. return void 0 !== n ? n : d.attributes || !k ? t.getAttribute(e) : (n = t.getAttributeNode(e)) && n.specified ? n.value : null
  505. }
  506. ,
  507. rt.error = function(t) {
  508. throw new Error("Syntax error, unrecognized expression: " + t)
  509. }
  510. ,
  511. rt.uniqueSort = function(t) {
  512. var e, n = [], r = 0, i = 0;
  513. if (c = !d.detectDuplicates,
  514. u = !d.sortStable && t.slice(0),
  515. t.sort(A),
  516. c) {
  517. for (; e = t[i++];)
  518. e === t[i] && (r = n.push(i));
  519. for (; r--;)
  520. t.splice(n[r], 1)
  521. }
  522. return u = null,
  523. t
  524. }
  525. ,
  526. o = rt.getText = function(t) {
  527. var e, n = "", r = 0, i = t.nodeType;
  528. if (i) {
  529. if (1 === i || 9 === i || 11 === i) {
  530. if ("string" == typeof t.textContent)
  531. return t.textContent;
  532. for (t = t.firstChild; t; t = t.nextSibling)
  533. n += o(t)
  534. } else if (3 === i || 4 === i)
  535. return t.nodeValue
  536. } else
  537. for (; e = t[r++];)
  538. n += o(e);
  539. return n
  540. }
  541. ,
  542. (w = rt.selectors = {
  543. cacheLength: 50,
  544. createPseudo: ot,
  545. match: Y,
  546. attrHandle: {},
  547. find: {},
  548. relative: {
  549. ">": {
  550. dir: "parentNode",
  551. first: !0
  552. },
  553. " ": {
  554. dir: "parentNode"
  555. },
  556. "+": {
  557. dir: "previousSibling",
  558. first: !0
  559. },
  560. "~": {
  561. dir: "previousSibling"
  562. }
  563. },
  564. preFilter: {
  565. ATTR: function(t) {
  566. return t[1] = t[1].replace(nt, h),
  567. t[3] = (t[3] || t[4] || t[5] || "").replace(nt, h),
  568. "~=" === t[2] && (t[3] = " " + t[3] + " "),
  569. t.slice(0, 4)
  570. },
  571. CHILD: function(t) {
  572. return t[1] = t[1].toLowerCase(),
  573. "nth" === t[1].slice(0, 3) ? (t[3] || rt.error(t[0]),
  574. t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])),
  575. t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && rt.error(t[0]),
  576. t
  577. },
  578. PSEUDO: function(t) {
  579. var e, n = !t[6] && t[2];
  580. return Y.CHILD.test(t[0]) ? null : (t[3] ? t[2] = t[4] || t[5] || "" : n && $.test(n) && (e = g(n, !0)) && (e = n.indexOf(")", n.length - e) - n.length) && (t[0] = t[0].slice(0, e),
  581. t[2] = n.slice(0, e)),
  582. t.slice(0, 3))
  583. }
  584. },
  585. filter: {
  586. TAG: function(t) {
  587. var e = t.replace(nt, h).toLowerCase();
  588. return "*" === t ? function() {
  589. return !0
  590. }
  591. : function(t) {
  592. return t.nodeName && t.nodeName.toLowerCase() === e
  593. }
  594. },
  595. CLASS: function(t) {
  596. var e = p[t + " "];
  597. return e || (e = new RegExp("(^|" + L + ")" + t + "(" + L + "|$)")) && p(t, function(t) {
  598. return e.test("string" == typeof t.className && t.className || void 0 !== t.getAttribute && t.getAttribute("class") || "")
  599. })
  600. },
  601. ATTR: function(e, n, r) {
  602. return function(t) {
  603. t = rt.attr(t, e);
  604. return null == t ? "!=" === n : !n || (t += "",
  605. "=" === n ? t === r : "!=" === n ? t !== r : "^=" === n ? r && 0 === t.indexOf(r) : "*=" === n ? r && -1 < t.indexOf(r) : "$=" === n ? r && t.slice(-r.length) === r : "~=" === n ? -1 < (" " + t.replace(q, " ") + " ").indexOf(r) : "|=" === n && (t === r || t.slice(0, r.length + 1) === r + "-"))
  606. }
  607. },
  608. CHILD: function(d, t, e, g, m) {
  609. var v = "nth" !== d.slice(0, 3)
  610. , y = "last" !== d.slice(-4)
  611. , b = "of-type" === t;
  612. return 1 === g && 0 === m ? function(t) {
  613. return !!t.parentNode
  614. }
  615. : function(t, e, n) {
  616. var r, i, o, s, a, u, c = v != y ? "nextSibling" : "previousSibling", l = t.parentNode, h = b && t.nodeName.toLowerCase(), f = !n && !b, p = !1;
  617. if (l) {
  618. if (v) {
  619. for (; c;) {
  620. for (s = t; s = s[c];)
  621. if (b ? s.nodeName.toLowerCase() === h : 1 === s.nodeType)
  622. return !1;
  623. u = c = "only" === d && !u && "nextSibling"
  624. }
  625. return !0
  626. }
  627. if (u = [y ? l.firstChild : l.lastChild],
  628. y && f) {
  629. for (p = (a = (r = (i = (o = (s = l)[S] || (s[S] = {}))[s.uniqueID] || (o[s.uniqueID] = {}))[d] || [])[0] === O && r[1]) && r[2],
  630. s = a && l.childNodes[a]; s = ++a && s && s[c] || (p = a = 0) || u.pop();)
  631. if (1 === s.nodeType && ++p && s === t) {
  632. i[d] = [O, a, p];
  633. break
  634. }
  635. } else if (f && (p = a = (r = (i = (o = (s = t)[S] || (s[S] = {}))[s.uniqueID] || (o[s.uniqueID] = {}))[d] || [])[0] === O && r[1]),
  636. !1 === p)
  637. for (; (s = ++a && s && s[c] || (p = a = 0) || u.pop()) && ((b ? s.nodeName.toLowerCase() !== h : 1 !== s.nodeType) || !++p || (f && ((i = (o = s[S] || (s[S] = {}))[s.uniqueID] || (o[s.uniqueID] = {}))[d] = [O, p]),
  638. s !== t));)
  639. ;
  640. return (p -= m) === g || p % g == 0 && 0 <= p / g
  641. }
  642. }
  643. },
  644. PSEUDO: function(t, o) {
  645. var e, s = w.pseudos[t] || w.setFilters[t.toLowerCase()] || rt.error("unsupported pseudo: " + t);
  646. return s[S] ? s(o) : 1 < s.length ? (e = [t, t, "", o],
  647. w.setFilters.hasOwnProperty(t.toLowerCase()) ? ot(function(t, e) {
  648. for (var n, r = s(t, o), i = r.length; i--;)
  649. t[n = M(t, r[i])] = !(e[n] = r[i])
  650. }) : function(t) {
  651. return s(t, 0, e)
  652. }
  653. ) : s
  654. }
  655. },
  656. pseudos: {
  657. not: ot(function(t) {
  658. var r = []
  659. , i = []
  660. , a = f(t.replace(z, "$1"));
  661. return a[S] ? ot(function(t, e, n, r) {
  662. for (var i, o = a(t, null, r, []), s = t.length; s--;)
  663. (i = o[s]) && (t[s] = !(e[s] = i))
  664. }) : function(t, e, n) {
  665. return r[0] = t,
  666. a(r, null, n, i),
  667. r[0] = null,
  668. !i.pop()
  669. }
  670. }),
  671. has: ot(function(e) {
  672. return function(t) {
  673. return 0 < rt(e, t).length
  674. }
  675. }),
  676. contains: ot(function(e) {
  677. return e = e.replace(nt, h),
  678. function(t) {
  679. return -1 < (t.textContent || t.innerText || o(t)).indexOf(e)
  680. }
  681. }),
  682. lang: ot(function(n) {
  683. return X.test(n || "") || rt.error("unsupported lang: " + n),
  684. n = n.replace(nt, h).toLowerCase(),
  685. function(t) {
  686. var e;
  687. do {
  688. if (e = k ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang"))
  689. return (e = e.toLowerCase()) === n || 0 === e.indexOf(n + "-")
  690. } while ((t = t.parentNode) && 1 === t.nodeType);
  691. return !1
  692. }
  693. }),
  694. target: function(t) {
  695. var e = n.location && n.location.hash;
  696. return e && e.slice(1) === t.id
  697. },
  698. root: function(t) {
  699. return t === i
  700. },
  701. focus: function(t) {
  702. return t === C.activeElement && (!C.hasFocus || C.hasFocus()) && !!(t.type || t.href || ~t.tabIndex)
  703. },
  704. enabled: function(t) {
  705. return !1 === t.disabled
  706. },
  707. disabled: function(t) {
  708. return !0 === t.disabled
  709. },
  710. checked: function(t) {
  711. var e = t.nodeName.toLowerCase();
  712. return "input" === e && !!t.checked || "option" === e && !!t.selected
  713. },
  714. selected: function(t) {
  715. return t.parentNode && t.parentNode.selectedIndex,
  716. !0 === t.selected
  717. },
  718. empty: function(t) {
  719. for (t = t.firstChild; t; t = t.nextSibling)
  720. if (t.nodeType < 6)
  721. return !1;
  722. return !0
  723. },
  724. parent: function(t) {
  725. return !w.pseudos.empty(t)
  726. },
  727. header: function(t) {
  728. return Q.test(t.nodeName)
  729. },
  730. input: function(t) {
  731. return K.test(t.nodeName)
  732. },
  733. button: function(t) {
  734. var e = t.nodeName.toLowerCase();
  735. return "input" === e && "button" === t.type || "button" === e
  736. },
  737. text: function(t) {
  738. return "input" === t.nodeName.toLowerCase() && "text" === t.type && (null == (t = t.getAttribute("type")) || "text" === t.toLowerCase())
  739. },
  740. first: ct(function() {
  741. return [0]
  742. }),
  743. last: ct(function(t, e) {
  744. return [e - 1]
  745. }),
  746. eq: ct(function(t, e, n) {
  747. return [n < 0 ? n + e : n]
  748. }),
  749. even: ct(function(t, e) {
  750. for (var n = 0; n < e; n += 2)
  751. t.push(n);
  752. return t
  753. }),
  754. odd: ct(function(t, e) {
  755. for (var n = 1; n < e; n += 2)
  756. t.push(n);
  757. return t
  758. }),
  759. lt: ct(function(t, e, n) {
  760. for (var r = n < 0 ? n + e : n; 0 <= --r;)
  761. t.push(r);
  762. return t
  763. }),
  764. gt: ct(function(t, e, n) {
  765. for (var r = n < 0 ? n + e : n; ++r < e;)
  766. t.push(r);
  767. return t
  768. })
  769. }
  770. }).pseudos.nth = w.pseudos.eq,
  771. {
  772. radio: !0,
  773. checkbox: !0,
  774. file: !0,
  775. password: !0,
  776. image: !0
  777. })
  778. w.pseudos[t] = function(e) {
  779. return function(t) {
  780. return "input" === t.nodeName.toLowerCase() && t.type === e
  781. }
  782. }(t);
  783. for (t in {
  784. submit: !0,
  785. reset: !0
  786. })
  787. w.pseudos[t] = function(n) {
  788. return function(t) {
  789. var e = t.nodeName.toLowerCase();
  790. return ("input" === e || "button" === e) && t.type === n
  791. }
  792. }(t);
  793. function ht() { }
  794. function ft(t) {
  795. for (var e = 0, n = t.length, r = ""; e < n; e++)
  796. r += t[e].value;
  797. return r
  798. }
  799. function pt(s, t, e) {
  800. var a = t.dir
  801. , u = e && "parentNode" === a
  802. , c = l++;
  803. return t.first ? function(t, e, n) {
  804. for (; t = t[a];)
  805. if (1 === t.nodeType || u)
  806. return s(t, e, n)
  807. }
  808. : function(t, e, n) {
  809. var r, i, o = [O, c];
  810. if (n) {
  811. for (; t = t[a];)
  812. if ((1 === t.nodeType || u) && s(t, e, n))
  813. return !0
  814. } else
  815. for (; t = t[a];)
  816. if (1 === t.nodeType || u) {
  817. if ((i = (r = (i = t[S] || (t[S] = {}))[t.uniqueID] || (i[t.uniqueID] = {}))[a]) && i[0] === O && i[1] === c)
  818. return o[2] = i[2];
  819. if ((r[a] = o)[2] = s(t, e, n))
  820. return !0
  821. }
  822. }
  823. }
  824. function dt(i) {
  825. return 1 < i.length ? function(t, e, n) {
  826. for (var r = i.length; r--;)
  827. if (!i[r](t, e, n))
  828. return !1;
  829. return !0
  830. }
  831. : i[0]
  832. }
  833. function gt(t, e, n, r, i) {
  834. for (var o, s = [], a = 0, u = t.length, c = null != e; a < u; a++)
  835. (o = t[a]) && (n && !n(o, r, i) || (s.push(o),
  836. c && e.push(a)));
  837. return s
  838. }
  839. function mt(p, d, g, m, v, t) {
  840. return m && !m[S] && (m = mt(m)),
  841. v && !v[S] && (v = mt(v, t)),
  842. ot(function(t, e, n, r) {
  843. var i, o, s, a = [], u = [], c = e.length, l = t || function(t, e, n) {
  844. for (var r = 0, i = e.length; r < i; r++)
  845. rt(t, e[r], n);
  846. return n
  847. }(d || "*", n.nodeType ? [n] : n, []), h = !p || !t && d ? l : gt(l, a, p, n, r), f = g ? v || (t ? p : c || m) ? [] : e : h;
  848. if (g && g(h, f, n, r),
  849. m)
  850. for (i = gt(f, u),
  851. m(i, [], n, r),
  852. o = i.length; o--;)
  853. (s = i[o]) && (f[u[o]] = !(h[u[o]] = s));
  854. if (t) {
  855. if (v || p) {
  856. if (v) {
  857. for (i = [],
  858. o = f.length; o--;)
  859. (s = f[o]) && i.push(h[o] = s);
  860. v(null, f = [], i, r)
  861. }
  862. for (o = f.length; o--;)
  863. (s = f[o]) && -1 < (i = v ? M(t, s) : a[o]) && (t[i] = !(e[i] = s))
  864. }
  865. } else
  866. f = gt(f === e ? f.splice(c, f.length) : f),
  867. v ? v(null, e, f, r) : D.apply(e, f)
  868. })
  869. }
  870. function vt(m, v) {
  871. function t(t, e, n, r, i) {
  872. var o, s, a, u = 0, c = "0", l = t && [], h = [], f = _, p = t || b && w.find.TAG("*", i), d = O += null == f ? 1 : Math.random() || .1, g = p.length;
  873. for (i && (_ = e === C || e || i); c !== g && null != (o = p[c]); c++) {
  874. if (b && o) {
  875. for (s = 0,
  876. e || o.ownerDocument === C || (x(o),
  877. n = !k); a = m[s++];)
  878. if (a(o, e || C, n)) {
  879. r.push(o);
  880. break
  881. }
  882. i && (O = d)
  883. }
  884. y && ((o = !a && o) && u--,
  885. t && l.push(o))
  886. }
  887. if (u += c,
  888. y && c !== u) {
  889. for (s = 0; a = v[s++];)
  890. a(l, h, e, n);
  891. if (t) {
  892. if (0 < u)
  893. for (; c--;)
  894. l[c] || h[c] || (h[c] = P.call(r));
  895. h = gt(h)
  896. }
  897. D.apply(r, h),
  898. i && !t && 0 < h.length && 1 < u + v.length && rt.uniqueSort(r)
  899. }
  900. return i && (O = d,
  901. _ = f),
  902. l
  903. }
  904. var y = 0 < v.length
  905. , b = 0 < m.length;
  906. return y ? ot(t) : t
  907. }
  908. return ht.prototype = w.filters = w.pseudos,
  909. w.setFilters = new ht,
  910. g = rt.tokenize = function(t, e) {
  911. var n, r, i, o, s, a, u, c = E[t + " "];
  912. if (c)
  913. return e ? 0 : c.slice(0);
  914. for (s = t,
  915. a = [],
  916. u = w.preFilter; s;) {
  917. for (o in n && !(r = U.exec(s)) || (r && (s = s.slice(r[0].length) || s),
  918. a.push(i = [])),
  919. n = !1,
  920. (r = G.exec(s)) && (n = r.shift(),
  921. i.push({
  922. value: n,
  923. type: r[0].replace(z, " ")
  924. }),
  925. s = s.slice(n.length)),
  926. w.filter)
  927. !(r = Y[o].exec(s)) || u[o] && !(r = u[o](r)) || (n = r.shift(),
  928. i.push({
  929. value: n,
  930. type: o,
  931. matches: r
  932. }),
  933. s = s.slice(n.length));
  934. if (!n)
  935. break
  936. }
  937. return e ? s.length : s ? rt.error(t) : E(t, a).slice(0)
  938. }
  939. ,
  940. f = rt.compile = function(t, e) {
  941. var n, r = [], i = [], o = T[t + " "];
  942. if (!o) {
  943. for (n = (e = e || g(t)).length; n--;)
  944. ((o = function t(e) {
  945. for (var r, n, i, o = e.length, s = w.relative[e[0].type], a = s || w.relative[" "], u = s ? 1 : 0, c = pt(function(t) {
  946. return t === r
  947. }, a, !0), l = pt(function(t) {
  948. return -1 < M(r, t)
  949. }, a, !0), h = [function(t, e, n) {
  950. return n = !s && (n || e !== _) || ((r = e).nodeType ? c : l)(t, e, n),
  951. r = null,
  952. n
  953. }
  954. ]; u < o; u++)
  955. if (n = w.relative[e[u].type])
  956. h = [pt(dt(h), n)];
  957. else {
  958. if ((n = w.filter[e[u].type].apply(null, e[u].matches))[S]) {
  959. for (i = ++u; i < o && !w.relative[e[i].type]; i++)
  960. ;
  961. return mt(1 < u && dt(h), 1 < u && ft(e.slice(0, u - 1).concat({
  962. value: " " === e[u - 2].type ? "*" : ""
  963. })).replace(z, "$1"), n, u < i && t(e.slice(u, i)), i < o && t(e = e.slice(i)), i < o && ft(e))
  964. }
  965. h.push(n)
  966. }
  967. return dt(h)
  968. }(e[n]))[S] ? r : i).push(o);
  969. (o = T(t, vt(i, r))).selector = t
  970. }
  971. return o
  972. }
  973. ,
  974. m = rt.select = function(t, e, n, r) {
  975. var i, o, s, a, u, c = "function" == typeof t && t, l = !r && g(t = c.selector || t);
  976. if (n = n || [],
  977. 1 === l.length) {
  978. if (2 < (o = l[0] = l[0].slice(0)).length && "ID" === (s = o[0]).type && d.getById && 9 === e.nodeType && k && w.relative[o[1].type]) {
  979. if (!(e = (w.find.ID(s.matches[0].replace(nt, h), e) || [])[0]))
  980. return n;
  981. c && (e = e.parentNode),
  982. t = t.slice(o.shift().value.length)
  983. }
  984. for (i = Y.needsContext.test(t) ? 0 : o.length; i-- && (s = o[i],
  985. !w.relative[a = s.type]);)
  986. if ((u = w.find[a]) && (r = u(s.matches[0].replace(nt, h), tt.test(o[0].type) && lt(e.parentNode) || e))) {
  987. if (o.splice(i, 1),
  988. !(t = r.length && ft(o)))
  989. return D.apply(n, r),
  990. n;
  991. break
  992. }
  993. }
  994. return (c || f(t, l))(r, e, !k, n, !e || tt.test(t) && lt(e.parentNode) || e),
  995. n
  996. }
  997. ,
  998. d.sortStable = S.split("").sort(A).join("") === S,
  999. d.detectDuplicates = !!c,
  1000. x(),
  1001. d.sortDetached = st(function(t) {
  1002. return 1 & t.compareDocumentPosition(C.createElement("div"))
  1003. }),
  1004. st(function(t) {
  1005. return t.innerHTML = "<a href='#'></a>",
  1006. "#" === t.firstChild.getAttribute("href")
  1007. }) || at("type|href|height|width", function(t, e, n) {
  1008. return n ? void 0 : t.getAttribute(e, "type" === e.toLowerCase() ? 1 : 2)
  1009. }),
  1010. d.attributes && st(function(t) {
  1011. return t.innerHTML = "<input/>",
  1012. t.firstChild.setAttribute("value", ""),
  1013. "" === t.firstChild.getAttribute("value")
  1014. }) || at("value", function(t, e, n) {
  1015. return n || "input" !== t.nodeName.toLowerCase() ? void 0 : t.defaultValue
  1016. }),
  1017. st(function(t) {
  1018. return null == t.getAttribute("disabled")
  1019. }) || at(W, function(t, e, n) {
  1020. return n ? void 0 : !0 === t[e] ? e.toLowerCase() : (e = t.getAttributeNode(e)) && e.specified ? e.value : null
  1021. }),
  1022. rt
  1023. }(x);
  1024. k.find = p,
  1025. k.expr = p.selectors,
  1026. k.expr[":"] = k.expr.pseudos,
  1027. k.uniqueSort = k.unique = p.uniqueSort,
  1028. k.text = p.getText,
  1029. k.isXMLDoc = p.isXML,
  1030. k.contains = p.contains;
  1031. function v(t, e, n) {
  1032. for (var r = [], i = void 0 !== n; (t = t[e]) && 9 !== t.nodeType;)
  1033. if (1 === t.nodeType) {
  1034. if (i && k(t).is(n))
  1035. break;
  1036. r.push(t)
  1037. }
  1038. return r
  1039. }
  1040. function y(t, e) {
  1041. for (var n = []; t; t = t.nextSibling)
  1042. 1 === t.nodeType && t !== e && n.push(t);
  1043. return n
  1044. }
  1045. var b = k.expr.match.needsContext
  1046. , w = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/
  1047. , _ = /^.[^:#\[\.,]*$/;
  1048. function S(t, n, r) {
  1049. if (k.isFunction(n))
  1050. return k.grep(t, function(t, e) {
  1051. return !!n.call(t, e, t) !== r
  1052. });
  1053. if (n.nodeType)
  1054. return k.grep(t, function(t) {
  1055. return t === n !== r
  1056. });
  1057. if ("string" == typeof n) {
  1058. if (_.test(n))
  1059. return k.filter(n, t, r);
  1060. n = k.filter(n, t)
  1061. }
  1062. return k.grep(t, function(t) {
  1063. return -1 < i.call(n, t) !== r
  1064. })
  1065. }
  1066. k.filter = function(t, e, n) {
  1067. var r = e[0];
  1068. return n && (t = ":not(" + t + ")"),
  1069. 1 === e.length && 1 === r.nodeType ? k.find.matchesSelector(r, t) ? [r] : [] : k.find.matches(t, k.grep(e, function(t) {
  1070. return 1 === t.nodeType
  1071. }))
  1072. }
  1073. ,
  1074. k.fn.extend({
  1075. find: function(t) {
  1076. var e, n = this.length, r = [], i = this;
  1077. if ("string" != typeof t)
  1078. return this.pushStack(k(t).filter(function() {
  1079. for (e = 0; e < n; e++)
  1080. if (k.contains(i[e], this))
  1081. return !0
  1082. }));
  1083. for (e = 0; e < n; e++)
  1084. k.find(t, i[e], r);
  1085. return (r = this.pushStack(1 < n ? k.unique(r) : r)).selector = this.selector ? this.selector + " " + t : t,
  1086. r
  1087. },
  1088. filter: function(t) {
  1089. return this.pushStack(S(this, t || [], !1))
  1090. },
  1091. not: function(t) {
  1092. return this.pushStack(S(this, t || [], !0))
  1093. },
  1094. is: function(t) {
  1095. return !!S(this, "string" == typeof t && b.test(t) ? k(t) : t || [], !1).length
  1096. }
  1097. });
  1098. var O, E = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
  1099. (k.fn.init = function(t, e, n) {
  1100. if (!t)
  1101. return this;
  1102. if (n = n || O,
  1103. "string" != typeof t)
  1104. return t.nodeType ? (this.context = this[0] = t,
  1105. this.length = 1,
  1106. this) : k.isFunction(t) ? void 0 !== n.ready ? n.ready(t) : t(k) : (void 0 !== t.selector && (this.selector = t.selector,
  1107. this.context = t.context),
  1108. k.makeArray(t, this));
  1109. if (!(r = "<" === t[0] && ">" === t[t.length - 1] && 3 <= t.length ? [null, t, null] : E.exec(t)) || !r[1] && e)
  1110. return (!e || e.jquery ? e || n : this.constructor(e)).find(t);
  1111. if (r[1]) {
  1112. if (e = e instanceof k ? e[0] : e,
  1113. k.merge(this, k.parseHTML(r[1], e && e.nodeType ? e.ownerDocument || e : C, !0)),
  1114. w.test(r[1]) && k.isPlainObject(e))
  1115. for (var r in e)
  1116. k.isFunction(this[r]) ? this[r](e[r]) : this.attr(r, e[r]);
  1117. return this
  1118. }
  1119. return (n = C.getElementById(r[2])) && n.parentNode && (this.length = 1,
  1120. this[0] = n),
  1121. this.context = C,
  1122. this.selector = t,
  1123. this
  1124. }
  1125. ).prototype = k.fn,
  1126. O = k(C);
  1127. var T = /^(?:parents|prev(?:Until|All))/
  1128. , A = {
  1129. children: !0,
  1130. contents: !0,
  1131. next: !0,
  1132. prev: !0
  1133. };
  1134. function I(t, e) {
  1135. for (; (t = t[e]) && 1 !== t.nodeType;)
  1136. ;
  1137. return t
  1138. }
  1139. k.fn.extend({
  1140. has: function(t) {
  1141. var e = k(t, this)
  1142. , n = e.length;
  1143. return this.filter(function() {
  1144. for (var t = 0; t < n; t++)
  1145. if (k.contains(this, e[t]))
  1146. return !0
  1147. })
  1148. },
  1149. closest: function(t, e) {
  1150. for (var n, r = 0, i = this.length, o = [], s = b.test(t) || "string" != typeof t ? k(t, e || this.context) : 0; r < i; r++)
  1151. for (n = this[r]; n && n !== e; n = n.parentNode)
  1152. if (n.nodeType < 11 && (s ? -1 < s.index(n) : 1 === n.nodeType && k.find.matchesSelector(n, t))) {
  1153. o.push(n);
  1154. break
  1155. }
  1156. return this.pushStack(1 < o.length ? k.uniqueSort(o) : o)
  1157. },
  1158. index: function(t) {
  1159. return t ? "string" == typeof t ? i.call(k(t), this[0]) : i.call(this, t.jquery ? t[0] : t) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
  1160. },
  1161. add: function(t, e) {
  1162. return this.pushStack(k.uniqueSort(k.merge(this.get(), k(t, e))))
  1163. },
  1164. addBack: function(t) {
  1165. return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
  1166. }
  1167. }),
  1168. k.each({
  1169. parent: function(t) {
  1170. t = t.parentNode;
  1171. return t && 11 !== t.nodeType ? t : null
  1172. },
  1173. parents: function(t) {
  1174. return v(t, "parentNode")
  1175. },
  1176. parentsUntil: function(t, e, n) {
  1177. return v(t, "parentNode", n)
  1178. },
  1179. next: function(t) {
  1180. return I(t, "nextSibling")
  1181. },
  1182. prev: function(t) {
  1183. return I(t, "previousSibling")
  1184. },
  1185. nextAll: function(t) {
  1186. return v(t, "nextSibling")
  1187. },
  1188. prevAll: function(t) {
  1189. return v(t, "previousSibling")
  1190. },
  1191. nextUntil: function(t, e, n) {
  1192. return v(t, "nextSibling", n)
  1193. },
  1194. prevUntil: function(t, e, n) {
  1195. return v(t, "previousSibling", n)
  1196. },
  1197. siblings: function(t) {
  1198. return y((t.parentNode || {}).firstChild, t)
  1199. },
  1200. children: function(t) {
  1201. return y(t.firstChild)
  1202. },
  1203. contents: function(t) {
  1204. return t.contentDocument || k.merge([], t.childNodes)
  1205. }
  1206. }, function(r, i) {
  1207. k.fn[r] = function(t, e) {
  1208. var n = k.map(this, i, t);
  1209. return "Until" !== r.slice(-5) && (e = t),
  1210. e && "string" == typeof e && (n = k.filter(e, n)),
  1211. 1 < this.length && (A[r] || k.uniqueSort(n),
  1212. T.test(r) && n.reverse()),
  1213. this.pushStack(n)
  1214. }
  1215. });
  1216. var j, P = /\S+/g;
  1217. function N() {
  1218. C.removeEventListener("DOMContentLoaded", N),
  1219. x.removeEventListener("load", N),
  1220. k.ready()
  1221. }
  1222. k.Callbacks = function(r) {
  1223. var t, n;
  1224. r = "string" == typeof r ? (t = r,
  1225. n = {},
  1226. k.each(t.match(P) || [], function(t, e) {
  1227. n[e] = !0
  1228. }),
  1229. n) : k.extend({}, r);
  1230. function i() {
  1231. for (a = r.once,
  1232. s = o = !0; c.length; l = -1)
  1233. for (e = c.shift(); ++l < u.length;)
  1234. !1 === u[l].apply(e[0], e[1]) && r.stopOnFalse && (l = u.length,
  1235. e = !1);
  1236. r.memory || (e = !1),
  1237. o = !1,
  1238. a && (u = e ? [] : "")
  1239. }
  1240. var o, e, s, a, u = [], c = [], l = -1, h = {
  1241. add: function() {
  1242. return u && (e && !o && (l = u.length - 1,
  1243. c.push(e)),
  1244. function n(t) {
  1245. k.each(t, function(t, e) {
  1246. k.isFunction(e) ? r.unique && h.has(e) || u.push(e) : e && e.length && "string" !== k.type(e) && n(e)
  1247. })
  1248. }(arguments),
  1249. e && !o && i()),
  1250. this
  1251. },
  1252. remove: function() {
  1253. return k.each(arguments, function(t, e) {
  1254. for (var n; -1 < (n = k.inArray(e, u, n));)
  1255. u.splice(n, 1),
  1256. n <= l && l--
  1257. }),
  1258. this
  1259. },
  1260. has: function(t) {
  1261. return t ? -1 < k.inArray(t, u) : 0 < u.length
  1262. },
  1263. empty: function() {
  1264. return u = u && [],
  1265. this
  1266. },
  1267. disable: function() {
  1268. return a = c = [],
  1269. u = e = "",
  1270. this
  1271. },
  1272. disabled: function() {
  1273. return !u
  1274. },
  1275. lock: function() {
  1276. return a = c = [],
  1277. e || (u = e = ""),
  1278. this
  1279. },
  1280. locked: function() {
  1281. return !!a
  1282. },
  1283. fireWith: function(t, e) {
  1284. return a || (e = [t, (e = e || []).slice ? e.slice() : e],
  1285. c.push(e),
  1286. o || i()),
  1287. this
  1288. },
  1289. fire: function() {
  1290. return h.fireWith(this, arguments),
  1291. this
  1292. },
  1293. fired: function() {
  1294. return !!s
  1295. }
  1296. };
  1297. return h
  1298. }
  1299. ,
  1300. k.extend({
  1301. Deferred: function(t) {
  1302. var o = [["resolve", "done", k.Callbacks("once memory"), "resolved"], ["reject", "fail", k.Callbacks("once memory"), "rejected"], ["notify", "progress", k.Callbacks("memory")]]
  1303. , i = "pending"
  1304. , s = {
  1305. state: function() {
  1306. return i
  1307. },
  1308. always: function() {
  1309. return a.done(arguments).fail(arguments),
  1310. this
  1311. },
  1312. then: function() {
  1313. var i = arguments;
  1314. return k.Deferred(function(r) {
  1315. k.each(o, function(t, e) {
  1316. var n = k.isFunction(i[t]) && i[t];
  1317. a[e[1]](function() {
  1318. var t = n && n.apply(this, arguments);
  1319. t && k.isFunction(t.promise) ? t.promise().progress(r.notify).done(r.resolve).fail(r.reject) : r[e[0] + "With"](this === s ? r.promise() : this, n ? [t] : arguments)
  1320. })
  1321. }),
  1322. i = null
  1323. }).promise()
  1324. },
  1325. promise: function(t) {
  1326. return null != t ? k.extend(t, s) : s
  1327. }
  1328. }
  1329. , a = {};
  1330. return s.pipe = s.then,
  1331. k.each(o, function(t, e) {
  1332. var n = e[2]
  1333. , r = e[3];
  1334. s[e[1]] = n.add,
  1335. r && n.add(function() {
  1336. i = r
  1337. }, o[1 ^ t][2].disable, o[2][2].lock),
  1338. a[e[0]] = function() {
  1339. return a[e[0] + "With"](this === a ? s : this, arguments),
  1340. this
  1341. }
  1342. ,
  1343. a[e[0] + "With"] = n.fireWith
  1344. }),
  1345. s.promise(a),
  1346. t && t.call(a, a),
  1347. a
  1348. },
  1349. when: function(t) {
  1350. function e(e, n, r) {
  1351. return function(t) {
  1352. n[e] = this,
  1353. r[e] = 1 < arguments.length ? l.call(arguments) : t,
  1354. r === i ? c.notifyWith(n, r) : --u || c.resolveWith(n, r)
  1355. }
  1356. }
  1357. var i, n, r, o = 0, s = l.call(arguments), a = s.length, u = 1 !== a || t && k.isFunction(t.promise) ? a : 0, c = 1 === u ? t : k.Deferred();
  1358. if (1 < a)
  1359. for (i = new Array(a),
  1360. n = new Array(a),
  1361. r = new Array(a); o < a; o++)
  1362. s[o] && k.isFunction(s[o].promise) ? s[o].promise().progress(e(o, n, i)).done(e(o, r, s)).fail(c.reject) : --u;
  1363. return u || c.resolveWith(r, s),
  1364. c.promise()
  1365. }
  1366. }),
  1367. k.fn.ready = function(t) {
  1368. return k.ready.promise().done(t),
  1369. this
  1370. }
  1371. ,
  1372. k.extend({
  1373. isReady: !1,
  1374. readyWait: 1,
  1375. holdReady: function(t) {
  1376. t ? k.readyWait++ : k.ready(!0)
  1377. },
  1378. ready: function(t) {
  1379. (!0 === t ? --k.readyWait : k.isReady) || ((k.isReady = !0) !== t && 0 < --k.readyWait || (j.resolveWith(C, [k]),
  1380. k.fn.triggerHandler && (k(C).triggerHandler("ready"),
  1381. k(C).off("ready"))))
  1382. }
  1383. }),
  1384. k.ready.promise = function(t) {
  1385. return j || (j = k.Deferred(),
  1386. "complete" === C.readyState || "loading" !== C.readyState && !C.documentElement.doScroll ? x.setTimeout(k.ready) : (C.addEventListener("DOMContentLoaded", N),
  1387. x.addEventListener("load", N))),
  1388. j.promise(t)
  1389. }
  1390. ,
  1391. k.ready.promise();
  1392. function D(t) {
  1393. return 1 === t.nodeType || 9 === t.nodeType || !+t.nodeType
  1394. }
  1395. var R = function(t, e, n, r, i, o, s) {
  1396. var a = 0
  1397. , u = t.length
  1398. , c = null == n;
  1399. if ("object" === k.type(n))
  1400. for (a in i = !0,
  1401. n)
  1402. R(t, e, a, n[a], !0, o, s);
  1403. else if (void 0 !== r && (i = !0,
  1404. k.isFunction(r) || (s = !0),
  1405. c && (e = s ? (e.call(t, r),
  1406. null) : (c = e,
  1407. function(t, e, n) {
  1408. return c.call(k(t), n)
  1409. }
  1410. )),
  1411. e))
  1412. for (; a < u; a++)
  1413. e(t[a], n, s ? r : r.call(t[a], a, e(t[a], n)));
  1414. return i ? t : c ? e.call(t) : u ? e(t[0], n) : o
  1415. };
  1416. function M() {
  1417. this.expando = k.expando + M.uid++
  1418. }
  1419. M.uid = 1,
  1420. M.prototype = {
  1421. register: function(t, e) {
  1422. e = e || {};
  1423. return t.nodeType ? t[this.expando] = e : Object.defineProperty(t, this.expando, {
  1424. value: e,
  1425. writable: !0,
  1426. configurable: !0
  1427. }),
  1428. t[this.expando]
  1429. },
  1430. cache: function(t) {
  1431. if (!D(t))
  1432. return {};
  1433. var e = t[this.expando];
  1434. return e || (e = {},
  1435. D(t) && (t.nodeType ? t[this.expando] = e : Object.defineProperty(t, this.expando, {
  1436. value: e,
  1437. configurable: !0
  1438. }))),
  1439. e
  1440. },
  1441. set: function(t, e, n) {
  1442. var r, i = this.cache(t);
  1443. if ("string" == typeof e)
  1444. i[e] = n;
  1445. else
  1446. for (r in e)
  1447. i[r] = e[r];
  1448. return i
  1449. },
  1450. get: function(t, e) {
  1451. return void 0 === e ? this.cache(t) : t[this.expando] && t[this.expando][e]
  1452. },
  1453. access: function(t, e, n) {
  1454. var r;
  1455. return void 0 === e || e && "string" == typeof e && void 0 === n ? void 0 !== (r = this.get(t, e)) ? r : this.get(t, k.camelCase(e)) : (this.set(t, e, n),
  1456. void 0 !== n ? n : e)
  1457. },
  1458. remove: function(t, e) {
  1459. var n, r, i, o = t[this.expando];
  1460. if (void 0 !== o) {
  1461. if (void 0 === e)
  1462. this.register(t);
  1463. else {
  1464. n = (r = k.isArray(e) ? e.concat(e.map(k.camelCase)) : (i = k.camelCase(e),
  1465. e in o ? [e, i] : (r = i) in o ? [r] : r.match(P) || [])).length;
  1466. for (; n--;)
  1467. delete o[r[n]]
  1468. }
  1469. void 0 !== e && !k.isEmptyObject(o) || (t.nodeType ? t[this.expando] = void 0 : delete t[this.expando])
  1470. }
  1471. },
  1472. hasData: function(t) {
  1473. t = t[this.expando];
  1474. return void 0 !== t && !k.isEmptyObject(t)
  1475. }
  1476. };
  1477. var W = new M
  1478. , L = new M
  1479. , F = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/
  1480. , H = /[A-Z]/g;
  1481. function B(t, e, n) {
  1482. var r;
  1483. if (void 0 === n && 1 === t.nodeType)
  1484. if (r = "data-" + e.replace(H, "-$&").toLowerCase(),
  1485. "string" == typeof (n = t.getAttribute(r))) {
  1486. try {
  1487. n = "true" === n || "false" !== n && ("null" === n ? null : +n + "" === n ? +n : F.test(n) ? k.parseJSON(n) : n)
  1488. } catch (t) { }
  1489. L.set(t, e, n)
  1490. } else
  1491. n = void 0;
  1492. return n
  1493. }
  1494. k.extend({
  1495. hasData: function(t) {
  1496. return L.hasData(t) || W.hasData(t)
  1497. },
  1498. data: function(t, e, n) {
  1499. return L.access(t, e, n)
  1500. },
  1501. removeData: function(t, e) {
  1502. L.remove(t, e)
  1503. },
  1504. _data: function(t, e, n) {
  1505. return W.access(t, e, n)
  1506. },
  1507. _removeData: function(t, e) {
  1508. W.remove(t, e)
  1509. }
  1510. }),
  1511. k.fn.extend({
  1512. data: function(r, t) {
  1513. var e, n, i, o = this[0], s = o && o.attributes;
  1514. if (void 0 !== r)
  1515. return "object" == typeof r ? this.each(function() {
  1516. L.set(this, r)
  1517. }) : R(this, function(e) {
  1518. var t, n;
  1519. return o && void 0 === e ? void 0 !== (t = L.get(o, r) || L.get(o, r.replace(H, "-$&").toLowerCase())) ? t : (n = k.camelCase(r),
  1520. void 0 !== (t = L.get(o, n)) ? t : void 0 !== (t = B(o, n, void 0)) ? t : void 0) : (n = k.camelCase(r),
  1521. void this.each(function() {
  1522. var t = L.get(this, n);
  1523. L.set(this, n, e),
  1524. -1 < r.indexOf("-") && void 0 !== t && L.set(this, r, e)
  1525. }))
  1526. }, null, t, 1 < arguments.length, null, !0);
  1527. if (this.length && (i = L.get(o),
  1528. 1 === o.nodeType && !W.get(o, "hasDataAttrs"))) {
  1529. for (e = s.length; e--;)
  1530. s[e] && (0 === (n = s[e].name).indexOf("data-") && (n = k.camelCase(n.slice(5)),
  1531. B(o, n, i[n])));
  1532. W.set(o, "hasDataAttrs", !0)
  1533. }
  1534. return i
  1535. },
  1536. removeData: function(t) {
  1537. return this.each(function() {
  1538. L.remove(this, t)
  1539. })
  1540. }
  1541. }),
  1542. k.extend({
  1543. queue: function(t, e, n) {
  1544. var r;
  1545. return t ? (e = (e || "fx") + "queue",
  1546. r = W.get(t, e),
  1547. n && (!r || k.isArray(n) ? r = W.access(t, e, k.makeArray(n)) : r.push(n)),
  1548. r || []) : void 0
  1549. },
  1550. dequeue: function(t, e) {
  1551. e = e || "fx";
  1552. var n = k.queue(t, e)
  1553. , r = n.length
  1554. , i = n.shift()
  1555. , o = k._queueHooks(t, e);
  1556. "inprogress" === i && (i = n.shift(),
  1557. r--),
  1558. i && ("fx" === e && n.unshift("inprogress"),
  1559. delete o.stop,
  1560. i.call(t, function() {
  1561. k.dequeue(t, e)
  1562. }, o)),
  1563. !r && o && o.empty.fire()
  1564. },
  1565. _queueHooks: function(t, e) {
  1566. var n = e + "queueHooks";
  1567. return W.get(t, n) || W.access(t, n, {
  1568. empty: k.Callbacks("once memory").add(function() {
  1569. W.remove(t, [e + "queue", n])
  1570. })
  1571. })
  1572. }
  1573. }),
  1574. k.fn.extend({
  1575. queue: function(e, n) {
  1576. var t = 2;
  1577. return "string" != typeof e && (n = e,
  1578. e = "fx",
  1579. t--),
  1580. arguments.length < t ? k.queue(this[0], e) : void 0 === n ? this : this.each(function() {
  1581. var t = k.queue(this, e, n);
  1582. k._queueHooks(this, e),
  1583. "fx" === e && "inprogress" !== t[0] && k.dequeue(this, e)
  1584. })
  1585. },
  1586. dequeue: function(t) {
  1587. return this.each(function() {
  1588. k.dequeue(this, t)
  1589. })
  1590. },
  1591. clearQueue: function(t) {
  1592. return this.queue(t || "fx", [])
  1593. },
  1594. promise: function(t, e) {
  1595. function n() {
  1596. --i || o.resolveWith(s, [s])
  1597. }
  1598. var r, i = 1, o = k.Deferred(), s = this, a = this.length;
  1599. for ("string" != typeof t && (e = t,
  1600. t = void 0),
  1601. t = t || "fx"; a--;)
  1602. (r = W.get(s[a], t + "queueHooks")) && r.empty && (i++,
  1603. r.empty.add(n));
  1604. return n(),
  1605. o.promise(e)
  1606. }
  1607. });
  1608. function q(t, e) {
  1609. return t = e || t,
  1610. "none" === k.css(t, "display") || !k.contains(t.ownerDocument, t)
  1611. }
  1612. var s = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source
  1613. , z = new RegExp("^(?:([+-])=|)(" + s + ")([a-z%]*)$", "i")
  1614. , U = ["Top", "Right", "Bottom", "Left"];
  1615. function G(t, e, n, r) {
  1616. var i, o = 1, s = 20, a = r ? function() {
  1617. return r.cur()
  1618. }
  1619. : function() {
  1620. return k.css(t, e, "")
  1621. }
  1622. , u = a(), c = n && n[3] || (k.cssNumber[e] ? "" : "px"), l = (k.cssNumber[e] || "px" !== c && +u) && z.exec(k.css(t, e));
  1623. if (l && l[3] !== c)
  1624. for (c = c || l[3],
  1625. n = n || [],
  1626. l = +u || 1; o = o || ".5",
  1627. l /= o,
  1628. k.style(t, e, l + c),
  1629. o !== (o = a() / u) && 1 !== o && --s;)
  1630. ;
  1631. return n && (l = +l || +u || 0,
  1632. i = n[1] ? l + (n[1] + 1) * n[2] : +n[2],
  1633. r && (r.unit = c,
  1634. r.start = l,
  1635. r.end = i)),
  1636. i
  1637. }
  1638. var V = /^(?:checkbox|radio)$/i
  1639. , $ = /<([\w:-]+)/
  1640. , X = /^$|\/(?:java|ecma)script/i
  1641. , Y = {
  1642. option: [1, "<select multiple='multiple'>", "</select>"],
  1643. thead: [1, "<table>", "</table>"],
  1644. col: [2, "<table><colgroup>", "</colgroup></table>"],
  1645. tr: [2, "<table><tbody>", "</tbody></table>"],
  1646. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  1647. _default: [0, "", ""]
  1648. };
  1649. function K(t, e) {
  1650. var n = void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e || "*") : void 0 !== t.querySelectorAll ? t.querySelectorAll(e || "*") : [];
  1651. return void 0 === e || e && k.nodeName(t, e) ? k.merge([t], n) : n
  1652. }
  1653. function Q(t, e) {
  1654. for (var n = 0, r = t.length; n < r; n++)
  1655. W.set(t[n], "globalEval", !e || W.get(e[n], "globalEval"))
  1656. }
  1657. Y.optgroup = Y.option,
  1658. Y.tbody = Y.tfoot = Y.colgroup = Y.caption = Y.thead,
  1659. Y.th = Y.td;
  1660. var J = /<|&#?\w+;/;
  1661. function Z(t, e, n, r, i) {
  1662. for (var o, s, a, u, c, l = e.createDocumentFragment(), h = [], f = 0, p = t.length; f < p; f++)
  1663. if ((o = t[f]) || 0 === o)
  1664. if ("object" === k.type(o))
  1665. k.merge(h, o.nodeType ? [o] : o);
  1666. else if (J.test(o)) {
  1667. for (s = s || l.appendChild(e.createElement("div")),
  1668. a = ($.exec(o) || ["", ""])[1].toLowerCase(),
  1669. a = Y[a] || Y._default,
  1670. s.innerHTML = a[1] + k.htmlPrefilter(o) + a[2],
  1671. c = a[0]; c--;)
  1672. s = s.lastChild;
  1673. k.merge(h, s.childNodes),
  1674. (s = l.firstChild).textContent = ""
  1675. } else
  1676. h.push(e.createTextNode(o));
  1677. for (l.textContent = "",
  1678. f = 0; o = h[f++];)
  1679. if (r && -1 < k.inArray(o, r))
  1680. i && i.push(o);
  1681. else if (u = k.contains(o.ownerDocument, o),
  1682. s = K(l.appendChild(o), "script"),
  1683. u && Q(s),
  1684. n)
  1685. for (c = 0; o = s[c++];)
  1686. X.test(o.type || "") && n.push(o);
  1687. return l
  1688. }
  1689. n = C.createDocumentFragment().appendChild(C.createElement("div")),
  1690. (p = C.createElement("input")).setAttribute("type", "radio"),
  1691. p.setAttribute("checked", "checked"),
  1692. p.setAttribute("name", "t"),
  1693. n.appendChild(p),
  1694. m.checkClone = n.cloneNode(!0).cloneNode(!0).lastChild.checked,
  1695. n.innerHTML = "<textarea>x</textarea>",
  1696. m.noCloneChecked = !!n.cloneNode(!0).lastChild.defaultValue;
  1697. var tt = /^key/
  1698. , et = /^(?:mouse|pointer|contextmenu|drag|drop)|click/
  1699. , nt = /^([^.]*)(?:\.(.+)|)/;
  1700. function rt() {
  1701. return !0
  1702. }
  1703. function it() {
  1704. return !1
  1705. }
  1706. function ot() {
  1707. try {
  1708. return C.activeElement
  1709. } catch (t) { }
  1710. }
  1711. function st(t, e, n, r, i, o) {
  1712. var s, a;
  1713. if ("object" == typeof e) {
  1714. for (a in "string" != typeof n && (r = r || n,
  1715. n = void 0),
  1716. e)
  1717. st(t, a, n, r, e[a], o);
  1718. return t
  1719. }
  1720. if (null == r && null == i ? (i = n,
  1721. r = n = void 0) : null == i && ("string" == typeof n ? (i = r,
  1722. r = void 0) : (i = r,
  1723. r = n,
  1724. n = void 0)),
  1725. !1 === i)
  1726. i = it;
  1727. else if (!i)
  1728. return t;
  1729. return 1 === o && (s = i,
  1730. (i = function(t) {
  1731. return k().off(t),
  1732. s.apply(this, arguments)
  1733. }
  1734. ).guid = s.guid || (s.guid = k.guid++)),
  1735. t.each(function() {
  1736. k.event.add(this, e, i, r, n)
  1737. })
  1738. }
  1739. k.event = {
  1740. global: {},
  1741. add: function(e, t, n, r, i) {
  1742. var o, s, a, u, c, l, h, f, p, d = W.get(e);
  1743. if (d)
  1744. for (n.handler && (n = (o = n).handler,
  1745. i = o.selector),
  1746. n.guid || (n.guid = k.guid++),
  1747. (a = d.events) || (a = d.events = {}),
  1748. (s = d.handle) || (s = d.handle = function(t) {
  1749. return void 0 !== k && k.event.triggered !== t.type ? k.event.dispatch.apply(e, arguments) : void 0
  1750. }
  1751. ),
  1752. u = (t = (t || "").match(P) || [""]).length; u--;)
  1753. h = p = (c = nt.exec(t[u]) || [])[1],
  1754. f = (c[2] || "").split(".").sort(),
  1755. h && (l = k.event.special[h] || {},
  1756. h = (i ? l.delegateType : l.bindType) || h,
  1757. l = k.event.special[h] || {},
  1758. c = k.extend({
  1759. type: h,
  1760. origType: p,
  1761. data: r,
  1762. handler: n,
  1763. guid: n.guid,
  1764. selector: i,
  1765. needsContext: i && k.expr.match.needsContext.test(i),
  1766. namespace: f.join(".")
  1767. }, o),
  1768. (p = a[h]) || ((p = a[h] = []).delegateCount = 0,
  1769. l.setup && !1 !== l.setup.call(e, r, f, s) || e.addEventListener && e.addEventListener(h, s)),
  1770. l.add && (l.add.call(e, c),
  1771. c.handler.guid || (c.handler.guid = n.guid)),
  1772. i ? p.splice(p.delegateCount++, 0, c) : p.push(c),
  1773. k.event.global[h] = !0)
  1774. },
  1775. remove: function(t, e, n, r, i) {
  1776. var o, s, a, u, c, l, h, f, p, d, g, m = W.hasData(t) && W.get(t);
  1777. if (m && (u = m.events)) {
  1778. for (c = (e = (e || "").match(P) || [""]).length; c--;)
  1779. if (p = g = (a = nt.exec(e[c]) || [])[1],
  1780. d = (a[2] || "").split(".").sort(),
  1781. p) {
  1782. for (h = k.event.special[p] || {},
  1783. f = u[p = (r ? h.delegateType : h.bindType) || p] || [],
  1784. a = a[2] && new RegExp("(^|\\.)" + d.join("\\.(?:.*\\.|)") + "(\\.|$)"),
  1785. s = o = f.length; o--;)
  1786. l = f[o],
  1787. !i && g !== l.origType || n && n.guid !== l.guid || a && !a.test(l.namespace) || r && r !== l.selector && ("**" !== r || !l.selector) || (f.splice(o, 1),
  1788. l.selector && f.delegateCount--,
  1789. h.remove && h.remove.call(t, l));
  1790. s && !f.length && (h.teardown && !1 !== h.teardown.call(t, d, m.handle) || k.removeEvent(t, p, m.handle),
  1791. delete u[p])
  1792. } else
  1793. for (p in u)
  1794. k.event.remove(t, p + e[c], n, r, !0);
  1795. k.isEmptyObject(u) && W.remove(t, "handle events")
  1796. }
  1797. },
  1798. dispatch: function(t) {
  1799. t = k.event.fix(t);
  1800. var e, n, r, i, o, s = l.call(arguments), a = (W.get(this, "events") || {})[t.type] || [], u = k.event.special[t.type] || {};
  1801. if ((s[0] = t).delegateTarget = this,
  1802. !u.preDispatch || !1 !== u.preDispatch.call(this, t)) {
  1803. for (o = k.event.handlers.call(this, t, a),
  1804. e = 0; (r = o[e++]) && !t.isPropagationStopped();)
  1805. for (t.currentTarget = r.elem,
  1806. n = 0; (i = r.handlers[n++]) && !t.isImmediatePropagationStopped();)
  1807. t.rnamespace && !t.rnamespace.test(i.namespace) || (t.handleObj = i,
  1808. t.data = i.data,
  1809. void 0 !== (i = ((k.event.special[i.origType] || {}).handle || i.handler).apply(r.elem, s)) && !1 === (t.result = i) && (t.preventDefault(),
  1810. t.stopPropagation()));
  1811. return u.postDispatch && u.postDispatch.call(this, t),
  1812. t.result
  1813. }
  1814. },
  1815. handlers: function(t, e) {
  1816. var n, r, i, o, s = [], a = e.delegateCount, u = t.target;
  1817. if (a && u.nodeType && ("click" !== t.type || isNaN(t.button) || t.button < 1))
  1818. for (; u !== this; u = u.parentNode || this)
  1819. if (1 === u.nodeType && (!0 !== u.disabled || "click" !== t.type)) {
  1820. for (r = [],
  1821. n = 0; n < a; n++)
  1822. void 0 === r[i = (o = e[n]).selector + " "] && (r[i] = o.needsContext ? -1 < k(i, this).index(u) : k.find(i, this, null, [u]).length),
  1823. r[i] && r.push(o);
  1824. r.length && s.push({
  1825. elem: u,
  1826. handlers: r
  1827. })
  1828. }
  1829. return a < e.length && s.push({
  1830. elem: this,
  1831. handlers: e.slice(a)
  1832. }),
  1833. s
  1834. },
  1835. props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  1836. fixHooks: {},
  1837. keyHooks: {
  1838. props: "char charCode key keyCode".split(" "),
  1839. filter: function(t, e) {
  1840. return null == t.which && (t.which = null != e.charCode ? e.charCode : e.keyCode),
  1841. t
  1842. }
  1843. },
  1844. mouseHooks: {
  1845. props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
  1846. filter: function(t, e) {
  1847. var n, r, i = e.button;
  1848. return null == t.pageX && null != e.clientX && (n = (r = t.target.ownerDocument || C).documentElement,
  1849. r = r.body,
  1850. t.pageX = e.clientX + (n && n.scrollLeft || r && r.scrollLeft || 0) - (n && n.clientLeft || r && r.clientLeft || 0),
  1851. t.pageY = e.clientY + (n && n.scrollTop || r && r.scrollTop || 0) - (n && n.clientTop || r && r.clientTop || 0)),
  1852. t.which || void 0 === i || (t.which = 1 & i ? 1 : 2 & i ? 3 : 4 & i ? 2 : 0),
  1853. t
  1854. }
  1855. },
  1856. fix: function(t) {
  1857. if (t[k.expando])
  1858. return t;
  1859. var e, n, r, i = t.type, o = t, s = this.fixHooks[i];
  1860. for (s || (this.fixHooks[i] = s = et.test(i) ? this.mouseHooks : tt.test(i) ? this.keyHooks : {}),
  1861. r = s.props ? this.props.concat(s.props) : this.props,
  1862. t = new k.Event(o),
  1863. e = r.length; e--;)
  1864. t[n = r[e]] = o[n];
  1865. return t.target || (t.target = C),
  1866. 3 === t.target.nodeType && (t.target = t.target.parentNode),
  1867. s.filter ? s.filter(t, o) : t
  1868. },
  1869. special: {
  1870. load: {
  1871. noBubble: !0
  1872. },
  1873. focus: {
  1874. trigger: function() {
  1875. return this !== ot() && this.focus ? (this.focus(),
  1876. !1) : void 0
  1877. },
  1878. delegateType: "focusin"
  1879. },
  1880. blur: {
  1881. trigger: function() {
  1882. return this === ot() && this.blur ? (this.blur(),
  1883. !1) : void 0
  1884. },
  1885. delegateType: "focusout"
  1886. },
  1887. click: {
  1888. trigger: function() {
  1889. return "checkbox" === this.type && this.click && k.nodeName(this, "input") ? (this.click(),
  1890. !1) : void 0
  1891. },
  1892. _default: function(t) {
  1893. return k.nodeName(t.target, "a")
  1894. }
  1895. },
  1896. beforeunload: {
  1897. postDispatch: function(t) {
  1898. void 0 !== t.result && t.originalEvent && (t.originalEvent.returnValue = t.result)
  1899. }
  1900. }
  1901. }
  1902. },
  1903. k.removeEvent = function(t, e, n) {
  1904. t.removeEventListener && t.removeEventListener(e, n)
  1905. }
  1906. ,
  1907. k.Event = function(t, e) {
  1908. return this instanceof k.Event ? (t && t.type ? (this.originalEvent = t,
  1909. this.type = t.type,
  1910. this.isDefaultPrevented = t.defaultPrevented || void 0 === t.defaultPrevented && !1 === t.returnValue ? rt : it) : this.type = t,
  1911. e && k.extend(this, e),
  1912. this.timeStamp = t && t.timeStamp || k.now(),
  1913. void (this[k.expando] = !0)) : new k.Event(t, e)
  1914. }
  1915. ,
  1916. k.Event.prototype = {
  1917. constructor: k.Event,
  1918. isDefaultPrevented: it,
  1919. isPropagationStopped: it,
  1920. isImmediatePropagationStopped: it,
  1921. isSimulated: !1,
  1922. preventDefault: function() {
  1923. var t = this.originalEvent;
  1924. this.isDefaultPrevented = rt,
  1925. t && !this.isSimulated && t.preventDefault()
  1926. },
  1927. stopPropagation: function() {
  1928. var t = this.originalEvent;
  1929. this.isPropagationStopped = rt,
  1930. t && !this.isSimulated && t.stopPropagation()
  1931. },
  1932. stopImmediatePropagation: function() {
  1933. var t = this.originalEvent;
  1934. this.isImmediatePropagationStopped = rt,
  1935. t && !this.isSimulated && t.stopImmediatePropagation(),
  1936. this.stopPropagation()
  1937. }
  1938. },
  1939. k.each({
  1940. mouseenter: "mouseover",
  1941. mouseleave: "mouseout",
  1942. pointerenter: "pointerover",
  1943. pointerleave: "pointerout"
  1944. }, function(t, i) {
  1945. k.event.special[t] = {
  1946. delegateType: i,
  1947. bindType: i,
  1948. handle: function(t) {
  1949. var e, n = t.relatedTarget, r = t.handleObj;
  1950. return n && (n === this || k.contains(this, n)) || (t.type = r.origType,
  1951. e = r.handler.apply(this, arguments),
  1952. t.type = i),
  1953. e
  1954. }
  1955. }
  1956. }),
  1957. k.fn.extend({
  1958. on: function(t, e, n, r) {
  1959. return st(this, t, e, n, r)
  1960. },
  1961. one: function(t, e, n, r) {
  1962. return st(this, t, e, n, r, 1)
  1963. },
  1964. off: function(t, e, n) {
  1965. var r, i;
  1966. if (t && t.preventDefault && t.handleObj)
  1967. return r = t.handleObj,
  1968. k(t.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler),
  1969. this;
  1970. if ("object" != typeof t)
  1971. return !1 !== e && "function" != typeof e || (n = e,
  1972. e = void 0),
  1973. !1 === n && (n = it),
  1974. this.each(function() {
  1975. k.event.remove(this, t, n, e)
  1976. });
  1977. for (i in t)
  1978. this.off(i, e, t[i]);
  1979. return this
  1980. }
  1981. });
  1982. var at = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi
  1983. , ut = /<script|<style|<link/i
  1984. , ct = /checked\s*(?:[^=]|=\s*.checked.)/i
  1985. , lt = /^true\/(.*)/
  1986. , ht = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  1987. function ft(t, e) {
  1988. return k.nodeName(t, "table") && k.nodeName(11 !== e.nodeType ? e : e.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
  1989. }
  1990. function pt(t) {
  1991. return t.type = (null !== t.getAttribute("type")) + "/" + t.type,
  1992. t
  1993. }
  1994. function dt(t) {
  1995. var e = lt.exec(t.type);
  1996. return e ? t.type = e[1] : t.removeAttribute("type"),
  1997. t
  1998. }
  1999. function gt(t, e) {
  2000. var n, r, i, o, s, a;
  2001. if (1 === e.nodeType) {
  2002. if (W.hasData(t) && (o = W.access(t),
  2003. s = W.set(e, o),
  2004. a = o.events))
  2005. for (i in delete s.handle,
  2006. s.events = {},
  2007. a)
  2008. for (n = 0,
  2009. r = a[i].length; n < r; n++)
  2010. k.event.add(e, i, a[i][n]);
  2011. L.hasData(t) && (t = L.access(t),
  2012. t = k.extend({}, t),
  2013. L.set(e, t))
  2014. }
  2015. }
  2016. function mt(n, r, i, o) {
  2017. r = g.apply([], r);
  2018. var t, e, s, a, u, c, l = 0, h = n.length, f = h - 1, p = r[0], d = k.isFunction(p);
  2019. if (d || 1 < h && "string" == typeof p && !m.checkClone && ct.test(p))
  2020. return n.each(function(t) {
  2021. var e = n.eq(t);
  2022. d && (r[0] = p.call(this, t, e.html())),
  2023. mt(e, r, i, o)
  2024. });
  2025. if (h && (e = (t = Z(r, n[0].ownerDocument, !1, n, o)).firstChild,
  2026. 1 === t.childNodes.length && (t = e),
  2027. e || o)) {
  2028. for (a = (s = k.map(K(t, "script"), pt)).length; l < h; l++)
  2029. u = t,
  2030. l !== f && (u = k.clone(u, !0, !0),
  2031. a && k.merge(s, K(u, "script"))),
  2032. i.call(n[l], u, l);
  2033. if (a)
  2034. for (c = s[s.length - 1].ownerDocument,
  2035. k.map(s, dt),
  2036. l = 0; l < a; l++)
  2037. u = s[l],
  2038. X.test(u.type || "") && !W.access(u, "globalEval") && k.contains(c, u) && (u.src ? k._evalUrl && k._evalUrl(u.src) : k.globalEval(u.textContent.replace(ht, "")))
  2039. }
  2040. return n
  2041. }
  2042. function vt(t, e, n) {
  2043. for (var r, i = e ? k.filter(e, t) : t, o = 0; null != (r = i[o]); o++)
  2044. n || 1 !== r.nodeType || k.cleanData(K(r)),
  2045. r.parentNode && (n && k.contains(r.ownerDocument, r) && Q(K(r, "script")),
  2046. r.parentNode.removeChild(r));
  2047. return t
  2048. }
  2049. k.extend({
  2050. htmlPrefilter: function(t) {
  2051. return t.replace(at, "<$1></$2>")
  2052. },
  2053. clone: function(t, e, n) {
  2054. var r, i, o, s, a, u, c, l = t.cloneNode(!0), h = k.contains(t.ownerDocument, t);
  2055. if (!(m.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || k.isXMLDoc(t)))
  2056. for (s = K(l),
  2057. r = 0,
  2058. i = (o = K(t)).length; r < i; r++)
  2059. a = o[r],
  2060. u = s[r],
  2061. c = void 0,
  2062. "input" === (c = u.nodeName.toLowerCase()) && V.test(a.type) ? u.checked = a.checked : "input" !== c && "textarea" !== c || (u.defaultValue = a.defaultValue);
  2063. if (e)
  2064. if (n)
  2065. for (o = o || K(t),
  2066. s = s || K(l),
  2067. r = 0,
  2068. i = o.length; r < i; r++)
  2069. gt(o[r], s[r]);
  2070. else
  2071. gt(t, l);
  2072. return 0 < (s = K(l, "script")).length && Q(s, !h && K(t, "script")),
  2073. l
  2074. },
  2075. cleanData: function(t) {
  2076. for (var e, n, r, i = k.event.special, o = 0; void 0 !== (n = t[o]); o++)
  2077. if (D(n)) {
  2078. if (e = n[W.expando]) {
  2079. if (e.events)
  2080. for (r in e.events)
  2081. i[r] ? k.event.remove(n, r) : k.removeEvent(n, r, e.handle);
  2082. n[W.expando] = void 0
  2083. }
  2084. n[L.expando] && (n[L.expando] = void 0)
  2085. }
  2086. }
  2087. }),
  2088. k.fn.extend({
  2089. domManip: mt,
  2090. detach: function(t) {
  2091. return vt(this, t, !0)
  2092. },
  2093. remove: function(t) {
  2094. return vt(this, t)
  2095. },
  2096. text: function(t) {
  2097. return R(this, function(t) {
  2098. return void 0 === t ? k.text(this) : this.empty().each(function() {
  2099. 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = t)
  2100. })
  2101. }, null, t, arguments.length)
  2102. },
  2103. append: function() {
  2104. return mt(this, arguments, function(t) {
  2105. 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || ft(this, t).appendChild(t)
  2106. })
  2107. },
  2108. prepend: function() {
  2109. return mt(this, arguments, function(t) {
  2110. var e;
  2111. 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (e = ft(this, t)).insertBefore(t, e.firstChild)
  2112. })
  2113. },
  2114. before: function() {
  2115. return mt(this, arguments, function(t) {
  2116. this.parentNode && this.parentNode.insertBefore(t, this)
  2117. })
  2118. },
  2119. after: function() {
  2120. return mt(this, arguments, function(t) {
  2121. this.parentNode && this.parentNode.insertBefore(t, this.nextSibling)
  2122. })
  2123. },
  2124. empty: function() {
  2125. for (var t, e = 0; null != (t = this[e]); e++)
  2126. 1 === t.nodeType && (k.cleanData(K(t, !1)),
  2127. t.textContent = "");
  2128. return this
  2129. },
  2130. clone: function(t, e) {
  2131. return t = null != t && t,
  2132. e = null == e ? t : e,
  2133. this.map(function() {
  2134. return k.clone(this, t, e)
  2135. })
  2136. },
  2137. html: function(t) {
  2138. return R(this, function(t) {
  2139. var e = this[0] || {}
  2140. , n = 0
  2141. , r = this.length;
  2142. if (void 0 === t && 1 === e.nodeType)
  2143. return e.innerHTML;
  2144. if ("string" == typeof t && !ut.test(t) && !Y[($.exec(t) || ["", ""])[1].toLowerCase()]) {
  2145. t = k.htmlPrefilter(t);
  2146. try {
  2147. for (; n < r; n++)
  2148. 1 === (e = this[n] || {}).nodeType && (k.cleanData(K(e, !1)),
  2149. e.innerHTML = t);
  2150. e = 0
  2151. } catch (t) { }
  2152. }
  2153. e && this.empty().append(t)
  2154. }, null, t, arguments.length)
  2155. },
  2156. replaceWith: function() {
  2157. var n = [];
  2158. return mt(this, arguments, function(t) {
  2159. var e = this.parentNode;
  2160. k.inArray(this, n) < 0 && (k.cleanData(K(this)),
  2161. e && e.replaceChild(t, this))
  2162. }, n)
  2163. }
  2164. }),
  2165. k.each({
  2166. appendTo: "append",
  2167. prependTo: "prepend",
  2168. insertBefore: "before",
  2169. insertAfter: "after",
  2170. replaceAll: "replaceWith"
  2171. }, function(t, s) {
  2172. k.fn[t] = function(t) {
  2173. for (var e, n = [], r = k(t), i = r.length - 1, o = 0; o <= i; o++)
  2174. e = o === i ? this : this.clone(!0),
  2175. k(r[o])[s](e),
  2176. a.apply(n, e.get());
  2177. return this.pushStack(n)
  2178. }
  2179. });
  2180. var yt, bt = {
  2181. HTML: "block",
  2182. BODY: "block"
  2183. };
  2184. function wt(t, e) {
  2185. t = k(e.createElement(t)).appendTo(e.body),
  2186. e = k.css(t[0], "display");
  2187. return t.detach(),
  2188. e
  2189. }
  2190. function _t(t) {
  2191. var e = C
  2192. , n = bt[t];
  2193. return n || ("none" !== (n = wt(t, e)) && n || ((e = (yt = (yt || k("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement))[0].contentDocument).write(),
  2194. e.close(),
  2195. n = wt(t, e),
  2196. yt.detach()),
  2197. bt[t] = n),
  2198. n
  2199. }
  2200. function xt(t, e, n, r) {
  2201. var i, o = {};
  2202. for (i in e)
  2203. o[i] = t.style[i],
  2204. t.style[i] = e[i];
  2205. for (i in r = n.apply(t, r || []),
  2206. e)
  2207. t.style[i] = o[i];
  2208. return r
  2209. }
  2210. var Ct, kt, St, Ot, Et, Tt, At = /^margin/, It = new RegExp("^(" + s + ")(?!px)[a-z%]+$", "i"), jt = function(t) {
  2211. var e = t.ownerDocument.defaultView;
  2212. return e && e.opener || (e = x),
  2213. e.getComputedStyle(t)
  2214. }, Pt = C.documentElement;
  2215. function Nt() {
  2216. Tt.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",
  2217. Tt.innerHTML = "",
  2218. Pt.appendChild(Et);
  2219. var t = x.getComputedStyle(Tt);
  2220. Ct = "1%" !== t.top,
  2221. Ot = "2px" === t.marginLeft,
  2222. kt = "4px" === t.width,
  2223. Tt.style.marginRight = "50%",
  2224. St = "4px" === t.marginRight,
  2225. Pt.removeChild(Et)
  2226. }
  2227. function Dt(t, e, n) {
  2228. var r, i, o = t.style;
  2229. return "" !== (i = (n = n || jt(t)) ? n.getPropertyValue(e) || n[e] : void 0) && void 0 !== i || k.contains(t.ownerDocument, t) || (i = k.style(t, e)),
  2230. n && !m.pixelMarginRight() && It.test(i) && At.test(e) && (r = o.width,
  2231. t = o.minWidth,
  2232. e = o.maxWidth,
  2233. o.minWidth = o.maxWidth = o.width = i,
  2234. i = n.width,
  2235. o.width = r,
  2236. o.minWidth = t,
  2237. o.maxWidth = e),
  2238. void 0 !== i ? i + "" : i
  2239. }
  2240. function Rt(t, e) {
  2241. return {
  2242. get: function() {
  2243. return t() ? void delete this.get : (this.get = e).apply(this, arguments)
  2244. }
  2245. }
  2246. }
  2247. Et = C.createElement("div"),
  2248. (Tt = C.createElement("div")).style && (Tt.style.backgroundClip = "content-box",
  2249. Tt.cloneNode(!0).style.backgroundClip = "",
  2250. m.clearCloneStyle = "content-box" === Tt.style.backgroundClip,
  2251. Et.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",
  2252. Et.appendChild(Tt),
  2253. k.extend(m, {
  2254. pixelPosition: function() {
  2255. return Nt(),
  2256. Ct
  2257. },
  2258. boxSizingReliable: function() {
  2259. return null == kt && Nt(),
  2260. kt
  2261. },
  2262. pixelMarginRight: function() {
  2263. return null == kt && Nt(),
  2264. St
  2265. },
  2266. reliableMarginLeft: function() {
  2267. return null == kt && Nt(),
  2268. Ot
  2269. },
  2270. reliableMarginRight: function() {
  2271. var t, e = Tt.appendChild(C.createElement("div"));
  2272. return e.style.cssText = Tt.style.cssText = "-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",
  2273. e.style.marginRight = e.style.width = "0",
  2274. Tt.style.width = "1px",
  2275. Pt.appendChild(Et),
  2276. t = !parseFloat(x.getComputedStyle(e).marginRight),
  2277. Pt.removeChild(Et),
  2278. Tt.removeChild(e),
  2279. t
  2280. }
  2281. }));
  2282. var Mt = /^(none|table(?!-c[ea]).+)/
  2283. , Wt = {
  2284. position: "absolute",
  2285. visibility: "hidden",
  2286. display: "block"
  2287. }
  2288. , Lt = {
  2289. letterSpacing: "0",
  2290. fontWeight: "400"
  2291. }
  2292. , Ft = ["Webkit", "O", "Moz", "ms"]
  2293. , Ht = C.createElement("div").style;
  2294. function Bt(t) {
  2295. if (t in Ht)
  2296. return t;
  2297. for (var e = t[0].toUpperCase() + t.slice(1), n = Ft.length; n--;)
  2298. if ((t = Ft[n] + e) in Ht)
  2299. return t
  2300. }
  2301. function qt(t, e, n) {
  2302. var r = z.exec(e);
  2303. return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : e
  2304. }
  2305. function zt(t, e, n, r, i) {
  2306. for (var o = n === (r ? "border" : "content") ? 4 : "width" === e ? 1 : 0, s = 0; o < 4; o += 2)
  2307. "margin" === n && (s += k.css(t, n + U[o], !0, i)),
  2308. r ? ("content" === n && (s -= k.css(t, "padding" + U[o], !0, i)),
  2309. "margin" !== n && (s -= k.css(t, "border" + U[o] + "Width", !0, i))) : (s += k.css(t, "padding" + U[o], !0, i),
  2310. "padding" !== n && (s += k.css(t, "border" + U[o] + "Width", !0, i)));
  2311. return s
  2312. }
  2313. function Ut(t, e, n) {
  2314. var r = !0
  2315. , i = "width" === e ? t.offsetWidth : t.offsetHeight
  2316. , o = jt(t)
  2317. , s = "border-box" === k.css(t, "boxSizing", !1, o);
  2318. if (i <= 0 || null == i) {
  2319. if (((i = Dt(t, e, o)) < 0 || null == i) && (i = t.style[e]),
  2320. It.test(i))
  2321. return i;
  2322. r = s && (m.boxSizingReliable() || i === t.style[e]),
  2323. i = parseFloat(i) || 0
  2324. }
  2325. return i + zt(t, e, n || (s ? "border" : "content"), r, o) + "px"
  2326. }
  2327. function Gt(t, e) {
  2328. for (var n, r, i, o = [], s = 0, a = t.length; s < a; s++)
  2329. (r = t[s]).style && (o[s] = W.get(r, "olddisplay"),
  2330. n = r.style.display,
  2331. e ? (o[s] || "none" !== n || (r.style.display = ""),
  2332. "" === r.style.display && q(r) && (o[s] = W.access(r, "olddisplay", _t(r.nodeName)))) : (i = q(r),
  2333. "none" === n && i || W.set(r, "olddisplay", i ? n : k.css(r, "display"))));
  2334. for (s = 0; s < a; s++)
  2335. (r = t[s]).style && (e && "none" !== r.style.display && "" !== r.style.display || (r.style.display = e ? o[s] || "" : "none"));
  2336. return t
  2337. }
  2338. function Vt(t, e, n, r, i) {
  2339. return new Vt.prototype.init(t, e, n, r, i)
  2340. }
  2341. k.extend({
  2342. cssHooks: {
  2343. opacity: {
  2344. get: function(t, e) {
  2345. if (e) {
  2346. t = Dt(t, "opacity");
  2347. return "" === t ? "1" : t
  2348. }
  2349. }
  2350. }
  2351. },
  2352. cssNumber: {
  2353. animationIterationCount: !0,
  2354. columnCount: !0,
  2355. fillOpacity: !0,
  2356. flexGrow: !0,
  2357. flexShrink: !0,
  2358. fontWeight: !0,
  2359. lineHeight: !0,
  2360. opacity: !0,
  2361. order: !0,
  2362. orphans: !0,
  2363. widows: !0,
  2364. zIndex: !0,
  2365. zoom: !0
  2366. },
  2367. cssProps: {
  2368. float: "cssFloat"
  2369. },
  2370. style: function(t, e, n, r) {
  2371. if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
  2372. var i, o, s, a = k.camelCase(e), u = t.style;
  2373. return e = k.cssProps[a] || (k.cssProps[a] = Bt(a) || a),
  2374. s = k.cssHooks[e] || k.cssHooks[a],
  2375. void 0 === n ? s && "get" in s && void 0 !== (i = s.get(t, !1, r)) ? i : u[e] : ("string" === (o = typeof n) && (i = z.exec(n)) && i[1] && (n = G(t, e, i),
  2376. o = "number"),
  2377. void (null != n && n == n && ("number" === o && (n += i && i[3] || (k.cssNumber[a] ? "" : "px")),
  2378. m.clearCloneStyle || "" !== n || 0 !== e.indexOf("background") || (u[e] = "inherit"),
  2379. s && "set" in s && void 0 === (n = s.set(t, n, r)) || (u[e] = n))))
  2380. }
  2381. },
  2382. css: function(t, e, n, r) {
  2383. var i, o = k.camelCase(e);
  2384. return e = k.cssProps[o] || (k.cssProps[o] = Bt(o) || o),
  2385. (o = k.cssHooks[e] || k.cssHooks[o]) && "get" in o && (i = o.get(t, !0, n)),
  2386. void 0 === i && (i = Dt(t, e, r)),
  2387. "normal" === i && e in Lt && (i = Lt[e]),
  2388. "" === n || n ? (e = parseFloat(i),
  2389. !0 === n || isFinite(e) ? e || 0 : i) : i
  2390. }
  2391. }),
  2392. k.each(["height", "width"], function(t, o) {
  2393. k.cssHooks[o] = {
  2394. get: function(t, e, n) {
  2395. return e ? Mt.test(k.css(t, "display")) && 0 === t.offsetWidth ? xt(t, Wt, function() {
  2396. return Ut(t, o, n)
  2397. }) : Ut(t, o, n) : void 0
  2398. },
  2399. set: function(t, e, n) {
  2400. var r, i = n && jt(t), i = n && zt(t, o, n, "border-box" === k.css(t, "boxSizing", !1, i), i);
  2401. return i && (r = z.exec(e)) && "px" !== (r[3] || "px") && (t.style[o] = e,
  2402. e = k.css(t, o)),
  2403. qt(0, e, i)
  2404. }
  2405. }
  2406. }),
  2407. k.cssHooks.marginLeft = Rt(m.reliableMarginLeft, function(t, e) {
  2408. return e ? (parseFloat(Dt(t, "marginLeft")) || t.getBoundingClientRect().left - xt(t, {
  2409. marginLeft: 0
  2410. }, function() {
  2411. return t.getBoundingClientRect().left
  2412. })) + "px" : void 0
  2413. }),
  2414. k.cssHooks.marginRight = Rt(m.reliableMarginRight, function(t, e) {
  2415. return e ? xt(t, {
  2416. display: "inline-block"
  2417. }, Dt, [t, "marginRight"]) : void 0
  2418. }),
  2419. k.each({
  2420. margin: "",
  2421. padding: "",
  2422. border: "Width"
  2423. }, function(i, o) {
  2424. k.cssHooks[i + o] = {
  2425. expand: function(t) {
  2426. for (var e = 0, n = {}, r = "string" == typeof t ? t.split(" ") : [t]; e < 4; e++)
  2427. n[i + U[e] + o] = r[e] || r[e - 2] || r[0];
  2428. return n
  2429. }
  2430. },
  2431. At.test(i) || (k.cssHooks[i + o].set = qt)
  2432. }),
  2433. k.fn.extend({
  2434. css: function(t, e) {
  2435. return R(this, function(t, e, n) {
  2436. var r, i, o = {}, s = 0;
  2437. if (k.isArray(e)) {
  2438. for (r = jt(t),
  2439. i = e.length; s < i; s++)
  2440. o[e[s]] = k.css(t, e[s], !1, r);
  2441. return o
  2442. }
  2443. return void 0 !== n ? k.style(t, e, n) : k.css(t, e)
  2444. }, t, e, 1 < arguments.length)
  2445. },
  2446. show: function() {
  2447. return Gt(this, !0)
  2448. },
  2449. hide: function() {
  2450. return Gt(this)
  2451. },
  2452. toggle: function(t) {
  2453. return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function() {
  2454. q(this) ? k(this).show() : k(this).hide()
  2455. })
  2456. }
  2457. }),
  2458. (k.Tween = Vt).prototype = {
  2459. constructor: Vt,
  2460. init: function(t, e, n, r, i, o) {
  2461. this.elem = t,
  2462. this.prop = n,
  2463. this.easing = i || k.easing._default,
  2464. this.options = e,
  2465. this.start = this.now = this.cur(),
  2466. this.end = r,
  2467. this.unit = o || (k.cssNumber[n] ? "" : "px")
  2468. },
  2469. cur: function() {
  2470. var t = Vt.propHooks[this.prop];
  2471. return (t && t.get ? t : Vt.propHooks._default).get(this)
  2472. },
  2473. run: function(t) {
  2474. var e, n = Vt.propHooks[this.prop];
  2475. return this.options.duration ? this.pos = e = k.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : this.pos = e = t,
  2476. this.now = (this.end - this.start) * e + this.start,
  2477. this.options.step && this.options.step.call(this.elem, this.now, this),
  2478. (n && n.set ? n : Vt.propHooks._default).set(this),
  2479. this
  2480. }
  2481. },
  2482. Vt.prototype.init.prototype = Vt.prototype,
  2483. Vt.propHooks = {
  2484. _default: {
  2485. get: function(t) {
  2486. return 1 !== t.elem.nodeType || null != t.elem[t.prop] && null == t.elem.style[t.prop] ? t.elem[t.prop] : (t = k.css(t.elem, t.prop, "")) && "auto" !== t ? t : 0
  2487. },
  2488. set: function(t) {
  2489. k.fx.step[t.prop] ? k.fx.step[t.prop](t) : 1 !== t.elem.nodeType || null == t.elem.style[k.cssProps[t.prop]] && !k.cssHooks[t.prop] ? t.elem[t.prop] = t.now : k.style(t.elem, t.prop, t.now + t.unit)
  2490. }
  2491. }
  2492. },
  2493. Vt.propHooks.scrollTop = Vt.propHooks.scrollLeft = {
  2494. set: function(t) {
  2495. t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now)
  2496. }
  2497. },
  2498. k.easing = {
  2499. linear: function(t) {
  2500. return t
  2501. },
  2502. swing: function(t) {
  2503. return .5 - Math.cos(t * Math.PI) / 2
  2504. },
  2505. _default: "swing"
  2506. },
  2507. k.fx = Vt.prototype.init,
  2508. k.fx.step = {};
  2509. var $t, Xt, Yt = /^(?:toggle|show|hide)$/, Kt = /queueHooks$/;
  2510. function Qt() {
  2511. return x.setTimeout(function() {
  2512. $t = void 0
  2513. }),
  2514. $t = k.now()
  2515. }
  2516. function Jt(t, e) {
  2517. var n, r = 0, i = {
  2518. height: t
  2519. };
  2520. for (e = e ? 1 : 0; r < 4; r += 2 - e)
  2521. i["margin" + (n = U[r])] = i["padding" + n] = t;
  2522. return e && (i.opacity = i.width = t),
  2523. i
  2524. }
  2525. function Zt(t, e, n) {
  2526. for (var r, i = (te.tweeners[e] || []).concat(te.tweeners["*"]), o = 0, s = i.length; o < s; o++)
  2527. if (r = i[o].call(n, e, t))
  2528. return r
  2529. }
  2530. function te(i, t, e) {
  2531. var n, o, r = 0, s = te.prefilters.length, a = k.Deferred().always(function() {
  2532. delete u.elem
  2533. }), u = function() {
  2534. if (o)
  2535. return !1;
  2536. for (var t = $t || Qt(), t = Math.max(0, c.startTime + c.duration - t), e = 1 - (t / c.duration || 0), n = 0, r = c.tweens.length; n < r; n++)
  2537. c.tweens[n].run(e);
  2538. return a.notifyWith(i, [c, e, t]),
  2539. e < 1 && r ? t : (a.resolveWith(i, [c]),
  2540. !1)
  2541. }, c = a.promise({
  2542. elem: i,
  2543. props: k.extend({}, t),
  2544. opts: k.extend(!0, {
  2545. specialEasing: {},
  2546. easing: k.easing._default
  2547. }, e),
  2548. originalProperties: t,
  2549. originalOptions: e,
  2550. startTime: $t || Qt(),
  2551. duration: e.duration,
  2552. tweens: [],
  2553. createTween: function(t, e) {
  2554. t = k.Tween(i, c.opts, t, e, c.opts.specialEasing[t] || c.opts.easing);
  2555. return c.tweens.push(t),
  2556. t
  2557. },
  2558. stop: function(t) {
  2559. var e = 0
  2560. , n = t ? c.tweens.length : 0;
  2561. if (o)
  2562. return this;
  2563. for (o = !0; e < n; e++)
  2564. c.tweens[e].run(1);
  2565. return t ? (a.notifyWith(i, [c, 1, 0]),
  2566. a.resolveWith(i, [c, t])) : a.rejectWith(i, [c, t]),
  2567. this
  2568. }
  2569. }), l = c.props;
  2570. for (function(t, e) {
  2571. var n, r, i, o, s;
  2572. for (n in t)
  2573. if (r = k.camelCase(n),
  2574. i = e[r],
  2575. o = t[n],
  2576. k.isArray(o) && (i = o[1],
  2577. o = t[n] = o[0]),
  2578. n !== r && (t[r] = o,
  2579. delete t[n]),
  2580. s = k.cssHooks[r],
  2581. s && "expand" in s)
  2582. for (n in o = s.expand(o),
  2583. delete t[r],
  2584. o)
  2585. n in t || (t[n] = o[n],
  2586. e[n] = i);
  2587. else
  2588. e[r] = i
  2589. }(l, c.opts.specialEasing); r < s; r++)
  2590. if (n = te.prefilters[r].call(c, i, l, c.opts))
  2591. return k.isFunction(n.stop) && (k._queueHooks(c.elem, c.opts.queue).stop = k.proxy(n.stop, n)),
  2592. n;
  2593. return k.map(l, Zt, c),
  2594. k.isFunction(c.opts.start) && c.opts.start.call(i, c),
  2595. k.fx.timer(k.extend(u, {
  2596. elem: i,
  2597. anim: c,
  2598. queue: c.opts.queue
  2599. })),
  2600. c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always)
  2601. }
  2602. k.Animation = k.extend(te, {
  2603. tweeners: {
  2604. "*": [function(t, e) {
  2605. var n = this.createTween(t, e);
  2606. return G(n.elem, t, z.exec(e), n),
  2607. n
  2608. }
  2609. ]
  2610. },
  2611. tweener: function(t, e) {
  2612. for (var n, r = 0, i = (t = k.isFunction(t) ? (e = t,
  2613. ["*"]) : t.match(P)).length; r < i; r++)
  2614. n = t[r],
  2615. te.tweeners[n] = te.tweeners[n] || [],
  2616. te.tweeners[n].unshift(e)
  2617. },
  2618. prefilters: [function(e, t, n) {
  2619. var r, i, o, s, a, u, c, l = this, h = {}, f = e.style, p = e.nodeType && q(e), d = W.get(e, "fxshow");
  2620. for (r in n.queue || (null == (a = k._queueHooks(e, "fx")).unqueued && (a.unqueued = 0,
  2621. u = a.empty.fire,
  2622. a.empty.fire = function() {
  2623. a.unqueued || u()
  2624. }
  2625. ),
  2626. a.unqueued++,
  2627. l.always(function() {
  2628. l.always(function() {
  2629. a.unqueued--,
  2630. k.queue(e, "fx").length || a.empty.fire()
  2631. })
  2632. })),
  2633. 1 === e.nodeType && ("height" in t || "width" in t) && (n.overflow = [f.overflow, f.overflowX, f.overflowY],
  2634. "inline" === ("none" === (c = k.css(e, "display")) ? W.get(e, "olddisplay") || _t(e.nodeName) : c) && "none" === k.css(e, "float") && (f.display = "inline-block")),
  2635. n.overflow && (f.overflow = "hidden",
  2636. l.always(function() {
  2637. f.overflow = n.overflow[0],
  2638. f.overflowX = n.overflow[1],
  2639. f.overflowY = n.overflow[2]
  2640. })),
  2641. t)
  2642. if (i = t[r],
  2643. Yt.exec(i)) {
  2644. if (delete t[r],
  2645. o = o || "toggle" === i,
  2646. i === (p ? "hide" : "show")) {
  2647. if ("show" !== i || !d || void 0 === d[r])
  2648. continue;
  2649. p = !0
  2650. }
  2651. h[r] = d && d[r] || k.style(e, r)
  2652. } else
  2653. c = void 0;
  2654. if (k.isEmptyObject(h))
  2655. "inline" === ("none" === c ? _t(e.nodeName) : c) && (f.display = c);
  2656. else
  2657. for (r in d ? "hidden" in d && (p = d.hidden) : d = W.access(e, "fxshow", {}),
  2658. o && (d.hidden = !p),
  2659. p ? k(e).show() : l.done(function() {
  2660. k(e).hide()
  2661. }),
  2662. l.done(function() {
  2663. for (var t in W.remove(e, "fxshow"),
  2664. h)
  2665. k.style(e, t, h[t])
  2666. }),
  2667. h)
  2668. s = Zt(p ? d[r] : 0, r, l),
  2669. r in d || (d[r] = s.start,
  2670. p && (s.end = s.start,
  2671. s.start = "width" === r || "height" === r ? 1 : 0))
  2672. }
  2673. ],
  2674. prefilter: function(t, e) {
  2675. e ? te.prefilters.unshift(t) : te.prefilters.push(t)
  2676. }
  2677. }),
  2678. k.speed = function(t, e, n) {
  2679. var r = t && "object" == typeof t ? k.extend({}, t) : {
  2680. complete: n || !n && e || k.isFunction(t) && t,
  2681. duration: t,
  2682. easing: n && e || e && !k.isFunction(e) && e
  2683. };
  2684. return r.duration = k.fx.off ? 0 : "number" == typeof r.duration ? r.duration : r.duration in k.fx.speeds ? k.fx.speeds[r.duration] : k.fx.speeds._default,
  2685. null != r.queue && !0 !== r.queue || (r.queue = "fx"),
  2686. r.old = r.complete,
  2687. r.complete = function() {
  2688. k.isFunction(r.old) && r.old.call(this),
  2689. r.queue && k.dequeue(this, r.queue)
  2690. }
  2691. ,
  2692. r
  2693. }
  2694. ,
  2695. k.fn.extend({
  2696. fadeTo: function(t, e, n, r) {
  2697. return this.filter(q).css("opacity", 0).show().end().animate({
  2698. opacity: e
  2699. }, t, n, r)
  2700. },
  2701. animate: function(e, t, n, r) {
  2702. var i = k.isEmptyObject(e)
  2703. , o = k.speed(t, n, r)
  2704. , r = function() {
  2705. var t = te(this, k.extend({}, e), o);
  2706. (i || W.get(this, "finish")) && t.stop(!0)
  2707. };
  2708. return r.finish = r,
  2709. i || !1 === o.queue ? this.each(r) : this.queue(o.queue, r)
  2710. },
  2711. stop: function(i, t, o) {
  2712. function s(t) {
  2713. var e = t.stop;
  2714. delete t.stop,
  2715. e(o)
  2716. }
  2717. return "string" != typeof i && (o = t,
  2718. t = i,
  2719. i = void 0),
  2720. t && !1 !== i && this.queue(i || "fx", []),
  2721. this.each(function() {
  2722. var t = !0
  2723. , e = null != i && i + "queueHooks"
  2724. , n = k.timers
  2725. , r = W.get(this);
  2726. if (e)
  2727. r[e] && r[e].stop && s(r[e]);
  2728. else
  2729. for (e in r)
  2730. r[e] && r[e].stop && Kt.test(e) && s(r[e]);
  2731. for (e = n.length; e--;)
  2732. n[e].elem !== this || null != i && n[e].queue !== i || (n[e].anim.stop(o),
  2733. t = !1,
  2734. n.splice(e, 1));
  2735. !t && o || k.dequeue(this, i)
  2736. })
  2737. },
  2738. finish: function(s) {
  2739. return !1 !== s && (s = s || "fx"),
  2740. this.each(function() {
  2741. var t, e = W.get(this), n = e[s + "queue"], r = e[s + "queueHooks"], i = k.timers, o = n ? n.length : 0;
  2742. for (e.finish = !0,
  2743. k.queue(this, s, []),
  2744. r && r.stop && r.stop.call(this, !0),
  2745. t = i.length; t--;)
  2746. i[t].elem === this && i[t].queue === s && (i[t].anim.stop(!0),
  2747. i.splice(t, 1));
  2748. for (t = 0; t < o; t++)
  2749. n[t] && n[t].finish && n[t].finish.call(this);
  2750. delete e.finish
  2751. })
  2752. }
  2753. }),
  2754. k.each(["toggle", "show", "hide"], function(t, r) {
  2755. var i = k.fn[r];
  2756. k.fn[r] = function(t, e, n) {
  2757. return null == t || "boolean" == typeof t ? i.apply(this, arguments) : this.animate(Jt(r, !0), t, e, n)
  2758. }
  2759. }),
  2760. k.each({
  2761. slideDown: Jt("show"),
  2762. slideUp: Jt("hide"),
  2763. slideToggle: Jt("toggle"),
  2764. fadeIn: {
  2765. opacity: "show"
  2766. },
  2767. fadeOut: {
  2768. opacity: "hide"
  2769. },
  2770. fadeToggle: {
  2771. opacity: "toggle"
  2772. }
  2773. }, function(t, r) {
  2774. k.fn[t] = function(t, e, n) {
  2775. return this.animate(r, t, e, n)
  2776. }
  2777. }),
  2778. k.timers = [],
  2779. k.fx.tick = function() {
  2780. var t, e = 0, n = k.timers;
  2781. for ($t = k.now(); e < n.length; e++)
  2782. (t = n[e])() || n[e] !== t || n.splice(e--, 1);
  2783. n.length || k.fx.stop(),
  2784. $t = void 0
  2785. }
  2786. ,
  2787. k.fx.timer = function(t) {
  2788. k.timers.push(t),
  2789. t() ? k.fx.start() : k.timers.pop()
  2790. }
  2791. ,
  2792. k.fx.interval = 13,
  2793. k.fx.start = function() {
  2794. Xt = Xt || x.setInterval(k.fx.tick, k.fx.interval)
  2795. }
  2796. ,
  2797. k.fx.stop = function() {
  2798. x.clearInterval(Xt),
  2799. Xt = null
  2800. }
  2801. ,
  2802. k.fx.speeds = {
  2803. slow: 600,
  2804. fast: 200,
  2805. _default: 400
  2806. },
  2807. k.fn.delay = function(r, t) {
  2808. return r = k.fx && k.fx.speeds[r] || r,
  2809. t = t || "fx",
  2810. this.queue(t, function(t, e) {
  2811. var n = x.setTimeout(t, r);
  2812. e.stop = function() {
  2813. x.clearTimeout(n)
  2814. }
  2815. })
  2816. }
  2817. ,
  2818. p = C.createElement("input"),
  2819. n = C.createElement("select"),
  2820. s = n.appendChild(C.createElement("option")),
  2821. p.type = "checkbox",
  2822. m.checkOn = "" !== p.value,
  2823. m.optSelected = s.selected,
  2824. n.disabled = !0,
  2825. m.optDisabled = !s.disabled,
  2826. (p = C.createElement("input")).value = "t",
  2827. p.type = "radio",
  2828. m.radioValue = "t" === p.value;
  2829. var ee, ne = k.expr.attrHandle;
  2830. k.fn.extend({
  2831. attr: function(t, e) {
  2832. return R(this, k.attr, t, e, 1 < arguments.length)
  2833. },
  2834. removeAttr: function(t) {
  2835. return this.each(function() {
  2836. k.removeAttr(this, t)
  2837. })
  2838. }
  2839. }),
  2840. k.extend({
  2841. attr: function(t, e, n) {
  2842. var r, i, o = t.nodeType;
  2843. if (3 !== o && 8 !== o && 2 !== o)
  2844. return void 0 === t.getAttribute ? k.prop(t, e, n) : (1 === o && k.isXMLDoc(t) || (e = e.toLowerCase(),
  2845. i = k.attrHooks[e] || (k.expr.match.bool.test(e) ? ee : void 0)),
  2846. void 0 !== n ? null === n ? void k.removeAttr(t, e) : i && "set" in i && void 0 !== (r = i.set(t, n, e)) ? r : (t.setAttribute(e, n + ""),
  2847. n) : i && "get" in i && null !== (r = i.get(t, e)) ? r : null == (r = k.find.attr(t, e)) ? void 0 : r)
  2848. },
  2849. attrHooks: {
  2850. type: {
  2851. set: function(t, e) {
  2852. if (!m.radioValue && "radio" === e && k.nodeName(t, "input")) {
  2853. var n = t.value;
  2854. return t.setAttribute("type", e),
  2855. n && (t.value = n),
  2856. e
  2857. }
  2858. }
  2859. }
  2860. },
  2861. removeAttr: function(t, e) {
  2862. var n, r, i = 0, o = e && e.match(P);
  2863. if (o && 1 === t.nodeType)
  2864. for (; n = o[i++];)
  2865. r = k.propFix[n] || n,
  2866. k.expr.match.bool.test(n) && (t[r] = !1),
  2867. t.removeAttribute(n)
  2868. }
  2869. }),
  2870. ee = {
  2871. set: function(t, e, n) {
  2872. return !1 === e ? k.removeAttr(t, n) : t.setAttribute(n, n),
  2873. n
  2874. }
  2875. },
  2876. k.each(k.expr.match.bool.source.match(/\w+/g), function(t, e) {
  2877. var o = ne[e] || k.find.attr;
  2878. ne[e] = function(t, e, n) {
  2879. var r, i;
  2880. return n || (i = ne[e],
  2881. ne[e] = r,
  2882. r = null != o(t, e, n) ? e.toLowerCase() : null,
  2883. ne[e] = i),
  2884. r
  2885. }
  2886. });
  2887. var re = /^(?:input|select|textarea|button)$/i
  2888. , ie = /^(?:a|area)$/i;
  2889. k.fn.extend({
  2890. prop: function(t, e) {
  2891. return R(this, k.prop, t, e, 1 < arguments.length)
  2892. },
  2893. removeProp: function(t) {
  2894. return this.each(function() {
  2895. delete this[k.propFix[t] || t]
  2896. })
  2897. }
  2898. }),
  2899. k.extend({
  2900. prop: function(t, e, n) {
  2901. var r, i, o = t.nodeType;
  2902. if (3 !== o && 8 !== o && 2 !== o)
  2903. return 1 === o && k.isXMLDoc(t) || (e = k.propFix[e] || e,
  2904. i = k.propHooks[e]),
  2905. void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(t, n, e)) ? r : t[e] = n : i && "get" in i && null !== (r = i.get(t, e)) ? r : t[e]
  2906. },
  2907. propHooks: {
  2908. tabIndex: {
  2909. get: function(t) {
  2910. var e = k.find.attr(t, "tabindex");
  2911. return e ? parseInt(e, 10) : re.test(t.nodeName) || ie.test(t.nodeName) && t.href ? 0 : -1
  2912. }
  2913. }
  2914. },
  2915. propFix: {
  2916. for: "htmlFor",
  2917. class: "className"
  2918. }
  2919. }),
  2920. m.optSelected || (k.propHooks.selected = {
  2921. get: function(t) {
  2922. t = t.parentNode;
  2923. return t && t.parentNode && t.parentNode.selectedIndex,
  2924. null
  2925. },
  2926. set: function(t) {
  2927. t = t.parentNode;
  2928. t && (t.selectedIndex,
  2929. t.parentNode && t.parentNode.selectedIndex)
  2930. }
  2931. }),
  2932. k.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
  2933. k.propFix[this.toLowerCase()] = this
  2934. });
  2935. var oe = /[\t\r\n\f]/g;
  2936. function se(t) {
  2937. return t.getAttribute && t.getAttribute("class") || ""
  2938. }
  2939. k.fn.extend({
  2940. addClass: function(e) {
  2941. var t, n, r, i, o, s, a = 0;
  2942. if (k.isFunction(e))
  2943. return this.each(function(t) {
  2944. k(this).addClass(e.call(this, t, se(this)))
  2945. });
  2946. if ("string" == typeof e && e)
  2947. for (t = e.match(P) || []; n = this[a++];)
  2948. if (s = se(n),
  2949. r = 1 === n.nodeType && (" " + s + " ").replace(oe, " ")) {
  2950. for (o = 0; i = t[o++];)
  2951. r.indexOf(" " + i + " ") < 0 && (r += i + " ");
  2952. s !== (s = k.trim(r)) && n.setAttribute("class", s)
  2953. }
  2954. return this
  2955. },
  2956. removeClass: function(e) {
  2957. var t, n, r, i, o, s, a = 0;
  2958. if (k.isFunction(e))
  2959. return this.each(function(t) {
  2960. k(this).removeClass(e.call(this, t, se(this)))
  2961. });
  2962. if (!arguments.length)
  2963. return this.attr("class", "");
  2964. if ("string" == typeof e && e)
  2965. for (t = e.match(P) || []; n = this[a++];)
  2966. if (s = se(n),
  2967. r = 1 === n.nodeType && (" " + s + " ").replace(oe, " ")) {
  2968. for (o = 0; i = t[o++];)
  2969. for (; -1 < r.indexOf(" " + i + " ");)
  2970. r = r.replace(" " + i + " ", " ");
  2971. s !== (s = k.trim(r)) && n.setAttribute("class", s)
  2972. }
  2973. return this
  2974. },
  2975. toggleClass: function(i, e) {
  2976. var o = typeof i;
  2977. return "boolean" == typeof e && "string" == o ? e ? this.addClass(i) : this.removeClass(i) : k.isFunction(i) ? this.each(function(t) {
  2978. k(this).toggleClass(i.call(this, t, se(this), e), e)
  2979. }) : this.each(function() {
  2980. var t, e, n, r;
  2981. if ("string" == o)
  2982. for (e = 0,
  2983. n = k(this),
  2984. r = i.match(P) || []; t = r[e++];)
  2985. n.hasClass(t) ? n.removeClass(t) : n.addClass(t);
  2986. else
  2987. void 0 !== i && "boolean" != o || ((t = se(this)) && W.set(this, "__className__", t),
  2988. this.setAttribute && this.setAttribute("class", !t && !1 !== i && W.get(this, "__className__") || ""))
  2989. })
  2990. },
  2991. hasClass: function(t) {
  2992. for (var e, n = 0, r = " " + t + " "; e = this[n++];)
  2993. if (1 === e.nodeType && -1 < (" " + se(e) + " ").replace(oe, " ").indexOf(r))
  2994. return !0;
  2995. return !1
  2996. }
  2997. });
  2998. var ae = /\r/g
  2999. , ue = /[\x20\t\r\n\f]+/g;
  3000. k.fn.extend({
  3001. val: function(e) {
  3002. var n, t, r, i = this[0];
  3003. return arguments.length ? (r = k.isFunction(e),
  3004. this.each(function(t) {
  3005. 1 === this.nodeType && (null == (t = r ? e.call(this, t, k(this).val()) : e) ? t = "" : "number" == typeof t ? t += "" : k.isArray(t) && (t = k.map(t, function(t) {
  3006. return null == t ? "" : t + ""
  3007. })),
  3008. (n = k.valHooks[this.type] || k.valHooks[this.nodeName.toLowerCase()]) && "set" in n && void 0 !== n.set(this, t, "value") || (this.value = t))
  3009. })) : i ? (n = k.valHooks[i.type] || k.valHooks[i.nodeName.toLowerCase()]) && "get" in n && void 0 !== (t = n.get(i, "value")) ? t : "string" == typeof (t = i.value) ? t.replace(ae, "") : null == t ? "" : t : void 0
  3010. }
  3011. }),
  3012. k.extend({
  3013. valHooks: {
  3014. option: {
  3015. get: function(t) {
  3016. var e = k.find.attr(t, "value");
  3017. return null != e ? e : k.trim(k.text(t)).replace(ue, " ")
  3018. }
  3019. },
  3020. select: {
  3021. get: function(t) {
  3022. for (var e, n = t.options, r = t.selectedIndex, i = "select-one" === t.type || r < 0, o = i ? null : [], s = i ? r + 1 : n.length, a = r < 0 ? s : i ? r : 0; a < s; a++)
  3023. if (((e = n[a]).selected || a === r) && (m.optDisabled ? !e.disabled : null === e.getAttribute("disabled")) && (!e.parentNode.disabled || !k.nodeName(e.parentNode, "optgroup"))) {
  3024. if (e = k(e).val(),
  3025. i)
  3026. return e;
  3027. o.push(e)
  3028. }
  3029. return o
  3030. },
  3031. set: function(t, e) {
  3032. for (var n, r, i = t.options, o = k.makeArray(e), s = i.length; s--;)
  3033. ((r = i[s]).selected = -1 < k.inArray(k.valHooks.option.get(r), o)) && (n = !0);
  3034. return n || (t.selectedIndex = -1),
  3035. o
  3036. }
  3037. }
  3038. }
  3039. }),
  3040. k.each(["radio", "checkbox"], function() {
  3041. k.valHooks[this] = {
  3042. set: function(t, e) {
  3043. return k.isArray(e) ? t.checked = -1 < k.inArray(k(t).val(), e) : void 0
  3044. }
  3045. },
  3046. m.checkOn || (k.valHooks[this].get = function(t) {
  3047. return null === t.getAttribute("value") ? "on" : t.value
  3048. }
  3049. )
  3050. });
  3051. var ce = /^(?:focusinfocus|focusoutblur)$/;
  3052. k.extend(k.event, {
  3053. trigger: function(t, e, n, r) {
  3054. var i, o, s, a, u, c, l = [n || C], h = d.call(t, "type") ? t.type : t, f = d.call(t, "namespace") ? t.namespace.split(".") : [], p = o = n = n || C;
  3055. if (3 !== n.nodeType && 8 !== n.nodeType && !ce.test(h + k.event.triggered) && (-1 < h.indexOf(".") && (h = (f = h.split(".")).shift(),
  3056. f.sort()),
  3057. a = h.indexOf(":") < 0 && "on" + h,
  3058. (t = t[k.expando] ? t : new k.Event(h, "object" == typeof t && t)).isTrigger = r ? 2 : 3,
  3059. t.namespace = f.join("."),
  3060. t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)") : null,
  3061. t.result = void 0,
  3062. t.target || (t.target = n),
  3063. e = null == e ? [t] : k.makeArray(e, [t]),
  3064. c = k.event.special[h] || {},
  3065. r || !c.trigger || !1 !== c.trigger.apply(n, e))) {
  3066. if (!r && !c.noBubble && !k.isWindow(n)) {
  3067. for (s = c.delegateType || h,
  3068. ce.test(s + h) || (p = p.parentNode); p; p = p.parentNode)
  3069. l.push(p),
  3070. o = p;
  3071. o === (n.ownerDocument || C) && l.push(o.defaultView || o.parentWindow || x)
  3072. }
  3073. for (i = 0; (p = l[i++]) && !t.isPropagationStopped();)
  3074. t.type = 1 < i ? s : c.bindType || h,
  3075. (u = (W.get(p, "events") || {})[t.type] && W.get(p, "handle")) && u.apply(p, e),
  3076. (u = a && p[a]) && u.apply && D(p) && (t.result = u.apply(p, e),
  3077. !1 === t.result && t.preventDefault());
  3078. return t.type = h,
  3079. r || t.isDefaultPrevented() || c._default && !1 !== c._default.apply(l.pop(), e) || !D(n) || a && k.isFunction(n[h]) && !k.isWindow(n) && ((o = n[a]) && (n[a] = null),
  3080. n[k.event.triggered = h](),
  3081. k.event.triggered = void 0,
  3082. o && (n[a] = o)),
  3083. t.result
  3084. }
  3085. },
  3086. simulate: function(t, e, n) {
  3087. t = k.extend(new k.Event, n, {
  3088. type: t,
  3089. isSimulated: !0
  3090. });
  3091. k.event.trigger(t, null, e)
  3092. }
  3093. }),
  3094. k.fn.extend({
  3095. trigger: function(t, e) {
  3096. return this.each(function() {
  3097. k.event.trigger(t, e, this)
  3098. })
  3099. },
  3100. triggerHandler: function(t, e) {
  3101. var n = this[0];
  3102. return n ? k.event.trigger(t, e, n, !0) : void 0
  3103. }
  3104. }),
  3105. k.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(t, n) {
  3106. k.fn[n] = function(t, e) {
  3107. return 0 < arguments.length ? this.on(n, null, t, e) : this.trigger(n)
  3108. }
  3109. }),
  3110. k.fn.extend({
  3111. hover: function(t, e) {
  3112. return this.mouseenter(t).mouseleave(e || t)
  3113. }
  3114. }),
  3115. m.focusin = "onfocusin" in x,
  3116. m.focusin || k.each({
  3117. focus: "focusin",
  3118. blur: "focusout"
  3119. }, function(n, r) {
  3120. function i(t) {
  3121. k.event.simulate(r, t.target, k.event.fix(t))
  3122. }
  3123. k.event.special[r] = {
  3124. setup: function() {
  3125. var t = this.ownerDocument || this
  3126. , e = W.access(t, r);
  3127. e || t.addEventListener(n, i, !0),
  3128. W.access(t, r, (e || 0) + 1)
  3129. },
  3130. teardown: function() {
  3131. var t = this.ownerDocument || this
  3132. , e = W.access(t, r) - 1;
  3133. e ? W.access(t, r, e) : (t.removeEventListener(n, i, !0),
  3134. W.remove(t, r))
  3135. }
  3136. }
  3137. });
  3138. var le = x.location
  3139. , he = k.now()
  3140. , fe = /\?/;
  3141. k.parseJSON = function(t) {
  3142. return JSON.parse(t + "")
  3143. }
  3144. ,
  3145. k.parseXML = function(t) {
  3146. var e;
  3147. if (!t || "string" != typeof t)
  3148. return null;
  3149. try {
  3150. e = (new x.DOMParser).parseFromString(t, "text/xml")
  3151. } catch (t) {
  3152. e = void 0
  3153. }
  3154. return e && !e.getElementsByTagName("parsererror").length || k.error("Invalid XML: " + t),
  3155. e
  3156. }
  3157. ;
  3158. var pe = /#.*$/
  3159. , de = /([?&])_=[^&]*/
  3160. , ge = /^(.*?):[ \t]*([^\r\n]*)$/gm
  3161. , me = /^(?:GET|HEAD)$/
  3162. , ve = /^\/\//
  3163. , ye = {}
  3164. , be = {}
  3165. , we = "*/".concat("*")
  3166. , _e = C.createElement("a");
  3167. function xe(o) {
  3168. return function(t, e) {
  3169. "string" != typeof t && (e = t,
  3170. t = "*");
  3171. var n, r = 0, i = t.toLowerCase().match(P) || [];
  3172. if (k.isFunction(e))
  3173. for (; n = i[r++];)
  3174. "+" === n[0] ? (n = n.slice(1) || "*",
  3175. (o[n] = o[n] || []).unshift(e)) : (o[n] = o[n] || []).push(e)
  3176. }
  3177. }
  3178. function Ce(e, r, i, o) {
  3179. var s = {}
  3180. , a = e === be;
  3181. function u(t) {
  3182. var n;
  3183. return s[t] = !0,
  3184. k.each(e[t] || [], function(t, e) {
  3185. e = e(r, i, o);
  3186. return "string" != typeof e || a || s[e] ? a ? !(n = e) : void 0 : (r.dataTypes.unshift(e),
  3187. u(e),
  3188. !1)
  3189. }),
  3190. n
  3191. }
  3192. return u(r.dataTypes[0]) || !s["*"] && u("*")
  3193. }
  3194. function ke(t, e) {
  3195. var n, r, i = k.ajaxSettings.flatOptions || {};
  3196. for (n in e)
  3197. void 0 !== e[n] && ((i[n] ? t : r = r || {})[n] = e[n]);
  3198. return r && k.extend(!0, t, r),
  3199. t
  3200. }
  3201. _e.href = le.href,
  3202. k.extend({
  3203. active: 0,
  3204. lastModified: {},
  3205. etag: {},
  3206. ajaxSettings: {
  3207. url: le.href,
  3208. type: "GET",
  3209. isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(le.protocol),
  3210. global: !0,
  3211. processData: !0,
  3212. async: !0,
  3213. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  3214. accepts: {
  3215. "*": we,
  3216. text: "text/plain",
  3217. html: "text/html",
  3218. xml: "application/xml, text/xml",
  3219. json: "application/json, text/javascript"
  3220. },
  3221. contents: {
  3222. xml: /\bxml\b/,
  3223. html: /\bhtml/,
  3224. json: /\bjson\b/
  3225. },
  3226. responseFields: {
  3227. xml: "responseXML",
  3228. text: "responseText",
  3229. json: "responseJSON"
  3230. },
  3231. converters: {
  3232. "* text": String,
  3233. "text html": !0,
  3234. "text json": k.parseJSON,
  3235. "text xml": k.parseXML
  3236. },
  3237. flatOptions: {
  3238. url: !0,
  3239. context: !0
  3240. }
  3241. },
  3242. ajaxSetup: function(t, e) {
  3243. return e ? ke(ke(t, k.ajaxSettings), e) : ke(k.ajaxSettings, t)
  3244. },
  3245. ajaxPrefilter: xe(ye),
  3246. ajaxTransport: xe(be),
  3247. ajax: function(t, e) {
  3248. "object" == typeof t && (e = t,
  3249. t = void 0),
  3250. e = e || {};
  3251. var u, c, l, n, h, r, f, i, p = k.ajaxSetup({}, e), d = p.context || p, g = p.context && (d.nodeType || d.jquery) ? k(d) : k.event, m = k.Deferred(), v = k.Callbacks("once memory"), y = p.statusCode || {}, o = {}, s = {}, b = 0, a = "canceled", w = {
  3252. readyState: 0,
  3253. getResponseHeader: function(t) {
  3254. var e;
  3255. if (2 === b) {
  3256. if (!n)
  3257. for (n = {}; e = ge.exec(l);)
  3258. n[e[1].toLowerCase()] = e[2];
  3259. e = n[t.toLowerCase()]
  3260. }
  3261. return null == e ? null : e
  3262. },
  3263. getAllResponseHeaders: function() {
  3264. return 2 === b ? l : null
  3265. },
  3266. setRequestHeader: function(t, e) {
  3267. var n = t.toLowerCase();
  3268. return b || (t = s[n] = s[n] || t,
  3269. o[t] = e),
  3270. this
  3271. },
  3272. overrideMimeType: function(t) {
  3273. return b || (p.mimeType = t),
  3274. this
  3275. },
  3276. statusCode: function(t) {
  3277. if (t)
  3278. if (b < 2)
  3279. for (var e in t)
  3280. y[e] = [y[e], t[e]];
  3281. else
  3282. w.always(t[w.status]);
  3283. return this
  3284. },
  3285. abort: function(t) {
  3286. t = t || a;
  3287. return u && u.abort(t),
  3288. _(0, t),
  3289. this
  3290. }
  3291. };
  3292. if (m.promise(w).complete = v.add,
  3293. w.success = w.done,
  3294. w.error = w.fail,
  3295. p.url = ((t || p.url || le.href) + "").replace(pe, "").replace(ve, le.protocol + "//"),
  3296. p.type = e.method || e.type || p.method || p.type,
  3297. p.dataTypes = k.trim(p.dataType || "*").toLowerCase().match(P) || [""],
  3298. null == p.crossDomain) {
  3299. r = C.createElement("a");
  3300. try {
  3301. r.href = p.url,
  3302. r.href = r.href,
  3303. p.crossDomain = _e.protocol + "//" + _e.host != r.protocol + "//" + r.host
  3304. } catch (t) {
  3305. p.crossDomain = !0
  3306. }
  3307. }
  3308. if (p.data && p.processData && "string" != typeof p.data && (p.data = k.param(p.data, p.traditional)),
  3309. Ce(ye, p, e, w),
  3310. 2 === b)
  3311. return w;
  3312. for (i in (f = k.event && p.global) && 0 == k.active++ && k.event.trigger("ajaxStart"),
  3313. p.type = p.type.toUpperCase(),
  3314. p.hasContent = !me.test(p.type),
  3315. c = p.url,
  3316. p.hasContent || (p.data && (c = p.url += (fe.test(c) ? "&" : "?") + p.data,
  3317. delete p.data),
  3318. !1 === p.cache && (p.url = de.test(c) ? c.replace(de, "$1_=" + he++) : c + (fe.test(c) ? "&" : "?") + "_=" + he++)),
  3319. p.ifModified && (k.lastModified[c] && w.setRequestHeader("If-Modified-Since", k.lastModified[c]),
  3320. k.etag[c] && w.setRequestHeader("If-None-Match", k.etag[c])),
  3321. (p.data && p.hasContent && !1 !== p.contentType || e.contentType) && w.setRequestHeader("Content-Type", p.contentType),
  3322. w.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]] ? p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0] ? ", " + we + "; q=0.01" : "") : p.accepts["*"]),
  3323. p.headers)
  3324. w.setRequestHeader(i, p.headers[i]);
  3325. if (p.beforeSend && (!1 === p.beforeSend.call(d, w, p) || 2 === b))
  3326. return w.abort();
  3327. for (i in a = "abort",
  3328. {
  3329. success: 1,
  3330. error: 1,
  3331. complete: 1
  3332. })
  3333. w[i](p[i]);
  3334. if (u = Ce(be, p, e, w)) {
  3335. if (w.readyState = 1,
  3336. f && g.trigger("ajaxSend", [w, p]),
  3337. 2 === b)
  3338. return w;
  3339. p.async && 0 < p.timeout && (h = x.setTimeout(function() {
  3340. w.abort("timeout")
  3341. }, p.timeout));
  3342. try {
  3343. b = 1,
  3344. u.send(o, _)
  3345. } catch (t) {
  3346. if (!(b < 2))
  3347. throw t;
  3348. _(-1, t)
  3349. }
  3350. } else
  3351. _(-1, "No Transport");
  3352. function _(t, e, n, r) {
  3353. var i, o, s, a = e;
  3354. 2 !== b && (b = 2,
  3355. h && x.clearTimeout(h),
  3356. u = void 0,
  3357. l = r || "",
  3358. w.readyState = 0 < t ? 4 : 0,
  3359. r = 200 <= t && t < 300 || 304 === t,
  3360. n && (s = function(t, e, n) {
  3361. for (var r, i, o, s, a = t.contents, u = t.dataTypes; "*" === u[0];)
  3362. u.shift(),
  3363. void 0 === r && (r = t.mimeType || e.getResponseHeader("Content-Type"));
  3364. if (r)
  3365. for (i in a)
  3366. if (a[i] && a[i].test(r)) {
  3367. u.unshift(i);
  3368. break
  3369. }
  3370. if (u[0] in n)
  3371. o = u[0];
  3372. else {
  3373. for (i in n) {
  3374. if (!u[0] || t.converters[i + " " + u[0]]) {
  3375. o = i;
  3376. break
  3377. }
  3378. s = s || i
  3379. }
  3380. o = o || s
  3381. }
  3382. return o ? (o !== u[0] && u.unshift(o),
  3383. n[o]) : void 0
  3384. }(p, w, n)),
  3385. s = function(t, e, n, r) {
  3386. var i, o, s, a, u, c = {}, l = t.dataTypes.slice();
  3387. if (l[1])
  3388. for (s in t.converters)
  3389. c[s.toLowerCase()] = t.converters[s];
  3390. for (o = l.shift(); o;)
  3391. if (t.responseFields[o] && (n[t.responseFields[o]] = e),
  3392. !u && r && t.dataFilter && (e = t.dataFilter(e, t.dataType)),
  3393. u = o,
  3394. o = l.shift())
  3395. if ("*" === o)
  3396. o = u;
  3397. else if ("*" !== u && u !== o) {
  3398. if (!(s = c[u + " " + o] || c["* " + o]))
  3399. for (i in c)
  3400. if (a = i.split(" "),
  3401. a[1] === o && (s = c[u + " " + a[0]] || c["* " + a[0]])) {
  3402. !0 === s ? s = c[i] : !0 !== c[i] && (o = a[0],
  3403. l.unshift(a[1]));
  3404. break
  3405. }
  3406. if (!0 !== s)
  3407. if (s && t.throws)
  3408. e = s(e);
  3409. else
  3410. try {
  3411. e = s(e)
  3412. } catch (t) {
  3413. return {
  3414. state: "parsererror",
  3415. error: s ? t : "No conversion from " + u + " to " + o
  3416. }
  3417. }
  3418. }
  3419. return {
  3420. state: "success",
  3421. data: e
  3422. }
  3423. }(p, s, w, r),
  3424. r ? (p.ifModified && ((n = w.getResponseHeader("Last-Modified")) && (k.lastModified[c] = n),
  3425. (n = w.getResponseHeader("etag")) && (k.etag[c] = n)),
  3426. 204 === t || "HEAD" === p.type ? a = "nocontent" : 304 === t ? a = "notmodified" : (a = s.state,
  3427. i = s.data,
  3428. r = !(o = s.error))) : (o = a,
  3429. !t && a || (a = "error",
  3430. t < 0 && (t = 0))),
  3431. w.status = t,
  3432. w.statusText = (e || a) + "",
  3433. r ? m.resolveWith(d, [i, a, w]) : m.rejectWith(d, [w, a, o]),
  3434. w.statusCode(y),
  3435. y = void 0,
  3436. f && g.trigger(r ? "ajaxSuccess" : "ajaxError", [w, p, r ? i : o]),
  3437. v.fireWith(d, [w, a]),
  3438. f && (g.trigger("ajaxComplete", [w, p]),
  3439. --k.active || k.event.trigger("ajaxStop")))
  3440. }
  3441. return w
  3442. },
  3443. getJSON: function(t, e, n) {
  3444. return k.get(t, e, n, "json")
  3445. },
  3446. getScript: function(t, e) {
  3447. return k.get(t, void 0, e, "script")
  3448. }
  3449. }),
  3450. k.each(["get", "post"], function(t, i) {
  3451. k[i] = function(t, e, n, r) {
  3452. return k.isFunction(e) && (r = r || n,
  3453. n = e,
  3454. e = void 0),
  3455. k.ajax(k.extend({
  3456. url: t,
  3457. type: i,
  3458. dataType: r,
  3459. data: e,
  3460. success: n
  3461. }, k.isPlainObject(t) && t))
  3462. }
  3463. }),
  3464. k._evalUrl = function(t) {
  3465. return k.ajax({
  3466. url: t,
  3467. type: "GET",
  3468. dataType: "script",
  3469. async: !1,
  3470. global: !1,
  3471. throws: !0
  3472. })
  3473. }
  3474. ,
  3475. k.fn.extend({
  3476. wrapAll: function(e) {
  3477. var t;
  3478. return k.isFunction(e) ? this.each(function(t) {
  3479. k(this).wrapAll(e.call(this, t))
  3480. }) : (this[0] && (t = k(e, this[0].ownerDocument).eq(0).clone(!0),
  3481. this[0].parentNode && t.insertBefore(this[0]),
  3482. t.map(function() {
  3483. for (var t = this; t.firstElementChild;)
  3484. t = t.firstElementChild;
  3485. return t
  3486. }).append(this)),
  3487. this)
  3488. },
  3489. wrapInner: function(n) {
  3490. return k.isFunction(n) ? this.each(function(t) {
  3491. k(this).wrapInner(n.call(this, t))
  3492. }) : this.each(function() {
  3493. var t = k(this)
  3494. , e = t.contents();
  3495. e.length ? e.wrapAll(n) : t.append(n)
  3496. })
  3497. },
  3498. wrap: function(e) {
  3499. var n = k.isFunction(e);
  3500. return this.each(function(t) {
  3501. k(this).wrapAll(n ? e.call(this, t) : e)
  3502. })
  3503. },
  3504. unwrap: function() {
  3505. return this.parent().each(function() {
  3506. k.nodeName(this, "body") || k(this).replaceWith(this.childNodes)
  3507. }).end()
  3508. }
  3509. }),
  3510. k.expr.filters.hidden = function(t) {
  3511. return !k.expr.filters.visible(t)
  3512. }
  3513. ,
  3514. k.expr.filters.visible = function(t) {
  3515. return 0 < t.offsetWidth || 0 < t.offsetHeight || 0 < t.getClientRects().length
  3516. }
  3517. ;
  3518. var Se = /%20/g
  3519. , Oe = /\[\]$/
  3520. , Ee = /\r?\n/g
  3521. , Te = /^(?:submit|button|image|reset|file)$/i
  3522. , Ae = /^(?:input|select|textarea|keygen)/i;
  3523. k.param = function(t, e) {
  3524. function n(t, e) {
  3525. e = k.isFunction(e) ? e() : null == e ? "" : e,
  3526. i[i.length] = encodeURIComponent(t) + "=" + encodeURIComponent(e)
  3527. }
  3528. var r, i = [];
  3529. if (void 0 === e && (e = k.ajaxSettings && k.ajaxSettings.traditional),
  3530. k.isArray(t) || t.jquery && !k.isPlainObject(t))
  3531. k.each(t, function() {
  3532. n(this.name, this.value)
  3533. });
  3534. else
  3535. for (r in t)
  3536. !function n(r, t, i, o) {
  3537. if (k.isArray(t))
  3538. k.each(t, function(t, e) {
  3539. i || Oe.test(r) ? o(r, e) : n(r + "[" + ("object" == typeof e && null != e ? t : "") + "]", e, i, o)
  3540. });
  3541. else if (i || "object" !== k.type(t))
  3542. o(r, t);
  3543. else
  3544. for (var e in t)
  3545. n(r + "[" + e + "]", t[e], i, o)
  3546. }(r, t[r], e, n);
  3547. return i.join("&").replace(Se, "+")
  3548. }
  3549. ,
  3550. k.fn.extend({
  3551. serialize: function() {
  3552. return k.param(this.serializeArray())
  3553. },
  3554. serializeArray: function() {
  3555. return this.map(function() {
  3556. var t = k.prop(this, "elements");
  3557. return t ? k.makeArray(t) : this
  3558. }).filter(function() {
  3559. var t = this.type;
  3560. return this.name && !k(this).is(":disabled") && Ae.test(this.nodeName) && !Te.test(t) && (this.checked || !V.test(t))
  3561. }).map(function(t, e) {
  3562. var n = k(this).val();
  3563. return null == n ? null : k.isArray(n) ? k.map(n, function(t) {
  3564. return {
  3565. name: e.name,
  3566. value: t.replace(Ee, "\r\n")
  3567. }
  3568. }) : {
  3569. name: e.name,
  3570. value: n.replace(Ee, "\r\n")
  3571. }
  3572. }).get()
  3573. }
  3574. }),
  3575. k.ajaxSettings.xhr = function() {
  3576. try {
  3577. return new x.XMLHttpRequest
  3578. } catch (t) { }
  3579. }
  3580. ;
  3581. var Ie = {
  3582. 0: 200,
  3583. 1223: 204
  3584. }
  3585. , je = k.ajaxSettings.xhr();
  3586. m.cors = !!je && "withCredentials" in je,
  3587. m.ajax = je = !!je,
  3588. k.ajaxTransport(function(i) {
  3589. var o, s;
  3590. return m.cors || je && !i.crossDomain ? {
  3591. send: function(t, e) {
  3592. var n, r = i.xhr();
  3593. if (r.open(i.type, i.url, i.async, i.username, i.password),
  3594. i.xhrFields)
  3595. for (n in i.xhrFields)
  3596. r[n] = i.xhrFields[n];
  3597. for (n in i.mimeType && r.overrideMimeType && r.overrideMimeType(i.mimeType),
  3598. i.crossDomain || t["X-Requested-With"] || (t["X-Requested-With"] = "XMLHttpRequest"),
  3599. t)
  3600. r.setRequestHeader(n, t[n]);
  3601. o = function(t) {
  3602. return function() {
  3603. o && (o = s = r.onload = r.onerror = r.onabort = r.onreadystatechange = null,
  3604. "abort" === t ? r.abort() : "error" === t ? "number" != typeof r.status ? e(0, "error") : e(r.status, r.statusText) : e(Ie[r.status] || r.status, r.statusText, "text" !== (r.responseType || "text") || "string" != typeof r.responseText ? {
  3605. binary: r.response
  3606. } : {
  3607. text: r.responseText
  3608. }, r.getAllResponseHeaders()))
  3609. }
  3610. }
  3611. ,
  3612. r.onload = o(),
  3613. s = r.onerror = o("error"),
  3614. void 0 !== r.onabort ? r.onabort = s : r.onreadystatechange = function() {
  3615. 4 === r.readyState && x.setTimeout(function() {
  3616. o && s()
  3617. })
  3618. }
  3619. ,
  3620. o = o("abort");
  3621. try {
  3622. r.send(i.hasContent && i.data || null)
  3623. } catch (t) {
  3624. if (o)
  3625. throw t
  3626. }
  3627. },
  3628. abort: function() {
  3629. o && o()
  3630. }
  3631. } : void 0
  3632. }),
  3633. k.ajaxSetup({
  3634. accepts: {
  3635. script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  3636. },
  3637. contents: {
  3638. script: /\b(?:java|ecma)script\b/
  3639. },
  3640. converters: {
  3641. "text script": function(t) {
  3642. return k.globalEval(t),
  3643. t
  3644. }
  3645. }
  3646. }),
  3647. k.ajaxPrefilter("script", function(t) {
  3648. void 0 === t.cache && (t.cache = !1),
  3649. t.crossDomain && (t.type = "GET")
  3650. }),
  3651. k.ajaxTransport("script", function(n) {
  3652. var r, i;
  3653. if (n.crossDomain)
  3654. return {
  3655. send: function(t, e) {
  3656. r = k("<script>").prop({
  3657. charset: n.scriptCharset,
  3658. src: n.url
  3659. }).on("load error", i = function(t) {
  3660. r.remove(),
  3661. i = null,
  3662. t && e("error" === t.type ? 404 : 200, t.type)
  3663. }
  3664. ),
  3665. C.head.appendChild(r[0])
  3666. },
  3667. abort: function() {
  3668. i && i()
  3669. }
  3670. }
  3671. });
  3672. var Pe = []
  3673. , Ne = /(=)\?(?=&|$)|\?\?/;
  3674. k.ajaxSetup({
  3675. jsonp: "callback",
  3676. jsonpCallback: function() {
  3677. var t = Pe.pop() || k.expando + "_" + he++;
  3678. return this[t] = !0,
  3679. t
  3680. }
  3681. }),
  3682. k.ajaxPrefilter("json jsonp", function(t, e, n) {
  3683. var r, i, o, s = !1 !== t.jsonp && (Ne.test(t.url) ? "url" : "string" == typeof t.data && 0 === (t.contentType || "").indexOf("application/x-www-form-urlencoded") && Ne.test(t.data) && "data");
  3684. return s || "jsonp" === t.dataTypes[0] ? (r = t.jsonpCallback = k.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback,
  3685. s ? t[s] = t[s].replace(Ne, "$1" + r) : !1 !== t.jsonp && (t.url += (fe.test(t.url) ? "&" : "?") + t.jsonp + "=" + r),
  3686. t.converters["script json"] = function() {
  3687. return o || k.error(r + " was not called"),
  3688. o[0]
  3689. }
  3690. ,
  3691. t.dataTypes[0] = "json",
  3692. i = x[r],
  3693. x[r] = function() {
  3694. o = arguments
  3695. }
  3696. ,
  3697. n.always(function() {
  3698. void 0 === i ? k(x).removeProp(r) : x[r] = i,
  3699. t[r] && (t.jsonpCallback = e.jsonpCallback,
  3700. Pe.push(r)),
  3701. o && k.isFunction(i) && i(o[0]),
  3702. o = i = void 0
  3703. }),
  3704. "script") : void 0
  3705. }),
  3706. k.parseHTML = function(t, e, n) {
  3707. if (!t || "string" != typeof t)
  3708. return null;
  3709. "boolean" == typeof e && (n = e,
  3710. e = !1),
  3711. e = e || C;
  3712. var r = w.exec(t)
  3713. , n = !n && [];
  3714. return r ? [e.createElement(r[1])] : (r = Z([t], e, n),
  3715. n && n.length && k(n).remove(),
  3716. k.merge([], r.childNodes))
  3717. }
  3718. ;
  3719. var De = k.fn.load;
  3720. function Re(t) {
  3721. return k.isWindow(t) ? t : 9 === t.nodeType && t.defaultView
  3722. }
  3723. k.fn.load = function(t, e, n) {
  3724. if ("string" != typeof t && De)
  3725. return De.apply(this, arguments);
  3726. var r, i, o, s = this, a = t.indexOf(" ");
  3727. return -1 < a && (r = k.trim(t.slice(a)),
  3728. t = t.slice(0, a)),
  3729. k.isFunction(e) ? (n = e,
  3730. e = void 0) : e && "object" == typeof e && (i = "POST"),
  3731. 0 < s.length && k.ajax({
  3732. url: t,
  3733. type: i || "GET",
  3734. dataType: "html",
  3735. data: e
  3736. }).done(function(t) {
  3737. o = arguments,
  3738. s.html(r ? k("<div>").append(k.parseHTML(t)).find(r) : t)
  3739. }).always(n && function(t, e) {
  3740. s.each(function() {
  3741. n.apply(this, o || [t.responseText, e, t])
  3742. })
  3743. }
  3744. ),
  3745. this
  3746. }
  3747. ,
  3748. k.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(t, e) {
  3749. k.fn[e] = function(t) {
  3750. return this.on(e, t)
  3751. }
  3752. }),
  3753. k.expr.filters.animated = function(e) {
  3754. return k.grep(k.timers, function(t) {
  3755. return e === t.elem
  3756. }).length
  3757. }
  3758. ,
  3759. k.offset = {
  3760. setOffset: function(t, e, n) {
  3761. var r, i, o, s, a = k.css(t, "position"), u = k(t), c = {};
  3762. "static" === a && (t.style.position = "relative"),
  3763. o = u.offset(),
  3764. r = k.css(t, "top"),
  3765. s = k.css(t, "left"),
  3766. s = ("absolute" === a || "fixed" === a) && -1 < (r + s).indexOf("auto") ? (i = (a = u.position()).top,
  3767. a.left) : (i = parseFloat(r) || 0,
  3768. parseFloat(s) || 0),
  3769. k.isFunction(e) && (e = e.call(t, n, k.extend({}, o))),
  3770. null != e.top && (c.top = e.top - o.top + i),
  3771. null != e.left && (c.left = e.left - o.left + s),
  3772. "using" in e ? e.using.call(t, c) : u.css(c)
  3773. }
  3774. },
  3775. k.fn.extend({
  3776. offset: function(e) {
  3777. if (arguments.length)
  3778. return void 0 === e ? this : this.each(function(t) {
  3779. k.offset.setOffset(this, e, t)
  3780. });
  3781. var t, n = this[0], r = {
  3782. top: 0,
  3783. left: 0
  3784. }, i = n && n.ownerDocument;
  3785. return i ? (t = i.documentElement,
  3786. k.contains(t, n) ? (r = n.getBoundingClientRect(),
  3787. i = Re(i),
  3788. {
  3789. top: r.top + i.pageYOffset - t.clientTop,
  3790. left: r.left + i.pageXOffset - t.clientLeft
  3791. }) : r) : void 0
  3792. },
  3793. position: function() {
  3794. if (this[0]) {
  3795. var t, e, n = this[0], r = {
  3796. top: 0,
  3797. left: 0
  3798. };
  3799. return "fixed" === k.css(n, "position") ? e = n.getBoundingClientRect() : (t = this.offsetParent(),
  3800. e = this.offset(),
  3801. k.nodeName(t[0], "html") || (r = t.offset()),
  3802. r.top += k.css(t[0], "borderTopWidth", !0),
  3803. r.left += k.css(t[0], "borderLeftWidth", !0)),
  3804. {
  3805. top: e.top - r.top - k.css(n, "marginTop", !0),
  3806. left: e.left - r.left - k.css(n, "marginLeft", !0)
  3807. }
  3808. }
  3809. },
  3810. offsetParent: function() {
  3811. return this.map(function() {
  3812. for (var t = this.offsetParent; t && "static" === k.css(t, "position");)
  3813. t = t.offsetParent;
  3814. return t || Pt
  3815. })
  3816. }
  3817. }),
  3818. k.each({
  3819. scrollLeft: "pageXOffset",
  3820. scrollTop: "pageYOffset"
  3821. }, function(e, i) {
  3822. var o = "pageYOffset" === i;
  3823. k.fn[e] = function(t) {
  3824. return R(this, function(t, e, n) {
  3825. var r = Re(t);
  3826. return void 0 === n ? r ? r[i] : t[e] : void (r ? r.scrollTo(o ? r.pageXOffset : n, o ? n : r.pageYOffset) : t[e] = n)
  3827. }, e, t, arguments.length)
  3828. }
  3829. }),
  3830. k.each(["top", "left"], function(t, n) {
  3831. k.cssHooks[n] = Rt(m.pixelPosition, function(t, e) {
  3832. return e ? (e = Dt(t, n),
  3833. It.test(e) ? k(t).position()[n] + "px" : e) : void 0
  3834. })
  3835. }),
  3836. k.each({
  3837. Height: "height",
  3838. Width: "width"
  3839. }, function(o, s) {
  3840. k.each({
  3841. padding: "inner" + o,
  3842. content: s,
  3843. "": "outer" + o
  3844. }, function(r, t) {
  3845. k.fn[t] = function(t, e) {
  3846. var n = arguments.length && (r || "boolean" != typeof t)
  3847. , i = r || (!0 === t || !0 === e ? "margin" : "border");
  3848. return R(this, function(t, e, n) {
  3849. var r;
  3850. return k.isWindow(t) ? t.document.documentElement["client" + o] : 9 === t.nodeType ? (r = t.documentElement,
  3851. Math.max(t.body["scroll" + o], r["scroll" + o], t.body["offset" + o], r["offset" + o], r["client" + o])) : void 0 === n ? k.css(t, e, i) : k.style(t, e, n, i)
  3852. }, s, n ? t : void 0, n, null)
  3853. }
  3854. })
  3855. }),
  3856. k.fn.extend({
  3857. bind: function(t, e, n) {
  3858. return this.on(t, null, e, n)
  3859. },
  3860. unbind: function(t, e) {
  3861. return this.off(t, null, e)
  3862. },
  3863. delegate: function(t, e, n, r) {
  3864. return this.on(e, t, n, r)
  3865. },
  3866. undelegate: function(t, e, n) {
  3867. return 1 === arguments.length ? this.off(t, "**") : this.off(e, t || "**", n)
  3868. },
  3869. size: function() {
  3870. return this.length
  3871. }
  3872. }),
  3873. k.fn.andSelf = k.fn.addBack,
  3874. "function" == typeof define && define.amd && define("jquery", [], function() {
  3875. return k
  3876. });
  3877. var Me = x.jQuery
  3878. , We = x.$;
  3879. return k.noConflict = function(t) {
  3880. return x.$ === k && (x.$ = We),
  3881. t && x.jQuery === k && (x.jQuery = Me),
  3882. k
  3883. }
  3884. ,
  3885. t || (x.jQuery = x.$ = k),
  3886. k
  3887. }),
  3888. function(t, e) {
  3889. "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.clipboard = e() : t.clipboard = e()
  3890. }(this, function() {
  3891. return i = {},
  3892. r.m = n = [function(t, e, n) {
  3893. "use strict";
  3894. function o(t) {
  3895. var e = new v
  3896. , t = function(n, t, r) {
  3897. f("listener called"),
  3898. n.success = !0,
  3899. t.forEach(function(t, e) {
  3900. r.clipboardData.setData(e, t),
  3901. e === g && r.clipboardData.getData(e) != t && (f("setting text/plain failed"),
  3902. n.success = !1)
  3903. }),
  3904. r.preventDefault()
  3905. }
  3906. .bind(this, e, t);
  3907. document.addEventListener("copy", t);
  3908. try {
  3909. document.execCommand("copy")
  3910. } finally {
  3911. document.removeEventListener("copy", t)
  3912. }
  3913. return e.success
  3914. }
  3915. function s(t, e) {
  3916. a(t);
  3917. e = o(e);
  3918. return u(),
  3919. e
  3920. }
  3921. function a(t) {
  3922. var e = document.getSelection()
  3923. , n = document.createRange();
  3924. n.selectNodeContents(t),
  3925. e.removeAllRanges(),
  3926. e.addRange(n)
  3927. }
  3928. function u() {
  3929. document.getSelection().removeAllRanges()
  3930. }
  3931. function c() {
  3932. return "undefined" == typeof ClipboardEvent && void 0 !== window.clipboardData && void 0 !== window.clipboardData.setData
  3933. }
  3934. function r() {
  3935. return new h(function(t, e) {
  3936. var n = window.clipboardData.getData("Text");
  3937. "" === n ? e(new Error("Empty clipboard or could not read plain text from clipboard")) : t(n)
  3938. }
  3939. )
  3940. }
  3941. Object.defineProperty(e, "__esModule", {
  3942. value: !0
  3943. });
  3944. var i = n(1)
  3945. , l = n(5)
  3946. , h = "undefined" == typeof Promise ? i.Promise : Promise
  3947. , f = function(t) { }
  3948. , p = !0
  3949. , d = function() {
  3950. (console.warn || console.log).call(arguments)
  3951. }
  3952. .bind(console, "[clipboard-polyfill]")
  3953. , g = "text/plain"
  3954. , i = (m.setDebugLog = function(t) {
  3955. f = t
  3956. }
  3957. ,
  3958. m.suppressWarnings = function() {
  3959. p = !1,
  3960. l.suppressDTWarnings()
  3961. }
  3962. ,
  3963. m.write = function(i) {
  3964. return p && !i.getData(g) && d("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call clipboard.suppressWarnings() to suppress this warning."),
  3965. new h(function(t, e) {
  3966. if (c())
  3967. (function(t) {
  3968. if (void 0 !== (t = t.getData(g)))
  3969. return window.clipboardData.setData("Text", t);
  3970. throw "No `text/plain` value was specified."
  3971. }
  3972. )(i) ? t() : e(new Error("Copying failed, possibly because the user rejected it."));
  3973. else {
  3974. if (o(i))
  3975. return f("regular execCopy worked"),
  3976. void t();
  3977. if (-1 < navigator.userAgent.indexOf("Edge"))
  3978. return f('UA "Edge" => assuming success'),
  3979. void t();
  3980. if (s(document.body, i))
  3981. return f("copyUsingTempSelection worked"),
  3982. void t();
  3983. if (r = i,
  3984. (n = document.createElement("div")).setAttribute("style", "-webkit-user-select: text !important"),
  3985. n.textContent = "temporary element",
  3986. document.body.appendChild(n),
  3987. r = s(n, r),
  3988. document.body.removeChild(n),
  3989. r)
  3990. return f("copyUsingTempElem worked"),
  3991. void t();
  3992. var n, r = i.getData(g);
  3993. if (void 0 !== r && function(t) {
  3994. f("copyTextUsingDOM");
  3995. var e = document.createElement("div");
  3996. e.setAttribute("style", "-webkit-user-select: text !important");
  3997. var n = e;
  3998. e.attachShadow && (f("Using shadow DOM."),
  3999. n = e.attachShadow({
  4000. mode: "open"
  4001. }));
  4002. var r = document.createElement("span");
  4003. return r.innerText = t,
  4004. n.appendChild(r),
  4005. document.body.appendChild(e),
  4006. a(r),
  4007. r = document.execCommand("copy"),
  4008. u(),
  4009. document.body.removeChild(e),
  4010. r
  4011. }(r))
  4012. return f("copyTextUsingDOM worked"),
  4013. void t();
  4014. e(new Error("Copy command failed."))
  4015. }
  4016. }
  4017. )
  4018. }
  4019. ,
  4020. m.writeText = function(t) {
  4021. if (navigator.clipboard && navigator.clipboard.writeText)
  4022. return navigator.clipboard.writeText(t);
  4023. var e = new l.DT;
  4024. return e.setData(g, t),
  4025. this.write(e)
  4026. }
  4027. ,
  4028. m.read = function() {
  4029. return new h(function(n, t) {
  4030. c() ? r().then(function(t) {
  4031. return n((e = t,
  4032. (t = new l.DT).setData(g, e),
  4033. t));
  4034. var e
  4035. }, t) : t("Read is not supported in your browser.")
  4036. }
  4037. )
  4038. }
  4039. ,
  4040. m.readText = function() {
  4041. return navigator.clipboard && navigator.clipboard.readText ? navigator.clipboard.readText() : c() ? r() : new h(function(t, e) {
  4042. e("Read is not supported in your browser.")
  4043. }
  4044. )
  4045. }
  4046. ,
  4047. m.DT = l.DT,
  4048. m);
  4049. function m() { }
  4050. e.default = i;
  4051. var v = function() {
  4052. this.success = !1
  4053. };
  4054. t.exports = i
  4055. }
  4056. , function(t, e, st) {
  4057. (function(it, ot) {
  4058. t.exports = function() {
  4059. "use strict";
  4060. function n(t) {
  4061. var e = typeof t;
  4062. return null !== t && ("object" === e || "function" === e)
  4063. }
  4064. function c(t) {
  4065. return "function" == typeof t
  4066. }
  4067. function t(t) {
  4068. q = t
  4069. }
  4070. function e(t) {
  4071. z = t
  4072. }
  4073. function r() {
  4074. return void 0 !== B ? function() {
  4075. B(o)
  4076. }
  4077. : i()
  4078. }
  4079. function i() {
  4080. var t = setTimeout;
  4081. return function() {
  4082. return t(o, 1)
  4083. }
  4084. }
  4085. function o() {
  4086. for (var t = 0; t < H; t += 2)
  4087. (0,
  4088. Y[t])(Y[t + 1]),
  4089. Y[t] = void 0,
  4090. Y[t + 1] = void 0;
  4091. H = 0
  4092. }
  4093. function s(t, e) {
  4094. var n = arguments
  4095. , r = this
  4096. , i = new this.constructor(u);
  4097. void 0 === i[Q] && T(i);
  4098. var o = r._state;
  4099. return o ? function() {
  4100. var t = n[o - 1];
  4101. z(function() {
  4102. return S(o, i, t, r._result)
  4103. })
  4104. }() : _(r, i, t, e),
  4105. i
  4106. }
  4107. function a(t) {
  4108. var e = this;
  4109. if (t && "object" == typeof t && t.constructor === e)
  4110. return t;
  4111. var n = new e(u);
  4112. return v(n, t),
  4113. n
  4114. }
  4115. function u() { }
  4116. function l() {
  4117. return new TypeError("You cannot resolve a promise with itself")
  4118. }
  4119. function h() {
  4120. return new TypeError("A promises callback cannot return that same promise.")
  4121. }
  4122. function f(t) {
  4123. try {
  4124. return t.then
  4125. } catch (t) {
  4126. return et.error = t,
  4127. et
  4128. }
  4129. }
  4130. function p(t, e, n, r) {
  4131. try {
  4132. t.call(e, n, r)
  4133. } catch (t) {
  4134. return t
  4135. }
  4136. }
  4137. function d(t, r, i) {
  4138. z(function(e) {
  4139. var n = !1
  4140. , t = p(i, r, function(t) {
  4141. n || (n = !0,
  4142. r !== t ? v(e, t) : b(e, t))
  4143. }, function(t) {
  4144. n || (n = !0,
  4145. w(e, t))
  4146. }, "Settle: " + (e._label || " unknown promise"));
  4147. !n && t && (n = !0,
  4148. w(e, t))
  4149. }, t)
  4150. }
  4151. function g(e, t) {
  4152. t._state === Z ? b(e, t._result) : t._state === tt ? w(e, t._result) : _(t, void 0, function(t) {
  4153. return v(e, t)
  4154. }, function(t) {
  4155. return w(e, t)
  4156. })
  4157. }
  4158. function m(t, e, n) {
  4159. e.constructor === t.constructor && n === s && e.constructor.resolve === a ? g(t, e) : n === et ? (w(t, et.error),
  4160. et.error = null) : void 0 === n ? b(t, e) : c(n) ? d(t, e, n) : b(t, e)
  4161. }
  4162. function v(t, e) {
  4163. t === e ? w(t, l()) : n(e) ? m(t, e, f(e)) : b(t, e)
  4164. }
  4165. function y(t) {
  4166. t._onerror && t._onerror(t._result),
  4167. x(t)
  4168. }
  4169. function b(t, e) {
  4170. t._state === J && (t._result = e,
  4171. t._state = Z,
  4172. 0 !== t._subscribers.length && z(x, t))
  4173. }
  4174. function w(t, e) {
  4175. t._state === J && (t._state = tt,
  4176. t._result = e,
  4177. z(y, t))
  4178. }
  4179. function _(t, e, n, r) {
  4180. var i = t._subscribers
  4181. , o = i.length;
  4182. t._onerror = null,
  4183. i[o] = e,
  4184. i[o + Z] = n,
  4185. i[o + tt] = r,
  4186. 0 === o && t._state && z(x, t)
  4187. }
  4188. function x(t) {
  4189. var e = t._subscribers
  4190. , n = t._state;
  4191. if (0 !== e.length) {
  4192. for (var r = void 0, i = void 0, o = t._result, s = 0; s < e.length; s += 3)
  4193. r = e[s],
  4194. i = e[s + n],
  4195. r ? S(n, r, i, o) : i(o);
  4196. t._subscribers.length = 0
  4197. }
  4198. }
  4199. function C() {
  4200. this.error = null
  4201. }
  4202. function k(t, e) {
  4203. try {
  4204. return t(e)
  4205. } catch (t) {
  4206. return nt.error = t,
  4207. nt
  4208. }
  4209. }
  4210. function S(t, e, n, r) {
  4211. var i = c(n)
  4212. , o = void 0
  4213. , s = void 0
  4214. , a = void 0
  4215. , u = void 0;
  4216. if (i) {
  4217. if (o = k(n, r),
  4218. o === nt ? (u = !0,
  4219. s = o.error,
  4220. o.error = null) : a = !0,
  4221. e === o)
  4222. return void w(e, h())
  4223. } else
  4224. o = r,
  4225. a = !0;
  4226. e._state !== J || (i && a ? v(e, o) : u ? w(e, s) : t === Z ? b(e, o) : t === tt && w(e, o))
  4227. }
  4228. function O(e, t) {
  4229. try {
  4230. t(function(t) {
  4231. v(e, t)
  4232. }, function(t) {
  4233. w(e, t)
  4234. })
  4235. } catch (t) {
  4236. w(e, t)
  4237. }
  4238. }
  4239. function E() {
  4240. return rt++
  4241. }
  4242. function T(t) {
  4243. t[Q] = rt++,
  4244. t._state = void 0,
  4245. t._result = void 0,
  4246. t._subscribers = []
  4247. }
  4248. function A(t, e) {
  4249. this._instanceConstructor = t,
  4250. this.promise = new t(u),
  4251. this.promise[Q] || T(this.promise),
  4252. F(e) ? (this.length = e.length,
  4253. this._remaining = e.length,
  4254. this._result = new Array(this.length),
  4255. 0 === this.length ? b(this.promise, this._result) : (this.length = this.length || 0,
  4256. this._enumerate(e),
  4257. 0 === this._remaining && b(this.promise, this._result))) : w(this.promise, I())
  4258. }
  4259. function I() {
  4260. return new Error("Array Methods must be provided an Array")
  4261. }
  4262. function j(t) {
  4263. return new A(this, t).promise
  4264. }
  4265. function P(i) {
  4266. var o = this;
  4267. return new o(F(i) ? function(t, e) {
  4268. for (var n = i.length, r = 0; r < n; r++)
  4269. o.resolve(i[r]).then(t, e)
  4270. }
  4271. : function(t, e) {
  4272. return e(new TypeError("You must pass an array to race."))
  4273. }
  4274. )
  4275. }
  4276. function N(t) {
  4277. var e = this
  4278. , n = new e(u);
  4279. return w(n, t),
  4280. n
  4281. }
  4282. function D() {
  4283. throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")
  4284. }
  4285. function R() {
  4286. throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")
  4287. }
  4288. function M(t) {
  4289. this[Q] = E(),
  4290. this._result = this._state = void 0,
  4291. this._subscribers = [],
  4292. u !== t && ("function" != typeof t && D(),
  4293. this instanceof M ? O(this, t) : R())
  4294. }
  4295. function W() {
  4296. var t = void 0;
  4297. if (void 0 !== ot)
  4298. t = ot;
  4299. else if ("undefined" != typeof self)
  4300. t = self;
  4301. else
  4302. try {
  4303. t = Function("return this")()
  4304. } catch (t) {
  4305. throw new Error("polyfill failed because global object is unavailable in this environment")
  4306. }
  4307. var e = t.Promise;
  4308. if (e) {
  4309. var n = null;
  4310. try {
  4311. n = Object.prototype.toString.call(e.resolve())
  4312. } catch (t) { }
  4313. if ("[object Promise]" === n && !e.cast)
  4314. return
  4315. }
  4316. t.Promise = M
  4317. }
  4318. var L = void 0
  4319. , F = L = Array.isArray ? Array.isArray : function(t) {
  4320. return "[object Array]" === Object.prototype.toString.call(t)
  4321. }
  4322. , H = 0
  4323. , B = void 0
  4324. , q = void 0
  4325. , z = function(t, e) {
  4326. Y[H] = t,
  4327. Y[H + 1] = e,
  4328. 2 === (H += 2) && (q ? q(o) : K())
  4329. }
  4330. , U = "undefined" != typeof window ? window : void 0
  4331. , G = U || {}
  4332. , V = G.MutationObserver || G.WebKitMutationObserver
  4333. , $ = "undefined" == typeof self && void 0 !== it && "[object process]" === {}.toString.call(it)
  4334. , X = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel
  4335. , Y = new Array(1e3)
  4336. , K = void 0;
  4337. K = $ ? function() {
  4338. return function() {
  4339. return it.nextTick(o)
  4340. }
  4341. }() : V ? function() {
  4342. var t = 0
  4343. , e = new V(o)
  4344. , n = document.createTextNode("");
  4345. return e.observe(n, {
  4346. characterData: !0
  4347. }),
  4348. function() {
  4349. n.data = t = ++t % 2
  4350. }
  4351. }() : X ? function() {
  4352. var t = new MessageChannel;
  4353. return t.port1.onmessage = o,
  4354. function() {
  4355. return t.port2.postMessage(0)
  4356. }
  4357. }() : void 0 === U ? function() {
  4358. try {
  4359. var t = st(4);
  4360. return B = t.runOnLoop || t.runOnContext,
  4361. r()
  4362. } catch (t) {
  4363. return i()
  4364. }
  4365. }() : i();
  4366. var Q = Math.random().toString(36).substring(16)
  4367. , J = void 0
  4368. , Z = 1
  4369. , tt = 2
  4370. , et = new C
  4371. , nt = new C
  4372. , rt = 0;
  4373. return A.prototype._enumerate = function(t) {
  4374. for (var e = 0; this._state === J && e < t.length; e++)
  4375. this._eachEntry(t[e], e)
  4376. }
  4377. ,
  4378. A.prototype._eachEntry = function(e, t) {
  4379. var n = this._instanceConstructor
  4380. , r = n.resolve;
  4381. if (r === a) {
  4382. var i = f(e);
  4383. if (i === s && e._state !== J)
  4384. this._settledAt(e._state, t, e._result);
  4385. else if ("function" != typeof i)
  4386. this._remaining--,
  4387. this._result[t] = e;
  4388. else if (n === M) {
  4389. var o = new n(u);
  4390. m(o, e, i),
  4391. this._willSettleAt(o, t)
  4392. } else
  4393. this._willSettleAt(new n(function(t) {
  4394. return t(e)
  4395. }
  4396. ), t)
  4397. } else
  4398. this._willSettleAt(r(e), t)
  4399. }
  4400. ,
  4401. A.prototype._settledAt = function(t, e, n) {
  4402. var r = this.promise;
  4403. r._state === J && (this._remaining--,
  4404. t === tt ? w(r, n) : this._result[e] = n),
  4405. 0 === this._remaining && b(r, this._result)
  4406. }
  4407. ,
  4408. A.prototype._willSettleAt = function(t, e) {
  4409. var n = this;
  4410. _(t, void 0, function(t) {
  4411. return n._settledAt(Z, e, t)
  4412. }, function(t) {
  4413. return n._settledAt(tt, e, t)
  4414. })
  4415. }
  4416. ,
  4417. M.all = j,
  4418. M.race = P,
  4419. M.resolve = a,
  4420. M.reject = N,
  4421. M._setScheduler = t,
  4422. M._setAsap = e,
  4423. M._asap = z,
  4424. M.prototype = {
  4425. constructor: M,
  4426. then: s,
  4427. catch: function(t) {
  4428. return this.then(null, t)
  4429. }
  4430. },
  4431. M.polyfill = W,
  4432. M.Promise = M
  4433. }()
  4434. }
  4435. ).call(e, st(2), st(3))
  4436. }
  4437. , function(t, e) {
  4438. function n() {
  4439. throw new Error("setTimeout has not been defined")
  4440. }
  4441. function r() {
  4442. throw new Error("clearTimeout has not been defined")
  4443. }
  4444. function i(e) {
  4445. if (c === setTimeout)
  4446. return setTimeout(e, 0);
  4447. if ((c === n || !c) && setTimeout)
  4448. return c = setTimeout,
  4449. setTimeout(e, 0);
  4450. try {
  4451. return c(e, 0)
  4452. } catch (t) {
  4453. try {
  4454. return c.call(null, e, 0)
  4455. } catch (t) {
  4456. return c.call(this, e, 0)
  4457. }
  4458. }
  4459. }
  4460. function o() {
  4461. p && h && (p = !1,
  4462. h.length ? f = h.concat(f) : d = -1,
  4463. f.length && s())
  4464. }
  4465. function s() {
  4466. if (!p) {
  4467. var t = i(o);
  4468. p = !0;
  4469. for (var e = f.length; e;) {
  4470. for (h = f,
  4471. f = []; ++d < e;)
  4472. h && h[d].run();
  4473. d = -1,
  4474. e = f.length
  4475. }
  4476. h = null,
  4477. p = !1,
  4478. function(e) {
  4479. if (l === clearTimeout)
  4480. return clearTimeout(e);
  4481. if ((l === r || !l) && clearTimeout)
  4482. return l = clearTimeout,
  4483. clearTimeout(e);
  4484. try {
  4485. l(e)
  4486. } catch (t) {
  4487. try {
  4488. return l.call(null, e)
  4489. } catch (t) {
  4490. return l.call(this, e)
  4491. }
  4492. }
  4493. }(t)
  4494. }
  4495. }
  4496. function a(t, e) {
  4497. this.fun = t,
  4498. this.array = e
  4499. }
  4500. function u() { }
  4501. var c, l, t = t.exports = {};
  4502. !function() {
  4503. try {
  4504. c = "function" == typeof setTimeout ? setTimeout : n
  4505. } catch (t) {
  4506. c = n
  4507. }
  4508. try {
  4509. l = "function" == typeof clearTimeout ? clearTimeout : r
  4510. } catch (t) {
  4511. l = r
  4512. }
  4513. }();
  4514. var h, f = [], p = !1, d = -1;
  4515. t.nextTick = function(t) {
  4516. var e = new Array(arguments.length - 1);
  4517. if (1 < arguments.length)
  4518. for (var n = 1; n < arguments.length; n++)
  4519. e[n - 1] = arguments[n];
  4520. f.push(new a(t, e)),
  4521. 1 !== f.length || p || i(s)
  4522. }
  4523. ,
  4524. a.prototype.run = function() {
  4525. this.fun.apply(null, this.array)
  4526. }
  4527. ,
  4528. t.title = "browser",
  4529. t.browser = !0,
  4530. t.env = {},
  4531. t.argv = [],
  4532. t.version = "",
  4533. t.versions = {},
  4534. t.on = u,
  4535. t.addListener = u,
  4536. t.once = u,
  4537. t.off = u,
  4538. t.removeListener = u,
  4539. t.removeAllListeners = u,
  4540. t.emit = u,
  4541. t.prependListener = u,
  4542. t.prependOnceListener = u,
  4543. t.listeners = function(t) {
  4544. return []
  4545. }
  4546. ,
  4547. t.binding = function(t) {
  4548. throw new Error("process.binding is not supported")
  4549. }
  4550. ,
  4551. t.cwd = function() {
  4552. return "/"
  4553. }
  4554. ,
  4555. t.chdir = function(t) {
  4556. throw new Error("process.chdir is not supported")
  4557. }
  4558. ,
  4559. t.umask = function() {
  4560. return 0
  4561. }
  4562. }
  4563. , function(t, e) {
  4564. var n = function() {
  4565. return this
  4566. }();
  4567. try {
  4568. n = n || Function("return this")() || (0,
  4569. eval)("this")
  4570. } catch (t) {
  4571. "object" == typeof window && (n = window)
  4572. }
  4573. t.exports = n
  4574. }
  4575. , function(t, e) { }
  4576. , function(t, e, n) {
  4577. "use strict";
  4578. Object.defineProperty(e, "__esModule", {
  4579. value: !0
  4580. });
  4581. var r = ["text/plain", "text/html"]
  4582. , i = function() {
  4583. (console.warn || console.log).call(arguments)
  4584. }
  4585. .bind(console, "[clipboard-polyfill]")
  4586. , o = !0;
  4587. e.suppressDTWarnings = function() {
  4588. o = !1
  4589. }
  4590. ;
  4591. var s = (a.prototype.setData = function(t, e) {
  4592. o && -1 === r.indexOf(t) && i("Unknown data type: " + t, "Call clipboard.suppressWarnings() to suppress this warning."),
  4593. this.m[t] = e
  4594. }
  4595. ,
  4596. a.prototype.getData = function(t) {
  4597. return this.m[t]
  4598. }
  4599. ,
  4600. a.prototype.forEach = function(t) {
  4601. for (var e in this.m)
  4602. t(this.m[e], e)
  4603. }
  4604. ,
  4605. a);
  4606. function a() {
  4607. this.m = {}
  4608. }
  4609. e.DT = s
  4610. }
  4611. ],
  4612. r.c = i,
  4613. r.d = function(t, e, n) {
  4614. r.o(t, e) || Object.defineProperty(t, e, {
  4615. configurable: !1,
  4616. enumerable: !0,
  4617. get: n
  4618. })
  4619. }
  4620. ,
  4621. r.n = function(t) {
  4622. var e = t && t.__esModule ? function() {
  4623. return t.default
  4624. }
  4625. : function() {
  4626. return t
  4627. }
  4628. ;
  4629. return r.d(e, "a", e),
  4630. e
  4631. }
  4632. ,
  4633. r.o = function(t, e) {
  4634. return Object.prototype.hasOwnProperty.call(t, e)
  4635. }
  4636. ,
  4637. r.p = "",
  4638. r(r.s = 0);
  4639. function r(t) {
  4640. if (i[t])
  4641. return i[t].exports;
  4642. var e = i[t] = {
  4643. i: t,
  4644. l: !1,
  4645. exports: {}
  4646. };
  4647. return n[t].call(e.exports, e, e.exports, r),
  4648. e.l = !0,
  4649. e.exports
  4650. }
  4651. var n, i
  4652. }),
  4653. function(t) {
  4654. "use strict";
  4655. "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports && "object" == typeof module ? module.exports = t(require("jquery")) : t(jQuery)
  4656. }(function(It, jt) {
  4657. "use strict";
  4658. var t, Pt = {
  4659. beforeShow: n,
  4660. move: n,
  4661. change: n,
  4662. show: n,
  4663. hide: n,
  4664. color: !1,
  4665. flat: !1,
  4666. showInput: !1,
  4667. allowEmpty: !1,
  4668. showButtons: !0,
  4669. clickoutFiresChange: !0,
  4670. showInitial: !1,
  4671. showPalette: !1,
  4672. showPaletteOnly: !1,
  4673. hideAfterPaletteSelect: !1,
  4674. togglePaletteOnly: !1,
  4675. showSelectionPalette: !0,
  4676. localStorageKey: !1,
  4677. appendTo: "body",
  4678. maxSelectionSize: 7,
  4679. cancelText: "cancel",
  4680. chooseText: "choose",
  4681. togglePaletteMoreText: "more",
  4682. togglePaletteLessText: "less",
  4683. clearText: "Clear Color Selection",
  4684. noColorSelectedText: "No Color Selected",
  4685. preferredFormat: !1,
  4686. className: "",
  4687. containerClassName: "",
  4688. replacerClassName: "",
  4689. showAlpha: !1,
  4690. theme: "sp-light",
  4691. palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
  4692. selectionPalette: [],
  4693. disabled: !1,
  4694. offset: null
  4695. }, Nt = [], Dt = !!/msie/i.exec(window.navigator.userAgent), Rt = ((t = document.createElement("div").style).cssText = "background-color:rgba(0,0,0,.5)",
  4696. e(t.backgroundColor, "rgba") || e(t.backgroundColor, "hsla")), Mt = ["<div class='sp-replacer'>", "<div class='sp-preview'><div class='sp-preview-inner'></div></div>", "<div class='sp-dd'>&#9660;</div>", "</div>"].join(""), Wt = function() {
  4697. var t = "";
  4698. if (Dt)
  4699. for (var e = 1; e <= 6; e++)
  4700. t += "<div class='sp-" + e + "'></div>";
  4701. return ["<div class='sp-container sp-hidden'>", "<div class='sp-palette-container'>", "<div class='sp-palette sp-thumb sp-cf'></div>", "<div class='sp-palette-button-container sp-cf'>", "<button type='button' class='sp-palette-toggle'></button>", "</div>", "</div>", "<div class='sp-picker-container'>", "<div class='sp-top sp-cf'>", "<div class='sp-fill'></div>", "<div class='sp-top-inner'>", "<div class='sp-color'>", "<div class='sp-sat'>", "<div class='sp-val'>", "<div class='sp-dragger'></div>", "</div>", "</div>", "</div>", "<div class='sp-clear sp-clear-display'>", "</div>", "<div class='sp-hue'>", "<div class='sp-slider'></div>", t, "</div>", "</div>", "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>", "</div>", "<div class='sp-input-container sp-cf'>", "<input class='sp-input formulaInputFocus' type='text' spellcheck='false' />", "</div>", "<div class='sp-initial sp-thumb sp-cf'></div>", "<div class='sp-button-container sp-cf'>", "<a class='sp-cancel' href='#'></a>", "<button type='button' class='sp-choose'></button>", "</div>", "</div>", "</div>"].join("")
  4702. }();
  4703. function e(t, e) {
  4704. return !!~("" + t).indexOf(e)
  4705. }
  4706. function Lt(t, e, n, r) {
  4707. for (var i = [], o = 0; o < t.length; o++) {
  4708. var s, a, u, c = t[o];
  4709. c ? (a = (s = tinycolor(c)).toHsl().l < .5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light",
  4710. a += tinycolor.equals(e, c) ? " sp-thumb-active" : "",
  4711. u = s.toString(r.preferredFormat || "rgb"),
  4712. c = Rt ? "background-color:" + s.toRgbString() : "filter:" + s.toFilter(),
  4713. i.push('<span title="' + u + '" data-color="' + s.toRgbString() + '" class="' + a + '"><span class="sp-thumb-inner" style="' + c + ';" /></span>')) : i.push(It("<div />").append(It('<span data-color="" style="background-color:transparent;" class="sp-clear-display"></span>').attr("title", r.noColorSelectedText)).html())
  4714. }
  4715. return "<div class='sp-cf " + n + "'>" + i.join("") + "</div>"
  4716. }
  4717. function n() { }
  4718. function Ft(t) {
  4719. t.stopPropagation()
  4720. }
  4721. function Ht(t, e) {
  4722. var n = Array.prototype.slice
  4723. , r = n.call(arguments, 2);
  4724. return function() {
  4725. return t.apply(e, r.concat(n.call(arguments)))
  4726. }
  4727. }
  4728. function Bt(r, i, e, t) {
  4729. i = i || function() { }
  4730. ,
  4731. e = e || function() { }
  4732. ,
  4733. t = t || function() { }
  4734. ;
  4735. var o = document
  4736. , s = !1
  4737. , a = {}
  4738. , u = 0
  4739. , c = 0
  4740. , l = "ontouchstart" in window
  4741. , n = {};
  4742. function h(t) {
  4743. t.stopPropagation && t.stopPropagation(),
  4744. t.preventDefault && t.preventDefault(),
  4745. t.returnValue = !1
  4746. }
  4747. function f(t) {
  4748. if (s) {
  4749. if (Dt && o.documentMode < 9 && !t.button)
  4750. return p();
  4751. var e = t.originalEvent && t.originalEvent.touches && t.originalEvent.touches[0]
  4752. , n = e && e.pageX || t.pageX
  4753. , e = e && e.pageY || t.pageY
  4754. , n = Math.max(0, Math.min(n - a.left, c))
  4755. , e = Math.max(0, Math.min(e - a.top, u));
  4756. l && h(t),
  4757. i.apply(r, [n, e, t])
  4758. }
  4759. }
  4760. function p() {
  4761. s && (It(o).unbind(n),
  4762. It(o.body).removeClass("sp-dragging"),
  4763. setTimeout(function() {
  4764. t.apply(r, arguments)
  4765. }, 0)),
  4766. s = !1
  4767. }
  4768. n.selectstart = h,
  4769. n.dragstart = h,
  4770. n["touchmove mousemove"] = f,
  4771. n["touchend mouseup"] = p,
  4772. It(r).bind("touchstart mousedown", function(t) {
  4773. (t.which ? 3 == t.which : 2 == t.button) || s || !1 !== e.apply(r, arguments) && (s = !0,
  4774. u = It(r).height(),
  4775. c = It(r).width(),
  4776. a = It(r).offset(),
  4777. It(o).bind(n),
  4778. It(o.body).addClass("sp-dragging"),
  4779. f(t),
  4780. h(t))
  4781. })
  4782. }
  4783. function qt() {
  4784. return It.fn.spectrum.inputTypeColorSupport()
  4785. }
  4786. var o = "spectrum.id";
  4787. It.fn.spectrum = function(n, t) {
  4788. if ("string" != typeof n)
  4789. return this.spectrum("destroy").each(function() {
  4790. var t = function(t, e) {
  4791. var n, r, i, a = (i = t,
  4792. (e = It.extend({}, Pt, e)).callbacks = {
  4793. move: Ht(e.move, i),
  4794. change: Ht(e.change, i),
  4795. show: Ht(e.show, i),
  4796. hide: Ht(e.hide, i),
  4797. beforeShow: Ht(e.beforeShow, i)
  4798. },
  4799. e), u = a.flat, o = a.showSelectionPalette, s = a.localStorageKey, e = a.theme, c = a.callbacks, l = (n = Et,
  4800. function() {
  4801. var t = this
  4802. , e = arguments;
  4803. r = r || setTimeout(function() {
  4804. r = null,
  4805. n.apply(t, e)
  4806. }, 10)
  4807. }
  4808. ), h = !10, f = !1, p = 0, d = 0, g = 0, m = 0, v = 0, y = 0, b = 0, w = 0, _ = 0, x = 0, C = 1, k = [], S = [], O = {}, E = a.selectionPalette.slice(0), T = a.maxSelectionSize, A = "sp-dragging", I = null, j = t.ownerDocument, P = (j.body,
  4809. It(t)), N = !1, D = It(Wt, j).addClass(e), R = D.find(".sp-picker-container"), M = D.find(".sp-color"), W = D.find(".sp-dragger"), L = D.find(".sp-hue"), F = D.find(".sp-slider"), H = D.find(".sp-alpha-inner"), B = D.find(".sp-alpha"), q = D.find(".sp-alpha-handle"), z = D.find(".sp-input"), U = D.find(".sp-palette"), G = D.find(".sp-initial"), V = D.find(".sp-cancel"), $ = D.find(".sp-clear"), X = D.find(".sp-choose"), Y = D.find(".sp-palette-toggle"), K = P.is("input"), t = K && "color" === P.attr("type") && qt(), Q = K && !u, J = Q ? It(Mt).addClass(e).addClass(a.className).addClass(a.replacerClassName) : It([]), Z = Q ? J : P, tt = J.find(".sp-preview-inner"), et = a.color || K && P.val(), nt = !1, rt = a.preferredFormat, it = !a.showButtons || a.clickoutFiresChange, ot = !et, st = a.allowEmpty && !t;
  4810. function at() {
  4811. if (a.showPaletteOnly && (a.showPalette = !0),
  4812. Y.text(a.showPaletteOnly ? a.togglePaletteMoreText : a.togglePaletteLessText),
  4813. a.palette) {
  4814. k = a.palette.slice(0),
  4815. S = It.isArray(k[0]) ? k : [k],
  4816. O = {};
  4817. for (var t = 0; t < S.length; t++)
  4818. for (var e = 0; e < S[t].length; e++) {
  4819. var n = tinycolor(S[t][e]).toRgbString();
  4820. O[n] = !0
  4821. }
  4822. }
  4823. D.toggleClass("sp-flat", u),
  4824. D.toggleClass("sp-input-disabled", !a.showInput),
  4825. D.toggleClass("sp-alpha-enabled", a.showAlpha),
  4826. D.toggleClass("sp-clear-enabled", st),
  4827. D.toggleClass("sp-buttons-disabled", !a.showButtons),
  4828. D.toggleClass("sp-palette-buttons-disabled", !a.togglePaletteOnly),
  4829. D.toggleClass("sp-palette-disabled", !a.showPalette),
  4830. D.toggleClass("sp-palette-only", a.showPaletteOnly),
  4831. D.toggleClass("sp-initial-disabled", !a.showInitial),
  4832. D.addClass(a.className).addClass(a.containerClassName),
  4833. Et()
  4834. }
  4835. function ut() {
  4836. if (s && window.localStorage) {
  4837. try {
  4838. var t = window.localStorage[s].split(",#");
  4839. 1 < t.length && (delete window.localStorage[s],
  4840. It.each(t, function(t, e) {
  4841. ct(e)
  4842. }))
  4843. } catch (t) { }
  4844. try {
  4845. E = window.localStorage[s].split(";")
  4846. } catch (t) { }
  4847. }
  4848. }
  4849. function ct(t) {
  4850. if (o) {
  4851. var e = tinycolor(t).toRgbString();
  4852. if (!O[e] && -1 === It.inArray(e, E))
  4853. for (E.push(e); E.length > T;)
  4854. E.shift();
  4855. if (s && window.localStorage)
  4856. try {
  4857. window.localStorage[s] = E.join(";")
  4858. } catch (t) { }
  4859. }
  4860. }
  4861. function lt() {
  4862. var n = xt()
  4863. , t = It.map(S, function(t, e) {
  4864. return Lt(t, n, "sp-palette-row sp-palette-row-" + e, a)
  4865. });
  4866. ut(),
  4867. E && t.push(Lt(function() {
  4868. var t = [];
  4869. if (a.showPalette)
  4870. for (var e = 0; e < E.length; e++) {
  4871. var n = tinycolor(E[e]).toRgbString();
  4872. O[n] || t.push(E[e])
  4873. }
  4874. return t.reverse().slice(0, a.maxSelectionSize)
  4875. }(), n, "sp-palette-row sp-palette-row-selection", a)),
  4876. U.html(t.join(""))
  4877. }
  4878. function ht() {
  4879. var t, e;
  4880. a.showInitial && (t = nt,
  4881. e = xt(),
  4882. G.html(Lt([t, e], e, "sp-palette-row-initial", a)))
  4883. }
  4884. function ft() {
  4885. (d <= 0 || p <= 0 || m <= 0) && Et(),
  4886. f = !0,
  4887. D.addClass(A),
  4888. I = null,
  4889. P.trigger("dragstart.spectrum", [xt()])
  4890. }
  4891. function pt() {
  4892. f = !1,
  4893. D.removeClass(A),
  4894. P.trigger("dragstop.spectrum", [xt()])
  4895. }
  4896. function dt() {
  4897. var t = z.val();
  4898. null !== t && "" !== t || !st ? (t = tinycolor(t)).isValid() ? (_t(t),
  4899. Ot(!0)) : z.addClass("sp-validation-error") : (_t(null),
  4900. Ot(!0))
  4901. }
  4902. function gt() {
  4903. (h ? bt : mt)()
  4904. }
  4905. function mt() {
  4906. var t = It.Event("beforeShow.spectrum");
  4907. h ? Et() : (P.trigger(t, [xt()]),
  4908. !1 === c.beforeShow(xt()) || t.isDefaultPrevented() || (function() {
  4909. for (var t = 0; t < Nt.length; t++)
  4910. Nt[t] && Nt[t].hide()
  4911. }(),
  4912. h = !0,
  4913. It(j).bind("keydown.spectrum", vt),
  4914. It(j).bind("click.spectrum", yt),
  4915. It(window).bind("resize.spectrum", l),
  4916. J.addClass("sp-active"),
  4917. D.removeClass("sp-hidden"),
  4918. Et(),
  4919. kt(),
  4920. nt = xt(),
  4921. ht(),
  4922. c.show(nt),
  4923. P.trigger("show.spectrum", [nt])))
  4924. }
  4925. function vt(t) {
  4926. 27 === t.keyCode && bt()
  4927. }
  4928. function yt(t) {
  4929. 2 != t.button && (f || (it ? Ot(!0) : wt(),
  4930. bt()))
  4931. }
  4932. function bt() {
  4933. h && !u && (h = !1,
  4934. It(j).unbind("keydown.spectrum", vt),
  4935. It(j).unbind("click.spectrum", yt),
  4936. It(window).unbind("resize.spectrum", l),
  4937. J.removeClass("sp-active"),
  4938. D.addClass("sp-hidden"),
  4939. c.hide(xt()),
  4940. P.trigger("hide.spectrum", [xt()]))
  4941. }
  4942. function wt() {
  4943. _t(nt, !0)
  4944. }
  4945. function _t(t, e) {
  4946. var n;
  4947. tinycolor.equals(t, xt()) ? kt() : (!t && st ? ot = !0 : (ot = !1,
  4948. t = (n = tinycolor(t)).toHsv(),
  4949. w = t.h % 360 / 360,
  4950. _ = t.s,
  4951. x = t.v,
  4952. C = t.a),
  4953. kt(),
  4954. n && n.isValid() && !e && (rt = a.preferredFormat || n.getFormat()))
  4955. }
  4956. function xt(t) {
  4957. return t = t || {},
  4958. st && ot ? null : tinycolor.fromRatio({
  4959. h: w,
  4960. s: _,
  4961. v: x,
  4962. a: Math.round(100 * C) / 100
  4963. }, {
  4964. format: t.format || rt
  4965. })
  4966. }
  4967. function Ct() {
  4968. kt(),
  4969. c.move(xt()),
  4970. P.trigger("move.spectrum", [xt()])
  4971. }
  4972. function kt() {
  4973. z.removeClass("sp-validation-error"),
  4974. St();
  4975. var t = tinycolor.fromRatio({
  4976. h: w,
  4977. s: 1,
  4978. v: 1
  4979. });
  4980. M.css("background-color", t.toHexString());
  4981. var e = rt;
  4982. C < 1 && (0 !== C || "name" !== e) && ("hex" !== e && "hex3" !== e && "hex6" !== e && "name" !== e || (e = "rgb"));
  4983. var n, r, i = xt({
  4984. format: e
  4985. }), o = "";
  4986. tt.removeClass("sp-clear-display"),
  4987. tt.css("background-color", "transparent"),
  4988. !i && st ? tt.addClass("sp-clear-display") : (n = i.toHexString(),
  4989. r = i.toRgbString(),
  4990. Rt || 1 === i.alpha ? tt.css("background-color", r) : (tt.css("background-color", "transparent"),
  4991. tt.css("filter", i.toFilter())),
  4992. a.showAlpha && ((t = i.toRgb()).a = 0,
  4993. t = "linear-gradient(left, " + (r = tinycolor(t).toRgbString()) + ", " + n + ")",
  4994. Dt ? H.css("filter", tinycolor(r).toFilter({
  4995. gradientType: 1
  4996. }, n)) : (H.css("background", "-webkit-" + t),
  4997. H.css("background", "-moz-" + t),
  4998. H.css("background", "-ms-" + t),
  4999. H.css("background", "linear-gradient(to right, " + r + ", " + n + ")"))),
  5000. o = i.toString(e)),
  5001. a.showInput && z.val(o),
  5002. a.showPalette && lt(),
  5003. ht()
  5004. }
  5005. function St() {
  5006. var t = _
  5007. , e = x;
  5008. st && ot ? (q.hide(),
  5009. F.hide(),
  5010. W.hide()) : (q.show(),
  5011. F.show(),
  5012. W.show(),
  5013. t = t * p,
  5014. e = d - e * d,
  5015. t = Math.max(-g, Math.min(p - g, t - g)),
  5016. e = Math.max(-g, Math.min(d - g, e - g)),
  5017. W.css({
  5018. top: e + "px",
  5019. left: t + "px"
  5020. }),
  5021. t = C * v,
  5022. q.css({
  5023. left: t - y / 2 + "px"
  5024. }),
  5025. t = w * m,
  5026. F.css({
  5027. top: t - b + "px"
  5028. }))
  5029. }
  5030. function Ot(t) {
  5031. var e = xt()
  5032. , n = "";
  5033. e && (n = e.toString(rt),
  5034. ct(e)),
  5035. K && P.val(n),
  5036. t && (c.change(e),
  5037. P.trigger("change", [e]))
  5038. }
  5039. function Et() {
  5040. var t, e, n, r, i, o, s;
  5041. h && (p = M.width(),
  5042. d = M.height(),
  5043. g = W.height(),
  5044. L.width(),
  5045. m = L.height(),
  5046. b = F.height(),
  5047. v = B.width(),
  5048. y = q.width(),
  5049. u || (D.css("position", "absolute"),
  5050. a.offset ? D.offset(a.offset) : D.offset((s = Z,
  5051. t = (i = D).outerWidth(),
  5052. e = i.outerHeight(),
  5053. n = s.outerHeight(),
  5054. i = (r = (o = i[0].ownerDocument).documentElement).clientWidth + It(o).scrollLeft(),
  5055. o = r.clientHeight + It(o).scrollTop(),
  5056. (s = s.offset()).top += n,
  5057. s.left -= Math.min(s.left, s.left + t > i && t < i ? Math.abs(s.left + t - i) : 0),
  5058. s.top -= Math.min(s.top, s.top + e > o && e < o ? Math.abs(+(e + n)) : 0),
  5059. s))),
  5060. St(),
  5061. a.showPalette && lt(),
  5062. P.trigger("reflow.spectrum"))
  5063. }
  5064. function Tt() {
  5065. bt(),
  5066. N = !0,
  5067. P.attr("disabled", !0),
  5068. Z.addClass("sp-disabled")
  5069. }
  5070. !function() {
  5071. function t(t) {
  5072. return t.data && t.data.ignore ? (_t(It(t.target).closest(".sp-thumb-el").data("color")),
  5073. Ct()) : (_t(It(t.target).closest(".sp-thumb-el").data("color")),
  5074. Ct(),
  5075. Ot(!0),
  5076. a.hideAfterPaletteSelect && bt()),
  5077. !1
  5078. }
  5079. Dt && D.find("*:not(input)").attr("unselectable", "on"),
  5080. at(),
  5081. Q && P.after(J).hide(),
  5082. st || $.hide(),
  5083. u ? P.after(D).hide() : (1 !== (e = "parent" === a.appendTo ? P.parent() : It(a.appendTo)).length && (e = It("body")),
  5084. e.append(D)),
  5085. ut(),
  5086. Z.bind("click.spectrum touchstart.spectrum", function(t) {
  5087. N || gt(),
  5088. t.stopPropagation(),
  5089. It(t.target).is("input") || t.preventDefault()
  5090. }),
  5091. !P.is(":disabled") && !0 !== a.disabled || Tt(),
  5092. D.click(Ft),
  5093. z.change(dt),
  5094. z.bind("paste", function() {
  5095. setTimeout(dt, 1)
  5096. }),
  5097. z.keydown(function(t) {
  5098. 13 == t.keyCode && dt()
  5099. }),
  5100. V.text(a.cancelText),
  5101. V.bind("click.spectrum", function(t) {
  5102. t.stopPropagation(),
  5103. t.preventDefault(),
  5104. wt(),
  5105. bt()
  5106. }),
  5107. $.attr("title", a.clearText),
  5108. $.bind("click.spectrum", function(t) {
  5109. t.stopPropagation(),
  5110. t.preventDefault(),
  5111. ot = !0,
  5112. Ct(),
  5113. u && Ot(!0)
  5114. }),
  5115. X.text(a.chooseText),
  5116. X.bind("click.spectrum", function(t) {
  5117. t.stopPropagation(),
  5118. t.preventDefault(),
  5119. Dt && z.is(":focus") && z.trigger("change"),
  5120. z.hasClass("sp-validation-error") || (Ot(!0),
  5121. bt())
  5122. }),
  5123. Y.text(a.showPaletteOnly ? a.togglePaletteMoreText : a.togglePaletteLessText),
  5124. Y.bind("click.spectrum", function(t) {
  5125. t.stopPropagation(),
  5126. t.preventDefault(),
  5127. a.showPaletteOnly = !a.showPaletteOnly,
  5128. a.showPaletteOnly || u || D.css("left", "-=" + (R.outerWidth(!0) + 5)),
  5129. at()
  5130. }),
  5131. Bt(B, function(t, e, n) {
  5132. C = t / v,
  5133. ot = !1,
  5134. n.shiftKey && (C = Math.round(10 * C) / 10),
  5135. Ct()
  5136. }, ft, pt),
  5137. Bt(L, function(t, e) {
  5138. w = parseFloat(e / m),
  5139. ot = !1,
  5140. a.showAlpha || (C = 1),
  5141. Ct()
  5142. }, ft, pt),
  5143. Bt(M, function(t, e, n) {
  5144. n.shiftKey ? I || (n = _ * p,
  5145. r = d - x * d,
  5146. r = Math.abs(t - n) > Math.abs(e - r),
  5147. I = r ? "x" : "y") : I = null;
  5148. var r = !I || "y" === I;
  5149. I && "x" !== I || (_ = parseFloat(t / p)),
  5150. r && (x = parseFloat((d - e) / d)),
  5151. ot = !1,
  5152. a.showAlpha || (C = 1),
  5153. Ct()
  5154. }, ft, pt),
  5155. et ? (_t(et),
  5156. kt(),
  5157. rt = a.preferredFormat || tinycolor(et).format,
  5158. ct(et)) : kt(),
  5159. u && mt();
  5160. var e = Dt ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum";
  5161. U.delegate(".sp-thumb-el", e, t),
  5162. G.delegate(".sp-thumb-el:nth-child(1)", e, {
  5163. ignore: !0
  5164. }, t)
  5165. }();
  5166. var At = {
  5167. show: mt,
  5168. hide: bt,
  5169. toggle: gt,
  5170. reflow: Et,
  5171. option: function(t, e) {
  5172. return t === jt ? It.extend({}, a) : e === jt ? a[t] : (a[t] = e,
  5173. "preferredFormat" === t && (rt = a.preferredFormat),
  5174. void at())
  5175. },
  5176. enable: function() {
  5177. N = !1,
  5178. P.attr("disabled", !1),
  5179. Z.removeClass("sp-disabled")
  5180. },
  5181. disable: Tt,
  5182. offset: function(t) {
  5183. a.offset = t,
  5184. Et()
  5185. },
  5186. set: function(t) {
  5187. _t(t),
  5188. Ot()
  5189. },
  5190. get: xt,
  5191. destroy: function() {
  5192. P.show(),
  5193. Z.unbind("click.spectrum touchstart.spectrum"),
  5194. D.remove(),
  5195. J.remove(),
  5196. Nt[At.id] = null
  5197. },
  5198. container: D
  5199. };
  5200. return At.id = Nt.push(At) - 1,
  5201. At
  5202. }(this, It.extend({}, n, It(this).data()));
  5203. It(this).data(o, t.id)
  5204. });
  5205. var r = this
  5206. , i = Array.prototype.slice.call(arguments, 1);
  5207. return this.each(function() {
  5208. var t = Nt[It(this).data(o)];
  5209. if (t) {
  5210. var e = t[n];
  5211. if (!e)
  5212. throw new Error("Spectrum: no such method: '" + n + "'");
  5213. "get" == n ? r = t.get() : "container" == n ? r = t.container : "option" == n ? r = t.option.apply(t, i) : "destroy" == n ? (t.destroy(),
  5214. It(this).removeData(o)) : e.apply(t, i)
  5215. }
  5216. }),
  5217. r
  5218. }
  5219. ,
  5220. It.fn.spectrum.load = !0,
  5221. It.fn.spectrum.loadOpts = {},
  5222. It.fn.spectrum.draggable = Bt,
  5223. It.fn.spectrum.defaults = Pt,
  5224. It.fn.spectrum.inputTypeColorSupport = function t() {
  5225. var e;
  5226. return void 0 === t._cachedResult && (e = It("<input type='color'/>")[0],
  5227. t._cachedResult = "color" === e.type && "" !== e.value),
  5228. t._cachedResult
  5229. }
  5230. ,
  5231. It.spectrum = {},
  5232. It.spectrum.localization = {},
  5233. It.spectrum.palettes = {},
  5234. It.fn.spectrum.processNativeColorInputs = function() {
  5235. var t = It("input[type=color]");
  5236. t.length && !qt() && t.spectrum({
  5237. preferredFormat: "hex6"
  5238. })
  5239. }
  5240. ,
  5241. function() {
  5242. var d = /^[\s,#]+/
  5243. , g = /\s+$/
  5244. , m = 0
  5245. , v = Math
  5246. , y = v.round
  5247. , b = v.min
  5248. , w = v.max
  5249. , t = v.random
  5250. , _ = function(t, e) {
  5251. if (e = e || {},
  5252. (t = t || "") instanceof _)
  5253. return t;
  5254. if (!(this instanceof _))
  5255. return new _(t, e);
  5256. var n, r, i, o, s, a, u, c, l, h, f, l = (c = {
  5257. r: 0,
  5258. g: 0,
  5259. b: 0
  5260. },
  5261. f = h = !(l = 1),
  5262. "string" == typeof (n = t) && (n = function(t) {
  5263. t = t.replace(d, "").replace(g, "").toLowerCase();
  5264. var e, n = !1;
  5265. if (O[t])
  5266. t = O[t],
  5267. n = !0;
  5268. else if ("transparent" == t)
  5269. return {
  5270. r: 0,
  5271. g: 0,
  5272. b: 0,
  5273. a: 0,
  5274. format: "name"
  5275. };
  5276. return (e = M.rgb.exec(t)) ? {
  5277. r: e[1],
  5278. g: e[2],
  5279. b: e[3]
  5280. } : (e = M.rgba.exec(t)) ? {
  5281. r: e[1],
  5282. g: e[2],
  5283. b: e[3],
  5284. a: e[4]
  5285. } : (e = M.hsl.exec(t)) ? {
  5286. h: e[1],
  5287. s: e[2],
  5288. l: e[3]
  5289. } : (e = M.hsla.exec(t)) ? {
  5290. h: e[1],
  5291. s: e[2],
  5292. l: e[3],
  5293. a: e[4]
  5294. } : (e = M.hsv.exec(t)) ? {
  5295. h: e[1],
  5296. s: e[2],
  5297. v: e[3]
  5298. } : (e = M.hsva.exec(t)) ? {
  5299. h: e[1],
  5300. s: e[2],
  5301. v: e[3],
  5302. a: e[4]
  5303. } : (e = M.hex8.exec(t)) ? {
  5304. a: j(e[1]) / 255,
  5305. r: j(e[2]),
  5306. g: j(e[3]),
  5307. b: j(e[4]),
  5308. format: n ? "name" : "hex8"
  5309. } : (e = M.hex6.exec(t)) ? {
  5310. r: j(e[1]),
  5311. g: j(e[2]),
  5312. b: j(e[3]),
  5313. format: n ? "name" : "hex"
  5314. } : !!(e = M.hex3.exec(t)) && {
  5315. r: j(e[1] + "" + e[1]),
  5316. g: j(e[2] + "" + e[2]),
  5317. b: j(e[3] + "" + e[3]),
  5318. format: n ? "name" : "hex"
  5319. }
  5320. }(n)),
  5321. "object" == typeof n && (n.hasOwnProperty("r") && n.hasOwnProperty("g") && n.hasOwnProperty("b") ? (s = n.r,
  5322. a = n.g,
  5323. u = n.b,
  5324. c = {
  5325. r: 255 * A(s, 255),
  5326. g: 255 * A(a, 255),
  5327. b: 255 * A(u, 255)
  5328. },
  5329. h = !0,
  5330. f = "%" === String(n.r).substr(-1) ? "prgb" : "rgb") : n.hasOwnProperty("h") && n.hasOwnProperty("s") && n.hasOwnProperty("v") ? (n.s = N(n.s),
  5331. n.v = N(n.v),
  5332. c = function(t, e, n) {
  5333. t = 6 * A(t, 360),
  5334. e = A(e, 100),
  5335. n = A(n, 100);
  5336. var r = v.floor(t)
  5337. , i = t - r
  5338. , o = n * (1 - e)
  5339. , t = n * (1 - i * e)
  5340. , e = n * (1 - (1 - i) * e)
  5341. , r = r % 6;
  5342. return {
  5343. r: 255 * [n, t, o, o, e, n][r],
  5344. g: 255 * [e, n, n, t, o, o][r],
  5345. b: 255 * [o, o, e, n, n, t][r]
  5346. }
  5347. }(n.h, n.s, n.v),
  5348. h = !0,
  5349. f = "hsv") : n.hasOwnProperty("h") && n.hasOwnProperty("s") && n.hasOwnProperty("l") && (n.s = N(n.s),
  5350. n.l = N(n.l),
  5351. s = n.h,
  5352. a = n.s,
  5353. u = n.l,
  5354. s = A(s, 360),
  5355. a = A(a, 100),
  5356. u = A(u, 100),
  5357. 0 === a ? r = i = o = u : (r = p(a = 2 * u - (u = u < .5 ? u * (1 + a) : u + a - u * a), u, s + 1 / 3),
  5358. i = p(a, u, s),
  5359. o = p(a, u, s - 1 / 3)),
  5360. c = {
  5361. r: 255 * r,
  5362. g: 255 * i,
  5363. b: 255 * o
  5364. },
  5365. h = !0,
  5366. f = "hsl"),
  5367. n.hasOwnProperty("a") && (l = n.a)),
  5368. l = T(l),
  5369. {
  5370. ok: h,
  5371. format: n.format || f,
  5372. r: b(255, w(c.r, 0)),
  5373. g: b(255, w(c.g, 0)),
  5374. b: b(255, w(c.b, 0)),
  5375. a: l
  5376. });
  5377. function p(t, e, n) {
  5378. return n < 0 && (n += 1),
  5379. 1 < n && --n,
  5380. n < 1 / 6 ? t + 6 * (e - t) * n : n < .5 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t
  5381. }
  5382. this._originalInput = t,
  5383. this._r = l.r,
  5384. this._g = l.g,
  5385. this._b = l.b,
  5386. this._a = l.a,
  5387. this._roundA = y(100 * this._a) / 100,
  5388. this._format = e.format || l.format,
  5389. this._gradientType = e.gradientType,
  5390. this._r < 1 && (this._r = y(this._r)),
  5391. this._g < 1 && (this._g = y(this._g)),
  5392. this._b < 1 && (this._b = y(this._b)),
  5393. this._ok = l.ok,
  5394. this._tc_id = m++
  5395. };
  5396. function r(t, e, n) {
  5397. t = A(t, 255),
  5398. e = A(e, 255),
  5399. n = A(n, 255);
  5400. var r, i = w(t, e, n), o = b(t, e, n), s = (i + o) / 2;
  5401. if (i == o)
  5402. r = u = 0;
  5403. else {
  5404. var a = i - o
  5405. , u = .5 < s ? a / (2 - i - o) : a / (i + o);
  5406. switch (i) {
  5407. case t:
  5408. r = (e - n) / a + (e < n ? 6 : 0);
  5409. break;
  5410. case e:
  5411. r = (n - t) / a + 2;
  5412. break;
  5413. case n:
  5414. r = (t - e) / a + 4
  5415. }
  5416. r /= 6
  5417. }
  5418. return {
  5419. h: r,
  5420. s: u,
  5421. l: s
  5422. }
  5423. }
  5424. function i(t, e, n) {
  5425. t = A(t, 255),
  5426. e = A(e, 255),
  5427. n = A(n, 255);
  5428. var r, i = w(t, e, n), o = b(t, e, n), s = i, a = i - o, u = 0 === i ? 0 : a / i;
  5429. if (i == o)
  5430. r = 0;
  5431. else {
  5432. switch (i) {
  5433. case t:
  5434. r = (e - n) / a + (e < n ? 6 : 0);
  5435. break;
  5436. case e:
  5437. r = (n - t) / a + 2;
  5438. break;
  5439. case n:
  5440. r = (t - e) / a + 4
  5441. }
  5442. r /= 6
  5443. }
  5444. return {
  5445. h: r,
  5446. s: u,
  5447. v: s
  5448. }
  5449. }
  5450. function e(t, e, n, r) {
  5451. n = [P(y(t).toString(16)), P(y(e).toString(16)), P(y(n).toString(16))];
  5452. return r && n[0].charAt(0) == n[0].charAt(1) && n[1].charAt(0) == n[1].charAt(1) && n[2].charAt(0) == n[2].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("")
  5453. }
  5454. function o(t, e, n, r) {
  5455. return [P(Math.round(255 * parseFloat(r)).toString(16)), P(y(t).toString(16)), P(y(e).toString(16)), P(y(n).toString(16))].join("")
  5456. }
  5457. function n(t, e) {
  5458. e = 0 === e ? 0 : e || 10;
  5459. t = _(t).toHsl();
  5460. return t.s -= e / 100,
  5461. t.s = I(t.s),
  5462. _(t)
  5463. }
  5464. function s(t, e) {
  5465. e = 0 === e ? 0 : e || 10;
  5466. t = _(t).toHsl();
  5467. return t.s += e / 100,
  5468. t.s = I(t.s),
  5469. _(t)
  5470. }
  5471. function a(t) {
  5472. return _(t).desaturate(100)
  5473. }
  5474. function u(t, e) {
  5475. e = 0 === e ? 0 : e || 10;
  5476. t = _(t).toHsl();
  5477. return t.l += e / 100,
  5478. t.l = I(t.l),
  5479. _(t)
  5480. }
  5481. function c(t, e) {
  5482. e = 0 === e ? 0 : e || 10;
  5483. t = _(t).toRgb();
  5484. return t.r = w(0, b(255, t.r - y(-e / 100 * 255))),
  5485. t.g = w(0, b(255, t.g - y(-e / 100 * 255))),
  5486. t.b = w(0, b(255, t.b - y(-e / 100 * 255))),
  5487. _(t)
  5488. }
  5489. function l(t, e) {
  5490. e = 0 === e ? 0 : e || 10;
  5491. t = _(t).toHsl();
  5492. return t.l -= e / 100,
  5493. t.l = I(t.l),
  5494. _(t)
  5495. }
  5496. function h(t, e) {
  5497. t = _(t).toHsl(),
  5498. e = (y(t.h) + e) % 360;
  5499. return t.h = e < 0 ? 360 + e : e,
  5500. _(t)
  5501. }
  5502. function f(t) {
  5503. t = _(t).toHsl();
  5504. return t.h = (t.h + 180) % 360,
  5505. _(t)
  5506. }
  5507. function p(t) {
  5508. var e = _(t).toHsl()
  5509. , n = e.h;
  5510. return [_(t), _({
  5511. h: (n + 120) % 360,
  5512. s: e.s,
  5513. l: e.l
  5514. }), _({
  5515. h: (n + 240) % 360,
  5516. s: e.s,
  5517. l: e.l
  5518. })]
  5519. }
  5520. function x(t) {
  5521. var e = _(t).toHsl()
  5522. , n = e.h;
  5523. return [_(t), _({
  5524. h: (n + 90) % 360,
  5525. s: e.s,
  5526. l: e.l
  5527. }), _({
  5528. h: (n + 180) % 360,
  5529. s: e.s,
  5530. l: e.l
  5531. }), _({
  5532. h: (n + 270) % 360,
  5533. s: e.s,
  5534. l: e.l
  5535. })]
  5536. }
  5537. function C(t) {
  5538. var e = _(t).toHsl()
  5539. , n = e.h;
  5540. return [_(t), _({
  5541. h: (n + 72) % 360,
  5542. s: e.s,
  5543. l: e.l
  5544. }), _({
  5545. h: (n + 216) % 360,
  5546. s: e.s,
  5547. l: e.l
  5548. })]
  5549. }
  5550. function k(t, e, n) {
  5551. e = e || 6,
  5552. n = n || 30;
  5553. var r = _(t).toHsl()
  5554. , i = 360 / n
  5555. , o = [_(t)];
  5556. for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e;)
  5557. r.h = (r.h + i) % 360,
  5558. o.push(_(r));
  5559. return o
  5560. }
  5561. function S(t, e) {
  5562. e = e || 6;
  5563. for (var t = _(t).toHsv(), n = t.h, r = t.s, i = t.v, o = [], s = 1 / e; e--;)
  5564. o.push(_({
  5565. h: n,
  5566. s: r,
  5567. v: i
  5568. })),
  5569. i = (i + s) % 1;
  5570. return o
  5571. }
  5572. _.prototype = {
  5573. isDark: function() {
  5574. return this.getBrightness() < 128
  5575. },
  5576. isLight: function() {
  5577. return !this.isDark()
  5578. },
  5579. isValid: function() {
  5580. return this._ok
  5581. },
  5582. getOriginalInput: function() {
  5583. return this._originalInput
  5584. },
  5585. getFormat: function() {
  5586. return this._format
  5587. },
  5588. getAlpha: function() {
  5589. return this._a
  5590. },
  5591. getBrightness: function() {
  5592. var t = this.toRgb();
  5593. return (299 * t.r + 587 * t.g + 114 * t.b) / 1e3
  5594. },
  5595. setAlpha: function(t) {
  5596. return this._a = T(t),
  5597. this._roundA = y(100 * this._a) / 100,
  5598. this
  5599. },
  5600. toHsv: function() {
  5601. var t = i(this._r, this._g, this._b);
  5602. return {
  5603. h: 360 * t.h,
  5604. s: t.s,
  5605. v: t.v,
  5606. a: this._a
  5607. }
  5608. },
  5609. toHsvString: function() {
  5610. var t = i(this._r, this._g, this._b)
  5611. , e = y(360 * t.h)
  5612. , n = y(100 * t.s)
  5613. , t = y(100 * t.v);
  5614. return 1 == this._a ? "hsv(" + e + ", " + n + "%, " + t + "%)" : "hsva(" + e + ", " + n + "%, " + t + "%, " + this._roundA + ")"
  5615. },
  5616. toHsl: function() {
  5617. var t = r(this._r, this._g, this._b);
  5618. return {
  5619. h: 360 * t.h,
  5620. s: t.s,
  5621. l: t.l,
  5622. a: this._a
  5623. }
  5624. },
  5625. toHslString: function() {
  5626. var t = r(this._r, this._g, this._b)
  5627. , e = y(360 * t.h)
  5628. , n = y(100 * t.s)
  5629. , t = y(100 * t.l);
  5630. return 1 == this._a ? "hsl(" + e + ", " + n + "%, " + t + "%)" : "hsla(" + e + ", " + n + "%, " + t + "%, " + this._roundA + ")"
  5631. },
  5632. toHex: function(t) {
  5633. return e(this._r, this._g, this._b, t)
  5634. },
  5635. toHexString: function(t) {
  5636. return "#" + this.toHex(t)
  5637. },
  5638. toHex8: function() {
  5639. return o(this._r, this._g, this._b, this._a)
  5640. },
  5641. toHex8String: function() {
  5642. return "#" + this.toHex8()
  5643. },
  5644. toRgb: function() {
  5645. return {
  5646. r: y(this._r),
  5647. g: y(this._g),
  5648. b: y(this._b),
  5649. a: this._a
  5650. }
  5651. },
  5652. toRgbString: function() {
  5653. return 1 == this._a ? "rgb(" + y(this._r) + ", " + y(this._g) + ", " + y(this._b) + ")" : "rgba(" + y(this._r) + ", " + y(this._g) + ", " + y(this._b) + ", " + this._roundA + ")"
  5654. },
  5655. toPercentageRgb: function() {
  5656. return {
  5657. r: y(100 * A(this._r, 255)) + "%",
  5658. g: y(100 * A(this._g, 255)) + "%",
  5659. b: y(100 * A(this._b, 255)) + "%",
  5660. a: this._a
  5661. }
  5662. },
  5663. toPercentageRgbString: function() {
  5664. return 1 == this._a ? "rgb(" + y(100 * A(this._r, 255)) + "%, " + y(100 * A(this._g, 255)) + "%, " + y(100 * A(this._b, 255)) + "%)" : "rgba(" + y(100 * A(this._r, 255)) + "%, " + y(100 * A(this._g, 255)) + "%, " + y(100 * A(this._b, 255)) + "%, " + this._roundA + ")"
  5665. },
  5666. toName: function() {
  5667. return 0 === this._a ? "transparent" : !(this._a < 1) && (E[e(this._r, this._g, this._b, !0)] || !1)
  5668. },
  5669. toFilter: function(t) {
  5670. var e = "#" + o(this._r, this._g, this._b, this._a)
  5671. , n = e
  5672. , r = this._gradientType ? "GradientType = 1, " : "";
  5673. return t && (n = _(t).toHex8String()),
  5674. "progid:DXImageTransform.Microsoft.gradient(" + r + "startColorstr=" + e + ",endColorstr=" + n + ")"
  5675. },
  5676. toString: function(t) {
  5677. var e = !!t;
  5678. t = t || this._format;
  5679. var n = !1
  5680. , r = this._a < 1 && 0 <= this._a;
  5681. return e || !r || "hex" !== t && "hex6" !== t && "hex3" !== t && "name" !== t ? ("rgb" === t && (n = this.toRgbString()),
  5682. "prgb" === t && (n = this.toPercentageRgbString()),
  5683. "hex" !== t && "hex6" !== t || (n = this.toHexString()),
  5684. "hex3" === t && (n = this.toHexString(!0)),
  5685. "hex8" === t && (n = this.toHex8String()),
  5686. "name" === t && (n = this.toName()),
  5687. "hsl" === t && (n = this.toHslString()),
  5688. "hsv" === t && (n = this.toHsvString()),
  5689. n || this.toHexString()) : "name" === t && 0 === this._a ? this.toName() : this.toRgbString()
  5690. },
  5691. _applyModification: function(t, e) {
  5692. e = t.apply(null, [this].concat([].slice.call(e)));
  5693. return this._r = e._r,
  5694. this._g = e._g,
  5695. this._b = e._b,
  5696. this.setAlpha(e._a),
  5697. this
  5698. },
  5699. lighten: function() {
  5700. return this._applyModification(u, arguments)
  5701. },
  5702. brighten: function() {
  5703. return this._applyModification(c, arguments)
  5704. },
  5705. darken: function() {
  5706. return this._applyModification(l, arguments)
  5707. },
  5708. desaturate: function() {
  5709. return this._applyModification(n, arguments)
  5710. },
  5711. saturate: function() {
  5712. return this._applyModification(s, arguments)
  5713. },
  5714. greyscale: function() {
  5715. return this._applyModification(a, arguments)
  5716. },
  5717. spin: function() {
  5718. return this._applyModification(h, arguments)
  5719. },
  5720. _applyCombination: function(t, e) {
  5721. return t.apply(null, [this].concat([].slice.call(e)))
  5722. },
  5723. analogous: function() {
  5724. return this._applyCombination(k, arguments)
  5725. },
  5726. complement: function() {
  5727. return this._applyCombination(f, arguments)
  5728. },
  5729. monochromatic: function() {
  5730. return this._applyCombination(S, arguments)
  5731. },
  5732. splitcomplement: function() {
  5733. return this._applyCombination(C, arguments)
  5734. },
  5735. triad: function() {
  5736. return this._applyCombination(p, arguments)
  5737. },
  5738. tetrad: function() {
  5739. return this._applyCombination(x, arguments)
  5740. }
  5741. },
  5742. _.fromRatio = function(t, e) {
  5743. if ("object" == typeof t) {
  5744. var n, r = {};
  5745. for (n in t)
  5746. t.hasOwnProperty(n) && (r[n] = "a" === n ? t[n] : N(t[n]));
  5747. t = r
  5748. }
  5749. return _(t, e)
  5750. }
  5751. ,
  5752. _.equals = function(t, e) {
  5753. return !(!t || !e) && _(t).toRgbString() == _(e).toRgbString()
  5754. }
  5755. ,
  5756. _.random = function() {
  5757. return _.fromRatio({
  5758. r: t(),
  5759. g: t(),
  5760. b: t()
  5761. })
  5762. }
  5763. ,
  5764. _.mix = function(t, e, n) {
  5765. n = 0 === n ? 0 : n || 50;
  5766. var r = _(t).toRgb()
  5767. , i = _(e).toRgb()
  5768. , t = n / 100
  5769. , e = 2 * t - 1
  5770. , n = i.a - r.a
  5771. , n = 1 - (e = (1 + (e = e * n == -1 ? e : (e + n) / (1 + e * n))) / 2)
  5772. , t = {
  5773. r: i.r * e + r.r * n,
  5774. g: i.g * e + r.g * n,
  5775. b: i.b * e + r.b * n,
  5776. a: i.a * t + r.a * (1 - t)
  5777. };
  5778. return _(t)
  5779. }
  5780. ,
  5781. _.readability = function(t, e) {
  5782. var n = _(t)
  5783. , r = _(e)
  5784. , t = n.toRgb()
  5785. , e = r.toRgb()
  5786. , n = n.getBrightness()
  5787. , r = r.getBrightness()
  5788. , e = Math.max(t.r, e.r) - Math.min(t.r, e.r) + Math.max(t.g, e.g) - Math.min(t.g, e.g) + Math.max(t.b, e.b) - Math.min(t.b, e.b);
  5789. return {
  5790. brightness: Math.abs(n - r),
  5791. color: e
  5792. }
  5793. }
  5794. ,
  5795. _.isReadable = function(t, e) {
  5796. e = _.readability(t, e);
  5797. return 125 < e.brightness && 500 < e.color
  5798. }
  5799. ,
  5800. _.mostReadable = function(t, e) {
  5801. for (var n = null, r = 0, i = !1, o = 0; o < e.length; o++) {
  5802. var s = _.readability(t, e[o])
  5803. , a = 125 < s.brightness && 500 < s.color
  5804. , s = s.brightness / 125 * 3 + s.color / 500;
  5805. (a && !i || a && i && r < s || !a && !i && r < s) && (i = a,
  5806. r = s,
  5807. n = _(e[o]))
  5808. }
  5809. return n
  5810. }
  5811. ;
  5812. var O = _.names = {
  5813. aliceblue: "f0f8ff",
  5814. antiquewhite: "faebd7",
  5815. aqua: "0ff",
  5816. aquamarine: "7fffd4",
  5817. azure: "f0ffff",
  5818. beige: "f5f5dc",
  5819. bisque: "ffe4c4",
  5820. black: "000",
  5821. blanchedalmond: "ffebcd",
  5822. blue: "00f",
  5823. blueviolet: "8a2be2",
  5824. brown: "a52a2a",
  5825. burlywood: "deb887",
  5826. burntsienna: "ea7e5d",
  5827. cadetblue: "5f9ea0",
  5828. chartreuse: "7fff00",
  5829. chocolate: "d2691e",
  5830. coral: "ff7f50",
  5831. cornflowerblue: "6495ed",
  5832. cornsilk: "fff8dc",
  5833. crimson: "dc143c",
  5834. cyan: "0ff",
  5835. darkblue: "00008b",
  5836. darkcyan: "008b8b",
  5837. darkgoldenrod: "b8860b",
  5838. darkgray: "a9a9a9",
  5839. darkgreen: "006400",
  5840. darkgrey: "a9a9a9",
  5841. darkkhaki: "bdb76b",
  5842. darkmagenta: "8b008b",
  5843. darkolivegreen: "556b2f",
  5844. darkorange: "ff8c00",
  5845. darkorchid: "9932cc",
  5846. darkred: "8b0000",
  5847. darksalmon: "e9967a",
  5848. darkseagreen: "8fbc8f",
  5849. darkslateblue: "483d8b",
  5850. darkslategray: "2f4f4f",
  5851. darkslategrey: "2f4f4f",
  5852. darkturquoise: "00ced1",
  5853. darkviolet: "9400d3",
  5854. deeppink: "ff1493",
  5855. deepskyblue: "00bfff",
  5856. dimgray: "696969",
  5857. dimgrey: "696969",
  5858. dodgerblue: "1e90ff",
  5859. firebrick: "b22222",
  5860. floralwhite: "fffaf0",
  5861. forestgreen: "228b22",
  5862. fuchsia: "f0f",
  5863. gainsboro: "dcdcdc",
  5864. ghostwhite: "f8f8ff",
  5865. gold: "ffd700",
  5866. goldenrod: "daa520",
  5867. gray: "808080",
  5868. green: "008000",
  5869. greenyellow: "adff2f",
  5870. grey: "808080",
  5871. honeydew: "f0fff0",
  5872. hotpink: "ff69b4",
  5873. indianred: "cd5c5c",
  5874. indigo: "4b0082",
  5875. ivory: "fffff0",
  5876. khaki: "f0e68c",
  5877. lavender: "e6e6fa",
  5878. lavenderblush: "fff0f5",
  5879. lawngreen: "7cfc00",
  5880. lemonchiffon: "fffacd",
  5881. lightblue: "add8e6",
  5882. lightcoral: "f08080",
  5883. lightcyan: "e0ffff",
  5884. lightgoldenrodyellow: "fafad2",
  5885. lightgray: "d3d3d3",
  5886. lightgreen: "90ee90",
  5887. lightgrey: "d3d3d3",
  5888. lightpink: "ffb6c1",
  5889. lightsalmon: "ffa07a",
  5890. lightseagreen: "20b2aa",
  5891. lightskyblue: "87cefa",
  5892. lightslategray: "789",
  5893. lightslategrey: "789",
  5894. lightsteelblue: "b0c4de",
  5895. lightyellow: "ffffe0",
  5896. lime: "0f0",
  5897. limegreen: "32cd32",
  5898. linen: "faf0e6",
  5899. magenta: "f0f",
  5900. maroon: "800000",
  5901. mediumaquamarine: "66cdaa",
  5902. mediumblue: "0000cd",
  5903. mediumorchid: "ba55d3",
  5904. mediumpurple: "9370db",
  5905. mediumseagreen: "3cb371",
  5906. mediumslateblue: "7b68ee",
  5907. mediumspringgreen: "00fa9a",
  5908. mediumturquoise: "48d1cc",
  5909. mediumvioletred: "c71585",
  5910. midnightblue: "191970",
  5911. mintcream: "f5fffa",
  5912. mistyrose: "ffe4e1",
  5913. moccasin: "ffe4b5",
  5914. navajowhite: "ffdead",
  5915. navy: "000080",
  5916. oldlace: "fdf5e6",
  5917. olive: "808000",
  5918. olivedrab: "6b8e23",
  5919. orange: "ffa500",
  5920. orangered: "ff4500",
  5921. orchid: "da70d6",
  5922. palegoldenrod: "eee8aa",
  5923. palegreen: "98fb98",
  5924. paleturquoise: "afeeee",
  5925. palevioletred: "db7093",
  5926. papayawhip: "ffefd5",
  5927. peachpuff: "ffdab9",
  5928. peru: "cd853f",
  5929. pink: "ffc0cb",
  5930. plum: "dda0dd",
  5931. powderblue: "b0e0e6",
  5932. purple: "800080",
  5933. rebeccapurple: "663399",
  5934. red: "f00",
  5935. rosybrown: "bc8f8f",
  5936. royalblue: "4169e1",
  5937. saddlebrown: "8b4513",
  5938. salmon: "fa8072",
  5939. sandybrown: "f4a460",
  5940. seagreen: "2e8b57",
  5941. seashell: "fff5ee",
  5942. sienna: "a0522d",
  5943. silver: "c0c0c0",
  5944. skyblue: "87ceeb",
  5945. slateblue: "6a5acd",
  5946. slategray: "708090",
  5947. slategrey: "708090",
  5948. snow: "fffafa",
  5949. springgreen: "00ff7f",
  5950. steelblue: "4682b4",
  5951. tan: "d2b48c",
  5952. teal: "008080",
  5953. thistle: "d8bfd8",
  5954. tomato: "ff6347",
  5955. turquoise: "40e0d0",
  5956. violet: "ee82ee",
  5957. wheat: "f5deb3",
  5958. white: "fff",
  5959. whitesmoke: "f5f5f5",
  5960. yellow: "ff0",
  5961. yellowgreen: "9acd32"
  5962. }
  5963. , E = _.hexNames = function(t) {
  5964. var e, n = {};
  5965. for (e in t)
  5966. t.hasOwnProperty(e) && (n[t[e]] = e);
  5967. return n
  5968. }(O);
  5969. function T(t) {
  5970. return t = parseFloat(t),
  5971. (isNaN(t) || t < 0 || 1 < t) && (t = 1),
  5972. t
  5973. }
  5974. function A(t, e) {
  5975. "string" == typeof (n = t) && -1 != n.indexOf(".") && 1 === parseFloat(n) && (t = "100%");
  5976. var n = "string" == typeof t && -1 != t.indexOf("%");
  5977. return t = b(e, w(0, parseFloat(t))),
  5978. n && (t = parseInt(t * e, 10) / 100),
  5979. v.abs(t - e) < 1e-6 ? 1 : t % e / parseFloat(e)
  5980. }
  5981. function I(t) {
  5982. return b(1, w(0, t))
  5983. }
  5984. function j(t) {
  5985. return parseInt(t, 16)
  5986. }
  5987. function P(t) {
  5988. return 1 == t.length ? "0" + t : "" + t
  5989. }
  5990. function N(t) {
  5991. return t <= 1 && (t = 100 * t + "%"),
  5992. t
  5993. }
  5994. var D, R, M = (D = "[\\s|\\(]+(" + (R = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)") + ")[,|\\s]+(" + R + ")[,|\\s]+(" + R + ")\\s*\\)?",
  5995. R = "[\\s|\\(]+(" + R + ")[,|\\s]+(" + R + ")[,|\\s]+(" + R + ")[,|\\s]+(" + R + ")\\s*\\)?",
  5996. {
  5997. rgb: new RegExp("rgb" + D),
  5998. rgba: new RegExp("rgba" + R),
  5999. hsl: new RegExp("hsl" + D),
  6000. hsla: new RegExp("hsla" + R),
  6001. hsv: new RegExp("hsv" + D),
  6002. hsva: new RegExp("hsva" + R),
  6003. hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  6004. hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  6005. hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  6006. });
  6007. window.tinycolor = _
  6008. }(),
  6009. It(function() {
  6010. It.fn.spectrum.load && It.fn.spectrum.processNativeColorInputs()
  6011. })
  6012. }),
  6013. function() {
  6014. var t = function(x) {
  6015. x.ui = x.ui || {},
  6016. x.ui.version = "1.12.1";
  6017. var i, r, C, k, o, s, a, u, c, n, l = 0, h = Array.prototype.slice;
  6018. function S(t, e, n) {
  6019. return [parseFloat(t[0]) * (c.test(t[0]) ? e / 100 : 1), parseFloat(t[1]) * (c.test(t[1]) ? n / 100 : 1)]
  6020. }
  6021. function O(t, e) {
  6022. return parseInt(x.css(t, e), 10) || 0
  6023. }
  6024. x.cleanData = (i = x.cleanData,
  6025. function(t) {
  6026. for (var e, n, r = 0; null != (n = t[r]); r++)
  6027. try {
  6028. (e = x._data(n, "events")) && e.remove && x(n).triggerHandler("remove")
  6029. } catch (t) { }
  6030. i(t)
  6031. }
  6032. ),
  6033. x.widget = function(t, n, e) {
  6034. var r, i, o, s = {}, a = t.split(".")[0], u = a + "-" + (t = t.split(".")[1]);
  6035. return e || (e = n,
  6036. n = x.Widget),
  6037. x.isArray(e) && (e = x.extend.apply(null, [{}].concat(e))),
  6038. x.expr[":"][u.toLowerCase()] = function(t) {
  6039. return !!x.data(t, u)
  6040. }
  6041. ,
  6042. x[a] = x[a] || {},
  6043. r = x[a][t],
  6044. i = x[a][t] = function(t, e) {
  6045. if (!this._createWidget)
  6046. return new i(t, e);
  6047. arguments.length && this._createWidget(t, e)
  6048. }
  6049. ,
  6050. x.extend(i, r, {
  6051. version: e.version,
  6052. _proto: x.extend({}, e),
  6053. _childConstructors: []
  6054. }),
  6055. (o = new n).options = x.widget.extend({}, o.options),
  6056. x.each(e, function(e, r) {
  6057. function i() {
  6058. return n.prototype[e].apply(this, arguments)
  6059. }
  6060. function o(t) {
  6061. return n.prototype[e].apply(this, t)
  6062. }
  6063. x.isFunction(r) ? s[e] = function() {
  6064. var t, e = this._super, n = this._superApply;
  6065. return this._super = i,
  6066. this._superApply = o,
  6067. t = r.apply(this, arguments),
  6068. this._super = e,
  6069. this._superApply = n,
  6070. t
  6071. }
  6072. : s[e] = r
  6073. }),
  6074. i.prototype = x.widget.extend(o, {
  6075. widgetEventPrefix: r && o.widgetEventPrefix || t
  6076. }, s, {
  6077. constructor: i,
  6078. namespace: a,
  6079. widgetName: t,
  6080. widgetFullName: u
  6081. }),
  6082. r ? (x.each(r._childConstructors, function(t, e) {
  6083. var n = e.prototype;
  6084. x.widget(n.namespace + "." + n.widgetName, i, e._proto)
  6085. }),
  6086. delete r._childConstructors) : n._childConstructors.push(i),
  6087. x.widget.bridge(t, i),
  6088. i
  6089. }
  6090. ,
  6091. x.widget.extend = function(t) {
  6092. for (var e, n, r = h.call(arguments, 1), i = 0, o = r.length; i < o; i++)
  6093. for (e in r[i])
  6094. n = r[i][e],
  6095. r[i].hasOwnProperty(e) && void 0 !== n && (x.isPlainObject(n) ? t[e] = x.isPlainObject(t[e]) ? x.widget.extend({}, t[e], n) : x.widget.extend({}, n) : t[e] = n);
  6096. return t
  6097. }
  6098. ,
  6099. x.widget.bridge = function(o, e) {
  6100. var s = e.prototype.widgetFullName || o;
  6101. x.fn[o] = function(n) {
  6102. var t = "string" == typeof n
  6103. , r = h.call(arguments, 1)
  6104. , i = this;
  6105. return t ? this.length || "instance" !== n ? this.each(function() {
  6106. var t, e = x.data(this, s);
  6107. return "instance" === n ? (i = e,
  6108. !1) : e ? x.isFunction(e[n]) && "_" !== n.charAt(0) ? (t = e[n].apply(e, r)) !== e && void 0 !== t ? (i = t && t.jquery ? i.pushStack(t.get()) : t,
  6109. !1) : void 0 : x.error("no such method '" + n + "' for " + o + " widget instance") : x.error("cannot call methods on " + o + " prior to initialization; attempted to call method '" + n + "'")
  6110. }) : i = void 0 : (r.length && (n = x.widget.extend.apply(null, [n].concat(r))),
  6111. this.each(function() {
  6112. var t = x.data(this, s);
  6113. t ? (t.option(n || {}),
  6114. t._init && t._init()) : x.data(this, s, new e(n, this))
  6115. })),
  6116. i
  6117. }
  6118. }
  6119. ,
  6120. x.Widget = function() { }
  6121. ,
  6122. x.Widget._childConstructors = [],
  6123. x.Widget.prototype = {
  6124. widgetName: "widget",
  6125. widgetEventPrefix: "",
  6126. defaultElement: "<div>",
  6127. options: {
  6128. classes: {},
  6129. disabled: !1,
  6130. create: null
  6131. },
  6132. _createWidget: function(t, e) {
  6133. e = x(e || this.defaultElement || this)[0],
  6134. this.element = x(e),
  6135. this.uuid = l++,
  6136. this.eventNamespace = "." + this.widgetName + this.uuid,
  6137. this.bindings = x(),
  6138. this.hoverable = x(),
  6139. this.focusable = x(),
  6140. this.classesElementLookup = {},
  6141. e !== this && (x.data(e, this.widgetFullName, this),
  6142. this._on(!0, this.element, {
  6143. remove: function(t) {
  6144. t.target === e && this.destroy()
  6145. }
  6146. }),
  6147. this.document = x(e.style ? e.ownerDocument : e.document || e),
  6148. this.window = x(this.document[0].defaultView || this.document[0].parentWindow)),
  6149. this.options = x.widget.extend({}, this.options, this._getCreateOptions(), t),
  6150. this._create(),
  6151. this.options.disabled && this._setOptionDisabled(this.options.disabled),
  6152. this._trigger("create", null, this._getCreateEventData()),
  6153. this._init()
  6154. },
  6155. _getCreateOptions: function() {
  6156. return {}
  6157. },
  6158. _getCreateEventData: x.noop,
  6159. _create: x.noop,
  6160. _init: x.noop,
  6161. destroy: function() {
  6162. var n = this;
  6163. this._destroy(),
  6164. x.each(this.classesElementLookup, function(t, e) {
  6165. n._removeClass(e, t)
  6166. }),
  6167. this.element.off(this.eventNamespace).removeData(this.widgetFullName),
  6168. this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),
  6169. this.bindings.off(this.eventNamespace)
  6170. },
  6171. _destroy: x.noop,
  6172. widget: function() {
  6173. return this.element
  6174. },
  6175. option: function(t, e) {
  6176. var n, r, i, o = t;
  6177. if (0 === arguments.length)
  6178. return x.widget.extend({}, this.options);
  6179. if ("string" == typeof t)
  6180. if (o = {},
  6181. t = (n = t.split(".")).shift(),
  6182. n.length) {
  6183. for (r = o[t] = x.widget.extend({}, this.options[t]),
  6184. i = 0; i < n.length - 1; i++)
  6185. r[n[i]] = r[n[i]] || {},
  6186. r = r[n[i]];
  6187. if (t = n.pop(),
  6188. 1 === arguments.length)
  6189. return void 0 === r[t] ? null : r[t];
  6190. r[t] = e
  6191. } else {
  6192. if (1 === arguments.length)
  6193. return void 0 === this.options[t] ? null : this.options[t];
  6194. o[t] = e
  6195. }
  6196. return this._setOptions(o),
  6197. this
  6198. },
  6199. _setOptions: function(t) {
  6200. for (var e in t)
  6201. this._setOption(e, t[e]);
  6202. return this
  6203. },
  6204. _setOption: function(t, e) {
  6205. return "classes" === t && this._setOptionClasses(e),
  6206. this.options[t] = e,
  6207. "disabled" === t && this._setOptionDisabled(e),
  6208. this
  6209. },
  6210. _setOptionClasses: function(t) {
  6211. var e, n, r;
  6212. for (e in t)
  6213. r = this.classesElementLookup[e],
  6214. t[e] !== this.options.classes[e] && r && r.length && (n = x(r.get()),
  6215. this._removeClass(r, e),
  6216. n.addClass(this._classes({
  6217. element: n,
  6218. keys: e,
  6219. classes: t,
  6220. add: !0
  6221. })))
  6222. },
  6223. _setOptionDisabled: function(t) {
  6224. this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!t),
  6225. t && (this._removeClass(this.hoverable, null, "ui-state-hover"),
  6226. this._removeClass(this.focusable, null, "ui-state-focus"))
  6227. },
  6228. enable: function() {
  6229. return this._setOptions({
  6230. disabled: !1
  6231. })
  6232. },
  6233. disable: function() {
  6234. return this._setOptions({
  6235. disabled: !0
  6236. })
  6237. },
  6238. _classes: function(i) {
  6239. var o = []
  6240. , s = this;
  6241. function t(t, e) {
  6242. for (var n, r = 0; r < t.length; r++)
  6243. n = s.classesElementLookup[t[r]] || x(),
  6244. n = i.add ? x(x.unique(n.get().concat(i.element.get()))) : x(n.not(i.element).get()),
  6245. s.classesElementLookup[t[r]] = n,
  6246. o.push(t[r]),
  6247. e && i.classes[t[r]] && o.push(i.classes[t[r]])
  6248. }
  6249. return i = x.extend({
  6250. element: this.element,
  6251. classes: this.options.classes || {}
  6252. }, i),
  6253. this._on(i.element, {
  6254. remove: "_untrackClassesElement"
  6255. }),
  6256. i.keys && t(i.keys.match(/\S+/g) || [], !0),
  6257. i.extra && t(i.extra.match(/\S+/g) || []),
  6258. o.join(" ")
  6259. },
  6260. _untrackClassesElement: function(n) {
  6261. var r = this;
  6262. x.each(r.classesElementLookup, function(t, e) {
  6263. -1 !== x.inArray(n.target, e) && (r.classesElementLookup[t] = x(e.not(n.target).get()))
  6264. })
  6265. },
  6266. _removeClass: function(t, e, n) {
  6267. return this._toggleClass(t, e, n, !1)
  6268. },
  6269. _addClass: function(t, e, n) {
  6270. return this._toggleClass(t, e, n, !0)
  6271. },
  6272. _toggleClass: function(t, e, n, r) {
  6273. r = "boolean" == typeof r ? r : n;
  6274. var i = "string" == typeof t || null === t
  6275. , t = {
  6276. extra: i ? e : n,
  6277. keys: i ? t : e,
  6278. element: i ? this.element : t,
  6279. add: r
  6280. };
  6281. return t.element.toggleClass(this._classes(t), r),
  6282. this
  6283. },
  6284. _on: function(i, o, t) {
  6285. var s, a = this;
  6286. "boolean" != typeof i && (t = o,
  6287. o = i,
  6288. i = !1),
  6289. t ? (o = s = x(o),
  6290. this.bindings = this.bindings.add(o)) : (t = o,
  6291. o = this.element,
  6292. s = this.widget()),
  6293. x.each(t, function(t, e) {
  6294. function n() {
  6295. if (i || !0 !== a.options.disabled && !x(this).hasClass("ui-state-disabled"))
  6296. return ("string" == typeof e ? a[e] : e).apply(a, arguments)
  6297. }
  6298. "string" != typeof e && (n.guid = e.guid = e.guid || n.guid || x.guid++);
  6299. var r = t.match(/^([\w:-]*)\s*(.*)$/)
  6300. , t = r[1] + a.eventNamespace
  6301. , r = r[2];
  6302. r ? s.on(t, r, n) : o.on(t, n)
  6303. })
  6304. },
  6305. _off: function(t, e) {
  6306. e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace,
  6307. t.off(e).off(e),
  6308. this.bindings = x(this.bindings.not(t).get()),
  6309. this.focusable = x(this.focusable.not(t).get()),
  6310. this.hoverable = x(this.hoverable.not(t).get())
  6311. },
  6312. _delay: function(t, e) {
  6313. var n = this;
  6314. return setTimeout(function() {
  6315. return ("string" == typeof t ? n[t] : t).apply(n, arguments)
  6316. }, e || 0)
  6317. },
  6318. _hoverable: function(t) {
  6319. this.hoverable = this.hoverable.add(t),
  6320. this._on(t, {
  6321. mouseenter: function(t) {
  6322. this._addClass(x(t.currentTarget), null, "ui-state-hover")
  6323. },
  6324. mouseleave: function(t) {
  6325. this._removeClass(x(t.currentTarget), null, "ui-state-hover")
  6326. }
  6327. })
  6328. },
  6329. _focusable: function(t) {
  6330. this.focusable = this.focusable.add(t),
  6331. this._on(t, {
  6332. focusin: function(t) {
  6333. this._addClass(x(t.currentTarget), null, "ui-state-focus")
  6334. },
  6335. focusout: function(t) {
  6336. this._removeClass(x(t.currentTarget), null, "ui-state-focus")
  6337. }
  6338. })
  6339. },
  6340. _trigger: function(t, e, n) {
  6341. var r, i, o = this.options[t];
  6342. if (n = n || {},
  6343. (e = x.Event(e)).type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(),
  6344. e.target = this.element[0],
  6345. i = e.originalEvent)
  6346. for (r in i)
  6347. r in e || (e[r] = i[r]);
  6348. return this.element.trigger(e, n),
  6349. !(x.isFunction(o) && !1 === o.apply(this.element[0], [e].concat(n)) || e.isDefaultPrevented())
  6350. }
  6351. },
  6352. x.each({
  6353. show: "fadeIn",
  6354. hide: "fadeOut"
  6355. }, function(o, s) {
  6356. x.Widget.prototype["_" + o] = function(e, t, n) {
  6357. var r;
  6358. "string" == typeof t && (t = {
  6359. effect: t
  6360. });
  6361. var i = t ? !0 !== t && "number" != typeof t && t.effect || s : o;
  6362. "number" == typeof (t = t || {}) && (t = {
  6363. duration: t
  6364. }),
  6365. r = !x.isEmptyObject(t),
  6366. t.complete = n,
  6367. t.delay && e.delay(t.delay),
  6368. r && x.effects && x.effects.effect[i] ? e[o](t) : i !== o && e[i] ? e[i](t.duration, t.easing, n) : e.queue(function(t) {
  6369. x(this)[o](),
  6370. n && n.call(e[0]),
  6371. t()
  6372. })
  6373. }
  6374. }),
  6375. x.widget,
  6376. C = Math.max,
  6377. k = Math.abs,
  6378. o = /left|center|right/,
  6379. s = /top|center|bottom/,
  6380. a = /[\+\-]\d+(\.[\d]+)?%?/,
  6381. u = /^\w+/,
  6382. c = /%$/,
  6383. n = x.fn.position,
  6384. x.position = {
  6385. scrollbarWidth: function() {
  6386. if (void 0 !== r)
  6387. return r;
  6388. var t, e = x("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), n = e.children()[0];
  6389. return x("body").append(e),
  6390. t = n.offsetWidth,
  6391. e.css("overflow", "scroll"),
  6392. t === (n = n.offsetWidth) && (n = e[0].clientWidth),
  6393. e.remove(),
  6394. r = t - n
  6395. },
  6396. getScrollInfo: function(t) {
  6397. var e = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x")
  6398. , n = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y")
  6399. , e = "scroll" === e || "auto" === e && t.width < t.element[0].scrollWidth;
  6400. return {
  6401. width: "scroll" === n || "auto" === n && t.height < t.element[0].scrollHeight ? x.position.scrollbarWidth() : 0,
  6402. height: e ? x.position.scrollbarWidth() : 0
  6403. }
  6404. },
  6405. getWithinInfo: function(t) {
  6406. var e = x(t || window)
  6407. , n = x.isWindow(e[0])
  6408. , r = !!e[0] && 9 === e[0].nodeType;
  6409. return {
  6410. element: e,
  6411. isWindow: n,
  6412. isDocument: r,
  6413. offset: n || r ? {
  6414. left: 0,
  6415. top: 0
  6416. } : x(t).offset(),
  6417. scrollLeft: e.scrollLeft(),
  6418. scrollTop: e.scrollTop(),
  6419. width: e.outerWidth(),
  6420. height: e.outerHeight()
  6421. }
  6422. }
  6423. },
  6424. x.fn.position = function(h) {
  6425. if (!h || !h.of)
  6426. return n.apply(this, arguments);
  6427. h = x.extend({}, h);
  6428. var f, p, d, g, m, t, v = x(h.of), y = x.position.getWithinInfo(h.within), b = x.position.getScrollInfo(y), w = (h.collision || "flip").split(" "), _ = {}, e = 9 === (t = (e = v)[0]).nodeType ? {
  6429. width: e.width(),
  6430. height: e.height(),
  6431. offset: {
  6432. top: 0,
  6433. left: 0
  6434. }
  6435. } : x.isWindow(t) ? {
  6436. width: e.width(),
  6437. height: e.height(),
  6438. offset: {
  6439. top: e.scrollTop(),
  6440. left: e.scrollLeft()
  6441. }
  6442. } : t.preventDefault ? {
  6443. width: 0,
  6444. height: 0,
  6445. offset: {
  6446. top: t.pageY,
  6447. left: t.pageX
  6448. }
  6449. } : {
  6450. width: e.outerWidth(),
  6451. height: e.outerHeight(),
  6452. offset: e.offset()
  6453. };
  6454. return v[0].preventDefault && (h.at = "left top"),
  6455. p = e.width,
  6456. d = e.height,
  6457. g = e.offset,
  6458. m = x.extend({}, g),
  6459. x.each(["my", "at"], function() {
  6460. var t, e, n = (h[this] || "").split(" ");
  6461. 1 === n.length && (n = o.test(n[0]) ? n.concat(["center"]) : s.test(n[0]) ? ["center"].concat(n) : ["center", "center"]),
  6462. n[0] = o.test(n[0]) ? n[0] : "center",
  6463. n[1] = s.test(n[1]) ? n[1] : "center",
  6464. t = a.exec(n[0]),
  6465. e = a.exec(n[1]),
  6466. _[this] = [t ? t[0] : 0, e ? e[0] : 0],
  6467. h[this] = [u.exec(n[0])[0], u.exec(n[1])[0]]
  6468. }),
  6469. 1 === w.length && (w[1] = w[0]),
  6470. "right" === h.at[0] ? m.left += p : "center" === h.at[0] && (m.left += p / 2),
  6471. "bottom" === h.at[1] ? m.top += d : "center" === h.at[1] && (m.top += d / 2),
  6472. f = S(_.at, p, d),
  6473. m.left += f[0],
  6474. m.top += f[1],
  6475. this.each(function() {
  6476. var n, t, s = x(this), a = s.outerWidth(), u = s.outerHeight(), e = O(this, "marginLeft"), r = O(this, "marginTop"), i = a + e + O(this, "marginRight") + b.width, o = u + r + O(this, "marginBottom") + b.height, c = x.extend({}, m), l = S(_.my, s.outerWidth(), s.outerHeight());
  6477. "right" === h.my[0] ? c.left -= a : "center" === h.my[0] && (c.left -= a / 2),
  6478. "bottom" === h.my[1] ? c.top -= u : "center" === h.my[1] && (c.top -= u / 2),
  6479. c.left += l[0],
  6480. c.top += l[1],
  6481. n = {
  6482. marginLeft: e,
  6483. marginTop: r
  6484. },
  6485. x.each(["left", "top"], function(t, e) {
  6486. x.ui.position[w[t]] && x.ui.position[w[t]][e](c, {
  6487. targetWidth: p,
  6488. targetHeight: d,
  6489. elemWidth: a,
  6490. elemHeight: u,
  6491. collisionPosition: n,
  6492. collisionWidth: i,
  6493. collisionHeight: o,
  6494. offset: [f[0] + l[0], f[1] + l[1]],
  6495. my: h.my,
  6496. at: h.at,
  6497. within: y,
  6498. elem: s
  6499. })
  6500. }),
  6501. h.using && (t = function(t) {
  6502. var e = g.left - c.left
  6503. , n = e + p - a
  6504. , r = g.top - c.top
  6505. , i = r + d - u
  6506. , o = {
  6507. target: {
  6508. element: v,
  6509. left: g.left,
  6510. top: g.top,
  6511. width: p,
  6512. height: d
  6513. },
  6514. element: {
  6515. element: s,
  6516. left: c.left,
  6517. top: c.top,
  6518. width: a,
  6519. height: u
  6520. },
  6521. horizontal: n < 0 ? "left" : 0 < e ? "right" : "center",
  6522. vertical: i < 0 ? "top" : 0 < r ? "bottom" : "middle"
  6523. };
  6524. p < a && k(e + n) < p && (o.horizontal = "center"),
  6525. d < u && k(r + i) < d && (o.vertical = "middle"),
  6526. C(k(e), k(n)) > C(k(r), k(i)) ? o.important = "horizontal" : o.important = "vertical",
  6527. h.using.call(this, t, o)
  6528. }
  6529. ),
  6530. s.offset(x.extend(c, {
  6531. using: t
  6532. }))
  6533. })
  6534. }
  6535. ,
  6536. x.ui.position = {
  6537. fit: {
  6538. left: function(t, e) {
  6539. var n = e.within
  6540. , r = n.isWindow ? n.scrollLeft : n.offset.left
  6541. , i = n.width
  6542. , o = t.left - e.collisionPosition.marginLeft
  6543. , s = r - o
  6544. , a = o + e.collisionWidth - i - r;
  6545. e.collisionWidth > i ? 0 < s && a <= 0 ? (n = t.left + s + e.collisionWidth - i - r,
  6546. t.left += s - n) : t.left = !(0 < a && s <= 0) && a < s ? r + i - e.collisionWidth : r : 0 < s ? t.left += s : 0 < a ? t.left -= a : t.left = C(t.left - o, t.left)
  6547. },
  6548. top: function(t, e) {
  6549. var n = e.within
  6550. , r = n.isWindow ? n.scrollTop : n.offset.top
  6551. , i = e.within.height
  6552. , o = t.top - e.collisionPosition.marginTop
  6553. , s = r - o
  6554. , a = o + e.collisionHeight - i - r;
  6555. e.collisionHeight > i ? 0 < s && a <= 0 ? (n = t.top + s + e.collisionHeight - i - r,
  6556. t.top += s - n) : t.top = !(0 < a && s <= 0) && a < s ? r + i - e.collisionHeight : r : 0 < s ? t.top += s : 0 < a ? t.top -= a : t.top = C(t.top - o, t.top)
  6557. }
  6558. },
  6559. flip: {
  6560. left: function(t, e) {
  6561. var n = e.within
  6562. , r = n.offset.left + n.scrollLeft
  6563. , i = n.width
  6564. , o = n.isWindow ? n.scrollLeft : n.offset.left
  6565. , s = t.left - e.collisionPosition.marginLeft
  6566. , a = s - o
  6567. , u = s + e.collisionWidth - i - o
  6568. , c = "left" === e.my[0] ? -e.elemWidth : "right" === e.my[0] ? e.elemWidth : 0
  6569. , n = "left" === e.at[0] ? e.targetWidth : "right" === e.at[0] ? -e.targetWidth : 0
  6570. , s = -2 * e.offset[0];
  6571. a < 0 ? ((r = t.left + c + n + s + e.collisionWidth - i - r) < 0 || r < k(a)) && (t.left += c + n + s) : 0 < u && (0 < (o = t.left - e.collisionPosition.marginLeft + c + n + s - o) || k(o) < u) && (t.left += c + n + s)
  6572. },
  6573. top: function(t, e) {
  6574. var n = e.within
  6575. , r = n.offset.top + n.scrollTop
  6576. , i = n.height
  6577. , o = n.isWindow ? n.scrollTop : n.offset.top
  6578. , s = t.top - e.collisionPosition.marginTop
  6579. , a = s - o
  6580. , u = s + e.collisionHeight - i - o
  6581. , c = "top" === e.my[1] ? -e.elemHeight : "bottom" === e.my[1] ? e.elemHeight : 0
  6582. , n = "top" === e.at[1] ? e.targetHeight : "bottom" === e.at[1] ? -e.targetHeight : 0
  6583. , s = -2 * e.offset[1];
  6584. a < 0 ? ((r = t.top + c + n + s + e.collisionHeight - i - r) < 0 || r < k(a)) && (t.top += c + n + s) : 0 < u && (0 < (o = t.top - e.collisionPosition.marginTop + c + n + s - o) || k(o) < u) && (t.top += c + n + s)
  6585. }
  6586. },
  6587. flipfit: {
  6588. left: function() {
  6589. x.ui.position.flip.left.apply(this, arguments),
  6590. x.ui.position.fit.left.apply(this, arguments)
  6591. },
  6592. top: function() {
  6593. x.ui.position.flip.top.apply(this, arguments),
  6594. x.ui.position.fit.top.apply(this, arguments)
  6595. }
  6596. }
  6597. },
  6598. x.ui.position,
  6599. x.fn.form = function() {
  6600. return "string" == typeof this[0].form ? this.closest("form") : x(this[0].form)
  6601. }
  6602. ,
  6603. x.ui.formResetMixin = {
  6604. _formResetHandler: function() {
  6605. var e = x(this);
  6606. setTimeout(function() {
  6607. var t = e.data("ui-form-reset-instances");
  6608. x.each(t, function() {
  6609. this.refresh()
  6610. })
  6611. })
  6612. },
  6613. _bindFormResetHandler: function() {
  6614. var t;
  6615. this.form = this.element.form(),
  6616. this.form.length && ((t = this.form.data("ui-form-reset-instances") || []).length || this.form.on("reset.ui-form-reset", this._formResetHandler),
  6617. t.push(this),
  6618. this.form.data("ui-form-reset-instances", t))
  6619. },
  6620. _unbindFormResetHandler: function() {
  6621. var t;
  6622. this.form.length && ((t = this.form.data("ui-form-reset-instances")).splice(x.inArray(this, t), 1),
  6623. t.length ? this.form.data("ui-form-reset-instances", t) : this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))
  6624. }
  6625. },
  6626. x.ui.keyCode = {
  6627. BACKSPACE: 8,
  6628. COMMA: 188,
  6629. DELETE: 46,
  6630. DOWN: 40,
  6631. END: 35,
  6632. ENTER: 13,
  6633. ESCAPE: 27,
  6634. HOME: 36,
  6635. LEFT: 37,
  6636. PAGE_DOWN: 34,
  6637. PAGE_UP: 33,
  6638. PERIOD: 190,
  6639. RIGHT: 39,
  6640. SPACE: 32,
  6641. TAB: 9,
  6642. UP: 38
  6643. },
  6644. x.ui.escapeSelector = (e = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,
  6645. function(t) {
  6646. return t.replace(e, "\\$1")
  6647. }
  6648. ),
  6649. x.fn.labels = function() {
  6650. var t, e, n;
  6651. return this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (e = this.eq(0).parents("label"),
  6652. (t = this.attr("id")) && (n = (n = this.eq(0).parents().last()).add((n.length ? n : this).siblings()),
  6653. t = "label[for='" + x.ui.escapeSelector(t) + "']",
  6654. e = e.add(n.find(t).addBack(t))),
  6655. this.pushStack(e))
  6656. }
  6657. ,
  6658. x.fn.extend({
  6659. uniqueId: (t = 0,
  6660. function() {
  6661. return this.each(function() {
  6662. this.id || (this.id = "ui-id-" + ++t)
  6663. })
  6664. }
  6665. ),
  6666. removeUniqueId: function() {
  6667. return this.each(function() {
  6668. /^ui-id-\d+$/.test(this.id) && x(this).removeAttr("id")
  6669. })
  6670. }
  6671. });
  6672. var e, t, f, p = /ui-corner-([a-z]){2,6}/g;
  6673. x.widget("ui.controlgroup", {
  6674. version: "1.12.1",
  6675. defaultElement: "<div>",
  6676. options: {
  6677. direction: "horizontal",
  6678. disabled: null,
  6679. onlyVisible: !0,
  6680. items: {
  6681. button: "input[type=button], input[type=submit], input[type=reset], button, a",
  6682. controlgroupLabel: ".ui-controlgroup-label",
  6683. checkboxradio: "input[type='checkbox'], input[type='radio']",
  6684. selectmenu: "select",
  6685. spinner: ".ui-spinner-input"
  6686. }
  6687. },
  6688. _create: function() {
  6689. this._enhance()
  6690. },
  6691. _enhance: function() {
  6692. this.element.attr("role", "toolbar"),
  6693. this.refresh()
  6694. },
  6695. _destroy: function() {
  6696. this._callChildMethod("destroy"),
  6697. this.childWidgets.removeData("ui-controlgroup-data"),
  6698. this.element.removeAttr("role"),
  6699. this.options.items.controlgroupLabel && this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()
  6700. },
  6701. _initWidgets: function() {
  6702. var o = this
  6703. , s = [];
  6704. x.each(this.options.items, function(r, t) {
  6705. var e, i;
  6706. if (t)
  6707. return "controlgroupLabel" === r ? ((e = o.element.find(t)).each(function() {
  6708. var t = x(this);
  6709. t.children(".ui-controlgroup-label-contents").length || t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")
  6710. }),
  6711. o._addClass(e, null, "ui-widget ui-widget-content ui-state-default"),
  6712. void (s = s.concat(e.get()))) : void (x.fn[r] && (i = o["_" + r + "Options"] ? o["_" + r + "Options"]("middle") : {
  6713. classes: {}
  6714. },
  6715. o.element.find(t).each(function() {
  6716. var t = x(this)
  6717. , e = t[r]("instance")
  6718. , n = x.widget.extend({}, i);
  6719. "button" === r && t.parent(".ui-spinner").length || ((e = e || t[r]()[r]("instance")) && (n.classes = o._resolveClassesValues(n.classes, e)),
  6720. t[r](n),
  6721. n = t[r]("widget"),
  6722. x.data(n[0], "ui-controlgroup-data", e || t[r]("instance")),
  6723. s.push(n[0]))
  6724. })))
  6725. }),
  6726. this.childWidgets = x(x.unique(s)),
  6727. this._addClass(this.childWidgets, "ui-controlgroup-item")
  6728. },
  6729. _callChildMethod: function(e) {
  6730. this.childWidgets.each(function() {
  6731. var t = x(this).data("ui-controlgroup-data");
  6732. t && t[e] && t[e]()
  6733. })
  6734. },
  6735. _updateCornerClass: function(t, e) {
  6736. e = this._buildSimpleOptions(e, "label").classes.label;
  6737. this._removeClass(t, null, "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),
  6738. this._addClass(t, null, e)
  6739. },
  6740. _buildSimpleOptions: function(t, e) {
  6741. var n = "vertical" === this.options.direction
  6742. , r = {
  6743. classes: {}
  6744. };
  6745. return r.classes[e] = {
  6746. middle: "",
  6747. first: "ui-corner-" + (n ? "top" : "left"),
  6748. last: "ui-corner-" + (n ? "bottom" : "right"),
  6749. only: "ui-corner-all"
  6750. }[t],
  6751. r
  6752. },
  6753. _spinnerOptions: function(t) {
  6754. t = this._buildSimpleOptions(t, "ui-spinner");
  6755. return t.classes["ui-spinner-up"] = "",
  6756. t.classes["ui-spinner-down"] = "",
  6757. t
  6758. },
  6759. _buttonOptions: function(t) {
  6760. return this._buildSimpleOptions(t, "ui-button")
  6761. },
  6762. _checkboxradioOptions: function(t) {
  6763. return this._buildSimpleOptions(t, "ui-checkboxradio-label")
  6764. },
  6765. _selectmenuOptions: function(t) {
  6766. var e = "vertical" === this.options.direction;
  6767. return {
  6768. width: !!e && "auto",
  6769. classes: {
  6770. middle: {
  6771. "ui-selectmenu-button-open": "",
  6772. "ui-selectmenu-button-closed": ""
  6773. },
  6774. first: {
  6775. "ui-selectmenu-button-open": "ui-corner-" + (e ? "top" : "tl"),
  6776. "ui-selectmenu-button-closed": "ui-corner-" + (e ? "top" : "left")
  6777. },
  6778. last: {
  6779. "ui-selectmenu-button-open": e ? "" : "ui-corner-tr",
  6780. "ui-selectmenu-button-closed": "ui-corner-" + (e ? "bottom" : "right")
  6781. },
  6782. only: {
  6783. "ui-selectmenu-button-open": "ui-corner-top",
  6784. "ui-selectmenu-button-closed": "ui-corner-all"
  6785. }
  6786. }[t]
  6787. }
  6788. },
  6789. _resolveClassesValues: function(n, r) {
  6790. var i = {};
  6791. return x.each(n, function(t) {
  6792. var e = r.options.classes[t] || ""
  6793. , e = x.trim(e.replace(p, ""));
  6794. i[t] = (e + " " + n[t]).replace(/\s+/g, " ")
  6795. }),
  6796. i
  6797. },
  6798. _setOption: function(t, e) {
  6799. "direction" === t && this._removeClass("ui-controlgroup-" + this.options.direction),
  6800. this._super(t, e),
  6801. "disabled" !== t ? this.refresh() : this._callChildMethod(e ? "disable" : "enable")
  6802. },
  6803. refresh: function() {
  6804. var i, o = this;
  6805. this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction),
  6806. "horizontal" === this.options.direction && this._addClass(null, "ui-helper-clearfix"),
  6807. this._initWidgets(),
  6808. i = this.childWidgets,
  6809. this.options.onlyVisible && (i = i.filter(":visible")),
  6810. i.length && (x.each(["first", "last"], function(t, e) {
  6811. var n, r = i[e]().data("ui-controlgroup-data");
  6812. r && o["_" + r.widgetName + "Options"] ? ((n = o["_" + r.widgetName + "Options"](1 === i.length ? "only" : e)).classes = o._resolveClassesValues(n.classes, r),
  6813. r.element[r.widgetName](n)) : o._updateCornerClass(i[e](), e)
  6814. }),
  6815. this._callChildMethod("refresh"))
  6816. }
  6817. }),
  6818. x.widget("ui.checkboxradio", [x.ui.formResetMixin, {
  6819. version: "1.12.1",
  6820. options: {
  6821. disabled: null,
  6822. label: null,
  6823. icon: !0,
  6824. classes: {
  6825. "ui-checkboxradio-label": "ui-corner-all",
  6826. "ui-checkboxradio-icon": "ui-corner-all"
  6827. }
  6828. },
  6829. _getCreateOptions: function() {
  6830. var t, e = this, n = this._super() || {};
  6831. return this._readType(),
  6832. t = this.element.labels(),
  6833. this.label = x(t[t.length - 1]),
  6834. this.label.length || x.error("No label found for checkboxradio widget"),
  6835. this.originalLabel = "",
  6836. this.label.contents().not(this.element[0]).each(function() {
  6837. e.originalLabel += 3 === this.nodeType ? x(this).text() : this.outerHTML
  6838. }),
  6839. this.originalLabel && (n.label = this.originalLabel),
  6840. null != (t = this.element[0].disabled) && (n.disabled = t),
  6841. n
  6842. },
  6843. _create: function() {
  6844. var t = this.element[0].checked;
  6845. this._bindFormResetHandler(),
  6846. null == this.options.disabled && (this.options.disabled = this.element[0].disabled),
  6847. this._setOption("disabled", this.options.disabled),
  6848. this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"),
  6849. this._addClass(this.label, "ui-checkboxradio-label", "ui-button ui-widget"),
  6850. "radio" === this.type && this._addClass(this.label, "ui-checkboxradio-radio-label"),
  6851. this.options.label && this.options.label !== this.originalLabel ? this._updateLabel() : this.originalLabel && (this.options.label = this.originalLabel),
  6852. this._enhance(),
  6853. t && (this._addClass(this.label, "ui-checkboxradio-checked", "ui-state-active"),
  6854. this.icon && this._addClass(this.icon, null, "ui-state-hover")),
  6855. this._on({
  6856. change: "_toggleClasses",
  6857. focus: function() {
  6858. this._addClass(this.label, null, "ui-state-focus ui-visual-focus")
  6859. },
  6860. blur: function() {
  6861. this._removeClass(this.label, null, "ui-state-focus ui-visual-focus")
  6862. }
  6863. })
  6864. },
  6865. _readType: function() {
  6866. var t = this.element[0].nodeName.toLowerCase();
  6867. this.type = this.element[0].type,
  6868. "input" === t && /radio|checkbox/.test(this.type) || x.error("Can't create checkboxradio on element.nodeName=" + t + " and element.type=" + this.type)
  6869. },
  6870. _enhance: function() {
  6871. this._updateIcon(this.element[0].checked)
  6872. },
  6873. widget: function() {
  6874. return this.label
  6875. },
  6876. _getRadioGroup: function() {
  6877. var t = this.element[0].name
  6878. , e = "input[name='" + x.ui.escapeSelector(t) + "']";
  6879. return t ? (this.form.length ? x(this.form[0].elements).filter(e) : x(e).filter(function() {
  6880. return 0 === x(this).form().length
  6881. })).not(this.element) : x([])
  6882. },
  6883. _toggleClasses: function() {
  6884. var t = this.element[0].checked;
  6885. this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t),
  6886. this.options.icon && "checkbox" === this.type && this._toggleClass(this.icon, null, "ui-icon-check ui-state-checked", t)._toggleClass(this.icon, null, "ui-icon-blank", !t),
  6887. "radio" === this.type && this._getRadioGroup().each(function() {
  6888. var t = x(this).checkboxradio("instance");
  6889. t && t._removeClass(t.label, "ui-checkboxradio-checked", "ui-state-active")
  6890. })
  6891. },
  6892. _destroy: function() {
  6893. this._unbindFormResetHandler(),
  6894. this.icon && (this.icon.remove(),
  6895. this.iconSpace.remove())
  6896. },
  6897. _setOption: function(t, e) {
  6898. if ("label" !== t || e) {
  6899. if (this._super(t, e),
  6900. "disabled" === t)
  6901. return this._toggleClass(this.label, null, "ui-state-disabled", e),
  6902. void (this.element[0].disabled = e);
  6903. this.refresh()
  6904. }
  6905. },
  6906. _updateIcon: function(t) {
  6907. var e = "ui-icon ui-icon-background ";
  6908. this.options.icon ? (this.icon || (this.icon = x("<span>"),
  6909. this.iconSpace = x("<span> </span>"),
  6910. this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")),
  6911. "checkbox" === this.type ? (e += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank",
  6912. this._removeClass(this.icon, null, t ? "ui-icon-blank" : "ui-icon-check")) : e += "ui-icon-blank",
  6913. this._addClass(this.icon, "ui-checkboxradio-icon", e),
  6914. t || this._removeClass(this.icon, null, "ui-icon-check ui-state-checked"),
  6915. this.icon.prependTo(this.label).after(this.iconSpace)) : void 0 !== this.icon && (this.icon.remove(),
  6916. this.iconSpace.remove(),
  6917. delete this.icon)
  6918. },
  6919. _updateLabel: function() {
  6920. var t = this.label.contents().not(this.element[0]);
  6921. this.icon && (t = t.not(this.icon[0])),
  6922. this.iconSpace && (t = t.not(this.iconSpace[0])),
  6923. t.remove(),
  6924. this.label.append(this.options.label)
  6925. },
  6926. refresh: function() {
  6927. var t = this.element[0].checked
  6928. , e = this.element[0].disabled;
  6929. this._updateIcon(t),
  6930. this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t),
  6931. null !== this.options.label && this._updateLabel(),
  6932. e !== this.options.disabled && this._setOptions({
  6933. disabled: e
  6934. })
  6935. }
  6936. }]),
  6937. x.ui.checkboxradio,
  6938. x.widget("ui.button", {
  6939. version: "1.12.1",
  6940. defaultElement: "<button>",
  6941. options: {
  6942. classes: {
  6943. "ui-button": "ui-corner-all"
  6944. },
  6945. disabled: null,
  6946. icon: null,
  6947. iconPosition: "beginning",
  6948. label: null,
  6949. showLabel: !0
  6950. },
  6951. _getCreateOptions: function() {
  6952. var t, e = this._super() || {};
  6953. return this.isInput = this.element.is("input"),
  6954. null != (t = this.element[0].disabled) && (e.disabled = t),
  6955. this.originalLabel = this.isInput ? this.element.val() : this.element.html(),
  6956. this.originalLabel && (e.label = this.originalLabel),
  6957. e
  6958. },
  6959. _create: function() {
  6960. !this.option.showLabel & !this.options.icon && (this.options.showLabel = !0),
  6961. null == this.options.disabled && (this.options.disabled = this.element[0].disabled || !1),
  6962. this.hasTitle = !!this.element.attr("title"),
  6963. this.options.label && this.options.label !== this.originalLabel && (this.isInput ? this.element.val(this.options.label) : this.element.html(this.options.label)),
  6964. this._addClass("ui-button", "ui-widget"),
  6965. this._setOption("disabled", this.options.disabled),
  6966. this._enhance(),
  6967. this.element.is("a") && this._on({
  6968. keyup: function(t) {
  6969. t.keyCode === x.ui.keyCode.SPACE && (t.preventDefault(),
  6970. this.element[0].click ? this.element[0].click() : this.element.trigger("click"))
  6971. }
  6972. })
  6973. },
  6974. _enhance: function() {
  6975. this.element.is("button") || this.element.attr("role", "button"),
  6976. this.options.icon && (this._updateIcon("icon", this.options.icon),
  6977. this._updateTooltip())
  6978. },
  6979. _updateTooltip: function() {
  6980. this.title = this.element.attr("title"),
  6981. this.options.showLabel || this.title || this.element.attr("title", this.options.label)
  6982. },
  6983. _updateIcon: function(t, e) {
  6984. var n = "iconPosition" !== t
  6985. , r = n ? this.options.iconPosition : e
  6986. , t = "top" === r || "bottom" === r;
  6987. this.icon ? n && this._removeClass(this.icon, null, this.options.icon) : (this.icon = x("<span>"),
  6988. this._addClass(this.icon, "ui-button-icon", "ui-icon"),
  6989. this.options.showLabel || this._addClass("ui-button-icon-only")),
  6990. n && this._addClass(this.icon, null, e),
  6991. this._attachIcon(r),
  6992. t ? (this._addClass(this.icon, null, "ui-widget-icon-block"),
  6993. this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = x("<span> </span>"),
  6994. this._addClass(this.iconSpace, "ui-button-icon-space")),
  6995. this._removeClass(this.icon, null, "ui-wiget-icon-block"),
  6996. this._attachIconSpace(r))
  6997. },
  6998. _destroy: function() {
  6999. this.element.removeAttr("role"),
  7000. this.icon && this.icon.remove(),
  7001. this.iconSpace && this.iconSpace.remove(),
  7002. this.hasTitle || this.element.removeAttr("title")
  7003. },
  7004. _attachIconSpace: function(t) {
  7005. this.icon[/^(?:end|bottom)/.test(t) ? "before" : "after"](this.iconSpace)
  7006. },
  7007. _attachIcon: function(t) {
  7008. this.element[/^(?:end|bottom)/.test(t) ? "append" : "prepend"](this.icon)
  7009. },
  7010. _setOptions: function(t) {
  7011. var e = (void 0 === t.showLabel ? this.options : t).showLabel
  7012. , n = (void 0 === t.icon ? this.options : t).icon;
  7013. e || n || (t.showLabel = !0),
  7014. this._super(t)
  7015. },
  7016. _setOption: function(t, e) {
  7017. "icon" === t && (e ? this._updateIcon(t, e) : this.icon && (this.icon.remove(),
  7018. this.iconSpace && this.iconSpace.remove())),
  7019. "iconPosition" === t && this._updateIcon(t, e),
  7020. "showLabel" === t && (this._toggleClass("ui-button-icon-only", null, !e),
  7021. this._updateTooltip()),
  7022. "label" === t && (this.isInput ? this.element.val(e) : (this.element.html(e),
  7023. this.icon && (this._attachIcon(this.options.iconPosition),
  7024. this._attachIconSpace(this.options.iconPosition)))),
  7025. this._super(t, e),
  7026. "disabled" === t && (this._toggleClass(null, "ui-state-disabled", e),
  7027. (this.element[0].disabled = e) && this.element.blur())
  7028. },
  7029. refresh: function() {
  7030. var t = this.element.is("input, button") ? this.element[0].disabled : this.element.hasClass("ui-button-disabled");
  7031. t !== this.options.disabled && this._setOptions({
  7032. disabled: t
  7033. }),
  7034. this._updateTooltip()
  7035. }
  7036. }),
  7037. !1 !== x.uiBackCompat && (x.widget("ui.button", x.ui.button, {
  7038. options: {
  7039. text: !0,
  7040. icons: {
  7041. primary: null,
  7042. secondary: null
  7043. }
  7044. },
  7045. _create: function() {
  7046. this.options.showLabel && !this.options.text && (this.options.showLabel = this.options.text),
  7047. !this.options.showLabel && this.options.text && (this.options.text = this.options.showLabel),
  7048. this.options.icon || !this.options.icons.primary && !this.options.icons.secondary ? this.options.icon && (this.options.icons.primary = this.options.icon) : this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary,
  7049. this.options.iconPosition = "end"),
  7050. this._super()
  7051. },
  7052. _setOption: function(t, e) {
  7053. "text" !== t ? ("showLabel" === t && (this.options.text = e),
  7054. "icon" === t && (this.options.icons.primary = e),
  7055. "icons" === t && (e.primary ? (this._super("icon", e.primary),
  7056. this._super("iconPosition", "beginning")) : e.secondary && (this._super("icon", e.secondary),
  7057. this._super("iconPosition", "end"))),
  7058. this._superApply(arguments)) : this._super("showLabel", e)
  7059. }
  7060. }),
  7061. x.fn.button = (f = x.fn.button,
  7062. function() {
  7063. return !this.length || this.length && "INPUT" !== this[0].tagName || this.length && "INPUT" === this[0].tagName && "checkbox" !== this.attr("type") && "radio" !== this.attr("type") ? f.apply(this, arguments) : (x.ui.checkboxradio || x.error("Checkboxradio widget missing"),
  7064. 0 === arguments.length ? this.checkboxradio({
  7065. icon: !1
  7066. }) : this.checkboxradio.apply(this, arguments))
  7067. }
  7068. ),
  7069. x.fn.buttonset = function() {
  7070. return x.ui.controlgroup || x.error("Controlgroup widget missing"),
  7071. "option" === arguments[0] && "items" === arguments[1] && arguments[2] ? this.controlgroup.apply(this, [arguments[0], "items.button", arguments[2]]) : "option" === arguments[0] && "items" === arguments[1] ? this.controlgroup.apply(this, [arguments[0], "items.button"]) : ("object" == typeof arguments[0] && arguments[0].items && (arguments[0].items = {
  7072. button: arguments[0].items
  7073. }),
  7074. this.controlgroup.apply(this, arguments))
  7075. }
  7076. ),
  7077. x.ui.button,
  7078. x.ui.safeActiveElement = function(e) {
  7079. var n;
  7080. try {
  7081. n = e.activeElement
  7082. } catch (t) {
  7083. n = e.body
  7084. }
  7085. return (n = n || e.body).nodeName || (n = e.body),
  7086. n
  7087. }
  7088. ,
  7089. x.widget("ui.menu", {
  7090. version: "1.12.1",
  7091. defaultElement: "<ul>",
  7092. delay: 300,
  7093. options: {
  7094. icons: {
  7095. submenu: "ui-icon-caret-1-e"
  7096. },
  7097. items: "> *",
  7098. menus: "ul",
  7099. position: {
  7100. my: "left top",
  7101. at: "right top"
  7102. },
  7103. role: "menu",
  7104. blur: null,
  7105. focus: null,
  7106. select: null
  7107. },
  7108. _create: function() {
  7109. this.activeMenu = this.element,
  7110. this.mouseHandled = !1,
  7111. this.element.uniqueId().attr({
  7112. role: this.options.role,
  7113. tabIndex: 0
  7114. }),
  7115. this._addClass("ui-menu", "ui-widget ui-widget-content"),
  7116. this._on({
  7117. "mousedown .ui-menu-item": function(t) {
  7118. t.preventDefault()
  7119. },
  7120. "click .ui-menu-item": function(t) {
  7121. var e = x(t.target)
  7122. , n = x(x.ui.safeActiveElement(this.document[0]));
  7123. !this.mouseHandled && e.not(".ui-state-disabled").length && (this.select(t),
  7124. t.isPropagationStopped() || (this.mouseHandled = !0),
  7125. e.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && n.closest(".ui-menu").length && (this.element.trigger("focus", [!0]),
  7126. this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer)))
  7127. },
  7128. "mouseenter .ui-menu-item": function(t) {
  7129. var e, n;
  7130. this.previousFilter || (e = x(t.target).closest(".ui-menu-item"),
  7131. n = x(t.currentTarget),
  7132. e[0] === n[0] && (this._removeClass(n.siblings().children(".ui-state-active"), null, "ui-state-active"),
  7133. this.focus(t, n)))
  7134. },
  7135. mouseleave: "collapseAll",
  7136. "mouseleave .ui-menu": "collapseAll",
  7137. focus: function(t, e) {
  7138. var n = this.active || this.element.find(this.options.items).eq(0);
  7139. e || this.focus(t, n)
  7140. },
  7141. blur: function(t) {
  7142. this._delay(function() {
  7143. x.contains(this.element[0], x.ui.safeActiveElement(this.document[0])) || this.collapseAll(t)
  7144. })
  7145. },
  7146. keydown: "_keydown"
  7147. }),
  7148. this.refresh(),
  7149. this._on(this.document, {
  7150. click: function(t) {
  7151. this._closeOnDocumentClick(t) && this.collapseAll(t),
  7152. this.mouseHandled = !1
  7153. }
  7154. })
  7155. },
  7156. _destroy: function() {
  7157. var t = this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");
  7158. this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),
  7159. t.children().each(function() {
  7160. var t = x(this);
  7161. t.data("ui-menu-submenu-caret") && t.remove()
  7162. })
  7163. },
  7164. _keydown: function(t) {
  7165. var e, n, r, i = !0;
  7166. switch (t.keyCode) {
  7167. case x.ui.keyCode.PAGE_UP:
  7168. this.previousPage(t);
  7169. break;
  7170. case x.ui.keyCode.PAGE_DOWN:
  7171. this.nextPage(t);
  7172. break;
  7173. case x.ui.keyCode.HOME:
  7174. this._move("first", "first", t);
  7175. break;
  7176. case x.ui.keyCode.END:
  7177. this._move("last", "last", t);
  7178. break;
  7179. case x.ui.keyCode.UP:
  7180. this.previous(t);
  7181. break;
  7182. case x.ui.keyCode.DOWN:
  7183. this.next(t);
  7184. break;
  7185. case x.ui.keyCode.LEFT:
  7186. this.collapse(t);
  7187. break;
  7188. case x.ui.keyCode.RIGHT:
  7189. this.active && !this.active.is(".ui-state-disabled") && this.expand(t);
  7190. break;
  7191. case x.ui.keyCode.ENTER:
  7192. case x.ui.keyCode.SPACE:
  7193. this._activate(t);
  7194. break;
  7195. case x.ui.keyCode.ESCAPE:
  7196. this.collapse(t);
  7197. break;
  7198. default:
  7199. i = !1,
  7200. e = this.previousFilter || "",
  7201. r = !1,
  7202. n = 96 <= t.keyCode && t.keyCode <= 105 ? (t.keyCode - 96).toString() : String.fromCharCode(t.keyCode),
  7203. clearTimeout(this.filterTimer),
  7204. n === e ? r = !0 : n = e + n,
  7205. e = this._filterMenuItems(n),
  7206. (e = r && -1 !== e.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : e).length || (n = String.fromCharCode(t.keyCode),
  7207. e = this._filterMenuItems(n)),
  7208. e.length ? (this.focus(t, e),
  7209. this.previousFilter = n,
  7210. this.filterTimer = this._delay(function() {
  7211. delete this.previousFilter
  7212. }, 1e3)) : delete this.previousFilter
  7213. }
  7214. i && t.preventDefault()
  7215. },
  7216. _activate: function(t) {
  7217. this.active && !this.active.is(".ui-state-disabled") && (this.active.children("[aria-haspopup='true']").length ? this.expand(t) : this.select(t))
  7218. },
  7219. refresh: function() {
  7220. var t, e, r = this, i = this.options.icons.submenu, n = this.element.find(this.options.menus);
  7221. this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length),
  7222. e = n.filter(":not(.ui-menu)").hide().attr({
  7223. role: this.options.role,
  7224. "aria-hidden": "true",
  7225. "aria-expanded": "false"
  7226. }).each(function() {
  7227. var t = x(this)
  7228. , e = t.prev()
  7229. , n = x("<span>").data("ui-menu-submenu-caret", !0);
  7230. r._addClass(n, "ui-menu-icon", "ui-icon " + i),
  7231. e.attr("aria-haspopup", "true").prepend(n),
  7232. t.attr("aria-labelledby", e.attr("id"))
  7233. }),
  7234. this._addClass(e, "ui-menu", "ui-widget ui-widget-content ui-front"),
  7235. (t = n.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function() {
  7236. var t = x(this);
  7237. r._isDivider(t) && r._addClass(t, "ui-menu-divider", "ui-widget-content")
  7238. }),
  7239. n = (e = t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({
  7240. tabIndex: -1,
  7241. role: this._itemRole()
  7242. }),
  7243. this._addClass(e, "ui-menu-item")._addClass(n, "ui-menu-item-wrapper"),
  7244. t.filter(".ui-state-disabled").attr("aria-disabled", "true"),
  7245. this.active && !x.contains(this.element[0], this.active[0]) && this.blur()
  7246. },
  7247. _itemRole: function() {
  7248. return {
  7249. menu: "menuitem",
  7250. listbox: "option"
  7251. }[this.options.role]
  7252. },
  7253. _setOption: function(t, e) {
  7254. var n;
  7255. "icons" === t && (n = this.element.find(".ui-menu-icon"),
  7256. this._removeClass(n, null, this.options.icons.submenu)._addClass(n, null, e.submenu)),
  7257. this._super(t, e)
  7258. },
  7259. _setOptionDisabled: function(t) {
  7260. this._super(t),
  7261. this.element.attr("aria-disabled", String(t)),
  7262. this._toggleClass(null, "ui-state-disabled", !!t)
  7263. },
  7264. focus: function(t, e) {
  7265. var n;
  7266. this.blur(t, t && "focus" === t.type),
  7267. this._scrollIntoView(e),
  7268. this.active = e.first(),
  7269. n = this.active.children(".ui-menu-item-wrapper"),
  7270. this._addClass(n, null, "ui-state-active"),
  7271. this.options.role && this.element.attr("aria-activedescendant", n.attr("id")),
  7272. n = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),
  7273. this._addClass(n, null, "ui-state-active"),
  7274. t && "keydown" === t.type ? this._close() : this.timer = this._delay(function() {
  7275. this._close()
  7276. }, this.delay),
  7277. (n = e.children(".ui-menu")).length && t && /^mouse/.test(t.type) && this._startOpening(n),
  7278. this.activeMenu = e.parent(),
  7279. this._trigger("focus", t, {
  7280. item: e
  7281. })
  7282. },
  7283. _scrollIntoView: function(t) {
  7284. var e, n, r;
  7285. this._hasScroll() && (n = parseFloat(x.css(this.activeMenu[0], "borderTopWidth")) || 0,
  7286. r = parseFloat(x.css(this.activeMenu[0], "paddingTop")) || 0,
  7287. e = t.offset().top - this.activeMenu.offset().top - n - r,
  7288. n = this.activeMenu.scrollTop(),
  7289. r = this.activeMenu.height(),
  7290. t = t.outerHeight(),
  7291. e < 0 ? this.activeMenu.scrollTop(n + e) : r < e + t && this.activeMenu.scrollTop(n + e - r + t))
  7292. },
  7293. blur: function(t, e) {
  7294. e || clearTimeout(this.timer),
  7295. this.active && (this._removeClass(this.active.children(".ui-menu-item-wrapper"), null, "ui-state-active"),
  7296. this._trigger("blur", t, {
  7297. item: this.active
  7298. }),
  7299. this.active = null)
  7300. },
  7301. _startOpening: function(t) {
  7302. clearTimeout(this.timer),
  7303. "true" === t.attr("aria-hidden") && (this.timer = this._delay(function() {
  7304. this._close(),
  7305. this._open(t)
  7306. }, this.delay))
  7307. },
  7308. _open: function(t) {
  7309. var e = x.extend({
  7310. of: this.active
  7311. }, this.options.position);
  7312. clearTimeout(this.timer),
  7313. this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"),
  7314. t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(e)
  7315. },
  7316. collapseAll: function(e, n) {
  7317. clearTimeout(this.timer),
  7318. this.timer = this._delay(function() {
  7319. var t = n ? this.element : x(e && e.target).closest(this.element.find(".ui-menu"));
  7320. t.length || (t = this.element),
  7321. this._close(t),
  7322. this.blur(e),
  7323. this._removeClass(t.find(".ui-state-active"), null, "ui-state-active"),
  7324. this.activeMenu = t
  7325. }, this.delay)
  7326. },
  7327. _close: function(t) {
  7328. (t = t || (this.active ? this.active.parent() : this.element)).find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false")
  7329. },
  7330. _closeOnDocumentClick: function(t) {
  7331. return !x(t.target).closest(".ui-menu").length
  7332. },
  7333. _isDivider: function(t) {
  7334. return !/[^\-\u2014\u2013\s]/.test(t.text())
  7335. },
  7336. collapse: function(t) {
  7337. var e = this.active && this.active.parent().closest(".ui-menu-item", this.element);
  7338. e && e.length && (this._close(),
  7339. this.focus(t, e))
  7340. },
  7341. expand: function(t) {
  7342. var e = this.active && this.active.children(".ui-menu ").find(this.options.items).first();
  7343. e && e.length && (this._open(e.parent()),
  7344. this._delay(function() {
  7345. this.focus(t, e)
  7346. }))
  7347. },
  7348. next: function(t) {
  7349. this._move("next", "first", t)
  7350. },
  7351. previous: function(t) {
  7352. this._move("prev", "last", t)
  7353. },
  7354. isFirstItem: function() {
  7355. return this.active && !this.active.preval(".ui-menu-item").length
  7356. },
  7357. isLastItem: function() {
  7358. return this.active && !this.active.nextAll(".ui-menu-item").length
  7359. },
  7360. _move: function(t, e, n) {
  7361. var r;
  7362. this.active && (r = "first" === t || "last" === t ? this.active["first" === t ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[t + "All"](".ui-menu-item").eq(0)),
  7363. r && r.length && this.active || (r = this.activeMenu.find(this.options.items)[e]()),
  7364. this.focus(n, r)
  7365. },
  7366. nextPage: function(t) {
  7367. var e, n, r;
  7368. this.active ? this.isLastItem() || (this._hasScroll() ? (n = this.active.offset().top,
  7369. r = this.element.height(),
  7370. this.active.nextAll(".ui-menu-item").each(function() {
  7371. return (e = x(this)).offset().top - n - r < 0
  7372. }),
  7373. this.focus(t, e)) : this.focus(t, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]())) : this.next(t)
  7374. },
  7375. previousPage: function(t) {
  7376. var e, n, r;
  7377. this.active ? this.isFirstItem() || (this._hasScroll() ? (n = this.active.offset().top,
  7378. r = this.element.height(),
  7379. this.active.preval(".ui-menu-item").each(function() {
  7380. return 0 < (e = x(this)).offset().top - n + r
  7381. }),
  7382. this.focus(t, e)) : this.focus(t, this.activeMenu.find(this.options.items).first())) : this.next(t)
  7383. },
  7384. _hasScroll: function() {
  7385. return this.element.outerHeight() < this.element.prop("scrollHeight")
  7386. },
  7387. select: function(t) {
  7388. this.active = this.active || x(t.target).closest(".ui-menu-item");
  7389. var e = {
  7390. item: this.active
  7391. };
  7392. this.active.has(".ui-menu").length || this.collapseAll(t, !0),
  7393. this._trigger("select", t, e)
  7394. },
  7395. _filterMenuItems: function(t) {
  7396. var t = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
  7397. , e = new RegExp("^" + t, "i");
  7398. return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function() {
  7399. return e.test(x.trim(x(this).children(".ui-menu-item-wrapper").text()))
  7400. })
  7401. }
  7402. }),
  7403. x.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());
  7404. var d = !1;
  7405. function g(e) {
  7406. return function() {
  7407. var t = this.element.val();
  7408. e.apply(this, arguments),
  7409. this._refresh(),
  7410. t !== this.element.val() && this._trigger("change")
  7411. }
  7412. }
  7413. x(document).on("mouseup", function() {
  7414. d = !1
  7415. }),
  7416. x.widget("ui.mouse", {
  7417. version: "1.12.1",
  7418. options: {
  7419. cancel: "input, textarea, button, select, option",
  7420. distance: 1,
  7421. delay: 0
  7422. },
  7423. _mouseInit: function() {
  7424. var e = this;
  7425. this.element.on("mousedown." + this.widgetName, function(t) {
  7426. return e._mouseDown(t)
  7427. }).on("click." + this.widgetName, function(t) {
  7428. if (!0 === x.data(t.target, e.widgetName + ".preventClickEvent"))
  7429. return x.removeData(t.target, e.widgetName + ".preventClickEvent"),
  7430. t.stopImmediatePropagation(),
  7431. !1
  7432. }),
  7433. this.started = !1
  7434. },
  7435. _mouseDestroy: function() {
  7436. this.element.off("." + this.widgetName),
  7437. this._mouseMoveDelegate && this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate)
  7438. },
  7439. _mouseDown: function(t) {
  7440. if (!d) {
  7441. this._mouseMoved = !1,
  7442. this._mouseStarted && this._mouseUp(t),
  7443. this._mouseDownEvent = t;
  7444. var e = this
  7445. , n = 1 === t.which
  7446. , r = !("string" != typeof this.options.cancel || !t.target.nodeName) && x(t.target).closest(this.options.cancel).length;
  7447. return !(n && !r && this._mouseCapture(t)) || (this.mouseDelayMet = !this.options.delay,
  7448. this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
  7449. e.mouseDelayMet = !0
  7450. }, this.options.delay)),
  7451. this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = !1 !== this._mouseStart(t),
  7452. !this._mouseStarted) ? (t.preventDefault(),
  7453. !0) : (!0 === x.data(t.target, this.widgetName + ".preventClickEvent") && x.removeData(t.target, this.widgetName + ".preventClickEvent"),
  7454. this._mouseMoveDelegate = function(t) {
  7455. return e._mouseMove(t)
  7456. }
  7457. ,
  7458. this._mouseUpDelegate = function(t) {
  7459. return e._mouseUp(t)
  7460. }
  7461. ,
  7462. this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate),
  7463. t.preventDefault(),
  7464. d = !0))
  7465. }
  7466. },
  7467. _mouseMove: function(t) {
  7468. if (this._mouseMoved) {
  7469. if (x.ui.ie && (!document.documentMode || document.documentMode < 9) && !t.button)
  7470. return this._mouseUp(t);
  7471. if (!t.which)
  7472. if (t.originalEvent.altKey || t.originalEvent.ctrlKey || t.originalEvent.metaKey || t.originalEvent.shiftKey)
  7473. this.ignoreMissingWhich = !0;
  7474. else if (!this.ignoreMissingWhich)
  7475. return this._mouseUp(t)
  7476. }
  7477. return (t.which || t.button) && (this._mouseMoved = !0),
  7478. this._mouseStarted ? (this._mouseDrag(t),
  7479. t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = !1 !== this._mouseStart(this._mouseDownEvent, t),
  7480. this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)),
  7481. !this._mouseStarted)
  7482. },
  7483. _mouseUp: function(t) {
  7484. this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate),
  7485. this._mouseStarted && (this._mouseStarted = !1,
  7486. t.target === this._mouseDownEvent.target && x.data(t.target, this.widgetName + ".preventClickEvent", !0),
  7487. this._mouseStop(t)),
  7488. this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer),
  7489. delete this._mouseDelayTimer),
  7490. this.ignoreMissingWhich = !1,
  7491. d = !1,
  7492. t.preventDefault()
  7493. },
  7494. _mouseDistanceMet: function(t) {
  7495. return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance
  7496. },
  7497. _mouseDelayMet: function() {
  7498. return this.mouseDelayMet
  7499. },
  7500. _mouseStart: function() { },
  7501. _mouseDrag: function() { },
  7502. _mouseStop: function() { },
  7503. _mouseCapture: function() {
  7504. return !0
  7505. }
  7506. }),
  7507. x.widget("ui.selectmenu", [x.ui.formResetMixin, {
  7508. version: "1.12.1",
  7509. defaultElement: "<select>",
  7510. options: {
  7511. appendTo: null,
  7512. classes: {
  7513. "ui-selectmenu-button-open": "ui-corner-top",
  7514. "ui-selectmenu-button-closed": "ui-corner-all"
  7515. },
  7516. disabled: null,
  7517. icons: {
  7518. button: "ui-icon-triangle-1-s"
  7519. },
  7520. position: {
  7521. my: "left top",
  7522. at: "left bottom",
  7523. collision: "none"
  7524. },
  7525. width: !1,
  7526. change: null,
  7527. close: null,
  7528. focus: null,
  7529. open: null,
  7530. select: null
  7531. },
  7532. _create: function() {
  7533. var t = this.element.uniqueId().attr("id");
  7534. this.ids = {
  7535. element: t,
  7536. button: t + "-button",
  7537. menu: t + "-menu"
  7538. },
  7539. this._drawButton(),
  7540. this._drawMenu(),
  7541. this._bindFormResetHandler(),
  7542. this._rendered = !1,
  7543. this.menuItems = x()
  7544. },
  7545. _drawButton: function() {
  7546. var t, e = this, n = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex);
  7547. this.labels = this.element.labels().attr("for", this.ids.button),
  7548. this._on(this.labels, {
  7549. click: function(t) {
  7550. this.button.focus(),
  7551. t.preventDefault()
  7552. }
  7553. }),
  7554. this.element.hide(),
  7555. this.button = x("<span>", {
  7556. tabindex: this.options.disabled ? -1 : 0,
  7557. id: this.ids.button,
  7558. role: "combobox",
  7559. "aria-expanded": "false",
  7560. "aria-autocomplete": "list",
  7561. "aria-owns": this.ids.menu,
  7562. "aria-haspopup": "true",
  7563. title: this.element.attr("title")
  7564. }).insertAfter(this.element),
  7565. this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"),
  7566. t = x("<span>").appendTo(this.button),
  7567. this._addClass(t, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button),
  7568. this.buttonItem = this._renderButtonItem(n).appendTo(this.button),
  7569. !1 !== this.options.width && this._resizeButton(),
  7570. this._on(this.button, this._buttonEvents),
  7571. this.button.one("focusin", function() {
  7572. e._rendered || e._refreshMenu()
  7573. })
  7574. },
  7575. _drawMenu: function() {
  7576. var n = this;
  7577. this.menu = x("<ul>", {
  7578. "aria-hidden": "true",
  7579. "aria-labelledby": this.ids.button,
  7580. id: this.ids.menu
  7581. }),
  7582. this.menuWrap = x("<div>").append(this.menu),
  7583. this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"),
  7584. this.menuWrap.appendTo(this._appendTo()),
  7585. this.menuInstance = this.menu.menu({
  7586. classes: {
  7587. "ui-menu": "ui-corner-bottom"
  7588. },
  7589. role: "listbox",
  7590. select: function(t, e) {
  7591. t.preventDefault(),
  7592. n._setSelection(),
  7593. n._select(e.item.data("ui-selectmenu-item"), t)
  7594. },
  7595. focus: function(t, e) {
  7596. e = e.item.data("ui-selectmenu-item");
  7597. null != n.focusIndex && e.index !== n.focusIndex && (n._trigger("focus", t, {
  7598. item: e
  7599. }),
  7600. n.isOpen || n._select(e, t)),
  7601. n.focusIndex = e.index,
  7602. n.button.attr("aria-activedescendant", n.menuItems.eq(e.index).attr("id"))
  7603. }
  7604. }).menu("instance"),
  7605. this.menuInstance._off(this.menu, "mouseleave"),
  7606. this.menuInstance._closeOnDocumentClick = function() {
  7607. return !1
  7608. }
  7609. ,
  7610. this.menuInstance._isDivider = function() {
  7611. return !1
  7612. }
  7613. },
  7614. refresh: function() {
  7615. this._refreshMenu(),
  7616. this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item") || {})),
  7617. null === this.options.width && this._resizeButton()
  7618. },
  7619. _refreshMenu: function() {
  7620. var t = this.element.find("option");
  7621. this.menu.empty(),
  7622. this._parseOptions(t),
  7623. this._renderMenu(this.menu, this.items),
  7624. this.menuInstance.refresh(),
  7625. this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),
  7626. this._rendered = !0,
  7627. t.length && (t = this._getSelectedItem(),
  7628. this.menuInstance.focus(null, t),
  7629. this._setAria(t.data("ui-selectmenu-item")),
  7630. this._setOption("disabled", this.element.prop("disabled")))
  7631. },
  7632. open: function(t) {
  7633. this.options.disabled || (this._rendered ? (this._removeClass(this.menu.find(".ui-state-active"), null, "ui-state-active"),
  7634. this.menuInstance.focus(null, this._getSelectedItem())) : this._refreshMenu(),
  7635. this.menuItems.length && (this.isOpen = !0,
  7636. this._toggleAttr(),
  7637. this._resizeMenu(),
  7638. this._position(),
  7639. this._on(this.document, this._documentClick),
  7640. this._trigger("open", t)))
  7641. },
  7642. _position: function() {
  7643. this.menuWrap.position(x.extend({
  7644. of: this.button
  7645. }, this.options.position))
  7646. },
  7647. close: function(t) {
  7648. this.isOpen && (this.isOpen = !1,
  7649. this._toggleAttr(),
  7650. this.range = null,
  7651. this._off(this.document),
  7652. this._trigger("close", t))
  7653. },
  7654. widget: function() {
  7655. return this.button
  7656. },
  7657. menuWidget: function() {
  7658. return this.menu
  7659. },
  7660. _renderButtonItem: function(t) {
  7661. var e = x("<span>");
  7662. return this._setText(e, t.label),
  7663. this._addClass(e, "ui-selectmenu-text"),
  7664. e
  7665. },
  7666. _renderMenu: function(r, t) {
  7667. var i = this
  7668. , o = "";
  7669. x.each(t, function(t, e) {
  7670. var n;
  7671. e.optgroup !== o && (n = x("<li>", {
  7672. text: e.optgroup
  7673. }),
  7674. i._addClass(n, "ui-selectmenu-optgroup", "ui-menu-divider" + (e.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")),
  7675. n.appendTo(r),
  7676. o = e.optgroup),
  7677. i._renderItemData(r, e)
  7678. })
  7679. },
  7680. _renderItemData: function(t, e) {
  7681. return this._renderItem(t, e).data("ui-selectmenu-item", e)
  7682. },
  7683. _renderItem: function(t, e) {
  7684. var n = x("<li>")
  7685. , r = x("<div>", {
  7686. title: e.element.attr("title")
  7687. });
  7688. return e.disabled && this._addClass(n, null, "ui-state-disabled"),
  7689. this._setText(r, e.label),
  7690. n.append(r).appendTo(t)
  7691. },
  7692. _setText: function(t, e) {
  7693. e ? t.text(e) : t.html("&#160;")
  7694. },
  7695. _move: function(t, e) {
  7696. var n, r = ".ui-menu-item";
  7697. this.isOpen ? n = this.menuItems.eq(this.focusIndex).parent("li") : (n = this.menuItems.eq(this.element[0].selectedIndex).parent("li"),
  7698. r += ":not(.ui-state-disabled)"),
  7699. (r = "first" === t || "last" === t ? n["first" === t ? "prevAll" : "nextAll"](r).eq(-1) : n[t + "All"](r).eq(0)).length && this.menuInstance.focus(e, r)
  7700. },
  7701. _getSelectedItem: function() {
  7702. return this.menuItems.eq(this.element[0].selectedIndex).parent("li")
  7703. },
  7704. _toggle: function(t) {
  7705. this[this.isOpen ? "close" : "open"](t)
  7706. },
  7707. _setSelection: function() {
  7708. var t;
  7709. this.range && (window.getSelection ? ((t = window.getSelection()).removeAllRanges(),
  7710. t.addRange(this.range)) : this.range.select(),
  7711. this.button.focus())
  7712. },
  7713. _documentClick: {
  7714. mousedown: function(t) {
  7715. this.isOpen && (x(t.target).closest(".ui-selectmenu-menu, #" + x.ui.escapeSelector(this.ids.button)).length || this.close(t))
  7716. }
  7717. },
  7718. _buttonEvents: {
  7719. mousedown: function() {
  7720. var t;
  7721. window.getSelection ? (t = window.getSelection()).rangeCount && (this.range = t.getRangeAt(0)) : this.range = document.selection.createRange()
  7722. },
  7723. click: function(t) {
  7724. this._setSelection(),
  7725. this._toggle(t)
  7726. },
  7727. keydown: function(t) {
  7728. var e = !0;
  7729. switch (t.keyCode) {
  7730. case x.ui.keyCode.TAB:
  7731. case x.ui.keyCode.ESCAPE:
  7732. this.close(t),
  7733. e = !1;
  7734. break;
  7735. case x.ui.keyCode.ENTER:
  7736. this.isOpen && this._selectFocusedItem(t);
  7737. break;
  7738. case x.ui.keyCode.UP:
  7739. t.altKey ? this._toggle(t) : this._move("prev", t);
  7740. break;
  7741. case x.ui.keyCode.DOWN:
  7742. t.altKey ? this._toggle(t) : this._move("next", t);
  7743. break;
  7744. case x.ui.keyCode.SPACE:
  7745. this.isOpen ? this._selectFocusedItem(t) : this._toggle(t);
  7746. break;
  7747. case x.ui.keyCode.LEFT:
  7748. this._move("prev", t);
  7749. break;
  7750. case x.ui.keyCode.RIGHT:
  7751. this._move("next", t);
  7752. break;
  7753. case x.ui.keyCode.HOME:
  7754. case x.ui.keyCode.PAGE_UP:
  7755. this._move("first", t);
  7756. break;
  7757. case x.ui.keyCode.END:
  7758. case x.ui.keyCode.PAGE_DOWN:
  7759. this._move("last", t);
  7760. break;
  7761. default:
  7762. this.menu.trigger(t),
  7763. e = !1
  7764. }
  7765. e && t.preventDefault()
  7766. }
  7767. },
  7768. _selectFocusedItem: function(t) {
  7769. var e = this.menuItems.eq(this.focusIndex).parent("li");
  7770. e.hasClass("ui-state-disabled") || this._select(e.data("ui-selectmenu-item"), t)
  7771. },
  7772. _select: function(t, e) {
  7773. var n = this.element[0].selectedIndex;
  7774. this.element[0].selectedIndex = t.index,
  7775. this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(t)),
  7776. this._setAria(t),
  7777. this._trigger("select", e, {
  7778. item: t
  7779. }),
  7780. t.index !== n && this._trigger("change", e, {
  7781. item: t
  7782. }),
  7783. this.close(e)
  7784. },
  7785. _setAria: function(t) {
  7786. t = this.menuItems.eq(t.index).attr("id");
  7787. this.button.attr({
  7788. "aria-labelledby": t,
  7789. "aria-activedescendant": t
  7790. }),
  7791. this.menu.attr("aria-activedescendant", t)
  7792. },
  7793. _setOption: function(t, e) {
  7794. var n;
  7795. "icons" === t && (n = this.button.find("span.ui-icon"),
  7796. this._removeClass(n, null, this.options.icons.button)._addClass(n, null, e.button)),
  7797. this._super(t, e),
  7798. "appendTo" === t && this.menuWrap.appendTo(this._appendTo()),
  7799. "width" === t && this._resizeButton()
  7800. },
  7801. _setOptionDisabled: function(t) {
  7802. this._super(t),
  7803. this.menuInstance.option("disabled", t),
  7804. this.button.attr("aria-disabled", t),
  7805. this._toggleClass(this.button, null, "ui-state-disabled", t),
  7806. this.element.prop("disabled", t),
  7807. t ? (this.button.attr("tabindex", -1),
  7808. this.close()) : this.button.attr("tabindex", 0)
  7809. },
  7810. _appendTo: function() {
  7811. var t = this.options.appendTo;
  7812. return (t = t && (t.jquery || t.nodeType ? x(t) : this.document.find(t).eq(0))) && t[0] || (t = this.element.closest(".ui-front, dialog")),
  7813. t.length || (t = this.document[0].body),
  7814. t
  7815. },
  7816. _toggleAttr: function() {
  7817. this.button.attr("aria-expanded", this.isOpen),
  7818. this._removeClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"))._addClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"))._toggleClass(this.menuWrap, "ui-selectmenu-open", null, this.isOpen),
  7819. this.menu.attr("aria-hidden", !this.isOpen)
  7820. },
  7821. _resizeButton: function() {
  7822. var t = this.options.width;
  7823. !1 !== t ? (null === t && (t = this.element.show().outerWidth(),
  7824. this.element.hide()),
  7825. this.button.outerWidth(t)) : this.button.css("width", "")
  7826. },
  7827. _resizeMenu: function() {
  7828. this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1))
  7829. },
  7830. _getCreateOptions: function() {
  7831. var t = this._super();
  7832. return t.disabled = this.element.prop("disabled"),
  7833. t
  7834. },
  7835. _parseOptions: function(t) {
  7836. var n = this
  7837. , r = [];
  7838. t.each(function(t, e) {
  7839. r.push(n._parseOption(x(e), t))
  7840. }),
  7841. this.items = r
  7842. },
  7843. _parseOption: function(t, e) {
  7844. var n = t.parent("optgroup");
  7845. return {
  7846. element: t,
  7847. index: e,
  7848. value: t.val(),
  7849. label: t.text(),
  7850. optgroup: n.attr("label") || "",
  7851. disabled: n.prop("disabled") || t.prop("disabled")
  7852. }
  7853. },
  7854. _destroy: function() {
  7855. this._unbindFormResetHandler(),
  7856. this.menuWrap.remove(),
  7857. this.button.remove(),
  7858. this.element.show(),
  7859. this.element.removeUniqueId(),
  7860. this.labels.attr("for", this.ids.element)
  7861. }
  7862. }]),
  7863. x.widget("ui.slider", x.ui.mouse, {
  7864. version: "1.12.1",
  7865. widgetEventPrefix: "slide",
  7866. options: {
  7867. animate: !1,
  7868. classes: {
  7869. "ui-slider": "ui-corner-all",
  7870. "ui-slider-handle": "ui-corner-all",
  7871. "ui-slider-range": "ui-corner-all ui-widget-header"
  7872. },
  7873. distance: 0,
  7874. max: 100,
  7875. min: 0,
  7876. orientation: "horizontal",
  7877. range: !1,
  7878. step: 1,
  7879. value: 0,
  7880. values: null,
  7881. change: null,
  7882. slide: null,
  7883. start: null,
  7884. stop: null
  7885. },
  7886. numPages: 5,
  7887. _create: function() {
  7888. this._keySliding = !1,
  7889. this._mouseSliding = !1,
  7890. this._animateOff = !0,
  7891. this._handleIndex = null,
  7892. this._detectOrientation(),
  7893. this._mouseInit(),
  7894. this._calculateNewMax(),
  7895. this._addClass("ui-slider ui-slider-" + this.orientation, "ui-widget ui-widget-content"),
  7896. this._refresh(),
  7897. this._animateOff = !1
  7898. },
  7899. _refresh: function() {
  7900. this._createRange(),
  7901. this._createHandles(),
  7902. this._setupEvents(),
  7903. this._refreshValue()
  7904. },
  7905. _createHandles: function() {
  7906. var t, e = this.options, n = this.element.find(".ui-slider-handle"), r = [], i = e.values && e.values.length || 1;
  7907. for (n.length > i && (n.slice(i).remove(),
  7908. n = n.slice(0, i)),
  7909. t = n.length; t < i; t++)
  7910. r.push("<span tabindex='0'></span>");
  7911. this.handles = n.add(x(r.join("")).appendTo(this.element)),
  7912. this._addClass(this.handles, "ui-slider-handle", "ui-state-default"),
  7913. this.handle = this.handles.eq(0),
  7914. this.handles.each(function(t) {
  7915. x(this).data("ui-slider-handle-index", t).attr("tabIndex", 0)
  7916. })
  7917. },
  7918. _createRange: function() {
  7919. var t = this.options;
  7920. t.range ? (!0 === t.range && (t.values ? t.values.length && 2 !== t.values.length ? t.values = [t.values[0], t.values[0]] : x.isArray(t.values) && (t.values = t.values.slice(0)) : t.values = [this._valueMin(), this._valueMin()]),
  7921. this.range && this.range.length ? (this._removeClass(this.range, "ui-slider-range-min ui-slider-range-max"),
  7922. this.range.css({
  7923. left: "",
  7924. bottom: ""
  7925. })) : (this.range = x("<div>").appendTo(this.element),
  7926. this._addClass(this.range, "ui-slider-range")),
  7927. "min" !== t.range && "max" !== t.range || this._addClass(this.range, "ui-slider-range-" + t.range)) : (this.range && this.range.remove(),
  7928. this.range = null)
  7929. },
  7930. _setupEvents: function() {
  7931. this._off(this.handles),
  7932. this._on(this.handles, this._handleEvents),
  7933. this._hoverable(this.handles),
  7934. this._focusable(this.handles)
  7935. },
  7936. _destroy: function() {
  7937. this.handles.remove(),
  7938. this.range && this.range.remove(),
  7939. this._mouseDestroy()
  7940. },
  7941. _mouseCapture: function(t) {
  7942. var n, r, i, o, e, s, a = this, u = this.options;
  7943. return !u.disabled && (this.elementSize = {
  7944. width: this.element.outerWidth(),
  7945. height: this.element.outerHeight()
  7946. },
  7947. this.elementOffset = this.element.offset(),
  7948. s = {
  7949. x: t.pageX,
  7950. y: t.pageY
  7951. },
  7952. n = this._normValueFromMouse(s),
  7953. r = this._valueMax() - this._valueMin() + 1,
  7954. this.handles.each(function(t) {
  7955. var e = Math.abs(n - a.values(t));
  7956. (e < r || r === e && (t === a._lastChangedValue || a.values(t) === u.min)) && (r = e,
  7957. i = x(this),
  7958. o = t)
  7959. }),
  7960. !1 !== this._start(t, o) && (this._mouseSliding = !0,
  7961. this._handleIndex = o,
  7962. this._addClass(i, null, "ui-state-active"),
  7963. i.trigger("focus"),
  7964. e = i.offset(),
  7965. s = !x(t.target).parents().addBack().is(".ui-slider-handle"),
  7966. this._clickOffset = s ? {
  7967. left: 0,
  7968. top: 0
  7969. } : {
  7970. left: t.pageX - e.left,
  7971. top: t.pageY - e.top - i.height() / 2 - (parseInt(i.css("borderTopWidth"), 10) || 0) - (parseInt(i.css("borderBottomWidth"), 10) || 0) + (parseInt(i.css("marginTop"), 10) || 0)
  7972. },
  7973. this._animateOff = !0))
  7974. },
  7975. _mouseStart: function() {
  7976. return !0
  7977. },
  7978. _mouseDrag: function(t) {
  7979. var e = {
  7980. x: t.pageX,
  7981. y: t.pageY
  7982. }
  7983. , e = this._normValueFromMouse(e);
  7984. return this._slide(t, this._handleIndex, e),
  7985. !1
  7986. },
  7987. _mouseStop: function(t) {
  7988. return this._removeClass(this.handles, null, "ui-state-active"),
  7989. this._mouseSliding = !1,
  7990. this._stop(t, this._handleIndex),
  7991. this._change(t, this._handleIndex),
  7992. this._handleIndex = null,
  7993. this._clickOffset = null,
  7994. this._animateOff = !1
  7995. },
  7996. _detectOrientation: function() {
  7997. this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
  7998. },
  7999. _normValueFromMouse: function(t) {
  8000. var e, t = "horizontal" === this.orientation ? (e = this.elementSize.width,
  8001. t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height,
  8002. t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0));
  8003. return 1 < (t = t / e) && (t = 1),
  8004. t < 0 && (t = 0),
  8005. "vertical" === this.orientation && (t = 1 - t),
  8006. e = this._valueMax() - this._valueMin(),
  8007. e = this._valueMin() + t * e,
  8008. this._trimAlignValue(e)
  8009. },
  8010. _uiHash: function(t, e, n) {
  8011. var r = {
  8012. handle: this.handles[t],
  8013. handleIndex: t,
  8014. value: void 0 !== e ? e : this.value()
  8015. };
  8016. return this._hasMultipleValues() && (r.value = void 0 !== e ? e : this.values(t),
  8017. r.values = n || this.values()),
  8018. r
  8019. },
  8020. _hasMultipleValues: function() {
  8021. return this.options.values && this.options.values.length
  8022. },
  8023. _start: function(t, e) {
  8024. return this._trigger("start", t, this._uiHash(e))
  8025. },
  8026. _slide: function(t, e, n) {
  8027. var r, i = this.value(), o = this.values();
  8028. this._hasMultipleValues() && (r = this.values(e ? 0 : 1),
  8029. i = this.values(e),
  8030. 2 === this.options.values.length && !0 === this.options.range && (n = 0 === e ? Math.min(r, n) : Math.max(r, n)),
  8031. o[e] = n),
  8032. n !== i && !1 !== this._trigger("slide", t, this._uiHash(e, n, o)) && (this._hasMultipleValues() ? this.values(e, n) : this.value(n))
  8033. },
  8034. _stop: function(t, e) {
  8035. this._trigger("stop", t, this._uiHash(e))
  8036. },
  8037. _change: function(t, e) {
  8038. this._keySliding || this._mouseSliding || (this._lastChangedValue = e,
  8039. this._trigger("change", t, this._uiHash(e)))
  8040. },
  8041. value: function(t) {
  8042. return arguments.length ? (this.options.value = this._trimAlignValue(t),
  8043. this._refreshValue(),
  8044. void this._change(null, 0)) : this._value()
  8045. },
  8046. values: function(t, e) {
  8047. var n, r, i;
  8048. if (1 < arguments.length)
  8049. return this.options.values[t] = this._trimAlignValue(e),
  8050. this._refreshValue(),
  8051. void this._change(null, t);
  8052. if (!arguments.length)
  8053. return this._values();
  8054. if (!x.isArray(t))
  8055. return this._hasMultipleValues() ? this._values(t) : this.value();
  8056. for (n = this.options.values,
  8057. r = t,
  8058. i = 0; i < n.length; i += 1)
  8059. n[i] = this._trimAlignValue(r[i]),
  8060. this._change(null, i);
  8061. this._refreshValue()
  8062. },
  8063. _setOption: function(t, e) {
  8064. var n, r = 0;
  8065. switch ("range" === t && !0 === this.options.range && ("min" === e ? (this.options.value = this._values(0),
  8066. this.options.values = null) : "max" === e && (this.options.value = this._values(this.options.values.length - 1),
  8067. this.options.values = null)),
  8068. x.isArray(this.options.values) && (r = this.options.values.length),
  8069. this._super(t, e),
  8070. t) {
  8071. case "orientation":
  8072. this._detectOrientation(),
  8073. this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-" + this.orientation),
  8074. this._refreshValue(),
  8075. this.options.range && this._refreshRange(e),
  8076. this.handles.css("horizontal" === e ? "bottom" : "left", "");
  8077. break;
  8078. case "value":
  8079. this._animateOff = !0,
  8080. this._refreshValue(),
  8081. this._change(null, 0),
  8082. this._animateOff = !1;
  8083. break;
  8084. case "values":
  8085. for (this._animateOff = !0,
  8086. this._refreshValue(),
  8087. n = r - 1; 0 <= n; n--)
  8088. this._change(null, n);
  8089. this._animateOff = !1;
  8090. break;
  8091. case "step":
  8092. case "min":
  8093. case "max":
  8094. this._animateOff = !0,
  8095. this._calculateNewMax(),
  8096. this._refreshValue(),
  8097. this._animateOff = !1;
  8098. break;
  8099. case "range":
  8100. this._animateOff = !0,
  8101. this._refresh(),
  8102. this._animateOff = !1
  8103. }
  8104. },
  8105. _setOptionDisabled: function(t) {
  8106. this._super(t),
  8107. this._toggleClass(null, "ui-state-disabled", !!t)
  8108. },
  8109. _value: function() {
  8110. var t = this.options.value;
  8111. return this._trimAlignValue(t)
  8112. },
  8113. _values: function(t) {
  8114. var e, n, r;
  8115. if (arguments.length)
  8116. return e = this.options.values[t],
  8117. this._trimAlignValue(e);
  8118. if (this._hasMultipleValues()) {
  8119. for (n = this.options.values.slice(),
  8120. r = 0; r < n.length; r += 1)
  8121. n[r] = this._trimAlignValue(n[r]);
  8122. return n
  8123. }
  8124. return []
  8125. },
  8126. _trimAlignValue: function(t) {
  8127. if (t <= this._valueMin())
  8128. return this._valueMin();
  8129. if (t >= this._valueMax())
  8130. return this._valueMax();
  8131. var e = 0 < this.options.step ? this.options.step : 1
  8132. , n = (t - this._valueMin()) % e
  8133. , t = t - n;
  8134. return 2 * Math.abs(n) >= e && (t += 0 < n ? e : -e),
  8135. parseFloat(t.toFixed(5))
  8136. },
  8137. _calculateNewMax: function() {
  8138. var t = this.options.max
  8139. , e = this._valueMin()
  8140. , n = this.options.step;
  8141. (t = Math.round((t - e) / n) * n + e) > this.options.max && (t -= n),
  8142. this.max = parseFloat(t.toFixed(this._precision()))
  8143. },
  8144. _precision: function() {
  8145. var t = this._precisionOf(this.options.step);
  8146. return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))),
  8147. t
  8148. },
  8149. _precisionOf: function(t) {
  8150. var e = t.toString()
  8151. , t = e.indexOf(".");
  8152. return -1 === t ? 0 : e.length - t - 1
  8153. },
  8154. _valueMin: function() {
  8155. return this.options.min
  8156. },
  8157. _valueMax: function() {
  8158. return this.max
  8159. },
  8160. _refreshRange: function(t) {
  8161. "vertical" === t && this.range.css({
  8162. width: "",
  8163. left: ""
  8164. }),
  8165. "horizontal" === t && this.range.css({
  8166. height: "",
  8167. bottom: ""
  8168. })
  8169. },
  8170. _refreshValue: function() {
  8171. var e, n, t, r, i, o = this.options.range, s = this.options, a = this, u = !this._animateOff && s.animate, c = {};
  8172. this._hasMultipleValues() ? this.handles.each(function(t) {
  8173. n = (a.values(t) - a._valueMin()) / (a._valueMax() - a._valueMin()) * 100,
  8174. c["horizontal" === a.orientation ? "left" : "bottom"] = n + "%",
  8175. x(this).stop(1, 1)[u ? "animate" : "css"](c, s.animate),
  8176. !0 === a.options.range && ("horizontal" === a.orientation ? (0 === t && a.range.stop(1, 1)[u ? "animate" : "css"]({
  8177. left: n + "%"
  8178. }, s.animate),
  8179. 1 === t && a.range[u ? "animate" : "css"]({
  8180. width: n - e + "%"
  8181. }, {
  8182. queue: !1,
  8183. duration: s.animate
  8184. })) : (0 === t && a.range.stop(1, 1)[u ? "animate" : "css"]({
  8185. bottom: n + "%"
  8186. }, s.animate),
  8187. 1 === t && a.range[u ? "animate" : "css"]({
  8188. height: n - e + "%"
  8189. }, {
  8190. queue: !1,
  8191. duration: s.animate
  8192. }))),
  8193. e = n
  8194. }) : (t = this.value(),
  8195. r = this._valueMin(),
  8196. i = this._valueMax(),
  8197. n = i !== r ? (t - r) / (i - r) * 100 : 0,
  8198. c["horizontal" === this.orientation ? "left" : "bottom"] = n + "%",
  8199. this.handle.stop(1, 1)[u ? "animate" : "css"](c, s.animate),
  8200. "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({
  8201. width: n + "%"
  8202. }, s.animate),
  8203. "max" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({
  8204. width: 100 - n + "%"
  8205. }, s.animate),
  8206. "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({
  8207. height: n + "%"
  8208. }, s.animate),
  8209. "max" === o && "vertical" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({
  8210. height: 100 - n + "%"
  8211. }, s.animate))
  8212. },
  8213. _handleEvents: {
  8214. keydown: function(t) {
  8215. var e, n, r, i = x(t.target).data("ui-slider-handle-index");
  8216. switch (t.keyCode) {
  8217. case x.ui.keyCode.HOME:
  8218. case x.ui.keyCode.END:
  8219. case x.ui.keyCode.PAGE_UP:
  8220. case x.ui.keyCode.PAGE_DOWN:
  8221. case x.ui.keyCode.UP:
  8222. case x.ui.keyCode.RIGHT:
  8223. case x.ui.keyCode.DOWN:
  8224. case x.ui.keyCode.LEFT:
  8225. if (t.preventDefault(),
  8226. !this._keySliding && (this._keySliding = !0,
  8227. this._addClass(x(t.target), null, "ui-state-active"),
  8228. !1 === this._start(t, i)))
  8229. return
  8230. }
  8231. switch (r = this.options.step,
  8232. e = n = this._hasMultipleValues() ? this.values(i) : this.value(),
  8233. t.keyCode) {
  8234. case x.ui.keyCode.HOME:
  8235. n = this._valueMin();
  8236. break;
  8237. case x.ui.keyCode.END:
  8238. n = this._valueMax();
  8239. break;
  8240. case x.ui.keyCode.PAGE_UP:
  8241. n = this._trimAlignValue(e + (this._valueMax() - this._valueMin()) / this.numPages);
  8242. break;
  8243. case x.ui.keyCode.PAGE_DOWN:
  8244. n = this._trimAlignValue(e - (this._valueMax() - this._valueMin()) / this.numPages);
  8245. break;
  8246. case x.ui.keyCode.UP:
  8247. case x.ui.keyCode.RIGHT:
  8248. if (e === this._valueMax())
  8249. return;
  8250. n = this._trimAlignValue(e + r);
  8251. break;
  8252. case x.ui.keyCode.DOWN:
  8253. case x.ui.keyCode.LEFT:
  8254. if (e === this._valueMin())
  8255. return;
  8256. n = this._trimAlignValue(e - r)
  8257. }
  8258. this._slide(t, i, n)
  8259. },
  8260. keyup: function(t) {
  8261. var e = x(t.target).data("ui-slider-handle-index");
  8262. this._keySliding && (this._keySliding = !1,
  8263. this._stop(t, e),
  8264. this._change(t, e),
  8265. this._removeClass(x(t.target), null, "ui-state-active"))
  8266. }
  8267. }
  8268. }),
  8269. x.widget("ui.spinner", {
  8270. version: "1.12.1",
  8271. defaultElement: "<input>",
  8272. widgetEventPrefix: "spin",
  8273. options: {
  8274. classes: {
  8275. "ui-spinner": "ui-corner-all",
  8276. "ui-spinner-down": "ui-corner-br",
  8277. "ui-spinner-up": "ui-corner-tr"
  8278. },
  8279. culture: null,
  8280. icons: {
  8281. down: "ui-icon-triangle-1-s",
  8282. up: "ui-icon-triangle-1-n"
  8283. },
  8284. incremental: !0,
  8285. max: null,
  8286. min: null,
  8287. numberFormat: null,
  8288. page: 10,
  8289. step: 1,
  8290. change: null,
  8291. spin: null,
  8292. start: null,
  8293. stop: null
  8294. },
  8295. _create: function() {
  8296. this._setOption("max", this.options.max),
  8297. this._setOption("min", this.options.min),
  8298. this._setOption("step", this.options.step),
  8299. "" !== this.value() && this._value(this.element.val(), !0),
  8300. this._draw(),
  8301. this._on(this._events),
  8302. this._refresh(),
  8303. this._on(this.window, {
  8304. beforeunload: function() {
  8305. this.element.removeAttr("autocomplete")
  8306. }
  8307. })
  8308. },
  8309. _getCreateOptions: function() {
  8310. var r = this._super()
  8311. , i = this.element;
  8312. return x.each(["min", "max", "step"], function(t, e) {
  8313. var n = i.attr(e);
  8314. null != n && n.length && (r[e] = n)
  8315. }),
  8316. r
  8317. },
  8318. _events: {
  8319. keydown: function(t) {
  8320. this._start(t) && this._keydown(t) && t.preventDefault()
  8321. },
  8322. keyup: "_stop",
  8323. focus: function() {
  8324. this.previous = this.element.val()
  8325. },
  8326. blur: function(t) {
  8327. this.cancelBlur ? delete this.cancelBlur : (this._stop(),
  8328. this._refresh(),
  8329. this.previous !== this.element.val() && this._trigger("change", t))
  8330. },
  8331. mousewheel: function(t, e) {
  8332. if (e) {
  8333. if (!this.spinning && !this._start(t))
  8334. return !1;
  8335. this._spin((0 < e ? 1 : -1) * this.options.step, t),
  8336. clearTimeout(this.mousewheelTimer),
  8337. this.mousewheelTimer = this._delay(function() {
  8338. this.spinning && this._stop(t)
  8339. }, 100),
  8340. t.preventDefault()
  8341. }
  8342. },
  8343. "mousedown .ui-spinner-button": function(t) {
  8344. var e;
  8345. function n() {
  8346. this.element[0] === x.ui.safeActiveElement(this.document[0]) || (this.element.trigger("focus"),
  8347. this.previous = e,
  8348. this._delay(function() {
  8349. this.previous = e
  8350. }))
  8351. }
  8352. e = this.element[0] === x.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(),
  8353. t.preventDefault(),
  8354. n.call(this),
  8355. this.cancelBlur = !0,
  8356. this._delay(function() {
  8357. delete this.cancelBlur,
  8358. n.call(this)
  8359. }),
  8360. !1 !== this._start(t) && this._repeat(null, x(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t)
  8361. },
  8362. "mouseup .ui-spinner-button": "_stop",
  8363. "mouseenter .ui-spinner-button": function(t) {
  8364. if (x(t.currentTarget).hasClass("ui-state-active"))
  8365. return !1 !== this._start(t) && void this._repeat(null, x(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t)
  8366. },
  8367. "mouseleave .ui-spinner-button": "_stop"
  8368. },
  8369. _enhance: function() {
  8370. this.uiSpinner = this.element.attr("autocomplete", "off").wrap("<span>").parent().append("<a></a><a></a>")
  8371. },
  8372. _draw: function() {
  8373. this._enhance(),
  8374. this._addClass(this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content"),
  8375. this._addClass("ui-spinner-input"),
  8376. this.element.attr("role", "spinbutton"),
  8377. this.buttons = this.uiSpinner.children("a").attr("tabIndex", -1).attr("aria-hidden", !0).button({
  8378. classes: {
  8379. "ui-button": ""
  8380. }
  8381. }),
  8382. this._removeClass(this.buttons, "ui-corner-all"),
  8383. this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"),
  8384. this._addClass(this.buttons.last(), "ui-spinner-button ui-spinner-down"),
  8385. this.buttons.first().button({
  8386. icon: this.options.icons.up,
  8387. showLabel: !1
  8388. }),
  8389. this.buttons.last().button({
  8390. icon: this.options.icons.down,
  8391. showLabel: !1
  8392. }),
  8393. this.buttons.height() > Math.ceil(.5 * this.uiSpinner.height()) && 0 < this.uiSpinner.height() && this.uiSpinner.height(this.uiSpinner.height())
  8394. },
  8395. _keydown: function(t) {
  8396. var e = this.options
  8397. , n = x.ui.keyCode;
  8398. switch (t.keyCode) {
  8399. case n.UP:
  8400. return this._repeat(null, 1, t),
  8401. !0;
  8402. case n.DOWN:
  8403. return this._repeat(null, -1, t),
  8404. !0;
  8405. case n.PAGE_UP:
  8406. return this._repeat(null, e.page, t),
  8407. !0;
  8408. case n.PAGE_DOWN:
  8409. return this._repeat(null, -e.page, t),
  8410. !0
  8411. }
  8412. return !1
  8413. },
  8414. _start: function(t) {
  8415. return !(!this.spinning && !1 === this._trigger("start", t)) && (this.counter || (this.counter = 1),
  8416. this.spinning = !0)
  8417. },
  8418. _repeat: function(t, e, n) {
  8419. t = t || 500,
  8420. clearTimeout(this.timer),
  8421. this.timer = this._delay(function() {
  8422. this._repeat(40, e, n)
  8423. }, t),
  8424. this._spin(e * this.options.step, n)
  8425. },
  8426. _spin: function(t, e) {
  8427. var n = this.value() || 0;
  8428. this.counter || (this.counter = 1),
  8429. n = this._adjustValue(n + t * this._increment(this.counter)),
  8430. this.spinning && !1 === this._trigger("spin", e, {
  8431. value: n
  8432. }) || (this._value(n),
  8433. this.counter++)
  8434. },
  8435. _increment: function(t) {
  8436. var e = this.options.incremental;
  8437. return e ? x.isFunction(e) ? e(t) : Math.floor(t * t * t / 5e4 - t * t / 500 + 17 * t / 200 + 1) : 1
  8438. },
  8439. _precision: function() {
  8440. var t = this._precisionOf(this.options.step);
  8441. return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))),
  8442. t
  8443. },
  8444. _precisionOf: function(t) {
  8445. var e = t.toString()
  8446. , t = e.indexOf(".");
  8447. return -1 === t ? 0 : e.length - t - 1
  8448. },
  8449. _adjustValue: function(t) {
  8450. var e, n = this.options, r = t - (e = null !== n.min ? n.min : 0);
  8451. return t = e + Math.round(r / n.step) * n.step,
  8452. t = parseFloat(t.toFixed(this._precision())),
  8453. null !== n.max && t > n.max ? n.max : null !== n.min && t < n.min ? n.min : t
  8454. },
  8455. _stop: function(t) {
  8456. this.spinning && (clearTimeout(this.timer),
  8457. clearTimeout(this.mousewheelTimer),
  8458. this.counter = 0,
  8459. this.spinning = !1,
  8460. this._trigger("stop", t))
  8461. },
  8462. _setOption: function(t, e) {
  8463. var n;
  8464. if ("culture" === t || "numberFormat" === t)
  8465. return n = this._parse(this.element.val()),
  8466. this.options[t] = e,
  8467. void this.element.val(this._format(n));
  8468. "max" !== t && "min" !== t && "step" !== t || "string" == typeof e && (e = this._parse(e)),
  8469. "icons" === t && (n = this.buttons.first().find(".ui-icon"),
  8470. this._removeClass(n, null, this.options.icons.up),
  8471. this._addClass(n, null, e.up),
  8472. n = this.buttons.last().find(".ui-icon"),
  8473. this._removeClass(n, null, this.options.icons.down),
  8474. this._addClass(n, null, e.down)),
  8475. this._super(t, e)
  8476. },
  8477. _setOptionDisabled: function(t) {
  8478. this._super(t),
  8479. this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!t),
  8480. this.element.prop("disabled", !!t),
  8481. this.buttons.button(t ? "disable" : "enable")
  8482. },
  8483. _setOptions: g(function(t) {
  8484. this._super(t)
  8485. }),
  8486. _parse: function(t) {
  8487. return "string" == typeof t && "" !== t && (t = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(t, 10, this.options.culture) : +t),
  8488. "" === t || isNaN(t) ? null : t
  8489. },
  8490. _format: function(t) {
  8491. return "" === t ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(t, this.options.numberFormat, this.options.culture) : t
  8492. },
  8493. _refresh: function() {
  8494. this.element.attr({
  8495. "aria-valuemin": this.options.min,
  8496. "aria-valuemax": this.options.max,
  8497. "aria-valuenow": this._parse(this.element.val())
  8498. })
  8499. },
  8500. isValid: function() {
  8501. var t = this.value();
  8502. return null !== t && t === this._adjustValue(t)
  8503. },
  8504. _value: function(t, e) {
  8505. var n;
  8506. "" !== t && null !== (n = this._parse(t)) && (e || (n = this._adjustValue(n)),
  8507. t = this._format(n)),
  8508. this.element.val(t),
  8509. this._refresh()
  8510. },
  8511. _destroy: function() {
  8512. this.element.prop("disabled", !1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),
  8513. this.uiSpinner.replaceWith(this.element)
  8514. },
  8515. stepUp: g(function(t) {
  8516. this._stepUp(t)
  8517. }),
  8518. _stepUp: function(t) {
  8519. this._start() && (this._spin((t || 1) * this.options.step),
  8520. this._stop())
  8521. },
  8522. stepDown: g(function(t) {
  8523. this._stepDown(t)
  8524. }),
  8525. _stepDown: function(t) {
  8526. this._start() && (this._spin((t || 1) * -this.options.step),
  8527. this._stop())
  8528. },
  8529. pageUp: g(function(t) {
  8530. this._stepUp((t || 1) * this.options.page)
  8531. }),
  8532. pageDown: g(function(t) {
  8533. this._stepDown((t || 1) * this.options.page)
  8534. }),
  8535. value: function(t) {
  8536. if (!arguments.length)
  8537. return this._parse(this.element.val());
  8538. g(this._value).call(this, t)
  8539. },
  8540. widget: function() {
  8541. return this.uiSpinner
  8542. }
  8543. }),
  8544. !1 !== x.uiBackCompat && x.widget("ui.spinner", x.ui.spinner, {
  8545. _enhance: function() {
  8546. this.uiSpinner = this.element.attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())
  8547. },
  8548. _uiSpinnerHtml: function() {
  8549. return "<span>"
  8550. },
  8551. _buttonHtml: function() {
  8552. return "<a></a><a></a>"
  8553. }
  8554. }),
  8555. x.ui.spinner
  8556. };
  8557. "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery)
  8558. }(),
  8559. function(t) {
  8560. "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? module.exports = t : t(jQuery)
  8561. }(function(l) {
  8562. function e(t) {
  8563. var e, n = t || window.event, r = g.call(arguments, 1), i = 0, o = 0, s = 0, a = 0, u = 0, c = 0;
  8564. if ((t = l.event.fix(n)).type = "mousewheel",
  8565. "detail" in n && (s = -1 * n.detail),
  8566. "wheelDelta" in n && (s = n.wheelDelta),
  8567. "wheelDeltaY" in n && (s = n.wheelDeltaY),
  8568. "wheelDeltaX" in n && (o = -1 * n.wheelDeltaX),
  8569. "axis" in n && n.axis === n.HORIZONTAL_AXIS && (o = -1 * s,
  8570. s = 0),
  8571. i = 0 === s ? o : s,
  8572. "deltaY" in n && (i = s = -1 * n.deltaY),
  8573. "deltaX" in n && (o = n.deltaX,
  8574. 0 === s && (i = -1 * o)),
  8575. 0 !== s || 0 !== o) {
  8576. 1 === n.deltaMode ? (i *= e = l.data(this, "mousewheel-line-height"),
  8577. s *= e,
  8578. o *= e) : 2 === n.deltaMode && (i *= e = l.data(this, "mousewheel-page-height"),
  8579. s *= e,
  8580. o *= e);
  8581. var a = Math.max(Math.abs(s), Math.abs(o));
  8582. return d && !(a < d) || f(n, d = a) && (d /= 40),
  8583. f(n, a) && (i /= 40,
  8584. o /= 40,
  8585. s /= 40),
  8586. i = Math[1 <= i ? "floor" : "ceil"](i / d),
  8587. o = Math[1 <= o ? "floor" : "ceil"](o / d),
  8588. s = Math[1 <= s ? "floor" : "ceil"](s / d),
  8589. m.settings.normalizeOffset && this.getBoundingClientRect && (a = this.getBoundingClientRect(),
  8590. u = t.clientX - a.left,
  8591. c = t.clientY - a.top),
  8592. t.deltaX = o,
  8593. t.deltaY = s,
  8594. t.deltaFactor = d,
  8595. t.offsetX = u,
  8596. t.offsetY = c,
  8597. t.deltaMode = 0,
  8598. r.unshift(t, i, o, s),
  8599. p && clearTimeout(p),
  8600. p = setTimeout(h, 200),
  8601. (l.event.dispatch || l.event.handle).apply(this, r)
  8602. }
  8603. }
  8604. function h() {
  8605. d = null
  8606. }
  8607. function f(t, e) {
  8608. return m.settings.adjustOldDeltas && "mousewheel" === t.type && e % 120 == 0
  8609. }
  8610. var p, d, t = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], n = "onwheel" in document || 9 <= document.documentMode ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], g = Array.prototype.slice;
  8611. if (l.event.fixHooks)
  8612. for (var r = t.length; r;)
  8613. l.event.fixHooks[t[--r]] = l.event.mouseHooks;
  8614. var m = l.event.special.mousewheel = {
  8615. version: "3.1.12",
  8616. setup: function() {
  8617. if (this.addEventListener)
  8618. for (var t = n.length; t;)
  8619. this.addEventListener(n[--t], e, !1);
  8620. else
  8621. this.onmousewheel = e;
  8622. l.data(this, "mousewheel-line-height", m.getLineHeight(this)),
  8623. l.data(this, "mousewheel-page-height", m.getPageHeight(this))
  8624. },
  8625. teardown: function() {
  8626. if (this.removeEventListener)
  8627. for (var t = n.length; t;)
  8628. this.removeEventListener(n[--t], e, !1);
  8629. else
  8630. this.onmousewheel = null;
  8631. l.removeData(this, "mousewheel-line-height"),
  8632. l.removeData(this, "mousewheel-page-height")
  8633. },
  8634. getLineHeight: function(t) {
  8635. var e = l(t)
  8636. , t = e["offsetParent" in l.fn ? "offsetParent" : "parent"]();
  8637. return t.length || (t = l("body")),
  8638. parseInt(t.css("fontSize"), 10) || parseInt(e.css("fontSize"), 10) || 16
  8639. },
  8640. getPageHeight: function(t) {
  8641. return l(t).height()
  8642. },
  8643. settings: {
  8644. adjustOldDeltas: !0,
  8645. normalizeOffset: !0
  8646. }
  8647. };
  8648. l.fn.extend({
  8649. mousewheel: function(t) {
  8650. return t ? this.bind("mousewheel", t) : this.trigger("mousewheel")
  8651. },
  8652. unmousewheel: function(t) {
  8653. return this.unbind("mousewheel", t)
  8654. }
  8655. })
  8656. }),
  8657. function(t) {
  8658. var e;
  8659. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : ("undefined" != typeof window ? e = window : "undefined" != typeof global ? e = global : "undefined" != typeof self && (e = self),
  8660. e.html2canvas = t())
  8661. }(function() {
  8662. return function r(i, o, s) {
  8663. function a(n, t) {
  8664. if (!o[n]) {
  8665. if (!i[n]) {
  8666. var e = "function" == typeof require && require;
  8667. if (!t && e)
  8668. return e(n, !0);
  8669. if (u)
  8670. return u(n, !0);
  8671. e = new Error("Cannot find module '" + n + "'");
  8672. throw e.code = "MODULE_NOT_FOUND",
  8673. e
  8674. }
  8675. e = o[n] = {
  8676. exports: {}
  8677. };
  8678. i[n][0].call(e.exports, function(t) {
  8679. var e = i[n][1][t];
  8680. return a(e || t)
  8681. }, e, e.exports, r, i, o, s)
  8682. }
  8683. return o[n].exports
  8684. }
  8685. for (var u = "function" == typeof require && require, t = 0; t < s.length; t++)
  8686. a(s[t]);
  8687. return a
  8688. }({
  8689. 1: [function(t, P, N) {
  8690. (function(j) {
  8691. !function(t) {
  8692. function v(t) {
  8693. throw RangeError(g[t])
  8694. }
  8695. function n(t, e) {
  8696. for (var n = t.length; n--;)
  8697. t[n] = e(t[n]);
  8698. return t
  8699. }
  8700. function e(t, e) {
  8701. return n(t.split(p), e).join(".")
  8702. }
  8703. function y(t) {
  8704. for (var e, n, r = [], i = 0, o = t.length; i < o;)
  8705. 55296 <= (e = t.charCodeAt(i++)) && e <= 56319 && i < o ? 56320 == (64512 & (n = t.charCodeAt(i++))) ? r.push(((1023 & e) << 10) + (1023 & n) + 65536) : (r.push(e),
  8706. i--) : r.push(e);
  8707. return r
  8708. }
  8709. function d(t) {
  8710. return n(t, function(t) {
  8711. var e = "";
  8712. return 65535 < t && (e += A((t -= 65536) >>> 10 & 1023 | 55296),
  8713. t = 56320 | 1023 & t),
  8714. e + A(t)
  8715. }).join("")
  8716. }
  8717. function b(t, e) {
  8718. return t + 22 + 75 * (t < 26) - ((0 != e) << 5)
  8719. }
  8720. function w(t, e, n) {
  8721. var r = 0;
  8722. for (t = n ? T(t / l) : t >> 1,
  8723. t += T(t / e); m * k >> 1 < t; r += x)
  8724. t = T(t / m);
  8725. return T(r + (m + 1) * t / (t + c))
  8726. }
  8727. function r(t) {
  8728. var e, n, r, i, o, s, a, u = [], c = t.length, l = 0, h = O, f = S, p = t.lastIndexOf(E);
  8729. for (p < 0 && (p = 0),
  8730. n = 0; n < p; ++n)
  8731. 128 <= t.charCodeAt(n) && v("not-basic"),
  8732. u.push(t.charCodeAt(n));
  8733. for (r = 0 < p ? p + 1 : 0; r < c;) {
  8734. for (i = l,
  8735. o = 1,
  8736. s = x; c <= r && v("invalid-input"),
  8737. a = t.charCodeAt(r++),
  8738. (x <= (a = a - 48 < 10 ? a - 22 : a - 65 < 26 ? a - 65 : a - 97 < 26 ? a - 97 : x) || a > T((_ - l) / o)) && v("overflow"),
  8739. l += a * o,
  8740. !(a < (a = s <= f ? C : f + k <= s ? k : s - f)); s += x)
  8741. o > T(_ / (a = x - a)) && v("overflow"),
  8742. o *= a;
  8743. f = w(l - i, e = u.length + 1, 0 == i),
  8744. T(l / e) > _ - h && v("overflow"),
  8745. h += T(l / e),
  8746. l %= e,
  8747. u.splice(l++, 0, h)
  8748. }
  8749. return d(u)
  8750. }
  8751. function i(t) {
  8752. for (var e, n, r, i, o, s, a, u, c, l, h, f = [], p = (t = y(t)).length, d = O, g = S, m = e = 0; m < p; ++m)
  8753. (u = t[m]) < 128 && f.push(A(u));
  8754. for (n = r = f.length,
  8755. r && f.push(E); n < p;) {
  8756. for (i = _,
  8757. m = 0; m < p; ++m)
  8758. d <= (u = t[m]) && u < i && (i = u);
  8759. for (i - d > T((_ - e) / (c = n + 1)) && v("overflow"),
  8760. e += (i - d) * c,
  8761. d = i,
  8762. m = 0; m < p; ++m)
  8763. if ((u = t[m]) < d && ++e > _ && v("overflow"),
  8764. u == d) {
  8765. for (o = e,
  8766. s = x; !(o < (a = s <= g ? C : g + k <= s ? k : s - g)); s += x)
  8767. h = o - a,
  8768. l = x - a,
  8769. f.push(A(b(a + h % l, 0))),
  8770. o = T(h / l);
  8771. f.push(A(b(o, 0))),
  8772. g = w(e, c, n == r),
  8773. e = 0,
  8774. ++n
  8775. }
  8776. ++e,
  8777. ++d
  8778. }
  8779. return f.join("")
  8780. }
  8781. var o = "object" == typeof N && N
  8782. , s = "object" == typeof P && P && P.exports == o && P
  8783. , a = "object" == typeof j && j;
  8784. a.global !== a && a.window !== a || (t = a);
  8785. var u, _ = 2147483647, x = 36, C = 1, k = 26, c = 38, l = 700, S = 72, O = 128, E = "-", h = /^xn--/, f = /[^ -~]/, p = /\x2E|\u3002|\uFF0E|\uFF61/g, g = {
  8786. overflow: "Overflow: input needs wider integers to process",
  8787. "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  8788. "invalid-input": "Invalid input"
  8789. }, m = x - C, T = Math.floor, A = String.fromCharCode, I = {
  8790. version: "1.2.4",
  8791. ucs2: {
  8792. decode: y,
  8793. encode: d
  8794. },
  8795. decode: r,
  8796. encode: i,
  8797. toASCII: function(t) {
  8798. return e(t, function(t) {
  8799. return f.test(t) ? "xn--" + i(t) : t
  8800. })
  8801. },
  8802. toUnicode: function(t) {
  8803. return e(t, function(t) {
  8804. return h.test(t) ? r(t.slice(4).toLowerCase()) : t
  8805. })
  8806. }
  8807. };
  8808. if (0,
  8809. o && !o.nodeType)
  8810. if (s)
  8811. s.exports = I;
  8812. else
  8813. for (u in I)
  8814. I.hasOwnProperty(u) && (o[u] = I[u]);
  8815. else
  8816. t.punycode = I
  8817. }(this)
  8818. }
  8819. ).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  8820. }
  8821. , {}],
  8822. 2: [function(t, e) {
  8823. function i(t, e) {
  8824. for (var n = 3 === t.nodeType ? document.createTextNode(t.nodeValue) : t.cloneNode(!1), r = t.firstChild; r;)
  8825. !0 !== e && 1 === r.nodeType && "SCRIPT" === r.nodeName || n.appendChild(i(r, e)),
  8826. r = r.nextSibling;
  8827. return 1 === t.nodeType && (n._scrollTop = t.scrollTop,
  8828. n._scrollLeft = t.scrollLeft,
  8829. "CANVAS" === t.nodeName ? function(e, t) {
  8830. try {
  8831. t && (t.width = e.width,
  8832. t.height = e.height,
  8833. t.getContext("2d").putImageData(e.getContext("2d").getImageData(0, 0, e.width, e.height), 0, 0))
  8834. } catch (t) {
  8835. o("Unable to copy canvas content from", e, t)
  8836. }
  8837. }(t, n) : "TEXTAREA" !== t.nodeName && "SELECT" !== t.nodeName || (n.value = t.value)),
  8838. n
  8839. }
  8840. var o = t("./log");
  8841. e.exports = function(o, t, e, n, s, a, u) {
  8842. var c = i(o.documentElement, s.javascriptEnabled)
  8843. , l = t.createElement("iframe");
  8844. return l.className = "html2canvas-container",
  8845. l.style.visibility = "hidden",
  8846. l.style.position = "fixed",
  8847. l.style.left = "-10000px",
  8848. l.style.top = "0px",
  8849. l.style.border = "0",
  8850. l.width = e,
  8851. l.height = n,
  8852. l.scrolling = "no",
  8853. t.body.appendChild(l),
  8854. new Promise(function(e) {
  8855. var t, n, r, i = l.contentWindow.document;
  8856. l.contentWindow.onload = l.onload = function() {
  8857. var t = setInterval(function() {
  8858. 0 < i.body.childNodes.length && (function t(e) {
  8859. if (1 === e.nodeType) {
  8860. e.scrollTop = e._scrollTop,
  8861. e.scrollLeft = e._scrollLeft;
  8862. for (var n = e.firstChild; n;)
  8863. t(n),
  8864. n = n.nextSibling
  8865. }
  8866. }(i.documentElement),
  8867. clearInterval(t),
  8868. "view" === s.type && (l.contentWindow.scrollTo(a, u),
  8869. !/(iPad|iPhone|iPod)/g.test(navigator.userAgent) || l.contentWindow.scrollY === u && l.contentWindow.scrollX === a || (i.documentElement.style.top = -u + "px",
  8870. i.documentElement.style.left = -a + "px",
  8871. i.documentElement.style.position = "absolute")),
  8872. e(l))
  8873. }, 50)
  8874. }
  8875. ,
  8876. i.open(),
  8877. i.write("<!DOCTYPE html><html></html>"),
  8878. n = a,
  8879. r = u,
  8880. !(t = o).defaultView || n === t.defaultView.pageXOffset && r === t.defaultView.pageYOffset || t.defaultView.scrollTo(n, r),
  8881. i.replaceChild(i.adoptNode(c), i.documentElement),
  8882. i.close()
  8883. }
  8884. )
  8885. }
  8886. }
  8887. , {
  8888. "./log": 13
  8889. }],
  8890. 3: [function(t, e) {
  8891. function n(t) {
  8892. this.r = 0,
  8893. this.g = 0,
  8894. this.b = 0,
  8895. this.a = null,
  8896. this.fromArray(t) || this.namedColor(t) || this.rgb(t) || this.rgba(t) || this.hex6(t) || this.hex3(t)
  8897. }
  8898. n.prototype.darken = function(t) {
  8899. t = 1 - t;
  8900. return new n([Math.round(this.r * t), Math.round(this.g * t), Math.round(this.b * t), this.a])
  8901. }
  8902. ,
  8903. n.prototype.isTransparent = function() {
  8904. return 0 === this.a
  8905. }
  8906. ,
  8907. n.prototype.isBlack = function() {
  8908. return 0 === this.r && 0 === this.g && 0 === this.b
  8909. }
  8910. ,
  8911. n.prototype.fromArray = function(t) {
  8912. return Array.isArray(t) && (this.r = Math.min(t[0], 255),
  8913. this.g = Math.min(t[1], 255),
  8914. this.b = Math.min(t[2], 255),
  8915. 3 < t.length && (this.a = t[3])),
  8916. Array.isArray(t)
  8917. }
  8918. ;
  8919. var r = /^#([a-f0-9]{3})$/i;
  8920. n.prototype.hex3 = function(t) {
  8921. var e;
  8922. return null !== (e = t.match(r)) && (this.r = parseInt(e[1][0] + e[1][0], 16),
  8923. this.g = parseInt(e[1][1] + e[1][1], 16),
  8924. this.b = parseInt(e[1][2] + e[1][2], 16)),
  8925. null !== e
  8926. }
  8927. ;
  8928. var i = /^#([a-f0-9]{6})$/i;
  8929. n.prototype.hex6 = function(t) {
  8930. var e = null;
  8931. return null !== (e = t.match(i)) && (this.r = parseInt(e[1].substring(0, 2), 16),
  8932. this.g = parseInt(e[1].substring(2, 4), 16),
  8933. this.b = parseInt(e[1].substring(4, 6), 16)),
  8934. null !== e
  8935. }
  8936. ;
  8937. var o = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
  8938. n.prototype.rgb = function(t) {
  8939. var e;
  8940. return null !== (e = t.match(o)) && (this.r = Number(e[1]),
  8941. this.g = Number(e[2]),
  8942. this.b = Number(e[3])),
  8943. null !== e
  8944. }
  8945. ;
  8946. var s = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;
  8947. n.prototype.rgba = function(t) {
  8948. var e;
  8949. return null !== (e = t.match(s)) && (this.r = Number(e[1]),
  8950. this.g = Number(e[2]),
  8951. this.b = Number(e[3]),
  8952. this.a = Number(e[4])),
  8953. null !== e
  8954. }
  8955. ,
  8956. n.prototype.toString = function() {
  8957. return null !== this.a && 1 !== this.a ? "rgba(" + [this.r, this.g, this.b, this.a].join(",") + ")" : "rgb(" + [this.r, this.g, this.b].join(",") + ")"
  8958. }
  8959. ,
  8960. n.prototype.namedColor = function(t) {
  8961. t = t.toLowerCase();
  8962. var e = a[t];
  8963. if (e)
  8964. this.r = e[0],
  8965. this.g = e[1],
  8966. this.b = e[2];
  8967. else if ("transparent" === t)
  8968. return !(this.r = this.g = this.b = this.a = 0);
  8969. return !!e
  8970. }
  8971. ,
  8972. n.prototype.isColor = !0;
  8973. var a = {
  8974. aliceblue: [240, 248, 255],
  8975. antiquewhite: [250, 235, 215],
  8976. aqua: [0, 255, 255],
  8977. aquamarine: [127, 255, 212],
  8978. azure: [240, 255, 255],
  8979. beige: [245, 245, 220],
  8980. bisque: [255, 228, 196],
  8981. black: [0, 0, 0],
  8982. blanchedalmond: [255, 235, 205],
  8983. blue: [0, 0, 255],
  8984. blueviolet: [138, 43, 226],
  8985. brown: [165, 42, 42],
  8986. burlywood: [222, 184, 135],
  8987. cadetblue: [95, 158, 160],
  8988. chartreuse: [127, 255, 0],
  8989. chocolate: [210, 105, 30],
  8990. coral: [255, 127, 80],
  8991. cornflowerblue: [100, 149, 237],
  8992. cornsilk: [255, 248, 220],
  8993. crimson: [220, 20, 60],
  8994. cyan: [0, 255, 255],
  8995. darkblue: [0, 0, 139],
  8996. darkcyan: [0, 139, 139],
  8997. darkgoldenrod: [184, 134, 11],
  8998. darkgray: [169, 169, 169],
  8999. darkgreen: [0, 100, 0],
  9000. darkgrey: [169, 169, 169],
  9001. darkkhaki: [189, 183, 107],
  9002. darkmagenta: [139, 0, 139],
  9003. darkolivegreen: [85, 107, 47],
  9004. darkorange: [255, 140, 0],
  9005. darkorchid: [153, 50, 204],
  9006. darkred: [139, 0, 0],
  9007. darksalmon: [233, 150, 122],
  9008. darkseagreen: [143, 188, 143],
  9009. darkslateblue: [72, 61, 139],
  9010. darkslategray: [47, 79, 79],
  9011. darkslategrey: [47, 79, 79],
  9012. darkturquoise: [0, 206, 209],
  9013. darkviolet: [148, 0, 211],
  9014. deeppink: [255, 20, 147],
  9015. deepskyblue: [0, 191, 255],
  9016. dimgray: [105, 105, 105],
  9017. dimgrey: [105, 105, 105],
  9018. dodgerblue: [30, 144, 255],
  9019. firebrick: [178, 34, 34],
  9020. floralwhite: [255, 250, 240],
  9021. forestgreen: [34, 139, 34],
  9022. fuchsia: [255, 0, 255],
  9023. gainsboro: [220, 220, 220],
  9024. ghostwhite: [248, 248, 255],
  9025. gold: [255, 215, 0],
  9026. goldenrod: [218, 165, 32],
  9027. gray: [128, 128, 128],
  9028. green: [0, 128, 0],
  9029. greenyellow: [173, 255, 47],
  9030. grey: [128, 128, 128],
  9031. honeydew: [240, 255, 240],
  9032. hotpink: [255, 105, 180],
  9033. indianred: [205, 92, 92],
  9034. indigo: [75, 0, 130],
  9035. ivory: [255, 255, 240],
  9036. khaki: [240, 230, 140],
  9037. lavender: [230, 230, 250],
  9038. lavenderblush: [255, 240, 245],
  9039. lawngreen: [124, 252, 0],
  9040. lemonchiffon: [255, 250, 205],
  9041. lightblue: [173, 216, 230],
  9042. lightcoral: [240, 128, 128],
  9043. lightcyan: [224, 255, 255],
  9044. lightgoldenrodyellow: [250, 250, 210],
  9045. lightgray: [211, 211, 211],
  9046. lightgreen: [144, 238, 144],
  9047. lightgrey: [211, 211, 211],
  9048. lightpink: [255, 182, 193],
  9049. lightsalmon: [255, 160, 122],
  9050. lightseagreen: [32, 178, 170],
  9051. lightskyblue: [135, 206, 250],
  9052. lightslategray: [119, 136, 153],
  9053. lightslategrey: [119, 136, 153],
  9054. lightsteelblue: [176, 196, 222],
  9055. lightyellow: [255, 255, 224],
  9056. lime: [0, 255, 0],
  9057. limegreen: [50, 205, 50],
  9058. linen: [250, 240, 230],
  9059. magenta: [255, 0, 255],
  9060. maroon: [128, 0, 0],
  9061. mediumaquamarine: [102, 205, 170],
  9062. mediumblue: [0, 0, 205],
  9063. mediumorchid: [186, 85, 211],
  9064. mediumpurple: [147, 112, 219],
  9065. mediumseagreen: [60, 179, 113],
  9066. mediumslateblue: [123, 104, 238],
  9067. mediumspringgreen: [0, 250, 154],
  9068. mediumturquoise: [72, 209, 204],
  9069. mediumvioletred: [199, 21, 133],
  9070. midnightblue: [25, 25, 112],
  9071. mintcream: [245, 255, 250],
  9072. mistyrose: [255, 228, 225],
  9073. moccasin: [255, 228, 181],
  9074. navajowhite: [255, 222, 173],
  9075. navy: [0, 0, 128],
  9076. oldlace: [253, 245, 230],
  9077. olive: [128, 128, 0],
  9078. olivedrab: [107, 142, 35],
  9079. orange: [255, 165, 0],
  9080. orangered: [255, 69, 0],
  9081. orchid: [218, 112, 214],
  9082. palegoldenrod: [238, 232, 170],
  9083. palegreen: [152, 251, 152],
  9084. paleturquoise: [175, 238, 238],
  9085. palevioletred: [219, 112, 147],
  9086. papayawhip: [255, 239, 213],
  9087. peachpuff: [255, 218, 185],
  9088. peru: [205, 133, 63],
  9089. pink: [255, 192, 203],
  9090. plum: [221, 160, 221],
  9091. powderblue: [176, 224, 230],
  9092. purple: [128, 0, 128],
  9093. rebeccapurple: [102, 51, 153],
  9094. red: [255, 0, 0],
  9095. rosybrown: [188, 143, 143],
  9096. royalblue: [65, 105, 225],
  9097. saddlebrown: [139, 69, 19],
  9098. salmon: [250, 128, 114],
  9099. sandybrown: [244, 164, 96],
  9100. seagreen: [46, 139, 87],
  9101. seashell: [255, 245, 238],
  9102. sienna: [160, 82, 45],
  9103. silver: [192, 192, 192],
  9104. skyblue: [135, 206, 235],
  9105. slateblue: [106, 90, 205],
  9106. slategray: [112, 128, 144],
  9107. slategrey: [112, 128, 144],
  9108. snow: [255, 250, 250],
  9109. springgreen: [0, 255, 127],
  9110. steelblue: [70, 130, 180],
  9111. tan: [210, 180, 140],
  9112. teal: [0, 128, 128],
  9113. thistle: [216, 191, 216],
  9114. tomato: [255, 99, 71],
  9115. turquoise: [64, 224, 208],
  9116. violet: [238, 130, 238],
  9117. wheat: [245, 222, 179],
  9118. white: [255, 255, 255],
  9119. whitesmoke: [245, 245, 245],
  9120. yellow: [255, 255, 0],
  9121. yellowgreen: [154, 205, 50]
  9122. };
  9123. e.exports = n
  9124. }
  9125. , {}],
  9126. 4: [function(t, e) {
  9127. function n(t, e) {
  9128. var n, r, i = C++;
  9129. if ((e = e || {}).logging && (y.options.logging = !0,
  9130. y.options.start = Date.now()),
  9131. e.async = void 0 === e.async || e.async,
  9132. e.allowTaint = void 0 !== e.allowTaint && e.allowTaint,
  9133. e.removeContainer = void 0 === e.removeContainer || e.removeContainer,
  9134. e.javascriptEnabled = void 0 !== e.javascriptEnabled && e.javascriptEnabled,
  9135. e.imageTimeout = void 0 === e.imageTimeout ? 1e4 : e.imageTimeout,
  9136. e.renderer = "function" == typeof e.renderer ? e.renderer : g,
  9137. e.strict = !!e.strict,
  9138. "string" == typeof t) {
  9139. if ("string" != typeof e.proxy)
  9140. return Promise.reject("Proxy must be used when rendering url");
  9141. var o = null != e.width ? e.width : window.innerWidth
  9142. , s = null != e.height ? e.height : window.innerHeight;
  9143. return w((n = t,
  9144. (r = document.createElement("a")).href = n,
  9145. r.href = r.href,
  9146. r), e.proxy, document, o, s, e).then(function(t) {
  9147. return f(t.contentWindow.document.documentElement, t, e, o, s)
  9148. })
  9149. }
  9150. var a, u, c, l, h, t = (void 0 === t ? [document.documentElement] : t.length ? t : [t])[0];
  9151. return t.setAttribute(x + i, i),
  9152. a = t.ownerDocument,
  9153. u = e,
  9154. c = t.ownerDocument.defaultView.innerWidth,
  9155. l = t.ownerDocument.defaultView.innerHeight,
  9156. h = i,
  9157. b(a, a, c, l, u, a.defaultView.pageXOffset, a.defaultView.pageYOffset).then(function(t) {
  9158. y("Document cloned");
  9159. var e = x + h
  9160. , n = "[" + e + "='" + h + "']";
  9161. a.querySelector(n).removeAttribute(e);
  9162. var e = t.contentWindow
  9163. , r = e.document.querySelector(n);
  9164. return Promise.resolve("function" != typeof u.onclone || u.onclone(e.document)).then(function() {
  9165. return f(r, t, u, c, l)
  9166. })
  9167. }).then(function(t) {
  9168. return "function" == typeof e.onrendered && (y("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),
  9169. e.onrendered(t)),
  9170. t
  9171. })
  9172. }
  9173. function f(n, r, i, t, e) {
  9174. var o, s, a = r.contentWindow, u = new d(a.document), c = new m(i, u), l = _(n), s = "view" === i.type ? t : (s = a.document,
  9175. Math.max(Math.max(s.body.scrollWidth, s.documentElement.scrollWidth), Math.max(s.body.offsetWidth, s.documentElement.offsetWidth), Math.max(s.body.clientWidth, s.documentElement.clientWidth))), o = "view" === i.type ? e : (o = a.document,
  9176. Math.max(Math.max(o.body.scrollHeight, o.documentElement.scrollHeight), Math.max(o.body.offsetHeight, o.documentElement.offsetHeight), Math.max(o.body.clientHeight, o.documentElement.clientHeight))), h = new i.renderer(s, o, c, i, document);
  9177. return new v(n, h, u, c, i).ready.then(function() {
  9178. var t, e;
  9179. return y("Finished rendering"),
  9180. t = "view" === i.type ? p(h.canvas, {
  9181. width: h.canvas.width,
  9182. height: h.canvas.height,
  9183. top: 0,
  9184. left: 0,
  9185. x: 0,
  9186. y: 0
  9187. }) : n === a.document.body || n === a.document.documentElement || null != i.canvas ? h.canvas : p(h.canvas, {
  9188. width: (null != i.width ? i : l).width,
  9189. height: (null != i.height ? i : l).height,
  9190. top: l.top,
  9191. left: l.left,
  9192. x: 0,
  9193. y: 0
  9194. }),
  9195. e = r,
  9196. i.removeContainer && (e.parentNode.removeChild(e),
  9197. y("Cleaned up container")),
  9198. t
  9199. })
  9200. }
  9201. function p(t, e) {
  9202. var n = document.createElement("canvas")
  9203. , r = Math.min(t.width - 1, Math.max(0, e.left))
  9204. , i = Math.min(t.width, Math.max(1, e.left + e.width))
  9205. , o = Math.min(t.height - 1, Math.max(0, e.top))
  9206. , s = Math.min(t.height, Math.max(1, e.top + e.height));
  9207. n.width = e.width,
  9208. n.height = e.height;
  9209. i -= r,
  9210. s -= o;
  9211. return y("Cropping canvas at:", "left:", e.left, "top:", e.top, "width:", i, "height:", s),
  9212. y("Resulting crop with width", e.width, "and height", e.height, "with x", r, "and y", o),
  9213. n.getContext("2d").drawImage(t, r, o, i, s, e.x, e.y, i, s),
  9214. n
  9215. }
  9216. var d = t("./support")
  9217. , g = t("./renderers/canvas")
  9218. , m = t("./imageloader")
  9219. , v = t("./nodeparser")
  9220. , r = t("./nodecontainer")
  9221. , y = t("./log")
  9222. , i = t("./utils")
  9223. , b = t("./clone")
  9224. , w = t("./proxy").loadUrlDocument
  9225. , _ = i.getBounds
  9226. , x = "data-html2canvas-node"
  9227. , C = 0;
  9228. n.CanvasRenderer = g,
  9229. n.NodeContainer = r,
  9230. n.log = y,
  9231. n.utils = i;
  9232. i = "undefined" == typeof document || "function" != typeof Object.create || "function" != typeof document.createElement("canvas").getContext ? function() {
  9233. return Promise.reject("No canvas support")
  9234. }
  9235. : n;
  9236. e.exports = i
  9237. }
  9238. , {
  9239. "./clone": 2,
  9240. "./imageloader": 11,
  9241. "./log": 13,
  9242. "./nodecontainer": 14,
  9243. "./nodeparser": 15,
  9244. "./proxy": 16,
  9245. "./renderers/canvas": 20,
  9246. "./support": 22,
  9247. "./utils": 26
  9248. }],
  9249. 5: [function(t, e) {
  9250. function r(t) {
  9251. var n;
  9252. this.src = t,
  9253. i("DummyImageContainer for", t),
  9254. this.promise && this.image || (i("Initiating DummyImageContainer"),
  9255. r.prototype.image = new Image,
  9256. n = this.image,
  9257. r.prototype.promise = new Promise(function(t, e) {
  9258. n.onload = t,
  9259. n.onerror = e,
  9260. n.src = o(),
  9261. !0 === n.complete && t(n)
  9262. }
  9263. ))
  9264. }
  9265. var i = t("./log")
  9266. , o = t("./utils").smallImage;
  9267. e.exports = r
  9268. }
  9269. , {
  9270. "./log": 13,
  9271. "./utils": 26
  9272. }],
  9273. 6: [function(t, e) {
  9274. var s = t("./utils").smallImage;
  9275. e.exports = function(t, e) {
  9276. var n = document.createElement("div")
  9277. , r = document.createElement("img")
  9278. , i = document.createElement("span")
  9279. , o = "Hidden Text";
  9280. n.style.visibility = "hidden",
  9281. n.style.fontFamily = t,
  9282. n.style.fontSize = e,
  9283. n.style.margin = 0,
  9284. n.style.padding = 0,
  9285. document.body.appendChild(n),
  9286. r.src = s(),
  9287. r.width = 1,
  9288. r.height = 1,
  9289. r.style.margin = 0,
  9290. r.style.padding = 0,
  9291. r.style.verticalAlign = "baseline",
  9292. i.style.fontFamily = t,
  9293. i.style.fontSize = e,
  9294. i.style.margin = 0,
  9295. i.style.padding = 0,
  9296. i.appendChild(document.createTextNode(o)),
  9297. n.appendChild(i),
  9298. n.appendChild(r),
  9299. e = r.offsetTop - i.offsetTop + 1,
  9300. n.removeChild(i),
  9301. n.appendChild(document.createTextNode(o)),
  9302. n.style.lineHeight = "normal",
  9303. r.style.verticalAlign = "super",
  9304. r = r.offsetTop - n.offsetTop + 1,
  9305. document.body.removeChild(n),
  9306. this.baseline = e,
  9307. this.lineWidth = 1,
  9308. this.middle = r
  9309. }
  9310. }
  9311. , {
  9312. "./utils": 26
  9313. }],
  9314. 7: [function(t, e) {
  9315. function n() {
  9316. this.data = {}
  9317. }
  9318. var r = t("./font");
  9319. n.prototype.getMetrics = function(t, e) {
  9320. return void 0 === this.data[t + "-" + e] && (this.data[t + "-" + e] = new r(t, e)),
  9321. this.data[t + "-" + e]
  9322. }
  9323. ,
  9324. e.exports = n
  9325. }
  9326. , {
  9327. "./font": 6
  9328. }],
  9329. 8: [function(o, t) {
  9330. function e(e, t, n) {
  9331. this.image = null,
  9332. this.src = e;
  9333. var r = this
  9334. , i = s(e);
  9335. this.promise = (t ? new Promise(function(t) {
  9336. "about:blank" === e.contentWindow.document.URL || null == e.contentWindow.document.documentElement ? e.contentWindow.onload = e.onload = function() {
  9337. t(e)
  9338. }
  9339. : t(e)
  9340. }
  9341. ) : this.proxyLoad(n.proxy, i, n)).then(function(t) {
  9342. return o("./core")(t.contentWindow.document.documentElement, {
  9343. type: "view",
  9344. width: t.width,
  9345. height: t.height,
  9346. proxy: n.proxy,
  9347. javascriptEnabled: n.javascriptEnabled,
  9348. removeContainer: n.removeContainer,
  9349. allowTaint: n.allowTaint,
  9350. imageTimeout: n.imageTimeout / 2
  9351. })
  9352. }).then(function(t) {
  9353. return r.image = t
  9354. })
  9355. }
  9356. var s = o("./utils").getBounds
  9357. , i = o("./proxy").loadUrlDocument;
  9358. e.prototype.proxyLoad = function(t, e, n) {
  9359. var r = this.src;
  9360. return i(r.src, t, r.ownerDocument, e.width, e.height, n)
  9361. }
  9362. ,
  9363. t.exports = e
  9364. }
  9365. , {
  9366. "./core": 4,
  9367. "./proxy": 16,
  9368. "./utils": 26
  9369. }],
  9370. 9: [function(t, e) {
  9371. function n(t) {
  9372. this.src = t.value,
  9373. this.colorStops = [],
  9374. this.type = null,
  9375. this.x0 = .5,
  9376. this.y0 = .5,
  9377. this.x1 = .5,
  9378. this.y1 = .5,
  9379. this.promise = Promise.resolve(!0)
  9380. }
  9381. n.TYPES = {
  9382. LINEAR: 1,
  9383. RADIAL: 2
  9384. },
  9385. n.REGEXP_COLORSTOP = /^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,
  9386. e.exports = n
  9387. }
  9388. , {}],
  9389. 10: [function(t, e) {
  9390. e.exports = function(n, r) {
  9391. this.src = n,
  9392. this.image = new Image;
  9393. var i = this;
  9394. this.tainted = null,
  9395. this.promise = new Promise(function(t, e) {
  9396. i.image.onload = t,
  9397. i.image.onerror = e,
  9398. r && (i.image.crossOrigin = "anonymous"),
  9399. i.image.src = n,
  9400. !0 === i.image.complete && t(i.image)
  9401. }
  9402. )
  9403. }
  9404. }
  9405. , {}],
  9406. 11: [function(t, e) {
  9407. function n(t, e) {
  9408. this.link = null,
  9409. this.options = t,
  9410. this.support = e,
  9411. this.origin = this.getOrigin(window.location.href)
  9412. }
  9413. var o = t("./log")
  9414. , r = t("./imagecontainer")
  9415. , i = t("./dummyimagecontainer")
  9416. , s = t("./proxyimagecontainer")
  9417. , a = t("./framecontainer")
  9418. , u = t("./svgcontainer")
  9419. , c = t("./svgnodecontainer")
  9420. , l = t("./lineargradientcontainer")
  9421. , h = t("./webkitgradientcontainer")
  9422. , f = t("./utils").bind;
  9423. n.prototype.findImages = function(t) {
  9424. var e = [];
  9425. return t.reduce(function(t, e) {
  9426. switch (e.node.nodeName) {
  9427. case "IMG":
  9428. return t.concat([{
  9429. args: [e.node.src],
  9430. method: "url"
  9431. }]);
  9432. case "svg":
  9433. case "IFRAME":
  9434. return t.concat([{
  9435. args: [e.node],
  9436. method: e.node.nodeName
  9437. }])
  9438. }
  9439. return t
  9440. }, []).forEach(this.addImage(e, this.loadImage), this),
  9441. e
  9442. }
  9443. ,
  9444. n.prototype.findBackgroundImage = function(t, e) {
  9445. return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t, this.loadImage), this),
  9446. t
  9447. }
  9448. ,
  9449. n.prototype.addImage = function(n, r) {
  9450. return function(e) {
  9451. e.args.forEach(function(t) {
  9452. this.imageExists(n, t) || (n.splice(0, 0, r.call(this, e)),
  9453. o("Added image #" + n.length, "string" == typeof t ? t.substring(0, 100) : t))
  9454. }, this)
  9455. }
  9456. }
  9457. ,
  9458. n.prototype.hasImageBackground = function(t) {
  9459. return "none" !== t.method
  9460. }
  9461. ,
  9462. n.prototype.loadImage = function(t) {
  9463. if ("url" !== t.method)
  9464. return "linear-gradient" === t.method ? new l(t) : "gradient" === t.method ? new h(t) : "svg" === t.method ? new c(t.args[0], this.support.svg) : "IFRAME" === t.method ? new a(t.args[0], this.isSameOrigin(t.args[0].src), this.options) : new i(t);
  9465. t = t.args[0];
  9466. return !this.isSVG(t) || this.support.svg || this.options.allowTaint ? t.match(/data:image\/.*;base64,/i) ? new r(t.replace(/url\(['"]{0,}|['"]{0,}\)$/gi, ""), !1) : this.isSameOrigin(t) || !0 === this.options.allowTaint || this.isSVG(t) ? new r(t, !1) : this.support.cors && !this.options.allowTaint && this.options.useCORS ? new r(t, !0) : this.options.proxy ? new s(t, this.options.proxy) : new i(t) : new u(t)
  9467. }
  9468. ,
  9469. n.prototype.isSVG = function(t) {
  9470. return "svg" === t.substring(t.length - 3).toLowerCase() || u.prototype.isInline(t)
  9471. }
  9472. ,
  9473. n.prototype.imageExists = function(t, e) {
  9474. return t.some(function(t) {
  9475. return t.src === e
  9476. })
  9477. }
  9478. ,
  9479. n.prototype.isSameOrigin = function(t) {
  9480. return this.getOrigin(t) === this.origin
  9481. }
  9482. ,
  9483. n.prototype.getOrigin = function(t) {
  9484. var e = this.link || (this.link = document.createElement("a"));
  9485. return e.href = t,
  9486. e.href = e.href,
  9487. e.protocol + e.hostname + e.port
  9488. }
  9489. ,
  9490. n.prototype.getPromise = function(e) {
  9491. return this.timeout(e, this.options.imageTimeout).catch(function() {
  9492. return new i(e.src).promise.then(function(t) {
  9493. e.image = t
  9494. })
  9495. })
  9496. }
  9497. ,
  9498. n.prototype.get = function(e) {
  9499. var n = null;
  9500. return this.images.some(function(t) {
  9501. return (n = t).src === e
  9502. }) ? n : null
  9503. }
  9504. ,
  9505. n.prototype.fetch = function(t) {
  9506. return this.images = t.reduce(f(this.findBackgroundImage, this), this.findImages(t)),
  9507. this.images.forEach(function(e, n) {
  9508. e.promise.then(function() {
  9509. o("Succesfully loaded image #" + (n + 1), e)
  9510. }, function(t) {
  9511. o("Failed loading image #" + (n + 1), e, t)
  9512. })
  9513. }),
  9514. this.ready = Promise.all(this.images.map(this.getPromise, this)),
  9515. o("Finished searching images"),
  9516. this
  9517. }
  9518. ,
  9519. n.prototype.timeout = function(n, r) {
  9520. var i, t = Promise.race([n.promise, new Promise(function(t, e) {
  9521. i = setTimeout(function() {
  9522. o("Timed out loading image", n),
  9523. e(n)
  9524. }, r)
  9525. }
  9526. )]).then(function(t) {
  9527. return clearTimeout(i),
  9528. t
  9529. });
  9530. return t.catch(function() {
  9531. clearTimeout(i)
  9532. }),
  9533. t
  9534. }
  9535. ,
  9536. e.exports = n
  9537. }
  9538. , {
  9539. "./dummyimagecontainer": 5,
  9540. "./framecontainer": 8,
  9541. "./imagecontainer": 10,
  9542. "./lineargradientcontainer": 12,
  9543. "./log": 13,
  9544. "./proxyimagecontainer": 17,
  9545. "./svgcontainer": 23,
  9546. "./svgnodecontainer": 24,
  9547. "./utils": 26,
  9548. "./webkitgradientcontainer": 27
  9549. }],
  9550. 12: [function(t, e) {
  9551. function n(t) {
  9552. r.apply(this, arguments),
  9553. this.type = r.TYPES.LINEAR;
  9554. var e = n.REGEXP_DIRECTION.test(t.args[0]) || !r.REGEXP_COLORSTOP.test(t.args[0]);
  9555. e ? t.args[0].split(/\s+/).reverse().forEach(function(t, e) {
  9556. switch (t) {
  9557. case "left":
  9558. this.x0 = 0,
  9559. this.x1 = 1;
  9560. break;
  9561. case "top":
  9562. this.y0 = 0,
  9563. this.y1 = 1;
  9564. break;
  9565. case "right":
  9566. this.x0 = 1,
  9567. this.x1 = 0;
  9568. break;
  9569. case "bottom":
  9570. this.y0 = 1,
  9571. this.y1 = 0;
  9572. break;
  9573. case "to":
  9574. var n = this.y0
  9575. , r = this.x0;
  9576. this.y0 = this.y1,
  9577. this.x0 = this.x1,
  9578. this.x1 = r,
  9579. this.y1 = n;
  9580. break;
  9581. case "center":
  9582. break;
  9583. default:
  9584. n = .01 * parseFloat(t, 10);
  9585. if (isNaN(n))
  9586. break;
  9587. 0 === e ? (this.y0 = n,
  9588. this.y1 = 1 - this.y0) : (this.x0 = n,
  9589. this.x1 = 1 - this.x0)
  9590. }
  9591. }, this) : (this.y0 = 0,
  9592. this.y1 = 1),
  9593. this.colorStops = t.args.slice(e ? 1 : 0).map(function(t) {
  9594. var e = t.match(r.REGEXP_COLORSTOP)
  9595. , n = +e[2]
  9596. , t = 0 == n ? "%" : e[3];
  9597. return {
  9598. color: new i(e[1]),
  9599. stop: "%" === t ? n / 100 : null
  9600. }
  9601. }),
  9602. null === this.colorStops[0].stop && (this.colorStops[0].stop = 0),
  9603. null === this.colorStops[this.colorStops.length - 1].stop && (this.colorStops[this.colorStops.length - 1].stop = 1),
  9604. this.colorStops.forEach(function(n, r) {
  9605. null === n.stop && this.colorStops.slice(r).some(function(t, e) {
  9606. return null !== t.stop && (n.stop = (t.stop - this.colorStops[r - 1].stop) / (e + 1) + this.colorStops[r - 1].stop,
  9607. !0)
  9608. }, this)
  9609. }, this)
  9610. }
  9611. var r = t("./gradientcontainer")
  9612. , i = t("./color");
  9613. n.prototype = Object.create(r.prototype),
  9614. n.REGEXP_DIRECTION = /^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,
  9615. e.exports = n
  9616. }
  9617. , {
  9618. "./color": 3,
  9619. "./gradientcontainer": 9
  9620. }],
  9621. 13: [function(t, e) {
  9622. var n = function() {
  9623. n.options.logging && window.console && window.console.log && Function.prototype.bind.call(window.console.log, window.console).apply(window.console, [Date.now() - n.options.start + "ms", "html2canvas:"].concat([].slice.call(arguments, 0)))
  9624. };
  9625. n.options = {
  9626. logging: !1
  9627. },
  9628. e.exports = n
  9629. }
  9630. , {}],
  9631. 14: [function(t, e) {
  9632. function n(t, e) {
  9633. this.node = t,
  9634. this.parent = e,
  9635. this.stack = null,
  9636. this.bounds = null,
  9637. this.borders = null,
  9638. this.clip = [],
  9639. this.backgroundClip = [],
  9640. this.offsetBounds = null,
  9641. this.visible = null,
  9642. this.computedStyles = null,
  9643. this.colors = {},
  9644. this.styles = {},
  9645. this.backgroundImages = null,
  9646. this.transformData = null,
  9647. this.transformMatrix = null,
  9648. this.isPseudoElement = !1,
  9649. this.opacity = null
  9650. }
  9651. function s(t) {
  9652. return -1 !== t.toString().indexOf("%")
  9653. }
  9654. function r(t) {
  9655. return t.replace("px", "")
  9656. }
  9657. function i(t) {
  9658. return parseFloat(t)
  9659. }
  9660. var o = t("./color")
  9661. , t = t("./utils")
  9662. , a = t.getBounds
  9663. , u = t.parseBackgrounds
  9664. , c = t.offsetBounds;
  9665. n.prototype.cloneTo = function(t) {
  9666. t.visible = this.visible,
  9667. t.borders = this.borders,
  9668. t.bounds = this.bounds,
  9669. t.clip = this.clip,
  9670. t.backgroundClip = this.backgroundClip,
  9671. t.computedStyles = this.computedStyles,
  9672. t.styles = this.styles,
  9673. t.backgroundImages = this.backgroundImages,
  9674. t.opacity = this.opacity
  9675. }
  9676. ,
  9677. n.prototype.getOpacity = function() {
  9678. return null === this.opacity ? this.opacity = this.cssFloat("opacity") : this.opacity
  9679. }
  9680. ,
  9681. n.prototype.assignStack = function(t) {
  9682. (this.stack = t).children.push(this)
  9683. }
  9684. ,
  9685. n.prototype.isElementVisible = function() {
  9686. return this.node.nodeType === Node.TEXT_NODE ? this.parent.visible : "none" !== this.css("display") && "hidden" !== this.css("visibility") && !this.node.hasAttribute("data-html2canvas-ignore") && ("INPUT" !== this.node.nodeName || "hidden" !== this.node.getAttribute("type"))
  9687. }
  9688. ,
  9689. n.prototype.css = function(t) {
  9690. return this.computedStyles || (this.computedStyles = this.isPseudoElement ? this.parent.computedStyle(this.before ? ":before" : ":after") : this.computedStyle(null)),
  9691. this.styles[t] || (this.styles[t] = this.computedStyles[t])
  9692. }
  9693. ,
  9694. n.prototype.prefixedCss = function(e) {
  9695. var n = this.css(e);
  9696. return void 0 === n && ["webkit", "moz", "ms", "o"].some(function(t) {
  9697. return void 0 !== (n = this.css(t + e.substr(0, 1).toUpperCase() + e.substr(1)))
  9698. }, this),
  9699. void 0 === n ? null : n
  9700. }
  9701. ,
  9702. n.prototype.computedStyle = function(t) {
  9703. return this.node.ownerDocument.defaultView.getComputedStyle(this.node, t)
  9704. }
  9705. ,
  9706. n.prototype.cssInt = function(t) {
  9707. t = parseInt(this.css(t), 10);
  9708. return isNaN(t) ? 0 : t
  9709. }
  9710. ,
  9711. n.prototype.color = function(t) {
  9712. return this.colors[t] || (this.colors[t] = new o(this.css(t)))
  9713. }
  9714. ,
  9715. n.prototype.cssFloat = function(t) {
  9716. t = parseFloat(this.css(t));
  9717. return isNaN(t) ? 0 : t
  9718. }
  9719. ,
  9720. n.prototype.fontWeight = function() {
  9721. var t = this.css("fontWeight");
  9722. switch (parseInt(t, 10)) {
  9723. case 401:
  9724. t = "bold";
  9725. break;
  9726. case 400:
  9727. t = "normal"
  9728. }
  9729. return t
  9730. }
  9731. ,
  9732. n.prototype.parseClip = function() {
  9733. var t = this.css("clip").match(this.CLIP);
  9734. return t ? {
  9735. top: parseInt(t[1], 10),
  9736. right: parseInt(t[2], 10),
  9737. bottom: parseInt(t[3], 10),
  9738. left: parseInt(t[4], 10)
  9739. } : null
  9740. }
  9741. ,
  9742. n.prototype.parseBackgroundImages = function() {
  9743. return this.backgroundImages || (this.backgroundImages = u(this.css("backgroundImage")))
  9744. }
  9745. ,
  9746. n.prototype.cssList = function(t, e) {
  9747. t = (this.css(t) || "").split(",");
  9748. return 1 === (t = (t = t[e || 0] || t[0] || "auto").trim().split(" ")).length && (t = [t[0], s(t[0]) ? "auto" : t[0]]),
  9749. t
  9750. }
  9751. ,
  9752. n.prototype.parseBackgroundSize = function(t, e, n) {
  9753. var r, i = this.cssList("backgroundSize", n);
  9754. if (s(i[0]))
  9755. r = t.width * parseFloat(i[0]) / 100;
  9756. else {
  9757. if (/contain|cover/.test(i[0])) {
  9758. var o = t.width / t.height
  9759. , n = e.width / e.height;
  9760. return o < n ^ "contain" === i[0] ? {
  9761. width: t.height * n,
  9762. height: t.height
  9763. } : {
  9764. width: t.width,
  9765. height: t.width / n
  9766. }
  9767. }
  9768. r = parseInt(i[0], 10)
  9769. }
  9770. return t = "auto" === i[0] && "auto" === i[1] ? e.height : "auto" === i[1] ? r / e.width * e.height : s(i[1]) ? t.height * parseFloat(i[1]) / 100 : parseInt(i[1], 10),
  9771. "auto" === i[0] && (r = t / e.height * e.width),
  9772. {
  9773. width: r,
  9774. height: t
  9775. }
  9776. }
  9777. ,
  9778. n.prototype.parseBackgroundPosition = function(t, e, n, r) {
  9779. var i = this.cssList("backgroundPosition", n)
  9780. , n = s(i[0]) ? (t.width - (r || e).width) * (parseFloat(i[0]) / 100) : parseInt(i[0], 10)
  9781. , r = "auto" === i[1] ? n / e.width * e.height : s(i[1]) ? (t.height - (r || e).height) * parseFloat(i[1]) / 100 : parseInt(i[1], 10);
  9782. return "auto" === i[0] && (n = r / e.height * e.width),
  9783. {
  9784. left: n,
  9785. top: r
  9786. }
  9787. }
  9788. ,
  9789. n.prototype.parseBackgroundRepeat = function(t) {
  9790. return this.cssList("backgroundRepeat", t)[0]
  9791. }
  9792. ,
  9793. n.prototype.parseTextShadows = function() {
  9794. var t = this.css("textShadow")
  9795. , e = [];
  9796. if (t && "none" !== t)
  9797. for (var n = t.match(this.TEXT_SHADOW_PROPERTY), r = 0; n && r < n.length; r++) {
  9798. var i = n[r].match(this.TEXT_SHADOW_VALUES);
  9799. e.push({
  9800. color: new o(i[0]),
  9801. offsetX: i[1] ? parseFloat(i[1].replace("px", "")) : 0,
  9802. offsetY: i[2] ? parseFloat(i[2].replace("px", "")) : 0,
  9803. blur: i[3] ? i[3].replace("px", "") : 0
  9804. })
  9805. }
  9806. return e
  9807. }
  9808. ,
  9809. n.prototype.parseTransform = function() {
  9810. var t, e;
  9811. return this.transformData || (this.hasTransform() ? (t = this.parseBounds(),
  9812. (e = this.prefixedCss("transformOrigin").split(" ").map(r).map(i))[0] += t.left,
  9813. e[1] += t.top,
  9814. this.transformData = {
  9815. origin: e,
  9816. matrix: this.parseTransformMatrix()
  9817. }) : this.transformData = {
  9818. origin: [0, 0],
  9819. matrix: [1, 0, 0, 1, 0, 0]
  9820. }),
  9821. this.transformData
  9822. }
  9823. ,
  9824. n.prototype.parseTransformMatrix = function() {
  9825. var t;
  9826. return this.transformMatrix || (t = (t = this.prefixedCss("transform")) ? function(t) {
  9827. if (t && "matrix" === t[1])
  9828. return t[2].split(",").map(function(t) {
  9829. return parseFloat(t.trim())
  9830. });
  9831. if (t && "matrix3d" === t[1]) {
  9832. t = t[2].split(",").map(function(t) {
  9833. return parseFloat(t.trim())
  9834. });
  9835. return [t[0], t[1], t[4], t[5], t[12], t[13]]
  9836. }
  9837. }(t.match(this.MATRIX_PROPERTY)) : null,
  9838. this.transformMatrix = t || [1, 0, 0, 1, 0, 0]),
  9839. this.transformMatrix
  9840. }
  9841. ,
  9842. n.prototype.parseBounds = function() {
  9843. return this.bounds || (this.bounds = (this.hasTransform() ? c : a)(this.node))
  9844. }
  9845. ,
  9846. n.prototype.hasTransform = function() {
  9847. return "1,0,0,1,0,0" !== this.parseTransformMatrix().join(",") || this.parent && this.parent.hasTransform()
  9848. }
  9849. ,
  9850. n.prototype.getValue = function() {
  9851. var t, e = this.node.value || "";
  9852. return "SELECT" === this.node.tagName ? e = (t = (t = this.node).options[t.selectedIndex || 0]) && t.text || "" : "password" === this.node.type && (e = Array(e.length + 1).join("•")),
  9853. 0 === e.length ? this.node.placeholder || "" : e
  9854. }
  9855. ,
  9856. n.prototype.MATRIX_PROPERTY = /(matrix|matrix3d)\((.+)\)/,
  9857. n.prototype.TEXT_SHADOW_PROPERTY = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,
  9858. n.prototype.TEXT_SHADOW_VALUES = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,
  9859. n.prototype.CLIP = /^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,
  9860. e.exports = n
  9861. }
  9862. , {
  9863. "./color": 3,
  9864. "./utils": 26
  9865. }],
  9866. 15: [function(t, e) {
  9867. function n(t, e, n, r, i) {
  9868. T("Starting NodeParser"),
  9869. this.renderer = e,
  9870. this.options = i,
  9871. this.range = null,
  9872. this.support = n,
  9873. this.renderQueue = [],
  9874. this.stack = new R(!0, 1, t.ownerDocument, null);
  9875. var o = new I(t, null);
  9876. i.background && e.rectangle(0, 0, e.width, e.height, new D(i.background)),
  9877. t === t.ownerDocument.documentElement && (n = new I(o.color("backgroundColor").isTransparent() ? t.ownerDocument.body : t.ownerDocument.documentElement, null),
  9878. e.rectangle(0, 0, e.width, e.height, n.color("backgroundColor"))),
  9879. o.visibile = o.isElementVisible(),
  9880. this.createPseudoHideStyles(t.ownerDocument),
  9881. this.disableAnimations(t.ownerDocument),
  9882. this.nodes = E([o].concat(this.getChildren(o)).filter(function(t) {
  9883. return t.visible = t.isElementVisible()
  9884. }).map(this.getPseudoElements, this)),
  9885. this.fontMetrics = new N,
  9886. T("Fetched nodes, total:", this.nodes.length),
  9887. T("Calculate overflow clips"),
  9888. this.calculateOverflowClips(),
  9889. T("Start fetching images"),
  9890. this.images = r.fetch(this.nodes.filter(x)),
  9891. this.ready = this.images.ready.then(M(function() {
  9892. return T("Images loaded, starting parsing"),
  9893. T("Creating stacking contexts"),
  9894. this.createStackingContexts(),
  9895. T("Sorting stacking contexts"),
  9896. this.sortStackingContexts(this.stack),
  9897. this.parse(this.stack),
  9898. T("Render queue created with " + this.renderQueue.length + " items"),
  9899. new Promise(M(function(t) {
  9900. i.async ? "function" == typeof i.async ? i.async.call(this, this.renderQueue, t) : 0 < this.renderQueue.length ? (this.renderIndex = 0,
  9901. this.asyncRenderer(this.renderQueue, t)) : t() : (this.renderQueue.forEach(this.paint, this),
  9902. t())
  9903. }, this))
  9904. }, this))
  9905. }
  9906. function r(t) {
  9907. return t.parent && t.parent.clip.length
  9908. }
  9909. function a() { }
  9910. function u(s, a, u, c) {
  9911. return s.map(function(t, e) {
  9912. if (0 < t.width) {
  9913. var n = a.left
  9914. , r = a.top
  9915. , i = a.width
  9916. , o = a.height - s[2].width;
  9917. switch (e) {
  9918. case 0:
  9919. o = s[0].width,
  9920. t.args = h({
  9921. c1: [n, r],
  9922. c2: [n + i, r],
  9923. c3: [n + i - s[1].width, r + o],
  9924. c4: [n + s[3].width, r + o]
  9925. }, c[0], c[1], u.topLeftOuter, u.topLeftInner, u.topRightOuter, u.topRightInner);
  9926. break;
  9927. case 1:
  9928. n = a.left + a.width - s[1].width,
  9929. i = s[1].width,
  9930. t.args = h({
  9931. c1: [n + i, r],
  9932. c2: [n + i, r + o + s[2].width],
  9933. c3: [n, r + o],
  9934. c4: [n, r + s[0].width]
  9935. }, c[1], c[2], u.topRightOuter, u.topRightInner, u.bottomRightOuter, u.bottomRightInner);
  9936. break;
  9937. case 2:
  9938. r = r + a.height - s[2].width,
  9939. o = s[2].width,
  9940. t.args = h({
  9941. c1: [n + i, r + o],
  9942. c2: [n, r + o],
  9943. c3: [n + s[3].width, r],
  9944. c4: [n + i - s[3].width, r]
  9945. }, c[2], c[3], u.bottomRightOuter, u.bottomRightInner, u.bottomLeftOuter, u.bottomLeftInner);
  9946. break;
  9947. case 3:
  9948. i = s[3].width,
  9949. t.args = h({
  9950. c1: [n, r + o + s[2].width],
  9951. c2: [n, r],
  9952. c3: [n + i, r + s[0].width],
  9953. c4: [n + i, r + o]
  9954. }, c[3], c[0], u.bottomLeftOuter, u.bottomLeftInner, u.topLeftOuter, u.topLeftInner)
  9955. }
  9956. }
  9957. return t
  9958. })
  9959. }
  9960. function v(t, e, n, r) {
  9961. var i = (Math.sqrt(2) - 1) / 3 * 4
  9962. , o = n * i
  9963. , i = r * i
  9964. , n = t + n
  9965. , r = e + r;
  9966. return {
  9967. topLeft: l({
  9968. x: t,
  9969. y: r
  9970. }, {
  9971. x: t,
  9972. y: r - i
  9973. }, {
  9974. x: n - o,
  9975. y: e
  9976. }, {
  9977. x: n,
  9978. y: e
  9979. }),
  9980. topRight: l({
  9981. x: t,
  9982. y: e
  9983. }, {
  9984. x: t + o,
  9985. y: e
  9986. }, {
  9987. x: n,
  9988. y: r - i
  9989. }, {
  9990. x: n,
  9991. y: r
  9992. }),
  9993. bottomRight: l({
  9994. x: n,
  9995. y: e
  9996. }, {
  9997. x: n,
  9998. y: e + i
  9999. }, {
  10000. x: t + o,
  10001. y: r
  10002. }, {
  10003. x: t,
  10004. y: r
  10005. }),
  10006. bottomLeft: l({
  10007. x: n,
  10008. y: r
  10009. }, {
  10010. x: n - o,
  10011. y: r
  10012. }, {
  10013. x: t,
  10014. y: e + i
  10015. }, {
  10016. x: t,
  10017. y: e
  10018. })
  10019. }
  10020. }
  10021. function c(t, e, n) {
  10022. var r = t.left
  10023. , i = t.top
  10024. , o = t.width
  10025. , s = t.height
  10026. , a = e[0][0] < o / 2 ? e[0][0] : o / 2
  10027. , u = e[0][1] < s / 2 ? e[0][1] : s / 2
  10028. , c = e[1][0] < o / 2 ? e[1][0] : o / 2
  10029. , l = e[1][1] < s / 2 ? e[1][1] : s / 2
  10030. , h = e[2][0] < o / 2 ? e[2][0] : o / 2
  10031. , f = e[2][1] < s / 2 ? e[2][1] : s / 2
  10032. , p = e[3][0] < o / 2 ? e[3][0] : o / 2
  10033. , d = e[3][1] < s / 2 ? e[3][1] : s / 2
  10034. , g = o - c
  10035. , m = s - f
  10036. , t = o - h
  10037. , e = s - d;
  10038. return {
  10039. topLeftOuter: v(r, i, a, u).topLeft.subdivide(.5),
  10040. topLeftInner: v(r + n[3].width, i + n[0].width, Math.max(0, a - n[3].width), Math.max(0, u - n[0].width)).topLeft.subdivide(.5),
  10041. topRightOuter: v(r + g, i, c, l).topRight.subdivide(.5),
  10042. topRightInner: v(r + Math.min(g, o + n[3].width), i + n[0].width, g > o + n[3].width ? 0 : c - n[3].width, l - n[0].width).topRight.subdivide(.5),
  10043. bottomRightOuter: v(r + t, i + m, h, f).bottomRight.subdivide(.5),
  10044. bottomRightInner: v(r + Math.min(t, o - n[3].width), i + Math.min(m, s + n[0].width), Math.max(0, h - n[1].width), f - n[2].width).bottomRight.subdivide(.5),
  10045. bottomLeftOuter: v(r, i + e, p, d).bottomLeft.subdivide(.5),
  10046. bottomLeftInner: v(r + n[3].width, i + e, Math.max(0, p - n[3].width), d - n[2].width).bottomLeft.subdivide(.5)
  10047. }
  10048. }
  10049. function l(o, s, a, u) {
  10050. function c(t, e, n) {
  10051. return {
  10052. x: t.x + (e.x - t.x) * n,
  10053. y: t.y + (e.y - t.y) * n
  10054. }
  10055. }
  10056. return {
  10057. start: o,
  10058. startControl: s,
  10059. endControl: a,
  10060. end: u,
  10061. subdivide: function(t) {
  10062. var e = c(o, s, t)
  10063. , n = c(s, a, t)
  10064. , r = c(a, u, t)
  10065. , i = c(e, n, t)
  10066. , n = c(n, r, t)
  10067. , t = c(i, n, t);
  10068. return [l(o, e, i, t), l(t, n, r, u)]
  10069. },
  10070. curveTo: function(t) {
  10071. t.push(["bezierCurve", s.x, s.y, a.x, a.y, u.x, u.y])
  10072. },
  10073. curveToReversed: function(t) {
  10074. t.push(["bezierCurve", a.x, a.y, s.x, s.y, o.x, o.y])
  10075. }
  10076. }
  10077. }
  10078. function h(t, e, n, r, i, o, s) {
  10079. var a = [];
  10080. return 0 < e[0] || 0 < e[1] ? (a.push(["line", r[1].start.x, r[1].start.y]),
  10081. r[1].curveTo(a)) : a.push(["line", t.c1[0], t.c1[1]]),
  10082. 0 < n[0] || 0 < n[1] ? (a.push(["line", o[0].start.x, o[0].start.y]),
  10083. o[0].curveTo(a),
  10084. a.push(["line", s[0].end.x, s[0].end.y]),
  10085. s[0].curveToReversed(a)) : (a.push(["line", t.c2[0], t.c2[1]]),
  10086. a.push(["line", t.c3[0], t.c3[1]])),
  10087. 0 < e[0] || 0 < e[1] ? (a.push(["line", i[1].end.x, i[1].end.y]),
  10088. i[1].curveToReversed(a)) : a.push(["line", t.c4[0], t.c4[1]]),
  10089. a
  10090. }
  10091. function s(t, e, n, r, i, o, s) {
  10092. 0 < e[0] || 0 < e[1] ? (t.push(["line", r[0].start.x, r[0].start.y]),
  10093. r[0].curveTo(t),
  10094. r[1].curveTo(t)) : t.push(["line", o, s]),
  10095. (0 < n[0] || 0 < n[1]) && t.push(["line", i[0].start.x, i[0].start.y])
  10096. }
  10097. function f(t) {
  10098. return t.cssInt("zIndex") < 0
  10099. }
  10100. function p(t) {
  10101. return 0 < t.cssInt("zIndex")
  10102. }
  10103. function d(t) {
  10104. return 0 === t.cssInt("zIndex")
  10105. }
  10106. function g(t) {
  10107. return -1 !== ["inline", "inline-block", "inline-table"].indexOf(t.css("display"))
  10108. }
  10109. function m(t) {
  10110. return t instanceof R
  10111. }
  10112. function y(t) {
  10113. return 0 < t.node.data.trim().length
  10114. }
  10115. function i(t) {
  10116. return t.nodeType === Node.TEXT_NODE || t.nodeType === Node.ELEMENT_NODE
  10117. }
  10118. function b(t) {
  10119. return "static" !== t.css("position")
  10120. }
  10121. function w(t) {
  10122. return "none" !== t.css("float")
  10123. }
  10124. function _(t) {
  10125. var e = this;
  10126. return function() {
  10127. return !t.apply(e, arguments)
  10128. }
  10129. }
  10130. function x(t) {
  10131. return t.node.nodeType === Node.ELEMENT_NODE
  10132. }
  10133. function o(t) {
  10134. return !0 === t.isPseudoElement
  10135. }
  10136. function C(t) {
  10137. return t.node.nodeType === Node.TEXT_NODE
  10138. }
  10139. function k(t) {
  10140. return parseInt(t, 10)
  10141. }
  10142. function S(t) {
  10143. return t.width
  10144. }
  10145. function O(t) {
  10146. return t.node.nodeType !== Node.ELEMENT_NODE || -1 === ["SCRIPT", "HEAD", "TITLE", "OBJECT", "BR", "OPTION"].indexOf(t.node.nodeName)
  10147. }
  10148. function E(t) {
  10149. return [].concat.apply([], t)
  10150. }
  10151. var T = t("./log")
  10152. , A = t("punycode")
  10153. , I = t("./nodecontainer")
  10154. , j = t("./textcontainer")
  10155. , P = t("./pseudoelementcontainer")
  10156. , N = t("./fontmetrics")
  10157. , D = t("./color")
  10158. , R = t("./stackingcontext")
  10159. , t = t("./utils")
  10160. , M = t.bind
  10161. , W = t.getBounds
  10162. , L = t.parseBackgrounds
  10163. , F = t.offsetBounds;
  10164. n.prototype.calculateOverflowClips = function() {
  10165. this.nodes.forEach(function(t) {
  10166. var e, n;
  10167. x(t) ? (o(t) && t.appendToDOM(),
  10168. t.borders = this.parseBorders(t),
  10169. e = "hidden" === t.css("overflow") ? [t.borders.clip] : [],
  10170. (n = t.parseClip()) && -1 !== ["absolute", "fixed"].indexOf(t.css("position")) && e.push([["rect", t.bounds.left + n.left, t.bounds.top + n.top, n.right - n.left, n.bottom - n.top]]),
  10171. t.clip = r(t) ? t.parent.clip.concat(e) : e,
  10172. t.backgroundClip = "hidden" !== t.css("overflow") ? t.clip.concat([t.borders.clip]) : t.clip,
  10173. o(t) && t.cleanDOM()) : C(t) && (t.clip = r(t) ? t.parent.clip : []),
  10174. o(t) || (t.bounds = null)
  10175. }, this)
  10176. }
  10177. ,
  10178. n.prototype.asyncRenderer = function(t, e, n) {
  10179. n = n || Date.now(),
  10180. this.paint(t[this.renderIndex++]),
  10181. t.length === this.renderIndex ? e() : n + 20 > Date.now() ? this.asyncRenderer(t, e, n) : setTimeout(M(function() {
  10182. this.asyncRenderer(t, e)
  10183. }, this), 0)
  10184. }
  10185. ,
  10186. n.prototype.createPseudoHideStyles = function(t) {
  10187. this.createStyles(t, "." + P.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ':before { content: "" !important; display: none !important; }.' + P.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER + ':after { content: "" !important; display: none !important; }')
  10188. }
  10189. ,
  10190. n.prototype.disableAnimations = function(t) {
  10191. this.createStyles(t, "* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")
  10192. }
  10193. ,
  10194. n.prototype.createStyles = function(t, e) {
  10195. var n = t.createElement("style");
  10196. n.innerHTML = e,
  10197. t.body.appendChild(n)
  10198. }
  10199. ,
  10200. n.prototype.getPseudoElements = function(t) {
  10201. var e, n = [[t]];
  10202. return t.node.nodeType === Node.ELEMENT_NODE && (e = this.getPseudoElement(t, ":before"),
  10203. t = this.getPseudoElement(t, ":after"),
  10204. e && n.push(e),
  10205. t && n.push(t)),
  10206. E(n)
  10207. }
  10208. ,
  10209. n.prototype.getPseudoElement = function(t, e) {
  10210. var n = t.computedStyle(e);
  10211. if (!n || !n.content || "none" === n.content || "-moz-alt-content" === n.content || "none" === n.display)
  10212. return null;
  10213. for (var r, i = (r = n.content,
  10214. (i = r.substr(0, 1)) === r.substr(r.length - 1) && i.match(/'|"/) ? r.substr(1, r.length - 2) : r), r = "url" === i.substr(0, 3), o = document.createElement(r ? "img" : "html2canvaspseudoelement"), e = new P(o, t, e), s = n.length - 1; 0 <= s; s--) {
  10215. var a = n.item(s).replace(/(\-[a-z])/g, function(t) {
  10216. return t.toUpperCase().replace("-", "")
  10217. });
  10218. o.style[a] = n[a]
  10219. }
  10220. if (o.className = P.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + P.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,
  10221. r)
  10222. return o.src = L(i)[0].args[0],
  10223. [e];
  10224. var i = document.createTextNode(i);
  10225. return o.appendChild(i),
  10226. [e, new j(i, e)]
  10227. }
  10228. ,
  10229. n.prototype.getChildren = function(n) {
  10230. return E([].filter.call(n.node.childNodes, i).map(function(t) {
  10231. var e = [new (t.nodeType === Node.TEXT_NODE ? j : I)(t, n)].filter(O);
  10232. return t.nodeType === Node.ELEMENT_NODE && e.length && "TEXTAREA" !== t.tagName ? e[0].isElementVisible() ? e.concat(this.getChildren(e[0])) : [] : e
  10233. }, this))
  10234. }
  10235. ,
  10236. n.prototype.newStackingContext = function(t, e) {
  10237. var n = new R(e, t.getOpacity(), t.node, t.parent);
  10238. t.cloneTo(n),
  10239. (e ? n.getParentStack(this) : n.parent.stack).contexts.push(n),
  10240. t.stack = n
  10241. }
  10242. ,
  10243. n.prototype.createStackingContexts = function() {
  10244. this.nodes.forEach(function(t) {
  10245. var e, n;
  10246. x(t) && (this.isRootElement(t) || t.getOpacity() < 1 || (n = (e = t).css("position"),
  10247. "auto" !== (-1 !== ["absolute", "relative", "fixed"].indexOf(n) ? e.css("zIndex") : "auto")) || this.isBodyWithTransparentRoot(t) || t.hasTransform()) ? this.newStackingContext(t, !0) : x(t) && (b(t) && d(t) || -1 !== ["inline-block", "inline-table"].indexOf(t.css("display")) || w(t)) ? this.newStackingContext(t, !1) : t.assignStack(t.parent.stack)
  10248. }, this)
  10249. }
  10250. ,
  10251. n.prototype.isBodyWithTransparentRoot = function(t) {
  10252. return "BODY" === t.node.nodeName && t.parent.color("backgroundColor").isTransparent()
  10253. }
  10254. ,
  10255. n.prototype.isRootElement = function(t) {
  10256. return null === t.parent
  10257. }
  10258. ,
  10259. n.prototype.sortStackingContexts = function(t) {
  10260. var n;
  10261. t.contexts.sort((n = t.contexts.slice(0),
  10262. function(t, e) {
  10263. return t.cssInt("zIndex") + n.indexOf(t) / n.length - (e.cssInt("zIndex") + n.indexOf(e) / n.length)
  10264. }
  10265. )),
  10266. t.contexts.forEach(this.sortStackingContexts, this)
  10267. }
  10268. ,
  10269. n.prototype.parseTextBounds = function(i) {
  10270. return function(t, e, n) {
  10271. if ("none" !== i.parent.css("textDecoration").substr(0, 4) || 0 !== t.trim().length) {
  10272. if (this.support.rangeBounds && !i.parent.hasTransform()) {
  10273. var r = n.slice(0, e).join("").length;
  10274. return this.getRangeBounds(i.node, r, t.length)
  10275. }
  10276. if (i.node && "string" == typeof i.node.data) {
  10277. e = i.node.splitText(t.length),
  10278. r = this.getWrapperBounds(i.node, i.parent.hasTransform());
  10279. return i.node = e,
  10280. r
  10281. }
  10282. } else
  10283. this.support.rangeBounds && !i.parent.hasTransform() || (i.node = i.node.splitText(t.length));
  10284. return {}
  10285. }
  10286. }
  10287. ,
  10288. n.prototype.getWrapperBounds = function(t, e) {
  10289. var n = t.ownerDocument.createElement("html2canvaswrapper")
  10290. , r = t.parentNode
  10291. , i = t.cloneNode(!0);
  10292. n.appendChild(t.cloneNode(!0)),
  10293. r.replaceChild(n, t);
  10294. e = (e ? F : W)(n);
  10295. return r.replaceChild(i, n),
  10296. e
  10297. }
  10298. ,
  10299. n.prototype.getRangeBounds = function(t, e, n) {
  10300. var r = this.range || (this.range = t.ownerDocument.createRange());
  10301. return r.setStart(t, e),
  10302. r.setEnd(t, e + n),
  10303. r.getBoundingClientRect()
  10304. }
  10305. ,
  10306. n.prototype.parse = function(t) {
  10307. var e = t.contexts.filter(f)
  10308. , n = t.children.filter(x)
  10309. , r = n.filter(_(w))
  10310. , i = r.filter(_(b)).filter(_(g))
  10311. , o = n.filter(_(b)).filter(w)
  10312. , s = r.filter(_(b)).filter(g)
  10313. , n = t.contexts.concat(r.filter(b)).filter(d)
  10314. , r = t.children.filter(C).filter(y)
  10315. , t = t.contexts.filter(p);
  10316. e.concat(i).concat(o).concat(s).concat(n).concat(r).concat(t).forEach(function(t) {
  10317. this.renderQueue.push(t),
  10318. m(t) && (this.parse(t),
  10319. this.renderQueue.push(new a))
  10320. }, this)
  10321. }
  10322. ,
  10323. n.prototype.paint = function(t) {
  10324. try {
  10325. t instanceof a ? this.renderer.ctx.restore() : C(t) ? (o(t.parent) && t.parent.appendToDOM(),
  10326. this.paintText(t),
  10327. o(t.parent) && t.parent.cleanDOM()) : this.paintNode(t)
  10328. } catch (t) {
  10329. if (T(t),
  10330. this.options.strict)
  10331. throw t
  10332. }
  10333. }
  10334. ,
  10335. n.prototype.paintNode = function(t) {
  10336. m(t) && (this.renderer.setOpacity(t.opacity),
  10337. this.renderer.ctx.save(),
  10338. t.hasTransform() && this.renderer.setTransform(t.parseTransform())),
  10339. "INPUT" === t.node.nodeName && "checkbox" === t.node.type ? this.paintCheckbox(t) : "INPUT" === t.node.nodeName && "radio" === t.node.type ? this.paintRadio(t) : this.paintElement(t)
  10340. }
  10341. ,
  10342. n.prototype.paintElement = function(e) {
  10343. var n = e.parseBounds();
  10344. this.renderer.clip(e.backgroundClip, function() {
  10345. this.renderer.renderBackground(e, n, e.borders.borders.map(S))
  10346. }, this),
  10347. this.renderer.clip(e.clip, function() {
  10348. this.renderer.renderBorders(e.borders.borders)
  10349. }, this),
  10350. this.renderer.clip(e.backgroundClip, function() {
  10351. switch (e.node.nodeName) {
  10352. case "svg":
  10353. case "IFRAME":
  10354. var t = this.images.get(e.node);
  10355. t ? this.renderer.renderImage(e, n, e.borders, t) : T("Error loading <" + e.node.nodeName + ">", e.node);
  10356. break;
  10357. case "IMG":
  10358. t = this.images.get(e.node.src);
  10359. t ? this.renderer.renderImage(e, n, e.borders, t) : T("Error loading <img>", e.node.src);
  10360. break;
  10361. case "CANVAS":
  10362. this.renderer.renderImage(e, n, e.borders, {
  10363. image: e.node
  10364. });
  10365. break;
  10366. case "SELECT":
  10367. case "INPUT":
  10368. case "TEXTAREA":
  10369. this.paintFormValue(e)
  10370. }
  10371. }, this)
  10372. }
  10373. ,
  10374. n.prototype.paintCheckbox = function(t) {
  10375. var e = t.parseBounds()
  10376. , n = Math.min(e.width, e.height)
  10377. , r = {
  10378. width: n - 1,
  10379. height: n - 1,
  10380. top: e.top,
  10381. left: e.left
  10382. }
  10383. , e = [3, 3]
  10384. , i = [e, e, e, e]
  10385. , o = [1, 1, 1, 1].map(function(t) {
  10386. return {
  10387. color: new D("#A5A5A5"),
  10388. width: t
  10389. }
  10390. })
  10391. , s = c(r, i, o);
  10392. this.renderer.clip(t.backgroundClip, function() {
  10393. this.renderer.rectangle(r.left + 1, r.top + 1, r.width - 2, r.height - 2, new D("#DEDEDE")),
  10394. this.renderer.renderBorders(u(o, r, s, i)),
  10395. t.node.checked && (this.renderer.font(new D("#424242"), "normal", "normal", "bold", n - 3 + "px", "arial"),
  10396. this.renderer.text("✔", r.left + n / 6, r.top + n - 1))
  10397. }, this)
  10398. }
  10399. ,
  10400. n.prototype.paintRadio = function(t) {
  10401. var e = t.parseBounds()
  10402. , n = Math.min(e.width, e.height) - 2;
  10403. this.renderer.clip(t.backgroundClip, function() {
  10404. this.renderer.circleStroke(e.left + 1, e.top + 1, n, new D("#DEDEDE"), 1, new D("#A5A5A5")),
  10405. t.node.checked && this.renderer.circle(Math.ceil(e.left + n / 4) + 1, Math.ceil(e.top + n / 4) + 1, Math.floor(n / 2), new D("#424242"))
  10406. }, this)
  10407. }
  10408. ,
  10409. n.prototype.paintFormValue = function(e) {
  10410. var t, n, r, i = e.getValue();
  10411. 0 < i.length && (t = e.node.ownerDocument,
  10412. n = t.createElement("html2canvaswrapper"),
  10413. ["lineHeight", "textAlign", "fontFamily", "fontWeight", "fontSize", "color", "paddingLeft", "paddingTop", "paddingRight", "paddingBottom", "width", "height", "borderLeftStyle", "borderTopStyle", "borderLeftWidth", "borderTopWidth", "boxSizing", "whiteSpace", "wordWrap"].forEach(function(t) {
  10414. try {
  10415. n.style[t] = e.css(t)
  10416. } catch (t) {
  10417. T("html2canvas: Parse: Exception caught in renderFormValue: " + t.message)
  10418. }
  10419. }),
  10420. r = e.parseBounds(),
  10421. n.style.position = "fixed",
  10422. n.style.left = r.left + "px",
  10423. n.style.top = r.top + "px",
  10424. n.textContent = i,
  10425. t.body.appendChild(n),
  10426. this.paintText(new j(n.firstChild, e)),
  10427. t.body.removeChild(n))
  10428. }
  10429. ,
  10430. n.prototype.paintText = function(n) {
  10431. n.applyTextTransform();
  10432. var t = A.ucs2.decode(n.node.data)
  10433. , r = this.options.letterRendering && !/^(normal|none|0px)$/.test(n.parent.css("letterSpacing")) || /[^\u0000-\u00ff]/.test(n.node.data) ? t.map(function(t) {
  10434. return A.ucs2.encode([t])
  10435. }) : function(t) {
  10436. for (var e, n = [], r = 0, i = !1; t.length;)
  10437. -1 !== [32, 13, 10, 9, 45].indexOf(t[r]) === i ? ((e = t.splice(0, r)).length && n.push(A.ucs2.encode(e)),
  10438. i = !i,
  10439. r = 0) : r++,
  10440. r >= t.length && ((e = t.splice(0, r)).length && n.push(A.ucs2.encode(e)));
  10441. return n
  10442. }(t)
  10443. , e = n.parent.fontWeight()
  10444. , i = n.parent.css("fontSize")
  10445. , o = n.parent.css("fontFamily")
  10446. , t = n.parent.parseTextShadows();
  10447. this.renderer.font(n.parent.color("color"), n.parent.css("fontStyle"), n.parent.css("fontVariant"), e, i, o),
  10448. t.length ? this.renderer.fontShadow(t[0].color, t[0].offsetX, t[0].offsetY, t[0].blur) : this.renderer.clearShadow(),
  10449. this.renderer.clip(n.parent.clip, function() {
  10450. r.map(this.parseTextBounds(n), this).forEach(function(t, e) {
  10451. t && (this.renderer.text(r[e], t.left, t.bottom),
  10452. this.renderTextDecoration(n.parent, t, this.fontMetrics.getMetrics(o, i)))
  10453. }, this)
  10454. }, this)
  10455. }
  10456. ,
  10457. n.prototype.renderTextDecoration = function(t, e, n) {
  10458. switch (t.css("textDecoration").split(" ")[0]) {
  10459. case "underline":
  10460. this.renderer.rectangle(e.left, Math.round(e.top + n.baseline + n.lineWidth), e.width, 1, t.color("color"));
  10461. break;
  10462. case "overline":
  10463. this.renderer.rectangle(e.left, Math.round(e.top), e.width, 1, t.color("color"));
  10464. break;
  10465. case "line-through":
  10466. this.renderer.rectangle(e.left, Math.ceil(e.top + n.middle + n.lineWidth), e.width, 1, t.color("color"))
  10467. }
  10468. }
  10469. ;
  10470. var H = {
  10471. inset: [["darken", .6], ["darken", .1], ["darken", .1], ["darken", .6]]
  10472. };
  10473. n.prototype.parseBorders = function(i) {
  10474. var e, t = i.parseBounds(), n = (e = i,
  10475. ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].map(function(t) {
  10476. t = e.css("border" + t + "Radius").split(" ");
  10477. return t.length <= 1 && (t[1] = t[0]),
  10478. t.map(k)
  10479. })), r = ["Top", "Right", "Bottom", "Left"].map(function(t, e) {
  10480. var n = i.css("border" + t + "Style")
  10481. , r = i.color("border" + t + "Color");
  10482. "inset" === n && r.isBlack() && (r = new D([255, 255, 255, r.a]));
  10483. e = H[n] ? H[n][e] : null;
  10484. return {
  10485. width: i.cssInt("border" + t + "Width"),
  10486. color: e ? r[e[0]](e[1]) : r,
  10487. args: null
  10488. }
  10489. }), o = c(t, n, r);
  10490. return {
  10491. clip: this.parseBackgroundClip(i, o, r, n, t),
  10492. borders: u(r, t, o, n)
  10493. }
  10494. }
  10495. ,
  10496. n.prototype.parseBackgroundClip = function(t, e, n, r, i) {
  10497. var o = [];
  10498. switch (t.css("backgroundClip")) {
  10499. case "content-box":
  10500. case "padding-box":
  10501. s(o, r[0], r[1], e.topLeftInner, e.topRightInner, i.left + n[3].width, i.top + n[0].width),
  10502. s(o, r[1], r[2], e.topRightInner, e.bottomRightInner, i.left + i.width - n[1].width, i.top + n[0].width),
  10503. s(o, r[2], r[3], e.bottomRightInner, e.bottomLeftInner, i.left + i.width - n[1].width, i.top + i.height - n[2].width),
  10504. s(o, r[3], r[0], e.bottomLeftInner, e.topLeftInner, i.left + n[3].width, i.top + i.height - n[2].width);
  10505. break;
  10506. default:
  10507. s(o, r[0], r[1], e.topLeftOuter, e.topRightOuter, i.left, i.top),
  10508. s(o, r[1], r[2], e.topRightOuter, e.bottomRightOuter, i.left + i.width, i.top),
  10509. s(o, r[2], r[3], e.bottomRightOuter, e.bottomLeftOuter, i.left + i.width, i.top + i.height),
  10510. s(o, r[3], r[0], e.bottomLeftOuter, e.topLeftOuter, i.left, i.top + i.height)
  10511. }
  10512. return o
  10513. }
  10514. ,
  10515. e.exports = n
  10516. }
  10517. , {
  10518. "./color": 3,
  10519. "./fontmetrics": 7,
  10520. "./log": 13,
  10521. "./nodecontainer": 14,
  10522. "./pseudoelementcontainer": 18,
  10523. "./stackingcontext": 21,
  10524. "./textcontainer": 25,
  10525. "./utils": 26,
  10526. punycode: 1
  10527. }],
  10528. 16: [function(t, e, n) {
  10529. function a(t, e, n) {
  10530. var r = "withCredentials" in new XMLHttpRequest;
  10531. if (!e)
  10532. return Promise.reject("No proxy configured");
  10533. var i = s(r)
  10534. , t = u(e, t, i);
  10535. return r ? c(t) : o(n, t, i).then(function(t) {
  10536. return f(t.content)
  10537. })
  10538. }
  10539. function o(i, o, s) {
  10540. return new Promise(function(e, n) {
  10541. function r() {
  10542. delete window.html2canvas.proxy[s],
  10543. i.body.removeChild(t)
  10544. }
  10545. var t = i.createElement("script");
  10546. window.html2canvas.proxy[s] = function(t) {
  10547. r(),
  10548. e(t)
  10549. }
  10550. ,
  10551. t.src = o,
  10552. t.onerror = function(t) {
  10553. r(),
  10554. n(t)
  10555. }
  10556. ,
  10557. i.body.appendChild(t)
  10558. }
  10559. )
  10560. }
  10561. function s(t) {
  10562. return t ? "" : "html2canvas_" + Date.now() + "_" + ++i + "_" + Math.round(1e5 * Math.random())
  10563. }
  10564. function u(t, e, n) {
  10565. return t + "?url=" + encodeURIComponent(e) + (n.length ? "&callback=html2canvas.proxy." + n : "")
  10566. }
  10567. var c = t("./xhr")
  10568. , r = t("./utils")
  10569. , l = t("./log")
  10570. , h = t("./clone")
  10571. , f = r.decode64
  10572. , i = 0;
  10573. n.Proxy = a,
  10574. n.ProxyURL = function(t, e, n) {
  10575. var r = "crossOrigin" in new Image
  10576. , i = s(r)
  10577. , t = u(e, t, i);
  10578. return r ? Promise.resolve(t) : o(n, t, i).then(function(t) {
  10579. return "data:" + t.type + ";base64," + t.content
  10580. })
  10581. }
  10582. ,
  10583. n.loadUrlDocument = function(t, e, n, r, i, o) {
  10584. return new a(t, e, window.document).then((s = t,
  10585. function(e) {
  10586. var n, t = new DOMParser;
  10587. try {
  10588. n = t.parseFromString(e, "text/html")
  10589. } catch (t) {
  10590. l("DOMParser not supported, falling back to createHTMLDocument"),
  10591. n = document.implementation.createHTMLDocument("");
  10592. try {
  10593. n.open(),
  10594. n.write(e),
  10595. n.close()
  10596. } catch (t) {
  10597. l("createHTMLDocument write not supported, falling back to document.body.innerHTML"),
  10598. n.body.innerHTML = e
  10599. }
  10600. }
  10601. var r = n.querySelector("base");
  10602. return r && r.href.host || ((r = n.createElement("base")).href = s,
  10603. n.head.insertBefore(r, n.head.firstChild)),
  10604. n
  10605. }
  10606. )).then(function(t) {
  10607. return h(t, n, r, i, o, 0, 0)
  10608. });
  10609. var s
  10610. }
  10611. }
  10612. , {
  10613. "./clone": 2,
  10614. "./log": 13,
  10615. "./utils": 26,
  10616. "./xhr": 28
  10617. }],
  10618. 17: [function(t, e) {
  10619. var o = t("./proxy").ProxyURL;
  10620. e.exports = function(n, r) {
  10621. var t = document.createElement("a");
  10622. t.href = n,
  10623. n = t.href,
  10624. this.src = n,
  10625. this.image = new Image;
  10626. var i = this;
  10627. this.promise = new Promise(function(t, e) {
  10628. i.image.crossOrigin = "Anonymous",
  10629. i.image.onload = t,
  10630. i.image.onerror = e,
  10631. new o(n, r, document).then(function(t) {
  10632. i.image.src = t
  10633. }).catch(e)
  10634. }
  10635. )
  10636. }
  10637. }
  10638. , {
  10639. "./proxy": 16
  10640. }],
  10641. 18: [function(t, e) {
  10642. function n(t, e, n) {
  10643. r.call(this, t, e),
  10644. this.isPseudoElement = !0,
  10645. this.before = ":before" === n
  10646. }
  10647. var r = t("./nodecontainer");
  10648. n.prototype.cloneTo = function(t) {
  10649. n.prototype.cloneTo.call(this, t),
  10650. t.isPseudoElement = !0,
  10651. t.before = this.before
  10652. }
  10653. ,
  10654. (n.prototype = Object.create(r.prototype)).appendToDOM = function() {
  10655. this.before ? this.parent.node.insertBefore(this.node, this.parent.node.firstChild) : this.parent.node.appendChild(this.node),
  10656. this.parent.node.className += " " + this.getHideClass()
  10657. }
  10658. ,
  10659. n.prototype.cleanDOM = function() {
  10660. this.node.parentNode.removeChild(this.node),
  10661. this.parent.node.className = this.parent.node.className.replace(this.getHideClass(), "")
  10662. }
  10663. ,
  10664. n.prototype.getHideClass = function() {
  10665. return this["PSEUDO_HIDE_ELEMENT_CLASS_" + (this.before ? "BEFORE" : "AFTER")]
  10666. }
  10667. ,
  10668. n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = "___html2canvas___pseudoelement_before",
  10669. n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER = "___html2canvas___pseudoelement_after",
  10670. e.exports = n
  10671. }
  10672. , {
  10673. "./nodecontainer": 14
  10674. }],
  10675. 19: [function(t, e) {
  10676. function n(t, e, n, r, i) {
  10677. this.width = t,
  10678. this.height = e,
  10679. this.images = n,
  10680. this.options = r,
  10681. this.document = i
  10682. }
  10683. var a = t("./log");
  10684. n.prototype.renderImage = function(t, e, n, r) {
  10685. var i = t.cssInt("paddingLeft")
  10686. , o = t.cssInt("paddingTop")
  10687. , s = t.cssInt("paddingRight")
  10688. , t = t.cssInt("paddingBottom")
  10689. , n = n.borders
  10690. , s = e.width - (n[1].width + n[3].width + i + s)
  10691. , t = e.height - (n[0].width + n[2].width + o + t);
  10692. this.drawImage(r, 0, 0, r.image.width || s, r.image.height || t, e.left + i + n[3].width, e.top + o + n[0].width, s, t)
  10693. }
  10694. ,
  10695. n.prototype.renderBackground = function(t, e, n) {
  10696. 0 < e.height && 0 < e.width && (this.renderBackgroundColor(t, e),
  10697. this.renderBackgroundImage(t, e, n))
  10698. }
  10699. ,
  10700. n.prototype.renderBackgroundColor = function(t, e) {
  10701. t = t.color("backgroundColor");
  10702. t.isTransparent() || this.rectangle(e.left, e.top, e.width, e.height, t)
  10703. }
  10704. ,
  10705. n.prototype.renderBorders = function(t) {
  10706. t.forEach(this.renderBorder, this)
  10707. }
  10708. ,
  10709. n.prototype.renderBorder = function(t) {
  10710. t.color.isTransparent() || null === t.args || this.drawShape(t.args, t.color)
  10711. }
  10712. ,
  10713. n.prototype.renderBackgroundImage = function(i, o, s) {
  10714. i.parseBackgroundImages().reverse().forEach(function(t, e, n) {
  10715. switch (t.method) {
  10716. case "url":
  10717. var r = this.images.get(t.args[0]);
  10718. r ? this.renderBackgroundRepeating(i, o, r, n.length - (e + 1), s) : a("Error loading background-image", t.args[0]);
  10719. break;
  10720. case "linear-gradient":
  10721. case "gradient":
  10722. r = this.images.get(t.value);
  10723. r ? this.renderBackgroundGradient(r, o, s) : a("Error loading background-image", t.args[0]);
  10724. break;
  10725. case "none":
  10726. break;
  10727. default:
  10728. a("Unknown background-image type", t.args[0])
  10729. }
  10730. }, this)
  10731. }
  10732. ,
  10733. n.prototype.renderBackgroundRepeating = function(t, e, n, r, i) {
  10734. var o = t.parseBackgroundSize(e, n.image, r)
  10735. , s = t.parseBackgroundPosition(e, n.image, r, o);
  10736. switch (t.parseBackgroundRepeat(r)) {
  10737. case "repeat-x":
  10738. case "repeat no-repeat":
  10739. this.backgroundRepeatShape(n, s, o, e, e.left + i[3], e.top + s.top + i[0], 99999, o.height, i);
  10740. break;
  10741. case "repeat-y":
  10742. case "no-repeat repeat":
  10743. this.backgroundRepeatShape(n, s, o, e, e.left + s.left + i[3], e.top + i[0], o.width, 99999, i);
  10744. break;
  10745. case "no-repeat":
  10746. this.backgroundRepeatShape(n, s, o, e, e.left + s.left + i[3], e.top + s.top + i[0], o.width, o.height, i);
  10747. break;
  10748. default:
  10749. this.renderBackgroundRepeat(n, s, o, {
  10750. top: e.top,
  10751. left: e.left
  10752. }, i[3], i[0])
  10753. }
  10754. }
  10755. ,
  10756. e.exports = n
  10757. }
  10758. , {
  10759. "./log": 13
  10760. }],
  10761. 20: [function(t, e) {
  10762. function n(t, e) {
  10763. i.apply(this, arguments),
  10764. this.canvas = this.options.canvas || this.document.createElement("canvas"),
  10765. this.options.canvas || (this.canvas.width = t,
  10766. this.canvas.height = e),
  10767. this.ctx = this.canvas.getContext("2d"),
  10768. this.taintCtx = this.document.createElement("canvas").getContext("2d"),
  10769. this.ctx.textBaseline = "bottom",
  10770. this.variables = {},
  10771. s("Initialized CanvasRenderer with size", t, "x", e)
  10772. }
  10773. function r(t) {
  10774. return 0 < t.length
  10775. }
  10776. var i = t("../renderer")
  10777. , o = t("../lineargradientcontainer")
  10778. , s = t("../log");
  10779. (n.prototype = Object.create(i.prototype)).setFillStyle = function(t) {
  10780. return this.ctx.fillStyle = "object" == typeof t && t.isColor ? t.toString() : t,
  10781. this.ctx
  10782. }
  10783. ,
  10784. n.prototype.rectangle = function(t, e, n, r, i) {
  10785. this.setFillStyle(i).fillRect(t, e, n, r)
  10786. }
  10787. ,
  10788. n.prototype.circle = function(t, e, n, r) {
  10789. this.setFillStyle(r),
  10790. this.ctx.beginPath(),
  10791. this.ctx.arc(t + n / 2, e + n / 2, n / 2, 0, 2 * Math.PI, !0),
  10792. this.ctx.closePath(),
  10793. this.ctx.fill()
  10794. }
  10795. ,
  10796. n.prototype.circleStroke = function(t, e, n, r, i, o) {
  10797. this.circle(t, e, n, r),
  10798. this.ctx.strokeStyle = o.toString(),
  10799. this.ctx.stroke()
  10800. }
  10801. ,
  10802. n.prototype.drawShape = function(t, e) {
  10803. this.shape(t),
  10804. this.setFillStyle(e).fill()
  10805. }
  10806. ,
  10807. n.prototype.taints = function(e) {
  10808. if (null === e.tainted) {
  10809. this.taintCtx.drawImage(e.image, 0, 0);
  10810. try {
  10811. this.taintCtx.getImageData(0, 0, 1, 1),
  10812. e.tainted = !1
  10813. } catch (t) {
  10814. this.taintCtx = document.createElement("canvas").getContext("2d"),
  10815. e.tainted = !0
  10816. }
  10817. }
  10818. return e.tainted
  10819. }
  10820. ,
  10821. n.prototype.drawImage = function(t, e, n, r, i, o, s, a, u) {
  10822. this.taints(t) && !this.options.allowTaint || this.ctx.drawImage(t.image, e, n, r, i, o, s, a, u)
  10823. }
  10824. ,
  10825. n.prototype.clip = function(t, e, n) {
  10826. this.ctx.save(),
  10827. t.filter(r).forEach(function(t) {
  10828. this.shape(t).clip()
  10829. }, this),
  10830. e.call(n),
  10831. this.ctx.restore()
  10832. }
  10833. ,
  10834. n.prototype.shape = function(t) {
  10835. return this.ctx.beginPath(),
  10836. t.forEach(function(t, e) {
  10837. ("rect" === t[0] ? this.ctx.rect : this.ctx[0 === e ? "moveTo" : t[0] + "To"]).apply(this.ctx, t.slice(1))
  10838. }, this),
  10839. this.ctx.closePath(),
  10840. this.ctx
  10841. }
  10842. ,
  10843. n.prototype.font = function(t, e, n, r, i, o) {
  10844. this.setFillStyle(t).font = [e, n, r, i, o].join(" ").split(",")[0]
  10845. }
  10846. ,
  10847. n.prototype.fontShadow = function(t, e, n, r) {
  10848. this.setVariable("shadowColor", t.toString()).setVariable("shadowOffsetY", e).setVariable("shadowOffsetX", n).setVariable("shadowBlur", r)
  10849. }
  10850. ,
  10851. n.prototype.clearShadow = function() {
  10852. this.setVariable("shadowColor", "rgba(0,0,0,0)")
  10853. }
  10854. ,
  10855. n.prototype.setOpacity = function(t) {
  10856. this.ctx.globalAlpha = t
  10857. }
  10858. ,
  10859. n.prototype.setTransform = function(t) {
  10860. this.ctx.translate(t.origin[0], t.origin[1]),
  10861. this.ctx.transform.apply(this.ctx, t.matrix),
  10862. this.ctx.translate(-t.origin[0], -t.origin[1])
  10863. }
  10864. ,
  10865. n.prototype.setVariable = function(t, e) {
  10866. return this.variables[t] !== e && (this.variables[t] = this.ctx[t] = e),
  10867. this
  10868. }
  10869. ,
  10870. n.prototype.text = function(t, e, n) {
  10871. this.ctx.fillText(t, e, n)
  10872. }
  10873. ,
  10874. n.prototype.backgroundRepeatShape = function(t, e, n, r, i, o, s, a, u) {
  10875. o = [["line", Math.round(i), Math.round(o)], ["line", Math.round(i + s), Math.round(o)], ["line", Math.round(i + s), Math.round(a + o)], ["line", Math.round(i), Math.round(a + o)]];
  10876. this.clip([o], function() {
  10877. this.renderBackgroundRepeat(t, e, n, r, u[3], u[0])
  10878. }, this)
  10879. }
  10880. ,
  10881. n.prototype.renderBackgroundRepeat = function(t, e, n, r, i, o) {
  10882. i = Math.round(r.left + e.left + i),
  10883. o = Math.round(r.top + e.top + o);
  10884. this.setFillStyle(this.ctx.createPattern(this.resizeImage(t, n), "repeat")),
  10885. this.ctx.translate(i, o),
  10886. this.ctx.fill(),
  10887. this.ctx.translate(-i, -o)
  10888. }
  10889. ,
  10890. n.prototype.renderBackgroundGradient = function(t, e) {
  10891. var n;
  10892. t instanceof o && (n = this.ctx.createLinearGradient(e.left + e.width * t.x0, e.top + e.height * t.y0, e.left + e.width * t.x1, e.top + e.height * t.y1),
  10893. t.colorStops.forEach(function(t) {
  10894. n.addColorStop(t.stop, t.color.toString())
  10895. }),
  10896. this.rectangle(e.left, e.top, e.width, e.height, n))
  10897. }
  10898. ,
  10899. n.prototype.resizeImage = function(t, e) {
  10900. var n = t.image;
  10901. if (n.width === e.width && n.height === e.height)
  10902. return n;
  10903. t = document.createElement("canvas");
  10904. return t.width = e.width,
  10905. t.height = e.height,
  10906. t.getContext("2d").drawImage(n, 0, 0, n.width, n.height, 0, 0, e.width, e.height),
  10907. t
  10908. }
  10909. ,
  10910. e.exports = n
  10911. }
  10912. , {
  10913. "../lineargradientcontainer": 12,
  10914. "../log": 13,
  10915. "../renderer": 19
  10916. }],
  10917. 21: [function(t, e) {
  10918. function n(t, e, n, r) {
  10919. i.call(this, n, r),
  10920. this.ownStacking = t,
  10921. this.contexts = [],
  10922. this.children = [],
  10923. this.opacity = (this.parent ? this.parent.stack.opacity : 1) * e
  10924. }
  10925. var i = t("./nodecontainer");
  10926. (n.prototype = Object.create(i.prototype)).getParentStack = function(t) {
  10927. var e = this.parent ? this.parent.stack : null;
  10928. return e ? e.ownStacking ? e : e.getParentStack(t) : t.stack
  10929. }
  10930. ,
  10931. e.exports = n
  10932. }
  10933. , {
  10934. "./nodecontainer": 14
  10935. }],
  10936. 22: [function(t, e) {
  10937. function n(t) {
  10938. this.rangeBounds = this.testRangeBounds(t),
  10939. this.cors = this.testCORS(),
  10940. this.svg = this.testSVG()
  10941. }
  10942. n.prototype.testRangeBounds = function(t) {
  10943. var e, n, r = !1;
  10944. return t.createRange && ((e = t.createRange()).getBoundingClientRect && ((n = t.createElement("boundtest")).style.height = "123px",
  10945. n.style.display = "block",
  10946. t.body.appendChild(n),
  10947. e.selectNode(n),
  10948. 123 === e.getBoundingClientRect().height && (r = !0),
  10949. t.body.removeChild(n))),
  10950. r
  10951. }
  10952. ,
  10953. n.prototype.testCORS = function() {
  10954. return void 0 !== (new Image).crossOrigin
  10955. }
  10956. ,
  10957. n.prototype.testSVG = function() {
  10958. var t = new Image
  10959. , e = document.createElement("canvas")
  10960. , n = e.getContext("2d");
  10961. t.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
  10962. try {
  10963. n.drawImage(t, 0, 0),
  10964. e.toDataURL()
  10965. } catch (t) {
  10966. return !1
  10967. }
  10968. return !0
  10969. }
  10970. ,
  10971. e.exports = n
  10972. }
  10973. , {}],
  10974. 23: [function(t, e) {
  10975. function n(t) {
  10976. this.src = t,
  10977. this.image = null;
  10978. var n = this;
  10979. this.promise = this.hasFabric().then(function() {
  10980. return n.isInline(t) ? Promise.resolve(n.inlineFormatting(t)) : r(t)
  10981. }).then(function(e) {
  10982. return new Promise(function(t) {
  10983. window.html2canvas.svg.fabric.loadSVGFromString(e, n.createCanvas.call(n, t))
  10984. }
  10985. )
  10986. })
  10987. }
  10988. var r = t("./xhr")
  10989. , i = t("./utils").decode64;
  10990. n.prototype.hasFabric = function() {
  10991. return window.html2canvas.svg && window.html2canvas.svg.fabric ? Promise.resolve() : Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))
  10992. }
  10993. ,
  10994. n.prototype.inlineFormatting = function(t) {
  10995. return /^data:image\/svg\+xml;base64,/.test(t) ? this.decode64(this.removeContentType(t)) : this.removeContentType(t)
  10996. }
  10997. ,
  10998. n.prototype.removeContentType = function(t) {
  10999. return t.replace(/^data:image\/svg\+xml(;base64)?,/, "")
  11000. }
  11001. ,
  11002. n.prototype.isInline = function(t) {
  11003. return /^data:image\/svg\+xml/i.test(t)
  11004. }
  11005. ,
  11006. n.prototype.createCanvas = function(r) {
  11007. var i = this;
  11008. return function(t, e) {
  11009. var n = new window.html2canvas.svg.fabric.StaticCanvas("c");
  11010. i.image = n.lowerCanvasEl,
  11011. n.setWidth(e.width).setHeight(e.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(t, e)).renderAll(),
  11012. r(n.lowerCanvasEl)
  11013. }
  11014. }
  11015. ,
  11016. n.prototype.decode64 = function(t) {
  11017. return "function" == typeof window.atob ? window.atob(t) : i(t)
  11018. }
  11019. ,
  11020. e.exports = n
  11021. }
  11022. , {
  11023. "./utils": 26,
  11024. "./xhr": 28
  11025. }],
  11026. 24: [function(t, e) {
  11027. function n(n, t) {
  11028. this.src = n,
  11029. this.image = null;
  11030. var r = this;
  11031. this.promise = t ? new Promise(function(t, e) {
  11032. r.image = new Image,
  11033. r.image.onload = t,
  11034. r.image.onerror = e,
  11035. r.image.src = "data:image/svg+xml," + (new XMLSerializer).serializeToString(n),
  11036. !0 === r.image.complete && t(r.image)
  11037. }
  11038. ) : this.hasFabric().then(function() {
  11039. return new Promise(function(t) {
  11040. window.html2canvas.svg.fabric.parseSVGDocument(n, r.createCanvas.call(r, t))
  11041. }
  11042. )
  11043. })
  11044. }
  11045. t = t("./svgcontainer");
  11046. n.prototype = Object.create(t.prototype),
  11047. e.exports = n
  11048. }
  11049. , {
  11050. "./svgcontainer": 23
  11051. }],
  11052. 25: [function(t, e) {
  11053. function n(t, e) {
  11054. i.call(this, t, e)
  11055. }
  11056. function r(t, e, n) {
  11057. return 0 < t.length ? e + n.toUpperCase() : void 0
  11058. }
  11059. var i = t("./nodecontainer");
  11060. (n.prototype = Object.create(i.prototype)).applyTextTransform = function() {
  11061. this.node.data = this.transform(this.parent.css("textTransform"))
  11062. }
  11063. ,
  11064. n.prototype.transform = function(t) {
  11065. var e = this.node.data;
  11066. switch (t) {
  11067. case "lowercase":
  11068. return e.toLowerCase();
  11069. case "capitalize":
  11070. return e.replace(/(^|\s|:|-|\(|\))([a-z])/g, r);
  11071. case "uppercase":
  11072. return e.toUpperCase();
  11073. default:
  11074. return e
  11075. }
  11076. }
  11077. ,
  11078. e.exports = n
  11079. }
  11080. , {
  11081. "./nodecontainer": 14
  11082. }],
  11083. 26: [function(t, e, n) {
  11084. n.smallImage = function() {
  11085. return "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
  11086. }
  11087. ,
  11088. n.bind = function(t, e) {
  11089. return function() {
  11090. return t.apply(e, arguments)
  11091. }
  11092. }
  11093. ,
  11094. n.decode64 = function(t) {
  11095. for (var e, n, r, i, o, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = t.length, u = "", c = 0; c < a; c += 4)
  11096. r = s.indexOf(t[c]) << 2 | (o = s.indexOf(t[c + 1])) >> 4,
  11097. i = (15 & o) << 4 | (e = s.indexOf(t[c + 2])) >> 2,
  11098. o = (3 & e) << 6 | (n = s.indexOf(t[c + 3])),
  11099. u += 64 === e ? String.fromCharCode(r) : 64 === n || -1 === n ? String.fromCharCode(r, i) : String.fromCharCode(r, i, o);
  11100. return u
  11101. }
  11102. ,
  11103. n.getBounds = function(t) {
  11104. if (t.getBoundingClientRect) {
  11105. var e = t.getBoundingClientRect()
  11106. , n = null == t.offsetWidth ? e.width : t.offsetWidth;
  11107. return {
  11108. top: e.top,
  11109. bottom: e.bottom || e.top + e.height,
  11110. right: e.left + n,
  11111. left: e.left,
  11112. width: n,
  11113. height: null == t.offsetHeight ? e.height : t.offsetHeight
  11114. }
  11115. }
  11116. return {}
  11117. }
  11118. ,
  11119. n.offsetBounds = function(t) {
  11120. var e = t.offsetParent ? n.offsetBounds(t.offsetParent) : {
  11121. top: 0,
  11122. left: 0
  11123. };
  11124. return {
  11125. top: t.offsetTop + e.top,
  11126. bottom: t.offsetTop + t.offsetHeight + e.top,
  11127. right: t.offsetLeft + e.left + t.offsetWidth,
  11128. left: t.offsetLeft + e.left,
  11129. width: t.offsetWidth,
  11130. height: t.offsetHeight
  11131. }
  11132. }
  11133. ,
  11134. n.parseBackgrounds = function(t) {
  11135. function e() {
  11136. h && ('"' === n.substr(0, 1) && (n = n.substr(1, n.length - 2)),
  11137. n && l.push(n),
  11138. "-" === h.substr(0, 1) && 0 < (i = h.indexOf("-", 1) + 1) && (r = h.substr(0, i),
  11139. h = h.substr(i)),
  11140. a.push({
  11141. prefix: r,
  11142. method: h.toLowerCase(),
  11143. value: o,
  11144. args: l,
  11145. image: null
  11146. })),
  11147. l = [],
  11148. h = r = n = o = ""
  11149. }
  11150. var n, r, i, o, s, a = [], u = 0, c = 0, l = [], h = r = n = o = "";
  11151. return t.split("").forEach(function(t) {
  11152. if (!(0 === u && -1 < " \r\n\t".indexOf(t))) {
  11153. switch (t) {
  11154. case '"':
  11155. s ? s === t && (s = null) : s = t;
  11156. break;
  11157. case "(":
  11158. if (s)
  11159. break;
  11160. if (0 === u)
  11161. return u = 1,
  11162. void (o += t);
  11163. c++;
  11164. break;
  11165. case ")":
  11166. if (s)
  11167. break;
  11168. if (1 === u) {
  11169. if (0 === c)
  11170. return u = 0,
  11171. o += t,
  11172. void e();
  11173. c--
  11174. }
  11175. break;
  11176. case ",":
  11177. if (s)
  11178. break;
  11179. if (0 === u)
  11180. return void e();
  11181. if (1 === u && 0 === c && !h.match(/^url$/i))
  11182. return l.push(n),
  11183. n = "",
  11184. void (o += t)
  11185. }
  11186. o += t,
  11187. 0 === u ? h += t : n += t
  11188. }
  11189. }),
  11190. e(),
  11191. a
  11192. }
  11193. }
  11194. , {}],
  11195. 27: [function(t, e) {
  11196. function n(t) {
  11197. r.apply(this, arguments),
  11198. this.type = "linear" === t.args[0] ? r.TYPES.LINEAR : r.TYPES.RADIAL
  11199. }
  11200. var r = t("./gradientcontainer");
  11201. n.prototype = Object.create(r.prototype),
  11202. e.exports = n
  11203. }
  11204. , {
  11205. "./gradientcontainer": 9
  11206. }],
  11207. 28: [function(t, e) {
  11208. e.exports = function(r) {
  11209. return new Promise(function(t, e) {
  11210. var n = new XMLHttpRequest;
  11211. n.open("GET", r),
  11212. n.onload = function() {
  11213. 200 === n.status ? t(n.responseText) : e(new Error(n.statusText))
  11214. }
  11215. ,
  11216. n.onerror = function() {
  11217. e(new Error("Network Error"))
  11218. }
  11219. ,
  11220. n.send()
  11221. }
  11222. )
  11223. }
  11224. }
  11225. , {}]
  11226. }, {}, [4])(4)
  11227. }),
  11228. function(t) {
  11229. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).localforage = t()
  11230. }(function() {
  11231. return function r(i, o, s) {
  11232. function a(e, t) {
  11233. if (!o[e]) {
  11234. if (!i[e]) {
  11235. var n = "function" == typeof require && require;
  11236. if (!t && n)
  11237. return n(e, !0);
  11238. if (u)
  11239. return u(e, !0);
  11240. n = new Error("Cannot find module '" + e + "'");
  11241. throw n.code = "MODULE_NOT_FOUND",
  11242. n
  11243. }
  11244. n = o[e] = {
  11245. exports: {}
  11246. };
  11247. i[e][0].call(n.exports, function(t) {
  11248. return a(i[e][1][t] || t)
  11249. }, n, n.exports, r, i, o, s)
  11250. }
  11251. return o[e].exports
  11252. }
  11253. for (var u = "function" == typeof require && require, t = 0; t < s.length; t++)
  11254. a(s[t]);
  11255. return a
  11256. }({
  11257. 1: [function(t, c, e) {
  11258. (function(e) {
  11259. "use strict";
  11260. function n() {
  11261. o = !0;
  11262. for (var t, e, n = u.length; n;) {
  11263. for (e = u,
  11264. u = [],
  11265. t = -1; ++t < n;)
  11266. e[t]();
  11267. n = u.length
  11268. }
  11269. o = !1
  11270. }
  11271. var t, r, i, o, s = e.MutationObserver || e.WebKitMutationObserver, a = s ? (t = 0,
  11272. s = new s(n),
  11273. r = e.document.createTextNode(""),
  11274. s.observe(r, {
  11275. characterData: !0
  11276. }),
  11277. function() {
  11278. r.data = t = ++t % 2
  11279. }
  11280. ) : e.setImmediate || void 0 === e.MessageChannel ? "document" in e && "onreadystatechange" in e.document.createElement("script") ? function() {
  11281. var t = e.document.createElement("script");
  11282. t.onreadystatechange = function() {
  11283. n(),
  11284. t.onreadystatechange = null,
  11285. t.parentNode.removeChild(t),
  11286. t = null
  11287. }
  11288. ,
  11289. e.document.documentElement.appendChild(t)
  11290. }
  11291. : function() {
  11292. setTimeout(n, 0)
  11293. }
  11294. : ((i = new e.MessageChannel).port1.onmessage = n,
  11295. function() {
  11296. i.port2.postMessage(0)
  11297. }
  11298. ), u = [];
  11299. c.exports = function(t) {
  11300. 1 !== u.push(t) || o || a()
  11301. }
  11302. }
  11303. ).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  11304. }
  11305. , {}],
  11306. 2: [function(t, e, n) {
  11307. "use strict";
  11308. function u() { }
  11309. function r(t) {
  11310. if ("function" != typeof t)
  11311. throw new TypeError("resolver must be a function");
  11312. this.state = d,
  11313. this.queue = [],
  11314. this.outcome = void 0,
  11315. t !== u && a(this, t)
  11316. }
  11317. function i(t, e, n) {
  11318. this.promise = t,
  11319. "function" == typeof e && (this.onFulfilled = e,
  11320. this.callFulfilled = this.otherCallFulfilled),
  11321. "function" == typeof n && (this.onRejected = n,
  11322. this.callRejected = this.otherCallRejected)
  11323. }
  11324. function o(e, n, r) {
  11325. l(function() {
  11326. var t;
  11327. try {
  11328. t = n(r)
  11329. } catch (t) {
  11330. return h.reject(e, t)
  11331. }
  11332. t === e ? h.reject(e, new TypeError("Cannot resolve promise with itself")) : h.resolve(e, t)
  11333. })
  11334. }
  11335. function s(t) {
  11336. var e = t && t.then;
  11337. if (t && ("object" == typeof t || "function" == typeof t) && "function" == typeof e)
  11338. return function() {
  11339. e.apply(t, arguments)
  11340. }
  11341. }
  11342. function a(e, t) {
  11343. function n(t) {
  11344. i || (i = !0,
  11345. h.reject(e, t))
  11346. }
  11347. function r(t) {
  11348. i || (i = !0,
  11349. h.resolve(e, t))
  11350. }
  11351. var i = !1
  11352. , o = c(function() {
  11353. t(r, n)
  11354. });
  11355. "error" === o.status && n(o.value)
  11356. }
  11357. function c(t, e) {
  11358. var n = {};
  11359. try {
  11360. n.value = t(e),
  11361. n.status = "success"
  11362. } catch (t) {
  11363. n.status = "error",
  11364. n.value = t
  11365. }
  11366. return n
  11367. }
  11368. var l = t(1)
  11369. , h = {}
  11370. , f = ["REJECTED"]
  11371. , p = ["FULFILLED"]
  11372. , d = ["PENDING"];
  11373. (e.exports = r).prototype.catch = function(t) {
  11374. return this.then(null, t)
  11375. }
  11376. ,
  11377. r.prototype.then = function(t, e) {
  11378. if ("function" != typeof t && this.state === p || "function" != typeof e && this.state === f)
  11379. return this;
  11380. var n = new this.constructor(u);
  11381. return this.state !== d ? o(n, this.state === p ? t : e, this.outcome) : this.queue.push(new i(n, t, e)),
  11382. n
  11383. }
  11384. ,
  11385. i.prototype.callFulfilled = function(t) {
  11386. h.resolve(this.promise, t)
  11387. }
  11388. ,
  11389. i.prototype.otherCallFulfilled = function(t) {
  11390. o(this.promise, this.onFulfilled, t)
  11391. }
  11392. ,
  11393. i.prototype.callRejected = function(t) {
  11394. h.reject(this.promise, t)
  11395. }
  11396. ,
  11397. i.prototype.otherCallRejected = function(t) {
  11398. o(this.promise, this.onRejected, t)
  11399. }
  11400. ,
  11401. h.resolve = function(t, e) {
  11402. var n = c(s, e);
  11403. if ("error" === n.status)
  11404. return h.reject(t, n.value);
  11405. n = n.value;
  11406. if (n)
  11407. a(t, n);
  11408. else {
  11409. t.state = p,
  11410. t.outcome = e;
  11411. for (var r = -1, i = t.queue.length; ++r < i;)
  11412. t.queue[r].callFulfilled(e)
  11413. }
  11414. return t
  11415. }
  11416. ,
  11417. h.reject = function(t, e) {
  11418. t.state = f,
  11419. t.outcome = e;
  11420. for (var n = -1, r = t.queue.length; ++n < r;)
  11421. t.queue[n].callRejected(e);
  11422. return t
  11423. }
  11424. ,
  11425. r.resolve = function(t) {
  11426. return t instanceof this ? t : h.resolve(new this(u), t)
  11427. }
  11428. ,
  11429. r.reject = function(t) {
  11430. var e = new this(u);
  11431. return h.reject(e, t)
  11432. }
  11433. ,
  11434. r.all = function(t) {
  11435. var n = this;
  11436. if ("[object Array]" !== Object.prototype.toString.call(t))
  11437. return this.reject(new TypeError("must be an array"));
  11438. var r = t.length
  11439. , i = !1;
  11440. if (!r)
  11441. return this.resolve([]);
  11442. for (var o = new Array(r), s = 0, e = -1, a = new this(u); ++e < r;)
  11443. !function(t, e) {
  11444. n.resolve(t).then(function(t) {
  11445. o[e] = t,
  11446. ++s !== r || i || (i = !0,
  11447. h.resolve(a, o))
  11448. }, function(t) {
  11449. i || (i = !0,
  11450. h.reject(a, t))
  11451. })
  11452. }(t[e], e);
  11453. return a
  11454. }
  11455. ,
  11456. r.race = function(t) {
  11457. var e = this;
  11458. if ("[object Array]" !== Object.prototype.toString.call(t))
  11459. return this.reject(new TypeError("must be an array"));
  11460. var n = t.length
  11461. , r = !1;
  11462. if (!n)
  11463. return this.resolve([]);
  11464. for (var i, o = -1, s = new this(u); ++o < n;)
  11465. i = t[o],
  11466. e.resolve(i).then(function(t) {
  11467. r || (r = !0,
  11468. h.resolve(s, t))
  11469. }, function(t) {
  11470. r || (r = !0,
  11471. h.reject(s, t))
  11472. });
  11473. return s
  11474. }
  11475. }
  11476. , {
  11477. 1: 1
  11478. }],
  11479. 3: [function(e, t, n) {
  11480. (function(t) {
  11481. "use strict";
  11482. "function" != typeof t.Promise && (t.Promise = e(2))
  11483. }
  11484. ).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  11485. }
  11486. , {
  11487. 2: 2
  11488. }],
  11489. 4: [function(t, e, n) {
  11490. "use strict";
  11491. function o(e, n) {
  11492. e = e || [],
  11493. n = n || {};
  11494. try {
  11495. return new Blob(e, n)
  11496. } catch (t) {
  11497. if ("TypeError" !== t.name)
  11498. throw t;
  11499. for (var r = new ("undefined" != typeof BlobBuilder ? BlobBuilder : "undefined" != typeof MSBlobBuilder ? MSBlobBuilder : "undefined" != typeof MozBlobBuilder ? MozBlobBuilder : WebKitBlobBuilder), i = 0; i < e.length; i += 1)
  11500. r.append(e[i]);
  11501. return r.getBlob(n.type)
  11502. }
  11503. }
  11504. function l(t, e) {
  11505. e && t.then(function(t) {
  11506. e(null, t)
  11507. }, function(t) {
  11508. e(t)
  11509. })
  11510. }
  11511. function u(t, e, n) {
  11512. "function" == typeof e && t.then(e),
  11513. "function" == typeof n && t.catch(n)
  11514. }
  11515. function h(t) {
  11516. return "string" != typeof t && (t = String(t)),
  11517. t
  11518. }
  11519. function a() {
  11520. if (arguments.length && "function" == typeof arguments[arguments.length - 1])
  11521. return arguments[arguments.length - 1]
  11522. }
  11523. function r(t) {
  11524. return "boolean" == typeof D ? P.resolve(D) : (r = t,
  11525. new P(function(n) {
  11526. var t = r.transaction(N, L)
  11527. , e = o([""]);
  11528. t.objectStore(N).put(e, "key"),
  11529. t.onabort = function(t) {
  11530. t.preventDefault(),
  11531. t.stopPropagation(),
  11532. n(!1)
  11533. }
  11534. ,
  11535. t.oncomplete = function() {
  11536. var t = navigator.userAgent.match(/Chrome\/(\d+)/)
  11537. , e = navigator.userAgent.match(/Edge\//);
  11538. n(e || !t || 43 <= parseInt(t[1], 10))
  11539. }
  11540. }
  11541. ).catch(function() {
  11542. return !1
  11543. }).then(function(t) {
  11544. return D = t
  11545. }));
  11546. var r
  11547. }
  11548. function c(t) {
  11549. var t = R[t.name]
  11550. , n = {};
  11551. n.promise = new P(function(t, e) {
  11552. n.resolve = t,
  11553. n.reject = e
  11554. }
  11555. ),
  11556. t.deferredOperations.push(n),
  11557. t.dbReady ? t.dbReady = t.dbReady.then(function() {
  11558. return n.promise
  11559. }) : t.dbReady = n.promise
  11560. }
  11561. function f(t) {
  11562. t = R[t.name].deferredOperations.pop();
  11563. return t && (t.resolve(),
  11564. t.promise)
  11565. }
  11566. function p(t, e) {
  11567. t = R[t.name].deferredOperations.pop();
  11568. if (t)
  11569. return t.reject(e),
  11570. t.promise
  11571. }
  11572. function i(i, o) {
  11573. return new P(function(t, e) {
  11574. if (R[i.name] = R[i.name] || _(),
  11575. i.db) {
  11576. if (!o)
  11577. return t(i.db);
  11578. c(i),
  11579. i.db.close()
  11580. }
  11581. var n = [i.name];
  11582. o && n.push(i.version);
  11583. var r = I.open.apply(I, n);
  11584. o && (r.onupgradeneeded = function(t) {
  11585. var e = r.result;
  11586. try {
  11587. e.createObjectStore(i.storeName),
  11588. t.oldVersion <= 1 && e.createObjectStore(N)
  11589. } catch (e) {
  11590. if ("ConstraintError" !== e.name)
  11591. throw e
  11592. }
  11593. }
  11594. ),
  11595. r.onerror = function(t) {
  11596. t.preventDefault(),
  11597. e(r.error)
  11598. }
  11599. ,
  11600. r.onsuccess = function() {
  11601. t(r.result),
  11602. f(i)
  11603. }
  11604. }
  11605. )
  11606. }
  11607. function d(t) {
  11608. return i(t, !1)
  11609. }
  11610. function g(t) {
  11611. return i(t, !0)
  11612. }
  11613. function m(t) {
  11614. if (!t.db)
  11615. return 1;
  11616. var e = !t.db.objectStoreNames.contains(t.storeName)
  11617. , n = t.version < t.db.version
  11618. , r = t.version > t.db.version;
  11619. return n && (t.version,
  11620. t.version = t.db.version),
  11621. (r || e) && (!e || (e = t.db.version + 1) > t.version && (t.version = e),
  11622. 1)
  11623. }
  11624. function v(t) {
  11625. return o([function(t) {
  11626. for (var e = t.length, n = new ArrayBuffer(e), r = new Uint8Array(n), i = 0; i < e; i++)
  11627. r[i] = t.charCodeAt(i);
  11628. return n
  11629. }(atob(t.data))], {
  11630. type: t.type
  11631. })
  11632. }
  11633. function y(t) {
  11634. return t && t.__local_forage_encoded_blob
  11635. }
  11636. function b(t) {
  11637. var e = this
  11638. , n = e._initReady().then(function() {
  11639. var t = R[e._dbInfo.name];
  11640. if (t && t.dbReady)
  11641. return t.dbReady
  11642. });
  11643. return u(n, t, t),
  11644. n
  11645. }
  11646. function w(t, e, n, r) {
  11647. void 0 === r && (r = 1);
  11648. try {
  11649. var i = t.db.transaction(t.storeName, e);
  11650. n(null, i)
  11651. } catch (i) {
  11652. if (0 < r && (!t.db || "InvalidStateError" === i.name || "NotFoundError" === i.name))
  11653. return P.resolve().then(function() {
  11654. if (!t.db || "NotFoundError" === i.name && !t.db.objectStoreNames.contains(t.storeName) && t.version <= t.db.version)
  11655. return t.db && (t.version = t.db.version + 1),
  11656. g(t)
  11657. }).then(function() {
  11658. return function(n) {
  11659. c(n);
  11660. for (var r = R[n.name], i = r.forages, t = 0; t < i.length; t++) {
  11661. var e = i[t];
  11662. e._dbInfo.db && (e._dbInfo.db.close(),
  11663. e._dbInfo.db = null)
  11664. }
  11665. return n.db = null,
  11666. d(n).then(function(t) {
  11667. return n.db = t,
  11668. m(n) ? g(n) : t
  11669. }).then(function(t) {
  11670. n.db = r.db = t;
  11671. for (var e = 0; e < i.length; e++)
  11672. i[e]._dbInfo.db = t
  11673. }).catch(function(t) {
  11674. throw p(n, t),
  11675. t
  11676. })
  11677. }(t).then(function() {
  11678. w(t, e, n, r - 1)
  11679. })
  11680. }).catch(n);
  11681. n(i)
  11682. }
  11683. }
  11684. function _() {
  11685. return {
  11686. forages: [],
  11687. db: null,
  11688. dbReady: null,
  11689. deferredOperations: []
  11690. }
  11691. }
  11692. function s(t) {
  11693. var e, n, r, i, o = .75 * t.length, s = t.length, a = 0;
  11694. "=" === t[t.length - 1] && (o--,
  11695. "=" === t[t.length - 2] && o--);
  11696. for (var o = new ArrayBuffer(o), u = new Uint8Array(o), c = 0; c < s; c += 4)
  11697. e = H.indexOf(t[c]),
  11698. n = H.indexOf(t[c + 1]),
  11699. r = H.indexOf(t[c + 2]),
  11700. i = H.indexOf(t[c + 3]),
  11701. u[a++] = e << 2 | n >> 4,
  11702. u[a++] = (15 & n) << 4 | r >> 2,
  11703. u[a++] = (3 & r) << 6 | 63 & i;
  11704. return o
  11705. }
  11706. function x(t) {
  11707. for (var e = new Uint8Array(t), n = "", r = 0; r < e.length; r += 3)
  11708. n += H[e[r] >> 2],
  11709. n += H[(3 & e[r]) << 4 | e[r + 1] >> 4],
  11710. n += H[(15 & e[r + 1]) << 2 | e[r + 2] >> 6],
  11711. n += H[63 & e[r + 2]];
  11712. return e.length % 3 == 2 ? n = n.substring(0, n.length - 1) + "=" : e.length % 3 == 1 && (n = n.substring(0, n.length - 2) + "=="),
  11713. n
  11714. }
  11715. function C(t, e, n, r) {
  11716. t.executeSql("CREATE TABLE IF NOT EXISTS " + e.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], n, r)
  11717. }
  11718. function k(t, r, i, o, s, a) {
  11719. t.executeSql(i, o, s, function(t, n) {
  11720. n.code === n.SYNTAX_ERR ? t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [name], function(t, e) {
  11721. e.rows.length ? a(t, n) : C(t, r, function() {
  11722. t.executeSql(i, o, s, a)
  11723. }, a)
  11724. }, a) : a(t, n)
  11725. }, a)
  11726. }
  11727. function S(s, t, a, u) {
  11728. var c = this;
  11729. s = h(s);
  11730. var e = new P(function(i, o) {
  11731. c.ready().then(function() {
  11732. void 0 === t && (t = null);
  11733. var n = t
  11734. , r = c._dbInfo;
  11735. r.serializer.serialize(t, function(e, t) {
  11736. t ? o(t) : r.db.transaction(function(t) {
  11737. k(t, r, "INSERT OR REPLACE INTO " + r.storeName + " (key, value) VALUES (?, ?)", [s, e], function() {
  11738. i(n)
  11739. }, function(t, e) {
  11740. o(e)
  11741. })
  11742. }, function(t) {
  11743. t.code === t.QUOTA_ERR && (0 < u ? i(S.apply(c, [s, n, a, u - 1])) : o(t))
  11744. })
  11745. })
  11746. }).catch(o)
  11747. }
  11748. );
  11749. return l(e, a),
  11750. e
  11751. }
  11752. function O(t, e) {
  11753. var n = t.name + "/";
  11754. return t.storeName !== e.storeName && (n += t.storeName + "/"),
  11755. n
  11756. }
  11757. function E() {
  11758. return !function() {
  11759. var t = "_localforage_support_test";
  11760. try {
  11761. return localStorage.setItem(t, !0),
  11762. localStorage.removeItem(t),
  11763. 0
  11764. } catch (t) {
  11765. return 1
  11766. }
  11767. }() || 0 < localStorage.length
  11768. }
  11769. function T(t) {
  11770. for (var e = 1; e < arguments.length; e++) {
  11771. var n = arguments[e];
  11772. if (n)
  11773. for (var r in n)
  11774. n.hasOwnProperty(r) && (X(n[r]) ? t[r] = n[r].slice() : t[r] = n[r])
  11775. }
  11776. return t
  11777. }
  11778. var A = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  11779. return typeof t
  11780. }
  11781. : function(t) {
  11782. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  11783. }
  11784. , I = function() {
  11785. try {
  11786. if ("undefined" != typeof indexedDB)
  11787. return indexedDB;
  11788. if ("undefined" != typeof webkitIndexedDB)
  11789. return webkitIndexedDB;
  11790. if ("undefined" != typeof mozIndexedDB)
  11791. return mozIndexedDB;
  11792. if ("undefined" != typeof OIndexedDB)
  11793. return OIndexedDB;
  11794. if ("undefined" != typeof msIndexedDB)
  11795. return msIndexedDB
  11796. } catch (t) {
  11797. return
  11798. }
  11799. }();
  11800. "undefined" == typeof Promise && t(3);
  11801. function j(t, e) {
  11802. for (var n, r, i = t.length, o = 0; o < i;) {
  11803. if ((n = t[o]) === (r = e) || "number" == typeof n && "number" == typeof r && isNaN(n) && isNaN(r))
  11804. return 1;
  11805. o++
  11806. }
  11807. }
  11808. var P = Promise
  11809. , N = "local-forage-detect-blob-support"
  11810. , D = void 0
  11811. , R = {}
  11812. , M = Object.prototype.toString
  11813. , W = "readonly"
  11814. , L = "readwrite"
  11815. , F = {
  11816. _driver: "asyncStorage",
  11817. _initStorage: function(t) {
  11818. function e() {
  11819. return P.resolve()
  11820. }
  11821. var r = this
  11822. , i = {
  11823. db: null
  11824. };
  11825. if (t)
  11826. for (var n in t)
  11827. i[n] = t[n];
  11828. var o = R[i.name];
  11829. o || (o = _(),
  11830. R[i.name] = o),
  11831. o.forages.push(r),
  11832. r._initReady || (r._initReady = r.ready,
  11833. r.ready = b);
  11834. for (var s = [], a = 0; a < o.forages.length; a++) {
  11835. var u = o.forages[a];
  11836. u !== r && s.push(u._initReady().catch(e))
  11837. }
  11838. var c = o.forages.slice(0);
  11839. return P.all(s).then(function() {
  11840. return i.db = o.db,
  11841. d(i)
  11842. }).then(function(t) {
  11843. return i.db = t,
  11844. m(i, r._defaultConfig.version) ? g(i) : t
  11845. }).then(function(t) {
  11846. i.db = o.db = t,
  11847. r._dbInfo = i;
  11848. for (var e = 0; e < c.length; e++) {
  11849. var n = c[e];
  11850. n !== r && (n._dbInfo.db = i.db,
  11851. n._dbInfo.version = i.version)
  11852. }
  11853. })
  11854. },
  11855. _support: function() {
  11856. try {
  11857. if (!I)
  11858. return !1;
  11859. var t = "undefined" != typeof openDatabase && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform)
  11860. , e = "function" == typeof fetch && -1 !== fetch.toString().indexOf("[native code");
  11861. return (!t || e) && "undefined" != typeof indexedDB && "undefined" != typeof IDBKeyRange
  11862. } catch (t) {
  11863. return !1
  11864. }
  11865. }(),
  11866. iterate: function(s, t) {
  11867. var a = this
  11868. , e = new P(function(i, o) {
  11869. a.ready().then(function() {
  11870. w(a._dbInfo, W, function(t, e) {
  11871. if (t)
  11872. return o(t);
  11873. try {
  11874. var n = e.objectStore(a._dbInfo.storeName).openCursor()
  11875. , r = 1;
  11876. n.onsuccess = function() {
  11877. var t, e = n.result;
  11878. e ? (y(t = e.value) && (t = v(t)),
  11879. void 0 !== (t = s(t, e.key, r++)) ? i(t) : e.continue()) : i()
  11880. }
  11881. ,
  11882. n.onerror = function() {
  11883. o(n.error)
  11884. }
  11885. } catch (t) {
  11886. o(t)
  11887. }
  11888. })
  11889. }).catch(o)
  11890. }
  11891. );
  11892. return l(e, t),
  11893. e
  11894. },
  11895. getItem: function(o, t) {
  11896. var s = this;
  11897. o = h(o);
  11898. var e = new P(function(r, i) {
  11899. s.ready().then(function() {
  11900. w(s._dbInfo, W, function(t, e) {
  11901. if (t)
  11902. return i(t);
  11903. try {
  11904. var n = e.objectStore(s._dbInfo.storeName).get(o);
  11905. n.onsuccess = function() {
  11906. var t = n.result;
  11907. void 0 === t && (t = null),
  11908. y(t) && (t = v(t)),
  11909. r(t)
  11910. }
  11911. ,
  11912. n.onerror = function() {
  11913. i(n.error)
  11914. }
  11915. } catch (t) {
  11916. i(t)
  11917. }
  11918. })
  11919. }).catch(i)
  11920. }
  11921. );
  11922. return l(e, t),
  11923. e
  11924. },
  11925. setItem: function(a, e, t) {
  11926. var u = this;
  11927. a = h(a);
  11928. var n = new P(function(o, s) {
  11929. var t;
  11930. u.ready().then(function() {
  11931. return t = u._dbInfo,
  11932. "[object Blob]" === M.call(e) ? r(t.db).then(function(t) {
  11933. return t ? e : (r = e,
  11934. new P(function(e, t) {
  11935. var n = new FileReader;
  11936. n.onerror = t,
  11937. n.onloadend = function(t) {
  11938. t = btoa(t.target.result || "");
  11939. e({
  11940. __local_forage_encoded_blob: !0,
  11941. data: t,
  11942. type: r.type
  11943. })
  11944. }
  11945. ,
  11946. n.readAsBinaryString(r)
  11947. }
  11948. ));
  11949. var r
  11950. }) : e
  11951. }).then(function(i) {
  11952. w(u._dbInfo, L, function(t, e) {
  11953. if (t)
  11954. return s(t);
  11955. try {
  11956. var n = e.objectStore(u._dbInfo.storeName);
  11957. null === i && (i = void 0);
  11958. var r = n.put(i, a);
  11959. e.oncomplete = function() {
  11960. void 0 === i && (i = null),
  11961. o(i)
  11962. }
  11963. ,
  11964. e.onabort = e.onerror = function() {
  11965. var t = r.error || r.transaction.error;
  11966. s(t)
  11967. }
  11968. } catch (t) {
  11969. s(t)
  11970. }
  11971. })
  11972. }).catch(s)
  11973. }
  11974. );
  11975. return l(n, t),
  11976. n
  11977. },
  11978. removeItem: function(o, t) {
  11979. var s = this;
  11980. o = h(o);
  11981. var e = new P(function(r, i) {
  11982. s.ready().then(function() {
  11983. w(s._dbInfo, L, function(t, e) {
  11984. if (t)
  11985. return i(t);
  11986. try {
  11987. var n = e.objectStore(s._dbInfo.storeName).delete(o);
  11988. e.oncomplete = function() {
  11989. r()
  11990. }
  11991. ,
  11992. e.onerror = function() {
  11993. i(n.error)
  11994. }
  11995. ,
  11996. e.onabort = function() {
  11997. var t = n.error || n.transaction.error;
  11998. i(t)
  11999. }
  12000. } catch (t) {
  12001. i(t)
  12002. }
  12003. })
  12004. }).catch(i)
  12005. }
  12006. );
  12007. return l(e, t),
  12008. e
  12009. },
  12010. clear: function(t) {
  12011. var o = this
  12012. , e = new P(function(r, i) {
  12013. o.ready().then(function() {
  12014. w(o._dbInfo, L, function(t, e) {
  12015. if (t)
  12016. return i(t);
  12017. try {
  12018. var n = e.objectStore(o._dbInfo.storeName).clear();
  12019. e.oncomplete = function() {
  12020. r()
  12021. }
  12022. ,
  12023. e.onabort = e.onerror = function() {
  12024. var t = n.error || n.transaction.error;
  12025. i(t)
  12026. }
  12027. } catch (t) {
  12028. i(t)
  12029. }
  12030. })
  12031. }).catch(i)
  12032. }
  12033. );
  12034. return l(e, t),
  12035. e
  12036. },
  12037. length: function(t) {
  12038. var o = this
  12039. , e = new P(function(r, i) {
  12040. o.ready().then(function() {
  12041. w(o._dbInfo, W, function(t, e) {
  12042. if (t)
  12043. return i(t);
  12044. try {
  12045. var n = e.objectStore(o._dbInfo.storeName).count();
  12046. n.onsuccess = function() {
  12047. r(n.result)
  12048. }
  12049. ,
  12050. n.onerror = function() {
  12051. i(n.error)
  12052. }
  12053. } catch (t) {
  12054. i(t)
  12055. }
  12056. })
  12057. }).catch(i)
  12058. }
  12059. );
  12060. return l(e, t),
  12061. e
  12062. },
  12063. key: function(a, t) {
  12064. var u = this
  12065. , e = new P(function(o, s) {
  12066. a < 0 ? o(null) : u.ready().then(function() {
  12067. w(u._dbInfo, W, function(t, e) {
  12068. if (t)
  12069. return s(t);
  12070. try {
  12071. var n = e.objectStore(u._dbInfo.storeName)
  12072. , r = !1
  12073. , i = n.openCursor();
  12074. i.onsuccess = function() {
  12075. var t = i.result;
  12076. t ? 0 === a || r ? o(t.key) : (r = !0,
  12077. t.advance(a)) : o(null)
  12078. }
  12079. ,
  12080. i.onerror = function() {
  12081. s(i.error)
  12082. }
  12083. } catch (t) {
  12084. s(t)
  12085. }
  12086. })
  12087. }).catch(s)
  12088. }
  12089. );
  12090. return l(e, t),
  12091. e
  12092. },
  12093. keys: function(t) {
  12094. var s = this
  12095. , e = new P(function(i, o) {
  12096. s.ready().then(function() {
  12097. w(s._dbInfo, W, function(t, e) {
  12098. if (t)
  12099. return o(t);
  12100. try {
  12101. var n = e.objectStore(s._dbInfo.storeName).openCursor()
  12102. , r = [];
  12103. n.onsuccess = function() {
  12104. var t = n.result;
  12105. t ? (r.push(t.key),
  12106. t.continue()) : i(r)
  12107. }
  12108. ,
  12109. n.onerror = function() {
  12110. o(n.error)
  12111. }
  12112. } catch (t) {
  12113. o(t)
  12114. }
  12115. })
  12116. }).catch(o)
  12117. }
  12118. );
  12119. return l(e, t),
  12120. e
  12121. },
  12122. dropInstance: function(s, t) {
  12123. t = a.apply(this, arguments);
  12124. var e, n = this.config();
  12125. return (s = "function" != typeof s && s || {}).name || (s.name = s.name || n.name,
  12126. s.storeName = s.storeName || n.storeName),
  12127. l(e = s.name ? (e = s.name === n.name && this._dbInfo.db ? P.resolve(this._dbInfo.db) : d(s).then(function(t) {
  12128. var e = R[s.name]
  12129. , n = e.forages;
  12130. e.db = t;
  12131. for (var r = 0; r < n.length; r++)
  12132. n[r]._dbInfo.db = t;
  12133. return t
  12134. }),
  12135. s.storeName ? e.then(function(t) {
  12136. if (t.objectStoreNames.contains(s.storeName)) {
  12137. var i = t.version + 1;
  12138. c(s);
  12139. var r = R[s.name]
  12140. , o = r.forages;
  12141. t.close();
  12142. for (var e = 0; e < o.length; e++) {
  12143. var n = o[e];
  12144. n._dbInfo.db = null,
  12145. n._dbInfo.version = i
  12146. }
  12147. return new P(function(e, n) {
  12148. var r = I.open(s.name, i);
  12149. r.onerror = function(t) {
  12150. r.result.close(),
  12151. n(t)
  12152. }
  12153. ,
  12154. r.onupgradeneeded = function() {
  12155. r.result.deleteObjectStore(s.storeName)
  12156. }
  12157. ,
  12158. r.onsuccess = function() {
  12159. var t = r.result;
  12160. t.close(),
  12161. e(t)
  12162. }
  12163. }
  12164. ).then(function(t) {
  12165. r.db = t;
  12166. for (var e = 0; e < o.length; e++) {
  12167. var n = o[e];
  12168. n._dbInfo.db = t,
  12169. f(n._dbInfo)
  12170. }
  12171. }).catch(function(t) {
  12172. throw (p(s, t) || P.resolve()).catch(function() { }),
  12173. t
  12174. })
  12175. }
  12176. }) : e.then(function(t) {
  12177. c(s);
  12178. var n = R[s.name]
  12179. , r = n.forages;
  12180. t.close();
  12181. for (var e = 0; e < r.length; e++)
  12182. r[e]._dbInfo.db = null;
  12183. return new P(function(e, n) {
  12184. var r = I.deleteDatabase(s.name);
  12185. r.onerror = r.onblocked = function(t) {
  12186. var e = r.result;
  12187. e && e.close(),
  12188. n(t)
  12189. }
  12190. ,
  12191. r.onsuccess = function() {
  12192. var t = r.result;
  12193. t && t.close(),
  12194. e(t)
  12195. }
  12196. }
  12197. ).then(function(t) {
  12198. n.db = t;
  12199. for (var e = 0; e < r.length; e++)
  12200. f(r[e]._dbInfo)
  12201. }).catch(function(t) {
  12202. throw (p(s, t) || P.resolve()).catch(function() { }),
  12203. t
  12204. })
  12205. })) : P.reject("Invalid arguments"), t),
  12206. e
  12207. }
  12208. }
  12209. , H = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
  12210. , B = /^~~local_forage_type~([^~]+)~/
  12211. , q = "__lfsc__:"
  12212. , z = q.length
  12213. , U = z + "arbf".length
  12214. , G = Object.prototype.toString
  12215. , V = {
  12216. serialize: function(e, n) {
  12217. var t = "";
  12218. if (e && (t = G.call(e)),
  12219. e && ("[object ArrayBuffer]" === t || e.buffer && "[object ArrayBuffer]" === G.call(e.buffer))) {
  12220. var r = q;
  12221. e instanceof ArrayBuffer ? (i = e,
  12222. r += "arbf") : (i = e.buffer,
  12223. "[object Int8Array]" === t ? r += "si08" : "[object Uint8Array]" === t ? r += "ui08" : "[object Uint8ClampedArray]" === t ? r += "uic8" : "[object Int16Array]" === t ? r += "si16" : "[object Uint16Array]" === t ? r += "ur16" : "[object Int32Array]" === t ? r += "si32" : "[object Uint32Array]" === t ? r += "ui32" : "[object Float32Array]" === t ? r += "fl32" : "[object Float64Array]" === t ? r += "fl64" : n(new Error("Failed to get type for BinaryArray"))),
  12224. n(r + x(i))
  12225. } else if ("[object Blob]" === t) {
  12226. var i = new FileReader;
  12227. i.onload = function() {
  12228. var t = "~~local_forage_type~" + e.type + "~" + x(this.result);
  12229. n(q + "blob" + t)
  12230. }
  12231. ,
  12232. i.readAsArrayBuffer(e)
  12233. } else
  12234. try {
  12235. n(JSON.stringify(e))
  12236. } catch (t) {
  12237. n(null, t)
  12238. }
  12239. },
  12240. deserialize: function(t) {
  12241. if (t.substring(0, z) !== q)
  12242. return JSON.parse(t);
  12243. var e, n = t.substring(U), r = t.substring(z, U);
  12244. "blob" === r && B.test(n) && (e = (t = n.match(B))[1],
  12245. n = n.substring(t[0].length));
  12246. var i = s(n);
  12247. switch (r) {
  12248. case "arbf":
  12249. return i;
  12250. case "blob":
  12251. return o([i], {
  12252. type: e
  12253. });
  12254. case "si08":
  12255. return new Int8Array(i);
  12256. case "ui08":
  12257. return new Uint8Array(i);
  12258. case "uic8":
  12259. return new Uint8ClampedArray(i);
  12260. case "si16":
  12261. return new Int16Array(i);
  12262. case "ur16":
  12263. return new Uint16Array(i);
  12264. case "si32":
  12265. return new Int32Array(i);
  12266. case "ui32":
  12267. return new Uint32Array(i);
  12268. case "fl32":
  12269. return new Float32Array(i);
  12270. case "fl64":
  12271. return new Float64Array(i);
  12272. default:
  12273. throw new Error("Unkown type: " + r)
  12274. }
  12275. },
  12276. stringToBuffer: s,
  12277. bufferToString: x
  12278. }
  12279. , $ = {
  12280. _driver: "webSQLStorage",
  12281. _initStorage: function(t) {
  12282. var r = this
  12283. , i = {
  12284. db: null
  12285. };
  12286. if (t)
  12287. for (var e in t)
  12288. i[e] = "string" != typeof t[e] ? t[e].toString() : t[e];
  12289. var n = new P(function(e, n) {
  12290. try {
  12291. i.db = openDatabase(i.name, String(i.version), i.description, i.size)
  12292. } catch (e) {
  12293. return n(e)
  12294. }
  12295. i.db.transaction(function(t) {
  12296. C(t, i, function() {
  12297. r._dbInfo = i,
  12298. e()
  12299. }, function(t, e) {
  12300. n(e)
  12301. })
  12302. }, n)
  12303. }
  12304. );
  12305. return i.serializer = V,
  12306. n
  12307. },
  12308. _support: "function" == typeof openDatabase,
  12309. iterate: function(c, t) {
  12310. var e = this
  12311. , n = new P(function(u, n) {
  12312. e.ready().then(function() {
  12313. var a = e._dbInfo;
  12314. a.db.transaction(function(t) {
  12315. k(t, a, "SELECT * FROM " + a.storeName, [], function(t, e) {
  12316. for (var n = e.rows, r = n.length, i = 0; i < r; i++) {
  12317. var o = n.item(i)
  12318. , s = (s = o.value) && a.serializer.deserialize(s);
  12319. if (void 0 !== (s = c(s, o.key, i + 1)))
  12320. return void u(s)
  12321. }
  12322. u()
  12323. }, function(t, e) {
  12324. n(e)
  12325. })
  12326. })
  12327. }).catch(n)
  12328. }
  12329. );
  12330. return l(n, t),
  12331. n
  12332. },
  12333. getItem: function(e, t) {
  12334. var o = this;
  12335. e = h(e);
  12336. var n = new P(function(r, i) {
  12337. o.ready().then(function() {
  12338. var n = o._dbInfo;
  12339. n.db.transaction(function(t) {
  12340. k(t, n, "SELECT * FROM " + n.storeName + " WHERE key = ? LIMIT 1", [e], function(t, e) {
  12341. e = (e = e.rows.length ? e.rows.item(0).value : null) && n.serializer.deserialize(e);
  12342. r(e)
  12343. }, function(t, e) {
  12344. i(e)
  12345. })
  12346. })
  12347. }).catch(i)
  12348. }
  12349. );
  12350. return l(n, t),
  12351. n
  12352. },
  12353. setItem: function(t, e, n) {
  12354. return S.apply(this, [t, e, n, 1])
  12355. },
  12356. removeItem: function(i, t) {
  12357. var o = this;
  12358. i = h(i);
  12359. var e = new P(function(n, r) {
  12360. o.ready().then(function() {
  12361. var e = o._dbInfo;
  12362. e.db.transaction(function(t) {
  12363. k(t, e, "DELETE FROM " + e.storeName + " WHERE key = ?", [i], function() {
  12364. n()
  12365. }, function(t, e) {
  12366. r(e)
  12367. })
  12368. })
  12369. }).catch(r)
  12370. }
  12371. );
  12372. return l(e, t),
  12373. e
  12374. },
  12375. clear: function(t) {
  12376. var i = this
  12377. , e = new P(function(n, r) {
  12378. i.ready().then(function() {
  12379. var e = i._dbInfo;
  12380. e.db.transaction(function(t) {
  12381. k(t, e, "DELETE FROM " + e.storeName, [], function() {
  12382. n()
  12383. }, function(t, e) {
  12384. r(e)
  12385. })
  12386. })
  12387. }).catch(r)
  12388. }
  12389. );
  12390. return l(e, t),
  12391. e
  12392. },
  12393. length: function(t) {
  12394. var i = this
  12395. , e = new P(function(n, r) {
  12396. i.ready().then(function() {
  12397. var e = i._dbInfo;
  12398. e.db.transaction(function(t) {
  12399. k(t, e, "SELECT COUNT(key) as c FROM " + e.storeName, [], function(t, e) {
  12400. e = e.rows.item(0).c;
  12401. n(e)
  12402. }, function(t, e) {
  12403. r(e)
  12404. })
  12405. })
  12406. }).catch(r)
  12407. }
  12408. );
  12409. return l(e, t),
  12410. e
  12411. },
  12412. key: function(i, t) {
  12413. var o = this
  12414. , e = new P(function(n, r) {
  12415. o.ready().then(function() {
  12416. var e = o._dbInfo;
  12417. e.db.transaction(function(t) {
  12418. k(t, e, "SELECT key FROM " + e.storeName + " WHERE id = ? LIMIT 1", [i + 1], function(t, e) {
  12419. e = e.rows.length ? e.rows.item(0).key : null;
  12420. n(e)
  12421. }, function(t, e) {
  12422. r(e)
  12423. })
  12424. })
  12425. }).catch(r)
  12426. }
  12427. );
  12428. return l(e, t),
  12429. e
  12430. },
  12431. keys: function(t) {
  12432. var r = this
  12433. , e = new P(function(i, n) {
  12434. r.ready().then(function() {
  12435. var e = r._dbInfo;
  12436. e.db.transaction(function(t) {
  12437. k(t, e, "SELECT key FROM " + e.storeName, [], function(t, e) {
  12438. for (var n = [], r = 0; r < e.rows.length; r++)
  12439. n.push(e.rows.item(r).key);
  12440. i(n)
  12441. }, function(t, e) {
  12442. n(e)
  12443. })
  12444. })
  12445. }).catch(n)
  12446. }
  12447. );
  12448. return l(e, t),
  12449. e
  12450. },
  12451. dropInstance: function(n, t) {
  12452. t = a.apply(this, arguments);
  12453. var r = this.config();
  12454. (n = "function" != typeof n && n || {}).name || (n.name = n.name || r.name,
  12455. n.storeName = n.storeName || r.storeName);
  12456. var i = this
  12457. , e = n.name ? new P(function(t) {
  12458. var o, e = n.name === r.name ? i._dbInfo.db : openDatabase(n.name, "", "", 0);
  12459. t(n.storeName ? {
  12460. db: e,
  12461. storeNames: [n.storeName]
  12462. } : (o = e,
  12463. new P(function(i, n) {
  12464. o.transaction(function(t) {
  12465. t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(t, e) {
  12466. for (var n = [], r = 0; r < e.rows.length; r++)
  12467. n.push(e.rows.item(r).name);
  12468. i({
  12469. db: o,
  12470. storeNames: n
  12471. })
  12472. }, function(t, e) {
  12473. n(e)
  12474. })
  12475. }, function(t) {
  12476. n(t)
  12477. })
  12478. }
  12479. )))
  12480. }
  12481. ).then(function(s) {
  12482. return new P(function(i, o) {
  12483. s.db.transaction(function(r) {
  12484. for (var t = [], e = 0, n = s.storeNames.length; e < n; e++)
  12485. t.push(function(e) {
  12486. return new P(function(t, n) {
  12487. r.executeSql("DROP TABLE IF EXISTS " + e, [], function() {
  12488. t()
  12489. }, function(t, e) {
  12490. n(e)
  12491. })
  12492. }
  12493. )
  12494. }(s.storeNames[e]));
  12495. P.all(t).then(function() {
  12496. i()
  12497. }).catch(function(t) {
  12498. o(t)
  12499. })
  12500. }, function(t) {
  12501. o(t)
  12502. })
  12503. }
  12504. )
  12505. }) : P.reject("Invalid arguments");
  12506. return l(e, t),
  12507. e
  12508. }
  12509. }
  12510. , t = {
  12511. _driver: "localStorageWrapper",
  12512. _initStorage: function(t) {
  12513. var e = {};
  12514. if (t)
  12515. for (var n in t)
  12516. e[n] = t[n];
  12517. return e.keyPrefix = O(t, this._defaultConfig),
  12518. E() ? ((this._dbInfo = e).serializer = V,
  12519. P.resolve()) : P.reject()
  12520. },
  12521. _support: function() {
  12522. try {
  12523. return "undefined" != typeof localStorage && "setItem" in localStorage && !!localStorage.setItem
  12524. } catch (t) {
  12525. return !1
  12526. }
  12527. }(),
  12528. iterate: function(u, t) {
  12529. var c = this
  12530. , e = c.ready().then(function() {
  12531. for (var t = c._dbInfo, e = t.keyPrefix, n = e.length, r = localStorage.length, i = 1, o = 0; o < r; o++) {
  12532. var s = localStorage.key(o);
  12533. if (0 === s.indexOf(e)) {
  12534. var a = (a = localStorage.getItem(s)) && t.serializer.deserialize(a);
  12535. if (void 0 !== (a = u(a, s.substring(n), i++)))
  12536. return a
  12537. }
  12538. }
  12539. });
  12540. return l(e, t),
  12541. e
  12542. },
  12543. getItem: function(n, t) {
  12544. var r = this;
  12545. n = h(n);
  12546. var e = r.ready().then(function() {
  12547. var t = r._dbInfo
  12548. , e = localStorage.getItem(t.keyPrefix + n);
  12549. return e = e && t.serializer.deserialize(e)
  12550. });
  12551. return l(e, t),
  12552. e
  12553. },
  12554. setItem: function(s, t, e) {
  12555. var a = this;
  12556. s = h(s);
  12557. var n = a.ready().then(function() {
  12558. void 0 === t && (t = null);
  12559. var o = t;
  12560. return new P(function(n, r) {
  12561. var i = a._dbInfo;
  12562. i.serializer.serialize(t, function(t, e) {
  12563. if (e)
  12564. r(e);
  12565. else
  12566. try {
  12567. localStorage.setItem(i.keyPrefix + s, t),
  12568. n(o)
  12569. } catch (t) {
  12570. "QuotaExceededError" !== t.name && "NS_ERROR_DOM_QUOTA_REACHED" !== t.name || r(t),
  12571. r(t)
  12572. }
  12573. })
  12574. }
  12575. )
  12576. });
  12577. return l(n, e),
  12578. n
  12579. },
  12580. removeItem: function(e, t) {
  12581. var n = this;
  12582. e = h(e);
  12583. var r = n.ready().then(function() {
  12584. var t = n._dbInfo;
  12585. localStorage.removeItem(t.keyPrefix + e)
  12586. });
  12587. return l(r, t),
  12588. r
  12589. },
  12590. clear: function(t) {
  12591. var r = this
  12592. , e = r.ready().then(function() {
  12593. for (var t = r._dbInfo.keyPrefix, e = localStorage.length - 1; 0 <= e; e--) {
  12594. var n = localStorage.key(e);
  12595. 0 === n.indexOf(t) && localStorage.removeItem(n)
  12596. }
  12597. });
  12598. return l(e, t),
  12599. e
  12600. },
  12601. length: function(t) {
  12602. var e = this.keys().then(function(t) {
  12603. return t.length
  12604. });
  12605. return l(e, t),
  12606. e
  12607. },
  12608. key: function(n, t) {
  12609. var r = this
  12610. , e = r.ready().then(function() {
  12611. var e, t = r._dbInfo;
  12612. try {
  12613. e = localStorage.key(n)
  12614. } catch (t) {
  12615. e = null
  12616. }
  12617. return e = e && e.substring(t.keyPrefix.length)
  12618. });
  12619. return l(e, t),
  12620. e
  12621. },
  12622. keys: function(t) {
  12623. var o = this
  12624. , e = o.ready().then(function() {
  12625. for (var t = o._dbInfo, e = localStorage.length, n = [], r = 0; r < e; r++) {
  12626. var i = localStorage.key(r);
  12627. 0 === i.indexOf(t.keyPrefix) && n.push(i.substring(t.keyPrefix.length))
  12628. }
  12629. return n
  12630. });
  12631. return l(e, t),
  12632. e
  12633. },
  12634. dropInstance: function(e, t) {
  12635. t = a.apply(this, arguments),
  12636. (e = "function" != typeof e && e || {}).name || (r = this.config(),
  12637. e.name = e.name || r.name,
  12638. e.storeName = e.storeName || r.storeName);
  12639. var n = this
  12640. , r = e.name ? new P(function(t) {
  12641. t(e.storeName ? O(e, n._defaultConfig) : e.name + "/")
  12642. }
  12643. ).then(function(t) {
  12644. for (var e = localStorage.length - 1; 0 <= e; e--) {
  12645. var n = localStorage.key(e);
  12646. 0 === n.indexOf(t) && localStorage.removeItem(n)
  12647. }
  12648. }) : P.reject("Invalid arguments");
  12649. return l(r, t),
  12650. r
  12651. }
  12652. }
  12653. , X = Array.isArray || function(t) {
  12654. return "[object Array]" === Object.prototype.toString.call(t)
  12655. }
  12656. , Y = {}
  12657. , K = {}
  12658. , Q = {
  12659. INDEXEDDB: F,
  12660. WEBSQL: $,
  12661. LOCALSTORAGE: t
  12662. }
  12663. , t = [Q.INDEXEDDB._driver, Q.WEBSQL._driver, Q.LOCALSTORAGE._driver]
  12664. , J = ["dropInstance"]
  12665. , Z = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(J)
  12666. , tt = {
  12667. description: "",
  12668. driver: t.slice(),
  12669. name: "localforage",
  12670. size: 4980736,
  12671. storeName: "keyvaluepairs",
  12672. version: 1
  12673. }
  12674. , t = new (et.prototype.config = function(t) {
  12675. if ("object" !== (void 0 === t ? "undefined" : A(t)))
  12676. return "string" == typeof t ? this._config[t] : this._config;
  12677. if (this._ready)
  12678. return new Error("Can't call config() after localforage has been used.");
  12679. for (var e in t) {
  12680. if ("storeName" === e && (t[e] = t[e].replace(/\W/g, "_")),
  12681. "version" === e && "number" != typeof t[e])
  12682. return new Error("Database version must be a number.");
  12683. this._config[e] = t[e]
  12684. }
  12685. return !("driver" in t && t.driver) || this.setDriver(this._config.driver)
  12686. }
  12687. ,
  12688. et.prototype.defineDriver = function(c, t, e) {
  12689. var n = new P(function(e, n) {
  12690. try {
  12691. var r = c._driver
  12692. , t = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");
  12693. if (!c._driver)
  12694. return void n(t);
  12695. for (var i = Z.concat("_initStorage"), o = 0, s = i.length; o < s; o++) {
  12696. var a = i[o];
  12697. if ((!j(J, a) || c[a]) && "function" != typeof c[a])
  12698. return void n(t)
  12699. }
  12700. !function() {
  12701. for (var t = 0, e = J.length; t < e; t++) {
  12702. var n = J[t];
  12703. c[n] || (c[n] = function(e) {
  12704. return function() {
  12705. var t = new Error("Method " + e + " is not implemented by the current driver")
  12706. , t = P.reject(t);
  12707. return l(t, arguments[arguments.length - 1]),
  12708. t
  12709. }
  12710. }(n))
  12711. }
  12712. }();
  12713. var u = function(t) {
  12714. Y[r],
  12715. Y[r] = c,
  12716. K[r] = t,
  12717. e()
  12718. };
  12719. "_support" in c ? c._support && "function" == typeof c._support ? c._support().then(u, n) : u(!!c._support) : u(!0)
  12720. } catch (t) {
  12721. n(t)
  12722. }
  12723. }
  12724. );
  12725. return u(n, t, e),
  12726. n
  12727. }
  12728. ,
  12729. et.prototype.driver = function() {
  12730. return this._driver || null
  12731. }
  12732. ,
  12733. et.prototype.getDriver = function(t, e, n) {
  12734. t = Y[t] ? P.resolve(Y[t]) : P.reject(new Error("Driver not found."));
  12735. return u(t, e, n),
  12736. t
  12737. }
  12738. ,
  12739. et.prototype.getSerializer = function(t) {
  12740. var e = P.resolve(V);
  12741. return u(e, t),
  12742. e
  12743. }
  12744. ,
  12745. et.prototype.ready = function(t) {
  12746. var e = this
  12747. , n = e._driverSet.then(function() {
  12748. return null === e._ready && (e._ready = e._initDriver()),
  12749. e._ready
  12750. });
  12751. return u(n, t, t),
  12752. n
  12753. }
  12754. ,
  12755. et.prototype.setDriver = function(t, e, n) {
  12756. function o() {
  12757. a._config.driver = a.driver()
  12758. }
  12759. function s(t) {
  12760. return a._extend(t),
  12761. o(),
  12762. a._ready = a._initStorage(a._config),
  12763. a._ready
  12764. }
  12765. function r(i) {
  12766. return function() {
  12767. var r = 0;
  12768. return function t() {
  12769. for (; r < i.length;) {
  12770. var e = i[r];
  12771. return r++,
  12772. a._dbInfo = null,
  12773. a._ready = null,
  12774. a.getDriver(e).then(s).catch(t)
  12775. }
  12776. o();
  12777. var n = new Error("No available storage method found.");
  12778. return a._driverSet = P.reject(n),
  12779. a._driverSet
  12780. }()
  12781. }
  12782. }
  12783. var a = this;
  12784. X(t) || (t = [t]);
  12785. var i = this._getSupportedDrivers(t)
  12786. , t = null !== this._driverSet ? this._driverSet.catch(function() {
  12787. return P.resolve()
  12788. }) : P.resolve();
  12789. return this._driverSet = t.then(function() {
  12790. var t = i[0];
  12791. return a._dbInfo = null,
  12792. a._ready = null,
  12793. a.getDriver(t).then(function(t) {
  12794. a._driver = t._driver,
  12795. o(),
  12796. a._wrapLibraryMethodsWithReady(),
  12797. a._initDriver = r(i)
  12798. })
  12799. }).catch(function() {
  12800. o();
  12801. var t = new Error("No available storage method found.");
  12802. return a._driverSet = P.reject(t),
  12803. a._driverSet
  12804. }),
  12805. u(this._driverSet, e, n),
  12806. this._driverSet
  12807. }
  12808. ,
  12809. et.prototype.supports = function(t) {
  12810. return !!K[t]
  12811. }
  12812. ,
  12813. et.prototype._extend = function(t) {
  12814. T(this, t)
  12815. }
  12816. ,
  12817. et.prototype._getSupportedDrivers = function(t) {
  12818. for (var e = [], n = 0, r = t.length; n < r; n++) {
  12819. var i = t[n];
  12820. this.supports(i) && e.push(i)
  12821. }
  12822. return e
  12823. }
  12824. ,
  12825. et.prototype._wrapLibraryMethodsWithReady = function() {
  12826. for (var t = 0, e = Z.length; t < e; t++)
  12827. !function(e, n) {
  12828. e[n] = function() {
  12829. var t = arguments;
  12830. return e.ready().then(function() {
  12831. return e[n].apply(e, t)
  12832. })
  12833. }
  12834. }(this, Z[t])
  12835. }
  12836. ,
  12837. et.prototype.createInstance = function(t) {
  12838. return new et(t)
  12839. }
  12840. ,
  12841. et);
  12842. function et(t) {
  12843. for (var e in !function(t, e) {
  12844. if (!(t instanceof e))
  12845. throw new TypeError("Cannot call a class as a function")
  12846. }(this, et),
  12847. Q) {
  12848. var n, r;
  12849. Q.hasOwnProperty(e) && (r = (n = Q[e])._driver,
  12850. this[e] = r,
  12851. Y[r] || this.defineDriver(n))
  12852. }
  12853. this._defaultConfig = T({}, tt),
  12854. this._config = T({}, this._defaultConfig, t),
  12855. this._driverSet = null,
  12856. this._initDriver = null,
  12857. this._ready = !1,
  12858. this._dbInfo = null,
  12859. this._wrapLibraryMethodsWithReady(),
  12860. this.setDriver(this._config.driver).catch(function() { })
  12861. }
  12862. e.exports = t
  12863. }
  12864. , {
  12865. 3: 3
  12866. }]
  12867. }, {}, [4])(4)
  12868. }),
  12869. function() {
  12870. function Bo(t, e) {
  12871. return t.set(e[0], e[1]),
  12872. t
  12873. }
  12874. function qo(t, e) {
  12875. return t.add(e),
  12876. t
  12877. }
  12878. function zo(t, e, n) {
  12879. switch (n.length) {
  12880. case 0:
  12881. return t.call(e);
  12882. case 1:
  12883. return t.call(e, n[0]);
  12884. case 2:
  12885. return t.call(e, n[0], n[1]);
  12886. case 3:
  12887. return t.call(e, n[0], n[1], n[2])
  12888. }
  12889. return t.apply(e, n)
  12890. }
  12891. function Uo(t, e, n, r) {
  12892. for (var i = -1, o = null == t ? 0 : t.length; ++i < o;) {
  12893. var s = t[i];
  12894. e(r, s, n(s), t)
  12895. }
  12896. return r
  12897. }
  12898. function Go(t, e) {
  12899. for (var n = -1, r = null == t ? 0 : t.length; ++n < r && !1 !== e(t[n], n, t);)
  12900. ;
  12901. return t
  12902. }
  12903. function Vo(t, e) {
  12904. for (var n = null == t ? 0 : t.length; n-- && !1 !== e(t[n], n, t);)
  12905. ;
  12906. return t
  12907. }
  12908. function $o(t, e) {
  12909. for (var n = -1, r = null == t ? 0 : t.length; ++n < r;)
  12910. if (!e(t[n], n, t))
  12911. return !1;
  12912. return !0
  12913. }
  12914. function Xo(t, e) {
  12915. for (var n = -1, r = null == t ? 0 : t.length, i = 0, o = []; ++n < r;) {
  12916. var s = t[n];
  12917. e(s, n, t) && (o[i++] = s)
  12918. }
  12919. return o
  12920. }
  12921. function Yo(t, e) {
  12922. return !!(null == t ? 0 : t.length) && -1 < is(t, e, 0)
  12923. }
  12924. function Ko(t, e, n) {
  12925. for (var r = -1, i = null == t ? 0 : t.length; ++r < i;)
  12926. if (n(e, t[r]))
  12927. return !0;
  12928. return !1
  12929. }
  12930. function Qo(t, e) {
  12931. for (var n = -1, r = null == t ? 0 : t.length, i = Array(r); ++n < r;)
  12932. i[n] = e(t[n], n, t);
  12933. return i
  12934. }
  12935. function Jo(t, e) {
  12936. for (var n = -1, r = e.length, i = t.length; ++n < r;)
  12937. t[i + n] = e[n];
  12938. return t
  12939. }
  12940. function Zo(t, e, n, r) {
  12941. var i = -1
  12942. , o = null == t ? 0 : t.length;
  12943. for (r && o && (n = t[++i]); ++i < o;)
  12944. n = e(n, t[i], i, t);
  12945. return n
  12946. }
  12947. function ts(t, e, n, r) {
  12948. var i = null == t ? 0 : t.length;
  12949. for (r && i && (n = t[--i]); i--;)
  12950. n = e(n, t[i], i, t);
  12951. return n
  12952. }
  12953. function es(t, e) {
  12954. for (var n = -1, r = null == t ? 0 : t.length; ++n < r;)
  12955. if (e(t[n], n, t))
  12956. return !0;
  12957. return !1
  12958. }
  12959. function ns(t, r, e) {
  12960. var i;
  12961. return e(t, function(t, e, n) {
  12962. if (r(t, e, n))
  12963. return i = e,
  12964. !1
  12965. }),
  12966. i
  12967. }
  12968. function rs(t, e, n, r) {
  12969. for (var i = t.length, o = n + (r ? 1 : -1); r ? o-- : ++o < i;)
  12970. if (e(t[o], o, t))
  12971. return o;
  12972. return -1
  12973. }
  12974. function is(t, e, n) {
  12975. return e == e ? function(t, e, n) {
  12976. for (var r = n - 1, i = t.length; ++r < i;)
  12977. if (t[r] === e)
  12978. return r;
  12979. return -1
  12980. }(t, e, n) : rs(t, ss, n)
  12981. }
  12982. function os(t, e, n, r) {
  12983. for (var i = n - 1, o = t.length; ++i < o;)
  12984. if (r(t[i], e))
  12985. return i;
  12986. return -1
  12987. }
  12988. function ss(t) {
  12989. return t != t
  12990. }
  12991. function as(t, e) {
  12992. var n = null == t ? 0 : t.length;
  12993. return n ? ls(t, e) / n : Is
  12994. }
  12995. function us(e) {
  12996. return function(t) {
  12997. return null == t ? Ss : t[e]
  12998. }
  12999. }
  13000. function t(e) {
  13001. return function(t) {
  13002. return null == e ? Ss : e[t]
  13003. }
  13004. }
  13005. function cs(t, r, i, o, e) {
  13006. return e(t, function(t, e, n) {
  13007. i = o ? (o = !1,
  13008. t) : r(i, t, e, n)
  13009. }),
  13010. i
  13011. }
  13012. function ls(t, e) {
  13013. for (var n, r = -1, i = t.length; ++r < i;) {
  13014. var o = e(t[r]);
  13015. o !== Ss && (n = n === Ss ? o : n + o)
  13016. }
  13017. return n
  13018. }
  13019. function hs(t, e) {
  13020. for (var n = -1, r = Array(t); ++n < t;)
  13021. r[n] = e(n);
  13022. return r
  13023. }
  13024. function fs(e) {
  13025. return function(t) {
  13026. return e(t)
  13027. }
  13028. }
  13029. function ps(e, t) {
  13030. return Qo(t, function(t) {
  13031. return e[t]
  13032. })
  13033. }
  13034. function ds(t, e) {
  13035. return t.has(e)
  13036. }
  13037. function gs(t, e) {
  13038. for (var n = -1, r = t.length; ++n < r && -1 < is(e, t[n], 0);)
  13039. ;
  13040. return n
  13041. }
  13042. function ms(t, e) {
  13043. for (var n = t.length; n-- && -1 < is(e, t[n], 0);)
  13044. ;
  13045. return n
  13046. }
  13047. function vs(t) {
  13048. return "\\" + C[t]
  13049. }
  13050. function ys(t) {
  13051. return x.test(t)
  13052. }
  13053. function bs(t) {
  13054. var n = -1
  13055. , r = Array(t.size);
  13056. return t.forEach(function(t, e) {
  13057. r[++n] = [e, t]
  13058. }),
  13059. r
  13060. }
  13061. function ws(e, n) {
  13062. return function(t) {
  13063. return e(n(t))
  13064. }
  13065. }
  13066. function _s(t, e) {
  13067. for (var n = -1, r = t.length, i = 0, o = []; ++n < r;) {
  13068. var s = t[n];
  13069. s !== e && s !== Ts || (t[n] = Ts,
  13070. o[i++] = n)
  13071. }
  13072. return o
  13073. }
  13074. function xs(t) {
  13075. var e = -1
  13076. , n = Array(t.size);
  13077. return t.forEach(function(t) {
  13078. n[++e] = t
  13079. }),
  13080. n
  13081. }
  13082. function Cs(t) {
  13083. return (ys(t) ? function(t) {
  13084. for (var e = _.lastIndex = 0; _.test(t);)
  13085. ++e;
  13086. return e
  13087. }
  13088. : S)(t)
  13089. }
  13090. function ks(t) {
  13091. return ys(t) ? t.match(_) || [] : t.split("")
  13092. }
  13093. var Ss, Os = "Expected a function", Es = "__lodash_hash_undefined__", Ts = "__lodash_placeholder__", As = 9007199254740991, Is = NaN, js = 4294967295, Ps = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]], Ns = "[object Arguments]", Ds = "[object Array]", Rs = "[object Boolean]", Ms = "[object Date]", Ws = "[object Error]", Ls = "[object Function]", Fs = "[object GeneratorFunction]", Hs = "[object Map]", Bs = "[object Number]", qs = "[object Object]", zs = "[object Promise]", Us = "[object RegExp]", Gs = "[object Set]", Vs = "[object String]", $s = "[object Symbol]", Xs = "[object WeakMap]", Ys = "[object ArrayBuffer]", Ks = "[object DataView]", Qs = "[object Float32Array]", Js = "[object Float64Array]", Zs = "[object Int8Array]", ta = "[object Int16Array]", ea = "[object Int32Array]", na = "[object Uint8Array]", ra = "[object Uint8ClampedArray]", ia = "[object Uint16Array]", oa = "[object Uint32Array]", sa = /\b__p \+= '';/g, aa = /\b(__p \+=) '' \+/g, ua = /(__e\(.*?\)|\b__t\)) \+\n'';/g, ca = /&(?:amp|lt|gt|quot|#39);/g, la = /[&<>"']/g, ha = RegExp(ca.source), fa = RegExp(la.source), pa = /<%-([\s\S]+?)%>/g, da = /<%([\s\S]+?)%>/g, ga = /<%=([\s\S]+?)%>/g, ma = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, va = /^\w*$/, ya = /^\./, ba = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, wa = /[\\^$.*+?()[\]{}|]/g, _a = RegExp(wa.source), xa = /^\s+|\s+$/g, Ca = /^\s+/, ka = /\s+$/, Sa = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Oa = /\{\n\/\* \[wrapped with (.+)\] \*/, Ea = /,? & /, Ta = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Aa = /\\(\\)?/g, Ia = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ja = /\w*$/, Pa = /^[-+]0x[0-9a-f]+$/i, Na = /^0b[01]+$/i, Da = /^\[object .+?Constructor\]$/, Ra = /^0o[0-7]+$/i, Ma = /^(?:0|[1-9]\d*)$/, Wa = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, La = /($^)/, Fa = /['\n\r\u2028\u2029\\]/g, e = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", r = "\\u2700-\\u27bf", i = "a-z\\xdf-\\xf6\\xf8-\\xff", o = "A-Z\\xc0-\\xd6\\xd8-\\xde", s = "\\ufe0e\\ufe0f", a = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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", u = "[" + e + "]", c = "[" + a + "]", l = "[" + n + "]", h = "\\d+", f = "[" + r + "]", p = "[" + i + "]", d = "[^" + e + a + h + r + i + o + "]", g = "\\ud83c[\\udffb-\\udfff]", m = "[^" + e + "]", v = "(?:\\ud83c[\\udde6-\\uddff]){2}", y = "[\\ud800-\\udbff][\\udc00-\\udfff]", b = "[" + o + "]", w = "(?:" + p + "|" + d + ")", a = "(?:" + b + "|" + d + ")", r = "(?:['’](?:d|ll|m|re|s|t|ve))?", i = "(?:['’](?:D|LL|M|RE|S|T|VE))?", o = "(?:" + l + "|" + g + ")" + "?", d = "[" + s + "]?", o = d + o + ("(?:\\u200d(?:" + [m, v, y].join("|") + ")" + d + o + ")*"), f = "(?:" + [f, v, y].join("|") + ")" + o, u = "(?:" + [m + l + "?", l, v, y, u].join("|") + ")", Ha = RegExp("['’]", "g"), Ba = RegExp(l, "g"), _ = RegExp(g + "(?=" + g + ")|" + u + o, "g"), qa = RegExp([b + "?" + p + "+" + r + "(?=" + [c, b, "$"].join("|") + ")", a + "+" + i + "(?=" + [c, b + w, "$"].join("|") + ")", b + "?" + w + "+" + r, b + "+" + i, "\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)", "\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)", h, f].join("|"), "g"), x = RegExp("[\\u200d" + e + n + s + "]"), za = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Ua = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], Ga = -1, Va = {};
  13094. Va[Qs] = Va[Js] = Va[Zs] = Va[ta] = Va[ea] = Va[na] = Va[ra] = Va[ia] = Va[oa] = !0,
  13095. Va[Ns] = Va[Ds] = Va[Ys] = Va[Rs] = Va[Ks] = Va[Ms] = Va[Ws] = Va[Ls] = Va[Hs] = Va[Bs] = Va[qs] = Va[Us] = Va[Gs] = Va[Vs] = Va[Xs] = !1;
  13096. var $a = {};
  13097. $a[Ns] = $a[Ds] = $a[Ys] = $a[Ks] = $a[Rs] = $a[Ms] = $a[Qs] = $a[Js] = $a[Zs] = $a[ta] = $a[ea] = $a[Hs] = $a[Bs] = $a[qs] = $a[Us] = $a[Gs] = $a[Vs] = $a[$s] = $a[na] = $a[ra] = $a[ia] = $a[oa] = !0,
  13098. $a[Ws] = $a[Ls] = $a[Xs] = !1;
  13099. var C = {
  13100. "\\": "\\",
  13101. "'": "'",
  13102. "\n": "n",
  13103. "\r": "r",
  13104. "\u2028": "u2028",
  13105. "\u2029": "u2029"
  13106. }
  13107. , Xa = parseFloat
  13108. , Ya = parseInt
  13109. , e = "object" == typeof global && global && global.Object === Object && global
  13110. , n = "object" == typeof self && self && self.Object === Object && self
  13111. , Ka = e || n || Function("return this")()
  13112. , s = "object" == typeof exports && exports && !exports.nodeType && exports
  13113. , n = s && "object" == typeof module && module && !module.nodeType && module
  13114. , Qa = n && n.exports === s
  13115. , k = Qa && e.process
  13116. , e = function() {
  13117. try {
  13118. return k && k.binding && k.binding("util")
  13119. } catch (t) { }
  13120. }()
  13121. , Ja = e && e.isArrayBuffer
  13122. , Za = e && e.isDate
  13123. , tu = e && e.isMap
  13124. , eu = e && e.isRegExp
  13125. , nu = e && e.isSet
  13126. , ru = e && e.isTypedArray
  13127. , S = us("length")
  13128. , iu = t({
  13129. "À": "A",
  13130. "Á": "A",
  13131. "Â": "A",
  13132. "Ã": "A",
  13133. "Ä": "A",
  13134. "Å": "A",
  13135. "à": "a",
  13136. "á": "a",
  13137. "â": "a",
  13138. "ã": "a",
  13139. "ä": "a",
  13140. "å": "a",
  13141. "Ç": "C",
  13142. "ç": "c",
  13143. "Ð": "D",
  13144. "ð": "d",
  13145. "È": "E",
  13146. "É": "E",
  13147. "Ê": "E",
  13148. "Ë": "E",
  13149. "è": "e",
  13150. "é": "e",
  13151. "ê": "e",
  13152. "ë": "e",
  13153. "Ì": "I",
  13154. "Í": "I",
  13155. "Î": "I",
  13156. "Ï": "I",
  13157. "ì": "i",
  13158. "í": "i",
  13159. "î": "i",
  13160. "ï": "i",
  13161. "Ñ": "N",
  13162. "ñ": "n",
  13163. "Ò": "O",
  13164. "Ó": "O",
  13165. "Ô": "O",
  13166. "Õ": "O",
  13167. "Ö": "O",
  13168. "Ø": "O",
  13169. "ò": "o",
  13170. "ó": "o",
  13171. "ô": "o",
  13172. "õ": "o",
  13173. "ö": "o",
  13174. "ø": "o",
  13175. "Ù": "U",
  13176. "Ú": "U",
  13177. "Û": "U",
  13178. "Ü": "U",
  13179. "ù": "u",
  13180. "ú": "u",
  13181. "û": "u",
  13182. "ü": "u",
  13183. "Ý": "Y",
  13184. "ý": "y",
  13185. "ÿ": "y",
  13186. "Æ": "Ae",
  13187. "æ": "ae",
  13188. "Þ": "Th",
  13189. "þ": "th",
  13190. "ß": "ss",
  13191. "Ā": "A",
  13192. "Ă": "A",
  13193. "Ą": "A",
  13194. "ā": "a",
  13195. "ă": "a",
  13196. "ą": "a",
  13197. "Ć": "C",
  13198. "Ĉ": "C",
  13199. "Ċ": "C",
  13200. "Č": "C",
  13201. "ć": "c",
  13202. "ĉ": "c",
  13203. "ċ": "c",
  13204. "č": "c",
  13205. "Ď": "D",
  13206. "Đ": "D",
  13207. "ď": "d",
  13208. "đ": "d",
  13209. "Ē": "E",
  13210. "Ĕ": "E",
  13211. "Ė": "E",
  13212. "Ę": "E",
  13213. "Ě": "E",
  13214. "ē": "e",
  13215. "ĕ": "e",
  13216. "ė": "e",
  13217. "ę": "e",
  13218. "ě": "e",
  13219. "Ĝ": "G",
  13220. "Ğ": "G",
  13221. "Ġ": "G",
  13222. "Ģ": "G",
  13223. "ĝ": "g",
  13224. "ğ": "g",
  13225. "ġ": "g",
  13226. "ģ": "g",
  13227. "Ĥ": "H",
  13228. "Ħ": "H",
  13229. "ĥ": "h",
  13230. "ħ": "h",
  13231. "Ĩ": "I",
  13232. "Ī": "I",
  13233. "Ĭ": "I",
  13234. "Į": "I",
  13235. "İ": "I",
  13236. "ĩ": "i",
  13237. "ī": "i",
  13238. "ĭ": "i",
  13239. "į": "i",
  13240. "ı": "i",
  13241. "Ĵ": "J",
  13242. "ĵ": "j",
  13243. "Ķ": "K",
  13244. "ķ": "k",
  13245. "ĸ": "k",
  13246. "Ĺ": "L",
  13247. "Ļ": "L",
  13248. "Ľ": "L",
  13249. "Ŀ": "L",
  13250. "Ł": "L",
  13251. "ĺ": "l",
  13252. "ļ": "l",
  13253. "ľ": "l",
  13254. "ŀ": "l",
  13255. "ł": "l",
  13256. "Ń": "N",
  13257. "Ņ": "N",
  13258. "Ň": "N",
  13259. "Ŋ": "N",
  13260. "ń": "n",
  13261. "ņ": "n",
  13262. "ň": "n",
  13263. "ŋ": "n",
  13264. "Ō": "O",
  13265. "Ŏ": "O",
  13266. "Ő": "O",
  13267. "ō": "o",
  13268. "ŏ": "o",
  13269. "ő": "o",
  13270. "Ŕ": "R",
  13271. "Ŗ": "R",
  13272. "Ř": "R",
  13273. "ŕ": "r",
  13274. "ŗ": "r",
  13275. "ř": "r",
  13276. "Ś": "S",
  13277. "Ŝ": "S",
  13278. "Ş": "S",
  13279. "Š": "S",
  13280. "ś": "s",
  13281. "ŝ": "s",
  13282. "ş": "s",
  13283. "š": "s",
  13284. "Ţ": "T",
  13285. "Ť": "T",
  13286. "Ŧ": "T",
  13287. "ţ": "t",
  13288. "ť": "t",
  13289. "ŧ": "t",
  13290. "Ũ": "U",
  13291. "Ū": "U",
  13292. "Ŭ": "U",
  13293. "Ů": "U",
  13294. "Ű": "U",
  13295. "Ų": "U",
  13296. "ũ": "u",
  13297. "ū": "u",
  13298. "ŭ": "u",
  13299. "ů": "u",
  13300. "ű": "u",
  13301. "ų": "u",
  13302. "Ŵ": "W",
  13303. "ŵ": "w",
  13304. "Ŷ": "Y",
  13305. "ŷ": "y",
  13306. "Ÿ": "Y",
  13307. "Ź": "Z",
  13308. "Ż": "Z",
  13309. "Ž": "Z",
  13310. "ź": "z",
  13311. "ż": "z",
  13312. "ž": "z",
  13313. "IJ": "IJ",
  13314. "ij": "ij",
  13315. "Œ": "Oe",
  13316. "œ": "oe",
  13317. "ʼn": "'n",
  13318. "ſ": "s"
  13319. })
  13320. , ou = t({
  13321. "&": "&amp;",
  13322. "<": "&lt;",
  13323. ">": "&gt;",
  13324. '"': "&quot;",
  13325. "'": "&#39;"
  13326. })
  13327. , su = t({
  13328. "&amp;": "&",
  13329. "&lt;": "<",
  13330. "&gt;": ">",
  13331. "&quot;": '"',
  13332. "&#39;": "'"
  13333. })
  13334. , au = function t(e) {
  13335. function d(t) {
  13336. if (hn(t) && !io(t) && !(t instanceof m)) {
  13337. if (t instanceof g)
  13338. return t;
  13339. if (tr.call(t, "__wrapped__"))
  13340. return Me(t)
  13341. }
  13342. return new g(t)
  13343. }
  13344. function o() { }
  13345. function g(t, e) {
  13346. this.__wrapped__ = t,
  13347. this.__actions__ = [],
  13348. this.__chain__ = !!e,
  13349. this.__index__ = 0,
  13350. this.__values__ = Ss
  13351. }
  13352. function m(t) {
  13353. this.__wrapped__ = t,
  13354. this.__actions__ = [],
  13355. this.__dir__ = 1,
  13356. this.__filtered__ = !1,
  13357. this.__iteratees__ = [],
  13358. this.__takeCount__ = js,
  13359. this.__views__ = []
  13360. }
  13361. function n(t) {
  13362. var e = -1
  13363. , n = null == t ? 0 : t.length;
  13364. for (this.clear(); ++e < n;) {
  13365. var r = t[e];
  13366. this.set(r[0], r[1])
  13367. }
  13368. }
  13369. function i(t) {
  13370. var e = -1
  13371. , n = null == t ? 0 : t.length;
  13372. for (this.clear(); ++e < n;) {
  13373. var r = t[e];
  13374. this.set(r[0], r[1])
  13375. }
  13376. }
  13377. function s(t) {
  13378. var e = -1
  13379. , n = null == t ? 0 : t.length;
  13380. for (this.clear(); ++e < n;) {
  13381. var r = t[e];
  13382. this.set(r[0], r[1])
  13383. }
  13384. }
  13385. function v(t) {
  13386. var e = -1
  13387. , n = null == t ? 0 : t.length;
  13388. for (this.__data__ = new s; ++e < n;)
  13389. this.add(t[e])
  13390. }
  13391. function y(t) {
  13392. t = this.__data__ = new i(t);
  13393. this.size = t.size
  13394. }
  13395. function r(t, e) {
  13396. var n, r = io(t), i = !r && ro(t), o = !r && !i && so(t), s = !r && !i && !o && ho(t), a = r || i || o || s, u = a ? hs(t.length, $n) : [], c = u.length;
  13397. for (n in t)
  13398. !e && !tr.call(t, n) || a && ("length" == n || o && ("offset" == n || "parent" == n) || s && ("buffer" == n || "byteLength" == n || "byteOffset" == n) || xe(n, c)) || u.push(n);
  13399. return u
  13400. }
  13401. function a(t) {
  13402. var e = t.length;
  13403. return e ? t[ot(0, e - 1)] : Ss
  13404. }
  13405. function u(t, e) {
  13406. return Ne(Mt(t), x(e, 0, t.length))
  13407. }
  13408. function c(t) {
  13409. return Ne(Mt(t))
  13410. }
  13411. function p(t, e, n) {
  13412. (n === Ss || nn(t[e], n)) && (n !== Ss || e in t) || f(t, e, n)
  13413. }
  13414. function b(t, e, n) {
  13415. var r = t[e];
  13416. tr.call(t, e) && nn(r, n) && (n !== Ss || e in t) || f(t, e, n)
  13417. }
  13418. function l(t, e) {
  13419. for (var n = t.length; n--;)
  13420. if (nn(t[n][0], e))
  13421. return n;
  13422. return -1
  13423. }
  13424. function h(t, r, i, o) {
  13425. return Zr(t, function(t, e, n) {
  13426. r(o, t, i(t), n)
  13427. }),
  13428. o
  13429. }
  13430. function w(t, e) {
  13431. return t && Wt(e, Sn(e), t)
  13432. }
  13433. function f(t, e, n) {
  13434. "__proto__" == e && yr ? yr(t, e, {
  13435. configurable: !0,
  13436. enumerable: !0,
  13437. value: n,
  13438. writable: !0
  13439. }) : t[e] = n
  13440. }
  13441. function _(t, e) {
  13442. for (var n = -1, r = e.length, i = Hn(r), o = null == t; ++n < r;)
  13443. i[n] = o ? Ss : Cn(t, e[n]);
  13444. return i
  13445. }
  13446. function x(t, e, n) {
  13447. return t == t && (n !== Ss && (t = t <= n ? t : n),
  13448. e !== Ss && (t = e <= t ? t : e)),
  13449. t
  13450. }
  13451. function C(n, r, i, t, e, o) {
  13452. var s, a = 1 & r, u = 2 & r, c = 4 & r;
  13453. if (i && (s = e ? i(n, t, e, o) : i(n)),
  13454. s !== Ss)
  13455. return s;
  13456. if (!ln(n))
  13457. return n;
  13458. var l, h, f = io(n);
  13459. if (f) {
  13460. if (t = (p = n).length,
  13461. d = p.constructor(t),
  13462. t && "string" == typeof p[0] && tr.call(p, "index") && (d.index = p.index,
  13463. d.input = p.input),
  13464. s = d,
  13465. !a)
  13466. return Mt(n, s)
  13467. } else {
  13468. var p = hi(n)
  13469. , d = p == Ls || p == Fs;
  13470. if (so(n))
  13471. return It(n, a);
  13472. if (p == qs || p == Ns || d && !e) {
  13473. if (s = u || d ? {} : we(n),
  13474. !a)
  13475. return u ? (d = l = n,
  13476. h = (h = s) && Wt(d, On(d), h),
  13477. Wt(l, li(l), h)) : (h = w(s, l = n),
  13478. Wt(l, ci(l), h))
  13479. } else {
  13480. if (!$a[p])
  13481. return e ? n : {};
  13482. s = function(t, e, n, r) {
  13483. var i = t.constructor;
  13484. switch (e) {
  13485. case Ys:
  13486. return jt(t);
  13487. case Rs:
  13488. case Ms:
  13489. return new i(+t);
  13490. case Ks:
  13491. return function(t, e) {
  13492. e = e ? jt(t.buffer) : t.buffer;
  13493. return new t.constructor(e, t.byteOffset, t.byteLength)
  13494. }(t, r);
  13495. case Qs:
  13496. case Js:
  13497. case Zs:
  13498. case ta:
  13499. case ea:
  13500. case na:
  13501. case ra:
  13502. case ia:
  13503. case oa:
  13504. return Pt(t, r);
  13505. case Hs:
  13506. return function(t, e, n) {
  13507. return Zo(e ? n(bs(t), 1) : bs(t), Bo, new t.constructor)
  13508. }(t, r, n);
  13509. case Bs:
  13510. case Vs:
  13511. return new i(t);
  13512. case Us:
  13513. return function(t) {
  13514. var e = new t.constructor(t.source, ja.exec(t));
  13515. return e.lastIndex = t.lastIndex,
  13516. e
  13517. }(t);
  13518. case Gs:
  13519. return function(t, e, n) {
  13520. return Zo(e ? n(xs(t), 1) : xs(t), qo, new t.constructor)
  13521. }(t, r, n);
  13522. case $s:
  13523. return function(t) {
  13524. return Yr ? Gn(Yr.call(t)) : {}
  13525. }(t)
  13526. }
  13527. }(n, p, C, a)
  13528. }
  13529. }
  13530. a = (o = o || new y).get(n);
  13531. if (a)
  13532. return a;
  13533. o.set(n, s);
  13534. var g = f ? Ss : (c ? u ? fe : he : u ? On : Sn)(n);
  13535. return Go(g || n, function(t, e) {
  13536. g && (t = n[e = t]),
  13537. b(s, e, C(t, r, i, e, n, o))
  13538. }),
  13539. s
  13540. }
  13541. function k(t, e, n) {
  13542. var r = n.length;
  13543. if (null == t)
  13544. return !r;
  13545. for (t = Gn(t); r--;) {
  13546. var i = n[r]
  13547. , o = e[i]
  13548. , s = t[i];
  13549. if (s === Ss && !(i in t) || !o(s))
  13550. return !1
  13551. }
  13552. return !0
  13553. }
  13554. function S(t, e, n) {
  13555. if ("function" != typeof t)
  13556. throw new Xn(Os);
  13557. return mi(function() {
  13558. t.apply(Ss, n)
  13559. }, e)
  13560. }
  13561. function O(t, e, n, r) {
  13562. var i = -1
  13563. , o = Yo
  13564. , s = !0
  13565. , a = t.length
  13566. , u = []
  13567. , c = e.length;
  13568. if (!a)
  13569. return u;
  13570. n && (e = Qo(e, fs(n))),
  13571. r ? (o = Ko,
  13572. s = !1) : 200 <= e.length && (o = ds,
  13573. s = !1,
  13574. e = new v(e));
  13575. t: for (; ++i < a;) {
  13576. var l = t[i]
  13577. , h = null == n ? l : n(l)
  13578. , l = r || 0 !== l ? l : 0;
  13579. if (s && h == h) {
  13580. for (var f = c; f--;)
  13581. if (e[f] === h)
  13582. continue t;
  13583. u.push(l)
  13584. } else
  13585. o(e, h, r) || u.push(l)
  13586. }
  13587. return u
  13588. }
  13589. function E(t, r) {
  13590. var i = !0;
  13591. return Zr(t, function(t, e, n) {
  13592. return i = !!r(t, e, n)
  13593. }),
  13594. i
  13595. }
  13596. function T(t, e, n) {
  13597. for (var r = -1, i = t.length; ++r < i;) {
  13598. var o, s, a = t[r], u = e(a);
  13599. null != u && (o === Ss ? u == u && !gn(u) : n(u, o)) && (o = u,
  13600. s = a)
  13601. }
  13602. return s
  13603. }
  13604. function A(t, r) {
  13605. var i = [];
  13606. return Zr(t, function(t, e, n) {
  13607. r(t, e, n) && i.push(t)
  13608. }),
  13609. i
  13610. }
  13611. function I(t, e, n, r, i) {
  13612. var o = -1
  13613. , s = t.length;
  13614. for (n = n || _e,
  13615. i = i || []; ++o < s;) {
  13616. var a = t[o];
  13617. 0 < e && n(a) ? 1 < e ? I(a, e - 1, n, r, i) : Jo(i, a) : r || (i[i.length] = a)
  13618. }
  13619. return i
  13620. }
  13621. function j(t, e) {
  13622. return t && ei(t, e, Sn)
  13623. }
  13624. function P(t, e) {
  13625. return t && ni(t, e, Sn)
  13626. }
  13627. function N(e, t) {
  13628. return Xo(t, function(t) {
  13629. return an(e[t])
  13630. })
  13631. }
  13632. function D(t, e) {
  13633. for (var n = 0, r = (e = Tt(e, t)).length; null != t && n < r;)
  13634. t = t[De(e[n++])];
  13635. return n && n == r ? t : Ss
  13636. }
  13637. function R(t, e, n) {
  13638. e = e(t);
  13639. return io(t) ? e : Jo(e, n(t))
  13640. }
  13641. function M(t) {
  13642. return null == t ? t === Ss ? "[object Undefined]" : "[object Null]" : vr && vr in Gn(t) ? function(t) {
  13643. var e = tr.call(t, vr)
  13644. , n = t[vr];
  13645. try {
  13646. t[vr] = Ss;
  13647. var r = !0
  13648. } catch (t) { }
  13649. var i = rr.call(t);
  13650. return r && (e ? t[vr] = n : delete t[vr]),
  13651. i
  13652. }(t) : (t = t,
  13653. rr.call(t))
  13654. }
  13655. function W(t, e) {
  13656. return e < t
  13657. }
  13658. function L(t, e) {
  13659. return null != t && tr.call(t, e)
  13660. }
  13661. function F(t, e) {
  13662. return null != t && e in Gn(t)
  13663. }
  13664. function H(t, e, n) {
  13665. for (var r = n ? Ko : Yo, i = t[0].length, o = t.length, s = o, a = Hn(o), u = 1 / 0, c = []; s--;) {
  13666. var l = t[s];
  13667. s && e && (l = Qo(l, fs(e))),
  13668. u = Ir(l.length, u),
  13669. a[s] = !n && (e || 120 <= i && 120 <= l.length) ? new v(s && l) : Ss
  13670. }
  13671. l = t[0];
  13672. var h = -1
  13673. , f = a[0];
  13674. t: for (; ++h < i && c.length < u;) {
  13675. var p = l[h]
  13676. , d = e ? e(p) : p
  13677. , p = n || 0 !== p ? p : 0;
  13678. if (!(f ? ds(f, d) : r(c, d, n))) {
  13679. for (s = o; --s;) {
  13680. var g = a[s];
  13681. if (!(g ? ds(g, d) : r(t[s], d, n)))
  13682. continue t
  13683. }
  13684. f && f.push(d),
  13685. c.push(p)
  13686. }
  13687. }
  13688. return c
  13689. }
  13690. function B(t, e, n) {
  13691. e = null == (t = Ie(t, e = Tt(e, t))) ? t : t[De(Be(e))];
  13692. return null == e ? Ss : zo(e, t, n)
  13693. }
  13694. function q(t) {
  13695. return hn(t) && M(t) == Ns
  13696. }
  13697. function z(t, e, n, r, i) {
  13698. return t === e || (null == t || null == e || !hn(t) && !hn(e) ? t != t && e != e : function(t, e, n, r, i, o) {
  13699. var s = io(t)
  13700. , a = io(e)
  13701. , u = s ? Ds : hi(t)
  13702. , c = a ? Ds : hi(e)
  13703. , l = (u = u == Ns ? qs : u) == qs
  13704. , a = (c = c == Ns ? qs : c) == qs
  13705. , c = u == c;
  13706. if (c && so(t)) {
  13707. if (!so(e))
  13708. return !1;
  13709. l = !(s = !0)
  13710. }
  13711. if (c && !l)
  13712. return o = o || new y,
  13713. s || ho(t) ? ce(t, e, n, r, i, o) : function(t, e, n, r, i, o, s) {
  13714. switch (n) {
  13715. case Ks:
  13716. if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
  13717. return !1;
  13718. t = t.buffer,
  13719. e = e.buffer;
  13720. case Ys:
  13721. return !(t.byteLength != e.byteLength || !o(new cr(t), new cr(e)));
  13722. case Rs:
  13723. case Ms:
  13724. case Bs:
  13725. return nn(+t, +e);
  13726. case Ws:
  13727. return t.name == e.name && t.message == e.message;
  13728. case Us:
  13729. case Vs:
  13730. return t == e + "";
  13731. case Hs:
  13732. var a = bs;
  13733. case Gs:
  13734. var u = 1 & r;
  13735. if (a = a || xs,
  13736. t.size != e.size && !u)
  13737. return !1;
  13738. u = s.get(t);
  13739. if (u)
  13740. return u == e;
  13741. r |= 2,
  13742. s.set(t, e);
  13743. a = ce(a(t), a(e), r, i, o, s);
  13744. return s.delete(t),
  13745. a;
  13746. case $s:
  13747. if (Yr)
  13748. return Yr.call(t) == Yr.call(e)
  13749. }
  13750. return !1
  13751. }(t, e, u, n, r, i, o);
  13752. if (!(1 & n)) {
  13753. l = l && tr.call(t, "__wrapped__"),
  13754. a = a && tr.call(e, "__wrapped__");
  13755. if (l || a) {
  13756. l = l ? t.value() : t,
  13757. a = a ? e.value() : e;
  13758. return o = o || new y,
  13759. i(l, a, n, r, o)
  13760. }
  13761. }
  13762. return !!c && (o = o || new y,
  13763. function(t, e, n, r, i, o) {
  13764. var s = 1 & n
  13765. , a = he(t)
  13766. , u = a.length
  13767. , c = he(e).length;
  13768. if (u != c && !s)
  13769. return !1;
  13770. for (var l = u; l--;) {
  13771. var h = a[l];
  13772. if (!(s ? h in e : tr.call(e, h)))
  13773. return !1
  13774. }
  13775. var f = o.get(t);
  13776. if (f && o.get(e))
  13777. return f == e;
  13778. var p = !0;
  13779. o.set(t, e),
  13780. o.set(e, t);
  13781. for (var d = s; ++l < u;) {
  13782. h = a[l];
  13783. var g, m = t[h], v = e[h];
  13784. if (r && (g = s ? r(v, m, h, e, t, o) : r(m, v, h, t, e, o)),
  13785. !(g === Ss ? m === v || i(m, v, n, r, o) : g)) {
  13786. p = !1;
  13787. break
  13788. }
  13789. d = d || "constructor" == h
  13790. }
  13791. p && !d && (c = t.constructor,
  13792. f = e.constructor,
  13793. c != f && "constructor" in t && "constructor" in e && !("function" == typeof c && c instanceof c && "function" == typeof f && f instanceof f) && (p = !1));
  13794. return o.delete(t),
  13795. o.delete(e),
  13796. p
  13797. }(t, e, n, r, i, o))
  13798. }(t, e, n, r, z, i))
  13799. }
  13800. function U(t, e, n, r) {
  13801. var i = n.length
  13802. , o = i
  13803. , s = !r;
  13804. if (null == t)
  13805. return !o;
  13806. for (t = Gn(t); i--;) {
  13807. var a = n[i];
  13808. if (s && a[2] ? a[1] !== t[a[0]] : !(a[0] in t))
  13809. return !1
  13810. }
  13811. for (; ++i < o;) {
  13812. var u = (a = n[i])[0]
  13813. , c = t[u]
  13814. , l = a[1];
  13815. if (s && a[2]) {
  13816. if (c === Ss && !(u in t))
  13817. return !1
  13818. } else {
  13819. var h, f = new y;
  13820. if (r && (h = r(c, l, u, t, e, f)),
  13821. !(h === Ss ? z(l, c, 3, r, f) : h))
  13822. return !1
  13823. }
  13824. }
  13825. return !0
  13826. }
  13827. function G(t) {
  13828. return !(!ln(t) || (e = t,
  13829. nr && nr in e)) && (an(t) ? sr : Da).test(Re(t));
  13830. var e
  13831. }
  13832. function V(t) {
  13833. return "function" == typeof t ? t : null == t ? Nn : "object" == typeof t ? io(t) ? J(t[0], t[1]) : Q(t) : Wn(t)
  13834. }
  13835. function $(t) {
  13836. if (!Oe(t))
  13837. return Tr(t);
  13838. var e, n = [];
  13839. for (e in Gn(t))
  13840. tr.call(t, e) && "constructor" != e && n.push(e);
  13841. return n
  13842. }
  13843. function X(t) {
  13844. if (!ln(t))
  13845. return function(t) {
  13846. var e = [];
  13847. if (null != t)
  13848. for (var n in Gn(t))
  13849. e.push(n);
  13850. return e
  13851. }(t);
  13852. var e, n = Oe(t), r = [];
  13853. for (e in t)
  13854. ("constructor" != e || !n && tr.call(t, e)) && r.push(e);
  13855. return r
  13856. }
  13857. function Y(t, e) {
  13858. return t < e
  13859. }
  13860. function K(t, r) {
  13861. var i = -1
  13862. , o = rn(t) ? Hn(t.length) : [];
  13863. return Zr(t, function(t, e, n) {
  13864. o[++i] = r(t, e, n)
  13865. }),
  13866. o
  13867. }
  13868. function Q(e) {
  13869. var n = ve(e);
  13870. return 1 == n.length && n[0][2] ? Te(n[0][0], n[0][1]) : function(t) {
  13871. return t === e || U(t, e, n)
  13872. }
  13873. }
  13874. function J(n, r) {
  13875. return ke(n) && Ee(r) ? Te(De(n), r) : function(t) {
  13876. var e = Cn(t, n);
  13877. return e === Ss && e === r ? kn(t, n) : z(r, e, 3)
  13878. }
  13879. }
  13880. function Z(r, i, o, s, a) {
  13881. r !== i && ei(i, function(t, e) {
  13882. var n;
  13883. ln(t) ? (a = a || new y,
  13884. function(t, e, n, r, i, o, s) {
  13885. var a = t[n]
  13886. , u = e[n]
  13887. , c = s.get(u);
  13888. if (c)
  13889. return p(t, n, c);
  13890. var l = o ? o(a, u, n + "", t, e, s) : Ss
  13891. , h = l === Ss;
  13892. {
  13893. var f;
  13894. h && (f = io(u),
  13895. c = !f && so(u),
  13896. e = !f && !c && ho(u),
  13897. l = u,
  13898. f || c || e ? l = io(a) ? a : on(a) ? Mt(a) : c ? It(u, !(h = !1)) : e ? Pt(u, !(h = !1)) : [] : pn(u) || ro(u) ? ro(l = a) ? l = _n(a) : (!ln(a) || r && an(a)) && (l = we(u)) : h = !1)
  13899. }
  13900. h && (s.set(u, l),
  13901. i(l, u, r, o, s),
  13902. s.delete(u)),
  13903. p(t, n, l)
  13904. }(r, i, e, o, Z, s, a)) : ((n = s ? s(r[e], t, e + "", r, i, a) : Ss) === Ss && (n = t),
  13905. p(r, e, n))
  13906. }, On)
  13907. }
  13908. function tt(t, e) {
  13909. var n = t.length;
  13910. if (n)
  13911. return xe(e += e < 0 ? n : 0, n) ? t[e] : Ss
  13912. }
  13913. function et(t, r, n) {
  13914. var i = -1;
  13915. return r = Qo(r.length ? r : [Nn], fs(ge())),
  13916. function(t, e) {
  13917. var n = t.length;
  13918. for (t.sort(e); n--;)
  13919. t[n] = t[n].value;
  13920. return t
  13921. }(K(t, function(e, t, n) {
  13922. return {
  13923. criteria: Qo(r, function(t) {
  13924. return t(e)
  13925. }),
  13926. index: ++i,
  13927. value: e
  13928. }
  13929. }), function(t, e) {
  13930. return function(t, e, n) {
  13931. for (var r = -1, i = t.criteria, o = e.criteria, s = i.length, a = n.length; ++r < s;) {
  13932. var u = Nt(i[r], o[r]);
  13933. if (u) {
  13934. if (a <= r)
  13935. return u;
  13936. var c = n[r];
  13937. return u * ("desc" == c ? -1 : 1)
  13938. }
  13939. }
  13940. return t.index - e.index
  13941. }(t, e, n)
  13942. })
  13943. }
  13944. function nt(t, e, n) {
  13945. for (var r = -1, i = e.length, o = {}; ++r < i;) {
  13946. var s = e[r]
  13947. , a = D(t, s);
  13948. n(a, s) && lt(o, Tt(s, t), a)
  13949. }
  13950. return o
  13951. }
  13952. function rt(t, e, n, r) {
  13953. var i = r ? os : is
  13954. , o = -1
  13955. , s = e.length
  13956. , a = t;
  13957. for (t === e && (e = Mt(e)),
  13958. n && (a = Qo(t, fs(n))); ++o < s;)
  13959. for (var u = 0, c = e[o], l = n ? n(c) : c; -1 < (u = i(a, l, u, r));)
  13960. a !== t && dr.call(a, u, 1),
  13961. dr.call(t, u, 1);
  13962. return t
  13963. }
  13964. function it(t, e) {
  13965. for (var n = t ? e.length : 0, r = n - 1; n--;) {
  13966. var i, o = e[n];
  13967. n != r && o === i || (xe(i = o) ? dr.call(t, o, 1) : wt(t, o))
  13968. }
  13969. return t
  13970. }
  13971. function ot(t, e) {
  13972. return t + Cr(Nr() * (e - t + 1))
  13973. }
  13974. function st(t, e) {
  13975. var n = "";
  13976. if (!t || e < 1 || As < e)
  13977. return n;
  13978. for (; e % 2 && (n += t),
  13979. e = Cr(e / 2),
  13980. e && (t += t),
  13981. e;)
  13982. ;
  13983. return n
  13984. }
  13985. function at(t, e) {
  13986. return vi(Ae(t, e, Nn), t + "")
  13987. }
  13988. function ut(t) {
  13989. return a(Tn(t))
  13990. }
  13991. function ct(t, e) {
  13992. t = Tn(t);
  13993. return Ne(t, x(e, 0, t.length))
  13994. }
  13995. function lt(t, e, n, r) {
  13996. if (!ln(t))
  13997. return t;
  13998. for (var i = -1, o = (e = Tt(e, t)).length, s = o - 1, a = t; null != a && ++i < o;) {
  13999. var u, c = De(e[i]), l = n;
  14000. i != s && (u = a[c],
  14001. (l = r ? r(u, c, a) : Ss) === Ss && (l = ln(u) ? u : xe(e[i + 1]) ? [] : {})),
  14002. b(a, c, l),
  14003. a = a[c]
  14004. }
  14005. return t
  14006. }
  14007. function ht(t) {
  14008. return Ne(Tn(t))
  14009. }
  14010. function ft(t, e, n) {
  14011. var r = -1
  14012. , i = t.length;
  14013. e < 0 && (e = i < -e ? 0 : i + e),
  14014. (n = i < n ? i : n) < 0 && (n += i),
  14015. i = n < e ? 0 : n - e >>> 0,
  14016. e >>>= 0;
  14017. for (var o = Hn(i); ++r < i;)
  14018. o[r] = t[r + e];
  14019. return o
  14020. }
  14021. function pt(t, r) {
  14022. var i;
  14023. return Zr(t, function(t, e, n) {
  14024. return !(i = r(t, e, n))
  14025. }),
  14026. !!i
  14027. }
  14028. function dt(t, e, n) {
  14029. var r = 0
  14030. , i = null == t ? r : t.length;
  14031. if ("number" == typeof e && e == e && i <= 2147483647) {
  14032. for (; r < i;) {
  14033. var o = r + i >>> 1
  14034. , s = t[o];
  14035. null !== s && !gn(s) && (n ? s <= e : s < e) ? r = 1 + o : i = o
  14036. }
  14037. return i
  14038. }
  14039. return gt(t, e, Nn, n)
  14040. }
  14041. function gt(t, e, n, r) {
  14042. e = n(e);
  14043. for (var i = 0, o = null == t ? 0 : t.length, s = e != e, a = null === e, u = gn(e), c = e === Ss; i < o;) {
  14044. var l = Cr((i + o) / 2)
  14045. , h = n(t[l])
  14046. , f = h !== Ss
  14047. , p = null === h
  14048. , d = h == h
  14049. , g = gn(h)
  14050. , h = s ? r || d : c ? d && (r || f) : a ? d && f && (r || !p) : u ? d && f && !p && (r || !g) : !p && !g && (r ? h <= e : h < e);
  14051. h ? i = l + 1 : o = l
  14052. }
  14053. return Ir(o, 4294967294)
  14054. }
  14055. function mt(t, e) {
  14056. for (var n = -1, r = t.length, i = 0, o = []; ++n < r;) {
  14057. var s, a = t[n], u = e ? e(a) : a;
  14058. n && nn(u, s) || (s = u,
  14059. o[i++] = 0 === a ? 0 : a)
  14060. }
  14061. return o
  14062. }
  14063. function vt(t) {
  14064. return "number" == typeof t ? t : gn(t) ? Is : +t
  14065. }
  14066. function yt(t) {
  14067. if ("string" == typeof t)
  14068. return t;
  14069. if (io(t))
  14070. return Qo(t, yt) + "";
  14071. if (gn(t))
  14072. return Kr ? Kr.call(t) : "";
  14073. var e = t + "";
  14074. return "0" == e && 1 / t == -1 / 0 ? "-0" : e
  14075. }
  14076. function bt(t, e, n) {
  14077. var r = -1
  14078. , i = Yo
  14079. , o = t.length
  14080. , s = !0
  14081. , a = []
  14082. , u = a;
  14083. if (n)
  14084. s = !1,
  14085. i = Ko;
  14086. else if (200 <= o) {
  14087. var c = e ? null : ai(t);
  14088. if (c)
  14089. return xs(c);
  14090. s = !1,
  14091. i = ds,
  14092. u = new v
  14093. } else
  14094. u = e ? [] : a;
  14095. t: for (; ++r < o;) {
  14096. var l = t[r]
  14097. , h = e ? e(l) : l
  14098. , l = n || 0 !== l ? l : 0;
  14099. if (s && h == h) {
  14100. for (var f = u.length; f--;)
  14101. if (u[f] === h)
  14102. continue t;
  14103. e && u.push(h),
  14104. a.push(l)
  14105. } else
  14106. i(u, h, n) || (u !== a && u.push(h),
  14107. a.push(l))
  14108. }
  14109. return a
  14110. }
  14111. function wt(t, e) {
  14112. return null == (t = Ie(t, e = Tt(e, t))) || delete t[De(Be(e))]
  14113. }
  14114. function _t(t, e, n, r) {
  14115. return lt(t, e, n(D(t, e)), r)
  14116. }
  14117. function xt(t, e, n, r) {
  14118. for (var i = t.length, o = r ? i : -1; (r ? o-- : ++o < i) && e(t[o], o, t);)
  14119. ;
  14120. return n ? ft(t, r ? 0 : o, r ? o + 1 : i) : ft(t, r ? o + 1 : 0, r ? i : o)
  14121. }
  14122. function Ct(t, e) {
  14123. return t instanceof m && (t = t.value()),
  14124. Zo(e, function(t, e) {
  14125. return e.func.apply(e.thisArg, Jo([t], e.args))
  14126. }, t)
  14127. }
  14128. function kt(t, e, n) {
  14129. var r = t.length;
  14130. if (r < 2)
  14131. return r ? bt(t[0]) : [];
  14132. for (var i = -1, o = Hn(r); ++i < r;)
  14133. for (var s = t[i], a = -1; ++a < r;)
  14134. a != i && (o[i] = O(o[i] || s, t[a], e, n));
  14135. return bt(I(o, 1), e, n)
  14136. }
  14137. function St(t, e, n) {
  14138. for (var r = -1, i = t.length, o = e.length, s = {}; ++r < i;) {
  14139. var a = r < o ? e[r] : Ss;
  14140. n(s, t[r], a)
  14141. }
  14142. return s
  14143. }
  14144. function Ot(t) {
  14145. return on(t) ? t : []
  14146. }
  14147. function Et(t) {
  14148. return "function" == typeof t ? t : Nn
  14149. }
  14150. function Tt(t, e) {
  14151. return io(t) ? t : ke(t, e) ? [t] : yi(xn(t))
  14152. }
  14153. function At(t, e, n) {
  14154. var r = t.length;
  14155. return n = n === Ss ? r : n,
  14156. !e && r <= n ? t : ft(t, e, n)
  14157. }
  14158. function It(t, e) {
  14159. if (e)
  14160. return t.slice();
  14161. e = t.length,
  14162. e = lr ? lr(e) : new t.constructor(e);
  14163. return t.copy(e),
  14164. e
  14165. }
  14166. function jt(t) {
  14167. var e = new t.constructor(t.byteLength);
  14168. return new cr(e).set(new cr(t)),
  14169. e
  14170. }
  14171. function Pt(t, e) {
  14172. e = e ? jt(t.buffer) : t.buffer;
  14173. return new t.constructor(e, t.byteOffset, t.length)
  14174. }
  14175. function Nt(t, e) {
  14176. if (t !== e) {
  14177. var n = t !== Ss
  14178. , r = null === t
  14179. , i = t == t
  14180. , o = gn(t)
  14181. , s = e !== Ss
  14182. , a = null === e
  14183. , u = e == e
  14184. , c = gn(e);
  14185. if (!a && !c && !o && e < t || o && s && u && !a && !c || r && s && u || !n && u || !i)
  14186. return 1;
  14187. if (!r && !o && !c && t < e || c && n && i && !r && !o || a && n && i || !s && i || !u)
  14188. return -1
  14189. }
  14190. return 0
  14191. }
  14192. function Dt(t, e, n, r) {
  14193. for (var i = -1, o = t.length, s = n.length, a = -1, u = e.length, c = Ar(o - s, 0), l = Hn(u + c), h = !r; ++a < u;)
  14194. l[a] = e[a];
  14195. for (; ++i < s;)
  14196. (h || i < o) && (l[n[i]] = t[i]);
  14197. for (; c--;)
  14198. l[a++] = t[i++];
  14199. return l
  14200. }
  14201. function Rt(t, e, n, r) {
  14202. for (var i = -1, o = t.length, s = -1, a = n.length, u = -1, c = e.length, l = Ar(o - a, 0), h = Hn(l + c), f = !r; ++i < l;)
  14203. h[i] = t[i];
  14204. for (var p = i; ++u < c;)
  14205. h[p + u] = e[u];
  14206. for (; ++s < a;)
  14207. (f || i < o) && (h[p + n[s]] = t[i++]);
  14208. return h
  14209. }
  14210. function Mt(t, e) {
  14211. var n = -1
  14212. , r = t.length;
  14213. for (e = e || Hn(r); ++n < r;)
  14214. e[n] = t[n];
  14215. return e
  14216. }
  14217. function Wt(t, e, n, r) {
  14218. var i = !n;
  14219. n = n || {};
  14220. for (var o = -1, s = e.length; ++o < s;) {
  14221. var a = e[o]
  14222. , u = r ? r(n[a], t[a], a, n, t) : Ss;
  14223. u === Ss && (u = t[a]),
  14224. (i ? f : b)(n, a, u)
  14225. }
  14226. return n
  14227. }
  14228. function Lt(i, o) {
  14229. return function(t, e) {
  14230. var n = io(t) ? Uo : h
  14231. , r = o ? o() : {};
  14232. return n(t, i, ge(e, 2), r)
  14233. }
  14234. }
  14235. function Ft(a) {
  14236. return at(function(t, e) {
  14237. var n = -1
  14238. , r = e.length
  14239. , i = 1 < r ? e[r - 1] : Ss
  14240. , o = 2 < r ? e[2] : Ss
  14241. , i = 3 < a.length && "function" == typeof i ? (r--,
  14242. i) : Ss;
  14243. for (o && Ce(e[0], e[1], o) && (i = r < 3 ? Ss : i,
  14244. r = 1),
  14245. t = Gn(t); ++n < r;) {
  14246. var s = e[n];
  14247. s && a(t, s, n, i)
  14248. }
  14249. return t
  14250. })
  14251. }
  14252. function Ht(o, s) {
  14253. return function(t, e) {
  14254. if (null == t)
  14255. return t;
  14256. if (!rn(t))
  14257. return o(t, e);
  14258. for (var n = t.length, r = s ? n : -1, i = Gn(t); (s ? r-- : ++r < n) && !1 !== e(i[r], r, i);)
  14259. ;
  14260. return t
  14261. }
  14262. }
  14263. function Bt(u) {
  14264. return function(t, e, n) {
  14265. for (var r = -1, i = Gn(t), o = n(t), s = o.length; s--;) {
  14266. var a = o[u ? s : ++r];
  14267. if (!1 === e(i[a], a, i))
  14268. break
  14269. }
  14270. return t
  14271. }
  14272. }
  14273. function qt(r) {
  14274. return function(t) {
  14275. var e = ys(t = xn(t)) ? ks(t) : Ss
  14276. , n = e ? e[0] : t.charAt(0)
  14277. , t = e ? At(e, 1).join("") : t.slice(1);
  14278. return n[r]() + t
  14279. }
  14280. }
  14281. function zt(e) {
  14282. return function(t) {
  14283. return Zo(jn(In(t).replace(Ha, "")), e, "")
  14284. }
  14285. }
  14286. function Ut(r) {
  14287. return function() {
  14288. var t = arguments;
  14289. switch (t.length) {
  14290. case 0:
  14291. return new r;
  14292. case 1:
  14293. return new r(t[0]);
  14294. case 2:
  14295. return new r(t[0], t[1]);
  14296. case 3:
  14297. return new r(t[0], t[1], t[2]);
  14298. case 4:
  14299. return new r(t[0], t[1], t[2], t[3]);
  14300. case 5:
  14301. return new r(t[0], t[1], t[2], t[3], t[4]);
  14302. case 6:
  14303. return new r(t[0], t[1], t[2], t[3], t[4], t[5]);
  14304. case 7:
  14305. return new r(t[0], t[1], t[2], t[3], t[4], t[5], t[6])
  14306. }
  14307. var e = Qr(r.prototype)
  14308. , n = r.apply(e, t);
  14309. return ln(n) ? n : e
  14310. }
  14311. }
  14312. function Gt(o, s, a) {
  14313. var u = Ut(o);
  14314. return function t() {
  14315. for (var e = arguments.length, n = Hn(e), r = e, i = de(t); r--;)
  14316. n[r] = arguments[r];
  14317. i = e < 3 && n[0] !== i && n[e - 1] !== i ? [] : _s(n, i);
  14318. return (e -= i.length) < a ? ne(o, s, Xt, t.placeholder, Ss, n, i, Ss, Ss, a - e) : zo(this && this !== Ka && this instanceof t ? u : o, this, n)
  14319. }
  14320. }
  14321. function Vt(o) {
  14322. return function(t, e, n) {
  14323. var r, i = Gn(t);
  14324. rn(t) || (r = ge(e, 3),
  14325. t = Sn(t),
  14326. e = function(t) {
  14327. return r(i[t], t, i)
  14328. }
  14329. );
  14330. n = o(t, e, n);
  14331. return -1 < n ? i[r ? t[n] : n] : Ss
  14332. }
  14333. }
  14334. function $t(u) {
  14335. return le(function(i) {
  14336. var o = i.length
  14337. , t = o
  14338. , e = g.prototype.thru;
  14339. for (u && i.reverse(); t--;) {
  14340. var n = i[t];
  14341. if ("function" != typeof n)
  14342. throw new Xn(Os);
  14343. e && !a && "wrapper" == pe(n) && (a = new g([], !0))
  14344. }
  14345. for (t = a ? t : o; ++t < o;)
  14346. var r = pe(n = i[t])
  14347. , s = "wrapper" == r ? ui(n) : Ss
  14348. , a = s && Se(s[0]) && 424 == s[1] && !s[4].length && 1 == s[9] ? a[pe(s[0])].apply(a, s[3]) : 1 == n.length && Se(n) ? a[r]() : a.thru(n);
  14349. return function() {
  14350. var t = arguments
  14351. , e = t[0];
  14352. if (a && 1 == t.length && io(e))
  14353. return a.plant(e).value();
  14354. for (var n = 0, r = o ? i[n].apply(this, t) : e; ++n < o;)
  14355. r = i[n].call(this, r);
  14356. return r
  14357. }
  14358. })
  14359. }
  14360. function Xt(a, u, c, l, h, f, p, d, g, m) {
  14361. var v = 128 & u
  14362. , y = 1 & u
  14363. , b = 2 & u
  14364. , w = 24 & u
  14365. , _ = 512 & u
  14366. , x = b ? Ss : Ut(a);
  14367. return function t() {
  14368. for (var e, n = Hn(s = arguments.length), r = s; r--;)
  14369. n[r] = arguments[r];
  14370. if (w && (e = function(t, e) {
  14371. for (var n = t.length, r = 0; n--;)
  14372. t[n] === e && ++r;
  14373. return r
  14374. }(n, o = de(t))),
  14375. l && (n = Dt(n, l, h, w)),
  14376. f && (n = Rt(n, f, p, w)),
  14377. s -= e,
  14378. w && s < m) {
  14379. var i = _s(n, o);
  14380. return ne(a, u, Xt, t.placeholder, c, n, i, d, g, m - s)
  14381. }
  14382. var o = y ? c : this
  14383. , i = b ? o[a] : a
  14384. , s = n.length;
  14385. return d ? n = function(t, e) {
  14386. for (var n = t.length, r = Ir(e.length, n), i = Mt(t); r--;) {
  14387. var o = e[r];
  14388. t[r] = xe(o, n) ? i[o] : Ss
  14389. }
  14390. return t
  14391. }(n, d) : _ && 1 < s && n.reverse(),
  14392. v && g < s && (n.length = g),
  14393. this && this !== Ka && this instanceof t && (i = x || Ut(i)),
  14394. i.apply(o, n)
  14395. }
  14396. }
  14397. function Yt(n, s) {
  14398. return function(t, e) {
  14399. return t = t,
  14400. r = n,
  14401. i = s(e),
  14402. o = {},
  14403. j(t, function(t, e, n) {
  14404. r(o, i(t), e, n)
  14405. }),
  14406. o;
  14407. var r, i, o
  14408. }
  14409. }
  14410. function Kt(r, i) {
  14411. return function(t, e) {
  14412. var n;
  14413. if (t === Ss && e === Ss)
  14414. return i;
  14415. if (t !== Ss && (n = t),
  14416. e !== Ss) {
  14417. if (n === Ss)
  14418. return e;
  14419. e = "string" == typeof t || "string" == typeof e ? (t = yt(t),
  14420. yt(e)) : (t = vt(t),
  14421. vt(e)),
  14422. n = r(t, e)
  14423. }
  14424. return n
  14425. }
  14426. }
  14427. function Qt(r) {
  14428. return le(function(t) {
  14429. return t = Qo(t, fs(ge())),
  14430. at(function(e) {
  14431. var n = this;
  14432. return r(t, function(t) {
  14433. return zo(t, n, e)
  14434. })
  14435. })
  14436. })
  14437. }
  14438. function Jt(t, e) {
  14439. var n = (e = e === Ss ? " " : yt(e)).length;
  14440. if (n < 2)
  14441. return n ? st(e, t) : e;
  14442. n = st(e, xr(t / Cs(e)));
  14443. return ys(e) ? At(ks(n), 0, t).join("") : n.slice(0, t)
  14444. }
  14445. function Zt(a, t, u, c) {
  14446. var l = 1 & t
  14447. , h = Ut(a);
  14448. return function t() {
  14449. for (var e = -1, n = arguments.length, r = -1, i = c.length, o = Hn(i + n), s = this && this !== Ka && this instanceof t ? h : a; ++r < i;)
  14450. o[r] = c[r];
  14451. for (; n--;)
  14452. o[r++] = arguments[++e];
  14453. return zo(s, l ? u : this, o)
  14454. }
  14455. }
  14456. function te(r) {
  14457. return function(t, e, n) {
  14458. return n && "number" != typeof n && Ce(t, e, n) && (e = n = Ss),
  14459. t = vn(t),
  14460. e === Ss ? (e = t,
  14461. t = 0) : e = vn(e),
  14462. function(t, e, n, r) {
  14463. for (var i = -1, o = Ar(xr((e - t) / (n || 1)), 0), s = Hn(o); o--;)
  14464. s[r ? o : ++i] = t,
  14465. t += n;
  14466. return s
  14467. }(t, e, n = n === Ss ? t < e ? 1 : -1 : vn(n), r)
  14468. }
  14469. }
  14470. function ee(n) {
  14471. return function(t, e) {
  14472. return "string" == typeof t && "string" == typeof e || (t = wn(t),
  14473. e = wn(e)),
  14474. n(t, e)
  14475. }
  14476. }
  14477. function ne(t, e, n, r, i, o, s, a, u, c) {
  14478. var l = 8 & e;
  14479. e |= l ? 32 : 64,
  14480. 4 & (e &= ~(l ? 64 : 32)) || (e &= -4);
  14481. c = [t, e, i, l ? o : Ss, l ? s : Ss, l ? Ss : o, l ? Ss : s, a, u, c],
  14482. n = n.apply(Ss, c);
  14483. return Se(t) && gi(n, c),
  14484. n.placeholder = r,
  14485. je(n, t, e)
  14486. }
  14487. function re(t) {
  14488. var r = Un[t];
  14489. return function(t, e) {
  14490. if (t = wn(t),
  14491. e = null == e ? 0 : Ir(yn(e), 292)) {
  14492. var n = (xn(t) + "e").split("e");
  14493. return +((n = (xn(r(n[0] + "e" + (+n[1] + e))) + "e").split("e"))[0] + "e" + (+n[1] - e))
  14494. }
  14495. return r(t)
  14496. }
  14497. }
  14498. function ie(o) {
  14499. return function(t) {
  14500. var e, n, r, i = hi(t);
  14501. return i == Hs ? bs(t) : i == Gs ? (i = t,
  14502. n = -1,
  14503. r = Array(i.size),
  14504. i.forEach(function(t) {
  14505. r[++n] = [t, t]
  14506. }),
  14507. r) : Qo(o(e = t), function(t) {
  14508. return [t, e[t]]
  14509. })
  14510. }
  14511. }
  14512. function oe(t, e, n, r, i, o, s, a) {
  14513. var u = 2 & e;
  14514. if (!u && "function" != typeof t)
  14515. throw new Xn(Os);
  14516. var c, l, h = r ? r.length : 0;
  14517. h || (e &= -97,
  14518. r = i = Ss),
  14519. s = s === Ss ? s : Ar(yn(s), 0),
  14520. a = a === Ss ? a : yn(a),
  14521. h -= i ? i.length : 0,
  14522. 64 & e && (c = r,
  14523. l = i,
  14524. r = i = Ss);
  14525. var f, p, d, g, m = u ? Ss : ui(t), s = [t, e, n, r, i, c, l, o, s, a];
  14526. return m && function(t, e) {
  14527. var n = t[1]
  14528. , r = e[1]
  14529. , i = n | r
  14530. , o = i < 131
  14531. , s = 128 == r && 8 == n || 128 == r && 256 == n && t[7].length <= e[8] || 384 == r && e[7].length <= e[8] && 8 == n;
  14532. if (!o && !s)
  14533. return;
  14534. 1 & r && (t[2] = e[2],
  14535. i |= 1 & n ? 0 : 4);
  14536. n = e[3];
  14537. {
  14538. var a;
  14539. n && (a = t[3],
  14540. t[3] = a ? Dt(a, n, e[4]) : n,
  14541. t[4] = a ? _s(t[3], Ts) : e[4])
  14542. }
  14543. (n = e[5]) && (a = t[5],
  14544. t[5] = a ? Rt(a, n, e[6]) : n,
  14545. t[6] = a ? _s(t[5], Ts) : e[6]),
  14546. (n = e[7]) && (t[7] = n),
  14547. 128 & r && (t[8] = null == t[8] ? e[8] : Ir(t[8], e[8])),
  14548. null == t[9] && (t[9] = e[9]),
  14549. t[0] = e[0],
  14550. t[1] = i
  14551. }(s, m),
  14552. t = s[0],
  14553. e = s[1],
  14554. n = s[2],
  14555. r = s[3],
  14556. i = s[4],
  14557. !(a = s[9] = s[9] === Ss ? u ? 0 : t.length : Ar(s[9] - h, 0)) && 24 & e && (e &= -25),
  14558. n = e && 1 != e ? 8 == e || 16 == e ? Gt(t, e, a) : 32 != e && 33 != e || i.length ? Xt.apply(Ss, s) : Zt(t, e, n, r) : (p = n,
  14559. d = 1 & e,
  14560. g = Ut(f = t),
  14561. function t() {
  14562. return (this && this !== Ka && this instanceof t ? g : f).apply(d ? p : this, arguments)
  14563. }
  14564. ),
  14565. je((m ? ri : gi)(n, s), t, e)
  14566. }
  14567. function se(t, e, n, r) {
  14568. return t === Ss || nn(t, Qn[n]) && !tr.call(r, n) ? e : t
  14569. }
  14570. function ae(t, e, n, r, i, o) {
  14571. return ln(t) && ln(e) && (o.set(e, t),
  14572. Z(t, e, Ss, ae, o),
  14573. o.delete(e)),
  14574. t
  14575. }
  14576. function ue(t) {
  14577. return pn(t) ? Ss : t
  14578. }
  14579. function ce(t, e, n, r, i, o) {
  14580. var s = 1 & n
  14581. , a = t.length
  14582. , u = e.length;
  14583. if (a != u && !(s && a < u))
  14584. return !1;
  14585. u = o.get(t);
  14586. if (u && o.get(e))
  14587. return u == e;
  14588. var c = -1
  14589. , l = !0
  14590. , h = 2 & n ? new v : Ss;
  14591. for (o.set(t, e),
  14592. o.set(e, t); ++c < a;) {
  14593. var f, p = t[c], d = e[c];
  14594. if (r && (f = s ? r(d, p, c, e, t, o) : r(p, d, c, t, e, o)),
  14595. f !== Ss) {
  14596. if (f)
  14597. continue;
  14598. l = !1;
  14599. break
  14600. }
  14601. if (h) {
  14602. if (!es(e, function(t, e) {
  14603. return !ds(h, e) && (p === t || i(p, t, n, r, o)) && h.push(e)
  14604. })) {
  14605. l = !1;
  14606. break
  14607. }
  14608. } else if (p !== d && !i(p, d, n, r, o)) {
  14609. l = !1;
  14610. break
  14611. }
  14612. }
  14613. return o.delete(t),
  14614. o.delete(e),
  14615. l
  14616. }
  14617. function le(t) {
  14618. return vi(Ae(t, Ss, Fe), t + "")
  14619. }
  14620. function he(t) {
  14621. return R(t, Sn, ci)
  14622. }
  14623. function fe(t) {
  14624. return R(t, On, li)
  14625. }
  14626. function pe(t) {
  14627. for (var e = t.name + "", n = qr[e], r = tr.call(qr, e) ? n.length : 0; r--;) {
  14628. var i = n[r]
  14629. , o = i.func;
  14630. if (null == o || o == t)
  14631. return i.name
  14632. }
  14633. return e
  14634. }
  14635. function de(t) {
  14636. return (tr.call(d, "placeholder") ? d : t).placeholder
  14637. }
  14638. function ge() {
  14639. var t = (t = d.iteratee || Dn) === Dn ? V : t;
  14640. return arguments.length ? t(arguments[0], arguments[1]) : t
  14641. }
  14642. function me(t, e) {
  14643. var n, r = t.__data__;
  14644. return ("string" == (t = typeof (n = e)) || "number" == t || "symbol" == t || "boolean" == t ? "__proto__" !== n : null === n) ? r["string" == typeof e ? "string" : "hash"] : r.map
  14645. }
  14646. function ve(t) {
  14647. for (var e = Sn(t), n = e.length; n--;) {
  14648. var r = e[n]
  14649. , i = t[r];
  14650. e[n] = [r, i, Ee(i)]
  14651. }
  14652. return e
  14653. }
  14654. function ye(t, e) {
  14655. e = e,
  14656. e = null == (t = t) ? Ss : t[e];
  14657. return G(e) ? e : Ss
  14658. }
  14659. function be(t, e, n) {
  14660. for (var r = -1, i = (e = Tt(e, t)).length, o = !1; ++r < i;) {
  14661. var s = De(e[r]);
  14662. if (!(o = null != t && n(t, s)))
  14663. break;
  14664. t = t[s]
  14665. }
  14666. return o || ++r != i ? o : !!(i = null == t ? 0 : t.length) && cn(i) && xe(s, i) && (io(t) || ro(t))
  14667. }
  14668. function we(t) {
  14669. return "function" != typeof t.constructor || Oe(t) ? {} : Qr(hr(t))
  14670. }
  14671. function _e(t) {
  14672. return io(t) || ro(t) || !!(gr && t && t[gr])
  14673. }
  14674. function xe(t, e) {
  14675. return !!(e = null == e ? As : e) && ("number" == typeof t || Ma.test(t)) && -1 < t && t % 1 == 0 && t < e
  14676. }
  14677. function Ce(t, e, n) {
  14678. if (ln(n)) {
  14679. var r = typeof e;
  14680. return ("number" == r ? rn(n) && xe(e, n.length) : "string" == r && e in n) && nn(n[e], t)
  14681. }
  14682. }
  14683. function ke(t, e) {
  14684. if (!io(t)) {
  14685. var n = typeof t;
  14686. return "number" == n || "symbol" == n || "boolean" == n || null == t || gn(t) || va.test(t) || !ma.test(t) || null != e && t in Gn(e)
  14687. }
  14688. }
  14689. function Se(t) {
  14690. var e = pe(t)
  14691. , n = d[e];
  14692. if ("function" == typeof n && e in m.prototype) {
  14693. if (t === n)
  14694. return 1;
  14695. n = ui(n);
  14696. return n && t === n[0]
  14697. }
  14698. }
  14699. function Oe(t) {
  14700. var e = t && t.constructor;
  14701. return t === ("function" == typeof e && e.prototype || Qn)
  14702. }
  14703. function Ee(t) {
  14704. return t == t && !ln(t)
  14705. }
  14706. function Te(e, n) {
  14707. return function(t) {
  14708. return null != t && t[e] === n && (n !== Ss || e in Gn(t))
  14709. }
  14710. }
  14711. function Ae(o, s, a) {
  14712. return s = Ar(s === Ss ? o.length - 1 : s, 0),
  14713. function() {
  14714. for (var t = arguments, e = -1, n = Ar(t.length - s, 0), r = Hn(n); ++e < n;)
  14715. r[e] = t[s + e];
  14716. e = -1;
  14717. for (var i = Hn(s + 1); ++e < s;)
  14718. i[e] = t[e];
  14719. return i[s] = a(r),
  14720. zo(o, this, i)
  14721. }
  14722. }
  14723. function Ie(t, e) {
  14724. return e.length < 2 ? t : D(t, ft(e, 0, -1))
  14725. }
  14726. function je(t, e, n) {
  14727. var r, i, e = e + "";
  14728. return vi(t, function(t, e) {
  14729. var n = e.length;
  14730. if (!n)
  14731. return t;
  14732. var r = n - 1;
  14733. return e[r] = (1 < n ? "& " : "") + e[r],
  14734. e = e.join(2 < n ? ", " : " "),
  14735. t.replace(Sa, "{\n/* [wrapped with " + e + "] */\n")
  14736. }(e, (r = (e = (e = e).match(Oa)) ? e[1].split(Ea) : [],
  14737. i = n,
  14738. Go(Ps, function(t) {
  14739. var e = "_." + t[0];
  14740. i & t[1] && !Yo(r, e) && r.push(e)
  14741. }),
  14742. r.sort())))
  14743. }
  14744. function Pe(n) {
  14745. var r = 0
  14746. , i = 0;
  14747. return function() {
  14748. var t = jr()
  14749. , e = 16 - (t - i);
  14750. if (i = t,
  14751. 0 < e) {
  14752. if (800 <= ++r)
  14753. return arguments[0]
  14754. } else
  14755. r = 0;
  14756. return n.apply(Ss, arguments)
  14757. }
  14758. }
  14759. function Ne(t, e) {
  14760. var n = -1
  14761. , r = t.length
  14762. , i = r - 1;
  14763. for (e = e === Ss ? r : e; ++n < e;) {
  14764. var o = ot(n, i)
  14765. , s = t[o];
  14766. t[o] = t[n],
  14767. t[n] = s
  14768. }
  14769. return t.length = e,
  14770. t
  14771. }
  14772. function De(t) {
  14773. if ("string" == typeof t || gn(t))
  14774. return t;
  14775. var e = t + "";
  14776. return "0" == e && 1 / t == -1 / 0 ? "-0" : e
  14777. }
  14778. function Re(t) {
  14779. if (null != t) {
  14780. try {
  14781. return Zn.call(t)
  14782. } catch (t) { }
  14783. try {
  14784. return t + ""
  14785. } catch (t) { }
  14786. }
  14787. return ""
  14788. }
  14789. function Me(t) {
  14790. if (t instanceof m)
  14791. return t.clone();
  14792. var e = new g(t.__wrapped__, t.__chain__);
  14793. return e.__actions__ = Mt(t.__actions__),
  14794. e.__index__ = t.__index__,
  14795. e.__values__ = t.__values__,
  14796. e
  14797. }
  14798. function We(t, e, n) {
  14799. var r = null == t ? 0 : t.length;
  14800. if (!r)
  14801. return -1;
  14802. n = null == n ? 0 : yn(n);
  14803. return n < 0 && (n = Ar(r + n, 0)),
  14804. rs(t, ge(e, 3), n)
  14805. }
  14806. function Le(t, e, n) {
  14807. var r = null == t ? 0 : t.length;
  14808. if (!r)
  14809. return -1;
  14810. var i = r - 1;
  14811. return n !== Ss && (i = yn(n),
  14812. i = n < 0 ? Ar(r + i, 0) : Ir(i, r - 1)),
  14813. rs(t, ge(e, 3), i, !0)
  14814. }
  14815. function Fe(t) {
  14816. return (null == t ? 0 : t.length) ? I(t, 1) : []
  14817. }
  14818. function He(t) {
  14819. return t && t.length ? t[0] : Ss
  14820. }
  14821. function Be(t) {
  14822. var e = null == t ? 0 : t.length;
  14823. return e ? t[e - 1] : Ss
  14824. }
  14825. function qe(t, e) {
  14826. return t && t.length && e && e.length ? rt(t, e) : t
  14827. }
  14828. function ze(t) {
  14829. return null == t ? t : Dr.call(t)
  14830. }
  14831. function Ue(e) {
  14832. if (!e || !e.length)
  14833. return [];
  14834. var n = 0;
  14835. return e = Xo(e, function(t) {
  14836. return on(t) && (n = Ar(t.length, n),
  14837. 1)
  14838. }),
  14839. hs(n, function(t) {
  14840. return Qo(e, us(t))
  14841. })
  14842. }
  14843. function Ge(t, e) {
  14844. if (!t || !t.length)
  14845. return [];
  14846. t = Ue(t);
  14847. return null == e ? t : Qo(t, function(t) {
  14848. return zo(e, Ss, t)
  14849. })
  14850. }
  14851. function Ve(t) {
  14852. t = d(t);
  14853. return t.__chain__ = !0,
  14854. t
  14855. }
  14856. function $e(t, e) {
  14857. return e(t)
  14858. }
  14859. function Xe(t, e) {
  14860. return (io(t) ? Go : Zr)(t, ge(e, 3))
  14861. }
  14862. function Ye(t, e) {
  14863. return (io(t) ? Vo : ti)(t, ge(e, 3))
  14864. }
  14865. function Ke(t, e) {
  14866. return (io(t) ? Qo : K)(t, ge(e, 3))
  14867. }
  14868. function Qe(t, e, n) {
  14869. return e = n ? Ss : e,
  14870. e = t && null == e ? t.length : e,
  14871. oe(t, 128, Ss, Ss, Ss, Ss, e)
  14872. }
  14873. function Je(t, e) {
  14874. var n;
  14875. if ("function" != typeof e)
  14876. throw new Xn(Os);
  14877. return t = yn(t),
  14878. function() {
  14879. return 0 < --t && (n = e.apply(this, arguments)),
  14880. t <= 1 && (e = Ss),
  14881. n
  14882. }
  14883. }
  14884. function Ze(r, n, t) {
  14885. function i(t) {
  14886. var e = u
  14887. , n = c;
  14888. return u = c = Ss,
  14889. d = t,
  14890. h = r.apply(n, e)
  14891. }
  14892. function o(t) {
  14893. var e = t - p;
  14894. return p === Ss || n <= e || e < 0 || m && l <= t - d
  14895. }
  14896. function s() {
  14897. var t, e = Gi();
  14898. return o(e) ? a(e) : void (f = mi(s, (e = n - ((t = e) - p),
  14899. m ? Ir(e, l - (t - d)) : e)))
  14900. }
  14901. function a(t) {
  14902. return f = Ss,
  14903. v && u ? i(t) : (u = c = Ss,
  14904. h)
  14905. }
  14906. function e() {
  14907. var t = Gi()
  14908. , e = o(t);
  14909. if (u = arguments,
  14910. c = this,
  14911. p = t,
  14912. e) {
  14913. if (f === Ss)
  14914. return d = e = p,
  14915. f = mi(s, n),
  14916. g ? i(e) : h;
  14917. if (m)
  14918. return f = mi(s, n),
  14919. i(p)
  14920. }
  14921. return f === Ss && (f = mi(s, n)),
  14922. h
  14923. }
  14924. var u, c, l, h, f, p, d = 0, g = !1, m = !1, v = !0;
  14925. if ("function" != typeof r)
  14926. throw new Xn(Os);
  14927. return n = wn(n) || 0,
  14928. ln(t) && (g = !!t.leading,
  14929. m = "maxWait" in t,
  14930. l = m ? Ar(wn(t.maxWait) || 0, n) : l,
  14931. v = "trailing" in t ? !!t.trailing : v),
  14932. e.cancel = function() {
  14933. f !== Ss && si(f),
  14934. d = 0,
  14935. u = p = c = f = Ss
  14936. }
  14937. ,
  14938. e.flush = function() {
  14939. return f === Ss ? h : a(Gi())
  14940. }
  14941. ,
  14942. e
  14943. }
  14944. function tn(r, i) {
  14945. if ("function" != typeof r || null != i && "function" != typeof i)
  14946. throw new Xn(Os);
  14947. var o = function() {
  14948. var t = arguments
  14949. , e = i ? i.apply(this, t) : t[0]
  14950. , n = o.cache;
  14951. if (n.has(e))
  14952. return n.get(e);
  14953. t = r.apply(this, t);
  14954. return o.cache = n.set(e, t) || n,
  14955. t
  14956. };
  14957. return o.cache = new (tn.Cache || s),
  14958. o
  14959. }
  14960. function en(e) {
  14961. if ("function" != typeof e)
  14962. throw new Xn(Os);
  14963. return function() {
  14964. var t = arguments;
  14965. switch (t.length) {
  14966. case 0:
  14967. return !e.call(this);
  14968. case 1:
  14969. return !e.call(this, t[0]);
  14970. case 2:
  14971. return !e.call(this, t[0], t[1]);
  14972. case 3:
  14973. return !e.call(this, t[0], t[1], t[2])
  14974. }
  14975. return !e.apply(this, t)
  14976. }
  14977. }
  14978. function nn(t, e) {
  14979. return t === e || t != t && e != e
  14980. }
  14981. function rn(t) {
  14982. return null != t && cn(t.length) && !an(t)
  14983. }
  14984. function on(t) {
  14985. return hn(t) && rn(t)
  14986. }
  14987. function sn(t) {
  14988. if (!hn(t))
  14989. return !1;
  14990. var e = M(t);
  14991. return e == Ws || "[object DOMException]" == e || "string" == typeof t.message && "string" == typeof t.name && !pn(t)
  14992. }
  14993. function an(t) {
  14994. if (!ln(t))
  14995. return !1;
  14996. t = M(t);
  14997. return t == Ls || t == Fs || "[object AsyncFunction]" == t || "[object Proxy]" == t
  14998. }
  14999. function un(t) {
  15000. return "number" == typeof t && t == yn(t)
  15001. }
  15002. function cn(t) {
  15003. return "number" == typeof t && -1 < t && t % 1 == 0 && t <= As
  15004. }
  15005. function ln(t) {
  15006. var e = typeof t;
  15007. return null != t && ("object" == e || "function" == e)
  15008. }
  15009. function hn(t) {
  15010. return null != t && "object" == typeof t
  15011. }
  15012. function fn(t) {
  15013. return "number" == typeof t || hn(t) && M(t) == Bs
  15014. }
  15015. function pn(t) {
  15016. if (!hn(t) || M(t) != qs)
  15017. return !1;
  15018. t = hr(t);
  15019. if (null === t)
  15020. return !0;
  15021. t = tr.call(t, "constructor") && t.constructor;
  15022. return "function" == typeof t && t instanceof t && Zn.call(t) == ir
  15023. }
  15024. function dn(t) {
  15025. return "string" == typeof t || !io(t) && hn(t) && M(t) == Vs
  15026. }
  15027. function gn(t) {
  15028. return "symbol" == typeof t || hn(t) && M(t) == $s
  15029. }
  15030. function mn(t) {
  15031. if (!t)
  15032. return [];
  15033. if (rn(t))
  15034. return (dn(t) ? ks : Mt)(t);
  15035. if (mr && t[mr])
  15036. return function(t) {
  15037. for (var e, n = []; !(e = t.next()).done;)
  15038. n.push(e.value);
  15039. return n
  15040. }(t[mr]());
  15041. var e = hi(t);
  15042. return (e == Hs ? bs : e == Gs ? xs : Tn)(t)
  15043. }
  15044. function vn(t) {
  15045. return t ? (t = wn(t)) !== 1 / 0 && t !== -1 / 0 ? t == t ? t : 0 : 17976931348623157e292 * (t < 0 ? -1 : 1) : 0 === t ? t : 0
  15046. }
  15047. function yn(t) {
  15048. var e = vn(t)
  15049. , t = e % 1;
  15050. return e == e ? t ? e - t : e : 0
  15051. }
  15052. function bn(t) {
  15053. return t ? x(yn(t), 0, js) : 0
  15054. }
  15055. function wn(t) {
  15056. if ("number" == typeof t)
  15057. return t;
  15058. if (gn(t))
  15059. return Is;
  15060. if (ln(t) && (t = ln(e = "function" == typeof t.valueOf ? t.valueOf() : t) ? e + "" : e),
  15061. "string" != typeof t)
  15062. return 0 === t ? t : +t;
  15063. t = t.replace(xa, "");
  15064. var e = Na.test(t);
  15065. return e || Ra.test(t) ? Ya(t.slice(2), e ? 2 : 8) : Pa.test(t) ? Is : +t
  15066. }
  15067. function _n(t) {
  15068. return Wt(t, On(t))
  15069. }
  15070. function xn(t) {
  15071. return null == t ? "" : yt(t)
  15072. }
  15073. function Cn(t, e, n) {
  15074. e = null == t ? Ss : D(t, e);
  15075. return e === Ss ? n : e
  15076. }
  15077. function kn(t, e) {
  15078. return null != t && be(t, e, F)
  15079. }
  15080. function Sn(t) {
  15081. return (rn(t) ? r : $)(t)
  15082. }
  15083. function On(t) {
  15084. return rn(t) ? r(t, !0) : X(t)
  15085. }
  15086. function En(t, n) {
  15087. if (null == t)
  15088. return {};
  15089. var e = Qo(fe(t), function(t) {
  15090. return [t]
  15091. });
  15092. return n = ge(n),
  15093. nt(t, e, function(t, e) {
  15094. return n(t, e[0])
  15095. })
  15096. }
  15097. function Tn(t) {
  15098. return null == t ? [] : ps(t, Sn(t))
  15099. }
  15100. function An(t) {
  15101. return Lo(xn(t).toLowerCase())
  15102. }
  15103. function In(t) {
  15104. return (t = xn(t)) && t.replace(Wa, iu).replace(Ba, "")
  15105. }
  15106. function jn(t, e, n) {
  15107. return t = xn(t),
  15108. (e = n ? Ss : e) === Ss ? (n = t,
  15109. za.test(n) ? t.match(qa) || [] : t.match(Ta) || []) : t.match(e) || []
  15110. }
  15111. function Pn(t) {
  15112. return function() {
  15113. return t
  15114. }
  15115. }
  15116. function Nn(t) {
  15117. return t
  15118. }
  15119. function Dn(t) {
  15120. return V("function" == typeof t ? t : C(t, 1))
  15121. }
  15122. function Rn(r, e, t) {
  15123. var n = Sn(e)
  15124. , i = N(e, n);
  15125. null != t || ln(e) && (i.length || !n.length) || (t = e,
  15126. e = r,
  15127. r = this,
  15128. i = N(e, Sn(e)));
  15129. var o = !(ln(t) && "chain" in t && !t.chain)
  15130. , s = an(r);
  15131. return Go(i, function(t) {
  15132. var n = e[t];
  15133. r[t] = n,
  15134. s && (r.prototype[t] = function() {
  15135. var t = this.__chain__;
  15136. if (o || t) {
  15137. var e = r(this.__wrapped__);
  15138. return (e.__actions__ = Mt(this.__actions__)).push({
  15139. func: n,
  15140. args: arguments,
  15141. thisArg: r
  15142. }),
  15143. e.__chain__ = t,
  15144. e
  15145. }
  15146. return n.apply(r, Jo([this.value()], arguments))
  15147. }
  15148. )
  15149. }),
  15150. r
  15151. }
  15152. function Mn() { }
  15153. function Wn(t) {
  15154. return ke(t) ? us(De(t)) : (e = t,
  15155. function(t) {
  15156. return D(t, e)
  15157. }
  15158. );
  15159. var e
  15160. }
  15161. function Ln() {
  15162. return []
  15163. }
  15164. function Fn() {
  15165. return !1
  15166. }
  15167. var Hn = (e = null == e ? Ka : au.defaults(Ka.Object(), e, au.pick(Ka, Ua))).Array
  15168. , Bn = e.Date
  15169. , qn = e.Error
  15170. , zn = e.Function
  15171. , Un = e.Math
  15172. , Gn = e.Object
  15173. , Vn = e.RegExp
  15174. , $n = e.String
  15175. , Xn = e.TypeError
  15176. , Yn = Hn.prototype
  15177. , Kn = zn.prototype
  15178. , Qn = Gn.prototype
  15179. , Jn = e["__core-js_shared__"]
  15180. , Zn = Kn.toString
  15181. , tr = Qn.hasOwnProperty
  15182. , er = 0
  15183. , nr = (Ho = /[^.]+$/.exec(Jn && Jn.keys && Jn.keys.IE_PROTO || "")) ? "Symbol(src)_1." + Ho : ""
  15184. , rr = Qn.toString
  15185. , ir = Zn.call(Gn)
  15186. , or = Ka._
  15187. , sr = Vn("^" + Zn.call(tr).replace(wa, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$")
  15188. , ar = Qa ? e.Buffer : Ss
  15189. , ur = e.Symbol
  15190. , cr = e.Uint8Array
  15191. , lr = ar ? ar.allocUnsafe : Ss
  15192. , hr = ws(Gn.getPrototypeOf, Gn)
  15193. , fr = Gn.create
  15194. , pr = Qn.propertyIsEnumerable
  15195. , dr = Yn.splice
  15196. , gr = ur ? ur.isConcatSpreadable : Ss
  15197. , mr = ur ? ur.iterator : Ss
  15198. , vr = ur ? ur.toStringTag : Ss
  15199. , yr = function() {
  15200. try {
  15201. var t = ye(Gn, "defineProperty");
  15202. return t({}, "", {}),
  15203. t
  15204. } catch (t) { }
  15205. }()
  15206. , br = e.clearTimeout !== Ka.clearTimeout && e.clearTimeout
  15207. , wr = Bn && Bn.now !== Ka.Date.now && Bn.now
  15208. , _r = e.setTimeout !== Ka.setTimeout && e.setTimeout
  15209. , xr = Un.ceil
  15210. , Cr = Un.floor
  15211. , kr = Gn.getOwnPropertySymbols
  15212. , Sr = ar ? ar.isBuffer : Ss
  15213. , Or = e.isFinite
  15214. , Er = Yn.join
  15215. , Tr = ws(Gn.keys, Gn)
  15216. , Ar = Un.max
  15217. , Ir = Un.min
  15218. , jr = Bn.now
  15219. , Pr = e.parseInt
  15220. , Nr = Un.random
  15221. , Dr = Yn.reverse
  15222. , Rr = ye(e, "DataView")
  15223. , Mr = ye(e, "Map")
  15224. , Wr = ye(e, "Promise")
  15225. , Lr = ye(e, "Set")
  15226. , Fr = ye(e, "WeakMap")
  15227. , Hr = ye(Gn, "create")
  15228. , Br = Fr && new Fr
  15229. , qr = {}
  15230. , zr = Re(Rr)
  15231. , Ur = Re(Mr)
  15232. , Gr = Re(Wr)
  15233. , Vr = Re(Lr)
  15234. , $r = Re(Fr)
  15235. , Xr = ur ? ur.prototype : Ss
  15236. , Yr = Xr ? Xr.valueOf : Ss
  15237. , Kr = Xr ? Xr.toString : Ss
  15238. , Qr = function(t) {
  15239. if (!ln(t))
  15240. return {};
  15241. if (fr)
  15242. return fr(t);
  15243. Jr.prototype = t;
  15244. t = new Jr;
  15245. return Jr.prototype = Ss,
  15246. t
  15247. };
  15248. function Jr() { }
  15249. d.templateSettings = {
  15250. escape: pa,
  15251. evaluate: da,
  15252. interpolate: ga,
  15253. variable: "",
  15254. imports: {
  15255. _: d
  15256. }
  15257. },
  15258. (d.prototype = o.prototype).constructor = d,
  15259. (g.prototype = Qr(o.prototype)).constructor = g,
  15260. (m.prototype = Qr(o.prototype)).constructor = m,
  15261. n.prototype.clear = function() {
  15262. this.__data__ = Hr ? Hr(null) : {},
  15263. this.size = 0
  15264. }
  15265. ,
  15266. n.prototype.delete = function(t) {
  15267. return t = this.has(t) && delete this.__data__[t],
  15268. this.size -= t ? 1 : 0,
  15269. t
  15270. }
  15271. ,
  15272. n.prototype.get = function(t) {
  15273. var e = this.__data__;
  15274. if (Hr) {
  15275. var n = e[t];
  15276. return n === Es ? Ss : n
  15277. }
  15278. return tr.call(e, t) ? e[t] : Ss
  15279. }
  15280. ,
  15281. n.prototype.has = function(t) {
  15282. var e = this.__data__;
  15283. return Hr ? e[t] !== Ss : tr.call(e, t)
  15284. }
  15285. ,
  15286. n.prototype.set = function(t, e) {
  15287. var n = this.__data__;
  15288. return this.size += this.has(t) ? 0 : 1,
  15289. n[t] = Hr && e === Ss ? Es : e,
  15290. this
  15291. }
  15292. ,
  15293. i.prototype.clear = function() {
  15294. this.__data__ = [],
  15295. this.size = 0
  15296. }
  15297. ,
  15298. i.prototype.delete = function(t) {
  15299. var e = this.__data__;
  15300. return !((t = l(e, t)) < 0) && (t == e.length - 1 ? e.pop() : dr.call(e, t, 1),
  15301. --this.size,
  15302. !0)
  15303. }
  15304. ,
  15305. i.prototype.get = function(t) {
  15306. var e = this.__data__;
  15307. return (t = l(e, t)) < 0 ? Ss : e[t][1]
  15308. }
  15309. ,
  15310. i.prototype.has = function(t) {
  15311. return -1 < l(this.__data__, t)
  15312. }
  15313. ,
  15314. i.prototype.set = function(t, e) {
  15315. var n = this.__data__
  15316. , r = l(n, t);
  15317. return r < 0 ? (++this.size,
  15318. n.push([t, e])) : n[r][1] = e,
  15319. this
  15320. }
  15321. ,
  15322. s.prototype.clear = function() {
  15323. this.size = 0,
  15324. this.__data__ = {
  15325. hash: new n,
  15326. map: new (Mr || i),
  15327. string: new n
  15328. }
  15329. }
  15330. ,
  15331. s.prototype.delete = function(t) {
  15332. return t = me(this, t).delete(t),
  15333. this.size -= t ? 1 : 0,
  15334. t
  15335. }
  15336. ,
  15337. s.prototype.get = function(t) {
  15338. return me(this, t).get(t)
  15339. }
  15340. ,
  15341. s.prototype.has = function(t) {
  15342. return me(this, t).has(t)
  15343. }
  15344. ,
  15345. s.prototype.set = function(t, e) {
  15346. var n = me(this, t)
  15347. , r = n.size;
  15348. return n.set(t, e),
  15349. this.size += n.size == r ? 0 : 1,
  15350. this
  15351. }
  15352. ,
  15353. v.prototype.add = v.prototype.push = function(t) {
  15354. return this.__data__.set(t, Es),
  15355. this
  15356. }
  15357. ,
  15358. v.prototype.has = function(t) {
  15359. return this.__data__.has(t)
  15360. }
  15361. ,
  15362. y.prototype.clear = function() {
  15363. this.__data__ = new i,
  15364. this.size = 0
  15365. }
  15366. ,
  15367. y.prototype.delete = function(t) {
  15368. var e = this.__data__
  15369. , t = e.delete(t);
  15370. return this.size = e.size,
  15371. t
  15372. }
  15373. ,
  15374. y.prototype.get = function(t) {
  15375. return this.__data__.get(t)
  15376. }
  15377. ,
  15378. y.prototype.has = function(t) {
  15379. return this.__data__.has(t)
  15380. }
  15381. ,
  15382. y.prototype.set = function(t, e) {
  15383. var n = this.__data__;
  15384. if (n instanceof i) {
  15385. var r = n.__data__;
  15386. if (!Mr || r.length < 199)
  15387. return r.push([t, e]),
  15388. this.size = ++n.size,
  15389. this;
  15390. n = this.__data__ = new s(r)
  15391. }
  15392. return n.set(t, e),
  15393. this.size = n.size,
  15394. this
  15395. }
  15396. ;
  15397. var Zr = Ht(j)
  15398. , ti = Ht(P, !0)
  15399. , ei = Bt()
  15400. , ni = Bt(!0)
  15401. , ri = Br ? function(t, e) {
  15402. return Br.set(t, e),
  15403. t
  15404. }
  15405. : Nn
  15406. , ii = yr ? function(t, e) {
  15407. return yr(t, "toString", {
  15408. configurable: !0,
  15409. enumerable: !1,
  15410. value: Pn(e),
  15411. writable: !0
  15412. })
  15413. }
  15414. : Nn
  15415. , oi = at
  15416. , si = br || function(t) {
  15417. return Ka.clearTimeout(t)
  15418. }
  15419. , ai = Lr && 1 / xs(new Lr([, -0]))[1] == 1 / 0 ? function(t) {
  15420. return new Lr(t)
  15421. }
  15422. : Mn
  15423. , ui = Br ? function(t) {
  15424. return Br.get(t)
  15425. }
  15426. : Mn
  15427. , ci = kr ? function(e) {
  15428. return null == e ? [] : (e = Gn(e),
  15429. Xo(kr(e), function(t) {
  15430. return pr.call(e, t)
  15431. }))
  15432. }
  15433. : Ln
  15434. , li = kr ? function(t) {
  15435. for (var e = []; t;)
  15436. Jo(e, ci(t)),
  15437. t = hr(t);
  15438. return e
  15439. }
  15440. : Ln
  15441. , hi = M;
  15442. (Rr && hi(new Rr(new ArrayBuffer(1))) != Ks || Mr && hi(new Mr) != Hs || Wr && hi(Wr.resolve()) != zs || Lr && hi(new Lr) != Gs || Fr && hi(new Fr) != Xs) && (hi = function(t) {
  15443. var e = M(t)
  15444. , t = e == qs ? t.constructor : Ss
  15445. , t = t ? Re(t) : "";
  15446. if (t)
  15447. switch (t) {
  15448. case zr:
  15449. return Ks;
  15450. case Ur:
  15451. return Hs;
  15452. case Gr:
  15453. return zs;
  15454. case Vr:
  15455. return Gs;
  15456. case $r:
  15457. return Xs
  15458. }
  15459. return e
  15460. }
  15461. );
  15462. var fi, pi, di = Jn ? an : Fn, gi = Pe(ri), mi = _r || function(t, e) {
  15463. return Ka.setTimeout(t, e)
  15464. }
  15465. , vi = Pe(ii), yi = (pi = (fi = tn(fi = function(t) {
  15466. var i = [];
  15467. return ya.test(t) && i.push(""),
  15468. t.replace(ba, function(t, e, n, r) {
  15469. i.push(n ? r.replace(Aa, "$1") : e || t)
  15470. }),
  15471. i
  15472. }
  15473. , function(t) {
  15474. return 500 === pi.size && pi.clear(),
  15475. t
  15476. })).cache,
  15477. fi), bi = at(function(t, e) {
  15478. return on(t) ? O(t, I(e, 1, on, !0)) : []
  15479. }), wi = at(function(t, e) {
  15480. var n = Be(e);
  15481. return on(n) && (n = Ss),
  15482. on(t) ? O(t, I(e, 1, on, !0), ge(n, 2)) : []
  15483. }), _i = at(function(t, e) {
  15484. var n = Be(e);
  15485. return on(n) && (n = Ss),
  15486. on(t) ? O(t, I(e, 1, on, !0), Ss, n) : []
  15487. }), xi = at(function(t) {
  15488. var e = Qo(t, Ot);
  15489. return e.length && e[0] === t[0] ? H(e) : []
  15490. }), Ci = at(function(t) {
  15491. var e = Be(t)
  15492. , n = Qo(t, Ot);
  15493. return e === Be(n) ? e = Ss : n.pop(),
  15494. n.length && n[0] === t[0] ? H(n, ge(e, 2)) : []
  15495. }), ki = at(function(t) {
  15496. var e = Be(t)
  15497. , n = Qo(t, Ot);
  15498. return (e = "function" == typeof e ? e : Ss) && n.pop(),
  15499. n.length && n[0] === t[0] ? H(n, Ss, e) : []
  15500. }), Si = at(qe), Oi = le(function(t, e) {
  15501. var n = null == t ? 0 : t.length
  15502. , r = _(t, e);
  15503. return it(t, Qo(e, function(t) {
  15504. return xe(t, n) ? +t : t
  15505. }).sort(Nt)),
  15506. r
  15507. }), Ei = at(function(t) {
  15508. return bt(I(t, 1, on, !0))
  15509. }), Ti = at(function(t) {
  15510. var e = Be(t);
  15511. return on(e) && (e = Ss),
  15512. bt(I(t, 1, on, !0), ge(e, 2))
  15513. }), Ai = at(function(t) {
  15514. var e = "function" == typeof (e = Be(t)) ? e : Ss;
  15515. return bt(I(t, 1, on, !0), Ss, e)
  15516. }), Ii = at(function(t, e) {
  15517. return on(t) ? O(t, e) : []
  15518. }), ji = at(function(t) {
  15519. return kt(Xo(t, on))
  15520. }), Pi = at(function(t) {
  15521. var e = Be(t);
  15522. return on(e) && (e = Ss),
  15523. kt(Xo(t, on), ge(e, 2))
  15524. }), Ni = at(function(t) {
  15525. var e = "function" == typeof (e = Be(t)) ? e : Ss;
  15526. return kt(Xo(t, on), Ss, e)
  15527. }), Di = at(Ue), Ri = at(function(t) {
  15528. var e = t.length
  15529. , e = "function" == typeof (e = 1 < e ? t[e - 1] : Ss) ? (t.pop(),
  15530. e) : Ss;
  15531. return Ge(t, e)
  15532. }), Mi = le(function(e) {
  15533. function t(t) {
  15534. return _(t, e)
  15535. }
  15536. var n = e.length
  15537. , r = n ? e[0] : 0
  15538. , i = this.__wrapped__;
  15539. return !(1 < n || this.__actions__.length) && i instanceof m && xe(r) ? ((i = i.slice(r, +r + (n ? 1 : 0))).__actions__.push({
  15540. func: $e,
  15541. args: [t],
  15542. thisArg: Ss
  15543. }),
  15544. new g(i, this.__chain__).thru(function(t) {
  15545. return n && !t.length && t.push(Ss),
  15546. t
  15547. })) : this.thru(t)
  15548. }), Wi = Lt(function(t, e, n) {
  15549. tr.call(t, n) ? ++t[n] : f(t, n, 1)
  15550. }), Li = Vt(We), Fi = Vt(Le), Hi = Lt(function(t, e, n) {
  15551. tr.call(t, n) ? t[n].push(e) : f(t, n, [e])
  15552. }), Bi = at(function(t, e, n) {
  15553. var r = -1
  15554. , i = "function" == typeof e
  15555. , o = rn(t) ? Hn(t.length) : [];
  15556. return Zr(t, function(t) {
  15557. o[++r] = i ? zo(e, t, n) : B(t, e, n)
  15558. }),
  15559. o
  15560. }), qi = Lt(function(t, e, n) {
  15561. f(t, n, e)
  15562. }), zi = Lt(function(t, e, n) {
  15563. t[n ? 0 : 1].push(e)
  15564. }, function() {
  15565. return [[], []]
  15566. }), Ui = at(function(t, e) {
  15567. if (null == t)
  15568. return [];
  15569. var n = e.length;
  15570. return 1 < n && Ce(t, e[0], e[1]) ? e = [] : 2 < n && Ce(e[0], e[1], e[2]) && (e = [e[0]]),
  15571. et(t, I(e, 1), [])
  15572. }), Gi = wr || function() {
  15573. return Ka.Date.now()
  15574. }
  15575. , Vi = at(function(t, e, n) {
  15576. var r, i = 1;
  15577. return n.length && (r = _s(n, de(Vi)),
  15578. i |= 32),
  15579. oe(t, i, e, n, r)
  15580. }), $i = at(function(t, e, n) {
  15581. var r, i = 3;
  15582. return n.length && (r = _s(n, de($i)),
  15583. i |= 32),
  15584. oe(e, i, t, n, r)
  15585. }), Xi = at(function(t, e) {
  15586. return S(t, 1, e)
  15587. }), Yi = at(function(t, e, n) {
  15588. return S(t, wn(e) || 0, n)
  15589. });
  15590. tn.Cache = s;
  15591. var Ki, Qi = oi(function(r, i) {
  15592. var o = (i = 1 == i.length && io(i[0]) ? Qo(i[0], fs(ge())) : Qo(I(i, 1), fs(ge()))).length;
  15593. return at(function(t) {
  15594. for (var e = -1, n = Ir(t.length, o); ++e < n;)
  15595. t[e] = i[e].call(this, t[e]);
  15596. return zo(r, this, t)
  15597. })
  15598. }), Ji = at(function(t, e) {
  15599. var n = _s(e, de(Ji));
  15600. return oe(t, 32, Ss, e, n)
  15601. }), Zi = at(function(t, e) {
  15602. var n = _s(e, de(Zi));
  15603. return oe(t, 64, Ss, e, n)
  15604. }), to = le(function(t, e) {
  15605. return oe(t, 256, Ss, Ss, Ss, e)
  15606. }), eo = ee(W), no = ee(function(t, e) {
  15607. return e <= t
  15608. }), ro = q(function() {
  15609. return arguments
  15610. }()) ? q : function(t) {
  15611. return hn(t) && tr.call(t, "callee") && !pr.call(t, "callee")
  15612. }
  15613. , io = Hn.isArray, oo = Ja ? fs(Ja) : function(t) {
  15614. return hn(t) && M(t) == Ys
  15615. }
  15616. , so = Sr || Fn, ao = Za ? fs(Za) : function(t) {
  15617. return hn(t) && M(t) == Ms
  15618. }
  15619. , uo = tu ? fs(tu) : function(t) {
  15620. return hn(t) && hi(t) == Hs
  15621. }
  15622. , co = eu ? fs(eu) : function(t) {
  15623. return hn(t) && M(t) == Us
  15624. }
  15625. , lo = nu ? fs(nu) : function(t) {
  15626. return hn(t) && hi(t) == Gs
  15627. }
  15628. , ho = ru ? fs(ru) : function(t) {
  15629. return hn(t) && cn(t.length) && !!Va[M(t)]
  15630. }
  15631. , fo = ee(Y), po = ee(function(t, e) {
  15632. return t <= e
  15633. }), go = Ft(function(t, e) {
  15634. if (Oe(e) || rn(e))
  15635. Wt(e, Sn(e), t);
  15636. else
  15637. for (var n in e)
  15638. tr.call(e, n) && b(t, n, e[n])
  15639. }), mo = Ft(function(t, e) {
  15640. Wt(e, On(e), t)
  15641. }), vo = Ft(function(t, e, n, r) {
  15642. Wt(e, On(e), t, r)
  15643. }), yo = Ft(function(t, e, n, r) {
  15644. Wt(e, Sn(e), t, r)
  15645. }), bo = le(_), wo = at(function(t) {
  15646. return t.push(Ss, se),
  15647. zo(vo, Ss, t)
  15648. }), _o = at(function(t) {
  15649. return t.push(Ss, ae),
  15650. zo(Oo, Ss, t)
  15651. }), xo = Yt(function(t, e, n) {
  15652. t[e] = n
  15653. }, Pn(Nn)), Co = Yt(function(t, e, n) {
  15654. tr.call(t, e) ? t[e].push(n) : t[e] = [n]
  15655. }, ge), ko = at(B), So = Ft(function(t, e, n) {
  15656. Z(t, e, n)
  15657. }), Oo = Ft(function(t, e, n, r) {
  15658. Z(t, e, n, r)
  15659. }), Eo = le(function(e, t) {
  15660. var n = {};
  15661. if (null == e)
  15662. return n;
  15663. var r = !1;
  15664. t = Qo(t, function(t) {
  15665. return t = Tt(t, e),
  15666. r = r || 1 < t.length,
  15667. t
  15668. }),
  15669. Wt(e, fe(e), n),
  15670. r && (n = C(n, 7, ue));
  15671. for (var i = t.length; i--;)
  15672. wt(n, t[i]);
  15673. return n
  15674. }), To = le(function(t, e) {
  15675. return null == t ? {} : nt(n = t, e, function(t, e) {
  15676. return kn(n, e)
  15677. });
  15678. var n
  15679. }), Ao = ie(Sn), Io = ie(On), jo = zt(function(t, e, n) {
  15680. return e = e.toLowerCase(),
  15681. t + (n ? An(e) : e)
  15682. }), Po = zt(function(t, e, n) {
  15683. return t + (n ? "-" : "") + e.toLowerCase()
  15684. }), No = zt(function(t, e, n) {
  15685. return t + (n ? " " : "") + e.toLowerCase()
  15686. }), Do = qt("toLowerCase"), Ro = zt(function(t, e, n) {
  15687. return t + (n ? "_" : "") + e.toLowerCase()
  15688. }), Mo = zt(function(t, e, n) {
  15689. return t + (n ? " " : "") + Lo(e)
  15690. }), Wo = zt(function(t, e, n) {
  15691. return t + (n ? " " : "") + e.toUpperCase()
  15692. }), Lo = qt("toUpperCase"), Fo = at(function(t, e) {
  15693. try {
  15694. return zo(t, Ss, e)
  15695. } catch (t) {
  15696. return sn(t) ? t : new qn(t)
  15697. }
  15698. }), Kn = le(function(e, t) {
  15699. return Go(t, function(t) {
  15700. t = De(t),
  15701. f(e, t, Vi(e[t], e))
  15702. }),
  15703. e
  15704. }), Ho = $t(), ar = $t(!0), Bn = at(function(e, n) {
  15705. return function(t) {
  15706. return B(t, e, n)
  15707. }
  15708. }), e = at(function(e, n) {
  15709. return function(t) {
  15710. return B(e, t, n)
  15711. }
  15712. }), ur = Qt(Qo), Xr = Qt($o), br = Qt(es), Rr = te(), Wr = te(!0), Fr = Kt(function(t, e) {
  15713. return t + e
  15714. }, 0), Jn = re("ceil"), _r = Kt(function(t, e) {
  15715. return t / e
  15716. }, 1), ii = re("floor"), wr = Kt(function(t, e) {
  15717. return t * e
  15718. }, 1), oi = re("round"), Sr = Kt(function(t, e) {
  15719. return t - e
  15720. }, 0);
  15721. return d.after = function(t, e) {
  15722. if ("function" != typeof e)
  15723. throw new Xn(Os);
  15724. return t = yn(t),
  15725. function() {
  15726. if (--t < 1)
  15727. return e.apply(this, arguments)
  15728. }
  15729. }
  15730. ,
  15731. d.ary = Qe,
  15732. d.assign = go,
  15733. d.assignIn = mo,
  15734. d.assignInWith = vo,
  15735. d.assignWith = yo,
  15736. d.at = bo,
  15737. d.before = Je,
  15738. d.bind = Vi,
  15739. d.bindAll = Kn,
  15740. d.bindKey = $i,
  15741. d.castArray = function() {
  15742. if (!arguments.length)
  15743. return [];
  15744. var t = arguments[0];
  15745. return io(t) ? t : [t]
  15746. }
  15747. ,
  15748. d.chain = Ve,
  15749. d.chunk = function(t, e, n) {
  15750. e = (n ? Ce(t, e, n) : e === Ss) ? 1 : Ar(yn(e), 0);
  15751. var r = null == t ? 0 : t.length;
  15752. if (!r || e < 1)
  15753. return [];
  15754. for (var i = 0, o = 0, s = Hn(xr(r / e)); i < r;)
  15755. s[o++] = ft(t, i, i += e);
  15756. return s
  15757. }
  15758. ,
  15759. d.compact = function(t) {
  15760. for (var e = -1, n = null == t ? 0 : t.length, r = 0, i = []; ++e < n;) {
  15761. var o = t[e];
  15762. o && (i[r++] = o)
  15763. }
  15764. return i
  15765. }
  15766. ,
  15767. d.concat = function() {
  15768. var t = arguments.length;
  15769. if (!t)
  15770. return [];
  15771. for (var e = Hn(t - 1), n = arguments[0], r = t; r--;)
  15772. e[r - 1] = arguments[r];
  15773. return Jo(io(n) ? Mt(n) : [n], I(e, 1))
  15774. }
  15775. ,
  15776. d.cond = function(r) {
  15777. var i = null == r ? 0 : r.length
  15778. , e = ge();
  15779. return r = i ? Qo(r, function(t) {
  15780. if ("function" != typeof t[1])
  15781. throw new Xn(Os);
  15782. return [e(t[0]), t[1]]
  15783. }) : [],
  15784. at(function(t) {
  15785. for (var e = -1; ++e < i;) {
  15786. var n = r[e];
  15787. if (zo(n[0], this, t))
  15788. return zo(n[1], this, t)
  15789. }
  15790. })
  15791. }
  15792. ,
  15793. d.conforms = function(t) {
  15794. return e = C(t, 1),
  15795. n = Sn(e),
  15796. function(t) {
  15797. return k(t, e, n)
  15798. }
  15799. ;
  15800. var e, n
  15801. }
  15802. ,
  15803. d.constant = Pn,
  15804. d.countBy = Wi,
  15805. d.create = function(t, e) {
  15806. return t = Qr(t),
  15807. null == e ? t : w(t, e)
  15808. }
  15809. ,
  15810. d.curry = function t(e, n, r) {
  15811. n = oe(e, 8, Ss, Ss, Ss, Ss, Ss, n = r ? Ss : n);
  15812. return n.placeholder = t.placeholder,
  15813. n
  15814. }
  15815. ,
  15816. d.curryRight = function t(e, n, r) {
  15817. n = oe(e, 16, Ss, Ss, Ss, Ss, Ss, n = r ? Ss : n);
  15818. return n.placeholder = t.placeholder,
  15819. n
  15820. }
  15821. ,
  15822. d.debounce = Ze,
  15823. d.defaults = wo,
  15824. d.defaultsDeep = _o,
  15825. d.defer = Xi,
  15826. d.delay = Yi,
  15827. d.difference = bi,
  15828. d.differenceBy = wi,
  15829. d.differenceWith = _i,
  15830. d.drop = function(t, e, n) {
  15831. var r = null == t ? 0 : t.length;
  15832. return r ? ft(t, (e = n || e === Ss ? 1 : yn(e)) < 0 ? 0 : e, r) : []
  15833. }
  15834. ,
  15835. d.dropRight = function(t, e, n) {
  15836. var r = null == t ? 0 : t.length;
  15837. return r ? ft(t, 0, (e = r - (e = n || e === Ss ? 1 : yn(e))) < 0 ? 0 : e) : []
  15838. }
  15839. ,
  15840. d.dropRightWhile = function(t, e) {
  15841. return t && t.length ? xt(t, ge(e, 3), !0, !0) : []
  15842. }
  15843. ,
  15844. d.dropWhile = function(t, e) {
  15845. return t && t.length ? xt(t, ge(e, 3), !0) : []
  15846. }
  15847. ,
  15848. d.fill = function(t, e, n, r) {
  15849. var i = null == t ? 0 : t.length;
  15850. return i ? (n && "number" != typeof n && Ce(t, e, n) && (n = 0,
  15851. r = i),
  15852. function(t, e, n, r) {
  15853. var i = t.length;
  15854. for ((n = yn(n)) < 0 && (n = i < -n ? 0 : i + n),
  15855. (r = r === Ss || i < r ? i : yn(r)) < 0 && (r += i),
  15856. r = r < n ? 0 : bn(r); n < r;)
  15857. t[n++] = e;
  15858. return t
  15859. }(t, e, n, r)) : []
  15860. }
  15861. ,
  15862. d.filter = function(t, e) {
  15863. return (io(t) ? Xo : A)(t, ge(e, 3))
  15864. }
  15865. ,
  15866. d.flatMap = function(t, e) {
  15867. return I(Ke(t, e), 1)
  15868. }
  15869. ,
  15870. d.flatMapDeep = function(t, e) {
  15871. return I(Ke(t, e), 1 / 0)
  15872. }
  15873. ,
  15874. d.flatMapDepth = function(t, e, n) {
  15875. return n = n === Ss ? 1 : yn(n),
  15876. I(Ke(t, e), n)
  15877. }
  15878. ,
  15879. d.flatten = Fe,
  15880. d.flattenDeep = function(t) {
  15881. return (null == t ? 0 : t.length) ? I(t, 1 / 0) : []
  15882. }
  15883. ,
  15884. d.flattenDepth = function(t, e) {
  15885. return (null == t ? 0 : t.length) ? I(t, e = e === Ss ? 1 : yn(e)) : []
  15886. }
  15887. ,
  15888. d.flip = function(t) {
  15889. return oe(t, 512)
  15890. }
  15891. ,
  15892. d.flow = Ho,
  15893. d.flowRight = ar,
  15894. d.fromPairs = function(t) {
  15895. for (var e = -1, n = null == t ? 0 : t.length, r = {}; ++e < n;) {
  15896. var i = t[e];
  15897. r[i[0]] = i[1]
  15898. }
  15899. return r
  15900. }
  15901. ,
  15902. d.functions = function(t) {
  15903. return null == t ? [] : N(t, Sn(t))
  15904. }
  15905. ,
  15906. d.functionsIn = function(t) {
  15907. return null == t ? [] : N(t, On(t))
  15908. }
  15909. ,
  15910. d.groupBy = Hi,
  15911. d.initial = function(t) {
  15912. return (null == t ? 0 : t.length) ? ft(t, 0, -1) : []
  15913. }
  15914. ,
  15915. d.intersection = xi,
  15916. d.intersectionBy = Ci,
  15917. d.intersectionWith = ki,
  15918. d.invert = xo,
  15919. d.invertBy = Co,
  15920. d.invokeMap = Bi,
  15921. d.iteratee = Dn,
  15922. d.keyBy = qi,
  15923. d.keys = Sn,
  15924. d.keysIn = On,
  15925. d.map = Ke,
  15926. d.mapKeys = function(t, r) {
  15927. var i = {};
  15928. return r = ge(r, 3),
  15929. j(t, function(t, e, n) {
  15930. f(i, r(t, e, n), t)
  15931. }),
  15932. i
  15933. }
  15934. ,
  15935. d.mapValues = function(t, r) {
  15936. var i = {};
  15937. return r = ge(r, 3),
  15938. j(t, function(t, e, n) {
  15939. f(i, e, r(t, e, n))
  15940. }),
  15941. i
  15942. }
  15943. ,
  15944. d.matches = function(t) {
  15945. return Q(C(t, 1))
  15946. }
  15947. ,
  15948. d.matchesProperty = function(t, e) {
  15949. return J(t, C(e, 1))
  15950. }
  15951. ,
  15952. d.memoize = tn,
  15953. d.merge = So,
  15954. d.mergeWith = Oo,
  15955. d.method = Bn,
  15956. d.methodOf = e,
  15957. d.mixin = Rn,
  15958. d.negate = en,
  15959. d.nthArg = function(e) {
  15960. return e = yn(e),
  15961. at(function(t) {
  15962. return tt(t, e)
  15963. })
  15964. }
  15965. ,
  15966. d.omit = Eo,
  15967. d.omitBy = function(t, e) {
  15968. return En(t, en(ge(e)))
  15969. }
  15970. ,
  15971. d.once = function(t) {
  15972. return Je(2, t)
  15973. }
  15974. ,
  15975. d.orderBy = function(t, e, n, r) {
  15976. return null == t ? [] : (io(e) || (e = null == e ? [] : [e]),
  15977. io(n = r ? Ss : n) || (n = null == n ? [] : [n]),
  15978. et(t, e, n))
  15979. }
  15980. ,
  15981. d.over = ur,
  15982. d.overArgs = Qi,
  15983. d.overEvery = Xr,
  15984. d.overSome = br,
  15985. d.partial = Ji,
  15986. d.partialRight = Zi,
  15987. d.partition = zi,
  15988. d.pick = To,
  15989. d.pickBy = En,
  15990. d.property = Wn,
  15991. d.propertyOf = function(e) {
  15992. return function(t) {
  15993. return null == e ? Ss : D(e, t)
  15994. }
  15995. }
  15996. ,
  15997. d.pull = Si,
  15998. d.pullAll = qe,
  15999. d.pullAllBy = function(t, e, n) {
  16000. return t && t.length && e && e.length ? rt(t, e, ge(n, 2)) : t
  16001. }
  16002. ,
  16003. d.pullAllWith = function(t, e, n) {
  16004. return t && t.length && e && e.length ? rt(t, e, Ss, n) : t
  16005. }
  16006. ,
  16007. d.pullAt = Oi,
  16008. d.range = Rr,
  16009. d.rangeRight = Wr,
  16010. d.rearg = to,
  16011. d.reject = function(t, e) {
  16012. return (io(t) ? Xo : A)(t, en(ge(e, 3)))
  16013. }
  16014. ,
  16015. d.remove = function(t, e) {
  16016. var n = [];
  16017. if (!t || !t.length)
  16018. return n;
  16019. var r = -1
  16020. , i = []
  16021. , o = t.length;
  16022. for (e = ge(e, 3); ++r < o;) {
  16023. var s = t[r];
  16024. e(s, r, t) && (n.push(s),
  16025. i.push(r))
  16026. }
  16027. return it(t, i),
  16028. n
  16029. }
  16030. ,
  16031. d.rest = function(t, e) {
  16032. if ("function" != typeof t)
  16033. throw new Xn(Os);
  16034. return at(t, e = e === Ss ? e : yn(e))
  16035. }
  16036. ,
  16037. d.reverse = ze,
  16038. d.sampleSize = function(t, e, n) {
  16039. return e = (n ? Ce(t, e, n) : e === Ss) ? 1 : yn(e),
  16040. (io(t) ? u : ct)(t, e)
  16041. }
  16042. ,
  16043. d.set = function(t, e, n) {
  16044. return null == t ? t : lt(t, e, n)
  16045. }
  16046. ,
  16047. d.setWith = function(t, e, n, r) {
  16048. return r = "function" == typeof r ? r : Ss,
  16049. null == t ? t : lt(t, e, n, r)
  16050. }
  16051. ,
  16052. d.shuffle = function(t) {
  16053. return (io(t) ? c : ht)(t)
  16054. }
  16055. ,
  16056. d.slice = function(t, e, n) {
  16057. var r = null == t ? 0 : t.length;
  16058. return r ? (n = n && "number" != typeof n && Ce(t, e, n) ? (e = 0,
  16059. r) : (e = null == e ? 0 : yn(e),
  16060. n === Ss ? r : yn(n)),
  16061. ft(t, e, n)) : []
  16062. }
  16063. ,
  16064. d.sortBy = Ui,
  16065. d.sortedUniq = function(t) {
  16066. return t && t.length ? mt(t) : []
  16067. }
  16068. ,
  16069. d.sortedUniqBy = function(t, e) {
  16070. return t && t.length ? mt(t, ge(e, 2)) : []
  16071. }
  16072. ,
  16073. d.split = function(t, e, n) {
  16074. return n && "number" != typeof n && Ce(t, e, n) && (e = n = Ss),
  16075. (n = n === Ss ? js : n >>> 0) ? (t = xn(t)) && ("string" == typeof e || null != e && !co(e)) && (!(e = yt(e)) && ys(t)) ? At(ks(t), 0, n) : t.split(e, n) : []
  16076. }
  16077. ,
  16078. d.spread = function(n, r) {
  16079. if ("function" != typeof n)
  16080. throw new Xn(Os);
  16081. return r = null == r ? 0 : Ar(yn(r), 0),
  16082. at(function(t) {
  16083. var e = t[r]
  16084. , t = At(t, 0, r);
  16085. return e && Jo(t, e),
  16086. zo(n, this, t)
  16087. })
  16088. }
  16089. ,
  16090. d.tail = function(t) {
  16091. var e = null == t ? 0 : t.length;
  16092. return e ? ft(t, 1, e) : []
  16093. }
  16094. ,
  16095. d.take = function(t, e, n) {
  16096. return t && t.length ? ft(t, 0, (e = n || e === Ss ? 1 : yn(e)) < 0 ? 0 : e) : []
  16097. }
  16098. ,
  16099. d.takeRight = function(t, e, n) {
  16100. var r = null == t ? 0 : t.length;
  16101. return r ? ft(t, (e = r - (e = n || e === Ss ? 1 : yn(e))) < 0 ? 0 : e, r) : []
  16102. }
  16103. ,
  16104. d.takeRightWhile = function(t, e) {
  16105. return t && t.length ? xt(t, ge(e, 3), !1, !0) : []
  16106. }
  16107. ,
  16108. d.takeWhile = function(t, e) {
  16109. return t && t.length ? xt(t, ge(e, 3)) : []
  16110. }
  16111. ,
  16112. d.tap = function(t, e) {
  16113. return e(t),
  16114. t
  16115. }
  16116. ,
  16117. d.throttle = function(t, e, n) {
  16118. var r = !0
  16119. , i = !0;
  16120. if ("function" != typeof t)
  16121. throw new Xn(Os);
  16122. return ln(n) && (r = "leading" in n ? !!n.leading : r,
  16123. i = "trailing" in n ? !!n.trailing : i),
  16124. Ze(t, e, {
  16125. leading: r,
  16126. maxWait: e,
  16127. trailing: i
  16128. })
  16129. }
  16130. ,
  16131. d.thru = $e,
  16132. d.toArray = mn,
  16133. d.toPairs = Ao,
  16134. d.toPairsIn = Io,
  16135. d.toPath = function(t) {
  16136. return io(t) ? Qo(t, De) : gn(t) ? [t] : Mt(yi(xn(t)))
  16137. }
  16138. ,
  16139. d.toPlainObject = _n,
  16140. d.transform = function(t, r, i) {
  16141. var e, n = io(t), o = n || so(t) || ho(t);
  16142. return r = ge(r, 4),
  16143. null == i && (e = t && t.constructor,
  16144. i = o ? n ? new e : [] : ln(t) && an(e) ? Qr(hr(t)) : {}),
  16145. (o ? Go : j)(t, function(t, e, n) {
  16146. return r(i, t, e, n)
  16147. }),
  16148. i
  16149. }
  16150. ,
  16151. d.unary = function(t) {
  16152. return Qe(t, 1)
  16153. }
  16154. ,
  16155. d.union = Ei,
  16156. d.unionBy = Ti,
  16157. d.unionWith = Ai,
  16158. d.uniq = function(t) {
  16159. return t && t.length ? bt(t) : []
  16160. }
  16161. ,
  16162. d.uniqBy = function(t, e) {
  16163. return t && t.length ? bt(t, ge(e, 2)) : []
  16164. }
  16165. ,
  16166. d.uniqWith = function(t, e) {
  16167. return e = "function" == typeof e ? e : Ss,
  16168. t && t.length ? bt(t, Ss, e) : []
  16169. }
  16170. ,
  16171. d.unset = function(t, e) {
  16172. return null == t || wt(t, e)
  16173. }
  16174. ,
  16175. d.unzip = Ue,
  16176. d.unzipWith = Ge,
  16177. d.update = function(t, e, n) {
  16178. return null == t ? t : _t(t, e, Et(n))
  16179. }
  16180. ,
  16181. d.updateWith = function(t, e, n, r) {
  16182. return r = "function" == typeof r ? r : Ss,
  16183. null == t ? t : _t(t, e, Et(n), r)
  16184. }
  16185. ,
  16186. d.values = Tn,
  16187. d.valuesIn = function(t) {
  16188. return null == t ? [] : ps(t, On(t))
  16189. }
  16190. ,
  16191. d.without = Ii,
  16192. d.words = jn,
  16193. d.wrap = function(t, e) {
  16194. return Ji(Et(e), t)
  16195. }
  16196. ,
  16197. d.xor = ji,
  16198. d.xorBy = Pi,
  16199. d.xorWith = Ni,
  16200. d.zip = Di,
  16201. d.zipObject = function(t, e) {
  16202. return St(t || [], e || [], b)
  16203. }
  16204. ,
  16205. d.zipObjectDeep = function(t, e) {
  16206. return St(t || [], e || [], lt)
  16207. }
  16208. ,
  16209. d.zipWith = Ri,
  16210. d.entries = Ao,
  16211. d.entriesIn = Io,
  16212. d.extend = mo,
  16213. d.extendWith = vo,
  16214. Rn(d, d),
  16215. d.add = Fr,
  16216. d.attempt = Fo,
  16217. d.camelCase = jo,
  16218. d.capitalize = An,
  16219. d.ceil = Jn,
  16220. d.clamp = function(t, e, n) {
  16221. return n === Ss && (n = e,
  16222. e = Ss),
  16223. n !== Ss && (n = (n = wn(n)) == n ? n : 0),
  16224. e !== Ss && (e = (e = wn(e)) == e ? e : 0),
  16225. x(wn(t), e, n)
  16226. }
  16227. ,
  16228. d.clone = function(t) {
  16229. return C(t, 4)
  16230. }
  16231. ,
  16232. d.cloneDeep = function(t) {
  16233. return C(t, 5)
  16234. }
  16235. ,
  16236. d.cloneDeepWith = function(t, e) {
  16237. return C(t, 5, e = "function" == typeof e ? e : Ss)
  16238. }
  16239. ,
  16240. d.cloneWith = function(t, e) {
  16241. return C(t, 4, e = "function" == typeof e ? e : Ss)
  16242. }
  16243. ,
  16244. d.conformsTo = function(t, e) {
  16245. return null == e || k(t, e, Sn(e))
  16246. }
  16247. ,
  16248. d.deburr = In,
  16249. d.defaultTo = function(t, e) {
  16250. return null == t || t != t ? e : t
  16251. }
  16252. ,
  16253. d.divide = _r,
  16254. d.endsWith = function(t, e, n) {
  16255. t = xn(t),
  16256. e = yt(e);
  16257. var r = t.length
  16258. , r = n = n === Ss ? r : x(yn(n), 0, r);
  16259. return 0 <= (n -= e.length) && t.slice(n, r) == e
  16260. }
  16261. ,
  16262. d.eq = nn,
  16263. d.escape = function(t) {
  16264. return (t = xn(t)) && fa.test(t) ? t.replace(la, ou) : t
  16265. }
  16266. ,
  16267. d.escapeRegExp = function(t) {
  16268. return (t = xn(t)) && _a.test(t) ? t.replace(wa, "\\$&") : t
  16269. }
  16270. ,
  16271. d.every = function(t, e, n) {
  16272. var r = io(t) ? $o : E;
  16273. return n && Ce(t, e, n) && (e = Ss),
  16274. r(t, ge(e, 3))
  16275. }
  16276. ,
  16277. d.find = Li,
  16278. d.findIndex = We,
  16279. d.findKey = function(t, e) {
  16280. return ns(t, ge(e, 3), j)
  16281. }
  16282. ,
  16283. d.findLast = Fi,
  16284. d.findLastIndex = Le,
  16285. d.findLastKey = function(t, e) {
  16286. return ns(t, ge(e, 3), P)
  16287. }
  16288. ,
  16289. d.floor = ii,
  16290. d.forEach = Xe,
  16291. d.forEachRight = Ye,
  16292. d.forIn = function(t, e) {
  16293. return null == t ? t : ei(t, ge(e, 3), On)
  16294. }
  16295. ,
  16296. d.forInRight = function(t, e) {
  16297. return null == t ? t : ni(t, ge(e, 3), On)
  16298. }
  16299. ,
  16300. d.forOwn = function(t, e) {
  16301. return t && j(t, ge(e, 3))
  16302. }
  16303. ,
  16304. d.forOwnRight = function(t, e) {
  16305. return t && P(t, ge(e, 3))
  16306. }
  16307. ,
  16308. d.get = Cn,
  16309. d.gt = eo,
  16310. d.gte = no,
  16311. d.has = function(t, e) {
  16312. return null != t && be(t, e, L)
  16313. }
  16314. ,
  16315. d.hasIn = kn,
  16316. d.head = He,
  16317. d.identity = Nn,
  16318. d.includes = function(t, e, n, r) {
  16319. return t = rn(t) ? t : Tn(t),
  16320. n = n && !r ? yn(n) : 0,
  16321. r = t.length,
  16322. n < 0 && (n = Ar(r + n, 0)),
  16323. dn(t) ? n <= r && -1 < t.indexOf(e, n) : !!r && -1 < is(t, e, n)
  16324. }
  16325. ,
  16326. d.indexOf = function(t, e, n) {
  16327. var r = null == t ? 0 : t.length;
  16328. return r ? ((n = null == n ? 0 : yn(n)) < 0 && (n = Ar(r + n, 0)),
  16329. is(t, e, n)) : -1
  16330. }
  16331. ,
  16332. d.inRange = function(t, e, n) {
  16333. return e = vn(e),
  16334. n === Ss ? (n = e,
  16335. e = 0) : n = vn(n),
  16336. (t = t = wn(t)) >= Ir(e = e, n = n) && t < Ar(e, n)
  16337. }
  16338. ,
  16339. d.invoke = ko,
  16340. d.isArguments = ro,
  16341. d.isArray = io,
  16342. d.isArrayBuffer = oo,
  16343. d.isArrayLike = rn,
  16344. d.isArrayLikeObject = on,
  16345. d.isBoolean = function(t) {
  16346. return !0 === t || !1 === t || hn(t) && M(t) == Rs
  16347. }
  16348. ,
  16349. d.isBuffer = so,
  16350. d.isDate = ao,
  16351. d.isElement = function(t) {
  16352. return hn(t) && 1 === t.nodeType && !pn(t)
  16353. }
  16354. ,
  16355. d.isEmpty = function(t) {
  16356. if (null == t)
  16357. return !0;
  16358. if (rn(t) && (io(t) || "string" == typeof t || "function" == typeof t.splice || so(t) || ho(t) || ro(t)))
  16359. return !t.length;
  16360. var e, n = hi(t);
  16361. if (n == Hs || n == Gs)
  16362. return !t.size;
  16363. if (Oe(t))
  16364. return !$(t).length;
  16365. for (e in t)
  16366. if (tr.call(t, e))
  16367. return !1;
  16368. return !0
  16369. }
  16370. ,
  16371. d.isEqual = function(t, e) {
  16372. return z(t, e)
  16373. }
  16374. ,
  16375. d.isEqualWith = function(t, e, n) {
  16376. var r = (n = "function" == typeof n ? n : Ss) ? n(t, e) : Ss;
  16377. return r === Ss ? z(t, e, Ss, n) : !!r
  16378. }
  16379. ,
  16380. d.isError = sn,
  16381. d.isFinite = function(t) {
  16382. return "number" == typeof t && Or(t)
  16383. }
  16384. ,
  16385. d.isFunction = an,
  16386. d.isInteger = un,
  16387. d.isLength = cn,
  16388. d.isMap = uo,
  16389. d.isMatch = function(t, e) {
  16390. return t === e || U(t, e, ve(e))
  16391. }
  16392. ,
  16393. d.isMatchWith = function(t, e, n) {
  16394. return n = "function" == typeof n ? n : Ss,
  16395. U(t, e, ve(e), n)
  16396. }
  16397. ,
  16398. d.isNaN = function(t) {
  16399. return fn(t) && t != +t
  16400. }
  16401. ,
  16402. d.isNative = function(t) {
  16403. if (di(t))
  16404. throw new qn("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  16405. return G(t)
  16406. }
  16407. ,
  16408. d.isNil = function(t) {
  16409. return null == t
  16410. }
  16411. ,
  16412. d.isNull = function(t) {
  16413. return null === t
  16414. }
  16415. ,
  16416. d.isNumber = fn,
  16417. d.isObject = ln,
  16418. d.isObjectLike = hn,
  16419. d.isPlainObject = pn,
  16420. d.isRegExp = co,
  16421. d.isSafeInteger = function(t) {
  16422. return un(t) && -As <= t && t <= As
  16423. }
  16424. ,
  16425. d.isSet = lo,
  16426. d.isString = dn,
  16427. d.isSymbol = gn,
  16428. d.isTypedArray = ho,
  16429. d.isUndefined = function(t) {
  16430. return t === Ss
  16431. }
  16432. ,
  16433. d.isWeakMap = function(t) {
  16434. return hn(t) && hi(t) == Xs
  16435. }
  16436. ,
  16437. d.isWeakSet = function(t) {
  16438. return hn(t) && "[object WeakSet]" == M(t)
  16439. }
  16440. ,
  16441. d.join = function(t, e) {
  16442. return null == t ? "" : Er.call(t, e)
  16443. }
  16444. ,
  16445. d.kebabCase = Po,
  16446. d.last = Be,
  16447. d.lastIndexOf = function(t, e, n) {
  16448. var r = null == t ? 0 : t.length;
  16449. if (!r)
  16450. return -1;
  16451. var i = r;
  16452. return n !== Ss && (i = (i = yn(n)) < 0 ? Ar(r + i, 0) : Ir(i, r - 1)),
  16453. e == e ? function(t, e, n) {
  16454. for (var r = n + 1; r--;)
  16455. if (t[r] === e)
  16456. return r;
  16457. return r
  16458. }(t, e, i) : rs(t, ss, i, !0)
  16459. }
  16460. ,
  16461. d.lowerCase = No,
  16462. d.lowerFirst = Do,
  16463. d.lt = fo,
  16464. d.lte = po,
  16465. d.max = function(t) {
  16466. return t && t.length ? T(t, Nn, W) : Ss
  16467. }
  16468. ,
  16469. d.maxBy = function(t, e) {
  16470. return t && t.length ? T(t, ge(e, 2), W) : Ss
  16471. }
  16472. ,
  16473. d.mean = function(t) {
  16474. return as(t, Nn)
  16475. }
  16476. ,
  16477. d.meanBy = function(t, e) {
  16478. return as(t, ge(e, 2))
  16479. }
  16480. ,
  16481. d.min = function(t) {
  16482. return t && t.length ? T(t, Nn, Y) : Ss
  16483. }
  16484. ,
  16485. d.minBy = function(t, e) {
  16486. return t && t.length ? T(t, ge(e, 2), Y) : Ss
  16487. }
  16488. ,
  16489. d.stubArray = Ln,
  16490. d.stubFalse = Fn,
  16491. d.stubObject = function() {
  16492. return {}
  16493. }
  16494. ,
  16495. d.stubString = function() {
  16496. return ""
  16497. }
  16498. ,
  16499. d.stubTrue = function() {
  16500. return !0
  16501. }
  16502. ,
  16503. d.multiply = wr,
  16504. d.nth = function(t, e) {
  16505. return t && t.length ? tt(t, yn(e)) : Ss
  16506. }
  16507. ,
  16508. d.noConflict = function() {
  16509. return Ka._ === this && (Ka._ = or),
  16510. this
  16511. }
  16512. ,
  16513. d.noop = Mn,
  16514. d.now = Gi,
  16515. d.pad = function(t, e, n) {
  16516. t = xn(t);
  16517. var r = (e = yn(e)) ? Cs(t) : 0;
  16518. return !e || e <= r ? t : Jt(Cr(r = (e - r) / 2), n) + t + Jt(xr(r), n)
  16519. }
  16520. ,
  16521. d.padEnd = function(t, e, n) {
  16522. t = xn(t);
  16523. var r = (e = yn(e)) ? Cs(t) : 0;
  16524. return e && r < e ? t + Jt(e - r, n) : t
  16525. }
  16526. ,
  16527. d.padStart = function(t, e, n) {
  16528. t = xn(t);
  16529. var r = (e = yn(e)) ? Cs(t) : 0;
  16530. return e && r < e ? Jt(e - r, n) + t : t
  16531. }
  16532. ,
  16533. d.parseInt = function(t, e, n) {
  16534. return e = n || null == e ? 0 : e && +e,
  16535. Pr(xn(t).replace(Ca, ""), e || 0)
  16536. }
  16537. ,
  16538. d.random = function(t, e, n) {
  16539. var r;
  16540. if (n && "boolean" != typeof n && Ce(t, e, n) && (e = n = Ss),
  16541. n === Ss && ("boolean" == typeof e ? (n = e,
  16542. e = Ss) : "boolean" == typeof t && (n = t,
  16543. t = Ss)),
  16544. t === Ss && e === Ss ? (t = 0,
  16545. e = 1) : (t = vn(t),
  16546. e === Ss ? (e = t,
  16547. t = 0) : e = vn(e)),
  16548. e < t && (r = t,
  16549. t = e,
  16550. e = r),
  16551. n || t % 1 || e % 1) {
  16552. n = Nr();
  16553. return Ir(t + n * (e - t + Xa("1e-" + ((n + "").length - 1))), e)
  16554. }
  16555. return ot(t, e)
  16556. }
  16557. ,
  16558. d.reduce = function(t, e, n) {
  16559. var r = io(t) ? Zo : cs
  16560. , i = arguments.length < 3;
  16561. return r(t, ge(e, 4), n, i, Zr)
  16562. }
  16563. ,
  16564. d.reduceRight = function(t, e, n) {
  16565. var r = io(t) ? ts : cs
  16566. , i = arguments.length < 3;
  16567. return r(t, ge(e, 4), n, i, ti)
  16568. }
  16569. ,
  16570. d.repeat = function(t, e, n) {
  16571. return e = (n ? Ce(t, e, n) : e === Ss) ? 1 : yn(e),
  16572. st(xn(t), e)
  16573. }
  16574. ,
  16575. d.replace = function() {
  16576. var t = arguments
  16577. , e = xn(t[0]);
  16578. return t.length < 3 ? e : e.replace(t[1], t[2])
  16579. }
  16580. ,
  16581. d.result = function(t, e, n) {
  16582. var r = -1
  16583. , i = (e = Tt(e, t)).length;
  16584. for (i || (i = 1,
  16585. t = Ss); ++r < i;) {
  16586. var o = null == t ? Ss : t[De(e[r])];
  16587. o === Ss && (r = i,
  16588. o = n),
  16589. t = an(o) ? o.call(t) : o
  16590. }
  16591. return t
  16592. }
  16593. ,
  16594. d.round = oi,
  16595. d.runInContext = t,
  16596. d.sample = function(t) {
  16597. return (io(t) ? a : ut)(t)
  16598. }
  16599. ,
  16600. d.size = function(t) {
  16601. if (null == t)
  16602. return 0;
  16603. if (rn(t))
  16604. return dn(t) ? Cs(t) : t.length;
  16605. var e = hi(t);
  16606. return e == Hs || e == Gs ? t.size : $(t).length
  16607. }
  16608. ,
  16609. d.snakeCase = Ro,
  16610. d.some = function(t, e, n) {
  16611. var r = io(t) ? es : pt;
  16612. return n && Ce(t, e, n) && (e = Ss),
  16613. r(t, ge(e, 3))
  16614. }
  16615. ,
  16616. d.sortedIndex = function(t, e) {
  16617. return dt(t, e)
  16618. }
  16619. ,
  16620. d.sortedIndexBy = function(t, e, n) {
  16621. return gt(t, e, ge(n, 2))
  16622. }
  16623. ,
  16624. d.sortedIndexOf = function(t, e) {
  16625. var n = null == t ? 0 : t.length;
  16626. if (n) {
  16627. var r = dt(t, e);
  16628. if (r < n && nn(t[r], e))
  16629. return r
  16630. }
  16631. return -1
  16632. }
  16633. ,
  16634. d.sortedLastIndex = function(t, e) {
  16635. return dt(t, e, !0)
  16636. }
  16637. ,
  16638. d.sortedLastIndexBy = function(t, e, n) {
  16639. return gt(t, e, ge(n, 2), !0)
  16640. }
  16641. ,
  16642. d.sortedLastIndexOf = function(t, e) {
  16643. if (null == t ? 0 : t.length) {
  16644. var n = dt(t, e, !0) - 1;
  16645. if (nn(t[n], e))
  16646. return n
  16647. }
  16648. return -1
  16649. }
  16650. ,
  16651. d.startCase = Mo,
  16652. d.startsWith = function(t, e, n) {
  16653. return t = xn(t),
  16654. n = null == n ? 0 : x(yn(n), 0, t.length),
  16655. e = yt(e),
  16656. t.slice(n, n + e.length) == e
  16657. }
  16658. ,
  16659. d.subtract = Sr,
  16660. d.sum = function(t) {
  16661. return t && t.length ? ls(t, Nn) : 0
  16662. }
  16663. ,
  16664. d.sumBy = function(t, e) {
  16665. return t && t.length ? ls(t, ge(e, 2)) : 0
  16666. }
  16667. ,
  16668. d.template = function(s, t, e) {
  16669. var n = d.templateSettings;
  16670. e && Ce(s, t, e) && (t = Ss),
  16671. s = xn(s),
  16672. t = vo({}, t, n, se);
  16673. var a, u, r = Sn(n = vo({}, t.imports, n.imports, se)), i = ps(n, r), c = 0, n = t.interpolate || La, l = "__p += '", n = Vn((t.escape || La).source + "|" + n.source + "|" + (n === ga ? Ia : La).source + "|" + (t.evaluate || La).source + "|$", "g"), o = "//# sourceURL=" + ("sourceURL" in t ? t.sourceURL : "lodash.templateSources[" + ++Ga + "]") + "\n";
  16674. if (s.replace(n, function(t, e, n, r, i, o) {
  16675. return n = n || r,
  16676. l += s.slice(c, o).replace(Fa, vs),
  16677. e && (a = !0,
  16678. l += "' +\n__e(" + e + ") +\n'"),
  16679. i && (u = !0,
  16680. l += "';\n" + i + ";\n__p += '"),
  16681. n && (l += "' +\n((__t = (" + n + ")) == null ? '' : __t) +\n'"),
  16682. c = o + t.length,
  16683. t
  16684. }),
  16685. l += "';\n",
  16686. (t = t.variable) || (l = "with (obj) {\n" + l + "\n}\n"),
  16687. l = (u ? l.replace(sa, "") : l).replace(aa, "$1").replace(ua, "$1;"),
  16688. l = "function(" + (t || "obj") + ") {\n" + (t ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (a ? ", __e = _.escape" : "") + (u ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + l + "return __p\n}",
  16689. (t = Fo(function() {
  16690. return zn(r, o + "return " + l).apply(Ss, i)
  16691. })).source = l,
  16692. sn(t))
  16693. throw t;
  16694. return t
  16695. }
  16696. ,
  16697. d.times = function(t, e) {
  16698. if ((t = yn(t)) < 1 || As < t)
  16699. return [];
  16700. var n = js
  16701. , r = Ir(t, js);
  16702. for (e = ge(e),
  16703. t -= js,
  16704. r = hs(r, e); ++n < t;)
  16705. e(n);
  16706. return r
  16707. }
  16708. ,
  16709. d.toFinite = vn,
  16710. d.toInteger = yn,
  16711. d.toLength = bn,
  16712. d.toLower = function(t) {
  16713. return xn(t).toLowerCase()
  16714. }
  16715. ,
  16716. d.toNumber = wn,
  16717. d.toSafeInteger = function(t) {
  16718. return t ? x(yn(t), -As, As) : 0 === t ? t : 0
  16719. }
  16720. ,
  16721. d.toString = xn,
  16722. d.toUpper = function(t) {
  16723. return xn(t).toUpperCase()
  16724. }
  16725. ,
  16726. d.trim = function(t, e, n) {
  16727. return (t = xn(t)) && (n || e === Ss) ? t.replace(xa, "") : t && (e = yt(e)) ? (t = ks(t),
  16728. e = ks(e),
  16729. At(t, gs(t, e), ms(t, e) + 1).join("")) : t
  16730. }
  16731. ,
  16732. d.trimEnd = function(t, e, n) {
  16733. return (t = xn(t)) && (n || e === Ss) ? t.replace(ka, "") : t && (e = yt(e)) ? At(t = ks(t), 0, ms(t, ks(e)) + 1).join("") : t
  16734. }
  16735. ,
  16736. d.trimStart = function(t, e, n) {
  16737. return (t = xn(t)) && (n || e === Ss) ? t.replace(Ca, "") : t && (e = yt(e)) ? At(t = ks(t), gs(t, ks(e))).join("") : t
  16738. }
  16739. ,
  16740. d.truncate = function(t, e) {
  16741. var n, r = 30, i = "...";
  16742. ln(e) && (n = "separator" in e ? e.separator : n,
  16743. r = "length" in e ? yn(e.length) : r,
  16744. i = "omission" in e ? yt(e.omission) : i);
  16745. var o, e = (t = xn(t)).length;
  16746. if (ys(t) && (e = (o = ks(t)).length),
  16747. e <= r)
  16748. return t;
  16749. if ((e = r - Cs(i)) < 1)
  16750. return i;
  16751. if (r = o ? At(o, 0, e).join("") : t.slice(0, e),
  16752. n === Ss)
  16753. return r + i;
  16754. if (o && (e += r.length - e),
  16755. co(n)) {
  16756. if (t.slice(e).search(n)) {
  16757. var s, a = r;
  16758. for (n.global || (n = Vn(n.source, xn(ja.exec(n)) + "g")),
  16759. n.lastIndex = 0; s = n.exec(a);)
  16760. var u = s.index;
  16761. r = r.slice(0, u === Ss ? e : u)
  16762. }
  16763. } else
  16764. t.indexOf(yt(n), e) == e || -1 < (e = r.lastIndexOf(n)) && (r = r.slice(0, e));
  16765. return r + i
  16766. }
  16767. ,
  16768. d.unescape = function(t) {
  16769. return (t = xn(t)) && ha.test(t) ? t.replace(ca, su) : t
  16770. }
  16771. ,
  16772. d.uniqueId = function(t) {
  16773. var e = ++er;
  16774. return xn(t) + e
  16775. }
  16776. ,
  16777. d.upperCase = Wo,
  16778. d.upperFirst = Lo,
  16779. d.each = Xe,
  16780. d.eachRight = Ye,
  16781. d.first = He,
  16782. Rn(d, (Ki = {},
  16783. j(d, function(t, e) {
  16784. tr.call(d.prototype, e) || (Ki[e] = t)
  16785. }),
  16786. Ki), {
  16787. chain: !1
  16788. }),
  16789. d.VERSION = "4.17.4",
  16790. Go(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(t) {
  16791. d[t].placeholder = d
  16792. }),
  16793. Go(["drop", "take"], function(n, r) {
  16794. m.prototype[n] = function(t) {
  16795. t = t === Ss ? 1 : Ar(yn(t), 0);
  16796. var e = this.__filtered__ && !r ? new m(this) : this.clone();
  16797. return e.__filtered__ ? e.__takeCount__ = Ir(t, e.__takeCount__) : e.__views__.push({
  16798. size: Ir(t, js),
  16799. type: n + (e.__dir__ < 0 ? "Right" : "")
  16800. }),
  16801. e
  16802. }
  16803. ,
  16804. m.prototype[n + "Right"] = function(t) {
  16805. return this.reverse()[n](t).reverse()
  16806. }
  16807. }),
  16808. Go(["filter", "map", "takeWhile"], function(t, e) {
  16809. var n = e + 1
  16810. , r = 1 == n || 3 == n;
  16811. m.prototype[t] = function(t) {
  16812. var e = this.clone();
  16813. return e.__iteratees__.push({
  16814. iteratee: ge(t, 3),
  16815. type: n
  16816. }),
  16817. e.__filtered__ = e.__filtered__ || r,
  16818. e
  16819. }
  16820. }),
  16821. Go(["head", "last"], function(t, e) {
  16822. var n = "take" + (e ? "Right" : "");
  16823. m.prototype[t] = function() {
  16824. return this[n](1).value()[0]
  16825. }
  16826. }),
  16827. Go(["initial", "tail"], function(t, e) {
  16828. var n = "drop" + (e ? "" : "Right");
  16829. m.prototype[t] = function() {
  16830. return this.__filtered__ ? new m(this) : this[n](1)
  16831. }
  16832. }),
  16833. m.prototype.compact = function() {
  16834. return this.filter(Nn)
  16835. }
  16836. ,
  16837. m.prototype.find = function(t) {
  16838. return this.filter(t).head()
  16839. }
  16840. ,
  16841. m.prototype.findLast = function(t) {
  16842. return this.reverse().find(t)
  16843. }
  16844. ,
  16845. m.prototype.invokeMap = at(function(e, n) {
  16846. return "function" == typeof e ? new m(this) : this.map(function(t) {
  16847. return B(t, e, n)
  16848. })
  16849. }),
  16850. m.prototype.reject = function(t) {
  16851. return this.filter(en(ge(t)))
  16852. }
  16853. ,
  16854. m.prototype.slice = function(t, e) {
  16855. t = yn(t);
  16856. var n = this;
  16857. return n.__filtered__ && (0 < t || e < 0) ? new m(n) : (t < 0 ? n = n.takeRight(-t) : t && (n = n.drop(t)),
  16858. e !== Ss && (n = (e = yn(e)) < 0 ? n.dropRight(-e) : n.take(e - t)),
  16859. n)
  16860. }
  16861. ,
  16862. m.prototype.takeRightWhile = function(t) {
  16863. return this.reverse().takeWhile(t).reverse()
  16864. }
  16865. ,
  16866. m.prototype.toArray = function() {
  16867. return this.take(js)
  16868. }
  16869. ,
  16870. j(m.prototype, function(c, t) {
  16871. var l = /^(?:filter|find|map|reject)|While$/.test(t)
  16872. , h = /^(?:head|last)$/.test(t)
  16873. , f = d[h ? "take" + ("last" == t ? "Right" : "") : t]
  16874. , p = h || /^find/.test(t);
  16875. f && (d.prototype[t] = function() {
  16876. function t(t) {
  16877. return t = f.apply(d, Jo([t], n)),
  16878. h && s ? t[0] : t
  16879. }
  16880. var e = this.__wrapped__
  16881. , n = h ? [1] : arguments
  16882. , r = e instanceof m
  16883. , i = n[0]
  16884. , o = r || io(e);
  16885. o && l && "function" == typeof i && 1 != i.length && (r = o = !1);
  16886. var s = this.__chain__
  16887. , a = !!this.__actions__.length
  16888. , i = p && !s
  16889. , a = r && !a;
  16890. if (p || !o)
  16891. return i && a ? c.apply(this, n) : (u = this.thru(t),
  16892. i ? h ? u.value()[0] : u.value() : u);
  16893. e = a ? e : new m(this);
  16894. var u = c.apply(e, n);
  16895. return u.__actions__.push({
  16896. func: $e,
  16897. args: [t],
  16898. thisArg: Ss
  16899. }),
  16900. new g(u, s)
  16901. }
  16902. )
  16903. }),
  16904. Go(["pop", "push", "shift", "sort", "splice", "unshift"], function(t) {
  16905. var n = Yn[t]
  16906. , r = /^(?:push|sort|unshift)$/.test(t) ? "tap" : "thru"
  16907. , i = /^(?:pop|shift)$/.test(t);
  16908. d.prototype[t] = function() {
  16909. var e = arguments;
  16910. if (!i || this.__chain__)
  16911. return this[r](function(t) {
  16912. return n.apply(io(t) ? t : [], e)
  16913. });
  16914. var t = this.value();
  16915. return n.apply(io(t) ? t : [], e)
  16916. }
  16917. }),
  16918. j(m.prototype, function(t, e) {
  16919. var n, r = d[e];
  16920. r && (n = r.name + "",
  16921. (qr[n] || (qr[n] = [])).push({
  16922. name: e,
  16923. func: r
  16924. }))
  16925. }),
  16926. qr[Xt(Ss, 2).name] = [{
  16927. name: "wrapper",
  16928. func: Ss
  16929. }],
  16930. m.prototype.clone = function() {
  16931. var t = new m(this.__wrapped__);
  16932. return t.__actions__ = Mt(this.__actions__),
  16933. t.__dir__ = this.__dir__,
  16934. t.__filtered__ = this.__filtered__,
  16935. t.__iteratees__ = Mt(this.__iteratees__),
  16936. t.__takeCount__ = this.__takeCount__,
  16937. t.__views__ = Mt(this.__views__),
  16938. t
  16939. }
  16940. ,
  16941. m.prototype.reverse = function() {
  16942. var t;
  16943. return this.__filtered__ ? ((t = new m(this)).__dir__ = -1,
  16944. t.__filtered__ = !0) : (t = this.clone()).__dir__ *= -1,
  16945. t
  16946. }
  16947. ,
  16948. m.prototype.value = function() {
  16949. var t = this.__wrapped__.value()
  16950. , e = this.__dir__
  16951. , n = io(t)
  16952. , r = e < 0
  16953. , i = n ? t.length : 0
  16954. , o = function(t, e, n) {
  16955. for (var r = -1, i = n.length; ++r < i;) {
  16956. var o = n[r]
  16957. , s = o.size;
  16958. switch (o.type) {
  16959. case "drop":
  16960. t += s;
  16961. break;
  16962. case "dropRight":
  16963. e -= s;
  16964. break;
  16965. case "take":
  16966. e = Ir(e, t + s);
  16967. break;
  16968. case "takeRight":
  16969. t = Ar(t, e - s)
  16970. }
  16971. }
  16972. return {
  16973. start: t,
  16974. end: e
  16975. }
  16976. }(0, i, this.__views__)
  16977. , s = o.start
  16978. , a = (o = o.end) - s
  16979. , u = r ? o : s - 1
  16980. , c = this.__iteratees__
  16981. , l = c.length
  16982. , h = 0
  16983. , f = Ir(a, this.__takeCount__);
  16984. if (!n || !r && i == a && f == a)
  16985. return Ct(t, this.__actions__);
  16986. var p = [];
  16987. t: for (; a-- && h < f;) {
  16988. for (var d = -1, g = t[u += e]; ++d < l;) {
  16989. var m = c[d]
  16990. , v = m.iteratee
  16991. , m = m.type
  16992. , v = v(g);
  16993. if (2 == m)
  16994. g = v;
  16995. else if (!v) {
  16996. if (1 == m)
  16997. continue t;
  16998. break t
  16999. }
  17000. }
  17001. p[h++] = g
  17002. }
  17003. return p
  17004. }
  17005. ,
  17006. d.prototype.at = Mi,
  17007. d.prototype.chain = function() {
  17008. return Ve(this)
  17009. }
  17010. ,
  17011. d.prototype.commit = function() {
  17012. return new g(this.value(), this.__chain__)
  17013. }
  17014. ,
  17015. d.prototype.next = function() {
  17016. this.__values__ === Ss && (this.__values__ = mn(this.value()));
  17017. var t = this.__index__ >= this.__values__.length;
  17018. return {
  17019. done: t,
  17020. value: t ? Ss : this.__values__[this.__index__++]
  17021. }
  17022. }
  17023. ,
  17024. d.prototype.plant = function(t) {
  17025. for (var e, n = this; n instanceof o;) {
  17026. var r = Me(n);
  17027. r.__index__ = 0,
  17028. r.__values__ = Ss,
  17029. e ? i.__wrapped__ = r : e = r;
  17030. var i = r
  17031. , n = n.__wrapped__
  17032. }
  17033. return i.__wrapped__ = t,
  17034. e
  17035. }
  17036. ,
  17037. d.prototype.reverse = function() {
  17038. var t = this.__wrapped__;
  17039. if (t instanceof m) {
  17040. t = t;
  17041. return this.__actions__.length && (t = new m(this)),
  17042. (t = t.reverse()).__actions__.push({
  17043. func: $e,
  17044. args: [ze],
  17045. thisArg: Ss
  17046. }),
  17047. new g(t, this.__chain__)
  17048. }
  17049. return this.thru(ze)
  17050. }
  17051. ,
  17052. d.prototype.toJSON = d.prototype.valueOf = d.prototype.value = function() {
  17053. return Ct(this.__wrapped__, this.__actions__)
  17054. }
  17055. ,
  17056. d.prototype.first = d.prototype.head,
  17057. mr && (d.prototype[mr] = function() {
  17058. return this
  17059. }
  17060. ),
  17061. d
  17062. }();
  17063. "function" == typeof define && "object" == typeof define.amd && define.amd ? (Ka._ = au,
  17064. define(function() {
  17065. return au
  17066. })) : n ? ((n.exports = au)._ = au,
  17067. s._ = au) : Ka._ = au
  17068. }
  17069. .call(this),
  17070. function(t, e) {
  17071. "object" == typeof exports ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.jStat = e()
  17072. }(this, function() {
  17073. var p, d, _, x, m, g, a, u, i, e, c, l, h, s, n, f = function(a, u) {
  17074. var e = Array.prototype.concat
  17075. , t = Array.prototype.slice
  17076. , n = Object.prototype.toString;
  17077. function c(t, e) {
  17078. e = e < t ? t : e;
  17079. return a.pow(10, 17 - ~~(a.log(0 < e ? e : -e) * a.LOG10E))
  17080. }
  17081. var l = Array.isArray || function(t) {
  17082. return "[object Array]" === n.call(t)
  17083. }
  17084. ;
  17085. function h(t) {
  17086. return "[object Function]" === n.call(t)
  17087. }
  17088. function f(t) {
  17089. return "number" == typeof t && t - t == 0
  17090. }
  17091. function p() {
  17092. return new p._init(arguments)
  17093. }
  17094. function r() {
  17095. return 0
  17096. }
  17097. function i() {
  17098. return 1
  17099. }
  17100. function o(t, e) {
  17101. return t === e ? 1 : 0
  17102. }
  17103. function s(t, e, n, r) {
  17104. var i, o = [], s = t.length;
  17105. if (e === u && n === u && r === u)
  17106. return p.copy(t);
  17107. if (r = r || 1,
  17108. (e = 0 <= (e = e || 0) ? e : s + e) === (n = 0 <= (n = n || t.length) ? n : s + n) || 0 === r)
  17109. return [];
  17110. if (e < n && r < 0)
  17111. return [];
  17112. if (n < e && 0 < r)
  17113. return [];
  17114. if (0 < r)
  17115. for (i = e; i < n; i += r)
  17116. o.push(t[i]);
  17117. else
  17118. for (i = e; n < i; i += r)
  17119. o.push(t[i]);
  17120. return o
  17121. }
  17122. p.fn = p.prototype,
  17123. p._init = function(t) {
  17124. if (l(t[0]))
  17125. if (l(t[0][0])) {
  17126. h(t[1]) && (t[0] = p.map(t[0], t[1]));
  17127. for (var e = 0; e < t[0].length; e++)
  17128. this[e] = t[0][e];
  17129. this.length = t[0].length
  17130. } else
  17131. this[0] = h(t[1]) ? p.map(t[0], t[1]) : t[0],
  17132. this.length = 1;
  17133. else if (f(t[0]))
  17134. this[0] = p.seq.apply(null, t),
  17135. this.length = 1;
  17136. else {
  17137. if (t[0] instanceof p)
  17138. return p(t[0].toArray());
  17139. this[0] = [],
  17140. this.length = 1
  17141. }
  17142. return this
  17143. }
  17144. ,
  17145. p._init.prototype = p.prototype,
  17146. (p._init.constructor = p).utils = {
  17147. calcRdx: c,
  17148. isArray: l,
  17149. isFunction: h,
  17150. isNumber: f,
  17151. toVector: function(t) {
  17152. return e.apply([], t)
  17153. }
  17154. },
  17155. p._random_fn = a.random,
  17156. p.setRandom = function(t) {
  17157. if ("function" != typeof t)
  17158. throw new TypeError("fn is not a function");
  17159. p._random_fn = t
  17160. }
  17161. ,
  17162. p.extend = function(t) {
  17163. var e, n;
  17164. if (1 === arguments.length) {
  17165. for (n in t)
  17166. p[n] = t[n];
  17167. return this
  17168. }
  17169. for (e = 1; e < arguments.length; e++)
  17170. for (n in arguments[e])
  17171. t[n] = arguments[e][n];
  17172. return t
  17173. }
  17174. ,
  17175. p.rows = function(t) {
  17176. return t.length || 1
  17177. }
  17178. ,
  17179. p.cols = function(t) {
  17180. return t[0].length || 1
  17181. }
  17182. ,
  17183. p.dimensions = function(t) {
  17184. return {
  17185. rows: p.rows(t),
  17186. cols: p.cols(t)
  17187. }
  17188. }
  17189. ,
  17190. p.row = function(e, t) {
  17191. return l(t) ? t.map(function(t) {
  17192. return p.row(e, t)
  17193. }) : e[t]
  17194. }
  17195. ,
  17196. p.rowa = function(t, e) {
  17197. return p.row(t, e)
  17198. }
  17199. ,
  17200. p.col = function(r, t) {
  17201. if (l(t)) {
  17202. var i = p.arange(r.length).map(function() {
  17203. return new Array(t.length)
  17204. });
  17205. return t.forEach(function(e, n) {
  17206. p.arange(r.length).forEach(function(t) {
  17207. i[t][n] = r[t][e]
  17208. })
  17209. }),
  17210. i
  17211. }
  17212. for (var e = new Array(r.length), n = 0; n < r.length; n++)
  17213. e[n] = [r[n][t]];
  17214. return e
  17215. }
  17216. ,
  17217. p.cola = function(t, e) {
  17218. return p.col(t, e).map(function(t) {
  17219. return t[0]
  17220. })
  17221. }
  17222. ,
  17223. p.diag = function(t) {
  17224. for (var e = p.rows(t), n = new Array(e), r = 0; r < e; r++)
  17225. n[r] = [t[r][r]];
  17226. return n
  17227. }
  17228. ,
  17229. p.antidiag = function(t) {
  17230. for (var e = p.rows(t) - 1, n = new Array(e), r = 0; 0 <= e; e--,
  17231. r++)
  17232. n[r] = [t[r][e]];
  17233. return n
  17234. }
  17235. ,
  17236. p.transpose = function(t) {
  17237. var e, n, r, i, o, s = [];
  17238. for (l(t[0]) || (t = [t]),
  17239. n = t.length,
  17240. r = t[0].length,
  17241. o = 0; o < r; o++) {
  17242. for (e = new Array(n),
  17243. i = 0; i < n; i++)
  17244. e[i] = t[i][o];
  17245. s.push(e)
  17246. }
  17247. return 1 === s.length ? s[0] : s
  17248. }
  17249. ,
  17250. p.map = function(t, e, n) {
  17251. var r, i, o, s, a;
  17252. for (l(t[0]) || (t = [t]),
  17253. i = t.length,
  17254. o = t[0].length,
  17255. s = n ? t : new Array(i),
  17256. r = 0; r < i; r++)
  17257. for (s[r] || (s[r] = new Array(o)),
  17258. a = 0; a < o; a++)
  17259. s[r][a] = e(t[r][a], r, a);
  17260. return 1 === s.length ? s[0] : s
  17261. }
  17262. ,
  17263. p.cumreduce = function(t, e, n) {
  17264. var r, i, o, s, a;
  17265. for (l(t[0]) || (t = [t]),
  17266. i = t.length,
  17267. o = t[0].length,
  17268. s = n ? t : new Array(i),
  17269. r = 0; r < i; r++)
  17270. for (s[r] || (s[r] = new Array(o)),
  17271. 0 < o && (s[r][0] = t[r][0]),
  17272. a = 1; a < o; a++)
  17273. s[r][a] = e(s[r][a - 1], t[r][a]);
  17274. return 1 === s.length ? s[0] : s
  17275. }
  17276. ,
  17277. p.alter = function(t, e) {
  17278. return p.map(t, e, !0)
  17279. }
  17280. ,
  17281. p.create = function(t, e, n) {
  17282. var r, i, o = new Array(t);
  17283. for (h(e) && (n = e,
  17284. e = t),
  17285. r = 0; r < t; r++)
  17286. for (o[r] = new Array(e),
  17287. i = 0; i < e; i++)
  17288. o[r][i] = n(r, i);
  17289. return o
  17290. }
  17291. ,
  17292. p.zeros = function(t, e) {
  17293. return f(e) || (e = t),
  17294. p.create(t, e, r)
  17295. }
  17296. ,
  17297. p.ones = function(t, e) {
  17298. return f(e) || (e = t),
  17299. p.create(t, e, i)
  17300. }
  17301. ,
  17302. p.rand = function(t, e) {
  17303. return f(e) || (e = t),
  17304. p.create(t, e, p._random_fn)
  17305. }
  17306. ,
  17307. p.identity = function(t, e) {
  17308. return f(e) || (e = t),
  17309. p.create(t, e, o)
  17310. }
  17311. ,
  17312. p.symmetric = function(t) {
  17313. var e, n, r = t.length;
  17314. if (t.length !== t[0].length)
  17315. return !1;
  17316. for (e = 0; e < r; e++)
  17317. for (n = 0; n < r; n++)
  17318. if (t[n][e] !== t[e][n])
  17319. return !1;
  17320. return !0
  17321. }
  17322. ,
  17323. p.clear = function(t) {
  17324. return p.alter(t, r)
  17325. }
  17326. ,
  17327. p.seq = function(t, e, n, r) {
  17328. h(r) || (r = !1);
  17329. for (var i = [], o = c(t, e), s = (e * o - t * o) / ((n - 1) * o), a = t, u = 0; a <= e && u < n; a = (t * o + s * o * ++u) / o)
  17330. i.push(r ? r(a, u) : a);
  17331. return i
  17332. }
  17333. ,
  17334. p.arange = function(t, e, n) {
  17335. var r, i = [];
  17336. if (n = n || 1,
  17337. e === u && (e = t,
  17338. t = 0),
  17339. t === e || 0 === n)
  17340. return [];
  17341. if (t < e && n < 0)
  17342. return [];
  17343. if (e < t && 0 < n)
  17344. return [];
  17345. if (0 < n)
  17346. for (r = t; r < e; r += n)
  17347. i.push(r);
  17348. else
  17349. for (r = t; e < r; r += n)
  17350. i.push(r);
  17351. return i
  17352. }
  17353. ,
  17354. p.slice = function(t, e) {
  17355. var n, r;
  17356. return f((e = e || {}).row) ? f(e.col) ? t[e.row][e.col] : s(p.rowa(t, e.row), (n = e.col || {}).start, n.end, n.step) : f(e.col) ? s(p.cola(t, e.col), (r = e.row || {}).start, r.end, r.step) : (r = e.row || {},
  17357. n = e.col || {},
  17358. s(t, r.start, r.end, r.step).map(function(t) {
  17359. return s(t, n.start, n.end, n.step)
  17360. }))
  17361. }
  17362. ,
  17363. p.sliceAssign = function(i, t, o) {
  17364. var e, n;
  17365. if (f(t.row)) {
  17366. if (f(t.col))
  17367. return i[t.row][t.col] = o;
  17368. t.col = t.col || {},
  17369. t.col.start = t.col.start || 0,
  17370. t.col.end = t.col.end || i[0].length,
  17371. t.col.step = t.col.step || 1,
  17372. e = p.arange(t.col.start, a.min(i.length, t.col.end), t.col.step);
  17373. var r = t.row;
  17374. return e.forEach(function(t, e) {
  17375. i[r][t] = o[e]
  17376. }),
  17377. i
  17378. }
  17379. if (f(t.col)) {
  17380. t.row = t.row || {},
  17381. t.row.start = t.row.start || 0,
  17382. t.row.end = t.row.end || i.length,
  17383. t.row.step = t.row.step || 1,
  17384. n = p.arange(t.row.start, a.min(i[0].length, t.row.end), t.row.step);
  17385. var s = t.col;
  17386. return n.forEach(function(t, e) {
  17387. i[t][s] = o[e]
  17388. }),
  17389. i
  17390. }
  17391. return o[0].length === u && (o = [o]),
  17392. t.row.start = t.row.start || 0,
  17393. t.row.end = t.row.end || i.length,
  17394. t.row.step = t.row.step || 1,
  17395. t.col.start = t.col.start || 0,
  17396. t.col.end = t.col.end || i[0].length,
  17397. t.col.step = t.col.step || 1,
  17398. n = p.arange(t.row.start, a.min(i.length, t.row.end), t.row.step),
  17399. e = p.arange(t.col.start, a.min(i[0].length, t.col.end), t.col.step),
  17400. n.forEach(function(n, r) {
  17401. e.forEach(function(t, e) {
  17402. i[n][t] = o[r][e]
  17403. })
  17404. }),
  17405. i
  17406. }
  17407. ,
  17408. p.diagonal = function(t) {
  17409. var n = p.zeros(t.length, t.length);
  17410. return t.forEach(function(t, e) {
  17411. n[e][e] = t
  17412. }),
  17413. n
  17414. }
  17415. ,
  17416. p.copy = function(t) {
  17417. return t.map(function(t) {
  17418. return f(t) ? t : t.map(function(t) {
  17419. return t
  17420. })
  17421. })
  17422. }
  17423. ;
  17424. var d = p.prototype;
  17425. return d.length = 0,
  17426. d.push = Array.prototype.push,
  17427. d.sort = Array.prototype.sort,
  17428. d.splice = Array.prototype.splice,
  17429. d.slice = Array.prototype.slice,
  17430. d.toArray = function() {
  17431. return 1 < this.length ? t.call(this) : t.call(this)[0]
  17432. }
  17433. ,
  17434. d.map = function(t, e) {
  17435. return p(p.map(this, t, e))
  17436. }
  17437. ,
  17438. d.cumreduce = function(t, e) {
  17439. return p(p.cumreduce(this, t, e))
  17440. }
  17441. ,
  17442. d.alter = function(t) {
  17443. return p.alter(this, t),
  17444. this
  17445. }
  17446. ,
  17447. function(t) {
  17448. for (var e = 0; e < t.length; e++)
  17449. !function(r) {
  17450. d[r] = function(t) {
  17451. var e, n = this;
  17452. return t ? (setTimeout(function() {
  17453. t.call(n, d[r].call(n))
  17454. }),
  17455. this) : (e = p[r](this),
  17456. l(e) ? p(e) : e)
  17457. }
  17458. }(t[e])
  17459. }("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),
  17460. function(t) {
  17461. for (var e = 0; e < t.length; e++)
  17462. !function(r) {
  17463. d[r] = function(t, e) {
  17464. var n = this;
  17465. return e ? (setTimeout(function() {
  17466. e.call(n, d[r].call(n, t))
  17467. }),
  17468. this) : p(p[r](this, t))
  17469. }
  17470. }(t[e])
  17471. }("row col".split(" ")),
  17472. function(t) {
  17473. for (var e = 0; e < t.length; e++)
  17474. !function(t) {
  17475. d[t] = function() {
  17476. return p(p[t].apply(null, arguments))
  17477. }
  17478. }(t[e])
  17479. }("create zeros ones rand identity".split(" ")),
  17480. p
  17481. }(Math);
  17482. function o(t, e, n, r) {
  17483. for (var i, o = 0, s = 1, a = 1, u = 1, c = 0, l = 0; x.abs((a - l) / a) > r;)
  17484. s = u + (i = -(e + c) * (e + n + c) * t / (e + 2 * c) / (e + 2 * c + 1)) * s,
  17485. a = (o = (l = a) + i * o) + (i = (c += 1) * (n - c) * t / (e + 2 * c - 1) / (e + 2 * c)) * a,
  17486. o /= u = s + i * u,
  17487. s /= u,
  17488. a /= u,
  17489. u = 1;
  17490. return a / e
  17491. }
  17492. function v(t, e, n) {
  17493. var r = [.9815606342467192, .9041172563704749, .7699026741943047, .5873179542866175, .3678314989981802, .1252334085114689]
  17494. , i = [.04717533638651183, .10693932599531843, .16007832854334622, .20316742672306592, .2334925365383548, .24914704581340277]
  17495. , o = .5 * t;
  17496. if (8 <= o)
  17497. return 1;
  17498. for (var s = (s = 2 * _.normal.cdf(o, 0, 1, 1, 0) - 1) >= x.exp(-50 / n) ? x.pow(s, n) : 0, a = 3 < t ? 2 : 3, u = o, c = (8 - o) / a, l = u + c, h = 0, f = n - 1, p = 1; p <= a; p++) {
  17499. for (var d = 0, g = .5 * (l + u), m = .5 * (l - u), v = 1; v <= 12; v++) {
  17500. var y, b = 6 < v ? r[(y = 12 - v + 1) - 1] : -r[(y = v) - 1], w = g + m * b, b = w * w;
  17501. if (60 < b)
  17502. break;
  17503. w = .5 * (2 * _.normal.cdf(w, 0, 1, 1, 0)) - .5 * (2 * _.normal.cdf(w, t, 1, 1, 0));
  17504. w >= x.exp(-30 / f) && (d += i[y - 1] * x.exp(-.5 * b) * x.pow(w, f))
  17505. }
  17506. h += d *= 2 * m * n / x.sqrt(2 * x.PI),
  17507. u = l,
  17508. l += c
  17509. }
  17510. return (s += h) <= x.exp(-30 / e) ? 0 : 1 <= (s = x.pow(s, e)) ? 1 : s
  17511. }
  17512. function y(t) {
  17513. return e(t) || t instanceof m
  17514. }
  17515. function b(t, e, n, r) {
  17516. if (1 < t || 1 < n || t <= 0 || n <= 0)
  17517. throw new Error("Proportions should be greater than 0 and less than 1");
  17518. var i = (t * e + n * r) / (e + r);
  17519. return (t - n) / l.sqrt(i * (1 - i) * (1 / e + 1 / r))
  17520. }
  17521. function w(t, e) {
  17522. var n = t.length
  17523. , r = e[0].length - 1
  17524. , i = n - r - 1
  17525. , o = f.lstsq(e, t)
  17526. , s = f.multiply(e, o.map(function(t) {
  17527. return [t]
  17528. })).map(function(t) {
  17529. return t[0]
  17530. })
  17531. , a = f.subtract(t, s)
  17532. , u = f.mean(t)
  17533. , c = f.sum(s.map(function(t) {
  17534. return Math.pow(t - u, 2)
  17535. }))
  17536. , l = f.sum(t.map(function(t, e) {
  17537. return Math.pow(t - s[e], 2)
  17538. }))
  17539. , h = c + l;
  17540. return {
  17541. exog: e,
  17542. endog: t,
  17543. nobs: n,
  17544. df_model: r,
  17545. df_resid: i,
  17546. coef: o,
  17547. predict: s,
  17548. resid: a,
  17549. ybar: u,
  17550. SST: h,
  17551. SSE: c,
  17552. SSR: l,
  17553. R2: c / h
  17554. }
  17555. }
  17556. function C(e) {
  17557. var n, r, t = (n = e.exog,
  17558. r = n[0].length,
  17559. f.arange(r).map(function(e) {
  17560. var t = f.arange(r).filter(function(t) {
  17561. return t !== e
  17562. });
  17563. return w(f.col(n, e).map(function(t) {
  17564. return t[0]
  17565. }), f.col(n, t))
  17566. })), i = Math.sqrt(e.SSR / e.df_resid), o = t.map(function(t) {
  17567. var e = t.SST
  17568. , t = t.R2;
  17569. return i / Math.sqrt(e * (1 - t))
  17570. }), s = e.coef.map(function(t, e) {
  17571. return +t / o[e]
  17572. }), a = s.map(function(t) {
  17573. t = f.studentt.cdf(t, e.df_resid);
  17574. return 2 * (.5 < t ? 1 - t : t)
  17575. }), u = f.studentt.inv(.975, e.df_resid), t = e.coef.map(function(t, e) {
  17576. e = u * o[e];
  17577. return [t - e, t + e]
  17578. });
  17579. return {
  17580. se: o,
  17581. t: s,
  17582. p: a,
  17583. sigmaHat: i,
  17584. interval95: t
  17585. }
  17586. }
  17587. return function(u, l) {
  17588. var c = u.utils.isFunction;
  17589. function h(t, e) {
  17590. return t - e
  17591. }
  17592. function f(t, e, n) {
  17593. return l.max(e, l.min(t, n))
  17594. }
  17595. u.sum = function(t) {
  17596. for (var e = 0, n = t.length; 0 <= --n;)
  17597. e += t[n];
  17598. return e
  17599. }
  17600. ,
  17601. u.sumsqrd = function(t) {
  17602. for (var e = 0, n = t.length; 0 <= --n;)
  17603. e += t[n] * t[n];
  17604. return e
  17605. }
  17606. ,
  17607. u.sumsqerr = function(t) {
  17608. for (var e, n = u.mean(t), r = 0, i = t.length; 0 <= --i;)
  17609. r += (e = t[i] - n) * e;
  17610. return r
  17611. }
  17612. ,
  17613. u.sumrow = function(t) {
  17614. for (var e = 0, n = t.length; 0 <= --n;)
  17615. e += t[n];
  17616. return e
  17617. }
  17618. ,
  17619. u.product = function(t) {
  17620. for (var e = 1, n = t.length; 0 <= --n;)
  17621. e *= t[n];
  17622. return e
  17623. }
  17624. ,
  17625. u.min = function(t) {
  17626. for (var e = t[0], n = 0; ++n < t.length;)
  17627. t[n] < e && (e = t[n]);
  17628. return e
  17629. }
  17630. ,
  17631. u.max = function(t) {
  17632. for (var e = t[0], n = 0; ++n < t.length;)
  17633. t[n] > e && (e = t[n]);
  17634. return e
  17635. }
  17636. ,
  17637. u.unique = function(t) {
  17638. for (var e = {}, n = [], r = 0; r < t.length; r++)
  17639. e[t[r]] || (e[t[r]] = !0,
  17640. n.push(t[r]));
  17641. return n
  17642. }
  17643. ,
  17644. u.mean = function(t) {
  17645. return u.sum(t) / t.length
  17646. }
  17647. ,
  17648. u.meansqerr = function(t) {
  17649. return u.sumsqerr(t) / t.length
  17650. }
  17651. ,
  17652. u.geomean = function(t) {
  17653. return l.pow(u.product(t), 1 / t.length)
  17654. }
  17655. ,
  17656. u.median = function(t) {
  17657. var e = t.length
  17658. , t = t.slice().sort(h);
  17659. return 1 & e ? t[e / 2 | 0] : (t[e / 2 - 1] + t[e / 2]) / 2
  17660. }
  17661. ,
  17662. u.cumsum = function(t) {
  17663. return u.cumreduce(t, function(t, e) {
  17664. return t + e
  17665. })
  17666. }
  17667. ,
  17668. u.cumprod = function(t) {
  17669. return u.cumreduce(t, function(t, e) {
  17670. return t * e
  17671. })
  17672. }
  17673. ,
  17674. u.diff = function(t) {
  17675. for (var e = [], n = t.length, r = 1; r < n; r++)
  17676. e.push(t[r] - t[r - 1]);
  17677. return e
  17678. }
  17679. ,
  17680. u.rank = function(t) {
  17681. for (var e = [], n = {}, r = 0; r < t.length; r++)
  17682. n[a = t[r]] ? n[a]++ : (n[a] = 1,
  17683. e.push(a));
  17684. var i = e.sort(h)
  17685. , o = {}
  17686. , s = 1;
  17687. for (r = 0; r < i.length; r++) {
  17688. var a, u = n[a = i[r]], c = (s + (s + u - 1)) / 2;
  17689. o[a] = c,
  17690. s += u
  17691. }
  17692. return t.map(function(t) {
  17693. return o[t]
  17694. })
  17695. }
  17696. ,
  17697. u.mode = function(t) {
  17698. for (var e = t.length, n = t.slice().sort(h), r = 1, i = 0, o = 0, s = [], a = 0; a < e; a++)
  17699. n[a] === n[a + 1] ? r++ : (i < r ? (s = [n[a]],
  17700. i = r,
  17701. o = 0) : r === i && (s.push(n[a]),
  17702. o++),
  17703. r = 1);
  17704. return 0 === o ? s[0] : s
  17705. }
  17706. ,
  17707. u.range = function(t) {
  17708. return u.max(t) - u.min(t)
  17709. }
  17710. ,
  17711. u.variance = function(t, e) {
  17712. return u.sumsqerr(t) / (t.length - (e ? 1 : 0))
  17713. }
  17714. ,
  17715. u.pooledvariance = function(t) {
  17716. return t.reduce(function(t, e) {
  17717. return t + u.sumsqerr(e)
  17718. }, 0) / (t.reduce(function(t, e) {
  17719. return t + e.length
  17720. }, 0) - t.length)
  17721. }
  17722. ,
  17723. u.deviation = function(t) {
  17724. for (var e = u.mean(t), n = t.length, r = new Array(n), i = 0; i < n; i++)
  17725. r[i] = t[i] - e;
  17726. return r
  17727. }
  17728. ,
  17729. u.stdev = function(t, e) {
  17730. return l.sqrt(u.variance(t, e))
  17731. }
  17732. ,
  17733. u.pooledstdev = function(t) {
  17734. return l.sqrt(u.pooledvariance(t))
  17735. }
  17736. ,
  17737. u.meandev = function(t) {
  17738. for (var e = u.mean(t), n = [], r = t.length - 1; 0 <= r; r--)
  17739. n.push(l.abs(t[r] - e));
  17740. return u.mean(n)
  17741. }
  17742. ,
  17743. u.meddev = function(t) {
  17744. for (var e = u.median(t), n = [], r = t.length - 1; 0 <= r; r--)
  17745. n.push(l.abs(t[r] - e));
  17746. return u.median(n)
  17747. }
  17748. ,
  17749. u.coeffvar = function(t) {
  17750. return u.stdev(t) / u.mean(t)
  17751. }
  17752. ,
  17753. u.quartiles = function(t) {
  17754. var e = t.length
  17755. , t = t.slice().sort(h);
  17756. return [t[l.round(e / 4) - 1], t[l.round(e / 2) - 1], t[l.round(3 * e / 4) - 1]]
  17757. }
  17758. ,
  17759. u.quantiles = function(t, e, n, r) {
  17760. var i, o, s, a = t.slice().sort(h), u = [e.length], c = t.length;
  17761. for (void 0 === n && (n = 3 / 8),
  17762. void 0 === r && (r = 3 / 8),
  17763. i = 0; i < e.length; i++)
  17764. s = c * (o = e[i]) + (n + o * (1 - n - r)),
  17765. o = l.floor(f(s, 1, c - 1)),
  17766. s = f(s - o, 0, 1),
  17767. u[i] = (1 - s) * a[o - 1] + s * a[o];
  17768. return u
  17769. }
  17770. ,
  17771. u.percentile = function(t, e, n) {
  17772. t = t.slice().sort(h),
  17773. e = e * (t.length + (n ? 1 : -1)) + (n ? 0 : 1),
  17774. n = parseInt(e),
  17775. e -= n;
  17776. return n + 1 < t.length ? t[n - 1] + e * (t[n] - t[n - 1]) : t[n - 1]
  17777. }
  17778. ,
  17779. u.percentileOfScore = function(t, e, n) {
  17780. for (var r, i = 0, o = t.length, s = "strict" === n ? !0 : !1, a = 0; a < o; a++)
  17781. r = t[a],
  17782. (s && r < e || !s && r <= e) && i++;
  17783. return i / o
  17784. }
  17785. ,
  17786. u.histogram = function(t, e) {
  17787. e = e || 4;
  17788. for (var n = u.min(t), r = (u.max(t) - n) / e, i = t.length, o = [], s = 0; s < e; s++)
  17789. o[s] = 0;
  17790. for (s = 0; s < i; s++)
  17791. o[l.min(l.floor((t[s] - n) / r), e - 1)] += 1;
  17792. return o
  17793. }
  17794. ,
  17795. u.covariance = function(t, e) {
  17796. for (var n = u.mean(t), r = u.mean(e), i = t.length, o = new Array(i), s = 0; s < i; s++)
  17797. o[s] = (t[s] - n) * (e[s] - r);
  17798. return u.sum(o) / (i - 1)
  17799. }
  17800. ,
  17801. u.corrcoeff = function(t, e) {
  17802. return u.covariance(t, e) / u.stdev(t, 1) / u.stdev(e, 1)
  17803. }
  17804. ,
  17805. u.spearmancoeff = function(t, e) {
  17806. return t = u.rank(t),
  17807. e = u.rank(e),
  17808. u.corrcoeff(t, e)
  17809. }
  17810. ,
  17811. u.stanMoment = function(t, e) {
  17812. for (var n = u.mean(t), r = u.stdev(t), i = t.length, o = 0, s = 0; s < i; s++)
  17813. o += l.pow((t[s] - n) / r, e);
  17814. return o / t.length
  17815. }
  17816. ,
  17817. u.skewness = function(t) {
  17818. return u.stanMoment(t, 3)
  17819. }
  17820. ,
  17821. u.kurtosis = function(t) {
  17822. return u.stanMoment(t, 4) - 3
  17823. }
  17824. ;
  17825. var p = u.prototype;
  17826. !function(t) {
  17827. for (var e = 0; e < t.length; e++)
  17828. !function(o) {
  17829. p[o] = function(t, e) {
  17830. var n = []
  17831. , r = 0
  17832. , i = this;
  17833. if (c(t) && (e = t,
  17834. t = !1),
  17835. e)
  17836. return setTimeout(function() {
  17837. e.call(i, p[o].call(i, t))
  17838. }),
  17839. this;
  17840. if (1 < this.length) {
  17841. for (i = !0 === t ? this : this.transpose(); r < i.length; r++)
  17842. n[r] = u[o](i[r]);
  17843. return n
  17844. }
  17845. return u[o](this[0], t)
  17846. }
  17847. }(t[e])
  17848. }("cumsum cumprod".split(" ")),
  17849. function(t) {
  17850. for (var e = 0; e < t.length; e++)
  17851. !function(o) {
  17852. p[o] = function(t, e) {
  17853. var n = []
  17854. , r = 0
  17855. , i = this;
  17856. if (c(t) && (e = t,
  17857. t = !1),
  17858. e)
  17859. return setTimeout(function() {
  17860. e.call(i, p[o].call(i, t))
  17861. }),
  17862. this;
  17863. if (1 < this.length) {
  17864. for ("sumrow" !== o && (i = !0 === t ? this : this.transpose()); r < i.length; r++)
  17865. n[r] = u[o](i[r]);
  17866. return !0 === t ? u[o](u.utils.toVector(n)) : n
  17867. }
  17868. return u[o](this[0], t)
  17869. }
  17870. }(t[e])
  17871. }("sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" ")),
  17872. function(t) {
  17873. for (var e = 0; e < t.length; e++)
  17874. !function(a) {
  17875. p[a] = function() {
  17876. var t, e = [], n = 0, r = this, i = Array.prototype.slice.call(arguments);
  17877. if (c(i[i.length - 1])) {
  17878. t = i[i.length - 1];
  17879. var o = i.slice(0, i.length - 1);
  17880. return setTimeout(function() {
  17881. t.call(r, p[a].apply(r, o))
  17882. }),
  17883. this
  17884. }
  17885. t = void 0;
  17886. var s = function(t) {
  17887. return u[a].apply(r, [t].concat(i))
  17888. };
  17889. if (1 < this.length) {
  17890. for (r = r.transpose(); n < r.length; n++)
  17891. e[n] = s(r[n]);
  17892. return e
  17893. }
  17894. return s(this[0])
  17895. }
  17896. }(t[e])
  17897. }("quantiles percentileOfScore".split(" "))
  17898. }(f, Math),
  17899. p = f,
  17900. d = Math,
  17901. p.gammaln = function(t) {
  17902. var e, n, r = 0, i = [76.18009172947146, -86.50532032941678, 24.01409824083091, -1.231739572450155, .001208650973866179, -5395239384953e-18], o = 1.000000000190015, t = (n = e = t) + 5.5;
  17903. for (t -= (e + .5) * d.log(t); r < 6; r++)
  17904. o += i[r] / ++n;
  17905. return d.log(2.5066282746310007 * o / e) - t
  17906. }
  17907. ,
  17908. p.loggam = function(t) {
  17909. var e, n, r, i, o, s = [.08333333333333333, -.002777777777777778, .0007936507936507937, -.0005952380952380952, .0008417508417508418, -.001917526917526918, .00641025641025641, -.02955065359477124, .1796443723688307, -1.3924322169059], a = t, u = 0;
  17910. if (1 == t || 2 == t)
  17911. return 0;
  17912. for (t <= 7 && (a = t + (u = d.floor(7 - t))),
  17913. e = 1 / (a * a),
  17914. n = 2 * d.PI,
  17915. i = s[9],
  17916. o = 8; 0 <= o; o--)
  17917. i *= e,
  17918. i += s[o];
  17919. if (r = i / a + .5 * d.log(n) + (a - .5) * d.log(a) - a,
  17920. t <= 7)
  17921. for (o = 1; o <= u; o++)
  17922. r -= d.log(a - 1),
  17923. --a;
  17924. return r
  17925. }
  17926. ,
  17927. p.gammafn = function(t) {
  17928. var e, n, r, i = [-1.716185138865495, 24.76565080557592, -379.80425647094563, 629.3311553128184, 866.9662027904133, -31451.272968848367, -36144.413418691176, 66456.14382024054], o = [-30.8402300119739, 315.35062697960416, -1015.1563674902192, -3107.771671572311, 22538.11842098015, 4755.846277527881, -134659.9598649693, -115132.2596755535], s = !1, a = 0, u = 0, c = 0, l = t;
  17929. if (171.6243769536076 < t)
  17930. return 1 / 0;
  17931. if (l <= 0) {
  17932. if (!(r = l % 1 + 36e-17))
  17933. return 1 / 0;
  17934. s = (1 & l ? -1 : 1) * d.PI / d.sin(d.PI * r),
  17935. l = 1 - l
  17936. }
  17937. for (n = (t = l) < 1 ? l++ : (l -= a = (0 | l) - 1) - 1,
  17938. e = 0; e < 8; ++e)
  17939. c = (c + i[e]) * n,
  17940. u = u * n + o[e];
  17941. if (r = c / u + 1,
  17942. t < l)
  17943. r /= t;
  17944. else if (l < t)
  17945. for (e = 0; e < a; ++e)
  17946. r *= l,
  17947. l++;
  17948. return s && (r = s / r),
  17949. r
  17950. }
  17951. ,
  17952. p.gammap = function(t, e) {
  17953. return p.lowRegGamma(t, e) * p.gammafn(t)
  17954. }
  17955. ,
  17956. p.lowRegGamma = function(t, e) {
  17957. var n, r = p.gammaln(t), i = t, o = 1 / t, s = o, a = e + 1 - t, u = 1 / 1e-30, c = 1 / a, l = c, h = 1, f = -~(8.5 * d.log(1 <= t ? t : 1 / t) + .4 * t + 17);
  17958. if (e < 0 || t <= 0)
  17959. return NaN;
  17960. if (e < t + 1) {
  17961. for (; h <= f; h++)
  17962. o += s *= e / ++i;
  17963. return o * d.exp(-e + t * d.log(e) - r)
  17964. }
  17965. for (; h <= f; h++)
  17966. l *= (c = 1 / (c = (n = -h * (h - t)) * c + (a += 2))) * (u = a + n / u);
  17967. return 1 - l * d.exp(-e + t * d.log(e) - r)
  17968. }
  17969. ,
  17970. p.factorialln = function(t) {
  17971. return t < 0 ? NaN : p.gammaln(t + 1)
  17972. }
  17973. ,
  17974. p.factorial = function(t) {
  17975. return t < 0 ? NaN : p.gammafn(t + 1)
  17976. }
  17977. ,
  17978. p.combination = function(t, e) {
  17979. return 170 < t || 170 < e ? d.exp(p.combinationln(t, e)) : p.factorial(t) / p.factorial(e) / p.factorial(t - e)
  17980. }
  17981. ,
  17982. p.combinationln = function(t, e) {
  17983. return p.factorialln(t) - p.factorialln(e) - p.factorialln(t - e)
  17984. }
  17985. ,
  17986. p.permutation = function(t, e) {
  17987. return p.factorial(t) / p.factorial(t - e)
  17988. }
  17989. ,
  17990. p.betafn = function(t, e) {
  17991. if (!(t <= 0 || e <= 0))
  17992. return 170 < t + e ? d.exp(p.betaln(t, e)) : p.gammafn(t) * p.gammafn(e) / p.gammafn(t + e)
  17993. }
  17994. ,
  17995. p.betaln = function(t, e) {
  17996. return p.gammaln(t) + p.gammaln(e) - p.gammaln(t + e)
  17997. }
  17998. ,
  17999. p.betacf = function(t, e, n) {
  18000. var r, i, o, s = 1e-30, a = 1, u = e + n, c = e + 1, l = e - 1, h = 1, f = 1 - u * t / c;
  18001. for (d.abs(f) < s && (f = s),
  18002. o = f = 1 / f; a <= 100 && (f = 1 + (i = a * (n - a) * t / ((l + (r = 2 * a)) * (e + r))) * f,
  18003. d.abs(f) < s && (f = s),
  18004. h = 1 + i / h,
  18005. d.abs(h) < s && (h = s),
  18006. o *= (f = 1 / f) * h,
  18007. f = 1 + (i = -(e + a) * (u + a) * t / ((e + r) * (c + r))) * f,
  18008. d.abs(f) < s && (f = s),
  18009. h = 1 + i / h,
  18010. d.abs(h) < s && (h = s),
  18011. o *= i = (f = 1 / f) * h,
  18012. !(d.abs(i - 1) < 3e-7)); a++)
  18013. ;
  18014. return o
  18015. }
  18016. ,
  18017. p.gammapinv = function(t, e) {
  18018. var n, r, i, o, s, a, u = 0, c = e - 1, l = p.gammaln(e);
  18019. if (1 <= t)
  18020. return d.max(100, e + 100 * d.sqrt(e));
  18021. if (t <= 0)
  18022. return 0;
  18023. for (n = 1 < e ? (s = d.log(c),
  18024. a = d.exp(c * (s - 1) - l),
  18025. o = t < .5 ? t : 1 - t,
  18026. n = (2.30753 + .27061 * (r = d.sqrt(-2 * d.log(o)))) / (1 + r * (.99229 + .04481 * r)) - r,
  18027. t < .5 && (n = -n),
  18028. d.max(.001, e * d.pow(1 - 1 / (9 * e) - n / (3 * d.sqrt(e)), 3))) : t < (r = 1 - e * (.253 + .12 * e)) ? d.pow(t / r, 1 / e) : 1 - d.log(1 - (t - r) / (1 - r)); u < 12; u++) {
  18029. if (n <= 0)
  18030. return 0;
  18031. if ((n -= r = (i = (p.lowRegGamma(e, n) - t) / (r = 1 < e ? a * d.exp(-(n - c) + c * (d.log(n) - s)) : d.exp(-n + c * d.log(n) - l))) / (1 - .5 * d.min(1, i * ((e - 1) / n - 1)))) <= 0 && (n = .5 * (n + r)),
  18032. d.abs(r) < 1e-8 * n)
  18033. break
  18034. }
  18035. return n
  18036. }
  18037. ,
  18038. p.erf = function(t) {
  18039. var e, n, r, i = [-1.3026537197817094, .6419697923564902, .019476473204185836, -.00956151478680863, -.000946595344482036, .000366839497852761, 42523324806907e-18, -20278578112534e-18, -1624290004647e-18, 130365583558e-17, 1.5626441722e-8, -8.5238095915e-8, 6.529054439e-9, 5.059343495e-9, -9.91364156e-10, -2.27365122e-10, 96467911e-18, 2394038e-18, -6886027e-18, 894487e-18, 313092e-18, -112708e-18, 381e-18, 7106e-18, -1523e-18, -94e-18, 121e-18, -28e-18], o = i.length - 1, s = !1, a = 0, u = 0;
  18040. for (t < 0 && (t = -t,
  18041. s = !0),
  18042. n = 4 * (e = 2 / (2 + t)) - 2; 0 < o; o--)
  18043. a = n * (r = a) - u + i[o],
  18044. u = r;
  18045. return t = e * d.exp(-t * t + .5 * (i[0] + n * a) - u),
  18046. s ? t - 1 : 1 - t
  18047. }
  18048. ,
  18049. p.erfc = function(t) {
  18050. return 1 - p.erf(t)
  18051. }
  18052. ,
  18053. p.erfcinv = function(t) {
  18054. var e, n, r, i, o = 0;
  18055. if (2 <= t)
  18056. return -100;
  18057. if (t <= 0)
  18058. return 100;
  18059. for (i = t < 1 ? t : 2 - t,
  18060. e = -.70711 * ((2.30753 + .27061 * (r = d.sqrt(-2 * d.log(i / 2)))) / (1 + r * (.99229 + .04481 * r)) - r); o < 2; o++)
  18061. e += (n = p.erfc(e) - i) / (1.1283791670955126 * d.exp(-e * e) - e * n);
  18062. return t < 1 ? e : -e
  18063. }
  18064. ,
  18065. p.ibetainv = function(t, e, n) {
  18066. var r, i, o, s, a, u, c, l = e - 1, h = n - 1, f = 0;
  18067. if (t <= 0)
  18068. return 0;
  18069. if (1 <= t)
  18070. return 1;
  18071. for (o = 1 <= e && 1 <= n ? (u = t < .5 ? t : 1 - t,
  18072. o = (2.30753 + .27061 * (r = d.sqrt(-2 * d.log(u)))) / (1 + r * (.99229 + .04481 * r)) - r,
  18073. t < .5 && (o = -o),
  18074. s = (o * o - 3) / 6,
  18075. a = 2 / (1 / (2 * e - 1) + 1 / (2 * n - 1)),
  18076. u = o * d.sqrt(s + a) / a - (1 / (2 * n - 1) - 1 / (2 * e - 1)) * (s + 5 / 6 - 2 / (3 * a)),
  18077. e / (e + n * d.exp(2 * u))) : (s = d.log(e / (e + n)),
  18078. a = d.log(n / (e + n)),
  18079. t < (r = d.exp(e * s) / e) / (u = r + (i = d.exp(n * a) / n)) ? d.pow(e * u * t, 1 / e) : 1 - d.pow(n * u * (1 - t), 1 / n)),
  18080. c = -p.gammaln(e) - p.gammaln(n) + p.gammaln(e + n); f < 10; f++) {
  18081. if (0 === o || 1 === o)
  18082. return o;
  18083. if ((o -= r = (i = (p.ibeta(o, e, n) - t) / (r = d.exp(l * d.log(o) + h * d.log(1 - o) + c))) / (1 - .5 * d.min(1, i * (l / o - h / (1 - o))))) <= 0 && (o = .5 * (o + r)),
  18084. 1 <= o && (o = .5 * (o + r + 1)),
  18085. d.abs(r) < 1e-8 * o && 0 < f)
  18086. break
  18087. }
  18088. return o
  18089. }
  18090. ,
  18091. p.ibeta = function(t, e, n) {
  18092. var r = 0 === t || 1 === t ? 0 : d.exp(p.gammaln(e + n) - p.gammaln(e) - p.gammaln(n) + e * d.log(t) + n * d.log(1 - t));
  18093. return !(t < 0 || 1 < t) && (t < (e + 1) / (e + n + 2) ? r * p.betacf(t, e, n) / e : 1 - r * p.betacf(1 - t, n, e) / n)
  18094. }
  18095. ,
  18096. p.randn = function(t, e) {
  18097. var n, r, i, o;
  18098. if (e = e || t,
  18099. t)
  18100. return p.create(t, e, function() {
  18101. return p.randn()
  18102. });
  18103. for (; n = p._random_fn(),
  18104. r = 1.7156 * (p._random_fn() - .5),
  18105. o = (o = n - .449871) * o + (i = d.abs(r) + .386595) * (.196 * i - .25472 * o),
  18106. .27597 < o && (.27846 < o || r * r > -4 * d.log(n) * n * n);)
  18107. ;
  18108. return r / n
  18109. }
  18110. ,
  18111. p.randg = function(t, e, n) {
  18112. var r, i, o, s, a, u = t;
  18113. if (n = n || e,
  18114. t = t || 1,
  18115. e)
  18116. return (n = p.zeros(e, n)).alter(function() {
  18117. return p.randg(t)
  18118. }),
  18119. n;
  18120. t < 1 && (t += 1),
  18121. r = t - 1 / 3,
  18122. i = 1 / d.sqrt(9 * r);
  18123. do {
  18124. for (; s = 1 + i * (a = p.randn()),
  18125. s <= 0;)
  18126. ;
  18127. } while (s *= s * s,
  18128. (o = p._random_fn()) > 1 - .331 * d.pow(a, 4) && d.log(o) > .5 * a * a + r * (1 - s + d.log(s)));
  18129. if (t == u)
  18130. return r * s;
  18131. for (; o = p._random_fn(),
  18132. 0 === o;)
  18133. ;
  18134. return d.pow(o, 1 / u) * r * s
  18135. }
  18136. ,
  18137. function(t) {
  18138. for (var e = 0; e < t.length; e++)
  18139. !function(e) {
  18140. p.fn[e] = function() {
  18141. return p(p.map(this, function(t) {
  18142. return p[e](t)
  18143. }))
  18144. }
  18145. }(t[e])
  18146. }("gammaln gammafn factorial factorialln".split(" ")),
  18147. function(t) {
  18148. for (var e = 0; e < t.length; e++)
  18149. !function(t) {
  18150. p.fn[t] = function() {
  18151. return p(p[t].apply(null, arguments))
  18152. }
  18153. }(t[e])
  18154. }("randn".split(" ")),
  18155. _ = f,
  18156. x = Math,
  18157. function(t) {
  18158. for (var e = 0; e < t.length; e++)
  18159. !function(o) {
  18160. _[o] = function(t, e, n) {
  18161. return this instanceof arguments.callee ? (this._a = t,
  18162. this._b = e,
  18163. this._c = n,
  18164. this) : new arguments.callee(t, e, n)
  18165. }
  18166. ,
  18167. _.fn[o] = function(t, e, n) {
  18168. n = _[o](t, e, n);
  18169. return n.data = this,
  18170. n
  18171. }
  18172. ,
  18173. _[o].prototype.sample = function(t) {
  18174. var e = this._a
  18175. , n = this._b
  18176. , r = this._c;
  18177. return t ? _.alter(t, function() {
  18178. return _[o].sample(e, n, r)
  18179. }) : _[o].sample(e, n, r)
  18180. }
  18181. ,
  18182. function(t) {
  18183. for (var e = 0; e < t.length; e++)
  18184. !function(i) {
  18185. _[o].prototype[i] = function(t) {
  18186. var e = this._a
  18187. , n = this._b
  18188. , r = this._c;
  18189. return t || 0 === t || (t = this.data),
  18190. "number" != typeof t ? _.fn.map.call(t, function(t) {
  18191. return _[o][i](t, e, n, r)
  18192. }) : _[o][i](t, e, n, r)
  18193. }
  18194. }(t[e])
  18195. }("pdf cdf inv".split(" ")),
  18196. function(t) {
  18197. for (var e = 0; e < t.length; e++)
  18198. !function(t) {
  18199. _[o].prototype[t] = function() {
  18200. return _[o][t](this._a, this._b, this._c)
  18201. }
  18202. }(t[e])
  18203. }("mean median mode variance".split(" "))
  18204. }(t[e])
  18205. }("beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular tukey arcsine".split(" ")),
  18206. _.extend(_.beta, {
  18207. pdf: function(t, e, n) {
  18208. return 1 < t || t < 0 ? 0 : 1 == e && 1 == n ? 1 : e < 512 && n < 512 ? x.pow(t, e - 1) * x.pow(1 - t, n - 1) / _.betafn(e, n) : x.exp((e - 1) * x.log(t) + (n - 1) * x.log(1 - t) - _.betaln(e, n))
  18209. },
  18210. cdf: function(t, e, n) {
  18211. return 1 < t || t < 0 ? +(1 < t) : _.ibeta(t, e, n)
  18212. },
  18213. inv: function(t, e, n) {
  18214. return _.ibetainv(t, e, n)
  18215. },
  18216. mean: function(t, e) {
  18217. return t / (t + e)
  18218. },
  18219. median: function(t, e) {
  18220. return _.ibetainv(.5, t, e)
  18221. },
  18222. mode: function(t, e) {
  18223. return (t - 1) / (t + e - 2)
  18224. },
  18225. sample: function(t, e) {
  18226. t = _.randg(t);
  18227. return t / (t + _.randg(e))
  18228. },
  18229. variance: function(t, e) {
  18230. return t * e / (x.pow(t + e, 2) * (t + e + 1))
  18231. }
  18232. }),
  18233. _.extend(_.centralF, {
  18234. pdf: function(t, e, n) {
  18235. var r;
  18236. return t < 0 ? 0 : e <= 2 ? 0 === t && e < 2 ? 1 / 0 : 0 === t && 2 === e ? 1 : 1 / _.betafn(e / 2, n / 2) * x.pow(e / n, e / 2) * x.pow(t, e / 2 - 1) * x.pow(1 + e / n * t, -(e + n) / 2) : (r = e * t / (n + t * e),
  18237. e * (n / (n + t * e)) / 2 * _.binomial.pdf((e - 2) / 2, (e + n - 2) / 2, r))
  18238. },
  18239. cdf: function(t, e, n) {
  18240. return t < 0 ? 0 : _.ibeta(e * t / (e * t + n), e / 2, n / 2)
  18241. },
  18242. inv: function(t, e, n) {
  18243. return n / (e * (1 / _.ibetainv(t, e / 2, n / 2) - 1))
  18244. },
  18245. mean: function(t, e) {
  18246. return 2 < e ? e / (e - 2) : void 0
  18247. },
  18248. mode: function(t, e) {
  18249. return 2 < t ? e * (t - 2) / (t * (e + 2)) : void 0
  18250. },
  18251. sample: function(t, e) {
  18252. return 2 * _.randg(t / 2) / t / (2 * _.randg(e / 2) / e)
  18253. },
  18254. variance: function(t, e) {
  18255. if (!(e <= 4))
  18256. return 2 * e * e * (t + e - 2) / (t * (e - 2) * (e - 2) * (e - 4))
  18257. }
  18258. }),
  18259. _.extend(_.cauchy, {
  18260. pdf: function(t, e, n) {
  18261. return n < 0 ? 0 : n / (x.pow(t - e, 2) + x.pow(n, 2)) / x.PI
  18262. },
  18263. cdf: function(t, e, n) {
  18264. return x.atan((t - e) / n) / x.PI + .5
  18265. },
  18266. inv: function(t, e, n) {
  18267. return e + n * x.tan(x.PI * (t - .5))
  18268. },
  18269. median: function(t) {
  18270. return t
  18271. },
  18272. mode: function(t) {
  18273. return t
  18274. },
  18275. sample: function(t, e) {
  18276. return _.randn() * x.sqrt(1 / (2 * _.randg(.5))) * e + t
  18277. }
  18278. }),
  18279. _.extend(_.chisquare, {
  18280. pdf: function(t, e) {
  18281. return t < 0 ? 0 : 0 === t && 2 === e ? .5 : x.exp((e / 2 - 1) * x.log(t) - t / 2 - e / 2 * x.log(2) - _.gammaln(e / 2))
  18282. },
  18283. cdf: function(t, e) {
  18284. return t < 0 ? 0 : _.lowRegGamma(e / 2, t / 2)
  18285. },
  18286. inv: function(t, e) {
  18287. return 2 * _.gammapinv(t, .5 * e)
  18288. },
  18289. mean: function(t) {
  18290. return t
  18291. },
  18292. median: function(t) {
  18293. return t * x.pow(1 - 2 / (9 * t), 3)
  18294. },
  18295. mode: function(t) {
  18296. return 0 < t - 2 ? t - 2 : 0
  18297. },
  18298. sample: function(t) {
  18299. return 2 * _.randg(t / 2)
  18300. },
  18301. variance: function(t) {
  18302. return 2 * t
  18303. }
  18304. }),
  18305. _.extend(_.exponential, {
  18306. pdf: function(t, e) {
  18307. return t < 0 ? 0 : e * x.exp(-e * t)
  18308. },
  18309. cdf: function(t, e) {
  18310. return t < 0 ? 0 : 1 - x.exp(-e * t)
  18311. },
  18312. inv: function(t, e) {
  18313. return -x.log(1 - t) / e
  18314. },
  18315. mean: function(t) {
  18316. return 1 / t
  18317. },
  18318. median: function(t) {
  18319. return 1 / t * x.log(2)
  18320. },
  18321. mode: function() {
  18322. return 0
  18323. },
  18324. sample: function(t) {
  18325. return -1 / t * x.log(_._random_fn())
  18326. },
  18327. variance: function(t) {
  18328. return x.pow(t, -2)
  18329. }
  18330. }),
  18331. _.extend(_.gamma, {
  18332. pdf: function(t, e, n) {
  18333. return t < 0 ? 0 : 0 === t && 1 === e ? 1 / n : x.exp((e - 1) * x.log(t) - t / n - _.gammaln(e) - e * x.log(n))
  18334. },
  18335. cdf: function(t, e, n) {
  18336. return t < 0 ? 0 : _.lowRegGamma(e, t / n)
  18337. },
  18338. inv: function(t, e, n) {
  18339. return _.gammapinv(t, e) * n
  18340. },
  18341. mean: function(t, e) {
  18342. return t * e
  18343. },
  18344. mode: function(t, e) {
  18345. if (1 < t)
  18346. return (t - 1) * e
  18347. },
  18348. sample: function(t, e) {
  18349. return _.randg(t) * e
  18350. },
  18351. variance: function(t, e) {
  18352. return t * e * e
  18353. }
  18354. }),
  18355. _.extend(_.invgamma, {
  18356. pdf: function(t, e, n) {
  18357. return t <= 0 ? 0 : x.exp(-(e + 1) * x.log(t) - n / t - _.gammaln(e) + e * x.log(n))
  18358. },
  18359. cdf: function(t, e, n) {
  18360. return t <= 0 ? 0 : 1 - _.lowRegGamma(e, n / t)
  18361. },
  18362. inv: function(t, e, n) {
  18363. return n / _.gammapinv(1 - t, e)
  18364. },
  18365. mean: function(t, e) {
  18366. return 1 < t ? e / (t - 1) : void 0
  18367. },
  18368. mode: function(t, e) {
  18369. return e / (t + 1)
  18370. },
  18371. sample: function(t, e) {
  18372. return e / _.randg(t)
  18373. },
  18374. variance: function(t, e) {
  18375. if (!(t <= 2))
  18376. return e * e / ((t - 1) * (t - 1) * (t - 2))
  18377. }
  18378. }),
  18379. _.extend(_.kumaraswamy, {
  18380. pdf: function(t, e, n) {
  18381. return 0 === t && 1 === e ? n : 1 === t && 1 === n ? e : x.exp(x.log(e) + x.log(n) + (e - 1) * x.log(t) + (n - 1) * x.log(1 - x.pow(t, e)))
  18382. },
  18383. cdf: function(t, e, n) {
  18384. return t < 0 ? 0 : 1 < t ? 1 : 1 - x.pow(1 - x.pow(t, e), n)
  18385. },
  18386. inv: function(t, e, n) {
  18387. return x.pow(1 - x.pow(1 - t, 1 / n), 1 / e)
  18388. },
  18389. mean: function(t, e) {
  18390. return e * _.gammafn(1 + 1 / t) * _.gammafn(e) / _.gammafn(1 + 1 / t + e)
  18391. },
  18392. median: function(t, e) {
  18393. return x.pow(1 - x.pow(2, -1 / e), 1 / t)
  18394. },
  18395. mode: function(t, e) {
  18396. if (1 <= t && 1 <= e && 1 !== t && 1 !== e)
  18397. return x.pow((t - 1) / (t * e - 1), 1 / t)
  18398. },
  18399. variance: function() {
  18400. throw new Error("variance not yet implemented")
  18401. }
  18402. }),
  18403. _.extend(_.lognormal, {
  18404. pdf: function(t, e, n) {
  18405. return t <= 0 ? 0 : x.exp(-x.log(t) - .5 * x.log(2 * x.PI) - x.log(n) - x.pow(x.log(t) - e, 2) / (2 * n * n))
  18406. },
  18407. cdf: function(t, e, n) {
  18408. return t < 0 ? 0 : .5 + .5 * _.erf((x.log(t) - e) / x.sqrt(2 * n * n))
  18409. },
  18410. inv: function(t, e, n) {
  18411. return x.exp(-1.4142135623730951 * n * _.erfcinv(2 * t) + e)
  18412. },
  18413. mean: function(t, e) {
  18414. return x.exp(t + e * e / 2)
  18415. },
  18416. median: function(t) {
  18417. return x.exp(t)
  18418. },
  18419. mode: function(t, e) {
  18420. return x.exp(t - e * e)
  18421. },
  18422. sample: function(t, e) {
  18423. return x.exp(_.randn() * e + t)
  18424. },
  18425. variance: function(t, e) {
  18426. return (x.exp(e * e) - 1) * x.exp(2 * t + e * e)
  18427. }
  18428. }),
  18429. _.extend(_.noncentralt, {
  18430. pdf: function(t, e, n) {
  18431. return x.abs(n) < 1e-14 ? _.studentt.pdf(t, e) : x.abs(t) < 1e-14 ? x.exp(_.gammaln((e + 1) / 2) - n * n / 2 - .5 * x.log(x.PI * e) - _.gammaln(e / 2)) : e / t * (_.noncentralt.cdf(t * x.sqrt(1 + 2 / e), e + 2, n) - _.noncentralt.cdf(t, e, n))
  18432. },
  18433. cdf: function(t, e, n) {
  18434. if (x.abs(n) < 1e-14)
  18435. return _.studentt.cdf(t, e);
  18436. var r = !1;
  18437. t < 0 && (r = !0,
  18438. n = -n);
  18439. for (var i = _.normal.cdf(-n, 0, 1), o = 1e-14 + 1, s = o, a = t * t / (t * t + e), u = 0, c = x.exp(-n * n / 2), l = x.exp(-n * n / 2 - .5 * x.log(2) - _.gammaln(1.5)) * n; u < 200 || 1e-14 < s || 1e-14 < o;)
  18440. s = o,
  18441. 0 < u && (c *= n * n / (2 * u),
  18442. l *= n * n / (2 * (u + .5))),
  18443. i += .5 * (o = c * _.beta.cdf(a, u + .5, e / 2) + l * _.beta.cdf(a, u + 1, e / 2)),
  18444. u++;
  18445. return r ? 1 - i : i
  18446. }
  18447. }),
  18448. _.extend(_.normal, {
  18449. pdf: function(t, e, n) {
  18450. return x.exp(-.5 * x.log(2 * x.PI) - x.log(n) - x.pow(t - e, 2) / (2 * n * n))
  18451. },
  18452. cdf: function(t, e, n) {
  18453. return .5 * (1 + _.erf((t - e) / x.sqrt(2 * n * n)))
  18454. },
  18455. inv: function(t, e, n) {
  18456. return -1.4142135623730951 * n * _.erfcinv(2 * t) + e
  18457. },
  18458. mean: function(t) {
  18459. return t
  18460. },
  18461. median: function(t) {
  18462. return t
  18463. },
  18464. mode: function(t) {
  18465. return t
  18466. },
  18467. sample: function(t, e) {
  18468. return _.randn() * e + t
  18469. },
  18470. variance: function(t, e) {
  18471. return e * e
  18472. }
  18473. }),
  18474. _.extend(_.pareto, {
  18475. pdf: function(t, e, n) {
  18476. return t < e ? 0 : n * x.pow(e, n) / x.pow(t, n + 1)
  18477. },
  18478. cdf: function(t, e, n) {
  18479. return t < e ? 0 : 1 - x.pow(e / t, n)
  18480. },
  18481. inv: function(t, e, n) {
  18482. return e / x.pow(1 - t, 1 / n)
  18483. },
  18484. mean: function(t, e) {
  18485. if (!(e <= 1))
  18486. return e * x.pow(t, e) / (e - 1)
  18487. },
  18488. median: function(t, e) {
  18489. return t * (e * x.SQRT2)
  18490. },
  18491. mode: function(t) {
  18492. return t
  18493. },
  18494. variance: function(t, e) {
  18495. if (!(e <= 2))
  18496. return t * t * e / (x.pow(e - 1, 2) * (e - 2))
  18497. }
  18498. }),
  18499. _.extend(_.studentt, {
  18500. pdf: function(t, e) {
  18501. return e = 1e100 < e ? 1e100 : e,
  18502. 1 / (x.sqrt(e) * _.betafn(.5, e / 2)) * x.pow(1 + t * t / e, -(e + 1) / 2)
  18503. },
  18504. cdf: function(t, e) {
  18505. var n = e / 2;
  18506. return _.ibeta((t + x.sqrt(t * t + e)) / (2 * x.sqrt(t * t + e)), n, n)
  18507. },
  18508. inv: function(t, e) {
  18509. var n = _.ibetainv(2 * x.min(t, 1 - t), .5 * e, .5)
  18510. , n = x.sqrt(e * (1 - n) / n);
  18511. return .5 < t ? n : -n
  18512. },
  18513. mean: function(t) {
  18514. return 1 < t ? 0 : void 0
  18515. },
  18516. median: function() {
  18517. return 0
  18518. },
  18519. mode: function() {
  18520. return 0
  18521. },
  18522. sample: function(t) {
  18523. return _.randn() * x.sqrt(t / (2 * _.randg(t / 2)))
  18524. },
  18525. variance: function(t) {
  18526. return 2 < t ? t / (t - 2) : 1 < t ? 1 / 0 : void 0
  18527. }
  18528. }),
  18529. _.extend(_.weibull, {
  18530. pdf: function(t, e, n) {
  18531. return t < 0 || e < 0 || n < 0 ? 0 : n / e * x.pow(t / e, n - 1) * x.exp(-x.pow(t / e, n))
  18532. },
  18533. cdf: function(t, e, n) {
  18534. return t < 0 ? 0 : 1 - x.exp(-x.pow(t / e, n))
  18535. },
  18536. inv: function(t, e, n) {
  18537. return e * x.pow(-x.log(1 - t), 1 / n)
  18538. },
  18539. mean: function(t, e) {
  18540. return t * _.gammafn(1 + 1 / e)
  18541. },
  18542. median: function(t, e) {
  18543. return t * x.pow(x.log(2), 1 / e)
  18544. },
  18545. mode: function(t, e) {
  18546. return e <= 1 ? 0 : t * x.pow((e - 1) / e, 1 / e)
  18547. },
  18548. sample: function(t, e) {
  18549. return t * x.pow(-x.log(_._random_fn()), 1 / e)
  18550. },
  18551. variance: function(t, e) {
  18552. return t * t * _.gammafn(1 + 2 / e) - x.pow(_.weibull.mean(t, e), 2)
  18553. }
  18554. }),
  18555. _.extend(_.uniform, {
  18556. pdf: function(t, e, n) {
  18557. return t < e || n < t ? 0 : 1 / (n - e)
  18558. },
  18559. cdf: function(t, e, n) {
  18560. return t < e ? 0 : t < n ? (t - e) / (n - e) : 1
  18561. },
  18562. inv: function(t, e, n) {
  18563. return e + t * (n - e)
  18564. },
  18565. mean: function(t, e) {
  18566. return .5 * (t + e)
  18567. },
  18568. median: function(t, e) {
  18569. return _.mean(t, e)
  18570. },
  18571. mode: function() {
  18572. throw new Error("mode is not yet implemented")
  18573. },
  18574. sample: function(t, e) {
  18575. return t / 2 + e / 2 + (e / 2 - t / 2) * (2 * _._random_fn() - 1)
  18576. },
  18577. variance: function(t, e) {
  18578. return x.pow(e - t, 2) / 12
  18579. }
  18580. }),
  18581. _.extend(_.binomial, {
  18582. pdf: function(t, e, n) {
  18583. return 0 === n || 1 === n ? e * n === t ? 1 : 0 : _.combination(e, t) * x.pow(n, t) * x.pow(1 - n, e - t)
  18584. },
  18585. cdf: function(t, e, n) {
  18586. if (t < 0)
  18587. return 0;
  18588. if (e <= t)
  18589. return 1;
  18590. if (n < 0 || 1 < n || e <= 0)
  18591. return NaN;
  18592. var r = n
  18593. , i = (t = x.floor(t)) + 1
  18594. , n = e - t
  18595. , e = i + n
  18596. , t = x.exp(_.gammaln(e) - _.gammaln(n) - _.gammaln(i) + i * x.log(r) + n * x.log(1 - r))
  18597. , i = r < (i + 1) / (e + 2) ? t * o(r, i, n, 1e-10) : 1 - t * o(1 - r, n, i, 1e-10);
  18598. return x.round(1e10 * (1 - i)) / 1e10
  18599. }
  18600. }),
  18601. _.extend(_.negbin, {
  18602. pdf: function(t, e, n) {
  18603. return t === t >>> 0 && (t < 0 ? 0 : _.combination(t + e - 1, e - 1) * x.pow(1 - n, t) * x.pow(n, e))
  18604. },
  18605. cdf: function(t, e, n) {
  18606. var r = 0
  18607. , i = 0;
  18608. if (t < 0)
  18609. return 0;
  18610. for (; i <= t; i++)
  18611. r += _.negbin.pdf(i, e, n);
  18612. return r
  18613. }
  18614. }),
  18615. _.extend(_.hypgeom, {
  18616. pdf: function(t, e, n, r) {
  18617. if (t != t | 0)
  18618. return !1;
  18619. if (t < 0 || t < n - (e - r))
  18620. return 0;
  18621. if (r < t || n < t)
  18622. return 0;
  18623. if (e < 2 * n)
  18624. return e < 2 * r ? _.hypgeom.pdf(e - n - r + t, e, e - n, e - r) : _.hypgeom.pdf(r - t, e, e - n, r);
  18625. if (e < 2 * r)
  18626. return _.hypgeom.pdf(n - t, e, n, e - r);
  18627. if (n < r)
  18628. return _.hypgeom.pdf(t, e, r, n);
  18629. for (var i = 1, o = 0, s = 0; s < t; s++) {
  18630. for (; 1 < i && o < r;)
  18631. i *= 1 - n / (e - o),
  18632. o++;
  18633. i *= (r - s) * (n - s) / ((s + 1) * (e - n - r + s + 1))
  18634. }
  18635. for (; o < r; o++)
  18636. i *= 1 - n / (e - o);
  18637. return x.min(1, x.max(0, i))
  18638. },
  18639. cdf: function(t, e, n, r) {
  18640. if (t < 0 || t < n - (e - r))
  18641. return 0;
  18642. if (r <= t || n <= t)
  18643. return 1;
  18644. if (e < 2 * n)
  18645. return e < 2 * r ? _.hypgeom.cdf(e - n - r + t, e, e - n, e - r) : 1 - _.hypgeom.cdf(r - t - 1, e, e - n, r);
  18646. if (e < 2 * r)
  18647. return 1 - _.hypgeom.cdf(n - t - 1, e, n, e - r);
  18648. if (n < r)
  18649. return _.hypgeom.cdf(t, e, r, n);
  18650. for (var i = 1, o = 1, s = 0, a = 0; a < t; a++) {
  18651. for (; 1 < i && s < r;) {
  18652. var u = 1 - n / (e - s);
  18653. o *= u,
  18654. i *= u,
  18655. s++
  18656. }
  18657. i += o *= (r - a) * (n - a) / ((a + 1) * (e - n - r + a + 1))
  18658. }
  18659. for (; s < r; s++)
  18660. i *= 1 - n / (e - s);
  18661. return x.min(1, x.max(0, i))
  18662. }
  18663. }),
  18664. _.extend(_.poisson, {
  18665. pdf: function(t, e) {
  18666. return e < 0 || t % 1 != 0 || t < 0 ? 0 : x.pow(e, t) * x.exp(-e) / _.factorial(t)
  18667. },
  18668. cdf: function(t, e) {
  18669. var n = []
  18670. , r = 0;
  18671. if (t < 0)
  18672. return 0;
  18673. for (; r <= t; r++)
  18674. n.push(_.poisson.pdf(r, e));
  18675. return _.sum(n)
  18676. },
  18677. mean: function(t) {
  18678. return t
  18679. },
  18680. variance: function(t) {
  18681. return t
  18682. },
  18683. sampleSmall: function(t) {
  18684. for (var e = 1, n = 0, r = x.exp(-t); n++,
  18685. e *= _._random_fn(),
  18686. r < e;)
  18687. ;
  18688. return n - 1
  18689. },
  18690. sampleLarge: function(t) {
  18691. for (var e, n, r, i = t, t = x.sqrt(i), o = x.log(i), s = .931 + 2.53 * t, a = .02483 * s - .059, u = 1.1239 + 1.1328 / (s - 3.4), c = .9277 - 3.6224 / (s - 2); ;) {
  18692. if (e = x.random() - .5,
  18693. n = x.random(),
  18694. r = .5 - x.abs(e),
  18695. e = x.floor((2 * a / r + s) * e + i + .43),
  18696. .07 <= r && n <= c)
  18697. return e;
  18698. if (!(e < 0 || r < .013 && r < n) && x.log(n) + x.log(u) - x.log(a / (r * r) + s) <= e * o - i - _.loggam(e + 1))
  18699. return e
  18700. }
  18701. },
  18702. sample: function(t) {
  18703. return t < 10 ? this.sampleSmall(t) : this.sampleLarge(t)
  18704. }
  18705. }),
  18706. _.extend(_.triangular, {
  18707. pdf: function(t, e, n, r) {
  18708. return n <= e || r < e || n < r ? NaN : t < e || n < t ? 0 : t < r ? 2 * (t - e) / ((n - e) * (r - e)) : t === r ? 2 / (n - e) : 2 * (n - t) / ((n - e) * (n - r))
  18709. },
  18710. cdf: function(t, e, n, r) {
  18711. return n <= e || r < e || n < r ? NaN : t <= e ? 0 : n <= t ? 1 : t <= r ? x.pow(t - e, 2) / ((n - e) * (r - e)) : 1 - x.pow(n - t, 2) / ((n - e) * (n - r))
  18712. },
  18713. inv: function(t, e, n, r) {
  18714. return n <= e || r < e || n < r ? NaN : t <= (r - e) / (n - e) ? e + (n - e) * x.sqrt(t * ((r - e) / (n - e))) : e + (n - e) * (1 - x.sqrt((1 - t) * (1 - (r - e) / (n - e))))
  18715. },
  18716. mean: function(t, e, n) {
  18717. return (t + e + n) / 3
  18718. },
  18719. median: function(t, e, n) {
  18720. return n <= (t + e) / 2 ? e - x.sqrt((e - t) * (e - n)) / x.sqrt(2) : (t + e) / 2 < n ? t + x.sqrt((e - t) * (n - t)) / x.sqrt(2) : void 0
  18721. },
  18722. mode: function(t, e, n) {
  18723. return n
  18724. },
  18725. sample: function(t, e, n) {
  18726. var r = _._random_fn();
  18727. return r < (n - t) / (e - t) ? t + x.sqrt(r * (e - t) * (n - t)) : e - x.sqrt((1 - r) * (e - t) * (e - n))
  18728. },
  18729. variance: function(t, e, n) {
  18730. return (t * t + e * e + n * n - t * e - t * n - e * n) / 18
  18731. }
  18732. }),
  18733. _.extend(_.arcsine, {
  18734. pdf: function(t, e, n) {
  18735. return n <= e ? NaN : t <= e || n <= t ? 0 : 2 / x.PI * x.pow(x.pow(n - e, 2) - x.pow(2 * t - e - n, 2), -.5)
  18736. },
  18737. cdf: function(t, e, n) {
  18738. return t < e ? 0 : t < n ? 2 / x.PI * x.asin(x.sqrt((t - e) / (n - e))) : 1
  18739. },
  18740. inv: function(t, e, n) {
  18741. return e + (.5 - .5 * x.cos(x.PI * t)) * (n - e)
  18742. },
  18743. mean: function(t, e) {
  18744. return e <= t ? NaN : (t + e) / 2
  18745. },
  18746. median: function(t, e) {
  18747. return e <= t ? NaN : (t + e) / 2
  18748. },
  18749. mode: function() {
  18750. throw new Error("mode is not yet implemented")
  18751. },
  18752. sample: function(t, e) {
  18753. return (t + e) / 2 + (e - t) / 2 * x.sin(2 * x.PI * _.uniform.sample(0, 1))
  18754. },
  18755. variance: function(t, e) {
  18756. return e <= t ? NaN : x.pow(e - t, 2) / 8
  18757. }
  18758. }),
  18759. _.extend(_.laplace, {
  18760. pdf: function(t, e, n) {
  18761. return n <= 0 ? 0 : x.exp(-x.abs(t - e) / n) / (2 * n)
  18762. },
  18763. cdf: function(t, e, n) {
  18764. return n <= 0 ? 0 : t < e ? .5 * x.exp((t - e) / n) : 1 - .5 * x.exp(-(t - e) / n)
  18765. },
  18766. mean: function(t) {
  18767. return t
  18768. },
  18769. median: function(t) {
  18770. return t
  18771. },
  18772. mode: function(t) {
  18773. return t
  18774. },
  18775. variance: function(t, e) {
  18776. return 2 * e * e
  18777. },
  18778. sample: function(t, e) {
  18779. var n = _._random_fn() - .5;
  18780. return t - e * ((e = n) / x.abs(e)) * x.log(1 - 2 * x.abs(n))
  18781. }
  18782. }),
  18783. _.extend(_.tukey, {
  18784. cdf: function(t, e, n) {
  18785. var r = e
  18786. , i = [.9894009349916499, .9445750230732326, .8656312023878318, .755404408355003, .6178762444026438, .45801677765722737, .2816035507792589, .09501250983763744]
  18787. , o = [.027152459411754096, .062253523938647894, .09515851168249279, .12462897125553388, .14959598881657674, .16915651939500254, .18260341504492358, .1894506104550685];
  18788. if (t <= 0)
  18789. return 0;
  18790. if (n < 2 || r < 2)
  18791. return NaN;
  18792. if (!Number.isFinite(t))
  18793. return 1;
  18794. if (25e3 < n)
  18795. return v(t, 1, r);
  18796. var e = .5 * n
  18797. , s = e * x.log(n) - n * x.log(2) - _.gammaln(e)
  18798. , a = e - 1
  18799. , u = .25 * n
  18800. , c = n <= 100 ? 1 : n <= 800 ? .5 : n <= 5e3 ? .25 : .125;
  18801. s += x.log(c);
  18802. for (var l = 0, h = 1; h <= 50; h++) {
  18803. for (var f = 0, p = (2 * h - 1) * c, d = 1; d <= 16; d++) {
  18804. var g, m = 8 < d ? (g = d - 8 - 1,
  18805. s + a * x.log(p + i[g] * c) - (i[g] * c + p) * u) : (g = d - 1,
  18806. s + a * x.log(p - i[g] * c) + (i[g] * c - p) * u);
  18807. -30 <= m && (f += v(8 < d ? t * x.sqrt(.5 * (i[g] * c + p)) : t * x.sqrt(.5 * (-i[g] * c + p)), 1, r) * o[g] * x.exp(m))
  18808. }
  18809. if (1 <= h * c && f <= 1e-14)
  18810. break;
  18811. l += f
  18812. }
  18813. if (1e-14 < f)
  18814. throw new Error("tukey.cdf failed to converge");
  18815. return 1 < l && (l = 1),
  18816. l
  18817. },
  18818. inv: function(t, e, n) {
  18819. if (n < 2 || e < 2)
  18820. return NaN;
  18821. if (t < 0 || 1 < t)
  18822. return NaN;
  18823. if (0 === t)
  18824. return 0;
  18825. if (1 === t)
  18826. return 1 / 0;
  18827. for (var r, i, o, s, a = (i = e,
  18828. o = n,
  18829. s = .5 - .5 * (r = t),
  18830. s = (r = x.sqrt(x.log(1 / (s * s)))) + ((((-453642210148e-16 * r - .204231210125) * r - .342242088547) * r - 1) * r + .322232421088) / ((((.0038560700634 * r + .10353775285) * r + .531103462366) * r + .588581570495) * r + .099348462606),
  18831. o < 120 && (s += (s * s * s + s) / o / 4),
  18832. r = .8832 - .2368 * s,
  18833. o < 120 && (r += -1.214 / o + 1.208 * s / o),
  18834. s * (r * x.log(i - 1) + 1.4142)), u = 0 < (f = _.tukey.cdf(a, e, n) - t) ? x.max(0, a - 1) : a + 1, c = _.tukey.cdf(u, e, n) - t, l = 1; l < 50; l++) {
  18835. var h = u - c * (u - a) / (c - f)
  18836. , f = c
  18837. , a = u;
  18838. if (h < 0 && (h = 0,
  18839. c = -t),
  18840. c = _.tukey.cdf(h, e, n) - t,
  18841. u = h,
  18842. x.abs(u - a) < 1e-4)
  18843. return h
  18844. }
  18845. throw new Error("tukey.inv failed to converge")
  18846. }
  18847. }),
  18848. m = f,
  18849. g = Math,
  18850. i = Array.prototype.push,
  18851. e = m.utils.isArray,
  18852. m.extend({
  18853. add: function(t, r) {
  18854. return y(r) ? (y(r[0]) || (r = [r]),
  18855. m.map(t, function(t, e, n) {
  18856. return t + r[e][n]
  18857. })) : m.map(t, function(t) {
  18858. return t + r
  18859. })
  18860. },
  18861. subtract: function(t, r) {
  18862. return y(r) ? (y(r[0]) || (r = [r]),
  18863. m.map(t, function(t, e, n) {
  18864. return t - r[e][n] || 0
  18865. })) : m.map(t, function(t) {
  18866. return t - r
  18867. })
  18868. },
  18869. divide: function(t, e) {
  18870. return y(e) ? (y(e[0]) || (e = [e]),
  18871. m.multiply(t, m.inv(e))) : m.map(t, function(t) {
  18872. return t / e
  18873. })
  18874. },
  18875. multiply: function(t, e) {
  18876. var n, r, i, o, s, a, u, c;
  18877. if (void 0 === t.length && void 0 === e.length)
  18878. return t * e;
  18879. if (s = t.length,
  18880. a = t[0].length,
  18881. u = m.zeros(s, i = y(e) ? e[0].length : a),
  18882. c = 0,
  18883. y(e)) {
  18884. for (; c < i; c++)
  18885. for (n = 0; n < s; n++) {
  18886. for (r = o = 0; r < a; r++)
  18887. o += t[n][r] * e[r][c];
  18888. u[n][c] = o
  18889. }
  18890. return 1 === s && 1 === c ? u[0][0] : u
  18891. }
  18892. return m.map(t, function(t) {
  18893. return t * e
  18894. })
  18895. },
  18896. outer: function(t, e) {
  18897. return m.multiply(t.map(function(t) {
  18898. return [t]
  18899. }), [e])
  18900. },
  18901. dot: function(t, e) {
  18902. y(t[0]) || (t = [t]),
  18903. y(e[0]) || (e = [e]);
  18904. for (var n, r, i = 1 === t[0].length && 1 !== t.length ? m.transpose(t) : t, o = 1 === e[0].length && 1 !== e.length ? m.transpose(e) : e, s = [], a = 0, u = i.length, c = i[0].length; a < u; a++) {
  18905. for (s[a] = [],
  18906. r = n = 0; r < c; r++)
  18907. n += i[a][r] * o[a][r];
  18908. s[a] = n
  18909. }
  18910. return 1 === s.length ? s[0] : s
  18911. },
  18912. pow: function(t, e) {
  18913. return m.map(t, function(t) {
  18914. return g.pow(t, e)
  18915. })
  18916. },
  18917. exp: function(t) {
  18918. return m.map(t, function(t) {
  18919. return g.exp(t)
  18920. })
  18921. },
  18922. log: function(t) {
  18923. return m.map(t, function(t) {
  18924. return g.log(t)
  18925. })
  18926. },
  18927. abs: function(t) {
  18928. return m.map(t, function(t) {
  18929. return g.abs(t)
  18930. })
  18931. },
  18932. norm: function(t, e) {
  18933. var n = 0
  18934. , r = 0;
  18935. for (isNaN(e) && (e = 2),
  18936. y(t[0]) && (t = t[0]); r < t.length; r++)
  18937. n += g.pow(g.abs(t[r]), e);
  18938. return g.pow(n, 1 / e)
  18939. },
  18940. angle: function(t, e) {
  18941. return g.acos(m.dot(t, e) / (m.norm(t) * m.norm(e)))
  18942. },
  18943. aug: function(t, e) {
  18944. for (var n = [], r = 0; r < t.length; r++)
  18945. n.push(t[r].slice());
  18946. for (r = 0; r < n.length; r++)
  18947. i.apply(n[r], e[r]);
  18948. return n
  18949. },
  18950. inv: function(t) {
  18951. for (var e, n = t.length, r = t[0].length, i = m.identity(n, r), o = m.gauss_jordan(t, i), s = [], a = 0; a < n; a++)
  18952. for (s[a] = [],
  18953. e = r; e < o[0].length; e++)
  18954. s[a][e - r] = o[a][e];
  18955. return s
  18956. },
  18957. det: function(t) {
  18958. var e, n = t.length, r = 2 * n, i = new Array(r), o = n - 1, s = r - 1, a = o - n + 1, u = s, c = 0, l = 0;
  18959. if (2 === n)
  18960. return t[0][0] * t[1][1] - t[0][1] * t[1][0];
  18961. for (; c < r; c++)
  18962. i[c] = 1;
  18963. for (c = 0; c < n; c++) {
  18964. for (e = 0; e < n; e++)
  18965. i[a < 0 ? a + n : a] *= t[c][e],
  18966. i[u < n ? u + n : u] *= t[c][e],
  18967. a++,
  18968. u--;
  18969. a = --o - n + 1,
  18970. u = --s
  18971. }
  18972. for (c = 0; c < n; c++)
  18973. l += i[c];
  18974. for (; c < r; c++)
  18975. l -= i[c];
  18976. return l
  18977. },
  18978. gauss_elimination: function(t, e) {
  18979. for (var n, r, i, o, s = 0, a = 0, u = t.length, c = t[0].length, l = 0, h = [], f = (t = m.aug(t, e))[0].length, s = 0; s < u; s++) {
  18980. for (r = t[s][s],
  18981. o = (a = s) + 1; o < c; o++)
  18982. r < g.abs(t[o][s]) && (r = t[o][s],
  18983. a = o);
  18984. if (a != s)
  18985. for (o = 0; o < f; o++)
  18986. i = t[s][o],
  18987. t[s][o] = t[a][o],
  18988. t[a][o] = i;
  18989. for (a = s + 1; a < u; a++)
  18990. for (n = t[a][s] / t[s][s],
  18991. o = s; o < f; o++)
  18992. t[a][o] = t[a][o] - n * t[s][o]
  18993. }
  18994. for (s = u - 1; 0 <= s; s--) {
  18995. for (l = 0,
  18996. a = s + 1; a <= u - 1; a++)
  18997. l += h[a] * t[s][a];
  18998. h[s] = (t[s][f - 1] - l) / t[s][s]
  18999. }
  19000. return h
  19001. },
  19002. gauss_jordan: function(t, e) {
  19003. for (var n, r = m.aug(t, e), i = r.length, o = r[0].length, s = 0, a = 0; a < i; a++) {
  19004. for (var u = a, c = a + 1; c < i; c++)
  19005. g.abs(r[c][a]) > g.abs(r[u][a]) && (u = c);
  19006. var l = r[a];
  19007. for (r[a] = r[u],
  19008. r[u] = l,
  19009. c = a + 1; c < i; c++)
  19010. for (s = r[c][a] / r[a][a],
  19011. n = a; n < o; n++)
  19012. r[c][n] -= r[a][n] * s
  19013. }
  19014. for (a = i - 1; 0 <= a; a--) {
  19015. for (s = r[a][a],
  19016. c = 0; c < a; c++)
  19017. for (n = o - 1; a - 1 < n; n--)
  19018. r[c][n] -= r[a][n] * r[c][a] / s;
  19019. for (r[a][a] /= s,
  19020. n = i; n < o; n++)
  19021. r[a][n] /= s
  19022. }
  19023. return r
  19024. },
  19025. triaUpSolve: function(n, t) {
  19026. var r, i = n[0].length, o = m.zeros(1, i)[0], e = !1;
  19027. return null != t[0].length && (t = t.map(function(t) {
  19028. return t[0]
  19029. }),
  19030. e = !0),
  19031. m.arange(i - 1, -1, -1).forEach(function(e) {
  19032. r = m.arange(e + 1, i).map(function(t) {
  19033. return o[t] * n[e][t]
  19034. }),
  19035. o[e] = (t[e] - m.sum(r)) / n[e][e]
  19036. }),
  19037. e ? o.map(function(t) {
  19038. return [t]
  19039. }) : o
  19040. },
  19041. triaLowSolve: function(n, t) {
  19042. var r, e = n[0].length, i = m.zeros(1, e)[0], o = !1;
  19043. return null != t[0].length && (t = t.map(function(t) {
  19044. return t[0]
  19045. }),
  19046. o = !0),
  19047. m.arange(e).forEach(function(e) {
  19048. r = m.arange(e).map(function(t) {
  19049. return n[e][t] * i[t]
  19050. }),
  19051. i[e] = (t[e] - m.sum(r)) / n[e][e]
  19052. }),
  19053. o ? i.map(function(t) {
  19054. return [t]
  19055. }) : i
  19056. },
  19057. lu: function(r) {
  19058. var t, e = r.length, i = m.identity(e), o = m.zeros(r.length, r[0].length);
  19059. return m.arange(e).forEach(function(t) {
  19060. o[0][t] = r[0][t]
  19061. }),
  19062. m.arange(1, e).forEach(function(n) {
  19063. m.arange(n).forEach(function(e) {
  19064. t = m.arange(e).map(function(t) {
  19065. return i[n][t] * o[t][e]
  19066. }),
  19067. i[n][e] = (r[n][e] - m.sum(t)) / o[e][e]
  19068. }),
  19069. m.arange(n, e).forEach(function(e) {
  19070. t = m.arange(n).map(function(t) {
  19071. return i[n][t] * o[t][e]
  19072. }),
  19073. o[n][e] = r[t.length][e] - m.sum(t)
  19074. })
  19075. }),
  19076. [i, o]
  19077. },
  19078. cholesky: function(t) {
  19079. var r, e = t.length, i = m.zeros(t.length, t[0].length);
  19080. return m.arange(e).forEach(function(n) {
  19081. r = m.arange(n).map(function(t) {
  19082. return g.pow(i[n][t], 2)
  19083. }),
  19084. i[n][n] = g.sqrt(t[n][n] - m.sum(r)),
  19085. m.arange(n + 1, e).forEach(function(e) {
  19086. r = m.arange(n).map(function(t) {
  19087. return i[n][t] * i[e][t]
  19088. }),
  19089. i[e][n] = (t[n][e] - m.sum(r)) / i[n][n]
  19090. })
  19091. }),
  19092. i
  19093. },
  19094. gauss_jacobi: function(t, e, n, r) {
  19095. for (var i, o, s, a, u = 0, c = 0, l = t.length, h = [], f = [], p = []; u < l; u++)
  19096. for (h[u] = [],
  19097. f[u] = [],
  19098. p[u] = [],
  19099. c = 0; c < l; c++)
  19100. c < u ? (h[u][c] = t[u][c],
  19101. f[u][c] = p[u][c] = 0) : u < c ? (f[u][c] = t[u][c],
  19102. h[u][c] = p[u][c] = 0) : (p[u][c] = t[u][c],
  19103. h[u][c] = f[u][c] = 0);
  19104. for (s = m.multiply(m.multiply(m.inv(p), m.add(h, f)), -1),
  19105. o = m.multiply(m.inv(p), e),
  19106. i = n,
  19107. a = m.add(m.multiply(s, n), o),
  19108. u = 2; g.abs(m.norm(m.subtract(a, i))) > r;)
  19109. i = a,
  19110. a = m.add(m.multiply(s, i), o),
  19111. u++;
  19112. return a
  19113. },
  19114. gauss_seidel: function(t, e, n, r) {
  19115. for (var i, o, s, a, u, c = 0, l = t.length, h = [], f = [], p = []; c < l; c++)
  19116. for (h[c] = [],
  19117. f[c] = [],
  19118. p[c] = [],
  19119. i = 0; i < l; i++)
  19120. i < c ? (h[c][i] = t[c][i],
  19121. f[c][i] = p[c][i] = 0) : c < i ? (f[c][i] = t[c][i],
  19122. h[c][i] = p[c][i] = 0) : (p[c][i] = t[c][i],
  19123. h[c][i] = f[c][i] = 0);
  19124. for (a = m.multiply(m.multiply(m.inv(m.add(p, h)), f), -1),
  19125. s = m.multiply(m.inv(m.add(p, h)), e),
  19126. o = n,
  19127. u = m.add(m.multiply(a, n), s),
  19128. c = 2; g.abs(m.norm(m.subtract(u, o))) > r;)
  19129. o = u,
  19130. u = m.add(m.multiply(a, o), s),
  19131. c += 1;
  19132. return u
  19133. },
  19134. SOR: function(t, e, n, r, i) {
  19135. for (var o, s, a, u, c, l = 0, h = t.length, f = [], p = [], d = []; l < h; l++)
  19136. for (f[l] = [],
  19137. p[l] = [],
  19138. d[l] = [],
  19139. o = 0; o < h; o++)
  19140. o < l ? (f[l][o] = t[l][o],
  19141. p[l][o] = d[l][o] = 0) : l < o ? (p[l][o] = t[l][o],
  19142. f[l][o] = d[l][o] = 0) : (d[l][o] = t[l][o],
  19143. f[l][o] = p[l][o] = 0);
  19144. for (u = m.multiply(m.inv(m.add(d, m.multiply(f, i))), m.subtract(m.multiply(d, 1 - i), m.multiply(p, i))),
  19145. a = m.multiply(m.multiply(m.inv(m.add(d, m.multiply(f, i))), e), i),
  19146. s = n,
  19147. c = m.add(m.multiply(u, n), a),
  19148. l = 2; g.abs(m.norm(m.subtract(c, s))) > r;)
  19149. s = c,
  19150. c = m.add(m.multiply(u, s), a),
  19151. l++;
  19152. return c
  19153. },
  19154. householder: function(t) {
  19155. for (var e, n, r, i, o, s = t.length, a = t[0].length, u = 0, c = []; u < s - 1; u++) {
  19156. for (n = 0,
  19157. o = u + 1; o < a; o++)
  19158. n += t[o][u] * t[o][u];
  19159. for (n = (0 < t[u + 1][u] ? -1 : 1) * g.sqrt(n),
  19160. r = g.sqrt((n * n - t[u + 1][u] * n) / 2),
  19161. (c = m.zeros(s, 1))[u + 1][0] = (t[u + 1][u] - n) / (2 * r),
  19162. i = u + 2; i < s; i++)
  19163. c[i][0] = t[i][u] / (2 * r);
  19164. e = m.subtract(m.identity(s, a), m.multiply(m.multiply(c, m.transpose(c)), 2)),
  19165. t = m.multiply(e, m.multiply(t, e))
  19166. }
  19167. return t
  19168. },
  19169. QR: (a = m.sum,
  19170. u = m.arange,
  19171. function(e) {
  19172. var t, n, r, i = e.length, o = e[0].length, s = m.zeros(o, o);
  19173. for (e = m.copy(e),
  19174. n = 0; n < o; n++) {
  19175. for (s[n][n] = g.sqrt(a(u(i).map(function(t) {
  19176. return e[t][n] * e[t][n]
  19177. }))),
  19178. t = 0; t < i; t++)
  19179. e[t][n] = e[t][n] / s[n][n];
  19180. for (r = n + 1; r < o; r++)
  19181. for (s[n][r] = a(u(i).map(function(t) {
  19182. return e[t][n] * e[t][r]
  19183. })),
  19184. t = 0; t < i; t++)
  19185. e[t][r] = e[t][r] - e[t][n] * s[n][r]
  19186. }
  19187. return [e, s]
  19188. }
  19189. ),
  19190. lstsq: function(t, e) {
  19191. var n = !1;
  19192. void 0 === e[0].length && (e = e.map(function(t) {
  19193. return [t]
  19194. }),
  19195. n = !0);
  19196. var o, s, r = (i = m.QR(t))[0], i = i[1], t = t[0].length, r = m.slice(r, {
  19197. col: {
  19198. end: t
  19199. }
  19200. }), t = m.slice(i, {
  19201. row: {
  19202. end: t
  19203. }
  19204. }), t = (o = t,
  19205. t = (o = m.copy(o)).length,
  19206. s = m.identity(t),
  19207. m.arange(t - 1, -1, -1).forEach(function(i) {
  19208. m.sliceAssign(s, {
  19209. row: i
  19210. }, m.divide(m.slice(s, {
  19211. row: i
  19212. }), o[i][i])),
  19213. m.sliceAssign(o, {
  19214. row: i
  19215. }, m.divide(m.slice(o, {
  19216. row: i
  19217. }), o[i][i])),
  19218. m.arange(i).forEach(function(t) {
  19219. var e = m.multiply(o[t][i], -1)
  19220. , n = m.slice(o, {
  19221. row: t
  19222. })
  19223. , r = m.multiply(m.slice(o, {
  19224. row: i
  19225. }), e);
  19226. m.sliceAssign(o, {
  19227. row: t
  19228. }, m.add(n, r));
  19229. r = m.slice(s, {
  19230. row: t
  19231. }),
  19232. e = m.multiply(m.slice(s, {
  19233. row: i
  19234. }), e);
  19235. m.sliceAssign(s, {
  19236. row: t
  19237. }, m.add(r, e))
  19238. })
  19239. }),
  19240. s);
  19241. return void 0 === (r = m.transpose(r))[0].length && (r = [r]),
  19242. void 0 === (e = m.multiply(m.multiply(t, r), e)).length && (e = [[e]]),
  19243. n ? e.map(function(t) {
  19244. return t[0]
  19245. }) : e
  19246. },
  19247. jacobi: function(t) {
  19248. for (var e, n, r, i, o, s, a, u = 1, c = t.length, l = m.identity(c, c), h = []; 1 === u;) {
  19249. for (o = t[0][1],
  19250. i = 1,
  19251. e = r = 0; e < c; e++)
  19252. for (n = 0; n < c; n++)
  19253. e != n && o < g.abs(t[e][n]) && (o = g.abs(t[e][n]),
  19254. r = e,
  19255. i = n);
  19256. for (s = t[r][r] === t[i][i] ? 0 < t[r][i] ? g.PI / 4 : -g.PI / 4 : g.atan(2 * t[r][i] / (t[r][r] - t[i][i])) / 2,
  19257. (a = m.identity(c, c))[r][r] = g.cos(s),
  19258. a[r][i] = -g.sin(s),
  19259. a[i][r] = g.sin(s),
  19260. a[i][i] = g.cos(s),
  19261. l = m.multiply(l, a),
  19262. t = m.multiply(m.multiply(m.inv(a), t), a),
  19263. u = 0,
  19264. e = 1; e < c; e++)
  19265. for (n = 1; n < c; n++)
  19266. e != n && .001 < g.abs(t[e][n]) && (u = 1)
  19267. }
  19268. for (e = 0; e < c; e++)
  19269. h.push(t[e][e]);
  19270. return [l, h]
  19271. },
  19272. rungekutta: function(t, e, n, r, i, o) {
  19273. var s, a, u;
  19274. if (2 === o)
  19275. for (; r <= n;)
  19276. i = i + ((s = e * t(r, i)) + (a = e * t(r + e, i + s))) / 2,
  19277. r += e;
  19278. if (4 === o)
  19279. for (; r <= n;)
  19280. i = i + ((s = e * t(r, i)) + 2 * (a = e * t(r + e / 2, i + s / 2)) + 2 * (u = e * t(r + e / 2, i + a / 2)) + e * t(r + e, i + u)) / 6,
  19281. r += e;
  19282. return i
  19283. },
  19284. romberg: function(t, e, n, r) {
  19285. for (var i, o, s, a, u, c = 0, l = (n - e) / 2, h = [], f = [], p = []; c < r / 2;) {
  19286. for (u = t(e),
  19287. s = e,
  19288. a = 0; s <= n; s += l,
  19289. a++)
  19290. h[a] = s;
  19291. for (i = h.length,
  19292. s = 1; s < i - 1; s++)
  19293. u += (s % 2 != 0 ? 4 : 2) * t(h[s]);
  19294. u = l / 3 * (u + t(n)),
  19295. p[c] = u,
  19296. l /= 2,
  19297. c++
  19298. }
  19299. for (o = p.length,
  19300. i = 1; 1 !== o;) {
  19301. for (s = 0; s < o - 1; s++)
  19302. f[s] = (g.pow(4, i) * p[s + 1] - p[s]) / (g.pow(4, i) - 1);
  19303. o = f.length,
  19304. p = f,
  19305. f = [],
  19306. i++
  19307. }
  19308. return p
  19309. },
  19310. richardson: function(t, e, n, r) {
  19311. function i(t, e) {
  19312. for (var n, r = 0, i = t.length; r < i; r++)
  19313. t[r] === e && (n = r);
  19314. return n
  19315. }
  19316. for (var o, s, a, u, c, l = g.abs(n - t[i(t, n) + 1]), h = 0, f = [], p = []; l <= r;)
  19317. o = i(t, n + r),
  19318. s = i(t, n),
  19319. f[h] = (e[o] - 2 * e[s] + e[2 * s - o]) / (r * r),
  19320. r /= 2,
  19321. h++;
  19322. for (u = f.length,
  19323. a = 1; 1 != u;) {
  19324. for (c = 0; c < u - 1; c++)
  19325. p[c] = (g.pow(4, a) * f[c + 1] - f[c]) / (g.pow(4, a) - 1);
  19326. u = p.length,
  19327. f = p,
  19328. p = [],
  19329. a++
  19330. }
  19331. return f
  19332. },
  19333. simpson: function(t, e, n, r) {
  19334. for (var i, o = (n - e) / r, s = t(e), a = [], u = e, c = 0, l = 1; u <= n; u += o,
  19335. c++)
  19336. a[c] = u;
  19337. for (i = a.length; l < i - 1; l++)
  19338. s += (l % 2 != 0 ? 4 : 2) * t(a[l]);
  19339. return o / 3 * (s + t(n))
  19340. },
  19341. hermite: function(t, e, n, r) {
  19342. for (var i, o = t.length, s = 0, a = 0, u = [], c = [], l = [], h = []; a < o; a++) {
  19343. for (u[a] = 1,
  19344. i = 0; i < o; i++)
  19345. a != i && (u[a] *= (r - t[i]) / (t[a] - t[i]));
  19346. for (i = c[a] = 0; i < o; i++)
  19347. a != i && (c[a] += 1 / (t[a] - t[i]));
  19348. l[a] = (1 - 2 * (r - t[a]) * c[a]) * (u[a] * u[a]),
  19349. h[a] = (r - t[a]) * (u[a] * u[a]),
  19350. s += l[a] * e[a] + h[a] * n[a]
  19351. }
  19352. return s
  19353. },
  19354. lagrange: function(t, e, n) {
  19355. for (var r, i, o = 0, s = 0, a = t.length; s < a; s++) {
  19356. for (i = e[s],
  19357. r = 0; r < a; r++)
  19358. s != r && (i *= (n - t[r]) / (t[s] - t[r]));
  19359. o += i
  19360. }
  19361. return o
  19362. },
  19363. cubic_spline: function(t, e, n) {
  19364. for (var r, i, o = t.length, s = 0, a = [], u = [], c = [], l = [], h = [], f = []; s < o - 1; s++)
  19365. l[s] = t[s + 1] - t[s];
  19366. for (c[0] = 0,
  19367. s = 1; s < o - 1; s++)
  19368. c[s] = 3 / l[s] * (e[s + 1] - e[s]) - 3 / l[s - 1] * (e[s] - e[s - 1]);
  19369. for (s = 1; s < o - 1; s++)
  19370. a[s] = [],
  19371. u[s] = [],
  19372. a[s][s - 1] = l[s - 1],
  19373. a[s][s] = 2 * (l[s - 1] + l[s]),
  19374. a[s][s + 1] = l[s],
  19375. u[s][0] = c[s];
  19376. for (i = m.multiply(m.inv(a), u),
  19377. r = 0; r < o - 1; r++)
  19378. h[r] = (e[r + 1] - e[r]) / l[r] - l[r] * (i[r + 1][0] + 2 * i[r][0]) / 3,
  19379. f[r] = (i[r + 1][0] - i[r][0]) / (3 * l[r]);
  19380. for (r = 0; r < o && !(t[r] > n); r++)
  19381. ;
  19382. return e[--r] + (n - t[r]) * h[r] + m.sq(n - t[r]) * i[r] + (n - t[r]) * m.sq(n - t[r]) * f[r]
  19383. },
  19384. gauss_quadrature: function() {
  19385. throw new Error("gauss_quadrature not yet implemented")
  19386. },
  19387. PCA: function(t) {
  19388. for (var e, n, r, i, o, s, a = t.length, u = t[0].length, c = 0, l = [], h = [], f = [], p = [], d = [], g = [], c = 0; c < a; c++)
  19389. l[c] = m.sum(t[c]) / u;
  19390. for (c = 0; c < u; c++)
  19391. for (p[c] = [],
  19392. e = 0; e < a; e++)
  19393. p[c][e] = t[e][c] - l[e];
  19394. for (p = m.transpose(p),
  19395. c = 0; c < a; c++)
  19396. for (d[c] = [],
  19397. e = 0; e < a; e++)
  19398. d[c][e] = m.dot([p[c]], [p[e]]) / (u - 1);
  19399. for (s = (r = m.jacobi(d))[0],
  19400. h = r[1],
  19401. g = m.transpose(s),
  19402. c = 0; c < h.length; c++)
  19403. for (e = c; e < h.length; e++)
  19404. h[c] < h[e] && (n = h[c],
  19405. h[c] = h[e],
  19406. h[e] = n,
  19407. i = g[c],
  19408. g[c] = g[e],
  19409. g[e] = i);
  19410. for (o = m.transpose(p),
  19411. c = 0; c < a; c++)
  19412. for (f[c] = [],
  19413. e = 0; e < o.length; e++)
  19414. f[c][e] = m.dot([g[c]], [o[e]]);
  19415. return [t, h, g, f]
  19416. }
  19417. }),
  19418. function(t) {
  19419. for (var e = 0; e < t.length; e++)
  19420. !function(r) {
  19421. m.fn[r] = function(t, e) {
  19422. var n = this;
  19423. return e ? (setTimeout(function() {
  19424. e.call(n, m.fn[r].call(n, t))
  19425. }, 15),
  19426. this) : "number" == typeof m[r](this, t) ? m[r](this, t) : m(m[r](this, t))
  19427. }
  19428. }(t[e])
  19429. }("add divide multiply subtract dot pow exp log abs norm angle".split(" ")),
  19430. c = f,
  19431. l = Math,
  19432. h = [].slice,
  19433. s = c.utils.isNumber,
  19434. n = c.utils.isArray,
  19435. c.extend({
  19436. zscore: function() {
  19437. var t = h.call(arguments);
  19438. return s(t[1]) ? (t[0] - t[1]) / t[2] : (t[0] - c.mean(t[1])) / c.stdev(t[1], t[2])
  19439. },
  19440. ztest: function() {
  19441. var t, e = h.call(arguments);
  19442. return n(e[1]) ? (t = c.zscore(e[0], e[1], e[3]),
  19443. 1 === e[2] ? c.normal.cdf(-l.abs(t), 0, 1) : 2 * c.normal.cdf(-l.abs(t), 0, 1)) : 2 < e.length ? (t = c.zscore(e[0], e[1], e[2]),
  19444. 1 === e[3] ? c.normal.cdf(-l.abs(t), 0, 1) : 2 * c.normal.cdf(-l.abs(t), 0, 1)) : (t = e[0],
  19445. 1 === e[1] ? c.normal.cdf(-l.abs(t), 0, 1) : 2 * c.normal.cdf(-l.abs(t), 0, 1))
  19446. }
  19447. }),
  19448. c.extend(c.fn, {
  19449. zscore: function(t, e) {
  19450. return (t - this.mean()) / this.stdev(e)
  19451. },
  19452. ztest: function(t, e, n) {
  19453. n = l.abs(this.zscore(t, n));
  19454. return 1 === e ? c.normal.cdf(-n, 0, 1) : 2 * c.normal.cdf(-n, 0, 1)
  19455. }
  19456. }),
  19457. c.extend({
  19458. tscore: function() {
  19459. var t = h.call(arguments);
  19460. return 4 === t.length ? (t[0] - t[1]) / (t[2] / l.sqrt(t[3])) : (t[0] - c.mean(t[1])) / (c.stdev(t[1], !0) / l.sqrt(t[1].length))
  19461. },
  19462. ttest: function() {
  19463. var t, e = h.call(arguments);
  19464. return 5 === e.length ? (t = l.abs(c.tscore(e[0], e[1], e[2], e[3])),
  19465. 1 === e[4] ? c.studentt.cdf(-t, e[3] - 1) : 2 * c.studentt.cdf(-t, e[3] - 1)) : s(e[1]) ? (t = l.abs(e[0]),
  19466. 1 == e[2] ? c.studentt.cdf(-t, e[1] - 1) : 2 * c.studentt.cdf(-t, e[1] - 1)) : (t = l.abs(c.tscore(e[0], e[1])),
  19467. 1 == e[2] ? c.studentt.cdf(-t, e[1].length - 1) : 2 * c.studentt.cdf(-t, e[1].length - 1))
  19468. }
  19469. }),
  19470. c.extend(c.fn, {
  19471. tscore: function(t) {
  19472. return (t - this.mean()) / (this.stdev(!0) / l.sqrt(this.cols()))
  19473. },
  19474. ttest: function(t, e) {
  19475. return 1 === e ? 1 - c.studentt.cdf(l.abs(this.tscore(t)), this.cols() - 1) : 2 * c.studentt.cdf(-l.abs(this.tscore(t)), this.cols() - 1)
  19476. }
  19477. }),
  19478. c.extend({
  19479. anovafscore: function() {
  19480. var t, e, n, r, i, o, s, a, u = h.call(arguments);
  19481. if (1 === u.length) {
  19482. for (i = new Array(u[0].length),
  19483. s = 0; s < u[0].length; s++)
  19484. i[s] = u[0][s];
  19485. u = i
  19486. }
  19487. for (e = new Array,
  19488. s = 0; s < u.length; s++)
  19489. e = e.concat(u[s]);
  19490. for (n = c.mean(e),
  19491. s = t = 0; s < u.length; s++)
  19492. t += u[s].length * l.pow(c.mean(u[s]) - n, 2);
  19493. for (t /= u.length - 1,
  19494. s = o = 0; s < u.length; s++)
  19495. for (r = c.mean(u[s]),
  19496. a = 0; a < u[s].length; a++)
  19497. o += l.pow(u[s][a] - r, 2);
  19498. return t / (o /= e.length - u.length)
  19499. },
  19500. anovaftest: function() {
  19501. var t, e = h.call(arguments);
  19502. if (s(e[0]))
  19503. return 1 - c.centralF.cdf(e[0], e[1], e[2]);
  19504. for (var n = c.anovafscore(e), r = e.length - 1, i = 0, o = 0; o < e.length; o++)
  19505. i += e[o].length;
  19506. return t = i - r - 1,
  19507. 1 - c.centralF.cdf(n, r, t)
  19508. },
  19509. ftest: function(t, e, n) {
  19510. return 1 - c.centralF.cdf(t, e, n)
  19511. }
  19512. }),
  19513. c.extend(c.fn, {
  19514. anovafscore: function() {
  19515. return c.anovafscore(this.toArray())
  19516. },
  19517. anovaftes: function() {
  19518. for (var t = 0, e = 0; e < this.length; e++)
  19519. t += this[e].length;
  19520. return c.ftest(this.anovafscore(), this.length - 1, t - this.length)
  19521. }
  19522. }),
  19523. c.extend({
  19524. qscore: function() {
  19525. var t, e, n, r, i = h.call(arguments), i = s(i[0]) ? (t = i[0],
  19526. e = i[1],
  19527. n = i[2],
  19528. r = i[3],
  19529. i[4]) : (t = c.mean(i[0]),
  19530. e = c.mean(i[1]),
  19531. n = i[0].length,
  19532. r = i[1].length,
  19533. i[2]);
  19534. return l.abs(t - e) / (i * l.sqrt((1 / n + 1 / r) / 2))
  19535. },
  19536. qtest: function() {
  19537. var t, e = h.call(arguments), n = (e = 3 === e.length ? (t = e[0],
  19538. e.slice(1)) : 7 === e.length ? (t = c.qscore(e[0], e[1], e[2], e[3], e[4]),
  19539. e.slice(5)) : (t = c.qscore(e[0], e[1], e[2]),
  19540. e.slice(3)))[0], e = e[1];
  19541. return 1 - c.tukey.cdf(t, e, n - e)
  19542. },
  19543. tukeyhsd: function(t) {
  19544. for (var e = c.pooledstdev(t), n = t.map(function(t) {
  19545. return c.mean(t)
  19546. }), r = t.reduce(function(t, e) {
  19547. return t + e.length
  19548. }, 0), i = [], o = 0; o < t.length; ++o)
  19549. for (var s = o + 1; s < t.length; ++s) {
  19550. var a = c.qtest(n[o], n[s], t[o].length, t[s].length, e, r, t.length);
  19551. i.push([[o, s], a])
  19552. }
  19553. return i
  19554. }
  19555. }),
  19556. c.extend({
  19557. normalci: function() {
  19558. var t = h.call(arguments)
  19559. , e = new Array(2)
  19560. , n = 4 === t.length ? l.abs(c.normal.inv(t[1] / 2, 0, 1) * t[2] / l.sqrt(t[3])) : l.abs(c.normal.inv(t[1] / 2, 0, 1) * c.stdev(t[2]) / l.sqrt(t[2].length));
  19561. return e[0] = t[0] - n,
  19562. e[1] = t[0] + n,
  19563. e
  19564. },
  19565. tci: function() {
  19566. var t = h.call(arguments)
  19567. , e = new Array(2)
  19568. , n = 4 === t.length ? l.abs(c.studentt.inv(t[1] / 2, t[3] - 1) * t[2] / l.sqrt(t[3])) : l.abs(c.studentt.inv(t[1] / 2, t[2].length - 1) * c.stdev(t[2], !0) / l.sqrt(t[2].length));
  19569. return e[0] = t[0] - n,
  19570. e[1] = t[0] + n,
  19571. e
  19572. },
  19573. significant: function(t, e) {
  19574. return t < e
  19575. }
  19576. }),
  19577. c.extend(c.fn, {
  19578. normalci: function(t, e) {
  19579. return c.normalci(t, e, this.toArray())
  19580. },
  19581. tci: function(t, e) {
  19582. return c.tci(t, e, this.toArray())
  19583. }
  19584. }),
  19585. c.extend(c.fn, {
  19586. oneSidedDifferenceOfProportions: function(t, e, n, r) {
  19587. r = b(t, e, n, r);
  19588. return c.ztest(r, 1)
  19589. },
  19590. twoSidedDifferenceOfProportions: function(t, e, n, r) {
  19591. r = b(t, e, n, r);
  19592. return c.ztest(r, 2)
  19593. }
  19594. }),
  19595. f.models = {
  19596. ols: function(t, e) {
  19597. var n = w(t, e)
  19598. , r = C(n)
  19599. , t = {
  19600. F_statistic: t = (i = n).R2 / i.df_model / ((1 - i.R2) / i.df_resid),
  19601. pvalue: 1 - (e = t,
  19602. t = i.df_model,
  19603. i = i.df_resid,
  19604. f.beta.cdf(e / (i / t + e), t / 2, i / 2))
  19605. }
  19606. , i = 1 - (1 - n.R2) * ((n.nobs - 1) / n.df_resid);
  19607. return n.t = r,
  19608. n.f = t,
  19609. n.adjust_R2 = i,
  19610. n
  19611. }
  19612. },
  19613. f.extend({
  19614. buildxmatrix: function() {
  19615. for (var t = new Array(arguments.length), e = 0; e < arguments.length; e++)
  19616. t[e] = [1].concat(arguments[e]);
  19617. return f(t)
  19618. },
  19619. builddxmatrix: function(t) {
  19620. for (var e = new Array(t.length), n = 0; n < t.length; n++)
  19621. e[n] = [1].concat(t[n]);
  19622. return f(e)
  19623. },
  19624. buildjxmatrix: function(t) {
  19625. for (var e = new Array(t.length), n = 0; n < t.length; n++)
  19626. e[n] = t[n];
  19627. return f.builddxmatrix(e)
  19628. },
  19629. buildymatrix: function(t) {
  19630. return f(t).transpose()
  19631. },
  19632. buildjymatrix: function(t) {
  19633. return t.transpose()
  19634. },
  19635. matrixmult: function(t, e) {
  19636. var n, r, i, o, s;
  19637. if (t.cols() == e.rows()) {
  19638. if (1 < e.rows()) {
  19639. for (o = [],
  19640. n = 0; n < t.rows(); n++)
  19641. for (o[n] = [],
  19642. r = 0; r < e.cols(); r++) {
  19643. for (i = s = 0; i < t.cols(); i++)
  19644. s += t.toArray()[n][i] * e.toArray()[i][r];
  19645. o[n][r] = s
  19646. }
  19647. return f(o)
  19648. }
  19649. for (o = [],
  19650. n = 0; n < t.rows(); n++)
  19651. for (o[n] = [],
  19652. r = 0; r < e.cols(); r++) {
  19653. for (i = s = 0; i < t.cols(); i++)
  19654. s += t.toArray()[n][i] * e.toArray()[r];
  19655. o[n][r] = s
  19656. }
  19657. return f(o)
  19658. }
  19659. },
  19660. regress: function(t, e) {
  19661. var n = f.xtranspxinv(t)
  19662. , t = t.transpose()
  19663. , t = f.matrixmult(f(n), t);
  19664. return f.matrixmult(t, e)
  19665. },
  19666. regresst: function(t, e, n) {
  19667. var r = f.regress(t, e)
  19668. , i = {
  19669. anova: {}
  19670. }
  19671. , o = f.jMatYBar(t, r);
  19672. i.yBar = o;
  19673. var s = e.mean();
  19674. i.anova.residuals = f.residuals(e, o),
  19675. i.anova.ssr = f.ssr(o, s),
  19676. i.anova.msr = i.anova.ssr / (t[0].length - 1),
  19677. i.anova.sse = f.sse(e, o),
  19678. i.anova.mse = i.anova.sse / (e.length - (t[0].length - 1) - 1),
  19679. i.anova.sst = f.sst(e, s),
  19680. i.anova.mst = i.anova.sst / (e.length - 1),
  19681. i.anova.r2 = 1 - i.anova.sse / i.anova.sst,
  19682. i.anova.r2 < 0 && (i.anova.r2 = 0),
  19683. i.anova.fratio = i.anova.msr / i.anova.mse,
  19684. i.anova.pvalue = f.anovaftest(i.anova.fratio, t[0].length - 1, e.length - (t[0].length - 1) - 1),
  19685. i.anova.rmse = Math.sqrt(i.anova.mse),
  19686. i.anova.r2adj = 1 - i.anova.mse / i.anova.mst,
  19687. i.anova.r2adj < 0 && (i.anova.r2adj = 0),
  19688. i.stats = new Array(t[0].length);
  19689. for (var a, u, c, l = f.xtranspxinv(t), h = 0; h < r.length; h++)
  19690. a = Math.sqrt(i.anova.mse * Math.abs(l[h][h])),
  19691. u = Math.abs(r[h] / a),
  19692. c = f.ttest(u, e.length - t[0].length - 1, n),
  19693. i.stats[h] = [r[h], a, u, c];
  19694. return i.regress = r,
  19695. i
  19696. },
  19697. xtranspx: function(t) {
  19698. return f.matrixmult(t.transpose(), t)
  19699. },
  19700. xtranspxinv: function(t) {
  19701. t = f.matrixmult(t.transpose(), t);
  19702. return f.inv(t)
  19703. },
  19704. jMatYBar: function(t, e) {
  19705. e = f.matrixmult(t, e);
  19706. return new f(e)
  19707. },
  19708. residuals: function(t, e) {
  19709. return f.matrixsubtract(t, e)
  19710. },
  19711. ssr: function(t, e) {
  19712. for (var n = 0, r = 0; r < t.length; r++)
  19713. n += Math.pow(t[r] - e, 2);
  19714. return n
  19715. },
  19716. sse: function(t, e) {
  19717. for (var n = 0, r = 0; r < t.length; r++)
  19718. n += Math.pow(t[r] - e[r], 2);
  19719. return n
  19720. },
  19721. sst: function(t, e) {
  19722. for (var n = 0, r = 0; r < t.length; r++)
  19723. n += Math.pow(t[r] - e, 2);
  19724. return n
  19725. },
  19726. matrixsubtract: function(t, e) {
  19727. for (var n = new Array(t.length), r = 0; r < t.length; r++) {
  19728. n[r] = new Array(t[r].length);
  19729. for (var i = 0; i < t[r].length; i++)
  19730. n[r][i] = t[r][i] - e[r][i]
  19731. }
  19732. return f(n)
  19733. }
  19734. }),
  19735. f.jStat = f
  19736. });
  19737. var CryptoApi = function(n) {
  19738. var r = {};
  19739. function i(t) {
  19740. if (r[t])
  19741. return r[t].exports;
  19742. var e = r[t] = {
  19743. i: t,
  19744. l: !1,
  19745. exports: {}
  19746. };
  19747. return n[t].call(e.exports, e, e.exports, i),
  19748. e.l = !0,
  19749. e.exports
  19750. }
  19751. return i.m = n,
  19752. i.c = r,
  19753. i.d = function(t, e, n) {
  19754. i.o(t, e) || Object.defineProperty(t, e, {
  19755. enumerable: !0,
  19756. get: n
  19757. })
  19758. }
  19759. ,
  19760. i.r = function(t) {
  19761. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
  19762. value: "Module"
  19763. }),
  19764. Object.defineProperty(t, "__esModule", {
  19765. value: !0
  19766. })
  19767. }
  19768. ,
  19769. i.t = function(e, t) {
  19770. if (1 & t && (e = i(e)),
  19771. 8 & t)
  19772. return e;
  19773. if (4 & t && "object" == typeof e && e && e.__esModule)
  19774. return e;
  19775. var n = Object.create(null);
  19776. if (i.r(n),
  19777. Object.defineProperty(n, "default", {
  19778. enumerable: !0,
  19779. value: e
  19780. }),
  19781. 2 & t && "string" != typeof e)
  19782. for (var r in e)
  19783. i.d(n, r, function(t) {
  19784. return e[t]
  19785. }
  19786. .bind(null, r));
  19787. return n
  19788. }
  19789. ,
  19790. i.n = function(t) {
  19791. var e = t && t.__esModule ? function() {
  19792. return t.default
  19793. }
  19794. : function() {
  19795. return t
  19796. }
  19797. ;
  19798. return i.d(e, "a", e),
  19799. e
  19800. }
  19801. ,
  19802. i.o = function(t, e) {
  19803. return Object.prototype.hasOwnProperty.call(t, e)
  19804. }
  19805. ,
  19806. i.p = "",
  19807. i(i.s = 29)
  19808. }([function(t, e, n) {
  19809. "use strict";
  19810. function r(t, e) {
  19811. return t << e | t >>> 32 - e | 0
  19812. }
  19813. function i(t, e) {
  19814. return t >>> e | t << 32 - e | 0
  19815. }
  19816. function o(t, e, n) {
  19817. return 32 === n ? e : 32 < n ? o(e, t, n - 32) : 4294967295 & (t >>> n | e << 32 - n)
  19818. }
  19819. function s(t, e, n) {
  19820. return 32 === n ? t : 32 < n ? s(e, t, n - 32) : 4294967295 & (e >>> n | t << 32 - n)
  19821. }
  19822. n.d(e, "a", function() {
  19823. return r
  19824. }),
  19825. n.d(e, "b", function() {
  19826. return i
  19827. }),
  19828. n.d(e, "d", function() {
  19829. return s
  19830. }),
  19831. n.d(e, "c", function() {
  19832. return o
  19833. })
  19834. }
  19835. , function(t, e, n) {
  19836. "use strict";
  19837. function r(t) {
  19838. for (var e = "", n = 0, r = t.length; n < r; n++) {
  19839. var i = t.charCodeAt(n);
  19840. i < 128 ? e += String.fromCharCode(i) : (i < 2048 ? e += String.fromCharCode(192 | i >> 6) : (i < 55296 || 57344 <= i ? e += String.fromCharCode(224 | i >> 12) : (n++,
  19841. i = 65536 + ((1023 & i) << 10 | 1023 & t.charCodeAt(n)),
  19842. e += String.fromCharCode(240 | i >> 18),
  19843. e += String.fromCharCode(128 | i >> 12 & 63)),
  19844. e += String.fromCharCode(128 | i >> 6 & 63)),
  19845. e += String.fromCharCode(128 | 63 & i))
  19846. }
  19847. return e
  19848. }
  19849. n.d(e, "a", function() {
  19850. return r
  19851. })
  19852. }
  19853. , function(t, e, n) {
  19854. "use strict";
  19855. function r(t) {
  19856. for (var e = "", n = 0, r = t.length; n < r; n++)
  19857. e += (t.charCodeAt(n) < 16 ? "0" : "") + t.charCodeAt(n).toString(16);
  19858. return e
  19859. }
  19860. n.d(e, "a", function() {
  19861. return r
  19862. })
  19863. }
  19864. , function(t, e, n) {
  19865. "use strict";
  19866. function r(t) {
  19867. return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  19868. return typeof t
  19869. }
  19870. : function(t) {
  19871. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  19872. }
  19873. )(t)
  19874. }
  19875. function i(t) {
  19876. return (i = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  19877. return t.__proto__ || Object.getPrototypeOf(t)
  19878. }
  19879. )(t)
  19880. }
  19881. function o(t, e) {
  19882. return (o = Object.setPrototypeOf || function(t, e) {
  19883. return t.__proto__ = e,
  19884. t
  19885. }
  19886. )(t, e)
  19887. }
  19888. (function(t, e) {
  19889. if ("function" != typeof e && null !== e)
  19890. throw new TypeError("Super expression must either be null or a function");
  19891. t.prototype = Object.create(e && e.prototype, {
  19892. constructor: {
  19893. value: t,
  19894. writable: !0,
  19895. configurable: !0
  19896. }
  19897. }),
  19898. e && o(t, e)
  19899. }
  19900. )(s, n(4).a),
  19901. function(t, e) {
  19902. for (var n = 0; n < e.length; n++) {
  19903. var r = e[n];
  19904. r.enumerable = r.enumerable || !1,
  19905. r.configurable = !0,
  19906. "value" in r && (r.writable = !0),
  19907. Object.defineProperty(t, r.key, r)
  19908. }
  19909. }(s.prototype, [{
  19910. key: "process",
  19911. value: function() {
  19912. for (; this.state.message.length >= this.blockSizeInBytes;) {
  19913. this.blockUnits = [];
  19914. for (var t = 0; t < this.blockSizeInBytes; t += 4)
  19915. this.blockUnits.push(this.state.message.charCodeAt(t) << 24 | this.state.message.charCodeAt(t + 1) << 16 | this.state.message.charCodeAt(t + 2) << 8 | this.state.message.charCodeAt(t + 3));
  19916. this.state.message = this.state.message.substr(this.blockSizeInBytes),
  19917. this.processBlock(this.blockUnits)
  19918. }
  19919. }
  19920. }, {
  19921. key: "processBlock",
  19922. value: function(t) { }
  19923. }, {
  19924. key: "getStateHash",
  19925. value: function(t) {
  19926. t = t || this.state.hash.length;
  19927. for (var e = "", n = 0; n < t; n++)
  19928. e += String.fromCharCode(this.state.hash[n] >> 24 & 255) + String.fromCharCode(this.state.hash[n] >> 16 & 255) + String.fromCharCode(this.state.hash[n] >> 8 & 255) + String.fromCharCode(255 & this.state.hash[n]);
  19929. return e
  19930. }
  19931. }, {
  19932. key: "addLengthBits",
  19933. value: function() {
  19934. this.state.message += "\0\0\0" + String.fromCharCode(this.state.length >> 29 & 255) + String.fromCharCode(this.state.length >> 21 & 255) + String.fromCharCode(this.state.length >> 13 & 255) + String.fromCharCode(this.state.length >> 5 & 255) + String.fromCharCode(this.state.length << 3 & 255)
  19935. }
  19936. }]),
  19937. n = s;
  19938. function s(t) {
  19939. var e;
  19940. return function(t) {
  19941. if (!(t instanceof s))
  19942. throw new TypeError("Cannot call a class as a function")
  19943. }(this),
  19944. e = this,
  19945. (t = !(t = i(s).call(this, t)) || "object" !== r(t) && "function" != typeof t ? function() {
  19946. if (void 0 !== e)
  19947. return e;
  19948. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  19949. }() : t).unitOrder = 1,
  19950. t.blockUnits = [],
  19951. t
  19952. }
  19953. e.a = n
  19954. }
  19955. , function(t, e, n) {
  19956. "use strict";
  19957. var r = (function(t, e) {
  19958. for (var n = 0; n < e.length; n++) {
  19959. var r = e[n];
  19960. r.enumerable = r.enumerable || !1,
  19961. r.configurable = !0,
  19962. "value" in r && (r.writable = !0),
  19963. Object.defineProperty(t, r.key, r)
  19964. }
  19965. }(i.prototype, [{
  19966. key: "reset",
  19967. value: function() {
  19968. this.state = {},
  19969. this.state.message = "",
  19970. this.state.length = 0
  19971. }
  19972. }, {
  19973. key: "getState",
  19974. value: function() {
  19975. return JSON.parse(JSON.stringify(this.state))
  19976. }
  19977. }, {
  19978. key: "setState",
  19979. value: function(t) {
  19980. this.state = t
  19981. }
  19982. }, {
  19983. key: "update",
  19984. value: function(t) {
  19985. this.state.message += t,
  19986. this.state.length += t.length,
  19987. this.process()
  19988. }
  19989. }, {
  19990. key: "process",
  19991. value: function() { }
  19992. }, {
  19993. key: "finalize",
  19994. value: function() {
  19995. return ""
  19996. }
  19997. }, {
  19998. key: "getStateHash",
  19999. value: function(t) {
  20000. return ""
  20001. }
  20002. }, {
  20003. key: "addPaddingPKCS7",
  20004. value: function(t) {
  20005. this.state.message += new Array(t + 1).join(String.fromCharCode(t))
  20006. }
  20007. }, {
  20008. key: "addPaddingISO7816",
  20009. value: function(t) {
  20010. this.state.message += "€" + new Array(t).join("\0")
  20011. }
  20012. }, {
  20013. key: "addPaddingZero",
  20014. value: function(t) {
  20015. this.state.message += new Array(t + 1).join("\0")
  20016. }
  20017. }]),
  20018. i);
  20019. function i(t) {
  20020. !function(t) {
  20021. if (!(t instanceof i))
  20022. throw new TypeError("Cannot call a class as a function")
  20023. }(this),
  20024. this.unitSize = 4,
  20025. this.unitOrder = 0,
  20026. this.blockSize = 16,
  20027. this.blockSizeInBytes = this.blockSize * this.unitSize,
  20028. this.options = t || {},
  20029. this.reset()
  20030. }
  20031. e.a = r
  20032. }
  20033. , function(t, e, n) {
  20034. "use strict";
  20035. function r(t) {
  20036. return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  20037. return typeof t
  20038. }
  20039. : function(t) {
  20040. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  20041. }
  20042. )(t)
  20043. }
  20044. function i(t) {
  20045. return (i = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  20046. return t.__proto__ || Object.getPrototypeOf(t)
  20047. }
  20048. )(t)
  20049. }
  20050. function o(t, e) {
  20051. return (o = Object.setPrototypeOf || function(t, e) {
  20052. return t.__proto__ = e,
  20053. t
  20054. }
  20055. )(t, e)
  20056. }
  20057. (function(t, e) {
  20058. if ("function" != typeof e && null !== e)
  20059. throw new TypeError("Super expression must either be null or a function");
  20060. t.prototype = Object.create(e && e.prototype, {
  20061. constructor: {
  20062. value: t,
  20063. writable: !0,
  20064. configurable: !0
  20065. }
  20066. }),
  20067. e && o(t, e)
  20068. }
  20069. )(s, n(4).a),
  20070. function(t, e) {
  20071. for (var n = 0; n < e.length; n++) {
  20072. var r = e[n];
  20073. r.enumerable = r.enumerable || !1,
  20074. r.configurable = !0,
  20075. "value" in r && (r.writable = !0),
  20076. Object.defineProperty(t, r.key, r)
  20077. }
  20078. }(s.prototype, [{
  20079. key: "process",
  20080. value: function() {
  20081. for (; this.state.message.length >= this.blockSizeInBytes;) {
  20082. this.blockUnits = [];
  20083. for (var t = 0; t < this.blockSizeInBytes; t += 4)
  20084. this.blockUnits.push(this.state.message.charCodeAt(t) | this.state.message.charCodeAt(t + 1) << 8 | this.state.message.charCodeAt(t + 2) << 16 | this.state.message.charCodeAt(t + 3) << 24);
  20085. this.state.message = this.state.message.substr(this.blockSizeInBytes),
  20086. this.processBlock(this.blockUnits)
  20087. }
  20088. }
  20089. }, {
  20090. key: "processBlock",
  20091. value: function(t) { }
  20092. }, {
  20093. key: "getStateHash",
  20094. value: function(t) {
  20095. t = t || this.state.hash.length;
  20096. for (var e = "", n = 0; n < t; n++)
  20097. e += String.fromCharCode(255 & this.state.hash[n]) + String.fromCharCode(this.state.hash[n] >> 8 & 255) + String.fromCharCode(this.state.hash[n] >> 16 & 255) + String.fromCharCode(this.state.hash[n] >> 24 & 255);
  20098. return e
  20099. }
  20100. }, {
  20101. key: "addLengthBits",
  20102. value: function() {
  20103. this.state.message += String.fromCharCode(this.state.length << 3 & 255) + String.fromCharCode(this.state.length >> 5 & 255) + String.fromCharCode(this.state.length >> 13 & 255) + String.fromCharCode(this.state.length >> 21 & 255) + String.fromCharCode(this.state.length >> 29 & 255) + "\0\0\0"
  20104. }
  20105. }]),
  20106. n = s;
  20107. function s(t) {
  20108. var e;
  20109. return function(t) {
  20110. if (!(t instanceof s))
  20111. throw new TypeError("Cannot call a class as a function")
  20112. }(this),
  20113. e = this,
  20114. (t = !(t = i(s).call(this, t)) || "object" !== r(t) && "function" != typeof t ? function() {
  20115. if (void 0 !== e)
  20116. return e;
  20117. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  20118. }() : t).blockUnits = [],
  20119. t
  20120. }
  20121. e.a = n
  20122. }
  20123. , function(t, e, n) {
  20124. "use strict";
  20125. var r = n(3)
  20126. , E = n(0);
  20127. function i(t) {
  20128. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  20129. return typeof t
  20130. }
  20131. : function(t) {
  20132. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  20133. }
  20134. )(t)
  20135. }
  20136. function o(t, e, n) {
  20137. return (o = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  20138. t = function(t, e) {
  20139. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = s(t));)
  20140. ;
  20141. return t
  20142. }(t, e);
  20143. if (t) {
  20144. e = Object.getOwnPropertyDescriptor(t, e);
  20145. return e.get ? e.get.call(n) : e.value
  20146. }
  20147. }
  20148. )(t, e, n || t)
  20149. }
  20150. function s(t) {
  20151. return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  20152. return t.__proto__ || Object.getPrototypeOf(t)
  20153. }
  20154. )(t)
  20155. }
  20156. function a(t, e) {
  20157. return (a = Object.setPrototypeOf || function(t, e) {
  20158. return t.__proto__ = e,
  20159. t
  20160. }
  20161. )(t, e)
  20162. }
  20163. var T = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591]
  20164. , r = (function(t, e) {
  20165. if ("function" != typeof e && null !== e)
  20166. throw new TypeError("Super expression must either be null or a function");
  20167. t.prototype = Object.create(e && e.prototype, {
  20168. constructor: {
  20169. value: t,
  20170. writable: !0,
  20171. configurable: !0
  20172. }
  20173. }),
  20174. e && a(t, e)
  20175. }(u, r.a),
  20176. r = [{
  20177. key: "reset",
  20178. value: function() {
  20179. switch (o(s(u.prototype), "reset", this).call(this),
  20180. this.options.length) {
  20181. case 384:
  20182. this.state.hash = [-876896931, -1056596264, 1654270250, 914150663, -1856437926, 812702999, 355462360, -150054599, 1731405415, -4191439, -1900787065, 1750603025, -619958771, 1694076839, 1203062813, -1090891868];
  20183. break;
  20184. case 512:
  20185. this.state.hash = [1779033703, -205731576, -1150833019, -2067093701, 1013904242, -23791573, -1521486534, 1595750129, 1359893119, -1377402159, -1694144372, 725511199, 528734635, -79577749, 1541459225, 327033209];
  20186. break;
  20187. default:
  20188. for (var t = new u, e = 0; e < 16; e++)
  20189. t.state.hash[e] = 2779096485 ^ t.state.hash[e];
  20190. t.update("SHA-512/" + this.options.length);
  20191. var n = t.finalize();
  20192. this.state.hash = [];
  20193. for (var r = 0; r < 64; r += 4)
  20194. this.state.hash.push(n.charCodeAt(r) << 24 | n.charCodeAt(r + 1) << 16 | n.charCodeAt(r + 2) << 8 | n.charCodeAt(r + 3))
  20195. }
  20196. }
  20197. }, {
  20198. key: "processBlock",
  20199. value: function(t) {
  20200. for (var e, n, r, i, o = this.state.hash[0], s = this.state.hash[1], a = this.state.hash[2], u = this.state.hash[3], c = this.state.hash[4], l = this.state.hash[5], h = this.state.hash[6], f = this.state.hash[7], p = this.state.hash[8], d = this.state.hash[9], g = this.state.hash[10], m = this.state.hash[11], v = this.state.hash[12], y = this.state.hash[13], b = this.state.hash[14], w = this.state.hash[15], _ = 0; _ < this.options.rounds; _ += 2) {
  20201. _ < 32 ? (this.W[_] = t[_],
  20202. this.W[_ + 1] = t[_ + 1]) : (e = Object(E.c)(this.W[_ - 30], this.W[_ - 29], 1) ^ Object(E.c)(this.W[_ - 30], this.W[_ - 29], 8) ^ this.W[_ - 30] >>> 7,
  20203. n = Object(E.d)(this.W[_ - 30], this.W[_ - 29], 1) ^ Object(E.d)(this.W[_ - 30], this.W[_ - 29], 8) ^ (this.W[_ - 29] >>> 7 | this.W[_ - 30] << 25),
  20204. r = Object(E.c)(this.W[_ - 4], this.W[_ - 3], 19) ^ Object(E.c)(this.W[_ - 4], this.W[_ - 3], 61) ^ this.W[_ - 4] >>> 6,
  20205. i = Object(E.d)(this.W[_ - 4], this.W[_ - 3], 19) ^ Object(E.d)(this.W[_ - 4], this.W[_ - 3], 61) ^ (this.W[_ - 3] >>> 6 | this.W[_ - 4] << 26),
  20206. S = (65535 & this.W[_ - 13]) + (65535 & this.W[_ - 31]) + (65535 & n) + (65535 & i) | 0,
  20207. O = (this.W[_ - 13] >>> 16) + (this.W[_ - 31] >>> 16) + (n >>> 16) + (i >>> 16) + (S >>> 16) | 0,
  20208. k = (65535 & this.W[_ - 14]) + (65535 & this.W[_ - 32]) + (65535 & e) + (65535 & r) + (O >>> 16) | 0,
  20209. C = (this.W[_ - 14] >>> 16) + (this.W[_ - 32] >>> 16) + (e >>> 16) + (r >>> 16) + (k >>> 16) | 0,
  20210. this.W[_] = 4294967295 & (C << 16 | 65535 & k),
  20211. this.W[_ + 1] = 4294967295 & (O << 16 | 65535 & S)),
  20212. e = Object(E.c)(o, s, 28) ^ Object(E.c)(o, s, 34) ^ Object(E.c)(o, s, 39),
  20213. n = Object(E.d)(o, s, 28) ^ Object(E.d)(o, s, 34) ^ Object(E.d)(o, s, 39);
  20214. var x = d & m ^ ~d & y
  20215. , C = o & a ^ o & c ^ a & c
  20216. , k = s & u ^ s & l ^ u & l
  20217. , S = (S = (S = b + (r = Object(E.c)(p, d, 14) ^ Object(E.c)(p, d, 18) ^ Object(E.c)(p, d, 41)) + ((O = w + (i = Object(E.d)(p, d, 14) ^ Object(E.d)(p, d, 18) ^ Object(E.d)(p, d, 41)) | 0) >>> 0 < w >>> 0 ? 1 : 0) | 0) + (p & g ^ ~p & v) + ((O = O + x | 0) >>> 0 < x >>> 0 ? 1 : 0) | 0) + T[_] + ((O = O + T[_ + 1] | 0) >>> 0 < T[_ + 1] >>> 0 ? 1 : 0) | 0
  20218. , O = O + this.W[_ + 1] | 0
  20219. , k = n + k | 0
  20220. , b = v
  20221. , w = y
  20222. , v = g
  20223. , y = m
  20224. , g = p
  20225. , m = d
  20226. , p = h + (S = S + this.W[_] + (O >>> 0 < this.W[_ + 1] >>> 0 ? 1 : 0) | 0) + ((d = f + O | 0) >>> 0 < f >>> 0 ? 1 : 0) | 0
  20227. , h = c
  20228. , f = l
  20229. , c = a
  20230. , l = u
  20231. , a = o
  20232. , u = s
  20233. , o = S + (e + C + (k >>> 0 < n >>> 0 ? 1 : 0) | 0) + ((s = O + k | 0) >>> 0 < O >>> 0 ? 1 : 0) | 0
  20234. }
  20235. this.state.hash[1] = this.state.hash[1] + s | 0,
  20236. this.state.hash[0] = this.state.hash[0] + o + (this.state.hash[1] >>> 0 < s >>> 0 ? 1 : 0) | 0,
  20237. this.state.hash[3] = this.state.hash[3] + u | 0,
  20238. this.state.hash[2] = this.state.hash[2] + a + (this.state.hash[3] >>> 0 < u >>> 0 ? 1 : 0) | 0,
  20239. this.state.hash[5] = this.state.hash[5] + l | 0,
  20240. this.state.hash[4] = this.state.hash[4] + c + (this.state.hash[5] >>> 0 < l >>> 0 ? 1 : 0) | 0,
  20241. this.state.hash[7] = this.state.hash[7] + f | 0,
  20242. this.state.hash[6] = this.state.hash[6] + h + (this.state.hash[7] >>> 0 < f >>> 0 ? 1 : 0) | 0,
  20243. this.state.hash[9] = this.state.hash[9] + d | 0,
  20244. this.state.hash[8] = this.state.hash[8] + p + (this.state.hash[9] >>> 0 < d >>> 0 ? 1 : 0) | 0,
  20245. this.state.hash[11] = this.state.hash[11] + m | 0,
  20246. this.state.hash[10] = this.state.hash[10] + g + (this.state.hash[11] >>> 0 < m >>> 0 ? 1 : 0) | 0,
  20247. this.state.hash[13] = this.state.hash[13] + y | 0,
  20248. this.state.hash[12] = this.state.hash[12] + v + (this.state.hash[13] >>> 0 < y >>> 0 ? 1 : 0) | 0,
  20249. this.state.hash[15] = this.state.hash[15] + w | 0,
  20250. this.state.hash[14] = this.state.hash[14] + b + (this.state.hash[15] >>> 0 < w >>> 0 ? 1 : 0) | 0
  20251. }
  20252. }, {
  20253. key: "finalize",
  20254. value: function() {
  20255. return this.addPaddingISO7816(this.state.message.length < 112 ? 112 - this.state.message.length | 0 : 240 - this.state.message.length | 0),
  20256. this.state.message += "\0\0\0\0\0\0\0\0",
  20257. this.addLengthBits(),
  20258. this.process(),
  20259. this.getStateHash(this.options.length / 32 | 0)
  20260. }
  20261. }],
  20262. function(t, e) {
  20263. for (var n = 0; n < e.length; n++) {
  20264. var r = e[n];
  20265. r.enumerable = r.enumerable || !1,
  20266. r.configurable = !0,
  20267. "value" in r && (r.writable = !0),
  20268. Object.defineProperty(t, r.key, r)
  20269. }
  20270. }(u.prototype, r),
  20271. u);
  20272. function u(t) {
  20273. var e;
  20274. return function(t) {
  20275. if (!(t instanceof u))
  20276. throw new TypeError("Cannot call a class as a function")
  20277. }(this),
  20278. (t = t || {}).length = t.length || 512,
  20279. t.rounds = t.rounds || 160,
  20280. e = this,
  20281. (t = !(t = s(u).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  20282. if (void 0 !== e)
  20283. return e;
  20284. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  20285. }() : t).blockSize = 32,
  20286. t.blockSizeInBytes = t.blockSize * t.unitSize,
  20287. t.W = new Array(160),
  20288. t
  20289. }
  20290. e.a = r
  20291. }
  20292. , function(t, e, n) {
  20293. "use strict";
  20294. var r = n(3)
  20295. , f = n(0);
  20296. function i(t) {
  20297. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  20298. return typeof t
  20299. }
  20300. : function(t) {
  20301. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  20302. }
  20303. )(t)
  20304. }
  20305. function o(t, e, n) {
  20306. return (o = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  20307. t = function(t, e) {
  20308. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = s(t));)
  20309. ;
  20310. return t
  20311. }(t, e);
  20312. if (t) {
  20313. e = Object.getOwnPropertyDescriptor(t, e);
  20314. return e.get ? e.get.call(n) : e.value
  20315. }
  20316. }
  20317. )(t, e, n || t)
  20318. }
  20319. function s(t) {
  20320. return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  20321. return t.__proto__ || Object.getPrototypeOf(t)
  20322. }
  20323. )(t)
  20324. }
  20325. function a(t, e) {
  20326. return (a = Object.setPrototypeOf || function(t, e) {
  20327. return t.__proto__ = e,
  20328. t
  20329. }
  20330. )(t, e)
  20331. }
  20332. var p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]
  20333. , r = (function(t, e) {
  20334. if ("function" != typeof e && null !== e)
  20335. throw new TypeError("Super expression must either be null or a function");
  20336. t.prototype = Object.create(e && e.prototype, {
  20337. constructor: {
  20338. value: t,
  20339. writable: !0,
  20340. configurable: !0
  20341. }
  20342. }),
  20343. e && a(t, e)
  20344. }(u, r.a),
  20345. function(t, e) {
  20346. for (var n = 0; n < e.length; n++) {
  20347. var r = e[n];
  20348. r.enumerable = r.enumerable || !1,
  20349. r.configurable = !0,
  20350. "value" in r && (r.writable = !0),
  20351. Object.defineProperty(t, r.key, r)
  20352. }
  20353. }(u.prototype, [{
  20354. key: "reset",
  20355. value: function() {
  20356. 224 === (o(s(u.prototype), "reset", this).call(this),
  20357. this.options.length) ? this.state.hash = [-1056596264, 914150663, 812702999, -150054599, -4191439, 1750603025, 1694076839, -1090891868] : this.state.hash = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225]
  20358. }
  20359. }, {
  20360. key: "processBlock",
  20361. value: function(t) {
  20362. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = 0 | this.state.hash[5], a = 0 | this.state.hash[6], u = 0 | this.state.hash[7], c = 0; c < this.options.rounds; c++) {
  20363. this.W[c] = c < 16 ? 0 | t[c] : this.W[c - 16] + (Object(f.b)(this.W[c - 15], 7) ^ Object(f.b)(this.W[c - 15], 18) ^ this.W[c - 15] >>> 3) + this.W[c - 7] + (Object(f.b)(this.W[c - 2], 17) ^ Object(f.b)(this.W[c - 2], 19) ^ this.W[c - 2] >>> 10) | 0;
  20364. var l = u + (Object(f.b)(o, 6) ^ Object(f.b)(o, 11) ^ Object(f.b)(o, 25)) + (o & s ^ ~o & a) + p[c] + this.W[c] | 0
  20365. , h = (Object(f.b)(e, 2) ^ Object(f.b)(e, 13) ^ Object(f.b)(e, 22)) + (e & n ^ e & r ^ n & r) | 0
  20366. , u = a
  20367. , a = s
  20368. , s = o
  20369. , o = i + l | 0
  20370. , i = r
  20371. , r = n
  20372. , n = e
  20373. , e = l + h | 0
  20374. }
  20375. this.state.hash[0] = this.state.hash[0] + e | 0,
  20376. this.state.hash[1] = this.state.hash[1] + n | 0,
  20377. this.state.hash[2] = this.state.hash[2] + r | 0,
  20378. this.state.hash[3] = this.state.hash[3] + i | 0,
  20379. this.state.hash[4] = this.state.hash[4] + o | 0,
  20380. this.state.hash[5] = this.state.hash[5] + s | 0,
  20381. this.state.hash[6] = this.state.hash[6] + a | 0,
  20382. this.state.hash[7] = this.state.hash[7] + u | 0
  20383. }
  20384. }, {
  20385. key: "finalize",
  20386. value: function() {
  20387. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  20388. this.addLengthBits(),
  20389. this.process(),
  20390. this.getStateHash(this.options.length / 32 | 0)
  20391. }
  20392. }]),
  20393. u);
  20394. function u(t) {
  20395. var e;
  20396. return function(t) {
  20397. if (!(t instanceof u))
  20398. throw new TypeError("Cannot call a class as a function")
  20399. }(this),
  20400. (t = t || {}).length = t.length || 256,
  20401. t.rounds = t.rounds || 64,
  20402. e = this,
  20403. (t = !(t = s(u).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  20404. if (void 0 !== e)
  20405. return e;
  20406. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  20407. }() : t).W = new Array(64),
  20408. t
  20409. }
  20410. e.a = r
  20411. }
  20412. , function(t, e, n) {
  20413. "use strict";
  20414. var r = n(5)
  20415. , d = n(0);
  20416. function i(t) {
  20417. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  20418. return typeof t
  20419. }
  20420. : function(t) {
  20421. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  20422. }
  20423. )(t)
  20424. }
  20425. function o(t, e) {
  20426. for (var n = 0; n < e.length; n++) {
  20427. var r = e[n];
  20428. r.enumerable = r.enumerable || !1,
  20429. r.configurable = !0,
  20430. "value" in r && (r.writable = !0),
  20431. Object.defineProperty(t, r.key, r)
  20432. }
  20433. }
  20434. function s(t, e, n) {
  20435. return (s = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  20436. t = function(t, e) {
  20437. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = a(t));)
  20438. ;
  20439. return t
  20440. }(t, e);
  20441. if (t) {
  20442. e = Object.getOwnPropertyDescriptor(t, e);
  20443. return e.get ? e.get.call(n) : e.value
  20444. }
  20445. }
  20446. )(t, e, n || t)
  20447. }
  20448. function a(t) {
  20449. return (a = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  20450. return t.__proto__ || Object.getPrototypeOf(t)
  20451. }
  20452. )(t)
  20453. }
  20454. function u(t, e) {
  20455. return (u = Object.setPrototypeOf || function(t, e) {
  20456. return t.__proto__ = e,
  20457. t
  20458. }
  20459. )(t, e)
  20460. }
  20461. var g = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]
  20462. , m = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]
  20463. , v = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]
  20464. , y = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]
  20465. , n = (function(t, e) {
  20466. if ("function" != typeof e && null !== e)
  20467. throw new TypeError("Super expression must either be null or a function");
  20468. t.prototype = Object.create(e && e.prototype, {
  20469. constructor: {
  20470. value: t,
  20471. writable: !0,
  20472. configurable: !0
  20473. }
  20474. }),
  20475. e && u(t, e)
  20476. }(b, r.a),
  20477. n = [{
  20478. key: "F",
  20479. value: function(t, e, n) {
  20480. return t ^ e ^ n
  20481. }
  20482. }, {
  20483. key: "G",
  20484. value: function(t, e, n) {
  20485. return t & e | ~t & n
  20486. }
  20487. }, {
  20488. key: "H",
  20489. value: function(t, e, n) {
  20490. return (t | ~e) ^ n
  20491. }
  20492. }, {
  20493. key: "I",
  20494. value: function(t, e, n) {
  20495. return t & n | e & ~n
  20496. }
  20497. }, {
  20498. key: "J",
  20499. value: function(t, e, n) {
  20500. return t ^ (e | ~n)
  20501. }
  20502. }, {
  20503. key: "T",
  20504. value: function(t, e, n, r) {
  20505. return t < 16 ? this.F(e, n, r) : t < 32 ? this.G(e, n, r) + 1518500249 | 0 : t < 48 ? this.H(e, n, r) + 1859775393 | 0 : t < 64 ? this.I(e, n, r) + 2400959708 | 0 : this.J(e, n, r) + 2840853838 | 0
  20506. }
  20507. }, {
  20508. key: "T64",
  20509. value: function(t, e, n, r) {
  20510. return t < 16 ? this.I(e, n, r) + 1352829926 | 0 : t < 32 ? this.H(e, n, r) + 1548603684 | 0 : t < 48 ? this.G(e, n, r) + 1836072691 | 0 : this.F(e, n, r)
  20511. }
  20512. }, {
  20513. key: "T80",
  20514. value: function(t, e, n, r) {
  20515. return t < 16 ? this.J(e, n, r) + 1352829926 | 0 : t < 32 ? this.I(e, n, r) + 1548603684 | 0 : t < 48 ? this.H(e, n, r) + 1836072691 | 0 : t < 64 ? this.G(e, n, r) + 2053994217 | 0 : this.F(e, n, r)
  20516. }
  20517. }],
  20518. o((r = b).prototype, [{
  20519. key: "reset",
  20520. value: function() {
  20521. switch (s(a(b.prototype), "reset", this).call(this),
  20522. this.options.length) {
  20523. case 128:
  20524. this.state.hash = [1732584193, 4023233417, 2562383102, 271733878],
  20525. this.processBlock = this.processBlock128;
  20526. break;
  20527. case 256:
  20528. this.state.hash = [1732584193, 4023233417, 2562383102, 271733878, 1985229328, 4275878552, 2309737967, 19088743],
  20529. this.processBlock = this.processBlock256;
  20530. break;
  20531. case 320:
  20532. this.state.hash = [1732584193, 4023233417, 2562383102, 271733878, 3285377520, 1985229328, 4275878552, 2309737967, 19088743, 1009589775],
  20533. this.processBlock = this.processBlock320;
  20534. break;
  20535. default:
  20536. this.state.hash = [1732584193, 4023233417, 2562383102, 271733878, 3285377520],
  20537. this.processBlock = this.processBlock160
  20538. }
  20539. }
  20540. }, {
  20541. key: "processBlock128",
  20542. value: function(t) {
  20543. for (var e = a = 0 | this.state.hash[0], n = l = 0 | this.state.hash[1], r = c = 0 | this.state.hash[2], i = u = 0 | this.state.hash[3], o = 0; o < 64; o++) {
  20544. var s = (s = a + t[g[o]] | 0) + b.T(o, l, c, u) | 0
  20545. , a = u
  20546. , u = c
  20547. , c = l
  20548. , l = s = Object(d.a)(s, v[o]);
  20549. s = (s = e + t[m[o]] | 0) + b.T64(o, n, r, i) | 0,
  20550. e = i,
  20551. i = r,
  20552. r = n,
  20553. n = s = Object(d.a)(s, y[o])
  20554. }
  20555. var h = this.state.hash[1] + c + i | 0;
  20556. this.state.hash[1] = this.state.hash[2] + u + e | 0,
  20557. this.state.hash[2] = this.state.hash[3] + a + n | 0,
  20558. this.state.hash[3] = this.state.hash[0] + l + r | 0,
  20559. this.state.hash[0] = h
  20560. }
  20561. }, {
  20562. key: "processBlock160",
  20563. value: function(t) {
  20564. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = e, a = n, u = r, c = i, l = o, h = 0; h < 80; h++) {
  20565. var f = (f = e + t[g[h]] | 0) + b.T(h, n, r, i) | 0;
  20566. f = (f = Object(d.a)(f, v[h])) + o | 0,
  20567. e = o,
  20568. o = i,
  20569. i = Object(d.a)(r, 10),
  20570. r = n,
  20571. n = f,
  20572. f = (f = s + t[m[h]] | 0) + b.T80(h, a, u, c) | 0,
  20573. f = (f = Object(d.a)(f, y[h])) + l | 0,
  20574. s = l,
  20575. l = c,
  20576. c = Object(d.a)(u, 10),
  20577. u = a,
  20578. a = f
  20579. }
  20580. var p = this.state.hash[1] + r + c | 0;
  20581. this.state.hash[1] = this.state.hash[2] + i + l | 0,
  20582. this.state.hash[2] = this.state.hash[3] + o + s | 0,
  20583. this.state.hash[3] = this.state.hash[4] + e + a | 0,
  20584. this.state.hash[4] = this.state.hash[0] + n + u | 0,
  20585. this.state.hash[0] = p
  20586. }
  20587. }, {
  20588. key: "processBlock256",
  20589. value: function(t) {
  20590. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = 0 | this.state.hash[5], a = 0 | this.state.hash[6], u = 0 | this.state.hash[7], c = 0; c < 64; c += 1) {
  20591. var l = (l = e + t[g[c]] | 0) + b.T(c, n, r, i) | 0
  20592. , e = i
  20593. , i = r
  20594. , r = n
  20595. , n = l = Object(d.a)(l, v[c]);
  20596. switch (l = (l = o + t[m[c]] | 0) + b.T64(c, s, a, u) | 0,
  20597. o = u,
  20598. u = a,
  20599. a = s,
  20600. s = l = Object(d.a)(l, y[c]),
  20601. c) {
  20602. case 15:
  20603. l = e,
  20604. e = o,
  20605. o = l;
  20606. break;
  20607. case 31:
  20608. l = n,
  20609. n = s,
  20610. s = l;
  20611. break;
  20612. case 47:
  20613. l = r,
  20614. r = a,
  20615. a = l;
  20616. break;
  20617. case 63:
  20618. l = i,
  20619. i = u,
  20620. u = l
  20621. }
  20622. }
  20623. this.state.hash[0] = this.state.hash[0] + e | 0,
  20624. this.state.hash[1] = this.state.hash[1] + n | 0,
  20625. this.state.hash[2] = this.state.hash[2] + r | 0,
  20626. this.state.hash[3] = this.state.hash[3] + i | 0,
  20627. this.state.hash[4] = this.state.hash[4] + o | 0,
  20628. this.state.hash[5] = this.state.hash[5] + s | 0,
  20629. this.state.hash[6] = this.state.hash[6] + a | 0,
  20630. this.state.hash[7] = this.state.hash[7] + u | 0
  20631. }
  20632. }, {
  20633. key: "processBlock320",
  20634. value: function(t) {
  20635. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = 0 | this.state.hash[5], a = 0 | this.state.hash[6], u = 0 | this.state.hash[7], c = 0 | this.state.hash[8], l = 0 | this.state.hash[9], h = 0; h < 80; h += 1) {
  20636. var f = (f = e + t[g[h]] | 0) + b.T(h, n, r, i) | 0;
  20637. switch (f = (f = Object(d.a)(f, v[h])) + o | 0,
  20638. e = o,
  20639. o = i,
  20640. i = Object(d.a)(r, 10),
  20641. r = n,
  20642. n = f,
  20643. f = (f = s + t[m[h]] | 0) + b.T80(h, a, u, c) | 0,
  20644. f = (f = Object(d.a)(f, y[h])) + l | 0,
  20645. s = l,
  20646. l = c,
  20647. c = Object(d.a)(u, 10),
  20648. u = a,
  20649. a = f,
  20650. h) {
  20651. case 15:
  20652. f = n,
  20653. n = a,
  20654. a = f;
  20655. break;
  20656. case 31:
  20657. f = i,
  20658. i = c,
  20659. c = f;
  20660. break;
  20661. case 47:
  20662. f = e,
  20663. e = s,
  20664. s = f;
  20665. break;
  20666. case 63:
  20667. f = r,
  20668. r = u,
  20669. u = f;
  20670. break;
  20671. case 79:
  20672. f = o,
  20673. o = l,
  20674. l = f
  20675. }
  20676. }
  20677. this.state.hash[0] = this.state.hash[0] + e | 0,
  20678. this.state.hash[1] = this.state.hash[1] + n | 0,
  20679. this.state.hash[2] = this.state.hash[2] + r | 0,
  20680. this.state.hash[3] = this.state.hash[3] + i | 0,
  20681. this.state.hash[4] = this.state.hash[4] + o | 0,
  20682. this.state.hash[5] = this.state.hash[5] + s | 0,
  20683. this.state.hash[6] = this.state.hash[6] + a | 0,
  20684. this.state.hash[7] = this.state.hash[7] + u | 0,
  20685. this.state.hash[8] = this.state.hash[8] + c | 0,
  20686. this.state.hash[9] = this.state.hash[9] + l | 0
  20687. }
  20688. }, {
  20689. key: "finalize",
  20690. value: function() {
  20691. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  20692. this.addLengthBits(),
  20693. this.process(),
  20694. this.getStateHash()
  20695. }
  20696. }]),
  20697. o(r, n),
  20698. b);
  20699. function b(t) {
  20700. return function(t) {
  20701. if (!(t instanceof b))
  20702. throw new TypeError("Cannot call a class as a function")
  20703. }(this),
  20704. (t = t || {}).length = t.length || 160,
  20705. e = this,
  20706. !(t = a(b).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  20707. if (void 0 !== e)
  20708. return e;
  20709. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  20710. }() : t;
  20711. var e
  20712. }
  20713. e.a = n
  20714. }
  20715. , function(t, e, n) {
  20716. "use strict";
  20717. var r = n(3)
  20718. , c = n(0);
  20719. function i(t) {
  20720. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  20721. return typeof t
  20722. }
  20723. : function(t) {
  20724. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  20725. }
  20726. )(t)
  20727. }
  20728. function o(t, e, n) {
  20729. return (o = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  20730. t = function(t, e) {
  20731. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = s(t));)
  20732. ;
  20733. return t
  20734. }(t, e);
  20735. if (t) {
  20736. e = Object.getOwnPropertyDescriptor(t, e);
  20737. return e.get ? e.get.call(n) : e.value
  20738. }
  20739. }
  20740. )(t, e, n || t)
  20741. }
  20742. function s(t) {
  20743. return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  20744. return t.__proto__ || Object.getPrototypeOf(t)
  20745. }
  20746. )(t)
  20747. }
  20748. function a(t, e) {
  20749. return (a = Object.setPrototypeOf || function(t, e) {
  20750. return t.__proto__ = e,
  20751. t
  20752. }
  20753. )(t, e)
  20754. }
  20755. var u = [10097, 32533, 76520, 13586, 34673, 54876, 80959, 9117, 39292, 74945, 37542, 4805, 64894, 74296, 24805, 24037, 20636, 10402, 822, 91665, 8422, 68953, 19645, 9303, 23209, 2560, 15953, 34764, 35080, 33606, 99019, 2529, 9376, 70715, 38311, 31165, 88676, 74397, 4436, 27659, 12807, 99970, 80157, 36147, 64032, 36653, 98951, 16877, 12171, 76833, 66065, 74717, 34072, 76850, 36697, 36170, 65813, 39885, 11199, 29170, 31060, 10805, 45571, 82406, 35303, 42614, 86799, 7439, 23403, 9732, 85269, 77602, 2051, 65692, 68665, 74818, 73053, 85247, 18623, 88579, 63573, 32135, 5325, 47048, 90553, 57548, 28468, 28709, 83491, 25624, 73796, 45753, 3529, 64778, 35808, 34282, 60935, 20344, 35273, 88435, 98520, 17767, 14905, 68607, 22109, 40558, 60970, 93433, 50500, 73998, 11805, 5431, 39808, 27732, 50725, 68248, 29405, 24201, 52775, 67851, 83452, 99634, 6288, 98083, 13746, 70078, 18475, 40610, 68711, 77817, 88685, 40200, 86507, 58401, 36766, 67951, 90364, 76493, 29609, 11062, 99594, 67348, 87517, 64969, 91826, 8928, 93785, 61368, 23478, 34113, 65481, 17674, 17468, 50950, 58047, 76974, 73039, 57186, 40218, 16544, 80124, 35635, 17727, 8015, 45318, 22374, 21115, 78253, 14385, 53763, 74350, 99817, 77402, 77214, 43236, 210, 45521, 64237, 96286, 2655, 69916, 26803, 66252, 29148, 36936, 87203, 76621, 13990, 94400, 56418, 9893, 20505, 14225, 68514, 46427, 56788, 96297, 78822, 54382, 14598, 91499, 14523, 68479, 27686, 46162, 83554, 94750, 89923, 37089, 20048, 80336, 94598, 26940, 36858, 70297, 34135, 53140, 33340, 42050, 82341, 44104, 81949, 85157, 47954, 32979, 26575, 57600, 40881, 22222, 6413, 12550, 73742, 11100, 2040, 12860, 74697, 96644, 89439, 28707, 25815, 63606, 49329, 16505, 34484, 40219, 52563, 43651, 77082, 7207, 31790, 61196, 90446, 26457, 47774, 51924, 33729, 65394, 59593, 42582, 60527, 15474, 45266, 95270, 79953, 59367, 83848, 82396, 10118, 33211, 59466, 94557, 28573, 67897, 54387, 54622, 44431, 91190, 42592, 92927, 45973, 42481, 16213, 97344, 8721, 16868, 48767, 3071, 12059, 25701, 46670, 23523, 78317, 73208, 89837, 68935, 91416, 26252, 29663, 5522, 82562, 4493, 52494, 75246, 33824, 45862, 51025, 61962, 79335, 65337, 12472, 549, 97654, 64051, 88159, 96119, 63896, 54692, 82391, 23287, 29529, 35963, 15307, 26898, 9354, 33351, 35462, 77974, 50024, 90103, 39333, 59808, 8391, 45427, 26842, 83609, 49700, 13021, 24892, 78565, 20106, 46058, 85236, 1390, 92286, 77281, 44077, 93910, 83647, 70617, 42941, 32179, 597, 87379, 25241, 5567, 7007, 86743, 17157, 85394, 11838, 69234, 61406, 20117, 45204, 15956, 6e4, 18743, 92423, 97118, 96338, 19565, 41430, 1758, 75379, 40419, 21585, 66674, 36806, 84962, 85207, 45155, 14938, 19476, 7246, 43667, 94543, 59047, 90033, 20826, 69541, 94864, 31994, 36168, 10851, 34888, 81553, 1540, 35456, 5014, 51176, 98086, 24826, 45240, 28404, 44999, 8896, 39094, 73407, 35441, 31880, 33185, 16232, 41941, 50949, 89435, 48581, 88695, 41994, 37548, 73043, 80951, 406, 96382, 70774, 20151, 23387, 25016, 25298, 94624, 61171, 79752, 49140, 71961, 28296, 69861, 2591, 74852, 20539, 387, 59579, 18633, 32537, 98145, 6571, 31010, 24674, 5455, 61427, 77938, 91936, 74029, 43902, 77557, 32270, 97790, 17119, 52527, 58021, 80814, 51748, 54178, 45611, 80993, 37143, 5335, 12969, 56127, 19255, 36040, 90324, 11664, 49883, 52079, 84827, 59381, 71539, 9973, 33440, 88461, 23356, 48324, 77928, 31249, 64710, 2295, 36870, 32307, 57546, 15020, 9994, 69074, 94138, 87637, 91976, 35584, 4401, 10518, 21615, 1848, 76938, 9188, 20097, 32825, 39527, 4220, 86304, 83389, 87374, 64278, 58044, 90045, 85497, 51981, 50654, 94938, 81997, 91870, 76150, 68476, 64659, 73189, 50207, 47677, 26269, 62290, 64464, 27124, 67018, 41361, 82760, 75768, 76490, 20971, 87749, 90429, 12272, 95375, 5871, 93823, 43178, 54016, 44056, 66281, 31003, 682, 27398, 20714, 53295, 7706, 17813, 8358, 69910, 78542, 42785, 13661, 58873, 4618, 97553, 31223, 8420, 28306, 3264, 81333, 10591, 40510, 7893, 32604, 60475, 94119, 1840, 53840, 86233, 81594, 13628, 51215, 90290, 28466, 68795, 77762, 20791, 91757, 53741, 61613, 62269, 50263, 90212, 55781, 76514, 83483, 47055, 89415, 92694, 397, 58391, 12607, 17646, 48949, 72306, 94541, 37408, 77513, 3820, 86864, 29901, 68414, 82774, 51908, 13980, 72893, 55507, 19502, 37174, 69979, 20288, 55210, 29773, 74287, 75251, 65344, 67415, 21818, 59313, 93278, 81757, 5686, 73156, 7082, 85046, 31853, 38452, 51474, 66499, 68107, 23621, 94049, 91345, 42836, 9191, 8007, 45449, 99559, 68331, 62535, 24170, 69777, 12830, 74819, 78142, 43860, 72834, 33713, 48007, 93584, 72869, 51926, 64721, 58303, 29822, 93174, 93972, 85274, 86893, 11303, 22970, 28834, 34137, 73515, 90400, 71148, 43643, 84133, 89640, 44035, 52166, 73852, 70091, 61222, 60561, 62327, 18423, 56732, 16234, 17395, 96131, 10123, 91622, 85496, 57560, 81604, 18880, 65138, 56806, 87648, 85261, 34313, 65861, 45875, 21069, 85644, 47277, 38001, 2176, 81719, 11711, 71602, 92937, 74219, 64049, 65584, 49698, 37402, 96397, 1304, 77586, 56271, 10086, 47324, 62605, 40030, 37438, 97125, 40348, 87083, 31417, 21815, 39250, 75237, 62047, 15501, 29578, 21826, 41134, 47143, 34072, 64638, 85902, 49139, 6441, 3856, 54552, 73135, 42742, 95719, 9035, 85794, 74296, 8789, 88156, 64691, 19202, 7638, 77929, 3061, 18072, 96207, 44156, 23821, 99538, 4713, 66994, 60528, 83441, 7954, 19814, 59175, 20695, 5533, 52139, 61212, 6455, 83596, 35655, 6958, 92983, 5128, 9719, 77433, 53783, 92301, 50498, 10850, 62746, 99599, 10507, 13499, 6319, 53075, 71839, 6410, 19362, 39820, 98952, 43622, 63147, 64421, 80814, 43800, 9351, 31024, 73167, 59580, 6478, 75569, 78800, 88835, 54486, 23768, 6156, 4111, 8408, 38508, 7341, 23793, 48763, 90822, 97022, 17719, 4207, 95954, 49953, 30692, 70668, 94688, 16127, 56196, 80091, 82067, 63400, 5462, 69200, 65443, 95659, 18288, 27437, 49632, 24041, 8337, 65676, 96299, 90836, 27267, 50264, 13192, 72294, 7477, 44606, 17985, 48911, 97341, 30358, 91307, 6991, 19072, 24210, 36699, 53728, 28825, 35793, 28976, 66252, 68434, 94688, 84473, 13622, 62126, 98408, 12843, 82590, 9815, 93146, 48908, 15877, 54745, 24591, 35700, 4754, 83824, 52692, 54130, 55160, 6913, 45197, 42672, 78601, 11883, 9528, 63011, 98901, 14974, 40344, 10455, 16019, 14210, 33712, 91342, 37821, 88325, 80851, 43667, 70883, 12883, 97343, 65027, 61184, 4285, 1392, 17974, 15077, 90712, 26769, 21778, 30976, 38807, 36961, 31649, 42096, 63281, 2023, 8816, 47449, 19523, 59515, 65122, 59659, 86283, 68258, 69572, 13798, 16435, 91529, 67245, 52670, 35583, 16563, 79246, 86686, 76463, 34222, 26655, 90802, 60584, 47377, 7500, 37992, 45134, 26529, 26760, 83637, 41326, 44344, 53853, 41377, 36066, 94850, 58838, 73859, 49364, 73331, 96240, 43642, 24637, 38736, 74384, 89342, 52623, 7992, 12369, 18601, 3742, 83873, 83080, 12451, 38992, 22815, 7759, 51777, 97377, 27585, 51972, 37867, 16444, 24334, 36151, 99073, 27493, 70939, 85130, 32552, 54846, 54759, 60790, 18157, 57178, 65762, 11161, 78576, 45819, 52979, 65130, 4860, 3991, 10461, 93716, 16894, 66083, 24653, 84609, 58232, 88618, 19161, 38555, 95554, 32886, 59780, 8355, 60860, 29735, 47762, 71299, 23853, 17546, 73704, 92052, 46215, 55121, 29281, 59076, 7936, 27954, 58909, 32643, 52861, 95819, 6831, 911, 98936, 76355, 93779, 80863, 514, 69572, 68777, 39510, 35905, 14060, 40619, 29549, 69616, 33564, 60780, 24122, 66591, 27699, 6494, 14845, 46672, 61958, 77100, 90899, 75754, 61196, 30231, 92962, 61773, 41839, 55382, 17267, 70943, 78038, 70267, 30532, 21704, 10274, 12202, 39685, 23309, 10061, 68829, 55986, 66485, 3788, 97599, 75867, 20717, 74416, 53166, 35208, 33374, 87539, 8823, 48228, 63379, 85783, 47619, 53152, 67433, 35663, 52972, 16818, 60311, 60365, 94653, 35075, 33949, 42614, 29297, 1918, 28316, 98953, 73231, 83799, 42402, 56623, 34442, 34994, 41374, 70071, 14736, 9958, 18065, 32960, 7405, 36409, 83232, 99385, 41600, 11133, 7586, 15917, 6253, 19322, 53845, 57620, 52606, 66497, 68646, 78138, 66559, 19640, 99413, 11220, 94747, 7399, 37408, 48509, 23929, 27482, 45476, 85244, 35159, 31751, 57260, 68980, 5339, 15470, 48355, 88651, 22596, 3152, 19121, 88492, 99382, 14454, 4504, 20094, 98977, 74843, 93413, 22109, 78508, 30934, 47744, 7481, 83828, 73788, 6533, 28597, 20405, 94205, 20380, 22888, 48893, 27499, 98748, 60530, 45128, 74022, 84617, 82037, 10268, 78212, 16993, 35902, 91386, 44372, 15486, 65741, 14014, 87481, 37220, 41849, 84547, 46850, 52326, 34677, 58300, 74910, 64345, 19325, 81549, 46352, 33049, 69248, 93460, 45305, 7521, 61318, 31855, 14413, 70951, 11087, 96294, 14013, 31792, 59747, 67277, 76503, 34513, 39663, 77544, 52701, 8337, 56303, 87315, 16520, 69676, 11654, 99893, 2181, 68161, 57275, 36898, 81304, 48585, 68652, 27376, 92852, 55866, 88448, 3584, 20857, 73156, 70284, 24326, 79375, 95220, 1159, 63267, 10622, 48391, 15633, 84924, 90415, 93614, 33521, 26665, 55823, 47641, 86225, 31704, 92694, 48297, 39904, 2115, 59589, 49067, 66821, 41575, 49767, 4037, 77613, 19019, 88152, 80, 20554, 91409, 96277, 48257, 50816, 97616, 38688, 32486, 45134, 63545, 59404, 72059, 43947, 51680, 43852, 59693, 25163, 1889, 70014, 15021, 41290, 67312, 71857, 15957, 68971, 11403, 65251, 7629, 37239, 33295, 5870, 1119, 92784, 26340, 18477, 65622, 36815, 43625, 18637, 37509, 82444, 99005, 4921, 73701, 14707, 93997, 64397, 11692, 5327, 82162, 20247, 81759, 45197, 25332, 83745, 22567, 4515, 25624, 95096, 67946, 48460, 85558, 15191, 18782, 16930, 33361, 83761, 60873, 43253, 84145, 60833, 25983, 1291, 41349, 20368, 7126, 14387, 6345, 80854, 9279, 43529, 6318, 38384, 74761, 41196, 37480, 51321, 92246, 80088, 77074, 88722, 56736, 66164, 49431, 66919, 31678, 72472, 8, 80890, 18002, 94813, 31900, 54155, 83436, 35352, 54131, 5466, 55306, 93128, 18464, 74457, 90561, 72848, 11834, 79982, 68416, 39528, 72484, 82474, 25593, 48545, 35247, 18619, 13674, 18611, 19241, 81616, 18711, 53342, 44276, 75122, 11724, 74627, 73707, 58319, 15997, 7586, 16120, 82641, 22820, 92904, 13141, 32392, 19763, 61199, 67940, 90767, 4235, 13574, 17200, 69902, 63742, 78464, 22501, 18627, 90872, 40188, 28193, 29593, 88627, 94972, 11598, 62095, 36787, 441, 58997, 34414, 82157, 86887, 55087, 19152, 23, 12302, 80783, 32624, 68691, 63439, 75363, 44989, 16822, 36024, 867, 76378, 41605, 65961, 73488, 67049, 9070, 93399, 45547, 94458, 74284, 5041, 49807, 20288, 34060, 79495, 4146, 52162, 90286, 54158, 34243, 46978, 35482, 59362, 95938, 91704, 30552, 4737, 21031, 75051, 93029, 47665, 64382, 99782, 93478, 94015, 46874, 32444, 48277, 59820, 96163, 64654, 25843, 41145, 42820, 74108, 88222, 88570, 74015, 25704, 91035, 1755, 14750, 48968, 38603, 62880, 87873, 95160, 59221, 22304, 90314, 72877, 17334, 39283, 4149, 11748, 12102, 80580, 41867, 17710, 59621, 6554, 7850, 73950, 79552, 17944, 5600, 60478, 3343, 25852, 58905, 57216, 39618, 49856, 99326, 66067, 42792, 95043, 52680, 46780, 56487, 9971, 59481, 37006, 22186, 54244, 91030, 45547, 70818, 59849, 96169, 61459, 21647, 87417, 17198, 30945, 57589, 31732, 57260, 47670, 7654, 46376, 25366, 94746, 49580, 69170, 37403, 86995, 90307, 94304, 71803, 26825, 5511, 12459, 91314, 8345, 88975, 35841, 85771, 8105, 59987, 87112, 21476, 14713, 71181, 27767, 43584, 85301, 88977, 29490, 69714, 73035, 41207, 74699, 9310, 13025, 14338, 54066, 15243, 47724, 66733, 47431, 43905, 31048, 56699, 80217, 36292, 98525, 24335, 24432, 24896, 43277, 58874, 11466, 16082, 10875, 62004, 90391, 61105, 57411, 6368, 53856, 30743, 8670, 84741, 54127, 57326, 26629, 19087, 24472, 88779, 30540, 27886, 61732, 75454, 60311, 42824, 37301, 42678, 45990, 43242, 17374, 52003, 70707, 70214, 49739, 71484, 92003, 98086, 76668, 73209, 59202, 11973, 2902, 33250, 78626, 51594, 16453, 94614, 39014, 97066, 83012, 9832, 25571, 77628, 66692, 13986, 99837, 582, 81232, 44987, 9504, 96412, 90193, 79568, 44071, 28091, 7362, 97703, 76447, 42537, 98524, 97831, 65704, 9514, 41468, 85149, 49554, 17994, 14924, 39650, 95294, 556, 70481, 6905, 94559, 37559, 49678, 53119, 70312, 5682, 66986, 34099, 74474, 20740, 41615, 70360, 64114, 58660, 90850, 64618, 80620, 51790, 11436, 38072, 50273, 93113, 41794, 86861, 24781, 89683, 55411, 85667, 77535, 99892, 41396, 80504, 90670, 8289, 40902, 5069, 95083, 6783, 28102, 57816, 25807, 24260, 71529, 78920, 72682, 7385, 90726, 57166, 98884, 8583, 6170, 97965, 88302, 98041, 21443, 41808, 68984, 83620, 89747, 98882, 60808, 54444, 74412, 81105, 1176, 28838, 36421, 16489, 18059, 51061, 80940, 44893, 10408, 36222, 80582, 71944, 92638, 40333, 67054, 16067, 19516, 90120, 46759, 71643, 13177, 55292, 21036, 82808, 77501, 97427, 49386, 54480, 23604, 23554, 21785, 41101, 91178, 10174, 29420, 90438, 6312, 88940, 15995, 69321, 47458, 64809, 98189, 81851, 29651, 84215, 60942, 307, 11897, 92674, 40405, 68032, 96717, 54244, 10701, 41393, 92329, 98932, 78284, 46347, 71209, 92061, 39448, 93136, 25722, 8564, 77936, 63574, 31384, 51924, 85561, 29671, 58137, 17820, 22751, 36518, 38101, 77756, 11657, 13897, 95889, 57067, 47648, 13885, 70669, 93406, 39641, 69457, 91339, 22502, 92613, 89719, 11947, 56203, 19324, 20504, 84054, 40455, 99396, 63680, 67667, 60631, 69181, 96845, 38525, 11600, 47468, 3577, 57649, 63266, 24700, 71594, 14004, 23153, 69249, 5747, 43321, 31370, 28977, 23896, 76479, 68562, 62342, 7589, 8899, 5985, 64281, 61826, 18555, 64937, 13173, 33365, 78851, 16499, 87064, 13075, 66847, 70495, 32350, 2985, 86716, 38746, 26313, 77463, 55387, 72681, 72461, 33230, 21529, 53424, 92581, 2262, 78438, 66276, 18396, 73538, 21032, 91050, 13058, 16218, 12470, 56500, 15292, 76139, 59526, 52113, 95362, 67011, 6651, 16136, 1016, 857, 55018, 56374, 35824, 71708, 49712, 97380, 10404, 55452, 34030, 60726, 75211, 10271, 36633, 68424, 58275, 61764, 97586, 54716, 50259, 46345, 87195, 46092, 26787, 60939, 89514, 11788, 68224, 23417, 73959, 76145, 30342, 40277, 11049, 72049, 15472, 50669, 48139, 36732, 46874, 37088, 73465, 9819, 58869, 35220, 12120, 86124, 51247, 44302, 60883, 52109, 21437, 36786, 49226, 77837, 19612, 78430, 11661, 94770, 77603, 65669, 86868, 12665, 30012, 75989, 39141, 77400, 28e3, 64238, 73258, 71794, 31340, 26256, 66453, 37016, 64756, 80457, 8747, 12836, 3469, 50678, 3274, 43423, 66677, 82556, 92901, 51878, 56441, 22998, 29718, 38447, 6453, 25311, 7565, 53771, 3551, 90070, 9483, 94050, 45938, 18135, 36908, 43321, 11073, 51803, 98884, 66209, 6830, 53656, 14663, 56346, 71430, 4909, 19818, 5707, 27369, 86882, 53473, 7541, 53633, 70863, 3748, 12822, 19360, 49088, 59066, 75974, 63335, 20483, 43514, 37481, 58278, 26967, 49325, 43951, 91647, 93783, 64169, 49022, 98588, 9495, 49829, 59068, 38831, 4838, 83605, 92419, 39542, 7772, 71568, 75673, 35185, 89759, 44901, 74291, 24895, 88530, 70774, 35439, 46758, 70472, 70207, 92675, 91623, 61275, 35720, 26556, 95596, 20094, 73750, 85788, 34264, 1703, 46833, 65248, 14141, 53410, 38649, 6343, 57256, 61342, 72709, 75318, 90379, 37562, 27416, 75670, 92176, 72535, 93119, 56077, 6886, 18244, 92344, 31374, 82071, 7429, 81007, 47749, 40744, 56974, 23336, 88821, 53841, 10536, 21445, 82793, 24831, 93241, 14199, 76268, 70883, 68002, 3829, 17443, 72513, 76400, 52225, 92348, 62308, 98481, 29744, 33165, 33141, 61020, 71479, 45027, 76160, 57411, 13780, 13632, 52308, 77762, 88874, 33697, 83210, 51466, 9088, 50395, 26743, 5306, 21706, 70001, 99439, 80767, 68749, 95148, 94897, 78636, 96750, 9024, 94538, 91143, 96693, 61886, 5184, 75763, 47075, 88158, 5313, 53439, 14908, 8830, 60096, 21551, 13651, 62546, 96892, 25240, 47511, 58483, 87342, 78818, 7855, 39269, 566, 21220, 292, 24069, 25072, 29519, 52548, 54091, 21282, 21296, 50958, 17695, 58072, 68990, 60329, 95955, 71586, 63417, 35947, 67807, 57621, 64547, 46850, 37981, 38527, 9037, 64756, 3324, 4986, 83666, 9282, 25844, 79139, 78435, 35428, 43561, 69799, 63314, 12991, 93516, 23394, 94206, 93432, 37836, 94919, 26846, 2555, 74410, 94915, 48199, 5280, 37470, 93622, 4345, 15092, 19510, 18094, 16613, 78234, 50001, 95491, 97976, 38306, 32192, 82639, 54624, 72434, 92606, 23191, 74693, 78521, 104, 18248, 75583, 90326, 50785, 54034, 66251, 35774, 14692, 96345, 44579, 85932, 44053, 75704, 20840, 86583, 83944, 52456, 73766, 77963, 31151, 32364, 91691, 47357, 40338, 23435, 24065, 8458, 95366, 7520, 11294, 23238, 1748, 41690, 67328, 54814, 37777, 10057, 42332, 38423, 2309, 70703, 85736, 46148, 14258, 29236, 12152, 5088, 65825, 2463, 65533, 21199, 60555, 33928, 1817, 7396, 89215, 30722, 22102, 15880, 92261, 17292, 88190, 61781, 48898, 92525, 21283, 88581, 60098, 71926, 819, 59144, 224, 30570, 90194, 18329, 6999, 26857, 19238, 64425, 28108, 16554, 16016, 42, 83229, 10333, 36168, 65617, 94834, 79782, 23924, 49440, 30432, 81077, 31543, 95216, 64865, 13658, 51081, 35337, 74538, 44553, 64672, 90960, 41849, 93865, 44608, 93176, 34851, 5249, 29329, 19715, 94082, 14738, 86667, 43708, 66354, 93692, 25527, 56463, 99380, 38793, 85774, 19056, 13939, 46062, 27647, 66146, 63210, 96296, 33121, 54196, 34108, 75814, 85986, 71171, 15102, 28992, 63165, 98380, 36269, 60014, 7201, 62448, 46385, 42175, 88350, 46182, 49126, 52567, 64350, 16315, 53969, 80395, 81114, 54358, 64578, 47269, 15747, 78498, 90830, 25955, 99236, 43286, 91064, 99969, 95144, 64424, 77377, 49553, 24241, 8150, 89535, 8703, 91041, 77323, 81079, 45127, 93686, 32151, 7075, 83155, 10252, 73100, 88618, 23891, 87418, 45417, 20268, 11314, 50363, 26860, 27799, 49416, 83534, 19187, 8059, 76677, 2110, 12364, 71210, 87052, 50241, 90785, 97889, 81399, 58130, 64439, 5614, 59467, 58309, 87834, 57213, 37510, 33689, 1259, 62486, 56320, 46265, 73452, 17619, 56421, 40725, 23439, 41701, 93223, 41682, 45026, 47505, 27635, 56293, 91700, 4391, 67317, 89604, 73020, 69853, 61517, 51207, 86040, 2596, 1655, 9918, 45161, 222, 54577, 74821, 47335, 8582, 52403, 94255, 26351, 46527, 68224, 90183, 85057, 72310, 34963, 83462, 49465, 46581, 61499, 4844, 94626, 2963, 41482, 83879, 44942, 63915, 94365, 92560, 12363, 30246, 2086, 75036, 88620, 91088, 67691, 67762, 34261, 8769, 91830, 23313, 18256, 28850, 37639, 92748, 57791, 71328, 37110, 66538, 39318, 15626, 44324, 82827, 8782, 65960, 58167, 1305, 83950, 45424, 72453, 19444, 68219, 64733, 94088, 62006, 89985, 36936, 61630, 97966, 76537, 46467, 30942, 7479, 67971, 14558, 22458, 35148, 1929, 17165, 12037, 74558, 16250, 71750, 55546, 29693, 94984, 37782, 41659, 39098, 23982, 29899, 71594, 77979, 54477, 13764, 17315, 72893, 32031, 39608, 75992, 73445, 1317, 50525, 87313, 45191, 30214, 19769, 90043, 93478, 58044, 6949, 31176, 88370, 50274, 83987, 45316, 38551, 79418, 14322, 91065, 7841, 36130, 86602, 10659, 40859, 964, 71577, 85447, 61079, 96910, 72906, 7361, 84338, 34114, 52096, 66715, 51091, 86219, 81115, 49625, 48799, 89485, 24855, 13684, 68433, 70595, 70102, 71712, 88559, 92476, 32903, 68009, 58417, 87962, 11787, 16644, 72964, 29776, 63075, 13270, 84758, 49560, 10317, 28778, 23006, 31036, 84906, 81488, 17340, 74154, 42801, 27917, 89792, 62604, 62234, 13124, 76471, 51667, 37589, 87147, 24743, 48023, 6325, 79794, 35889, 13255, 4925, 99004, 70322, 60832, 76636, 56907, 56534, 72615, 46288, 36788, 93196, 68656, 66492, 35933, 52293, 47953, 95495, 95304, 50009, 83464, 28608, 38074, 74083, 9337, 7965, 65047, 36871, 59015, 21769, 30398, 44855, 1020, 80680, 59328, 8712, 48190, 45332, 27284, 31287, 66011, 9376, 86379, 74508, 33579, 77114, 92955, 23085, 92824, 3054, 25242, 16322, 48498, 9938, 44420, 13484, 52319, 58875, 2012, 88591, 52500, 95795, 41800, 95363, 54142, 17482, 32705, 60564, 12505, 40954, 46174, 64130, 63026, 96712, 79883, 39225, 52653, 69549, 36693, 59822, 22684, 31661, 88298, 15489, 16030, 42480, 15372, 38781, 71995, 77438, 91161, 10192, 7839, 62735, 99218, 25624, 2547, 27445, 69187, 55749, 32322, 15504, 73298, 51108, 48717, 92926, 75705, 89787, 96114, 99902, 37749, 96305, 12829, 70474, 838, 50385, 91711, 80370, 56504, 56857, 80906, 9018, 76569, 61072, 48568, 36491, 22587, 44363, 39592, 61546, 90181, 37348, 41665, 41339, 62106, 44203, 6732, 76111, 79840, 67999, 32231, 76869, 58652, 49983, 1669, 27464, 79553, 52855, 25988, 18087, 38052, 17529, 13607, 657, 76173, 43357, 77334, 24140, 53860, 2906, 89863, 44651, 55715, 26203, 65933, 51087, 98234, 40625, 45545, 63563, 89148, 82581, 4110, 66683, 99001, 9796, 47349, 65003, 66524, 81970, 71262, 14479, 31300, 8681, 58068, 44115, 40064, 77879, 23965, 69019, 73985, 19453, 26225, 97543, 37044, 7494, 85778, 35345, 61115, 92498, 49737, 64599, 7158, 82763, 25072, 38478, 57782, 75291, 62155, 52056, 4786, 11585, 71251, 25572, 79771, 93328, 66927, 54069, 58752, 26624, 50463, 77361, 29991, 96526, 2820, 91659, 12818, 96356, 49499, 1507, 40223, 9171, 83642, 21057, 2677, 9367, 38097, 16100, 19355, 6120, 15378, 56559, 69167, 30235, 6767, 66323, 78294, 14916, 19124, 88044, 16673, 66102, 86018, 29406, 75415, 22038, 27056, 26906, 25867, 14751, 92380, 30434, 44114, 6026, 79553, 55091, 95385, 41212, 37882, 46864, 54717, 97038, 53805, 64150, 70915, 63127, 63695, 41288, 38192, 72437, 75075, 18570, 52065, 8853, 30104, 79937, 66913, 53200, 84570, 78079, 28970, 53859, 37632, 80274, 35240, 32960, 74859, 7359, 55176, 3930, 38984, 35151, 82576, 82805, 94031, 12779, 90879, 24109, 25367, 77861, 9541, 85739, 69023, 64971, 99321, 7521, 95909, 43897, 71724, 92581, 5471, 64337, 98949, 3606, 78236, 78985, 29212, 57369, 34857, 67757, 58019, 58872, 96526, 28749, 56592, 37871, 72905, 70198, 57319, 54116, 47014, 18285, 33692, 72111, 60958, 96848, 17893, 40993, 50445, 14186, 76877, 87867, 50335, 9513, 44346, 26439, 55293, 6449, 44301, 63740, 40158, 72703, 88321, 85062, 57345, 66231, 15409, 3451, 95261, 43561, 15673, 28956, 90303, 62469, 82517, 43035, 36850, 15592, 64098, 59022, 31752, 4370, 50486, 11885, 23085, 41712, 80692, 48492, 16495, 99721, 36912, 28267, 27882, 16269, 64483, 11273, 2680, 1616, 46138, 54606, 14761, 5134, 45144, 63213, 49666, 27441, 86989, 29884, 54334, 6740, 8368, 80051, 81020, 17882, 74973, 74531, 94994, 24927, 64894, 22667, 20466, 82948, 66831, 47427, 76033, 31197, 59817, 20064, 61135, 28556, 29695, 80179, 74058, 18293, 9963, 35278, 13062, 83094, 23373, 90287, 33477, 48865, 30348, 70174, 11468, 25994, 25343, 22317, 1587, 30682, 1, 67814, 59557, 23362, 13746, 82244, 42093, 24671, 79458, 93730, 45488, 60234, 67098, 9899, 25775, 332, 36636, 57594, 19958, 85564, 58977, 12247, 60774, 66371, 69442, 20385, 14486, 91330, 50332, 46023, 75768, 59877, 60081, 92936, 72302, 75064, 85727, 52987, 5750, 19384, 33684, 78859, 80458, 69902, 34870, 88684, 49762, 40801, 86291, 18194, 90366, 82639, 53844, 96326, 65728, 48563, 26027, 52692, 62406, 76294, 41848, 63010, 69841, 29451, 36170, 21529, 16525, 64326, 22086, 24469, 57407, 96033, 37771, 31002, 18311, 93285, 31948, 14331, 58335, 15977, 80336, 81667, 27286, 24361, 61638, 57580, 95270, 46180, 76990, 53031, 94366, 2727, 49944, 19278, 5756, 51875, 53445, 33342, 1965, 7937, 10054, 97712, 87693, 58124, 46064, 39133, 77385, 9605, 65359, 70113, 90563, 86637, 94282, 12025, 31926, 24541, 23854, 58407, 32131, 92845, 20714, 27898, 26917, 50326, 35145, 50859, 72119, 95094, 29441, 42301, 62460, 75252, 94267, 38422, 73047, 24200, 85349, 72049, 91723, 97802, 98496, 12734, 73432, 10371, 57213, 53300, 80847, 46229, 7099, 72961, 13767, 65654, 31102, 82119, 96946, 65919, 81083, 3819, 57888, 57908, 16849, 77111, 41429, 92261, 45263, 1172, 55926, 78835, 27697, 48420, 58865, 41207, 21406, 8582, 10785, 36233, 12237, 7866, 13706, 92551, 11021, 63813, 71512, 65206, 37768, 94325, 14721, 20990, 54235, 71986, 5345, 56239, 52028, 1419, 7215, 55067, 11669, 21738, 66605, 69621, 69827, 8537, 18638, 60982, 28151, 98885, 76431, 25566, 3085, 23639, 30849, 63986, 73287, 26201, 36174, 14106, 54102, 57041, 16141, 64174, 3591, 90024, 73332, 31254, 17288, 59809, 25061, 51612, 47951, 16570, 43330, 79213, 11354, 55585, 19646, 99246, 37564, 32660, 20632, 21124, 60597, 69315, 31312, 57741, 85108, 21615, 24365, 27684, 16124, 33888, 14966, 35303, 69921, 15795, 4020, 67672, 86816, 63027, 84470, 45605, 44887, 26222, 79888, 58982, 22466, 98844, 48353, 60666, 58256, 31140, 93507, 69561, 6256, 88526, 18655, 865, 75247, 264, 65957, 98261, 72706, 36396, 46065, 85700, 32121, 99975, 73627, 78812, 89638, 86602, 96758, 65099, 52777, 46792, 13790, 55240, 52002, 10313, 91933, 71231, 10053, 78416, 54563, 96004, 42215, 30094, 45958, 48437, 49591, 50483, 13422, 69108, 59952, 27896, 40450, 79327, 31962, 46456, 39260, 51479, 61882, 48181, 50691, 64709, 32902, 10676, 12083, 35771, 79656, 56667, 76783, 3937, 99859, 10362, 57411, 40986, 35045, 2838, 29255, 64230, 84418, 34988, 77644, 39892, 77327, 74129, 53444, 35487, 95803, 38640, 20383, 55402, 25793, 14213, 87082, 42837, 95030, 97198, 61608, 97723, 79390, 35290, 34683, 81419, 87133, 70447, 53127, 97146, 28299, 56763, 12868, 1145, 12147, 58158, 92124, 60934, 18414, 97510, 7056, 54488, 20719, 53743, 91037, 44797, 52110, 8512, 18991, 20129, 31441, 51449, 14661, 71126, 23180, 68124, 18807, 70997, 21913, 19594, 70355, 73637, 68266, 60775, 43164, 52643, 96363, 77989, 79332, 39890, 65379, 20405, 52935, 43816, 92740, 95319, 4538, 60660, 28982, 15328, 80475, 34690, 2293, 19646, 46524, 96627, 33159, 42081, 8816, 74931, 20674, 8697, 66169, 46460, 46326, 39923, 60625, 28386, 22919, 19415, 75766, 43668, 31626, 70301, 67053, 3949, 70082, 2303, 48642, 38429, 94053, 38770, 68137, 68441, 52928, 70244, 91954, 17401, 92693, 98342, 21451, 84988, 80487, 33807, 73797, 49494, 41878, 76635, 83227, 76618, 11946, 13451, 87591, 78381, 21407, 90038, 72638, 69692, 51599, 86413, 32019, 64856, 74730, 41531, 11064, 1790, 58817, 86400, 66213, 92599, 70905, 78324, 54326, 43659, 34206, 63132, 38837, 40210, 96346, 16967, 81619, 96503, 14881, 89405, 32205, 49508, 98425, 2451, 35423, 56072, 36810, 30332, 85998, 49358, 92748, 84147, 79835, 94867, 41224, 61794, 35066, 82220, 66684, 20096, 2754, 41731, 37068, 32753, 91059, 13407, 5607, 69384, 53329, 95909, 44968, 11397, 92973, 50014, 92997, 80968, 93761, 57598, 74703, 7768, 37978, 73873, 33475, 9720, 97852, 98449, 48722, 84977, 11271, 11728, 68318, 22312, 78792, 87508, 88466, 72976, 47099, 84126, 38595, 85124, 64405, 90020, 7492, 52413, 95111, 34455, 86311, 68892, 1074, 60274, 28136, 19328, 38161, 57475, 13771, 63562, 84207, 94121, 18901, 52768, 33801, 82087, 86091, 59969, 90398, 56870, 55756, 78841, 98450, 54165, 55106, 50343, 70519, 14567, 36780, 55450, 19606, 83749, 67562, 64765, 38543, 16585, 86841, 73742, 8766, 39252, 75678, 75379, 78760, 37279, 15280, 13558, 95916, 89759, 76686, 76467, 67147, 63110, 94008, 8037, 35263, 53710, 16667, 79008, 11231, 29397, 67136, 18601, 64502, 90228, 89109, 72849, 22711, 65547, 34542, 26686, 81678, 87765, 77654, 23664, 96352, 14106, 32938, 28083, 18633, 80286, 65507, 46197, 52722, 75476, 77816, 47204, 34876, 45963, 79262, 90181, 84041, 3745, 90041, 30780, 27226, 92847, 85572, 15308, 80688, 5761, 82638, 13464, 23683, 81015, 54214, 64175, 43701, 86845, 15569, 50687, 52679, 87696, 8285, 97444, 47599, 94472, 64150, 87753, 68652, 60726, 26213, 17320, 64553, 81285, 98126, 12158, 52095, 64833, 492, 35817, 55571, 91300, 97812, 37507, 4209, 53515, 64342, 21223, 16662, 43265, 68219, 3529, 43636, 68417, 53640, 95326, 93381, 37113, 80751, 76469, 96677, 43054, 22937, 31954, 13266, 34140, 27253, 2734, 99070, 60077, 57988, 93211, 92795, 83795, 57477, 3941, 39007, 14619, 38320, 93449, 31336, 25279, 97030, 26245, 47394, 39475, 90621, 23820, 29344, 94859, 91604, 14033, 41868, 14816, 4075, 66644, 87803, 97815, 99552, 78666, 3942, 8175, 22345, 19983, 76783, 99044, 20851, 84981, 59052, 77178, 72109, 76475, 21619, 73017, 6812, 56633, 50612, 55289, 4671, 84419, 94072, 94446, 80603, 32188, 93415, 23464, 43947, 43728, 74284, 67177, 57105, 31059, 10642, 13803, 69602, 46961, 66567, 19359, 84676, 63918, 40650, 12923, 15974, 79732, 20225, 92525, 71179, 4859, 91208, 60430, 5239, 61458, 24089, 68852, 60171, 29603, 42535, 86365, 93905, 28237, 45317, 60718, 82001, 41679, 20679, 56304, 70043, 87568, 21386, 59049, 78353, 48696, 77379, 55309, 23780, 28391, 5940, 55583, 81256, 59418, 97521, 32846, 70761, 90115, 45325, 5490, 65974, 11186, 15357, 3568, 450, 96644, 58976, 36211, 88240, 92457, 89200, 94696, 11370, 91157, 48487, 59501, 56983, 89795, 42789, 69758, 79701, 29511, 55968, 41472, 89474, 84344, 80517, 7485, 97523, 17264, 82840, 59556, 37119, 30985, 48866, 60605, 95719, 70417, 59083, 95137, 76538, 44155, 67286, 57897, 28262, 4052, 919, 86207, 79932, 44236, 10089, 44373, 65670, 44285, 6903, 20834, 49701, 95735, 21149, 3425, 17594, 31427, 14262, 32252, 68540, 39427, 44026, 47257, 45055, 95091, 8367, 28381, 57375, 41562, 83883, 27715, 10122, 67745, 46497, 28626, 87297, 36568, 39483, 11385, 63292, 92305, 78683, 6146, 81905, 15038, 38338, 51206, 65749, 34119, 71516, 74068, 51094, 6665, 91884, 66762, 11428, 70908, 21506, 480, 94183, 78484, 66507, 75901, 25728, 52539, 86806, 69944, 65036, 27882, 2530, 4918, 74351, 65737, 89178, 8791, 39342, 94963, 22581, 56917, 17541, 83578, 75376, 65202, 30935, 79270, 91986, 99286, 45236, 44720, 81915, 70881, 45886, 43213, 49789, 97081, 16075, 20517, 69980, 25310, 91953, 1759, 67635, 88933, 54558, 18395, 73375, 62251, 58871, 9870, 70538, 48936, 7757, 90374, 56631, 88862, 30487, 38794, 36079, 32712, 11130, 55451, 25137, 38785, 83558, 31960, 69473, 45950, 18225, 9871, 88502, 75179, 11551, 75664, 74321, 67351, 27703, 83717, 18913, 42470, 8816, 37627, 14288, 62831, 44047, 67612, 72738, 26995, 50933, 63758, 50003, 43693, 52661, 55852, 52372, 59042, 37595, 4931, 73622, 68387, 86478, 40997, 5245, 75300, 24902, 59609, 35653, 15970, 37681, 69365, 22236, 86374, 65550, 343, 98377, 35354, 65770, 15365, 41422, 71356, 16630, 40044, 19290, 66449, 53629, 79452, 71674, 30260, 97303, 6487, 62789, 13005, 70152, 22501, 49867, 89294, 59232, 31776, 54919, 99851, 5438, 1096, 72269, 50486, 16719, 6144, 82041, 38332, 64452, 31840, 99287, 59928, 25503, 8407, 46970, 45907, 99238, 74547, 19704, 72035, 26542, 54600, 79172, 58779, 35747, 78956, 11478, 41195, 58135, 63856, 33037, 45753, 60159, 25193, 71838, 7526, 7985, 60714, 88627, 75790, 38454, 96110, 39237, 19792, 34534, 70169, 24805, 63215, 38175, 38784, 38855, 24826, 50917, 25147, 17082, 26997, 32295, 10894, 21805, 65245, 85407, 37926, 69214, 38579, 84721, 23544, 88548, 65626, 75517, 69737, 55626, 52175, 21697, 19453, 16908, 82841, 24060, 40285, 19195, 80281, 89322, 15232, 70043, 60691, 86370, 91949, 19017, 83846, 77869, 14321, 95102, 87073, 71467, 31305, 64677, 80358, 52629, 79419, 22359, 87867, 48296, 50141, 46807, 82184, 95812, 84665, 74511, 59914, 4146, 90417, 58508, 62875, 17630, 21868, 9199, 30322, 33352, 43374, 25473, 4119, 63086, 14147, 14863, 38020, 44757, 98628, 57916, 22199, 11865, 42911, 62651, 78290, 9392, 77294, 63168, 21043, 17409, 13786, 27475, 75979, 89668, 43596, 74316, 84489, 54941, 95992, 45445, 41059, 55142, 15214, 42903, 16799, 88254, 95984, 48575, 77822, 21067, 57238, 35352, 96779, 89564, 23797, 99937, 46379, 27119, 16060, 30302, 95327, 12849, 38111, 97090, 7598, 78473, 63079, 18570, 72803, 70040, 91385, 96436, 96263, 17368, 56188, 85999, 50026, 36050, 73736, 13351, 48321, 28357, 51718, 65636, 72903, 21584, 21060, 39829, 15564, 4716, 14594, 22363, 97639, 65937, 17802, 31535, 42767, 98761, 30987, 57657, 33398, 63053, 25926, 20944, 19306, 81727, 2695, 97479, 79172, 72764, 66446, 78864, 12698, 15812, 97209, 38827, 91016, 91281, 57875, 45228, 49211, 69755, 99224, 43999, 62879, 8879, 80015, 74396, 57146, 64665, 31159, 6980, 79069, 37409, 75037, 69977, 85919, 42826, 6974, 61063, 97640, 13433, 92528, 91311, 8440, 38840, 22362, 93929, 1836, 36590, 75052, 89475, 15437, 65648, 99012, 70236, 12307, 83585, 414, 62851, 48787, 28447, 21702, 57033, 29633, 44760, 34165, 27548, 37516, 24343, 63046, 2081, 20378, 19510, 42226, 97134, 68739, 32982, 56455, 53129, 77693, 25022, 55534, 99375, 30086, 98001, 7432, 67126, 76656, 29347, 28492, 43108, 64736, 32278, 84816, 80440, 30461, 818, 9136, 1952, 48442, 91058, 92590, 10443, 5195, 34009, 32141, 62209, 43740, 54102, 76895, 98172, 31583, 4155, 66492, 58981, 16591, 11331, 6838, 3818, 77063, 12523, 45570, 68970, 70055, 77751, 73743, 71732, 4704, 61384, 57343, 66682, 44500, 89745, 10436, 67202, 36455, 42467, 88801, 91280, 1056, 27534, 81619, 79004, 25824, 66362, 33280, 20706, 31929, 57422, 18730, 96197, 22101, 47592, 2180, 18287, 82310, 60430, 59627, 26471, 7794, 60475, 76713, 45427, 89654, 14370, 81674, 41246, 98416, 8669, 48883, 77154, 9806, 94015, 60347, 20027, 8405, 33150, 27368, 53375, 70171, 59431, 14534, 34018, 85665, 77797, 17944, 49602, 74391, 48830, 55029, 10371, 94261, 16658, 68400, 44148, 28150, 40364, 90913, 73151, 64463, 50058, 78191, 84439, 82478, 62398, 3113, 17578, 12830, 6571, 95934, 9132, 25287, 78731, 80683, 67207, 76597, 42096, 34934, 76609, 52553, 47508, 71561, 8038, 83011, 72577, 95790, 40076, 20292, 32138, 61197, 95476, 23123, 26648, 13611, 48452, 39963, 85857, 4855, 27029, 1542, 72443, 53688, 82635, 56264, 7977, 23090, 93553, 65434, 12124, 91087, 87800, 95675, 99419, 44659, 30382, 55263, 82514, 86800, 16781, 65977, 65946, 13033, 93895, 4056, 75895, 47878, 91309, 51233, 81409, 46773, 69135, 56906, 84493, 34530, 84534, 38312, 54574, 92933, 77341, 20839, 36126, 1143, 35356, 35459, 7959, 98335, 53266, 36146, 78047, 50607, 22486, 63308, 8996, 96056, 39085, 26567, 6779, 62663, 30523, 47881, 41279, 49864, 82248, 78333, 29466, 48151, 41957, 93235, 53308, 22682, 90722, 54478, 7235, 34306, 15827, 20121, 96837, 6283, 80172, 66109, 92592, 48238, 76428, 94546, 45430, 16288, 74839, 740, 25553, 83767, 35900, 5998, 7493, 46755, 11449, 88824, 44906, 33143, 7454, 56652, 34755, 63992, 59674, 65131, 46358, 12799, 96988, 51158, 73176, 1184, 49925, 63519, 11785, 29073, 72850, 47997, 75172, 55187, 15313, 40725, 33225, 56643, 10465, 38583, 86440, 97967, 26401, 17078, 38765, 33454, 19136, 57712, 48446, 98790, 27315, 71074, 10157, 57946, 35582, 49383, 61324, 26572, 84503, 3496, 60449, 17962, 26017, 65651, 40400, 83246, 80056, 75306, 75147, 41863, 25581, 87530, 33193, 43294, 5065, 99644, 62771, 75986, 79005, 44924, 18703, 40889, 4403, 5862, 2571, 82500, 74200, 36170, 46836, 74642, 65471, 26815, 30937, 64946, 10160, 15544, 31962, 54015, 28853, 66533, 14573, 79398, 47391, 73165, 47805, 77589, 16881, 13423, 89452, 76992, 62509, 9796, 57540, 13486, 48855, 25546, 47589, 21012, 47388, 78428, 70196, 84413, 81026, 87597, 22445, 83769, 85937, 38321, 85485, 87359, 9839, 67228, 71179, 94372, 4446, 62801, 50775, 96179, 40646, 44272, 12417, 47199, 39701, 30665, 32775, 66525, 53558, 78882, 31939, 67209, 38906, 34533, 99914, 27719, 216, 99225, 96537, 3843, 90564, 91110, 51838, 30300, 9559, 37795, 94880, 11325, 44979, 89696, 28129, 29931, 89971, 46292, 92710, 11036, 74760, 75307, 12291, 49618, 16293, 92408, 67928, 80823, 32872, 25460, 66819, 35374, 4035, 99087, 61129, 11341, 39118, 10891, 37217, 63638, 75477, 30068, 42334, 57570, 6890, 59353, 89939, 37692, 15232, 20033, 32202, 22348, 2766, 96791, 58448, 92248, 5769, 96684, 67885, 99295, 47271, 38655, 59513, 96960, 31718, 8974, 16122, 20535, 52380, 29769, 70660, 57425, 50891, 75044, 84257, 73315, 38181, 28673, 93140, 26307, 82265, 78382, 19681, 56585, 8975, 76764, 39956, 83450, 84663, 89963, 71584, 57696, 30829, 60527, 64947, 34899, 28805, 28397, 91830, 51842, 99838, 39839, 66971, 67177, 74219, 35637, 35634, 93581, 81746, 29991, 81096, 94279, 2968, 62561, 2479, 82126, 25702, 67953, 88088, 50293, 83423, 86206, 39935, 23253, 43041, 48941, 85787, 8388, 6671, 43574, 84908, 67295, 33623, 55060, 28174, 48415, 2529, 22009, 24524, 5283, 30460, 32399, 80423, 56929, 40852, 69969, 88541, 5979, 91496, 64730, 57198, 83145, 39750, 3568, 54669, 98679, 4297, 51047, 31492, 47734, 31343, 31180, 232, 19707, 24823, 75079, 73943, 17997, 8446, 91252, 39879, 58682, 82972, 18417, 39203, 36681, 42895, 8459, 15618, 17941, 52594, 43277, 16530, 40052, 91100, 87422, 47230, 95699, 49794, 50492, 87439, 86354, 4546, 65333, 11057, 77727, 19748, 38722, 91821, 18107, 42125, 89239, 28847, 54623, 38783, 47803, 31414, 38450, 3697, 89186, 30579, 44188, 26532, 8420, 80723, 48100, 60748, 76330, 45832, 8311, 16051, 4475, 13400, 48527, 46073, 17439, 56498, 94632, 9021, 16871, 83366, 14896, 4219, 38375, 87890, 90217, 42370, 61028, 85101, 76771, 83715, 94737, 69973, 74187, 1958, 59691, 86712, 86570, 60984, 76342, 13648, 85250, 28323, 48379, 45141, 36277, 51845, 29039, 3553, 5128, 59866, 51281, 68124, 17007, 24729, 29710, 41439, 40574, 11774, 86746, 89698, 56020, 37810, 88972, 11361, 95583, 70786, 589, 74473, 87513, 17690, 61427, 72914, 32517, 1804, 97910, 6327, 30246, 33049, 2622, 41026, 80875, 41293, 16752, 84225, 84414, 37137, 68956, 8095, 64981, 28180, 38629, 76962, 23840, 17477, 75268, 48297, 70340, 57888, 13938, 38554, 86836, 2195, 30270, 55484, 53364, 54705, 41380, 56316, 37723, 234, 21424, 26664, 63804, 75139, 36534, 18579, 9833, 98849, 72762, 59767, 52497, 24227, 83152, 71794, 21398, 99456, 89215, 51632, 54799, 27973, 68568, 68465, 98500, 28681, 18369, 24279, 96335, 12874, 82160, 67202, 85199, 27908, 67022, 49810, 77929, 96212, 81153, 77884, 7032, 1671, 53362, 28119, 56786, 30883, 28540, 76029, 3774, 64611, 19736, 25589, 46569, 45206, 48215, 69523, 17423, 91807, 90039, 30393, 58319, 85098, 66519, 57571, 24541, 3562, 14400, 62731, 82534, 61477, 89731, 18421, 29861, 52829, 838, 78040, 43350, 74323, 82892, 84746, 28302, 13264, 7595, 134, 12933, 46831, 24864, 47275, 20527, 9110, 28485, 30326, 99826, 64005, 99308, 65779, 42760, 90066, 3974, 38688, 39968, 32604, 11694, 46262, 73262, 45405, 43923, 67397, 88228, 56405, 17839, 92073, 57622, 93328, 15442, 50186, 7570, 58001, 31e3, 8915, 11467, 14793, 82691, 51238, 12485, 51745, 18192, 5985, 36826, 89434, 38669, 91592, 88799, 65621, 67237, 59541, 19657, 93402, 58705, 73553, 78280, 69125, 95591, 81168, 91927, 25976, 89077, 71690, 19404, 64603, 59752, 74698, 44233, 67602, 38615, 31303, 28650, 53700, 89819, 7783, 4351, 77451, 47350, 21234, 16016, 41532, 76508, 23063, 44993, 43983, 33356, 61715, 96485, 22121, 78004, 6316, 87896, 99289, 93981, 37850, 66128, 92735, 45064, 50924, 24204, 58816, 65290, 34392, 55567, 66416, 72353, 45775, 68590, 85685, 72683, 60090, 37149, 85347, 57414, 72336, 12979, 5720, 92754, 76911, 96883, 74420, 5220, 85815, 23557, 80567, 44365, 70254, 50864, 36619, 51479, 23281, 76428, 18580, 34240, 59289, 49076, 18439, 29522, 42541, 4024, 84446, 92434, 90407, 77241, 19690, 78143, 65919, 13699, 91844, 91241, 38361, 67171, 90551, 5709, 3474, 76025, 97043, 33834, 44638, 54040, 82797, 545, 38159, 16089, 35870, 89158, 55864, 98078, 50563, 36492, 10994, 85909, 9018, 19252, 73887, 67928, 60045, 70782, 11937, 4074, 53814, 46621, 52577, 94853, 45968, 73667, 65062, 73306, 76045, 78649, 91654, 53958, 96537, 95542, 67622, 54579, 17279, 67440, 56441, 20681, 64011, 52226, 96618, 32831, 60664, 67547, 39523, 2043, 59748, 1887, 69229, 94653, 99271, 98164, 62155, 9234, 47367, 13047, 6364, 35064, 10073, 6793, 80248, 29009, 44969, 11129, 17139, 79630, 89772, 26921, 56949, 23465, 30036, 17173, 82459, 96218, 60768, 76417, 24405, 18710, 68887, 82394, 69729, 82503, 40873, 41590, 67255, 30757, 9657, 91881, 34578, 9511, 5417, 58953, 18532, 10721, 22029, 48524, 47778, 881, 83489, 3464, 57462, 97459, 86689, 39755, 39547, 740, 36666, 7993, 31671, 86304, 12970, 73402, 52849, 31652, 79655, 11250, 18463, 57518, 20306, 25301, 1374, 51208, 33298, 87662, 61849, 60923, 68685, 69411, 39266, 80320, 34844, 89416, 81569, 83651, 35795, 40168, 33501, 1042, 58931, 3892, 85188, 74740, 85476, 23790, 33842, 89565, 53359, 25579, 59049, 62394, 72435, 12457, 21904, 18370, 97035, 57905, 9581, 91227, 92754, 37760, 1411, 7440, 87175, 88318, 63242, 85960, 56690, 12618, 30493, 11569, 73723, 7448, 58830, 157, 65814, 21118, 22140, 73793, 57855, 81830, 6795, 13183, 12625, 30635, 56429, 73216, 12342, 36722, 83886, 96828, 82870, 90954, 97614, 2370, 42160, 73370, 11944, 49067, 59452, 80495, 43911, 46712, 17033, 68037, 41963, 3874, 44856, 82985, 57453, 84358, 16120, 4454, 76624, 405, 62369, 55080, 61880, 51270, 87807, 10653, 36894, 70850, 35660, 234, 14705, 93418, 94084, 82856, 25384, 71555, 56754, 78315, 18291, 91656, 98079, 52384, 43306, 65205, 75903, 58701, 99496, 50048, 33557, 87793, 90857, 10143, 46726, 84284, 43635, 41213, 83845, 70986, 91408, 80220, 5728, 68890, 46577, 21152, 43759, 43301, 93661, 97252, 50106, 10099, 13722, 18572, 44024, 351, 18173, 23717, 85114, 85998, 57782, 63951, 53723, 86853, 63851, 79430, 49181, 46386, 69666, 55743, 76162, 71724, 40028, 94786, 34457, 16906, 90040, 30789, 40281, 94697, 96584, 81907, 4055, 53990, 66397, 80579, 42517, 78181, 39251, 9467, 67097, 95523, 66568, 63632, 71048, 15581, 39904, 75774, 77495, 75994, 29911, 65690, 41178, 47712, 70355, 16998, 56025, 5230, 10093, 71495, 34784, 70950, 54680, 57811, 53782, 39145, 36829, 85342, 40406, 35883, 45668, 3459, 29870, 78252, 70088, 70621, 67153, 5737, 40933, 91075, 93335, 86853, 15860, 81167, 91259, 16118, 52401, 83593, 84474, 2423, 75608, 39646, 90871, 70284, 82100, 96032, 5115, 63678, 2225, 88087, 58581, 44364, 57468, 21539, 13042, 64150, 63754, 5210, 87644, 54114, 64013, 63562, 41388, 32397, 74152, 23982, 71982, 71700, 33026, 66477, 47838, 46712, 39848, 35083, 65927, 97868, 11067, 76771, 71799, 43836, 41014, 97025, 93225, 8511, 63096, 26628, 73012, 12543, 76269, 99708, 2629, 49845, 73677, 19193, 14924, 57236, 95564, 15010, 59667, 73773, 78515, 2624, 99744, 13585, 33746, 58771, 94785, 62628, 99585, 11363, 80832, 59979, 9444, 78700, 2596, 85984, 69438, 16913, 96475, 93283, 18625, 77086, 45911, 39746, 64722, 39938, 43930, 54619, 302, 50384, 2738, 75714, 75249, 95439, 80714, 52555, 47266, 96190, 78750, 94973, 83669, 16479, 53163, 48071, 28e3, 45011, 26733, 67132, 83362, 84162, 43028, 8415, 27236, 52651, 89059, 64844, 80910, 1676, 91752, 57815, 26264, 3415, 57532, 29981, 61200, 96036, 62600, 20068, 56530, 38487, 8432, 89514, 26883, 69165, 97237, 22361, 55276, 39902, 95927, 82190, 49269, 27212, 46095, 37106, 64254, 27460, 49572, 51700, 27679, 12574, 33891, 3867, 9925, 6476, 82018, 45094, 59014, 67113, 44192, 75, 23318, 79895, 70550, 81717, 28833, 30271, 15821, 14999, 88174, 62617, 57517, 55256, 50281, 51583, 96879, 5225, 42272, 5339, 20483, 57596, 41011, 75937, 22767, 50120, 95938, 49753, 63882, 99616, 69083, 38721, 73889, 80236, 99531, 23053, 71237, 48861, 59046, 76283, 60538, 19732, 93877, 30345, 64882, 66660, 17026, 70364, 45676, 8039, 96228, 89936, 59141, 95585, 89552, 97247, 59325, 27848, 80058, 15950, 61481, 90906, 40998, 44137, 16144, 66300, 44091, 50018, 81364, 18211, 60294, 76559, 20279, 27414, 10589, 39860, 23e3, 31767, 95618, 56738, 50332, 16936, 70342, 92481, 30702, 76264, 62619, 68678, 62284, 83112, 93032, 55203, 52614, 36950, 41796, 45403, 79262, 2887, 53596, 61308, 20738, 34811, 27099, 90956, 65448, 3080, 75795, 29753, 97699, 80872, 23830, 85882, 74427, 99523, 74904, 28017, 45898, 57232, 48525, 7086, 26805, 74533, 92470, 18840, 76011, 93109, 14344, 55614, 50284, 15865, 19458, 35856, 13464, 53679, 64603, 51571, 56124, 79107, 29596, 89572, 78198, 57121, 73649, 8804, 87977, 87959, 70859, 40909, 77295, 87877, 75158, 62810, 92074, 23244, 59516, 50552, 31602, 41899, 6347, 27821, 68370, 48596, 88577, 30231, 25267, 84622, 31449, 12086, 56461, 22962, 78213, 62483, 93966, 60437, 52239, 58113, 32526, 38708, 81607, 57016, 1695, 90110, 4649, 59990, 23979, 3855, 10297, 46516, 96092, 82305, 30760, 78756, 4967, 82876, 4773, 86651, 16648, 53133, 82439, 78851, 49766, 24553, 15273, 36417, 1901, 33386, 76979, 25920, 33372, 2695, 11982, 40911, 6230, 91696, 43907, 17827, 30332, 89203, 32215, 91806, 23080, 49102, 9174, 11548, 54590, 75803, 66108, 73882, 62324, 26017, 72716, 33887, 1285, 31604, 71039, 24337, 53514, 58964, 89901, 22040, 92751, 12617, 37007, 5523, 61672, 62557, 98540, 26094, 60284, 19621, 96230, 38044, 6545, 9458, 42988, 2913, 86345, 67936, 90174, 40840, 44991, 24256, 34989, 74086, 13652, 68706, 1363, 4294, 88008, 78693, 83068, 94746, 221, 89299, 53186, 5930, 61889, 51341, 45412, 58860, 72568, 11381, 59785, 36887, 10690, 31347, 93326, 96267, 86987, 57565, 86836, 49071, 90331, 41248, 34629, 30240, 27270, 3864, 84308, 3035, 61369, 36902, 51017, 44409, 17120, 23823, 36460, 63359, 8333, 63173, 19134, 6493, 303, 18550, 26191, 19051, 81502, 66343, 6737, 90430, 65478, 58982, 82484, 16483, 47704, 44640, 68322, 44548, 72787, 2335, 28749, 39320, 5436, 98146, 56596, 812, 51445, 35533, 35478, 47573, 38414, 25542, 38032, 13442, 42983, 97207, 77854, 57806, 81616, 52828, 79429, 47389, 96795, 57764, 19605, 24767, 63253, 18809, 65093, 44449, 22952, 76872, 30983, 38948, 9310, 48336, 87651, 27110, 84427, 76209, 56412, 12760, 16747, 14551, 82626, 31224, 98636, 75100, 84882, 79479, 83420, 5347, 6803, 90063, 4617, 40257, 79183, 41766, 71873, 25242, 12275, 336, 40798, 42055, 74066, 69128, 32547, 76508, 32530, 42359, 89207, 49758, 58984, 92732, 15779, 7234, 28884, 28226, 50011, 35883, 99606, 45423, 76224, 75427, 85747, 33879, 97978, 57441, 927, 19164, 74716, 40702, 19715, 70917, 60344, 40236, 9019, 50577, 15598, 53136, 57285, 20536, 7539, 74832, 89184, 41501, 39447, 97422, 97041, 21913, 40581, 76081, 13089, 28776, 54164, 55736, 36263, 71841, 34488, 74988, 55467, 43322, 9214, 36746, 67981, 71877, 81683, 32461, 84091, 19422, 88366, 62054, 85664, 13409, 8003, 88276, 6989, 16607, 33633, 85349, 5784, 25950, 97998, 74110, 16699, 60184, 92818, 79705, 10381, 1474, 18656, 50434, 18232, 92132, 66537, 70141, 42854, 25120, 39581, 28249, 14215, 34810, 19767, 3409, 11807, 6566, 66138, 42997, 41999, 67504, 87117, 28961, 5e3, 29673, 77726, 73225, 54753, 69712, 71576, 92337, 17713, 63185, 87923, 91889, 68351, 17712, 75532, 93849, 48280, 62219, 317, 25290, 29209, 90927, 92929, 92762, 60413, 2018, 31793, 76290, 73373, 80777, 60819, 77375, 57886, 47291, 99670, 32605, 29064, 99476, 80999, 31217, 35, 91300, 14892, 73653, 26593, 25305, 56797, 12837, 39560, 27582, 37253, 38531, 76489, 49946, 69108, 58687, 43092, 73807, 96282, 6648, 67431, 87124, 57694, 21660, 64002, 6, 33600, 30245, 60636, 80164, 9285, 61426, 4658, 54130, 14710, 76553, 1904, 93668, 63110, 98618, 5601, 32199, 74923, 98049, 49717, 55539, 35940, 58545, 43295, 35810, 45451, 38735, 42065, 66769, 69825, 45461, 83881, 67372, 67351, 90612, 79502, 69460, 23108, 74421, 82990, 46821, 40683, 71603, 55267, 48192, 50242, 79738, 96417, 6664, 19929, 23644, 41116, 51056, 219, 45086, 32747, 49492, 15399, 24874, 80825, 95928, 61457, 45813, 59037, 16136, 3953, 83583, 5910, 12654, 53630, 92997, 22168, 93491, 71897, 74579, 24022, 6278, 24049, 71670, 43044, 8474, 38572, 77402, 35800, 7455, 96177, 41653, 74493, 20802, 65843, 73050, 73349, 2638, 65813, 96209, 49196, 45007, 32207, 14097, 66059, 46681, 7534, 71263, 20582, 10171, 51514, 52142, 60961, 57951, 25637, 37860, 21683, 86190, 90434, 94481, 85697, 95344, 2606, 74095, 61133, 7472, 64777, 94050, 41482, 975, 23471, 76052, 82021, 87676, 91345, 20196, 2612, 86299, 44996, 40312, 65712, 46079, 88514, 8610, 3685, 63197, 9073, 53105, 86824, 28112, 99306, 40706, 66840, 83003, 51590, 52755, 32285, 68454, 85058, 13645, 23073, 24724, 52989, 71880, 21952, 44144, 74975, 76715, 7844, 46447, 86643, 75579, 29276, 10864, 83179, 36721, 19300, 35066, 29383, 47478, 56644, 33354, 31414, 17643, 92374, 85085, 88458, 87191, 85248, 34963, 76278, 53230, 13953, 76985, 70959, 36663, 5293, 32658, 56767, 56997, 76736, 6558, 64248, 11907, 29123, 78458, 17678, 63805, 89973, 5076, 39263, 54404, 4355, 64957, 74407, 99838, 18836, 78098, 6490, 74888, 73719, 80675, 86178, 56283, 33591, 96957, 38382, 18772, 74773, 71229, 2603, 52673, 44609, 14843, 58418, 18060, 95459, 626, 30914, 13550, 42195, 44863, 8871, 89182, 64446, 78422, 41140, 15312, 98274, 48168, 95651, 35562, 85386, 56252, 72136, 85088, 68761, 78434, 98143, 61330, 2446, 64409, 49406, 99127, 98626, 55095, 44808, 13594, 87370, 89472, 12833, 98932, 68064, 58193, 20225, 5192, 28425, 23978, 24542, 80845, 55858, 4015, 21454, 37346, 51007, 17202, 10242, 12682, 55933, 96922, 22280, 75597, 50227, 70712, 44236, 20470, 36320, 49339, 60536, 80083, 38880, 93327, 49522, 93585, 9918, 55268, 4671, 57526, 11457, 48424, 54610, 7211, 78610, 9473, 72923, 27347, 30057, 76968, 26177, 59367, 46172, 88951, 40229, 34921, 60405, 88959, 16779, 29547, 92231, 61997, 36002, 21080, 39795, 77221, 10012, 49748, 76900, 15964, 3803, 40260, 92351, 92844, 10288, 57483, 10881, 70408, 75688, 16610, 1638, 93082, 44282, 66849, 75702, 69428, 34047, 84968, 71281, 72328, 73143, 88672, 49802, 50639, 18129, 93659, 58389, 49095, 45971, 34196, 84609, 59222, 19332, 17777, 41004, 47057, 30688, 16039, 20906, 41477, 42915, 60877, 33864, 75195, 62294, 3371, 11672, 1370, 2486, 35553, 17907, 90621, 45136, 9722, 67635, 12114, 63055, 16004, 21625, 24321, 20491, 26881, 66259, 94287, 54751, 36242, 36557, 5842, 30687, 65418, 94608, 24741, 45887, 78800, 86912, 42076, 50287, 9284, 68891, 76368, 83094, 96302, 35997, 30761, 97081, 9501, 68887, 32876, 1705, 34260, 95065, 45528, 88241, 30402, 12318, 52430, 40139, 96986, 84900, 72408, 42027, 31676, 54382, 73370, 26184, 14024, 57444, 57660, 52173, 30274, 93448, 63273, 77681, 74946, 2099, 69091, 19372, 66961, 14595, 58642, 75760, 52253, 53148, 26074, 52293, 65359, 63971, 4833, 86492, 1227, 54505, 19515, 89889, 46933, 13364, 33883, 83389, 36952, 52505, 67513, 40071, 31001, 3105, 87912, 29610, 75108, 37363, 28479, 43546, 89992, 19550, 54863, 82633, 19209, 21548, 35022, 21960, 57961, 11815, 95867, 559, 26428, 69386, 57453, 70147, 73538, 49562, 46806, 64550, 36653, 25718, 68792, 31113, 7607, 48037, 71020, 22666, 65957, 11141, 39227, 7990, 19849, 65972, 74528, 40888, 55386, 95918, 92088, 91125, 53648, 66122, 138, 79933, 71058, 34826, 97725, 69513, 22915, 18246, 52244, 91161, 40861, 40374, 13239, 56162, 4703, 95851, 22824, 41271, 28202, 62852, 84238, 46625, 20031, 8524, 20077, 65817, 21174, 29279, 57712, 22401, 67500, 30980, 74485, 26480, 21343, 30031, 61921, 35744, 57308, 71196, 1865, 49234, 62616, 54021, 29008, 83672, 85839, 96836, 45077, 80900, 66906, 63526, 93824, 71820, 11033, 20183, 85704, 4683, 63512, 39144, 56880, 64424, 95979, 17709, 94849, 31771, 5737, 84286, 16757, 46256, 24478, 73180, 59978, 8254, 78963, 95437, 86351, 33824, 32540, 18357, 2668, 99260, 21284, 81351, 70961, 10255, 6911, 47394, 72408, 23827, 59865, 96395, 30665, 43699, 3593, 29165, 23388, 26628, 92402, 16731, 86740, 29493, 9069, 78653, 90094, 42735, 33682, 95041, 89887, 92369, 57949, 81585, 50593, 14698, 4737, 72551, 57271, 59433, 156, 33966, 58773, 59108, 49578, 18100, 59836, 73221, 21110, 1650, 11058, 47770, 66141, 84576, 58388, 40915, 94507, 32209, 17272, 65674, 95552, 25685, 5345, 36995, 36302, 7971, 67001, 62062, 75939, 36005, 26739, 56484, 46885, 66348, 87666, 78055, 44485, 82955, 85936, 9219, 1847, 92687, 72579, 45457, 78252, 98239, 4e4, 75563, 92408, 17175, 78845, 32638, 26959, 35406, 59553, 57852, 7506, 9, 93172, 77713, 93880, 40981, 27924, 9678, 24538, 52426, 84852, 83781, 23712, 82490, 77890, 22482, 66668, 55850, 25644, 44972, 62275, 78089, 28894, 98685, 32998, 98766, 89119, 34355, 75127, 69797, 71419, 62067, 57990, 96514, 50603, 79807, 26135, 29207, 43632, 32905, 38513, 18924, 88872, 20758, 70232, 60425, 1116, 24077, 21369, 93541, 75329, 78656, 44251, 42014, 98154, 42552, 14575, 30765, 348, 1134, 71581, 68420, 78141, 21105, 63305, 9718, 54851, 65867, 8595, 47390, 39182, 51174, 41478, 64433, 59628, 31945, 87322, 78667, 95282, 5622, 26224, 19972, 97269, 98376, 14779, 51138, 49658, 45345, 4972, 52794, 15737, 496, 48939, 63485, 42780, 16061, 59631, 37171, 13483, 56058, 51093, 62290, 88227, 17400, 88433, 67363, 89507, 26482, 85964, 71336, 67799, 28342, 37747, 61722, 27180, 78755, 18603, 42953, 6606, 23875, 56766, 1932, 36113, 62807, 84012, 21103, 9685, 69662, 76755, 13701, 95168, 13169, 44726, 15284, 16702, 89617, 54397, 52052, 12835, 37741, 86434, 22400, 37947, 95763, 86337, 35189, 22756, 47473, 16618, 42479, 47405, 14055, 64262, 66670, 89692, 54032, 94591, 44149, 29854, 76691, 33263, 62048, 25116, 88598, 16119, 62116, 54517, 31883, 86707, 18895, 81790, 71294, 2684, 15292, 48107, 14341, 91416, 75609, 92564, 39987, 2283, 89970, 95855, 80970, 5432, 89860, 90293, 99851, 94648, 5598, 32171, 28793, 92305, 64244, 8277, 93391, 96717, 34464, 29838, 10664, 28050, 60122, 77934, 10758, 84922, 92220, 45071, 97697, 36368, 17792, 84792, 76594, 67319, 51886, 5665, 45201, 11348, 9254, 7510, 51039, 91683, 84500, 85338, 5555, 19633, 3870, 39576, 41486, 58524, 54508, 20707, 58504, 39642, 22454, 80069, 83455, 31043, 90794, 51934, 3295, 26582, 16300, 74990, 22197, 83310, 69642, 81113, 58558, 84833, 17105, 46659, 25003, 85749, 44829, 4103, 67516, 76458, 52392, 53546, 70291, 98846, 67315, 30686, 18555, 29755, 5923, 22732, 19501, 56181, 85351, 5023, 4808, 56911, 16793, 75336, 49712, 27723, 96974, 34321, 5454, 12862, 71924, 45928, 95697, 68664, 58183, 78104, 42483, 71204, 99628, 40642, 56410, 17350, 13396, 76724, 87509, 9158, 83708, 27298, 92651, 95086, 38851, 63558, 89810, 1580, 32518, 35795, 26514, 56322, 78635, 63731, 91428, 7247, 66460, 38671, 26799, 22549, 47991, 46064, 80467, 40083, 17141, 39152, 99872, 27561, 75389, 74778, 94893, 82935, 99076, 93419, 10474, 84436, 47536, 16719, 60136, 80566, 28404, 74525, 74212, 3704, 65516, 98197, 34210, 64140, 22238, 49939, 99542, 27481, 21992, 78181, 90060, 71365, 66935, 29578, 14961, 8569, 9454, 43308, 66753, 45972, 93572, 16382, 87320, 37183, 25478, 38164, 31997, 69856, 60898, 63968, 62264, 4799, 17591, 89937, 73905, 55890, 88285, 2448, 40398, 54180, 65869, 45155, 43407, 39105, 339, 51619, 20203, 21189, 68245, 76912, 1222, 76411, 82679, 7, 66047, 32043, 42627, 16638, 27019, 15248, 66444, 8249, 18790, 82150, 54084, 84469, 3426, 50226, 99868, 88894, 43769, 66384, 8593, 41414, 2976, 60053, 51866, 87904, 74135, 53842, 59520, 67482, 16995, 32328, 29555, 49067, 2799, 68851, 41049, 97190, 53984, 99755, 46412, 45885, 64e3, 21962, 36438, 71742, 57223, 66599, 86071, 31436, 32667, 98099, 38399, 47377, 5171, 2742, 48803, 17823, 22093, 9866, 691, 5514, 25546, 2114, 5919, 56181, 96052, 67211, 61712, 25995, 3188, 23833, 38549, 44775, 55355, 61548, 55988, 47309, 23749, 30667, 70732, 33299, 16127, 30842, 78961, 41072, 9876, 18903, 30292, 25275, 61881, 15939, 72573, 84502, 92654, 97226, 53434, 77025, 63892, 12421, 33644, 39445, 30933, 84218, 13757, 37719, 84450, 2697, 60309, 22402, 80310, 92771, 45205, 72792, 95776, 85945, 74651, 216, 50842, 47854, 21916, 61588, 75405, 10495, 83083, 60427, 78495, 99809, 47890, 22993, 21508, 9459, 26845, 98130, 1184, 46438, 27698, 40652, 65654, 98517, 1096, 6998, 49133, 57041, 77983, 58708, 42176, 67356, 324, 70063, 10597, 65205, 25622, 34336, 16640, 27896, 26907, 86760, 48244, 89650, 44997, 51609, 28934, 9171, 97859, 97213, 19859, 41037, 64081, 94781, 27683, 41521, 52871, 86935, 26486, 38744, 25943, 60617, 6414, 42292, 46204, 53262, 30201, 38776, 88831, 97253, 67282, 72860, 18452, 60927, 81504, 57713, 30296, 10896, 39900, 67135, 42772, 4631, 55283, 39253, 25264, 1809, 12874, 88035, 88421, 90491, 83290, 6884, 15444, 90113, 20406, 20796, 40239, 34431, 15018, 45600, 17241, 26611, 9551, 89126, 65673, 31708, 91252, 39647, 63011, 24193, 58932, 89326, 33491, 53217, 27976, 70151, 37531, 53576, 23931, 11789, 73073, 52171, 89301, 51718, 15385, 79487, 66436, 35771, 34163, 86540, 42665, 80748, 77622, 14679, 40185, 25030, 42622, 13162, 17048, 24243, 59985, 59807, 60562, 3595, 10135, 29199, 69784, 59796, 38194, 58432, 50943, 40422, 63035, 3208, 81440, 90749, 88046, 32218, 88092, 22224, 2627, 91576, 16781, 43948, 57795, 71073, 27817, 87077, 82717, 24473, 42096, 76920, 88864, 90537, 14715, 42551, 45066, 24316, 37361, 38582, 21871, 14672, 93362, 21727, 57021, 94313, 39562, 64985, 94028, 46094, 43845, 91838, 79574, 7597, 3153, 56783, 18817, 74711, 6883, 91061, 31674, 73729, 99315, 66183, 57647, 74484, 68077, 33224, 397, 56753, 53158, 71872, 68153, 9298, 20961, 49656, 33407, 95683, 14328, 44708, 72952, 27048, 67887, 28741, 46752, 88177, 95894, 40086, 88534, 87112, 68614, 83073, 88794, 96799, 67588, 75049, 84603, 83140, 97347, 87316, 73087, 77135, 71883, 98643, 3808, 8848, 14133, 60447, 1366, 72976, 1868, 51667, 63279, 60040, 88264, 79152, 3474, 61366, 20523, 21584, 93712, 83654, 89761, 90154, 96345, 37539, 32556, 74254, 70603, 97122, 44978, 78028, 8943, 13778, 11080, 34271, 68276, 85372, 48410, 94516, 15427, 75323, 71685, 70774, 50342, 33771, 3678, 42321, 69788, 41758, 55004, 30992, 17402, 63523, 42328, 87171, 24751, 15084, 33884, 83655, 88345, 69602, 52606, 57886, 18034, 3381, 75796, 35901, 77480, 28683, 68324, 66035, 7223, 14926, 16128, 13645, 90370, 31949, 11057, 98849, 29499, 21565, 30786, 83292, 92392, 37104, 36899, 49906, 79368, 43710, 80365, 88735, 75275, 21664, 57965, 19002, 301, 12658, 94385, 1717, 96191, 50404, 80166, 93965, 24688, 27839, 10812, 31715, 92127, 42588, 93307, 80834, 11317, 26583, 25769, 98227, 14884, 58462, 29148, 68662, 26872, 72927, 79021, 51622, 29521, 33355, 45701, 45996, 33782, 93424, 16530, 96086, 17329, 74020, 11501, 46660, 5583, 22277, 77653, 55430, 84644, 448, 86828, 58855, 67451, 95264, 67386, 82424, 52611, 60012, 88620, 72894, 94716, 22262, 99813, 69592, 63464, 33163, 91857, 47904, 22209, 78590, 68615, 52952, 31441, 41313, 18550, 72685, 68825, 4795, 53971, 14592, 39634, 23682, 76630, 2731, 81481, 86542, 23727, 54291, 56045, 61635, 32186, 9355, 73416, 63532, 24340, 18886, 84832, 30654, 48543, 18339, 65024, 91197, 64624, 74648, 9660, 27897, 49771, 11123, 8732, 49393, 12911, 72416, 17834, 18878, 62754, 85072, 23727, 56577, 51257, 83291, 12329, 16203, 91681, 68137, 79959, 43609, 58987, 2026, 42969, 59144, 84349, 75214, 76972, 22633, 64104, 53799, 16851, 99197, 70476, 77113, 46320, 88693, 37711, 96536, 68156, 7119, 2104, 49435, 77706, 18924, 24957, 92406, 87148, 70482, 36491, 42605, 54440, 7893, 31618, 35707, 65130, 30007, 75706, 77266, 37100, 9601, 87681, 42543, 69847, 81848, 32034, 49429, 99434, 62209, 17125, 55227, 61634, 52574, 83649, 28725, 70119, 62467, 80676, 21192, 99584, 21310, 25292, 72781, 17186, 10393, 98390, 19789, 92931, 36234, 62627, 23437, 3885, 58822, 82941, 43806, 8172, 23790, 72295, 36196, 98200, 2889, 87619, 13846, 56197, 27151, 21238, 48794, 81100, 62643, 40001, 39243, 33213, 78416, 194, 91369, 79342, 36404, 52308, 13741, 24442, 88610, 12659, 11574, 70052, 93039, 79367, 41792, 61816, 35435, 47192, 97596, 28330, 41145, 16918, 62865, 9576, 45857, 68737, 90124, 16703, 7071, 48433, 57222, 34435, 800, 72496, 16449, 68187, 28739, 97672, 86818, 50768, 40807, 88681, 64340, 2224, 19703, 59245, 90905, 31239, 84216, 93942, 97371, 16842, 92168, 52692, 16064, 84686, 89444, 27938, 98406, 41365, 4515, 20494, 18813, 16242, 10634, 61566, 18592, 78057, 8720, 33739, 78345, 87693, 30242, 70545, 55521, 23687, 9160, 8655, 38811, 61768, 7228, 5567, 5561, 82071, 85, 50145, 23113, 97761, 88441, 14891, 72188, 85166, 37189, 75671, 81377, 92470, 73645, 93258, 6610, 12185, 43065, 26704, 47922, 56650, 7527, 18006, 56948, 51675, 16658, 66402, 1047, 81624, 77395, 62310, 73262, 66050, 57275, 32936, 87641, 51528, 58183, 21952, 84098, 28913, 28622, 18140, 89796, 41317, 93954, 67690, 64667, 57092, 21315, 4731, 76115, 77291, 11204, 8634, 93034, 27411, 27149, 13843, 9817, 9407, 84492, 28444, 59901, 14592, 89654, 66207, 66232, 80293, 74502, 36925, 55515, 10121, 16768, 4720, 71502, 40500, 21406, 571, 87320, 81683, 42788, 86367, 44686, 22159, 67015, 35892, 49668, 83991, 72088, 30210, 74009, 86370, 97956, 2132, 93512, 54819, 26094, 51409, 21485, 94764, 85806, 13393, 48543, 7042, 76538, 64224, 47909, 9994, 23750, 17351, 52141, 30486, 60380, 86546, 66606, 36913, 58173, 45709, 83679, 82617, 23381, 9603, 61107, 566, 6572, 64745, 10614, 86371, 43244, 97154, 10397, 50975, 68006, 20045, 16942, 25536, 74031, 31807, 70133, 78790, 40341, 68730, 39635, 39013, 66841, 44043, 96215, 21270, 59427, 25034, 40645, 84741, 52083, 54503, 36861, 27659, 95463, 53847, 40921, 70116, 61536, 56756, 8967, 31079, 20097, 76014, 99818, 16606, 19713, 66904, 27106, 24874, 96701, 73287, 76772, 6073, 57343, 51428, 91171, 28299, 17520, 64903, 4177, 36071, 94952, 59008, 28543, 11576, 74547, 13260, 20688, 41261, 2780, 6633, 37536, 8844, 95774, 49323, 30448, 14154, 83379, 71259, 23302, 68402, 43750, 88505, 15575, 44927, 6584, 29867, 21541, 65763, 12154, 86616, 79877, 73259, 68626, 98962, 68548, 86576, 48046, 51755, 64995, 3661, 64585, 81550, 46798, 49319, 50206, 22024, 5175, 12923, 23427, 55915, 91723, 55831, 83784, 81034, 86779, 34622, 84570, 18960, 48798, 42970, 95789, 39465, 82353, 68905, 44234, 18244, 54345, 5592, 89361, 14644, 67924, 66415, 89349, 88530, 72096, 44459, 5258, 48317, 48866, 56886, 90458, 75889, 4514, 37227, 11302, 4667, 2129, 80414, 86289, 15887, 87380, 50749, 83220, 50529, 20619, 11606, 36531, 23409, 78122, 19566, 76564, 33045, 66703, 30017, 35347, 35038, 12952, 13971, 3922, 98702, 11786, 38388, 69556, 76728, 60535, 59961, 23634, 42211, 98387, 34880, 27755, 93182, 99040, 96390, 65989, 38375, 3652, 59657, 57431, 24666, 11061, 64713, 85185, 72849, 58611, 31220, 26657, 77056, 24553, 24993, 5210, 89024, 32054, 46997, 92652, 28363, 98992, 22593, 97710, 47766, 37646, 93573, 95502, 33790, 92973, 27766, 62671, 89698, 10877, 73893, 41004, 96035, 18795, 48080, 59666, 30241, 35233, 87353, 43647, 13404, 41982, 19264, 29229, 61369, 8309, 39383, 42305, 25944, 13577, 51545, 68990, 69801, 37145, 79189, 55897, 57793, 66816, 21930, 56771, 79296, 73793, 21632, 42301, 23696, 72641, 56310, 85576, 3004, 25669, 69221, 32996, 23040, 65782, 23712, 13414, 10758, 15590, 97298, 74246, 51511, 46900, 36795, 38292, 3852, 6384, 84421, 3446, 91670, 45312, 27609, 87034, 6683, 83891, 88991, 16533, 9197, 34427, 60384, 48525, 90978, 46107, 21693, 12956, 21804, 46558, 37682, 81207, 85840, 53238, 35026, 4835, 53264, 41376, 17783, 64756, 39278, 25403, 33042, 20954, 31193, 24247, 45911, 92453, 25370, 86602, 48574, 57865, 26436, 16122, 76614, 17028, 21262, 59718, 77821, 14036, 31033, 90563, 45410, 15158, 90209, 84089, 38053, 60780, 54166, 14255, 33120, 27171, 71798, 91214, 80040, 56699, 12475, 40193, 59415, 4769, 75920, 1036, 2692, 75862, 16612, 73670, 61182, 3305, 90334, 187, 91659, 28063, 75684, 50017, 82643, 9282, 77376, 85469, 8164, 5584, 36623, 82597, 83859, 3435, 98460, 70095, 80257, 4381, 6501, 8924, 35514, 14297, 54373, 71369, 5172, 15955, 82441, 4636, 48215, 6821, 3385, 17663, 40107, 55679, 30366, 42390, 95895, 16083, 58499, 17176, 55993, 51034, 49296, 4010, 78974, 35930, 2019, 96226, 27167, 68245, 53109, 59037, 37843, 79243, 10262, 58797, 61490, 82590, 52411, 54783, 29447, 94551, 30026, 97959, 93939, 73217, 82573, 62154, 78291, 33728, 39102, 11484, 86210, 43794, 73553, 87435, 1110, 77108, 56521, 78610, 8254, 1842, 43068, 70415, 79195, 26136, 49786, 47279, 38471, 20379, 54704, 86614, 91138, 51595, 50818, 80186, 73087, 17262, 94735, 4952, 27935, 4928, 74862, 51392, 62388, 9570, 38485, 30594, 56278, 47395, 72762, 94597, 72279, 16010, 34697, 54475, 67874, 78014, 88381, 4045, 41494, 55178, 46054, 24373, 1824, 55333, 7525, 97908, 61178, 84635, 2199, 35361, 4803, 21907, 79414, 66083, 54782, 58692, 28332, 41851, 28198, 55819, 37313, 67046, 16147, 90478, 71230, 34141, 85002, 44332, 35906, 429, 39744, 773, 22909, 19536, 98986, 90945, 45209, 85439, 92265, 25291, 22775, 60611, 49159, 95701, 36113, 53923, 60824, 84935, 29656, 50007, 86624, 61691, 76150, 32187, 42765, 60660, 13859, 10792, 88210, 29374, 29563, 45188, 28811, 19739, 67649, 73775, 99247, 48414, 91067, 68253, 9452, 90116, 91737, 73979, 62370, 69112, 58791, 20349, 71480, 56852, 36919, 87977, 77609, 68738, 85159, 4918, 70076, 46473, 4122, 57713, 1426, 50987, 77910, 66211, 62546, 77749, 96462, 34304, 77441, 12104, 91805, 10287, 60943, 49632, 83116, 25716, 23113, 22707, 77770, 31176, 6759, 46130, 4739, 55554, 3843, 31653, 70834, 72877, 41561, 36903, 23010, 6663, 2266, 16360, 70118, 91936, 17098, 77278, 4880, 23484, 94970, 41826, 46733, 93484, 68350, 38861, 18134, 32936, 241, 24803, 13876, 93278, 5039, 35873, 44418, 5305, 28510, 36115, 46717, 15238, 78607, 23464, 68635, 55712, 55007, 92411, 65739, 4858, 67537, 37041, 67453, 89801, 45963, 14800, 14225, 65655, 80463, 9716, 77255, 65136, 11230, 76323, 81433, 36445, 86523, 61058, 59560, 19380, 40791, 48073, 29626, 36661, 87907, 57369, 41623, 13705, 3880, 45088, 55444, 41003, 27754, 1450, 75312, 71801, 99600, 60719, 54182, 29245, 63315, 73758, 42973, 32702, 10855, 56363, 14638, 84424, 27178, 78195, 3133, 70865, 48019, 26117, 7151, 52107, 85562, 41347, 50486, 69457, 86961, 95482, 11857, 93587, 45680, 42145, 13029, 10043, 5142, 49213, 54525, 85761, 42707, 70754, 33768, 87671, 85038, 58900, 88438, 20004, 63390, 14815, 38875, 73417, 82875, 89481, 55517, 944, 15773, 61814, 32915, 27868, 5510, 21916, 28426, 89881, 16680, 88850, 11056, 51991, 4230, 39107, 49216, 40065, 4523, 75848, 95349, 56034, 10724, 9885, 88232, 42478, 65702, 95696, 39746, 66032, 88082, 86905, 30007, 75068, 66629, 7358, 26706, 90511, 72843, 67857, 20061, 98581, 69682, 38e3, 14186, 70, 2290, 17269, 30909, 69449, 19997, 13275, 2444, 84985, 51290, 97641, 15092, 69650, 21920, 19617, 7418, 49725, 91090, 20805, 28627, 80665, 67192, 34697, 57667, 99323, 50101, 40587, 35081, 14037, 34414, 19898, 60779, 83267, 87499, 29596, 41852, 15813, 32419, 72232, 8322, 39184, 46525, 13833, 65743, 94595, 37363, 4711, 35386, 96413, 10627, 62625, 56555, 12919, 93218, 25191, 98380, 51923, 66181, 5788, 73491, 1452, 487, 12277, 45415, 11884, 61300, 94528, 9181, 26616, 11455, 31514, 63290, 45035, 42759, 33804, 85721, 80979, 46010, 50975, 72482, 31231, 3086, 58941, 46102, 25773, 89742, 29788, 96741, 88523, 14922, 88262, 76305, 57676, 93259, 2396, 69145, 26074, 30056, 3853, 75317, 56639, 66203, 38923, 48939, 22813, 91864, 10934, 6714, 84099, 25631, 73223, 95630, 97552, 45950, 22197, 42886, 33764, 1263, 41856, 82057, 62349, 94091, 78028, 62651, 18911, 5693, 92561, 97821, 41994, 92343, 76785, 22216, 4203, 5038, 86151, 23596, 24338, 77181, 51761, 97693, 10955, 98159, 37568, 58932, 72128, 27303, 99608, 31688, 57557, 91022, 43036, 93927, 32869, 53653, 55205, 33139, 47271, 31224, 51650, 36422, 86857, 73799, 22068, 43376, 84760, 44898, 65776, 42451, 71480, 38509, 41673, 44141, 75918, 95652, 68981, 83001, 48815, 98086, 67950, 27986, 33175, 43624, 55274, 71051, 61124, 51550, 64967, 31570, 15748, 19159, 38174, 51078, 79811, 39183, 57527, 96550, 85168, 28824, 47466, 56993, 13151, 96664, 29735, 70251, 1079, 4314, 77714, 11507, 1440, 48415, 31984, 99915, 20282, 26524, 18057, 4992, 40521, 98108, 84045, 91961, 79256, 72244, 25788, 5487, 23595, 73302, 14205, 8925, 27625, 64343, 28821, 37992, 67156, 83320, 31106, 10884, 30735, 15067, 51091, 15668, 48777, 50770, 19169, 76504, 41165, 29749, 92812, 8065, 66782, 26841, 1411, 95461, 61134, 18699, 52261, 60469, 81373, 44825, 11448, 73320, 30151, 56991, 31372, 6655, 36472, 86292, 30247, 30931, 21029, 53410, 9859, 37267, 47514, 3492, 49008, 94727, 25234, 40546, 53417, 36492, 25723, 76227, 58456, 15979, 34876, 9574, 34392, 3751, 36933, 83921, 65108, 63135, 67572, 40184, 21098]
  20756. , l = new Array(16)
  20757. , h = [16, 8, 16, 24]
  20758. , f = 4
  20759. , p = 0;
  20760. !function() {
  20761. for (var t = 0; t < 16; t++) {
  20762. l[t] = new Array(256);
  20763. for (var e = 0; e < 256; e++)
  20764. l[t][e] = e | e << 8 | e << 16 | e << 24 | 0;
  20765. for (var n = 3; 0 <= n; n--)
  20766. for (var r = 0; r < 255; r++) {
  20767. var i = 255 << (n << 3)
  20768. , o = 0 | l[t][r]
  20769. , s = function(t, e) {
  20770. var n = e - t + 1
  20771. , r = 0
  20772. , i = 1;
  20773. do {
  20774. for (r = 0,
  20775. i = 1; i < n; i *= 10)
  20776. r = 10 * r + (f < 0 && (f = 4,
  20777. p++),
  20778. u[p] % Math.pow(10, f + 1) / Math.pow(10, f--) | 0)
  20779. } while ((i / n | 0) * n <= r);
  20780. return t + r % n | 0
  20781. }(r, 255);
  20782. l[t][r] = l[t][r] & ~i | l[t][s] & i | 0,
  20783. l[t][s] = l[t][s] & ~i | o & i | 0
  20784. }
  20785. }
  20786. }();
  20787. (function(t, e) {
  20788. if ("function" != typeof e && null !== e)
  20789. throw new TypeError("Super expression must either be null or a function");
  20790. t.prototype = Object.create(e && e.prototype, {
  20791. constructor: {
  20792. value: t,
  20793. writable: !0,
  20794. configurable: !0
  20795. }
  20796. }),
  20797. e && a(t, e)
  20798. }
  20799. )(d, r.a),
  20800. function(t, e) {
  20801. for (var n = 0; n < e.length; n++) {
  20802. var r = e[n];
  20803. r.enumerable = r.enumerable || !1,
  20804. r.configurable = !0,
  20805. "value" in r && (r.writable = !0),
  20806. Object.defineProperty(t, r.key, r)
  20807. }
  20808. }(d.prototype, [{
  20809. key: "reset",
  20810. value: function() {
  20811. o(s(d.prototype), "reset", this).call(this),
  20812. this.state.hash = new Array(this.options.length / 32 | 0);
  20813. for (var t = 0; t < this.state.hash.length; t++)
  20814. this.state.hash[t] = 0
  20815. }
  20816. }, {
  20817. key: "processBlock",
  20818. value: function(t) {
  20819. for (var e = 0; e < this.state.hash.length; e++)
  20820. this.W[e] = 0 | this.state.hash[e];
  20821. for (var n = this.state.hash.length; n < 16; n++)
  20822. this.W[n] = 0 | t[n - this.state.hash.length];
  20823. for (var r = 0; r < this.options.rounds << 1; r += 2)
  20824. for (var i = 0; i < 4; i++) {
  20825. for (var o = 0; o < 16; o++) {
  20826. var s = 0 | l[r + (o / 2 | 0) % 2][255 & this.W[o]];
  20827. this.W[o - 1 >>> 0 & 15] ^= s,
  20828. this.W[o + 1 & 15] ^= s
  20829. }
  20830. for (var a = 0; a < 16; a++)
  20831. this.W[a] = Object(c.b)(this.W[a], h[i])
  20832. }
  20833. for (var u = 0; u < this.state.hash.length; u++)
  20834. this.state.hash[u] = this.state.hash[u] ^ this.W[15 - u] | 0
  20835. }
  20836. }, {
  20837. key: "finalize",
  20838. value: function() {
  20839. return 0 < this.state.message.length && this.addPaddingZero(this.blockSizeInBytes - this.state.message.length | 0),
  20840. this.addPaddingZero(this.blockSizeInBytes - 8 | 0),
  20841. this.addLengthBits(),
  20842. this.process(),
  20843. this.getStateHash()
  20844. }
  20845. }]),
  20846. r = d;
  20847. function d(t) {
  20848. var e;
  20849. return function(t) {
  20850. if (!(t instanceof d))
  20851. throw new TypeError("Cannot call a class as a function")
  20852. }(this),
  20853. (t = t || {}).length = t.length || 128,
  20854. t.rounds = t.rounds || 8,
  20855. e = this,
  20856. (t = !(t = s(d).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  20857. if (void 0 !== e)
  20858. return e;
  20859. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  20860. }() : t).blockSize = 16 - t.state.hash.length,
  20861. t.blockSizeInBytes = t.blockSize * t.unitSize,
  20862. t.W = new Array(16),
  20863. t
  20864. }
  20865. e.a = r
  20866. }
  20867. , function(t, e, n) {
  20868. "use strict";
  20869. var r = n(5)
  20870. , u = n(0);
  20871. function i(t) {
  20872. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  20873. return typeof t
  20874. }
  20875. : function(t) {
  20876. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  20877. }
  20878. )(t)
  20879. }
  20880. function o(t, e) {
  20881. for (var n = 0; n < e.length; n++) {
  20882. var r = e[n];
  20883. r.enumerable = r.enumerable || !1,
  20884. r.configurable = !0,
  20885. "value" in r && (r.writable = !0),
  20886. Object.defineProperty(t, r.key, r)
  20887. }
  20888. }
  20889. function s(t, e, n) {
  20890. return (s = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  20891. t = function(t, e) {
  20892. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = a(t));)
  20893. ;
  20894. return t
  20895. }(t, e);
  20896. if (t) {
  20897. e = Object.getOwnPropertyDescriptor(t, e);
  20898. return e.get ? e.get.call(n) : e.value
  20899. }
  20900. }
  20901. )(t, e, n || t)
  20902. }
  20903. function a(t) {
  20904. return (a = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  20905. return t.__proto__ || Object.getPrototypeOf(t)
  20906. }
  20907. )(t)
  20908. }
  20909. function c(t, e) {
  20910. return (c = Object.setPrototypeOf || function(t, e) {
  20911. return t.__proto__ = e,
  20912. t
  20913. }
  20914. )(t, e)
  20915. }
  20916. for (var l = [[7, 12, 17, 22], [5, 9, 14, 20], [4, 11, 16, 23], [6, 10, 15, 21]], h = new Array(64), f = 0; f < 64; f++)
  20917. h[f] = 4294967296 * Math.abs(Math.sin(f + 1)) | 0;
  20918. (function(t, e) {
  20919. if ("function" != typeof e && null !== e)
  20920. throw new TypeError("Super expression must either be null or a function");
  20921. t.prototype = Object.create(e && e.prototype, {
  20922. constructor: {
  20923. value: t,
  20924. writable: !0,
  20925. configurable: !0
  20926. }
  20927. }),
  20928. e && c(t, e)
  20929. }
  20930. )(p, r.a),
  20931. n = [{
  20932. key: "FF",
  20933. value: function(t, e, n) {
  20934. return t & e | ~t & n
  20935. }
  20936. }, {
  20937. key: "GG",
  20938. value: function(t, e, n) {
  20939. return t & n | e & ~n
  20940. }
  20941. }, {
  20942. key: "HH",
  20943. value: function(t, e, n) {
  20944. return t ^ e ^ n
  20945. }
  20946. }, {
  20947. key: "II",
  20948. value: function(t, e, n) {
  20949. return e ^ (t | ~n)
  20950. }
  20951. }, {
  20952. key: "CC",
  20953. value: function(t, e, n, r, i, o, s, a) {
  20954. return Object(u.a)(n + t(r, i, o) + s + e, a) + r | 0
  20955. }
  20956. }],
  20957. o((r = p).prototype, [{
  20958. key: "reset",
  20959. value: function() {
  20960. s(a(p.prototype), "reset", this).call(this),
  20961. this.state.hash = [1732584193, -271733879, -1732584194, 271733878]
  20962. }
  20963. }, {
  20964. key: "processBlock",
  20965. value: function(t) {
  20966. var e = 0 | this.state.hash[0]
  20967. , n = 0 | this.state.hash[1]
  20968. , r = 0 | this.state.hash[2]
  20969. , i = 0 | this.state.hash[3]
  20970. , e = p.CC(p.FF, h[0], e, n, r, i, t[0], l[0][0])
  20971. , i = p.CC(p.FF, h[1], i, e, n, r, t[1], l[0][1])
  20972. , r = p.CC(p.FF, h[2], r, i, e, n, t[2], l[0][2])
  20973. , n = p.CC(p.FF, h[3], n, r, i, e, t[3], l[0][3]);
  20974. e = p.CC(p.FF, h[4], e, n, r, i, t[4], l[0][0]),
  20975. i = p.CC(p.FF, h[5], i, e, n, r, t[5], l[0][1]),
  20976. r = p.CC(p.FF, h[6], r, i, e, n, t[6], l[0][2]),
  20977. n = p.CC(p.FF, h[7], n, r, i, e, t[7], l[0][3]),
  20978. e = p.CC(p.FF, h[8], e, n, r, i, t[8], l[0][0]),
  20979. i = p.CC(p.FF, h[9], i, e, n, r, t[9], l[0][1]),
  20980. r = p.CC(p.FF, h[10], r, i, e, n, t[10], l[0][2]),
  20981. n = p.CC(p.FF, h[11], n, r, i, e, t[11], l[0][3]),
  20982. e = p.CC(p.FF, h[12], e, n, r, i, t[12], l[0][0]),
  20983. i = p.CC(p.FF, h[13], i, e, n, r, t[13], l[0][1]),
  20984. r = p.CC(p.FF, h[14], r, i, e, n, t[14], l[0][2]),
  20985. n = p.CC(p.FF, h[15], n, r, i, e, t[15], l[0][3]),
  20986. e = p.CC(p.GG, h[16], e, n, r, i, t[1], l[1][0]),
  20987. i = p.CC(p.GG, h[17], i, e, n, r, t[6], l[1][1]),
  20988. r = p.CC(p.GG, h[18], r, i, e, n, t[11], l[1][2]),
  20989. n = p.CC(p.GG, h[19], n, r, i, e, t[0], l[1][3]),
  20990. e = p.CC(p.GG, h[20], e, n, r, i, t[5], l[1][0]),
  20991. i = p.CC(p.GG, h[21], i, e, n, r, t[10], l[1][1]),
  20992. r = p.CC(p.GG, h[22], r, i, e, n, t[15], l[1][2]),
  20993. n = p.CC(p.GG, h[23], n, r, i, e, t[4], l[1][3]),
  20994. e = p.CC(p.GG, h[24], e, n, r, i, t[9], l[1][0]),
  20995. i = p.CC(p.GG, h[25], i, e, n, r, t[14], l[1][1]),
  20996. r = p.CC(p.GG, h[26], r, i, e, n, t[3], l[1][2]),
  20997. n = p.CC(p.GG, h[27], n, r, i, e, t[8], l[1][3]),
  20998. e = p.CC(p.GG, h[28], e, n, r, i, t[13], l[1][0]),
  20999. i = p.CC(p.GG, h[29], i, e, n, r, t[2], l[1][1]),
  21000. r = p.CC(p.GG, h[30], r, i, e, n, t[7], l[1][2]),
  21001. n = p.CC(p.GG, h[31], n, r, i, e, t[12], l[1][3]),
  21002. e = p.CC(p.HH, h[32], e, n, r, i, t[5], l[2][0]),
  21003. i = p.CC(p.HH, h[33], i, e, n, r, t[8], l[2][1]),
  21004. r = p.CC(p.HH, h[34], r, i, e, n, t[11], l[2][2]),
  21005. n = p.CC(p.HH, h[35], n, r, i, e, t[14], l[2][3]),
  21006. e = p.CC(p.HH, h[36], e, n, r, i, t[1], l[2][0]),
  21007. i = p.CC(p.HH, h[37], i, e, n, r, t[4], l[2][1]),
  21008. r = p.CC(p.HH, h[38], r, i, e, n, t[7], l[2][2]),
  21009. n = p.CC(p.HH, h[39], n, r, i, e, t[10], l[2][3]),
  21010. e = p.CC(p.HH, h[40], e, n, r, i, t[13], l[2][0]),
  21011. i = p.CC(p.HH, h[41], i, e, n, r, t[0], l[2][1]),
  21012. r = p.CC(p.HH, h[42], r, i, e, n, t[3], l[2][2]),
  21013. n = p.CC(p.HH, h[43], n, r, i, e, t[6], l[2][3]),
  21014. e = p.CC(p.HH, h[44], e, n, r, i, t[9], l[2][0]),
  21015. i = p.CC(p.HH, h[45], i, e, n, r, t[12], l[2][1]),
  21016. r = p.CC(p.HH, h[46], r, i, e, n, t[15], l[2][2]),
  21017. n = p.CC(p.HH, h[47], n, r, i, e, t[2], l[2][3]),
  21018. e = p.CC(p.II, h[48], e, n, r, i, t[0], l[3][0]),
  21019. i = p.CC(p.II, h[49], i, e, n, r, t[7], l[3][1]),
  21020. r = p.CC(p.II, h[50], r, i, e, n, t[14], l[3][2]),
  21021. n = p.CC(p.II, h[51], n, r, i, e, t[5], l[3][3]),
  21022. e = p.CC(p.II, h[52], e, n, r, i, t[12], l[3][0]),
  21023. i = p.CC(p.II, h[53], i, e, n, r, t[3], l[3][1]),
  21024. r = p.CC(p.II, h[54], r, i, e, n, t[10], l[3][2]),
  21025. n = p.CC(p.II, h[55], n, r, i, e, t[1], l[3][3]),
  21026. e = p.CC(p.II, h[56], e, n, r, i, t[8], l[3][0]),
  21027. i = p.CC(p.II, h[57], i, e, n, r, t[15], l[3][1]),
  21028. r = p.CC(p.II, h[58], r, i, e, n, t[6], l[3][2]),
  21029. n = p.CC(p.II, h[59], n, r, i, e, t[13], l[3][3]),
  21030. e = p.CC(p.II, h[60], e, n, r, i, t[4], l[3][0]),
  21031. i = p.CC(p.II, h[61], i, e, n, r, t[11], l[3][1]),
  21032. r = p.CC(p.II, h[62], r, i, e, n, t[2], l[3][2]),
  21033. n = p.CC(p.II, h[63], n, r, i, e, t[9], l[3][3]),
  21034. this.state.hash[0] = this.state.hash[0] + e | 0,
  21035. this.state.hash[1] = this.state.hash[1] + n | 0,
  21036. this.state.hash[2] = this.state.hash[2] + r | 0,
  21037. this.state.hash[3] = this.state.hash[3] + i | 0
  21038. }
  21039. }, {
  21040. key: "finalize",
  21041. value: function() {
  21042. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  21043. this.addLengthBits(),
  21044. this.process(),
  21045. this.getStateHash()
  21046. }
  21047. }]),
  21048. o(r, n),
  21049. n = p;
  21050. function p() {
  21051. return function(t) {
  21052. if (!(t instanceof p))
  21053. throw new TypeError("Cannot call a class as a function")
  21054. }(this),
  21055. t = this,
  21056. !(e = a(p).apply(this, arguments)) || "object" !== i(e) && "function" != typeof e ? function() {
  21057. if (void 0 !== t)
  21058. return t;
  21059. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21060. }() : e;
  21061. var t, e
  21062. }
  21063. e.a = n
  21064. }
  21065. , function(t, e, n) {
  21066. "use strict";
  21067. var r = n(3)
  21068. , u = n(0);
  21069. function i(t) {
  21070. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21071. return typeof t
  21072. }
  21073. : function(t) {
  21074. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21075. }
  21076. )(t)
  21077. }
  21078. function o(t, e, n) {
  21079. return (o = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  21080. t = function(t, e) {
  21081. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = s(t));)
  21082. ;
  21083. return t
  21084. }(t, e);
  21085. if (t) {
  21086. e = Object.getOwnPropertyDescriptor(t, e);
  21087. return e.get ? e.get.call(n) : e.value
  21088. }
  21089. }
  21090. )(t, e, n || t)
  21091. }
  21092. function s(t) {
  21093. return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21094. return t.__proto__ || Object.getPrototypeOf(t)
  21095. }
  21096. )(t)
  21097. }
  21098. function a(t, e) {
  21099. return (a = Object.setPrototypeOf || function(t, e) {
  21100. return t.__proto__ = e,
  21101. t
  21102. }
  21103. )(t, e)
  21104. }
  21105. var c = [1518500249, 1859775393, 2400959708, 3395469782]
  21106. , r = (function(t, e) {
  21107. if ("function" != typeof e && null !== e)
  21108. throw new TypeError("Super expression must either be null or a function");
  21109. t.prototype = Object.create(e && e.prototype, {
  21110. constructor: {
  21111. value: t,
  21112. writable: !0,
  21113. configurable: !0
  21114. }
  21115. }),
  21116. e && a(t, e)
  21117. }(l, r.a),
  21118. function(t, e) {
  21119. for (var n = 0; n < e.length; n++) {
  21120. var r = e[n];
  21121. r.enumerable = r.enumerable || !1,
  21122. r.configurable = !0,
  21123. "value" in r && (r.writable = !0),
  21124. Object.defineProperty(t, r.key, r)
  21125. }
  21126. }(l.prototype, [{
  21127. key: "reset",
  21128. value: function() {
  21129. o(s(l.prototype), "reset", this).call(this),
  21130. this.state.hash = [1732584193, -271733879, -1732584194, 271733878, -1009589776]
  21131. }
  21132. }, {
  21133. key: "processBlock",
  21134. value: function(t) {
  21135. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = 0; s < this.options.rounds; s++) {
  21136. this.W[s] = s < 16 ? 0 | t[s] : 0 | Object(u.a)(this.W[s - 3] ^ this.W[s - 8] ^ this.W[s - 14] ^ this.W[s - 16], 1);
  21137. var a = Object(u.a)(e, 5) + o + this.W[s] + c[s / 20 >> 0] | 0
  21138. , a = s < 20 ? a + (n & r | ~n & i) | 0 : !(s < 40) && s < 60 ? a + (n & r | n & i | r & i) | 0 : a + (n ^ r ^ i) | 0
  21139. , o = i
  21140. , i = r
  21141. , r = 0 | Object(u.a)(n, 30)
  21142. , n = e
  21143. , e = a
  21144. }
  21145. this.state.hash[0] = this.state.hash[0] + e | 0,
  21146. this.state.hash[1] = this.state.hash[1] + n | 0,
  21147. this.state.hash[2] = this.state.hash[2] + r | 0,
  21148. this.state.hash[3] = this.state.hash[3] + i | 0,
  21149. this.state.hash[4] = this.state.hash[4] + o | 0
  21150. }
  21151. }, {
  21152. key: "finalize",
  21153. value: function() {
  21154. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  21155. this.addLengthBits(),
  21156. this.process(),
  21157. this.getStateHash()
  21158. }
  21159. }]),
  21160. l);
  21161. function l(t) {
  21162. var e;
  21163. return function(t) {
  21164. if (!(t instanceof l))
  21165. throw new TypeError("Cannot call a class as a function")
  21166. }(this),
  21167. e = this,
  21168. (t = !(t = s(l).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  21169. if (void 0 !== e)
  21170. return e;
  21171. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21172. }() : t).options.rounds = t.options.rounds || 80,
  21173. t.W = new Array(80),
  21174. t
  21175. }
  21176. e.a = r
  21177. }
  21178. , function(t, e, n) {
  21179. "use strict";
  21180. var c = n(0)
  21181. , n = n(3);
  21182. function r(t) {
  21183. return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21184. return typeof t
  21185. }
  21186. : function(t) {
  21187. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21188. }
  21189. )(t)
  21190. }
  21191. function i(t, e, n) {
  21192. return (i = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  21193. t = function(t, e) {
  21194. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = o(t));)
  21195. ;
  21196. return t
  21197. }(t, e);
  21198. if (t) {
  21199. e = Object.getOwnPropertyDescriptor(t, e);
  21200. return e.get ? e.get.call(n) : e.value
  21201. }
  21202. }
  21203. )(t, e, n || t)
  21204. }
  21205. function o(t) {
  21206. return (o = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21207. return t.__proto__ || Object.getPrototypeOf(t)
  21208. }
  21209. )(t)
  21210. }
  21211. function s(t, e) {
  21212. return (s = Object.setPrototypeOf || function(t, e) {
  21213. return t.__proto__ = e,
  21214. t
  21215. }
  21216. )(t, e)
  21217. }
  21218. var a = new Array(256)
  21219. , u = [104, 208, 235, 43, 72, 157, 106, 228, 227, 163, 86, 129, 125, 241, 133, 158, 44, 142, 120, 202, 23, 169, 97, 213, 93, 11, 140, 60, 119, 81, 34, 66, 63, 84, 65, 128, 204, 134, 179, 24, 46, 87, 6, 98, 244, 54, 209, 107, 27, 101, 117, 16, 218, 73, 38, 249, 203, 102, 231, 186, 174, 80, 82, 171, 5, 240, 13, 115, 59, 4, 32, 254, 221, 245, 180, 95, 10, 181, 192, 160, 113, 165, 45, 96, 114, 147, 57, 8, 131, 33, 92, 135, 177, 224, 0, 195, 18, 145, 138, 2, 28, 230, 69, 194, 196, 253, 191, 68, 161, 76, 51, 197, 132, 35, 124, 176, 37, 21, 53, 105, 255, 148, 77, 112, 162, 175, 205, 214, 108, 183, 248, 9, 243, 103, 164, 234, 236, 182, 212, 210, 20, 30, 225, 36, 56, 198, 219, 75, 122, 58, 222, 94, 223, 149, 252, 170, 215, 206, 7, 15, 61, 88, 154, 152, 156, 242, 167, 17, 126, 139, 67, 3, 226, 220, 229, 178, 78, 199, 109, 233, 39, 64, 216, 55, 146, 143, 1, 29, 83, 62, 89, 193, 79, 50, 22, 250, 116, 251, 99, 159, 52, 26, 42, 90, 141, 201, 207, 246, 144, 40, 136, 155, 49, 14, 189, 74, 232, 150, 166, 12, 200, 121, 188, 190, 239, 110, 70, 151, 91, 237, 25, 217, 172, 153, 168, 41, 100, 31, 173, 85, 19, 187, 247, 111, 185, 71, 47, 238, 184, 123, 137, 48, 211, 127, 118, 130]
  21220. , l = [1, 11, 9, 12, 13, 6, 15, 3, 14, 8, 7, 4, 10, 2, 5, 0]
  21221. , h = [7, 12, 11, 13, 14, 4, 9, 15, 6, 3, 8, 10, 2, 5, 1, 0]
  21222. , f = new Array(16)
  21223. , p = [1, 1, 4, 1, 8, 5, 2, 9]
  21224. , d = [1, 1, 3, 1, 5, 8, 9, 5]
  21225. , g = new Array(512)
  21226. , m = new Array(22)
  21227. , v = new Array(512)
  21228. , y = new Array(22)
  21229. , b = new Array(512)
  21230. , w = new Array(22);
  21231. function _(t, e) {
  21232. for (var n = new Array(512), r = new Array(22), i = 0; i < 8; i++)
  21233. n[i] = [];
  21234. for (var o = 0; o < 256; o++) {
  21235. var s = new Array(10);
  21236. s[1] = t[o],
  21237. s[2] = s[1] << 1,
  21238. 256 <= s[2] && (s[2] ^= 285),
  21239. s[3] = s[2] ^ s[1],
  21240. s[4] = s[2] << 1,
  21241. 256 <= s[4] && (s[4] ^= 285),
  21242. s[5] = s[4] ^ s[1],
  21243. s[8] = s[4] << 1,
  21244. 256 <= s[8] && (s[8] ^= 285),
  21245. s[9] = s[8] ^ s[1],
  21246. n[0][2 * o] = s[e[0]] << 24 | s[e[1]] << 16 | s[e[2]] << 8 | s[e[3]],
  21247. n[0][2 * o + 1] = s[e[4]] << 24 | s[e[5]] << 16 | s[e[6]] << 8 | s[e[7]];
  21248. for (var a = 1; a < 8; a++)
  21249. n[a][2 * o] = Object(c.d)(n[0][2 * o + 1], n[0][2 * o], a << 3),
  21250. n[a][2 * o + 1] = Object(c.c)(n[0][2 * o + 1], n[0][2 * o], a << 3)
  21251. }
  21252. r[0] = 0,
  21253. r[1] = 0;
  21254. for (var u = 1; u <= 10; u++)
  21255. r[2 * u] = 4278190080 & n[0][16 * u - 16] ^ 16711680 & n[1][16 * u - 14] ^ 65280 & n[2][16 * u - 12] ^ 255 & n[3][16 * u - 10],
  21256. r[2 * u + 1] = 4278190080 & n[4][16 * u - 7] ^ 16711680 & n[5][16 * u - 5] ^ 65280 & n[6][16 * u - 3] ^ 255 & n[7][16 * u - 1];
  21257. return [n, r]
  21258. }
  21259. !function() {
  21260. !function() {
  21261. for (var t = 0; t < 16; t++)
  21262. f[l[t]] = 0 | t;
  21263. for (var e = 0; e < 256; e++) {
  21264. var n = l[e >> 4]
  21265. , r = f[15 & e]
  21266. , i = h[n ^ r];
  21267. a[e] = l[n ^ i] << 4 | f[r ^ i]
  21268. }
  21269. }();
  21270. var t = _(u, d);
  21271. v = t[0],
  21272. y = t[1],
  21273. t = _(a, d),
  21274. b = t[0],
  21275. w = t[1],
  21276. t = _(a, p),
  21277. g = t[0],
  21278. m = t[1]
  21279. }();
  21280. (function(t, e) {
  21281. if ("function" != typeof e && null !== e)
  21282. throw new TypeError("Super expression must either be null or a function");
  21283. t.prototype = Object.create(e && e.prototype, {
  21284. constructor: {
  21285. value: t,
  21286. writable: !0,
  21287. configurable: !0
  21288. }
  21289. }),
  21290. e && s(t, e)
  21291. }
  21292. )(x, n.a),
  21293. function(t, e) {
  21294. for (var n = 0; n < e.length; n++) {
  21295. var r = e[n];
  21296. r.enumerable = r.enumerable || !1,
  21297. r.configurable = !0,
  21298. "value" in r && (r.writable = !0),
  21299. Object.defineProperty(t, r.key, r)
  21300. }
  21301. }(x.prototype, [{
  21302. key: "reset",
  21303. value: function() {
  21304. i(o(x.prototype), "reset", this).call(this),
  21305. this.state.hash = new Array(16);
  21306. for (var t = 0; t < 16; t++)
  21307. this.state.hash[t] = 0
  21308. }
  21309. }, {
  21310. key: "processBlock",
  21311. value: function(t) {
  21312. for (var e = new Array(16), n = [], r = 0; r < 16; r++)
  21313. n[r] = t[r] ^ (e[r] = this.state.hash[r]) | 0;
  21314. for (var i = [], o = 1; o <= this.options.rounds; o++) {
  21315. for (var s = 0; s < 8; s++) {
  21316. i[2 * s] = 0;
  21317. for (var a = i[2 * s + 1] = 0, u = 56, c = 0; a < 8; a++,
  21318. c = (u -= 8) < 32 ? 1 : 0)
  21319. i[2 * s] ^= this.C[a][2 * (e[2 * (s - a & 7) + c] >>> u % 32 & 255)],
  21320. i[2 * s + 1] ^= this.C[a][2 * (e[2 * (s - a & 7) + c] >>> u % 32 & 255) + 1]
  21321. }
  21322. for (var l = 0; l < 16; l++)
  21323. e[l] = i[l];
  21324. e[0] ^= this.RC[2 * o],
  21325. e[1] ^= this.RC[2 * o + 1];
  21326. for (var h = 0; h < 8; h++) {
  21327. i[2 * h] = e[2 * h],
  21328. i[2 * h + 1] = e[2 * h + 1];
  21329. for (var f = 0, p = 56, d = 0; f < 8; f++,
  21330. d = (p -= 8) < 32 ? 1 : 0)
  21331. i[2 * h] ^= this.C[f][2 * (n[2 * (h - f & 7) + d] >>> p % 32 & 255)],
  21332. i[2 * h + 1] ^= this.C[f][2 * (n[2 * (h - f & 7) + d] >>> p % 32 & 255) + 1]
  21333. }
  21334. for (var g = 0; g < 16; g++)
  21335. n[g] = i[g]
  21336. }
  21337. for (var m = 0; m < 16; m++)
  21338. this.state.hash[m] ^= n[m] ^ t[m]
  21339. }
  21340. }, {
  21341. key: "finalize",
  21342. value: function() {
  21343. return this.addPaddingISO7816(this.state.message.length < 32 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  21344. this.addLengthBits(),
  21345. this.process(),
  21346. this.getStateHash()
  21347. }
  21348. }]),
  21349. n = x;
  21350. function x(t) {
  21351. var e, n;
  21352. switch (function(t) {
  21353. if (!(t instanceof x))
  21354. throw new TypeError("Cannot call a class as a function")
  21355. }(this),
  21356. (t = t || {}).type = t.type || "",
  21357. t.rounds = t.rounds || 10,
  21358. n = this,
  21359. (e = !(t = o(x).call(this, t)) || "object" !== r(t) && "function" != typeof t ? function() {
  21360. if (void 0 !== n)
  21361. return n;
  21362. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21363. }() : t).options.type) {
  21364. case "0":
  21365. case 0:
  21366. e.C = v,
  21367. e.RC = y;
  21368. break;
  21369. case "t":
  21370. e.C = b,
  21371. e.RC = w;
  21372. break;
  21373. default:
  21374. e.C = g,
  21375. e.RC = m
  21376. }
  21377. return e
  21378. }
  21379. e.a = n
  21380. }
  21381. , function(t, e, n) {
  21382. "use strict";
  21383. function r(t) {
  21384. return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21385. return typeof t
  21386. }
  21387. : function(t) {
  21388. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21389. }
  21390. )(t)
  21391. }
  21392. function i(t) {
  21393. return (i = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21394. return t.__proto__ || Object.getPrototypeOf(t)
  21395. }
  21396. )(t)
  21397. }
  21398. function o(t, e) {
  21399. return (o = Object.setPrototypeOf || function(t, e) {
  21400. return t.__proto__ = e,
  21401. t
  21402. }
  21403. )(t, e)
  21404. }
  21405. (function(t, e) {
  21406. if ("function" != typeof e && null !== e)
  21407. throw new TypeError("Super expression must either be null or a function");
  21408. t.prototype = Object.create(e && e.prototype, {
  21409. constructor: {
  21410. value: t,
  21411. writable: !0,
  21412. configurable: !0
  21413. }
  21414. }),
  21415. e && o(t, e)
  21416. }
  21417. )(s, n(4).a),
  21418. function(t, e) {
  21419. for (var n = 0; n < e.length; n++) {
  21420. var r = e[n];
  21421. r.enumerable = r.enumerable || !1,
  21422. r.configurable = !0,
  21423. "value" in r && (r.writable = !0),
  21424. Object.defineProperty(t, r.key, r)
  21425. }
  21426. }(s.prototype, [{
  21427. key: "process",
  21428. value: function() {
  21429. for (; this.state.message.length >= this.blockSizeInBytes;) {
  21430. this.blockUnits = new Array(this.blockSizeInBytes);
  21431. for (var t = 0; t < this.blockSizeInBytes; t++)
  21432. this.blockUnits[t] = 0 | this.state.message.charCodeAt(t);
  21433. this.state.message = this.state.message.substr(this.blockSizeInBytes),
  21434. this.processBlock(this.blockUnits)
  21435. }
  21436. }
  21437. }, {
  21438. key: "processBlock",
  21439. value: function(t) { }
  21440. }, {
  21441. key: "getStateHash",
  21442. value: function(t) {
  21443. t = t || this.state.hash.length;
  21444. for (var e = "", n = 0; n < t; n++)
  21445. e += String.fromCharCode(255 & this.state.hash[n]);
  21446. return e
  21447. }
  21448. }]),
  21449. n = s;
  21450. function s(t) {
  21451. var e;
  21452. return function(t) {
  21453. if (!(t instanceof s))
  21454. throw new TypeError("Cannot call a class as a function")
  21455. }(this),
  21456. e = this,
  21457. (t = !(t = i(s).call(this, t)) || "object" !== r(t) && "function" != typeof t ? function() {
  21458. if (void 0 !== e)
  21459. return e;
  21460. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21461. }() : t).unitSize = 1,
  21462. t.blockSizeInBytes = t.blockSize * t.unitSize,
  21463. t.blockUnits = [],
  21464. t
  21465. }
  21466. function a(t) {
  21467. return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21468. return typeof t
  21469. }
  21470. : function(t) {
  21471. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21472. }
  21473. )(t)
  21474. }
  21475. function u(t, e, n) {
  21476. return (u = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  21477. t = function(t, e) {
  21478. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = c(t));)
  21479. ;
  21480. return t
  21481. }(t, e);
  21482. if (t) {
  21483. e = Object.getOwnPropertyDescriptor(t, e);
  21484. return e.get ? e.get.call(n) : e.value
  21485. }
  21486. }
  21487. )(t, e, n || t)
  21488. }
  21489. function c(t) {
  21490. return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21491. return t.__proto__ || Object.getPrototypeOf(t)
  21492. }
  21493. )(t)
  21494. }
  21495. function l(t, e) {
  21496. return (l = Object.setPrototypeOf || function(t, e) {
  21497. return t.__proto__ = e,
  21498. t
  21499. }
  21500. )(t, e)
  21501. }
  21502. var h = [41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, 31, 26, 219, 153, 141, 51, 159, 17, 131, 20]
  21503. , n = (function(t, e) {
  21504. if ("function" != typeof e && null !== e)
  21505. throw new TypeError("Super expression must either be null or a function");
  21506. t.prototype = Object.create(e.prototype, {
  21507. constructor: {
  21508. value: t,
  21509. writable: !0,
  21510. configurable: !0
  21511. }
  21512. }),
  21513. l(t, e)
  21514. }(f, n),
  21515. function(t, e) {
  21516. for (var n = 0; n < e.length; n++) {
  21517. var r = e[n];
  21518. r.enumerable = r.enumerable || !1,
  21519. r.configurable = !0,
  21520. "value" in r && (r.writable = !0),
  21521. Object.defineProperty(t, r.key, r)
  21522. }
  21523. }(f.prototype, [{
  21524. key: "reset",
  21525. value: function() {
  21526. u(c(f.prototype), "reset", this).call(this),
  21527. this.state.hash = new Array(48),
  21528. this.state.checksum = new Array(16)
  21529. }
  21530. }, {
  21531. key: "processBlock",
  21532. value: function(t) {
  21533. for (var e = 0; e < 16; e++)
  21534. this.state.hash[16 + e] = 0 | t[e],
  21535. this.state.hash[32 + e] = t[e] ^ this.state.hash[e];
  21536. for (var n = 0, r = 0; r < this.options.rounds; r++) {
  21537. for (var i = 0; i < 48; i++)
  21538. n = this.state.hash[i] ^= h[n];
  21539. n = n + r & 255
  21540. }
  21541. n = 255 & this.state.checksum[15];
  21542. for (var o = 0; o < 16; o++)
  21543. n = this.state.checksum[o] ^= h[t[o] ^ n]
  21544. }
  21545. }, {
  21546. key: "finalize",
  21547. value: function() {
  21548. this.addPaddingPKCS7(16 - (15 & this.state.message.length) | 0),
  21549. this.process();
  21550. for (var t = 0; t < 16; t++)
  21551. this.state.message += String.fromCharCode(this.state.checksum[t]);
  21552. return this.process(),
  21553. this.getStateHash(16)
  21554. }
  21555. }]),
  21556. f);
  21557. function f(t) {
  21558. var e;
  21559. return function(t) {
  21560. if (!(t instanceof f))
  21561. throw new TypeError("Cannot call a class as a function")
  21562. }(this),
  21563. e = this,
  21564. (t = !(t = c(f).call(this, t)) || "object" !== a(t) && "function" != typeof t ? function() {
  21565. if (void 0 !== e)
  21566. return e;
  21567. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21568. }() : t).options.rounds = t.options.rounds || 18,
  21569. t
  21570. }
  21571. e.a = n
  21572. }
  21573. , function(t, e, n) {
  21574. "use strict";
  21575. var r = n(5)
  21576. , c = n(0);
  21577. function i(t) {
  21578. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21579. return typeof t
  21580. }
  21581. : function(t) {
  21582. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21583. }
  21584. )(t)
  21585. }
  21586. function o(t, e, n) {
  21587. return (o = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  21588. t = function(t, e) {
  21589. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = s(t));)
  21590. ;
  21591. return t
  21592. }(t, e);
  21593. if (t) {
  21594. e = Object.getOwnPropertyDescriptor(t, e);
  21595. return e.get ? e.get.call(n) : e.value
  21596. }
  21597. }
  21598. )(t, e, n || t)
  21599. }
  21600. function s(t) {
  21601. return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21602. return t.__proto__ || Object.getPrototypeOf(t)
  21603. }
  21604. )(t)
  21605. }
  21606. function a(t, e) {
  21607. return (a = Object.setPrototypeOf || function(t, e) {
  21608. return t.__proto__ = e,
  21609. t
  21610. }
  21611. )(t, e)
  21612. }
  21613. var l = [0, 1518500249, 1859775393, 2400959708]
  21614. , h = [5, 11, 7, 15, 6, 13, 8, 14, 7, 12, 9, 11, 8, 15, 6, 12, 9, 14, 5, 13]
  21615. , f = [10, 17, 25, 30]
  21616. , p = [18, 0, 1, 2, 3, 19, 4, 5, 6, 7, 16, 8, 9, 10, 11, 17, 12, 13, 14, 15, 22, 3, 6, 9, 12, 23, 15, 2, 5, 8, 20, 11, 14, 1, 4, 21, 7, 10, 13, 0, 26, 12, 5, 14, 7, 27, 0, 9, 2, 11, 24, 4, 13, 6, 15, 25, 8, 1, 10, 3, 30, 7, 2, 13, 8, 31, 3, 14, 9, 4, 28, 15, 10, 5, 0, 29, 11, 6, 1, 12]
  21617. , r = (function(t, e) {
  21618. if ("function" != typeof e && null !== e)
  21619. throw new TypeError("Super expression must either be null or a function");
  21620. t.prototype = Object.create(e && e.prototype, {
  21621. constructor: {
  21622. value: t,
  21623. writable: !0,
  21624. configurable: !0
  21625. }
  21626. }),
  21627. e && a(t, e)
  21628. }(u, r.a),
  21629. function(t, e) {
  21630. for (var n = 0; n < e.length; n++) {
  21631. var r = e[n];
  21632. r.enumerable = r.enumerable || !1,
  21633. r.configurable = !0,
  21634. "value" in r && (r.writable = !0),
  21635. Object.defineProperty(t, r.key, r)
  21636. }
  21637. }(u.prototype, [{
  21638. key: "reset",
  21639. value: function() {
  21640. o(s(u.prototype), "reset", this).call(this),
  21641. this.state.hash = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]
  21642. }
  21643. }, {
  21644. key: "processBlock",
  21645. value: function(t) {
  21646. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = 0; s < 16; s++)
  21647. this.W[s] = 0 | t[s];
  21648. this.W[16] = this.W[0] ^ this.W[1] ^ this.W[2] ^ this.W[3] | 0,
  21649. this.W[17] = this.W[4] ^ this.W[5] ^ this.W[6] ^ this.W[7] | 0,
  21650. this.W[18] = this.W[8] ^ this.W[9] ^ this.W[10] ^ this.W[11] | 0,
  21651. this.W[19] = this.W[12] ^ this.W[13] ^ this.W[14] ^ this.W[15] | 0,
  21652. this.W[20] = this.W[3] ^ this.W[6] ^ this.W[9] ^ this.W[12] | 0,
  21653. this.W[21] = this.W[2] ^ this.W[5] ^ this.W[8] ^ this.W[15] | 0,
  21654. this.W[22] = this.W[1] ^ this.W[4] ^ this.W[11] ^ this.W[14] | 0,
  21655. this.W[23] = this.W[0] ^ this.W[7] ^ this.W[10] ^ this.W[13] | 0,
  21656. this.W[24] = this.W[5] ^ this.W[7] ^ this.W[12] ^ this.W[14] | 0,
  21657. this.W[25] = this.W[0] ^ this.W[2] ^ this.W[9] ^ this.W[11] | 0,
  21658. this.W[26] = this.W[4] ^ this.W[6] ^ this.W[13] ^ this.W[15] | 0,
  21659. this.W[27] = this.W[1] ^ this.W[3] ^ this.W[8] ^ this.W[10] | 0,
  21660. this.W[28] = this.W[2] ^ this.W[7] ^ this.W[8] ^ this.W[13] | 0,
  21661. this.W[29] = this.W[3] ^ this.W[4] ^ this.W[9] ^ this.W[14] | 0,
  21662. this.W[30] = this.W[0] ^ this.W[5] ^ this.W[10] ^ this.W[15] | 0,
  21663. this.W[31] = this.W[1] ^ this.W[6] ^ this.W[11] ^ this.W[12] | 0;
  21664. for (var a = 0; a < this.options.rounds; a++)
  21665. var u = Object(c.a)(e, h[a % 20]) + o + this.W[p[a]] + l[a / 20 >> 0] | 0
  21666. , u = a < 20 ? u + (n & r | ~n & i) | 0 : !(a < 40) && a < 60 ? u + (r ^ (n | ~i)) | 0 : u + (n ^ r ^ i) | 0
  21667. , o = i
  21668. , i = r
  21669. , r = 0 | Object(c.a)(n, f[a / 20 >> 0])
  21670. , n = e
  21671. , e = u;
  21672. this.state.hash[0] = this.state.hash[0] + e | 0,
  21673. this.state.hash[1] = this.state.hash[1] + n | 0,
  21674. this.state.hash[2] = this.state.hash[2] + r | 0,
  21675. this.state.hash[3] = this.state.hash[3] + i | 0,
  21676. this.state.hash[4] = this.state.hash[4] + o | 0
  21677. }
  21678. }, {
  21679. key: "finalize",
  21680. value: function() {
  21681. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  21682. this.addLengthBits(),
  21683. this.process(),
  21684. this.getStateHash()
  21685. }
  21686. }]),
  21687. u);
  21688. function u(t) {
  21689. var e;
  21690. return function(t) {
  21691. if (!(t instanceof u))
  21692. throw new TypeError("Cannot call a class as a function")
  21693. }(this),
  21694. e = this,
  21695. (t = !(t = s(u).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  21696. if (void 0 !== e)
  21697. return e;
  21698. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21699. }() : t).options.rounds = t.options.rounds || 80,
  21700. t.W = new Array(32),
  21701. t
  21702. }
  21703. e.a = r
  21704. }
  21705. , function(t, e, n) {
  21706. "use strict";
  21707. n.d(e, "a", function() {
  21708. return r
  21709. });
  21710. var o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  21711. function r(t) {
  21712. for (var e = "", n = t.length - t.length % 3 | 0, r = 0, i = 0; i < n; i += 3)
  21713. r = t.charCodeAt(i) << 16 | t.charCodeAt(i + 1) << 8 | t.charCodeAt(i + 2),
  21714. e += o.charAt(r >> 18) + o.charAt(r >> 12 & 63) + o.charAt(r >> 6 & 63) + o.charAt(63 & r);
  21715. return t.length - n == 2 ? (r = t.charCodeAt(n) << 16 | t.charCodeAt(1 + n) << 8,
  21716. e += o.charAt(r >> 18) + o.charAt(r >> 12 & 63) + o.charAt(r >> 6 & 63) + "=") : t.length - n == 1 && (r = t.charCodeAt(n) << 16,
  21717. e += o.charAt(r >> 18) + o.charAt(r >> 12 & 63) + "=="),
  21718. e
  21719. }
  21720. }
  21721. , function(t, e, n) {
  21722. "use strict";
  21723. var r = n(5)
  21724. , u = n(0);
  21725. function i(t) {
  21726. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21727. return typeof t
  21728. }
  21729. : function(t) {
  21730. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21731. }
  21732. )(t)
  21733. }
  21734. function o(t, e) {
  21735. for (var n = 0; n < e.length; n++) {
  21736. var r = e[n];
  21737. r.enumerable = r.enumerable || !1,
  21738. r.configurable = !0,
  21739. "value" in r && (r.writable = !0),
  21740. Object.defineProperty(t, r.key, r)
  21741. }
  21742. }
  21743. function s(t, e, n) {
  21744. return (s = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  21745. t = function(t, e) {
  21746. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = a(t));)
  21747. ;
  21748. return t
  21749. }(t, e);
  21750. if (t) {
  21751. e = Object.getOwnPropertyDescriptor(t, e);
  21752. return e.get ? e.get.call(n) : e.value
  21753. }
  21754. }
  21755. )(t, e, n || t)
  21756. }
  21757. function a(t) {
  21758. return (a = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21759. return t.__proto__ || Object.getPrototypeOf(t)
  21760. }
  21761. )(t)
  21762. }
  21763. function c(t, e) {
  21764. return (c = Object.setPrototypeOf || function(t, e) {
  21765. return t.__proto__ = e,
  21766. t
  21767. }
  21768. )(t, e)
  21769. }
  21770. var l = [[3, 7, 11, 19], [3, 5, 9, 13], [3, 9, 11, 15]]
  21771. , h = 1518500249
  21772. , f = 1859775393
  21773. , n = (function(t, e) {
  21774. if ("function" != typeof e && null !== e)
  21775. throw new TypeError("Super expression must either be null or a function");
  21776. t.prototype = Object.create(e && e.prototype, {
  21777. constructor: {
  21778. value: t,
  21779. writable: !0,
  21780. configurable: !0
  21781. }
  21782. }),
  21783. e && c(t, e)
  21784. }(p, r.a),
  21785. n = [{
  21786. key: "FF",
  21787. value: function(t, e, n) {
  21788. return t & e | ~t & n
  21789. }
  21790. }, {
  21791. key: "GG",
  21792. value: function(t, e, n) {
  21793. return t & e | t & n | e & n
  21794. }
  21795. }, {
  21796. key: "HH",
  21797. value: function(t, e, n) {
  21798. return t ^ e ^ n
  21799. }
  21800. }, {
  21801. key: "CC",
  21802. value: function(t, e, n, r, i, o, s, a) {
  21803. return 0 | Object(u.a)(n + t(r, i, o) + s + e, a)
  21804. }
  21805. }],
  21806. o((r = p).prototype, [{
  21807. key: "reset",
  21808. value: function() {
  21809. s(a(p.prototype), "reset", this).call(this),
  21810. this.state.hash = [1732584193, -271733879, -1732584194, 271733878]
  21811. }
  21812. }, {
  21813. key: "processBlock",
  21814. value: function(t) {
  21815. var e = 0 | this.state.hash[0]
  21816. , n = 0 | this.state.hash[1]
  21817. , r = 0 | this.state.hash[2]
  21818. , i = 0 | this.state.hash[3]
  21819. , e = p.CC(p.FF, 0, e, n, r, i, t[0], l[0][0])
  21820. , i = p.CC(p.FF, 0, i, e, n, r, t[1], l[0][1])
  21821. , r = p.CC(p.FF, 0, r, i, e, n, t[2], l[0][2])
  21822. , n = p.CC(p.FF, 0, n, r, i, e, t[3], l[0][3]);
  21823. e = p.CC(p.FF, 0, e, n, r, i, t[4], l[0][0]),
  21824. i = p.CC(p.FF, 0, i, e, n, r, t[5], l[0][1]),
  21825. r = p.CC(p.FF, 0, r, i, e, n, t[6], l[0][2]),
  21826. n = p.CC(p.FF, 0, n, r, i, e, t[7], l[0][3]),
  21827. e = p.CC(p.FF, 0, e, n, r, i, t[8], l[0][0]),
  21828. i = p.CC(p.FF, 0, i, e, n, r, t[9], l[0][1]),
  21829. r = p.CC(p.FF, 0, r, i, e, n, t[10], l[0][2]),
  21830. n = p.CC(p.FF, 0, n, r, i, e, t[11], l[0][3]),
  21831. e = p.CC(p.FF, 0, e, n, r, i, t[12], l[0][0]),
  21832. i = p.CC(p.FF, 0, i, e, n, r, t[13], l[0][1]),
  21833. r = p.CC(p.FF, 0, r, i, e, n, t[14], l[0][2]),
  21834. n = p.CC(p.FF, 0, n, r, i, e, t[15], l[0][3]),
  21835. e = p.CC(p.GG, h, e, n, r, i, t[0], l[1][0]),
  21836. i = p.CC(p.GG, h, i, e, n, r, t[4], l[1][1]),
  21837. r = p.CC(p.GG, h, r, i, e, n, t[8], l[1][2]),
  21838. n = p.CC(p.GG, h, n, r, i, e, t[12], l[1][3]),
  21839. e = p.CC(p.GG, h, e, n, r, i, t[1], l[1][0]),
  21840. i = p.CC(p.GG, h, i, e, n, r, t[5], l[1][1]),
  21841. r = p.CC(p.GG, h, r, i, e, n, t[9], l[1][2]),
  21842. n = p.CC(p.GG, h, n, r, i, e, t[13], l[1][3]),
  21843. e = p.CC(p.GG, h, e, n, r, i, t[2], l[1][0]),
  21844. i = p.CC(p.GG, h, i, e, n, r, t[6], l[1][1]),
  21845. r = p.CC(p.GG, h, r, i, e, n, t[10], l[1][2]),
  21846. n = p.CC(p.GG, h, n, r, i, e, t[14], l[1][3]),
  21847. e = p.CC(p.GG, h, e, n, r, i, t[3], l[1][0]),
  21848. i = p.CC(p.GG, h, i, e, n, r, t[7], l[1][1]),
  21849. r = p.CC(p.GG, h, r, i, e, n, t[11], l[1][2]),
  21850. n = p.CC(p.GG, h, n, r, i, e, t[15], l[1][3]),
  21851. e = p.CC(p.HH, f, e, n, r, i, t[0], l[2][0]),
  21852. i = p.CC(p.HH, f, i, e, n, r, t[8], l[2][1]),
  21853. r = p.CC(p.HH, f, r, i, e, n, t[4], l[2][2]),
  21854. n = p.CC(p.HH, f, n, r, i, e, t[12], l[2][3]),
  21855. e = p.CC(p.HH, f, e, n, r, i, t[2], l[2][0]),
  21856. i = p.CC(p.HH, f, i, e, n, r, t[10], l[2][1]),
  21857. r = p.CC(p.HH, f, r, i, e, n, t[6], l[2][2]),
  21858. n = p.CC(p.HH, f, n, r, i, e, t[14], l[2][3]),
  21859. e = p.CC(p.HH, f, e, n, r, i, t[1], l[2][0]),
  21860. i = p.CC(p.HH, f, i, e, n, r, t[9], l[2][1]),
  21861. r = p.CC(p.HH, f, r, i, e, n, t[5], l[2][2]),
  21862. n = p.CC(p.HH, f, n, r, i, e, t[13], l[2][3]),
  21863. e = p.CC(p.HH, f, e, n, r, i, t[3], l[2][0]),
  21864. i = p.CC(p.HH, f, i, e, n, r, t[11], l[2][1]),
  21865. r = p.CC(p.HH, f, r, i, e, n, t[7], l[2][2]),
  21866. n = p.CC(p.HH, f, n, r, i, e, t[15], l[2][3]),
  21867. this.state.hash = [this.state.hash[0] + e | 0, this.state.hash[1] + n | 0, this.state.hash[2] + r | 0, this.state.hash[3] + i | 0]
  21868. }
  21869. }, {
  21870. key: "finalize",
  21871. value: function() {
  21872. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  21873. this.addLengthBits(),
  21874. this.process(),
  21875. this.getStateHash()
  21876. }
  21877. }]),
  21878. o(r, n),
  21879. p);
  21880. function p() {
  21881. return function(t) {
  21882. if (!(t instanceof p))
  21883. throw new TypeError("Cannot call a class as a function")
  21884. }(this),
  21885. t = this,
  21886. !(e = a(p).apply(this, arguments)) || "object" !== i(e) && "function" != typeof e ? function() {
  21887. if (void 0 !== t)
  21888. return t;
  21889. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  21890. }() : e;
  21891. var t, e
  21892. }
  21893. e.a = n
  21894. }
  21895. , function(t, e, n) {
  21896. "use strict";
  21897. var r = n(3)
  21898. , u = n(0);
  21899. function i(t) {
  21900. return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  21901. return typeof t
  21902. }
  21903. : function(t) {
  21904. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  21905. }
  21906. )(t)
  21907. }
  21908. function o(t, e, n) {
  21909. return (o = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) {
  21910. t = function(t, e) {
  21911. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = s(t));)
  21912. ;
  21913. return t
  21914. }(t, e);
  21915. if (t) {
  21916. e = Object.getOwnPropertyDescriptor(t, e);
  21917. return e.get ? e.get.call(n) : e.value
  21918. }
  21919. }
  21920. )(t, e, n || t)
  21921. }
  21922. function s(t) {
  21923. return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
  21924. return t.__proto__ || Object.getPrototypeOf(t)
  21925. }
  21926. )(t)
  21927. }
  21928. function a(t, e) {
  21929. return (a = Object.setPrototypeOf || function(t, e) {
  21930. return t.__proto__ = e,
  21931. t
  21932. }
  21933. )(t, e)
  21934. }
  21935. var c = [1518500249, 1859775393, 2400959708, 3395469782]
  21936. , r = (function(t, e) {
  21937. if ("function" != typeof e && null !== e)
  21938. throw new TypeError("Super expression must either be null or a function");
  21939. t.prototype = Object.create(e && e.prototype, {
  21940. constructor: {
  21941. value: t,
  21942. writable: !0,
  21943. configurable: !0
  21944. }
  21945. }),
  21946. e && a(t, e)
  21947. }(l, r.a),
  21948. function(t, e) {
  21949. for (var n = 0; n < e.length; n++) {
  21950. var r = e[n];
  21951. r.enumerable = r.enumerable || !1,
  21952. r.configurable = !0,
  21953. "value" in r && (r.writable = !0),
  21954. Object.defineProperty(t, r.key, r)
  21955. }
  21956. }(l.prototype, [{
  21957. key: "reset",
  21958. value: function() {
  21959. o(s(l.prototype), "reset", this).call(this),
  21960. this.state.hash = [1732584193, -271733879, -1732584194, 271733878, -1009589776]
  21961. }
  21962. }, {
  21963. key: "processBlock",
  21964. value: function(t) {
  21965. for (var e = 0 | this.state.hash[0], n = 0 | this.state.hash[1], r = 0 | this.state.hash[2], i = 0 | this.state.hash[3], o = 0 | this.state.hash[4], s = 0; s < this.options.rounds; s++) {
  21966. this.W[s] = s < 16 ? 0 | t[s] : this.W[s - 3] ^ this.W[s - 8] ^ this.W[s - 14] ^ this.W[s - 16] | 0;
  21967. var a = Object(u.a)(e, 5) + o + this.W[s] + c[s / 20 >> 0] | 0
  21968. , a = s < 20 ? a + (n & r | ~n & i) | 0 : !(s < 40) && s < 60 ? a + (n & r | n & i | r & i) | 0 : a + (n ^ r ^ i) | 0
  21969. , o = i
  21970. , i = r
  21971. , r = 0 | Object(u.a)(n, 30)
  21972. , n = e
  21973. , e = a
  21974. }
  21975. this.state.hash[0] = this.state.hash[0] + e | 0,
  21976. this.state.hash[1] = this.state.hash[1] + n | 0,
  21977. this.state.hash[2] = this.state.hash[2] + r | 0,
  21978. this.state.hash[3] = this.state.hash[3] + i | 0,
  21979. this.state.hash[4] = this.state.hash[4] + o | 0
  21980. }
  21981. }, {
  21982. key: "finalize",
  21983. value: function() {
  21984. return this.addPaddingISO7816(this.state.message.length < 56 ? 56 - this.state.message.length | 0 : 120 - this.state.message.length | 0),
  21985. this.addLengthBits(),
  21986. this.process(),
  21987. this.getStateHash()
  21988. }
  21989. }]),
  21990. l);
  21991. function l(t) {
  21992. var e;
  21993. return function(t) {
  21994. if (!(t instanceof l))
  21995. throw new TypeError("Cannot call a class as a function")
  21996. }(this),
  21997. e = this,
  21998. (t = !(t = s(l).call(this, t)) || "object" !== i(t) && "function" != typeof t ? function() {
  21999. if (void 0 !== e)
  22000. return e;
  22001. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  22002. }() : t).options.rounds = t.options.rounds || 80,
  22003. t.W = new Array(80),
  22004. t
  22005. }
  22006. e.a = r
  22007. }
  22008. , function(t, e, n) {
  22009. "use strict";
  22010. function r(t) {
  22011. for (var e = "", n = new Uint8Array(t), r = 0; r < n.length; r++)
  22012. e += String.fromCharCode(n[r]);
  22013. return e
  22014. }
  22015. n.d(e, "a", function() {
  22016. return r
  22017. })
  22018. }
  22019. , , function(t, e, n) {
  22020. "use strict";
  22021. var r = (function(t, e) {
  22022. for (var n = 0; n < e.length; n++) {
  22023. var r = e[n];
  22024. r.enumerable = r.enumerable || !1,
  22025. r.configurable = !0,
  22026. "value" in r && (r.writable = !0),
  22027. Object.defineProperty(t, r.key, r)
  22028. }
  22029. }(i.prototype, [{
  22030. key: "update",
  22031. value: function(t) {
  22032. this.hasher.update(t)
  22033. }
  22034. }, {
  22035. key: "finalize",
  22036. value: function() {
  22037. var t = this.hasher.finalize();
  22038. return this.hasher.reset(),
  22039. this.hasher.update(this.oPad),
  22040. this.hasher.update(t),
  22041. this.hasher.finalize()
  22042. }
  22043. }]),
  22044. i);
  22045. function i(t, e) {
  22046. !function(t) {
  22047. if (!(t instanceof i))
  22048. throw new TypeError("Cannot call a class as a function")
  22049. }(this),
  22050. t.length > e.blockSizeInBytes && (e.update(t),
  22051. t = e.finalize(),
  22052. e.reset());
  22053. for (var n = t.length; n < e.blockSizeInBytes; n++)
  22054. t += "\0";
  22055. this.oPad = "";
  22056. for (var r = 0; r < t.length; r++)
  22057. e.update(String.fromCharCode(54 ^ t.charCodeAt(r))),
  22058. this.oPad += String.fromCharCode(92 ^ t.charCodeAt(r));
  22059. this.hasher = e
  22060. }
  22061. e.a = r
  22062. }
  22063. , , , , , , , , , function(t, e, n) {
  22064. "use strict";
  22065. n.r(e);
  22066. var r = n(14)
  22067. , i = n(13)
  22068. , o = n(16)
  22069. , s = n(10)
  22070. , a = n(8)
  22071. , u = n(17)
  22072. , c = n(11)
  22073. , l = n(7)
  22074. , h = n(6)
  22075. , f = n(9)
  22076. , p = n(12)
  22077. , d = n(1)
  22078. , g = n(18)
  22079. , m = n(2)
  22080. , v = n(15)
  22081. , y = n(20);
  22082. (function(t, e) {
  22083. for (var n = 0; n < e.length; n++) {
  22084. var r = e[n];
  22085. r.enumerable = r.enumerable || !1,
  22086. r.configurable = !0,
  22087. "value" in r && (r.writable = !0),
  22088. Object.defineProperty(t, r.key, r)
  22089. }
  22090. }
  22091. )(b.prototype, [{
  22092. key: "getHasher",
  22093. value: function(t, e) {
  22094. switch (e = e || {},
  22095. t) {
  22096. case "has160":
  22097. return new r.a(e);
  22098. case "md2":
  22099. return new i.a(e);
  22100. case "md4":
  22101. return new o.a(e);
  22102. case "md5":
  22103. return new s.a(e);
  22104. case "ripemd128":
  22105. return e = Object.assign({}, {
  22106. length: 128
  22107. }, e),
  22108. new a.a(e);
  22109. case "ripemd":
  22110. case "ripemd160":
  22111. return e = Object.assign({}, {
  22112. length: 160
  22113. }, e),
  22114. new a.a(e);
  22115. case "ripemd256":
  22116. return e = Object.assign({}, {
  22117. length: 256
  22118. }, e),
  22119. new a.a(e);
  22120. case "ripemd320":
  22121. return e = Object.assign({}, {
  22122. length: 320
  22123. }, e),
  22124. new a.a(e);
  22125. case "sha0":
  22126. return new u.a(e);
  22127. case "sha1":
  22128. return new c.a(e);
  22129. case "sha224":
  22130. return e = Object.assign({}, {
  22131. length: 224
  22132. }, e),
  22133. new l.a(e);
  22134. case "sha256":
  22135. return e = Object.assign({}, {
  22136. length: 256
  22137. }, e),
  22138. new l.a(e);
  22139. case "sha384":
  22140. return e = Object.assign({}, {
  22141. length: 384
  22142. }, e),
  22143. new h.a(e);
  22144. case "sha512":
  22145. return e = Object.assign({}, {
  22146. length: 512
  22147. }, e),
  22148. new h.a(e);
  22149. case "sha512/224":
  22150. return e = Object.assign({}, {
  22151. length: 224
  22152. }, e),
  22153. new h.a(e);
  22154. case "sha512/256":
  22155. return e = Object.assign({}, {
  22156. length: 256
  22157. }, e),
  22158. new h.a(e);
  22159. case "snefru":
  22160. case "snefru128":
  22161. case "snefru128/8":
  22162. return e = Object.assign({}, {
  22163. length: 128
  22164. }, e),
  22165. new f.a(e);
  22166. case "snefru256":
  22167. case "snefru256/8":
  22168. return e = Object.assign({}, {
  22169. length: 256
  22170. }, e),
  22171. new f.a(e);
  22172. case "snefru128/2":
  22173. return e = Object.assign({}, {
  22174. length: 128,
  22175. rounds: 2
  22176. }, e),
  22177. new f.a(e);
  22178. case "snefru256/4":
  22179. return e = Object.assign({}, {
  22180. length: 256,
  22181. rounds: 4
  22182. }, e),
  22183. new f.a(e);
  22184. case "whirlpool":
  22185. return new p.a(e);
  22186. case "whirlpool-0":
  22187. return e = Object.assign({}, {
  22188. type: "0"
  22189. }, e),
  22190. new p.a(e);
  22191. case "whirlpool-t":
  22192. return e = Object.assign({}, {
  22193. type: "t"
  22194. }, e),
  22195. new p.a(e)
  22196. }
  22197. }
  22198. }, {
  22199. key: "hash",
  22200. value: function(t, e, n) {
  22201. n = n || {};
  22202. n = this.getHasher(t, n);
  22203. return n.update(Object(d.a)(e)),
  22204. Object(m.a)(n.finalize())
  22205. }
  22206. }, {
  22207. key: "getHmac",
  22208. value: function(t, e) {
  22209. return new y.a(t, e)
  22210. }
  22211. }, {
  22212. key: "hmac",
  22213. value: function(t, e, n) {
  22214. n = this.getHmac(Object(d.a)(t), n);
  22215. return n.update(Object(d.a)(e)),
  22216. Object(m.a)(n.finalize())
  22217. }
  22218. }]),
  22219. n = b;
  22220. function b() {
  22221. !function(t) {
  22222. if (!(t instanceof b))
  22223. throw new TypeError("Cannot call a class as a function")
  22224. }(this),
  22225. this.encoder = {},
  22226. this.encoder.fromUtf = d.a,
  22227. this.encoder.fromArrayBuffer = g.a,
  22228. this.encoder.toHex = m.a,
  22229. this.encoder.toBase64 = v.a
  22230. }
  22231. n = new n,
  22232. e.default = n
  22233. }
  22234. ]).default;
  22235. !function(s) {
  22236. "use strict";
  22237. var n = {
  22238. page: 1,
  22239. pageSize: 200,
  22240. total: 0,
  22241. showTotal: !1,
  22242. totalTxt: "共{total}条",
  22243. noData: !1,
  22244. showSkip: !1,
  22245. showPN: !0,
  22246. prevPage: "上一页",
  22247. nextPage: "下一页",
  22248. fastForward: 0,
  22249. selectOption: [],
  22250. backFun: function(t) { }
  22251. };
  22252. function e(t, e) {
  22253. this.element = s(t),
  22254. this.settings = s.extend({}, n, e),
  22255. this.pageNum = 1,
  22256. this.pageList = [],
  22257. this.pageTatol = 0,
  22258. this.init()
  22259. }
  22260. s.extend(e.prototype, {
  22261. init: function() {
  22262. this.element.empty(),
  22263. this.viewHtml(),
  22264. this.clickBtn()
  22265. },
  22266. creatHtml: function(t) {
  22267. t == this.settings.page ? this.pageList.push('<button class="active" data-page=' + t + ">" + t + "</button>") : this.pageList.push("<button data-page=" + t + ">" + t + "</button>")
  22268. },
  22269. viewHtml: function() {
  22270. var t = this.settings
  22271. , e = 0
  22272. , n = [];
  22273. if (0 < t.total)
  22274. e = Math.ceil(t.total / t.pageSize);
  22275. else {
  22276. if (!t.noData)
  22277. return;
  22278. e = 1,
  22279. t.page = 1,
  22280. t.total = 0
  22281. }
  22282. if (this.pageTatol = e,
  22283. this.pageNum = t.page,
  22284. t.showTotal && n.push('<div class="spage-total">' + t.totalTxt.replace(/\{(\w+)\}/gi, t.total) + "</div>"),
  22285. n.push('<div class="spage-number">'),
  22286. this.pageList = [],
  22287. t.showPN && (1 == t.page ? this.pageList.push('<button class="button-disabled" data-page="prev"><i class="prevBtn"></i></button>') : this.pageList.push('<button data-page="prev"><i class="prevBtn"></i></button>')),
  22288. e <= 6)
  22289. for (var r = 1; r < e + 1; r++)
  22290. this.creatHtml(r);
  22291. else if (t.page < 3) {
  22292. for (r = 1; r <= 3; r++)
  22293. this.creatHtml(r);
  22294. this.pageList.push('<button data-page="after" class="spage-after">...</button><button data-page=' + e + ">" + e + "</button>")
  22295. } else if (t.page > e - 3) {
  22296. this.pageList.push('<button data-page="1">1</button><button data-page="before" class="spage-before">...</button>');
  22297. for (r = e - 3; r <= e; r++)
  22298. this.creatHtml(r)
  22299. } else {
  22300. this.pageList.push('<button data-page="1">1</button>'),
  22301. 3 < t.page && this.pageList.push('<button data-page="before" class="spage-before">...</button>');
  22302. for (r = t.page - 1; r <= Number(t.page) + 1; r++)
  22303. this.creatHtml(r);
  22304. t.page <= e - 3 && this.pageList.push('<button data-page="after" class="spage-after">...</button>'),
  22305. this.pageList.push("<button data-page=" + e + ">" + e + "</button>")
  22306. }
  22307. if (t.showPN && (t.page == e ? this.pageList.push('<button class="button-disabled" data-page="next"><i class="nextBtn"></i></button>') : this.pageList.push('<button data-page="next"><i class="nextBtn"></i></button>')),
  22308. n.push(this.pageList.join("")),
  22309. n.push("</div>"),
  22310. 0 < t.selectOption.length) {
  22311. for (var i = '<select class="selectNum" id="selectNum">', o = 0; o <= t.selectOption.length - 1; o++)
  22312. i += "<option value=" + t.selectOption[o] + " ",
  22313. t.pageSize === t.selectOption[o] ? i += "selected>" + t.selectOption[o] + "行/页</option>" : i += ">" + t.selectOption[o] + "行/页</option>";
  22314. i += "</select>",
  22315. n.push(i)
  22316. }
  22317. t.showSkip && n.push('<div class="spage-skip">跳至&nbsp;<input type="text" class="luckysheet-mousedown-cancel" value="' + t.page + '"/>&nbsp;页&nbsp;&nbsp;</div>'),
  22318. this.element.html(n.join(""))
  22319. },
  22320. clickBtn: function() {
  22321. var n = this
  22322. , r = this.settings
  22323. , i = this.element
  22324. , o = this.pageTatol;
  22325. this.element.on("change", "select", function(t) {
  22326. var e = parseInt(document.getElementById("selectNum").value);
  22327. r.pageSize = e,
  22328. r.page = 1,
  22329. n.element.empty(),
  22330. n.viewHtml(),
  22331. r.backFun(r)
  22332. }),
  22333. this.element.off("click", "button"),
  22334. this.element.on("click", "button", function() {
  22335. var t = s(this).data("page");
  22336. switch (t) {
  22337. case "prev":
  22338. r.page = 1 <= r.page - 1 ? r.page - 1 : 1,
  22339. t = r.page;
  22340. break;
  22341. case "next":
  22342. r.page = Number(r.page) + 1 <= o ? Number(r.page) + 1 : o,
  22343. t = r.page;
  22344. break;
  22345. case "before":
  22346. r.page = 1 <= r.page - r.fastForward ? r.page - r.fastForward : 1,
  22347. t = r.page;
  22348. break;
  22349. case "after":
  22350. r.page = Number(r.page) + Number(r.fastForward) <= o ? Number(r.page) + Number(r.fastForward) : o,
  22351. t = r.page;
  22352. break;
  22353. case "go":
  22354. var e = parseInt(i.find("input").val());
  22355. if (!(/^[0-9]*$/.test(e) && 1 <= e && e <= o))
  22356. return;
  22357. t = r.page = e;
  22358. break;
  22359. default:
  22360. r.page = t
  22361. }
  22362. t != n.pageNum && (n.pageNum = r.page,
  22363. n.viewHtml(),
  22364. r.backFun(r))
  22365. }),
  22366. this.element.off("keyup", "input"),
  22367. this.element.on("keyup", "input", function(t) {
  22368. 13 == t.keyCode && (t = parseInt(i.find("input").val()),
  22369. /^[0-9]*$/.test(t) && 1 <= t && t <= o && t != n.pageNum && (r.page = t,
  22370. n.pageNum = t,
  22371. n.viewHtml(),
  22372. r.backFun(r)))
  22373. }),
  22374. 0 < r.fastForward && (i.find(".spage-after").hover(function() {
  22375. s(this).html("&raquo;")
  22376. }, function() {
  22377. s(this).html("...")
  22378. }),
  22379. i.find(".spage-before").hover(function() {
  22380. s(this).html("&laquo;")
  22381. }, function() {
  22382. s(this).html("...")
  22383. }))
  22384. }
  22385. }),
  22386. s.fn.sPage = function(t) {
  22387. return this.each(function() {
  22388. new e(this, t)
  22389. })
  22390. }
  22391. }(jQuery, (window,
  22392. document));