vendor.min.js 2.9 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245512465124751248512495125051251512525125351254512555125651257512585125951260512615126251263512645126551266512675126851269512705127151272512735127451275512765127751278512795128051281512825128351284512855128651287512885128951290512915129251293512945129551296512975129851299513005130151302513035130451305513065130751308513095131051311513125131351314513155131651317513185131951320513215132251323513245132551326513275132851329513305133151332513335133451335513365133751338513395134051341513425134351344513455134651347513485134951350513515135251353513545135551356513575135851359513605136151362513635136451365513665136751368513695137051371513725137351374513755137651377513785137951380513815138251383513845138551386513875138851389513905139151392513935139451395513965139751398513995140051401514025140351404514055140651407514085140951410514115141251413514145141551416514175141851419514205142151422514235142451425514265142751428514295143051431514325143351434514355143651437514385143951440514415144251443514445144551446514475144851449514505145151452514535145451455514565145751458514595146051461514625146351464514655146651467514685146951470514715147251473514745147551476514775147851479514805148151482514835148451485514865148751488514895149051491514925149351494514955149651497514985149951500515015150251503515045150551506515075150851509515105151151512515135151451515515165151751518515195152051521515225152351524515255152651527515285152951530515315153251533515345153551536515375153851539515405154151542515435154451545515465154751548515495155051551515525155351554515555155651557515585155951560515615156251563515645156551566515675156851569515705157151572515735157451575515765157751578515795158051581515825158351584515855158651587515885158951590515915159251593515945159551596515975159851599516005160151602516035160451605516065160751608516095161051611516125161351614516155161651617516185161951620516215162251623516245162551626516275162851629516305163151632516335163451635516365163751638516395164051641516425164351644516455164651647516485164951650516515165251653516545165551656516575165851659516605166151662516635166451665516665166751668516695167051671516725167351674516755167651677516785167951680516815168251683516845168551686516875168851689516905169151692516935169451695516965169751698516995170051701517025170351704517055170651707517085170951710517115171251713517145171551716517175171851719517205172151722517235172451725517265172751728517295173051731517325173351734517355173651737517385173951740517415174251743517445174551746517475174851749517505175151752517535175451755517565175751758517595176051761517625176351764517655176651767517685176951770517715177251773517745177551776517775177851779517805178151782517835178451785517865178751788517895179051791517925179351794517955179651797517985179951800518015180251803518045180551806518075180851809518105181151812518135181451815518165181751818518195182051821518225182351824518255182651827518285182951830518315183251833518345183551836518375183851839518405184151842518435184451845518465184751848518495185051851518525185351854518555185651857518585185951860518615186251863518645186551866518675186851869518705187151872518735187451875518765187751878518795188051881518825188351884518855188651887518885188951890518915189251893518945189551896518975189851899519005190151902519035190451905519065190751908519095191051911519125191351914519155191651917519185191951920519215192251923519245192551926519275192851929519305193151932519335193451935519365193751938519395194051941519425194351944519455194651947519485194951950519515195251953519545195551956519575195851959519605196151962519635196451965519665196751968519695197051971519725197351974519755197651977519785197951980519815198251983519845198551986519875198851989519905199151992519935199451995519965199751998519995200052001520025200352004520055200652007520085200952010520115201252013520145201552016520175201852019520205202152022520235202452025520265202752028520295203052031520325203352034520355203652037520385203952040520415204252043520445204552046520475204852049520505205152052520535205452055520565205752058520595206052061520625206352064520655206652067520685206952070520715207252073520745207552076520775207852079520805208152082520835208452085520865208752088520895209052091520925209352094520955209652097520985209952100521015210252103521045210552106521075210852109521105211152112521135211452115521165211752118521195212052121521225212352124521255212652127521285212952130521315213252133521345213552136521375213852139521405214152142521435214452145521465214752148521495215052151521525215352154521555215652157521585215952160521615216252163521645216552166521675216852169521705217152172521735217452175521765217752178521795218052181521825218352184521855218652187521885218952190521915219252193521945219552196521975219852199522005220152202522035220452205522065220752208522095221052211522125221352214522155221652217522185221952220522215222252223522245222552226522275222852229522305223152232522335223452235522365223752238522395224052241522425224352244522455224652247522485224952250522515225252253522545225552256522575225852259522605226152262522635226452265522665226752268522695227052271522725227352274522755227652277522785227952280522815228252283522845228552286522875228852289522905229152292522935229452295522965229752298522995230052301523025230352304523055230652307523085230952310523115231252313523145231552316523175231852319523205232152322523235232452325523265232752328523295233052331523325233352334523355233652337523385233952340523415234252343523445234552346523475234852349523505235152352523535235452355523565235752358523595236052361523625236352364523655236652367523685236952370523715237252373523745237552376523775237852379523805238152382523835238452385523865238752388523895239052391523925239352394523955239652397523985239952400524015240252403524045240552406524075240852409524105241152412524135241452415524165241752418524195242052421524225242352424524255242652427524285242952430524315243252433524345243552436524375243852439524405244152442524435244452445524465244752448524495245052451524525245352454524555245652457524585245952460524615246252463524645246552466524675246852469524705247152472524735247452475524765247752478524795248052481524825248352484524855248652487524885248952490524915249252493524945249552496524975249852499525005250152502525035250452505525065250752508525095251052511525125251352514525155251652517525185251952520525215252252523525245252552526525275252852529525305253152532525335253452535525365253752538525395254052541525425254352544525455254652547525485254952550525515255252553525545255552556525575255852559525605256152562525635256452565525665256752568525695257052571525725257352574525755257652577525785257952580525815258252583525845258552586525875258852589525905259152592525935259452595525965259752598525995260052601526025260352604526055260652607526085260952610526115261252613526145261552616526175261852619526205262152622526235262452625526265262752628526295263052631526325263352634526355263652637526385263952640526415264252643526445264552646526475264852649526505265152652526535265452655526565265752658526595266052661526625266352664526655266652667526685266952670526715267252673526745267552676526775267852679526805268152682526835268452685526865268752688526895269052691526925269352694526955269652697526985269952700527015270252703527045270552706527075270852709527105271152712527135271452715527165271752718527195272052721527225272352724527255272652727527285272952730527315273252733527345273552736527375273852739527405274152742527435274452745527465274752748527495275052751527525275352754527555275652757527585275952760527615276252763527645276552766527675276852769527705277152772527735277452775527765277752778527795278052781527825278352784527855278652787527885278952790527915279252793527945279552796527975279852799528005280152802528035280452805528065280752808528095281052811528125281352814528155281652817528185281952820528215282252823528245282552826528275282852829528305283152832528335283452835528365283752838528395284052841528425284352844528455284652847528485284952850528515285252853528545285552856528575285852859528605286152862528635286452865528665286752868528695287052871528725287352874528755287652877528785287952880528815288252883528845288552886528875288852889528905289152892528935289452895528965289752898528995290052901529025290352904529055290652907529085290952910529115291252913529145291552916529175291852919529205292152922529235292452925529265292752928529295293052931529325293352934529355293652937529385293952940529415294252943529445294552946529475294852949529505295152952529535295452955529565295752958529595296052961529625296352964529655296652967529685296952970529715297252973529745297552976529775297852979529805298152982529835298452985529865298752988529895299052991529925299352994529955299652997529985299953000530015300253003530045300553006530075300853009530105301153012530135301453015530165301753018530195302053021530225302353024530255302653027530285302953030530315303253033530345303553036530375303853039530405304153042530435304453045530465304753048530495305053051530525305353054530555305653057530585305953060530615306253063530645306553066530675306853069530705307153072530735307453075530765307753078530795308053081530825308353084530855308653087530885308953090530915309253093530945309553096530975309853099531005310153102531035310453105531065310753108531095311053111531125311353114531155311653117531185311953120531215312253123531245312553126531275312853129531305313153132531335313453135531365313753138531395314053141531425314353144531455314653147531485314953150531515315253153531545315553156531575315853159531605316153162531635316453165531665316753168531695317053171531725317353174531755317653177531785317953180531815318253183531845318553186531875318853189531905319153192531935319453195531965319753198531995320053201532025320353204532055320653207532085320953210532115321253213532145321553216532175321853219532205322153222532235322453225532265322753228532295323053231532325323353234532355323653237532385323953240532415324253243532445324553246532475324853249532505325153252532535325453255532565325753258532595326053261532625326353264532655326653267532685326953270532715327253273532745327553276532775327853279532805328153282532835328453285532865328753288532895329053291532925329353294532955329653297532985329953300533015330253303533045330553306533075330853309533105331153312533135331453315533165331753318533195332053321533225332353324533255332653327533285332953330533315333253333533345333553336533375333853339533405334153342533435334453345533465334753348533495335053351533525335353354533555335653357533585335953360533615336253363533645336553366533675336853369533705337153372533735337453375533765337753378533795338053381533825338353384533855338653387533885338953390533915339253393533945339553396533975339853399534005340153402534035340453405534065340753408534095341053411534125341353414534155341653417534185341953420534215342253423534245342553426534275342853429534305343153432534335343453435534365343753438534395344053441534425344353444534455344653447534485344953450534515345253453534545345553456534575345853459534605346153462534635346453465534665346753468534695347053471534725347353474534755347653477534785347953480534815348253483534845348553486534875348853489534905349153492534935349453495534965349753498534995350053501535025350353504535055350653507535085350953510535115351253513535145351553516535175351853519535205352153522535235352453525535265352753528535295353053531535325353353534535355353653537535385353953540535415354253543535445354553546535475354853549535505355153552535535355453555535565355753558535595356053561535625356353564535655356653567535685356953570535715357253573535745357553576535775357853579535805358153582535835358453585535865358753588535895359053591535925359353594535955359653597535985359953600536015360253603536045360553606536075360853609536105361153612536135361453615536165361753618536195362053621536225362353624536255362653627536285362953630536315363253633536345363553636536375363853639536405364153642536435364453645536465364753648536495365053651536525365353654536555365653657536585365953660536615366253663536645366553666536675366853669536705367153672536735367453675536765367753678536795368053681536825368353684536855368653687536885368953690536915369253693536945369553696536975369853699537005370153702537035370453705537065370753708537095371053711537125371353714537155371653717537185371953720537215372253723537245372553726537275372853729537305373153732537335373453735537365373753738537395374053741537425374353744537455374653747537485374953750537515375253753537545375553756537575375853759537605376153762537635376453765537665376753768537695377053771537725377353774537755377653777537785377953780537815378253783537845378553786537875378853789537905379153792537935379453795537965379753798537995380053801538025380353804538055380653807538085380953810538115381253813538145381553816538175381853819538205382153822538235382453825538265382753828538295383053831538325383353834538355383653837538385383953840538415384253843538445384553846538475384853849538505385153852538535385453855538565385753858538595386053861538625386353864538655386653867538685386953870538715387253873538745387553876538775387853879538805388153882538835388453885538865388753888538895389053891538925389353894538955389653897538985389953900539015390253903539045390553906539075390853909539105391153912539135391453915539165391753918539195392053921539225392353924539255392653927539285392953930539315393253933539345393553936539375393853939539405394153942539435394453945539465394753948539495395053951539525395353954539555395653957539585395953960539615396253963539645396553966539675396853969539705397153972539735397453975539765397753978539795398053981539825398353984539855398653987539885398953990539915399253993539945399553996539975399853999540005400154002540035400454005540065400754008540095401054011540125401354014540155401654017540185401954020540215402254023540245402554026540275402854029540305403154032540335403454035540365403754038540395404054041540425404354044540455404654047540485404954050540515405254053540545405554056540575405854059540605406154062540635406454065540665406754068540695407054071540725407354074540755407654077540785407954080540815408254083540845408554086540875408854089540905409154092540935409454095540965409754098540995410054101541025410354104541055410654107541085410954110541115411254113541145411554116541175411854119541205412154122541235412454125541265412754128541295413054131541325413354134541355413654137541385413954140541415414254143541445414554146541475414854149541505415154152541535415454155541565415754158541595416054161541625416354164541655416654167541685416954170541715417254173541745417554176541775417854179541805418154182541835418454185541865418754188541895419054191541925419354194541955419654197541985419954200542015420254203542045420554206542075420854209542105421154212542135421454215542165421754218542195422054221542225422354224542255422654227542285422954230542315423254233542345423554236542375423854239542405424154242542435424454245542465424754248542495425054251542525425354254542555425654257542585425954260542615426254263542645426554266542675426854269542705427154272542735427454275542765427754278542795428054281542825428354284542855428654287542885428954290542915429254293542945429554296542975429854299543005430154302543035430454305543065430754308543095431054311543125431354314543155431654317543185431954320543215432254323543245432554326543275432854329543305433154332543335433454335543365433754338543395434054341543425434354344543455434654347543485434954350543515435254353543545435554356543575435854359543605436154362543635436454365543665436754368543695437054371543725437354374543755437654377543785437954380543815438254383543845438554386543875438854389543905439154392543935439454395543965439754398543995440054401544025440354404544055440654407544085440954410544115441254413544145441554416544175441854419544205442154422544235442454425544265442754428544295443054431544325443354434544355443654437544385443954440544415444254443544445444554446544475444854449544505445154452544535445454455544565445754458544595446054461544625446354464544655446654467544685446954470544715447254473544745447554476544775447854479544805448154482544835448454485544865448754488544895449054491544925449354494544955449654497544985449954500545015450254503545045450554506545075450854509545105451154512545135451454515545165451754518545195452054521545225452354524545255452654527545285452954530545315453254533545345453554536545375453854539545405454154542545435454454545545465454754548545495455054551545525455354554545555455654557545585455954560545615456254563545645456554566545675456854569545705457154572545735457454575545765457754578545795458054581545825458354584545855458654587545885458954590545915459254593545945459554596545975459854599546005460154602546035460454605546065460754608546095461054611546125461354614546155461654617546185461954620546215462254623546245462554626546275462854629546305463154632546335463454635546365463754638546395464054641546425464354644546455464654647546485464954650546515465254653546545465554656546575465854659546605466154662546635466454665546665466754668546695467054671546725467354674546755467654677546785467954680546815468254683546845468554686546875468854689546905469154692546935469454695546965469754698546995470054701547025470354704547055470654707547085470954710547115471254713547145471554716547175471854719547205472154722547235472454725547265472754728547295473054731547325473354734547355473654737547385473954740547415474254743547445474554746547475474854749547505475154752547535475454755547565475754758547595476054761547625476354764547655476654767547685476954770547715477254773547745477554776547775477854779547805478154782547835478454785547865478754788547895479054791547925479354794547955479654797547985479954800548015480254803548045480554806548075480854809548105481154812548135481454815548165481754818548195482054821548225482354824548255482654827548285482954830548315483254833548345483554836548375483854839548405484154842548435484454845548465484754848548495485054851548525485354854548555485654857548585485954860548615486254863548645486554866548675486854869548705487154872548735487454875548765487754878548795488054881548825488354884548855488654887548885488954890548915489254893548945489554896548975489854899549005490154902549035490454905549065490754908549095491054911549125491354914549155491654917549185491954920549215492254923549245492554926549275492854929549305493154932549335493454935549365493754938549395494054941549425494354944549455494654947549485494954950549515495254953549545495554956549575495854959549605496154962549635496454965549665496754968549695497054971549725497354974549755497654977549785497954980549815498254983549845498554986549875498854989549905499154992549935499454995549965499754998549995500055001550025500355004550055500655007550085500955010550115501255013550145501555016550175501855019550205502155022550235502455025550265502755028550295503055031550325503355034550355503655037550385503955040550415504255043550445504555046550475504855049550505505155052550535505455055550565505755058550595506055061550625506355064550655506655067550685506955070550715507255073550745507555076550775507855079550805508155082550835508455085550865508755088550895509055091550925509355094550955509655097550985509955100551015510255103551045510555106551075510855109551105511155112551135511455115551165511755118551195512055121551225512355124551255512655127551285512955130551315513255133551345513555136551375513855139551405514155142551435514455145551465514755148551495515055151551525515355154551555515655157551585515955160551615516255163551645516555166551675516855169551705517155172551735517455175551765517755178551795518055181551825518355184551855518655187551885518955190551915519255193551945519555196551975519855199552005520155202552035520455205552065520755208552095521055211552125521355214552155521655217552185521955220552215522255223552245522555226552275522855229552305523155232552335523455235552365523755238552395524055241552425524355244552455524655247552485524955250552515525255253552545525555256552575525855259552605526155262552635526455265552665526755268552695527055271552725527355274552755527655277552785527955280552815528255283552845528555286552875528855289552905529155292552935529455295552965529755298552995530055301553025530355304553055530655307553085530955310553115531255313553145531555316553175531855319553205532155322553235532455325553265532755328553295533055331553325533355334553355533655337553385533955340553415534255343553445534555346553475534855349553505535155352553535535455355553565535755358553595536055361553625536355364553655536655367553685536955370553715537255373553745537555376553775537855379553805538155382553835538455385553865538755388553895539055391553925539355394553955539655397553985539955400554015540255403554045540555406554075540855409554105541155412554135541455415554165541755418554195542055421554225542355424554255542655427554285542955430554315543255433554345543555436554375543855439554405544155442554435544455445554465544755448554495545055451554525545355454554555545655457554585545955460554615546255463554645546555466554675546855469554705547155472554735547455475554765547755478554795548055481554825548355484554855548655487554885548955490554915549255493554945549555496554975549855499555005550155502555035550455505555065550755508555095551055511555125551355514555155551655517555185551955520555215552255523555245552555526555275552855529555305553155532555335553455535555365553755538555395554055541555425554355544555455554655547555485554955550555515555255553555545555555556555575555855559555605556155562555635556455565555665556755568555695557055571555725557355574555755557655577555785557955580555815558255583555845558555586555875558855589555905559155592555935559455595555965559755598555995560055601556025560355604556055560655607556085560955610556115561255613556145561555616556175561855619556205562155622556235562455625556265562755628556295563055631556325563355634556355563655637556385563955640556415564255643556445564555646556475564855649556505565155652556535565455655556565565755658556595566055661556625566355664556655566655667556685566955670556715567255673556745567555676556775567855679556805568155682556835568455685556865568755688556895569055691556925569355694556955569655697556985569955700557015570255703557045570555706557075570855709557105571155712557135571455715557165571755718557195572055721557225572355724557255572655727557285572955730557315573255733557345573555736557375573855739557405574155742557435574455745557465574755748557495575055751557525575355754557555575655757557585575955760557615576255763557645576555766557675576855769557705577155772557735577455775557765577755778557795578055781557825578355784557855578655787557885578955790557915579255793557945579555796557975579855799558005580155802558035580455805558065580755808558095581055811558125581355814558155581655817558185581955820558215582255823558245582555826558275582855829558305583155832558335583455835558365583755838558395584055841558425584355844558455584655847558485584955850558515585255853558545585555856558575585855859558605586155862558635586455865558665586755868558695587055871558725587355874558755587655877558785587955880558815588255883558845588555886558875588855889558905589155892558935589455895558965589755898558995590055901559025590355904559055590655907559085590955910559115591255913559145591555916559175591855919559205592155922559235592455925559265592755928559295593055931559325593355934559355593655937559385593955940559415594255943559445594555946559475594855949559505595155952559535595455955559565595755958559595596055961559625596355964559655596655967559685596955970559715597255973559745597555976559775597855979559805598155982559835598455985559865598755988559895599055991559925599355994559955599655997559985599956000560015600256003560045600556006560075600856009560105601156012560135601456015560165601756018560195602056021560225602356024560255602656027560285602956030560315603256033560345603556036560375603856039560405604156042560435604456045560465604756048560495605056051560525605356054560555605656057560585605956060560615606256063560645606556066560675606856069560705607156072560735607456075560765607756078560795608056081560825608356084560855608656087560885608956090560915609256093560945609556096560975609856099561005610156102561035610456105561065610756108561095611056111561125611356114561155611656117561185611956120561215612256123561245612556126561275612856129561305613156132561335613456135561365613756138561395614056141561425614356144561455614656147561485614956150561515615256153561545615556156561575615856159561605616156162561635616456165561665616756168561695617056171561725617356174561755617656177561785617956180561815618256183561845618556186561875618856189561905619156192561935619456195561965619756198561995620056201562025620356204562055620656207562085620956210562115621256213562145621556216562175621856219562205622156222562235622456225562265622756228562295623056231562325623356234562355623656237562385623956240562415624256243562445624556246562475624856249562505625156252562535625456255562565625756258562595626056261562625626356264562655626656267562685626956270562715627256273562745627556276562775627856279562805628156282562835628456285562865628756288562895629056291562925629356294562955629656297562985629956300563015630256303563045630556306563075630856309563105631156312563135631456315563165631756318563195632056321563225632356324563255632656327563285632956330563315633256333563345633556336563375633856339563405634156342563435634456345563465634756348563495635056351563525635356354563555635656357563585635956360563615636256363563645636556366563675636856369563705637156372563735637456375563765637756378563795638056381563825638356384563855638656387563885638956390563915639256393563945639556396563975639856399564005640156402564035640456405564065640756408564095641056411564125641356414564155641656417564185641956420564215642256423564245642556426564275642856429564305643156432564335643456435564365643756438564395644056441564425644356444564455644656447564485644956450564515645256453564545645556456564575645856459564605646156462564635646456465564665646756468564695647056471564725647356474564755647656477564785647956480564815648256483564845648556486564875648856489564905649156492564935649456495564965649756498564995650056501565025650356504565055650656507565085650956510565115651256513565145651556516565175651856519565205652156522565235652456525565265652756528565295653056531565325653356534565355653656537565385653956540565415654256543565445654556546565475654856549565505655156552565535655456555565565655756558565595656056561565625656356564565655656656567565685656956570565715657256573565745657556576565775657856579565805658156582565835658456585565865658756588565895659056591565925659356594565955659656597565985659956600566015660256603566045660556606566075660856609566105661156612566135661456615566165661756618566195662056621566225662356624566255662656627566285662956630566315663256633566345663556636566375663856639566405664156642566435664456645566465664756648566495665056651566525665356654566555665656657566585665956660566615666256663566645666556666566675666856669566705667156672566735667456675566765667756678566795668056681566825668356684566855668656687566885668956690566915669256693566945669556696566975669856699567005670156702567035670456705567065670756708567095671056711567125671356714567155671656717567185671956720567215672256723567245672556726567275672856729567305673156732567335673456735567365673756738567395674056741567425674356744567455674656747567485674956750567515675256753567545675556756567575675856759567605676156762567635676456765567665676756768567695677056771567725677356774567755677656777567785677956780567815678256783567845678556786567875678856789567905679156792567935679456795567965679756798567995680056801568025680356804568055680656807568085680956810568115681256813568145681556816568175681856819568205682156822568235682456825568265682756828568295683056831568325683356834568355683656837568385683956840568415684256843568445684556846568475684856849568505685156852568535685456855568565685756858568595686056861568625686356864568655686656867568685686956870568715687256873568745687556876568775687856879568805688156882568835688456885568865688756888568895689056891568925689356894568955689656897568985689956900569015690256903569045690556906569075690856909569105691156912569135691456915569165691756918569195692056921569225692356924569255692656927569285692956930569315693256933569345693556936569375693856939569405694156942569435694456945569465694756948569495695056951569525695356954569555695656957569585695956960569615696256963569645696556966569675696856969569705697156972569735697456975569765697756978569795698056981569825698356984569855698656987569885698956990569915699256993569945699556996569975699856999570005700157002570035700457005570065700757008570095701057011570125701357014570155701657017570185701957020570215702257023570245702557026570275702857029570305703157032570335703457035570365703757038570395704057041570425704357044570455704657047570485704957050570515705257053570545705557056570575705857059570605706157062570635706457065570665706757068570695707057071570725707357074570755707657077570785707957080570815708257083570845708557086570875708857089570905709157092570935709457095570965709757098570995710057101571025710357104571055710657107571085710957110571115711257113571145711557116571175711857119571205712157122571235712457125571265712757128571295713057131571325713357134571355713657137571385713957140571415714257143571445714557146571475714857149571505715157152571535715457155571565715757158571595716057161571625716357164571655716657167571685716957170571715717257173571745717557176571775717857179571805718157182571835718457185571865718757188571895719057191571925719357194571955719657197571985719957200572015720257203572045720557206572075720857209572105721157212572135721457215572165721757218572195722057221572225722357224572255722657227572285722957230572315723257233572345723557236572375723857239572405724157242572435724457245572465724757248572495725057251572525725357254572555725657257572585725957260572615726257263572645726557266572675726857269572705727157272572735727457275572765727757278572795728057281572825728357284572855728657287572885728957290572915729257293572945729557296572975729857299573005730157302573035730457305573065730757308573095731057311573125731357314573155731657317573185731957320573215732257323573245732557326573275732857329573305733157332573335733457335573365733757338573395734057341573425734357344573455734657347573485734957350573515735257353573545735557356573575735857359573605736157362573635736457365573665736757368573695737057371573725737357374573755737657377573785737957380573815738257383573845738557386573875738857389573905739157392573935739457395573965739757398573995740057401574025740357404574055740657407574085740957410574115741257413574145741557416574175741857419574205742157422574235742457425574265742757428574295743057431574325743357434574355743657437574385743957440574415744257443574445744557446574475744857449574505745157452574535745457455574565745757458574595746057461574625746357464574655746657467574685746957470574715747257473574745747557476574775747857479574805748157482574835748457485574865748757488574895749057491574925749357494574955749657497574985749957500575015750257503575045750557506575075750857509575105751157512575135751457515575165751757518575195752057521575225752357524575255752657527575285752957530575315753257533575345753557536575375753857539575405754157542575435754457545575465754757548575495755057551575525755357554575555755657557575585755957560575615756257563575645756557566575675756857569575705757157572575735757457575575765757757578575795758057581575825758357584575855758657587575885758957590575915759257593575945759557596575975759857599576005760157602576035760457605576065760757608576095761057611576125761357614576155761657617576185761957620576215762257623576245762557626576275762857629576305763157632576335763457635576365763757638576395764057641576425764357644576455764657647576485764957650576515765257653576545765557656576575765857659576605766157662576635766457665576665766757668576695767057671576725767357674576755767657677576785767957680576815768257683576845768557686576875768857689576905769157692576935769457695576965769757698576995770057701577025770357704577055770657707577085770957710577115771257713577145771557716577175771857719577205772157722577235772457725577265772757728577295773057731577325773357734577355773657737577385773957740577415774257743577445774557746577475774857749577505775157752577535775457755577565775757758577595776057761577625776357764577655776657767577685776957770577715777257773577745777557776577775777857779577805778157782577835778457785577865778757788577895779057791577925779357794577955779657797577985779957800578015780257803578045780557806578075780857809578105781157812578135781457815578165781757818578195782057821578225782357824578255782657827578285782957830578315783257833578345783557836578375783857839578405784157842578435784457845578465784757848578495785057851578525785357854578555785657857578585785957860578615786257863578645786557866578675786857869578705787157872578735787457875578765787757878578795788057881578825788357884578855788657887578885788957890578915789257893578945789557896578975789857899579005790157902579035790457905579065790757908579095791057911579125791357914579155791657917579185791957920579215792257923579245792557926579275792857929579305793157932579335793457935579365793757938579395794057941579425794357944579455794657947579485794957950579515795257953579545795557956579575795857959579605796157962579635796457965579665796757968579695797057971579725797357974579755797657977579785797957980579815798257983579845798557986579875798857989579905799157992579935799457995579965799757998579995800058001580025800358004580055800658007580085800958010580115801258013580145801558016580175801858019580205802158022580235802458025580265802758028580295803058031580325803358034580355803658037580385803958040580415804258043580445804558046580475804858049580505805158052580535805458055580565805758058580595806058061580625806358064580655806658067580685806958070580715807258073580745807558076580775807858079580805808158082580835808458085580865808758088580895809058091580925809358094580955809658097580985809958100581015810258103581045810558106581075810858109581105811158112581135811458115581165811758118581195812058121581225812358124581255812658127581285812958130581315813258133581345813558136581375813858139581405814158142581435814458145581465814758148581495815058151581525815358154581555815658157581585815958160581615816258163581645816558166581675816858169581705817158172581735817458175581765817758178581795818058181581825818358184581855818658187581885818958190581915819258193581945819558196581975819858199582005820158202582035820458205582065820758208582095821058211582125821358214582155821658217582185821958220582215822258223582245822558226582275822858229582305823158232582335823458235582365823758238582395824058241582425824358244582455824658247582485824958250582515825258253582545825558256582575825858259582605826158262582635826458265582665826758268582695827058271582725827358274582755827658277582785827958280582815828258283582845828558286582875828858289582905829158292582935829458295582965829758298582995830058301583025830358304583055830658307583085830958310583115831258313583145831558316583175831858319583205832158322583235832458325583265832758328583295833058331583325833358334583355833658337583385833958340583415834258343583445834558346583475834858349583505835158352583535835458355583565835758358583595836058361583625836358364583655836658367583685836958370583715837258373583745837558376583775837858379583805838158382583835838458385583865838758388583895839058391583925839358394583955839658397583985839958400584015840258403584045840558406584075840858409584105841158412584135841458415584165841758418584195842058421584225842358424584255842658427584285842958430584315843258433584345843558436584375843858439584405844158442584435844458445584465844758448584495845058451584525845358454584555845658457584585845958460584615846258463584645846558466584675846858469584705847158472584735847458475584765847758478584795848058481584825848358484584855848658487584885848958490584915849258493584945849558496584975849858499585005850158502585035850458505585065850758508585095851058511585125851358514585155851658517585185851958520585215852258523585245852558526585275852858529585305853158532585335853458535585365853758538585395854058541585425854358544585455854658547585485854958550585515855258553585545855558556585575855858559585605856158562585635856458565585665856758568585695857058571585725857358574585755857658577585785857958580585815858258583585845858558586585875858858589585905859158592585935859458595585965859758598585995860058601586025860358604586055860658607586085860958610586115861258613586145861558616586175861858619586205862158622586235862458625586265862758628586295863058631586325863358634586355863658637586385863958640586415864258643586445864558646586475864858649586505865158652586535865458655586565865758658586595866058661586625866358664586655866658667586685866958670586715867258673586745867558676586775867858679586805868158682586835868458685586865868758688586895869058691586925869358694586955869658697586985869958700587015870258703587045870558706587075870858709587105871158712587135871458715587165871758718587195872058721587225872358724587255872658727587285872958730587315873258733587345873558736587375873858739587405874158742587435874458745587465874758748587495875058751587525875358754587555875658757587585875958760587615876258763587645876558766587675876858769587705877158772587735877458775587765877758778587795878058781587825878358784587855878658787587885878958790587915879258793587945879558796587975879858799588005880158802588035880458805588065880758808588095881058811588125881358814588155881658817588185881958820588215882258823588245882558826588275882858829588305883158832588335883458835588365883758838588395884058841588425884358844588455884658847588485884958850588515885258853588545885558856588575885858859588605886158862588635886458865588665886758868588695887058871588725887358874588755887658877588785887958880588815888258883588845888558886588875888858889588905889158892588935889458895588965889758898588995890058901589025890358904589055890658907589085890958910589115891258913589145891558916589175891858919589205892158922589235892458925589265892758928589295893058931589325893358934589355893658937589385893958940589415894258943589445894558946589475894858949589505895158952589535895458955589565895758958589595896058961589625896358964589655896658967589685896958970589715897258973589745897558976589775897858979589805898158982589835898458985589865898758988589895899058991589925899358994589955899658997589985899959000590015900259003590045900559006590075900859009590105901159012590135901459015590165901759018590195902059021590225902359024590255902659027590285902959030590315903259033590345903559036590375903859039590405904159042590435904459045590465904759048590495905059051590525905359054590555905659057590585905959060590615906259063590645906559066590675906859069590705907159072590735907459075590765907759078590795908059081590825908359084590855908659087590885908959090590915909259093590945909559096590975909859099591005910159102591035910459105591065910759108591095911059111591125911359114591155911659117591185911959120591215912259123591245912559126591275912859129591305913159132591335913459135591365913759138591395914059141591425914359144591455914659147591485914959150591515915259153591545915559156591575915859159591605916159162591635916459165591665916759168591695917059171591725917359174591755917659177591785917959180591815918259183591845918559186591875918859189591905919159192591935919459195591965919759198591995920059201592025920359204592055920659207592085920959210592115921259213592145921559216592175921859219592205922159222592235922459225592265922759228592295923059231592325923359234592355923659237592385923959240592415924259243592445924559246592475924859249592505925159252592535925459255592565925759258592595926059261592625926359264592655926659267592685926959270592715927259273592745927559276592775927859279592805928159282592835928459285592865928759288592895929059291592925929359294592955929659297592985929959300593015930259303593045930559306593075930859309593105931159312593135931459315593165931759318593195932059321593225932359324593255932659327593285932959330593315933259333593345933559336593375933859339593405934159342593435934459345593465934759348593495935059351593525935359354593555935659357593585935959360593615936259363593645936559366593675936859369593705937159372593735937459375593765937759378593795938059381593825938359384593855938659387593885938959390593915939259393593945939559396593975939859399594005940159402594035940459405594065940759408594095941059411594125941359414594155941659417594185941959420594215942259423594245942559426594275942859429594305943159432594335943459435594365943759438594395944059441594425944359444594455944659447594485944959450594515945259453594545945559456594575945859459594605946159462594635946459465594665946759468594695947059471594725947359474594755947659477594785947959480594815948259483594845948559486594875948859489594905949159492594935949459495594965949759498594995950059501595025950359504595055950659507595085950959510595115951259513595145951559516595175951859519595205952159522595235952459525595265952759528595295953059531595325953359534595355953659537595385953959540595415954259543595445954559546595475954859549595505955159552595535955459555595565955759558595595956059561595625956359564595655956659567595685956959570595715957259573595745957559576595775957859579595805958159582595835958459585595865958759588595895959059591595925959359594595955959659597595985959959600596015960259603596045960559606596075960859609596105961159612596135961459615596165961759618596195962059621596225962359624596255962659627596285962959630596315963259633596345963559636596375963859639596405964159642596435964459645596465964759648596495965059651596525965359654596555965659657596585965959660596615966259663596645966559666596675966859669596705967159672596735967459675596765967759678596795968059681596825968359684596855968659687596885968959690596915969259693596945969559696596975969859699597005970159702597035970459705597065970759708597095971059711597125971359714597155971659717597185971959720597215972259723597245972559726597275972859729597305973159732597335973459735597365973759738597395974059741597425974359744597455974659747597485974959750597515975259753597545975559756597575975859759597605976159762597635976459765597665976759768597695977059771597725977359774597755977659777597785977959780597815978259783597845978559786597875978859789597905979159792597935979459795597965979759798597995980059801598025980359804598055980659807598085980959810598115981259813598145981559816598175981859819598205982159822598235982459825598265982759828598295983059831598325983359834598355983659837598385983959840598415984259843598445984559846598475984859849598505985159852598535985459855598565985759858598595986059861598625986359864598655986659867598685986959870598715987259873598745987559876598775987859879598805988159882598835988459885598865988759888598895989059891598925989359894598955989659897598985989959900599015990259903599045990559906599075990859909599105991159912599135991459915599165991759918599195992059921599225992359924599255992659927599285992959930599315993259933599345993559936599375993859939599405994159942599435994459945599465994759948599495995059951599525995359954599555995659957599585995959960599615996259963599645996559966599675996859969599705997159972599735997459975599765997759978599795998059981599825998359984599855998659987599885998959990599915999259993599945999559996599975999859999600006000160002600036000460005600066000760008600096001060011600126001360014600156001660017600186001960020600216002260023600246002560026600276002860029600306003160032600336003460035600366003760038600396004060041600426004360044600456004660047600486004960050600516005260053600546005560056600576005860059600606006160062600636006460065600666006760068600696007060071600726007360074600756007660077600786007960080600816008260083600846008560086600876008860089600906009160092600936009460095600966009760098600996010060101601026010360104601056010660107601086010960110601116011260113601146011560116601176011860119601206012160122601236012460125601266012760128601296013060131601326013360134601356013660137601386013960140601416014260143601446014560146601476014860149601506015160152601536015460155601566015760158601596016060161601626016360164601656016660167601686016960170601716017260173601746017560176601776017860179601806018160182601836018460185601866018760188601896019060191601926019360194601956019660197601986019960200602016020260203602046020560206602076020860209602106021160212602136021460215602166021760218602196022060221602226022360224602256022660227602286022960230602316023260233602346023560236602376023860239602406024160242602436024460245602466024760248602496025060251602526025360254602556025660257602586025960260602616026260263602646026560266602676026860269602706027160272602736027460275602766027760278602796028060281602826028360284602856028660287602886028960290602916029260293602946029560296602976029860299603006030160302603036030460305603066030760308603096031060311603126031360314603156031660317603186031960320603216032260323603246032560326603276032860329603306033160332603336033460335603366033760338603396034060341603426034360344603456034660347603486034960350603516035260353603546035560356603576035860359603606036160362603636036460365603666036760368603696037060371603726037360374603756037660377603786037960380603816038260383603846038560386603876038860389603906039160392603936039460395603966039760398603996040060401604026040360404604056040660407604086040960410604116041260413604146041560416604176041860419604206042160422604236042460425604266042760428604296043060431604326043360434604356043660437604386043960440604416044260443604446044560446604476044860449604506045160452604536045460455604566045760458604596046060461604626046360464604656046660467604686046960470604716047260473604746047560476604776047860479604806048160482604836048460485604866048760488604896049060491604926049360494604956049660497604986049960500605016050260503605046050560506605076050860509605106051160512605136051460515605166051760518605196052060521605226052360524605256052660527605286052960530605316053260533605346053560536605376053860539605406054160542605436054460545605466054760548605496055060551605526055360554605556055660557605586055960560605616056260563605646056560566605676056860569605706057160572605736057460575605766057760578605796058060581605826058360584605856058660587605886058960590605916059260593605946059560596605976059860599606006060160602606036060460605606066060760608606096061060611606126061360614606156061660617606186061960620606216062260623606246062560626606276062860629606306063160632606336063460635606366063760638606396064060641606426064360644606456064660647606486064960650606516065260653606546065560656606576065860659606606066160662606636066460665606666066760668606696067060671606726067360674606756067660677606786067960680606816068260683606846068560686606876068860689606906069160692606936069460695606966069760698606996070060701607026070360704607056070660707607086070960710607116071260713607146071560716607176071860719607206072160722607236072460725607266072760728607296073060731607326073360734607356073660737607386073960740607416074260743607446074560746607476074860749607506075160752607536075460755607566075760758607596076060761607626076360764607656076660767607686076960770607716077260773607746077560776607776077860779607806078160782607836078460785607866078760788607896079060791607926079360794607956079660797607986079960800608016080260803608046080560806608076080860809608106081160812608136081460815608166081760818608196082060821608226082360824608256082660827608286082960830608316083260833608346083560836608376083860839608406084160842608436084460845608466084760848608496085060851608526085360854608556085660857608586085960860608616086260863608646086560866608676086860869608706087160872608736087460875608766087760878608796088060881608826088360884608856088660887608886088960890608916089260893608946089560896608976089860899609006090160902609036090460905609066090760908609096091060911609126091360914609156091660917609186091960920609216092260923609246092560926609276092860929609306093160932609336093460935609366093760938609396094060941609426094360944609456094660947609486094960950609516095260953609546095560956609576095860959609606096160962609636096460965609666096760968609696097060971609726097360974609756097660977609786097960980609816098260983609846098560986609876098860989609906099160992609936099460995609966099760998609996100061001610026100361004610056100661007610086100961010610116101261013610146101561016610176101861019610206102161022610236102461025610266102761028610296103061031610326103361034610356103661037610386103961040610416104261043610446104561046610476104861049610506105161052610536105461055610566105761058610596106061061610626106361064610656106661067610686106961070610716107261073610746107561076610776107861079610806108161082610836108461085610866108761088610896109061091610926109361094610956109661097610986109961100611016110261103611046110561106611076110861109611106111161112611136111461115611166111761118611196112061121611226112361124611256112661127611286112961130611316113261133611346113561136611376113861139611406114161142611436114461145611466114761148611496115061151611526115361154611556115661157611586115961160611616116261163611646116561166611676116861169611706117161172611736117461175611766117761178611796118061181611826118361184611856118661187611886118961190611916119261193611946119561196611976119861199612006120161202612036120461205612066120761208612096121061211612126121361214612156121661217612186121961220612216122261223612246122561226612276122861229612306123161232612336123461235612366123761238612396124061241612426124361244612456124661247612486124961250612516125261253612546125561256612576125861259612606126161262612636126461265612666126761268612696127061271612726127361274612756127661277612786127961280612816128261283612846128561286612876128861289612906129161292612936129461295612966129761298612996130061301613026130361304613056130661307613086130961310613116131261313613146131561316613176131861319613206132161322613236132461325613266132761328613296133061331613326133361334613356133661337613386133961340613416134261343613446134561346613476134861349613506135161352613536135461355613566135761358613596136061361613626136361364613656136661367613686136961370613716137261373613746137561376613776137861379613806138161382613836138461385613866138761388613896139061391613926139361394613956139661397613986139961400614016140261403614046140561406614076140861409614106141161412614136141461415614166141761418614196142061421614226142361424614256142661427614286142961430614316143261433614346143561436614376143861439614406144161442614436144461445614466144761448614496145061451614526145361454614556145661457614586145961460614616146261463614646146561466614676146861469614706147161472614736147461475614766147761478614796148061481614826148361484614856148661487614886148961490614916149261493614946149561496614976149861499615006150161502615036150461505615066150761508615096151061511615126151361514615156151661517615186151961520615216152261523615246152561526615276152861529615306153161532615336153461535615366153761538615396154061541615426154361544615456154661547615486154961550615516155261553615546155561556615576155861559615606156161562615636156461565615666156761568615696157061571615726157361574615756157661577615786157961580615816158261583615846158561586615876158861589615906159161592615936159461595615966159761598615996160061601616026160361604616056160661607616086160961610616116161261613616146161561616616176161861619616206162161622616236162461625616266162761628616296163061631616326163361634616356163661637616386163961640616416164261643616446164561646616476164861649616506165161652616536165461655616566165761658616596166061661616626166361664616656166661667616686166961670616716167261673616746167561676616776167861679616806168161682616836168461685616866168761688616896169061691616926169361694616956169661697616986169961700617016170261703617046170561706617076170861709617106171161712617136171461715617166171761718617196172061721617226172361724617256172661727617286172961730617316173261733617346173561736617376173861739617406174161742617436174461745617466174761748617496175061751617526175361754617556175661757617586175961760617616176261763617646176561766617676176861769617706177161772617736177461775617766177761778617796178061781617826178361784617856178661787617886178961790617916179261793617946179561796617976179861799618006180161802618036180461805618066180761808618096181061811618126181361814618156181661817618186181961820618216182261823618246182561826618276182861829618306183161832618336183461835618366183761838618396184061841618426184361844618456184661847618486184961850618516185261853618546185561856618576185861859618606186161862618636186461865618666186761868618696187061871618726187361874618756187661877618786187961880618816188261883618846188561886618876188861889618906189161892618936189461895618966189761898618996190061901619026190361904619056190661907619086190961910619116191261913619146191561916619176191861919619206192161922619236192461925619266192761928619296193061931619326193361934619356193661937619386193961940619416194261943619446194561946619476194861949619506195161952619536195461955619566195761958619596196061961619626196361964619656196661967619686196961970619716197261973619746197561976619776197861979619806198161982619836198461985619866198761988619896199061991619926199361994619956199661997619986199962000620016200262003620046200562006620076200862009620106201162012620136201462015620166201762018620196202062021620226202362024620256202662027620286202962030620316203262033620346203562036620376203862039620406204162042620436204462045620466204762048620496205062051620526205362054620556205662057620586205962060620616206262063620646206562066620676206862069620706207162072620736207462075620766207762078620796208062081620826208362084620856208662087620886208962090620916209262093620946209562096620976209862099621006210162102621036210462105621066210762108621096211062111621126211362114621156211662117621186211962120621216212262123621246212562126621276212862129621306213162132621336213462135621366213762138621396214062141621426214362144621456214662147621486214962150621516215262153621546215562156621576215862159621606216162162621636216462165621666216762168621696217062171621726217362174621756217662177621786217962180621816218262183621846218562186621876218862189621906219162192621936219462195621966219762198621996220062201622026220362204622056220662207622086220962210622116221262213622146221562216622176221862219622206222162222622236222462225622266222762228622296223062231622326223362234622356223662237622386223962240622416224262243622446224562246622476224862249622506225162252622536225462255622566225762258622596226062261622626226362264622656226662267622686226962270622716227262273622746227562276622776227862279622806228162282622836228462285622866228762288622896229062291622926229362294622956229662297622986229962300623016230262303623046230562306623076230862309623106231162312623136231462315623166231762318623196232062321623226232362324623256232662327623286232962330623316233262333623346233562336623376233862339623406234162342623436234462345623466234762348623496235062351623526235362354623556235662357623586235962360623616236262363623646236562366623676236862369623706237162372623736237462375623766237762378623796238062381623826238362384623856238662387623886238962390623916239262393623946239562396623976239862399624006240162402624036240462405624066240762408624096241062411624126241362414624156241662417624186241962420624216242262423624246242562426624276242862429624306243162432624336243462435624366243762438624396244062441624426244362444624456244662447624486244962450624516245262453624546245562456624576245862459624606246162462624636246462465624666246762468624696247062471624726247362474624756247662477624786247962480624816248262483624846248562486624876248862489624906249162492624936249462495624966249762498624996250062501625026250362504625056250662507625086250962510625116251262513625146251562516625176251862519625206252162522625236252462525625266252762528625296253062531625326253362534625356253662537625386253962540625416254262543625446254562546625476254862549625506255162552625536255462555625566255762558625596256062561625626256362564625656256662567625686256962570625716257262573625746257562576625776257862579625806258162582625836258462585625866258762588625896259062591625926259362594625956259662597625986259962600626016260262603626046260562606626076260862609626106261162612626136261462615626166261762618626196262062621626226262362624626256262662627626286262962630626316263262633626346263562636626376263862639626406264162642626436264462645626466264762648626496265062651626526265362654626556265662657626586265962660626616266262663626646266562666626676266862669626706267162672626736267462675626766267762678626796268062681626826268362684626856268662687626886268962690626916269262693626946269562696626976269862699627006270162702627036270462705627066270762708627096271062711627126271362714627156271662717627186271962720627216272262723627246272562726627276272862729627306273162732627336273462735627366273762738627396274062741627426274362744627456274662747627486274962750627516275262753627546275562756627576275862759627606276162762627636276462765627666276762768627696277062771627726277362774627756277662777627786277962780627816278262783627846278562786627876278862789627906279162792627936279462795627966279762798627996280062801628026280362804628056280662807628086280962810628116281262813628146281562816628176281862819628206282162822628236282462825628266282762828628296283062831628326283362834628356283662837628386283962840628416284262843628446284562846628476284862849628506285162852628536285462855628566285762858628596286062861628626286362864628656286662867628686286962870628716287262873628746287562876628776287862879628806288162882628836288462885628866288762888628896289062891628926289362894628956289662897628986289962900629016290262903629046290562906629076290862909629106291162912629136291462915629166291762918629196292062921629226292362924629256292662927629286292962930629316293262933629346293562936629376293862939629406294162942629436294462945629466294762948629496295062951629526295362954629556295662957629586295962960629616296262963629646296562966629676296862969629706297162972629736297462975629766297762978629796298062981629826298362984629856298662987629886298962990629916299262993629946299562996629976299862999630006300163002630036300463005630066300763008630096301063011630126301363014630156301663017630186301963020630216302263023630246302563026630276302863029630306303163032630336303463035630366303763038630396304063041630426304363044630456304663047630486304963050630516305263053630546305563056630576305863059630606306163062630636306463065630666306763068630696307063071630726307363074630756307663077630786307963080630816308263083630846308563086630876308863089630906309163092630936309463095630966309763098630996310063101631026310363104631056310663107631086310963110631116311263113631146311563116631176311863119631206312163122631236312463125631266312763128631296313063131631326313363134631356313663137631386313963140631416314263143631446314563146631476314863149631506315163152631536315463155631566315763158631596316063161631626316363164631656316663167631686316963170631716317263173631746317563176631776317863179631806318163182631836318463185631866318763188631896319063191631926319363194631956319663197631986319963200632016320263203632046320563206632076320863209632106321163212632136321463215632166321763218632196322063221632226322363224632256322663227632286322963230632316323263233632346323563236632376323863239632406324163242632436324463245632466324763248632496325063251632526325363254632556325663257632586325963260632616326263263632646326563266632676326863269632706327163272632736327463275632766327763278632796328063281632826328363284632856328663287632886328963290632916329263293632946329563296632976329863299633006330163302633036330463305633066330763308633096331063311633126331363314633156331663317633186331963320633216332263323633246332563326633276332863329633306333163332633336333463335633366333763338633396334063341633426334363344633456334663347633486334963350633516335263353633546335563356633576335863359633606336163362633636336463365633666336763368633696337063371633726337363374633756337663377633786337963380633816338263383633846338563386633876338863389633906339163392633936339463395633966339763398633996340063401634026340363404634056340663407634086340963410634116341263413634146341563416634176341863419634206342163422634236342463425634266342763428634296343063431634326343363434634356343663437634386343963440634416344263443634446344563446634476344863449634506345163452634536345463455634566345763458634596346063461634626346363464634656346663467634686346963470634716347263473634746347563476634776347863479634806348163482634836348463485634866348763488634896349063491634926349363494634956349663497634986349963500635016350263503635046350563506635076350863509635106351163512635136351463515635166351763518635196352063521635226352363524635256352663527635286352963530635316353263533635346353563536635376353863539635406354163542635436354463545635466354763548635496355063551635526355363554635556355663557635586355963560635616356263563635646356563566635676356863569635706357163572635736357463575635766357763578635796358063581635826358363584635856358663587635886358963590635916359263593635946359563596635976359863599636006360163602636036360463605636066360763608636096361063611636126361363614636156361663617636186361963620636216362263623636246362563626636276362863629636306363163632636336363463635636366363763638636396364063641636426364363644636456364663647636486364963650636516365263653636546365563656636576365863659636606366163662636636366463665636666366763668636696367063671636726367363674636756367663677636786367963680636816368263683636846368563686636876368863689636906369163692636936369463695636966369763698636996370063701637026370363704637056370663707637086370963710637116371263713637146371563716637176371863719637206372163722637236372463725637266372763728637296373063731637326373363734637356373663737637386373963740637416374263743637446374563746637476374863749637506375163752637536375463755637566375763758637596376063761637626376363764637656376663767637686376963770637716377263773637746377563776637776377863779637806378163782637836378463785637866378763788637896379063791637926379363794637956379663797637986379963800638016380263803638046380563806638076380863809638106381163812638136381463815638166381763818638196382063821638226382363824638256382663827638286382963830638316383263833638346383563836638376383863839638406384163842638436384463845638466384763848638496385063851638526385363854638556385663857638586385963860638616386263863638646386563866638676386863869638706387163872638736387463875638766387763878638796388063881638826388363884638856388663887638886388963890638916389263893638946389563896638976389863899639006390163902639036390463905639066390763908639096391063911639126391363914639156391663917639186391963920639216392263923639246392563926639276392863929639306393163932639336393463935639366393763938639396394063941639426394363944639456394663947639486394963950639516395263953639546395563956639576395863959639606396163962639636396463965639666396763968639696397063971639726397363974639756397663977639786397963980639816398263983639846398563986639876398863989639906399163992639936399463995639966399763998639996400064001640026400364004640056400664007640086400964010640116401264013640146401564016640176401864019640206402164022640236402464025640266402764028640296403064031640326403364034640356403664037640386403964040640416404264043640446404564046640476404864049640506405164052640536405464055640566405764058640596406064061640626406364064640656406664067640686406964070640716407264073640746407564076640776407864079640806408164082640836408464085640866408764088640896409064091640926409364094640956409664097640986409964100641016410264103641046410564106641076410864109641106411164112641136411464115641166411764118641196412064121641226412364124641256412664127641286412964130641316413264133641346413564136641376413864139641406414164142641436414464145641466414764148641496415064151641526415364154641556415664157641586415964160641616416264163641646416564166641676416864169641706417164172641736417464175641766417764178641796418064181641826418364184641856418664187641886418964190641916419264193641946419564196641976419864199642006420164202642036420464205642066420764208642096421064211642126421364214642156421664217642186421964220642216422264223642246422564226642276422864229642306423164232642336423464235642366423764238642396424064241642426424364244642456424664247642486424964250642516425264253642546425564256642576425864259642606426164262642636426464265642666426764268642696427064271642726427364274642756427664277642786427964280642816428264283642846428564286642876428864289642906429164292642936429464295642966429764298642996430064301643026430364304643056430664307643086430964310643116431264313643146431564316643176431864319643206432164322643236432464325643266432764328643296433064331643326433364334643356433664337643386433964340643416434264343643446434564346643476434864349643506435164352643536435464355643566435764358643596436064361643626436364364643656436664367643686436964370643716437264373643746437564376643776437864379643806438164382643836438464385643866438764388643896439064391643926439364394643956439664397643986439964400644016440264403644046440564406644076440864409644106441164412644136441464415644166441764418644196442064421644226442364424644256442664427644286442964430644316443264433644346443564436644376443864439644406444164442644436444464445644466444764448644496445064451644526445364454644556445664457644586445964460644616446264463644646446564466644676446864469644706447164472644736447464475644766447764478644796448064481644826448364484644856448664487644886448964490644916449264493644946449564496644976449864499645006450164502645036450464505645066450764508645096451064511645126451364514645156451664517645186451964520645216452264523645246452564526645276452864529645306453164532645336453464535645366453764538645396454064541645426454364544645456454664547645486454964550645516455264553645546455564556645576455864559645606456164562645636456464565645666456764568645696457064571645726457364574645756457664577645786457964580645816458264583645846458564586645876458864589645906459164592645936459464595645966459764598645996460064601646026460364604646056460664607646086460964610646116461264613646146461564616646176461864619646206462164622646236462464625646266462764628646296463064631646326463364634646356463664637646386463964640646416464264643646446464564646646476464864649646506465164652646536465464655646566465764658646596466064661646626466364664646656466664667646686466964670646716467264673646746467564676646776467864679646806468164682646836468464685646866468764688646896469064691646926469364694646956469664697646986469964700647016470264703647046470564706647076470864709647106471164712647136471464715647166471764718647196472064721647226472364724647256472664727647286472964730647316473264733647346473564736647376473864739647406474164742647436474464745647466474764748647496475064751647526475364754647556475664757647586475964760647616476264763647646476564766647676476864769647706477164772647736477464775647766477764778647796478064781647826478364784647856478664787647886478964790647916479264793647946479564796647976479864799648006480164802648036480464805648066480764808648096481064811648126481364814648156481664817648186481964820648216482264823648246482564826648276482864829648306483164832648336483464835648366483764838648396484064841648426484364844648456484664847648486484964850648516485264853648546485564856648576485864859648606486164862648636486464865648666486764868648696487064871648726487364874648756487664877648786487964880648816488264883648846488564886648876488864889648906489164892648936489464895648966489764898648996490064901649026490364904649056490664907649086490964910649116491264913649146491564916649176491864919649206492164922649236492464925649266492764928649296493064931649326493364934649356493664937649386493964940649416494264943649446494564946649476494864949649506495164952649536495464955649566495764958649596496064961649626496364964649656496664967649686496964970649716497264973649746497564976649776497864979649806498164982649836498464985649866498764988649896499064991649926499364994649956499664997649986499965000650016500265003650046500565006650076500865009650106501165012650136501465015650166501765018650196502065021650226502365024650256502665027650286502965030650316503265033650346503565036650376503865039650406504165042650436504465045650466504765048650496505065051650526505365054650556505665057650586505965060650616506265063650646506565066650676506865069650706507165072650736507465075650766507765078650796508065081650826508365084650856508665087650886508965090650916509265093650946509565096650976509865099651006510165102651036510465105651066510765108651096511065111651126511365114651156511665117651186511965120651216512265123651246512565126651276512865129651306513165132651336513465135651366513765138651396514065141651426514365144651456514665147651486514965150651516515265153651546515565156651576515865159651606516165162651636516465165651666516765168651696517065171651726517365174651756517665177651786517965180651816518265183651846518565186651876518865189651906519165192651936519465195651966519765198651996520065201652026520365204652056520665207652086520965210652116521265213652146521565216652176521865219652206522165222652236522465225652266522765228652296523065231652326523365234652356523665237652386523965240652416524265243652446524565246652476524865249652506525165252652536525465255652566525765258652596526065261652626526365264652656526665267652686526965270652716527265273652746527565276652776527865279652806528165282652836528465285652866528765288652896529065291652926529365294652956529665297652986529965300653016530265303653046530565306653076530865309653106531165312653136531465315653166531765318653196532065321653226532365324653256532665327653286532965330653316533265333653346533565336653376533865339653406534165342653436534465345653466534765348653496535065351653526535365354653556535665357653586535965360653616536265363653646536565366653676536865369653706537165372653736537465375653766537765378653796538065381653826538365384653856538665387653886538965390653916539265393653946539565396653976539865399654006540165402654036540465405654066540765408654096541065411654126541365414654156541665417654186541965420654216542265423654246542565426654276542865429654306543165432654336543465435654366543765438654396544065441654426544365444654456544665447654486544965450654516545265453654546545565456654576545865459654606546165462654636546465465654666546765468654696547065471654726547365474654756547665477654786547965480654816548265483654846548565486654876548865489654906549165492654936549465495654966549765498654996550065501655026550365504655056550665507655086550965510655116551265513655146551565516655176551865519655206552165522655236552465525655266552765528655296553065531655326553365534655356553665537655386553965540655416554265543655446554565546655476554865549655506555165552655536555465555655566555765558655596556065561655626556365564655656556665567655686556965570655716557265573655746557565576655776557865579655806558165582655836558465585655866558765588655896559065591655926559365594655956559665597655986559965600656016560265603656046560565606656076560865609656106561165612656136561465615656166561765618656196562065621656226562365624656256562665627656286562965630656316563265633656346563565636656376563865639656406564165642656436564465645656466564765648656496565065651656526565365654656556565665657656586565965660656616566265663656646566565666656676566865669656706567165672656736567465675656766567765678656796568065681656826568365684656856568665687656886568965690656916569265693656946569565696656976569865699657006570165702657036570465705657066570765708657096571065711657126571365714657156571665717657186571965720657216572265723657246572565726657276572865729657306573165732657336573465735657366573765738657396574065741657426574365744657456574665747657486574965750657516575265753657546575565756657576575865759657606576165762657636576465765657666576765768657696577065771657726577365774657756577665777657786577965780657816578265783657846578565786657876578865789657906579165792657936579465795657966579765798657996580065801658026580365804658056580665807658086580965810658116581265813658146581565816658176581865819658206582165822658236582465825658266582765828658296583065831658326583365834658356583665837658386583965840658416584265843658446584565846658476584865849658506585165852658536585465855658566585765858658596586065861658626586365864658656586665867658686586965870658716587265873658746587565876658776587865879658806588165882658836588465885658866588765888658896589065891658926589365894658956589665897658986589965900659016590265903659046590565906659076590865909659106591165912659136591465915659166591765918659196592065921659226592365924659256592665927659286592965930659316593265933659346593565936659376593865939659406594165942659436594465945659466594765948659496595065951659526595365954659556595665957659586595965960659616596265963659646596565966659676596865969659706597165972659736597465975659766597765978659796598065981659826598365984659856598665987659886598965990659916599265993659946599565996659976599865999660006600166002660036600466005660066600766008660096601066011660126601366014660156601666017660186601966020660216602266023660246602566026660276602866029660306603166032660336603466035660366603766038660396604066041660426604366044660456604666047660486604966050660516605266053660546605566056660576605866059660606606166062660636606466065660666606766068660696607066071660726607366074660756607666077660786607966080660816608266083660846608566086660876608866089660906609166092660936609466095660966609766098660996610066101661026610366104661056610666107661086610966110661116611266113661146611566116661176611866119661206612166122661236612466125661266612766128661296613066131661326613366134661356613666137661386613966140661416614266143661446614566146661476614866149661506615166152661536615466155661566615766158661596616066161661626616366164661656616666167661686616966170661716617266173661746617566176661776617866179661806618166182661836618466185661866618766188661896619066191661926619366194661956619666197661986619966200662016620266203662046620566206662076620866209662106621166212662136621466215662166621766218662196622066221662226622366224662256622666227662286622966230662316623266233662346623566236662376623866239662406624166242662436624466245662466624766248662496625066251662526625366254662556625666257662586625966260662616626266263662646626566266662676626866269662706627166272662736627466275662766627766278662796628066281662826628366284662856628666287662886628966290662916629266293662946629566296662976629866299663006630166302663036630466305663066630766308663096631066311663126631366314663156631666317663186631966320663216632266323663246632566326663276632866329663306633166332663336633466335663366633766338663396634066341663426634366344663456634666347663486634966350663516635266353663546635566356663576635866359663606636166362663636636466365663666636766368663696637066371663726637366374663756637666377663786637966380663816638266383663846638566386663876638866389663906639166392663936639466395663966639766398663996640066401664026640366404664056640666407664086640966410664116641266413664146641566416664176641866419664206642166422664236642466425664266642766428664296643066431664326643366434664356643666437664386643966440664416644266443664446644566446664476644866449664506645166452664536645466455664566645766458664596646066461664626646366464664656646666467664686646966470664716647266473664746647566476664776647866479664806648166482664836648466485664866648766488664896649066491664926649366494664956649666497664986649966500665016650266503665046650566506665076650866509665106651166512665136651466515665166651766518665196652066521665226652366524665256652666527665286652966530665316653266533665346653566536665376653866539665406654166542665436654466545665466654766548665496655066551665526655366554665556655666557665586655966560665616656266563665646656566566665676656866569665706657166572665736657466575665766657766578665796658066581665826658366584665856658666587665886658966590665916659266593665946659566596665976659866599666006660166602666036660466605666066660766608666096661066611666126661366614666156661666617666186661966620666216662266623666246662566626666276662866629666306663166632666336663466635666366663766638666396664066641666426664366644666456664666647666486664966650666516665266653666546665566656666576665866659666606666166662666636666466665666666666766668666696667066671666726667366674666756667666677666786667966680666816668266683666846668566686666876668866689666906669166692666936669466695666966669766698666996670066701667026670366704667056670666707667086670966710667116671266713667146671566716667176671866719667206672166722667236672466725667266672766728667296673066731667326673366734667356673666737667386673966740667416674266743667446674566746667476674866749667506675166752667536675466755667566675766758667596676066761667626676366764667656676666767667686676966770667716677266773667746677566776667776677866779667806678166782667836678466785667866678766788667896679066791667926679366794667956679666797667986679966800668016680266803668046680566806668076680866809668106681166812668136681466815668166681766818668196682066821668226682366824668256682666827668286682966830668316683266833668346683566836668376683866839668406684166842668436684466845668466684766848668496685066851668526685366854668556685666857668586685966860668616686266863668646686566866668676686866869668706687166872668736687466875668766687766878668796688066881668826688366884668856688666887668886688966890668916689266893668946689566896668976689866899669006690166902669036690466905669066690766908669096691066911669126691366914669156691666917669186691966920669216692266923669246692566926669276692866929669306693166932669336693466935669366693766938669396694066941669426694366944669456694666947669486694966950669516695266953669546695566956669576695866959669606696166962669636696466965669666696766968669696697066971669726697366974669756697666977669786697966980669816698266983669846698566986669876698866989669906699166992669936699466995669966699766998669996700067001670026700367004670056700667007670086700967010670116701267013670146701567016670176701867019670206702167022670236702467025670266702767028670296703067031670326703367034670356703667037670386703967040670416704267043670446704567046670476704867049670506705167052670536705467055670566705767058670596706067061670626706367064670656706667067670686706967070670716707267073670746707567076670776707867079670806708167082670836708467085670866708767088670896709067091670926709367094670956709667097670986709967100671016710267103671046710567106671076710867109671106711167112671136711467115671166711767118671196712067121671226712367124671256712667127671286712967130671316713267133671346713567136671376713867139671406714167142671436714467145671466714767148671496715067151671526715367154671556715667157671586715967160671616716267163671646716567166671676716867169671706717167172671736717467175671766717767178671796718067181671826718367184671856718667187671886718967190671916719267193671946719567196671976719867199672006720167202672036720467205672066720767208672096721067211672126721367214672156721667217672186721967220672216722267223672246722567226672276722867229672306723167232672336723467235672366723767238672396724067241672426724367244672456724667247672486724967250672516725267253672546725567256672576725867259672606726167262672636726467265672666726767268672696727067271672726727367274672756727667277672786727967280672816728267283672846728567286672876728867289672906729167292672936729467295672966729767298672996730067301673026730367304673056730667307673086730967310673116731267313673146731567316673176731867319673206732167322673236732467325673266732767328673296733067331673326733367334673356733667337673386733967340673416734267343673446734567346673476734867349673506735167352673536735467355673566735767358673596736067361673626736367364673656736667367673686736967370673716737267373673746737567376673776737867379673806738167382673836738467385673866738767388673896739067391673926739367394673956739667397673986739967400674016740267403674046740567406674076740867409674106741167412674136741467415674166741767418674196742067421674226742367424674256742667427674286742967430674316743267433674346743567436674376743867439674406744167442674436744467445674466744767448674496745067451674526745367454674556745667457674586745967460674616746267463674646746567466674676746867469674706747167472674736747467475674766747767478674796748067481674826748367484674856748667487674886748967490674916749267493674946749567496674976749867499675006750167502675036750467505675066750767508675096751067511675126751367514675156751667517675186751967520675216752267523675246752567526675276752867529675306753167532675336753467535675366753767538675396754067541675426754367544675456754667547675486754967550675516755267553675546755567556675576755867559675606756167562675636756467565675666756767568675696757067571675726757367574675756757667577675786757967580675816758267583675846758567586675876758867589675906759167592675936759467595675966759767598675996760067601676026760367604676056760667607676086760967610676116761267613676146761567616676176761867619676206762167622676236762467625676266762767628676296763067631676326763367634676356763667637676386763967640676416764267643676446764567646676476764867649676506765167652676536765467655676566765767658676596766067661676626766367664676656766667667676686766967670676716767267673676746767567676676776767867679676806768167682676836768467685676866768767688676896769067691676926769367694676956769667697676986769967700677016770267703677046770567706677076770867709677106771167712677136771467715677166771767718677196772067721677226772367724677256772667727677286772967730677316773267733677346773567736677376773867739677406774167742677436774467745677466774767748677496775067751677526775367754677556775667757677586775967760677616776267763677646776567766677676776867769677706777167772677736777467775677766777767778677796778067781677826778367784677856778667787677886778967790677916779267793677946779567796677976779867799678006780167802678036780467805678066780767808678096781067811678126781367814678156781667817678186781967820678216782267823678246782567826678276782867829678306783167832678336783467835678366783767838678396784067841678426784367844678456784667847678486784967850678516785267853678546785567856678576785867859678606786167862678636786467865678666786767868678696787067871678726787367874678756787667877678786787967880678816788267883678846788567886678876788867889678906789167892678936789467895678966789767898678996790067901679026790367904679056790667907679086790967910679116791267913679146791567916679176791867919679206792167922679236792467925679266792767928679296793067931679326793367934679356793667937679386793967940679416794267943679446794567946679476794867949679506795167952679536795467955679566795767958679596796067961679626796367964679656796667967679686796967970679716797267973679746797567976679776797867979679806798167982679836798467985679866798767988679896799067991679926799367994679956799667997679986799968000680016800268003680046800568006680076800868009680106801168012680136801468015680166801768018680196802068021680226802368024680256802668027680286802968030680316803268033680346803568036680376803868039680406804168042680436804468045680466804768048680496805068051680526805368054680556805668057680586805968060680616806268063680646806568066680676806868069680706807168072680736807468075680766807768078680796808068081680826808368084680856808668087680886808968090680916809268093680946809568096680976809868099681006810168102681036810468105681066810768108681096811068111681126811368114681156811668117681186811968120681216812268123681246812568126681276812868129681306813168132681336813468135681366813768138681396814068141681426814368144681456814668147681486814968150681516815268153681546815568156681576815868159681606816168162681636816468165681666816768168681696817068171681726817368174681756817668177681786817968180681816818268183681846818568186681876818868189681906819168192681936819468195681966819768198681996820068201682026820368204682056820668207682086820968210682116821268213682146821568216682176821868219682206822168222682236822468225682266822768228682296823068231682326823368234682356823668237682386823968240682416824268243682446824568246682476824868249682506825168252682536825468255682566825768258682596826068261682626826368264682656826668267682686826968270682716827268273682746827568276682776827868279682806828168282682836828468285682866828768288682896829068291682926829368294682956829668297682986829968300683016830268303683046830568306683076830868309683106831168312683136831468315683166831768318683196832068321683226832368324683256832668327683286832968330683316833268333683346833568336683376833868339683406834168342683436834468345683466834768348683496835068351683526835368354683556835668357683586835968360683616836268363683646836568366683676836868369683706837168372683736837468375683766837768378683796838068381683826838368384683856838668387683886838968390683916839268393683946839568396683976839868399684006840168402684036840468405684066840768408684096841068411684126841368414684156841668417684186841968420684216842268423684246842568426684276842868429684306843168432684336843468435684366843768438684396844068441684426844368444684456844668447684486844968450684516845268453684546845568456684576845868459684606846168462684636846468465684666846768468684696847068471684726847368474684756847668477684786847968480684816848268483684846848568486684876848868489684906849168492684936849468495684966849768498684996850068501685026850368504685056850668507685086850968510685116851268513685146851568516685176851868519685206852168522685236852468525685266852768528685296853068531685326853368534685356853668537685386853968540685416854268543685446854568546685476854868549685506855168552685536855468555685566855768558685596856068561685626856368564685656856668567685686856968570685716857268573685746857568576685776857868579685806858168582685836858468585685866858768588685896859068591685926859368594685956859668597685986859968600686016860268603686046860568606686076860868609686106861168612686136861468615686166861768618686196862068621686226862368624686256862668627686286862968630686316863268633686346863568636686376863868639686406864168642686436864468645686466864768648686496865068651686526865368654686556865668657686586865968660686616866268663686646866568666686676866868669686706867168672686736867468675686766867768678686796868068681686826868368684686856868668687686886868968690686916869268693686946869568696686976869868699687006870168702687036870468705687066870768708687096871068711687126871368714687156871668717687186871968720687216872268723687246872568726687276872868729687306873168732687336873468735687366873768738687396874068741687426874368744687456874668747687486874968750687516875268753687546875568756687576875868759687606876168762687636876468765687666876768768687696877068771687726877368774687756877668777687786877968780687816878268783687846878568786687876878868789687906879168792687936879468795687966879768798687996880068801688026880368804688056880668807688086880968810688116881268813688146881568816688176881868819688206882168822688236882468825688266882768828688296883068831688326883368834688356883668837688386883968840688416884268843688446884568846688476884868849688506885168852688536885468855688566885768858688596886068861688626886368864688656886668867688686886968870688716887268873688746887568876688776887868879688806888168882688836888468885688866888768888688896889068891688926889368894688956889668897688986889968900689016890268903689046890568906689076890868909689106891168912689136891468915689166891768918689196892068921689226892368924689256892668927689286892968930689316893268933689346893568936689376893868939689406894168942689436894468945689466894768948689496895068951689526895368954689556895668957689586895968960689616896268963689646896568966689676896868969689706897168972689736897468975689766897768978689796898068981689826898368984689856898668987689886898968990689916899268993689946899568996689976899868999690006900169002690036900469005690066900769008690096901069011690126901369014690156901669017690186901969020690216902269023690246902569026690276902869029690306903169032690336903469035690366903769038690396904069041690426904369044690456904669047690486904969050690516905269053690546905569056690576905869059690606906169062690636906469065690666906769068690696907069071690726907369074690756907669077690786907969080690816908269083690846908569086690876908869089690906909169092690936909469095690966909769098690996910069101691026910369104691056910669107691086910969110691116911269113691146911569116691176911869119691206912169122691236912469125691266912769128691296913069131691326913369134691356913669137691386913969140691416914269143691446914569146691476914869149691506915169152691536915469155691566915769158691596916069161691626916369164691656916669167691686916969170691716917269173691746917569176691776917869179691806918169182691836918469185691866918769188691896919069191691926919369194691956919669197691986919969200692016920269203692046920569206692076920869209692106921169212692136921469215692166921769218692196922069221692226922369224692256922669227692286922969230692316923269233692346923569236692376923869239692406924169242692436924469245692466924769248692496925069251692526925369254692556925669257692586925969260692616926269263692646926569266692676926869269692706927169272692736927469275692766927769278692796928069281692826928369284692856928669287692886928969290692916929269293692946929569296692976929869299693006930169302693036930469305693066930769308693096931069311693126931369314693156931669317693186931969320693216932269323693246932569326693276932869329693306933169332693336933469335693366933769338693396934069341693426934369344693456934669347693486934969350693516935269353693546935569356693576935869359693606936169362693636936469365693666936769368693696937069371693726937369374693756937669377693786937969380693816938269383693846938569386693876938869389693906939169392693936939469395693966939769398693996940069401694026940369404694056940669407694086940969410694116941269413694146941569416694176941869419694206942169422694236942469425694266942769428694296943069431694326943369434694356943669437694386943969440694416944269443694446944569446694476944869449694506945169452694536945469455694566945769458694596946069461694626946369464694656946669467694686946969470694716947269473694746947569476694776947869479694806948169482694836948469485694866948769488694896949069491694926949369494694956949669497694986949969500695016950269503695046950569506695076950869509695106951169512695136951469515695166951769518695196952069521695226952369524695256952669527695286952969530695316953269533695346953569536695376953869539695406954169542695436954469545695466954769548695496955069551695526955369554695556955669557695586955969560695616956269563695646956569566695676956869569695706957169572695736957469575695766957769578695796958069581695826958369584695856958669587695886958969590695916959269593695946959569596695976959869599696006960169602696036960469605696066960769608696096961069611696126961369614696156961669617696186961969620696216962269623696246962569626696276962869629696306963169632696336963469635696366963769638696396964069641696426964369644696456964669647696486964969650696516965269653696546965569656696576965869659696606966169662696636966469665696666966769668696696967069671696726967369674696756967669677696786967969680696816968269683696846968569686696876968869689696906969169692696936969469695696966969769698696996970069701697026970369704697056970669707697086970969710697116971269713697146971569716697176971869719697206972169722697236972469725697266972769728697296973069731697326973369734697356973669737697386973969740697416974269743697446974569746697476974869749697506975169752697536975469755697566975769758697596976069761697626976369764697656976669767697686976969770697716977269773697746977569776697776977869779697806978169782697836978469785697866978769788697896979069791697926979369794697956979669797697986979969800698016980269803698046980569806698076980869809698106981169812698136981469815698166981769818698196982069821698226982369824698256982669827698286982969830698316983269833698346983569836698376983869839698406984169842698436984469845698466984769848698496985069851698526985369854698556985669857698586985969860698616986269863698646986569866698676986869869698706987169872698736987469875698766987769878698796988069881698826988369884698856988669887698886988969890698916989269893698946989569896698976989869899699006990169902699036990469905699066990769908699096991069911699126991369914699156991669917699186991969920699216992269923699246992569926699276992869929699306993169932699336993469935699366993769938699396994069941699426994369944699456994669947699486994969950699516995269953699546995569956699576995869959699606996169962699636996469965699666996769968699696997069971699726997369974699756997669977699786997969980699816998269983699846998569986699876998869989699906999169992699936999469995699966999769998699997000070001700027000370004700057000670007700087000970010700117001270013700147001570016700177001870019700207002170022700237002470025700267002770028700297003070031700327003370034700357003670037700387003970040700417004270043700447004570046700477004870049700507005170052700537005470055700567005770058700597006070061700627006370064700657006670067700687006970070700717007270073700747007570076700777007870079700807008170082700837008470085700867008770088700897009070091700927009370094700957009670097700987009970100701017010270103701047010570106701077010870109701107011170112701137011470115701167011770118701197012070121701227012370124701257012670127701287012970130701317013270133701347013570136701377013870139701407014170142701437014470145701467014770148701497015070151701527015370154701557015670157701587015970160701617016270163701647016570166701677016870169701707017170172701737017470175701767017770178701797018070181701827018370184701857018670187701887018970190701917019270193701947019570196701977019870199702007020170202702037020470205702067020770208702097021070211702127021370214702157021670217702187021970220702217022270223702247022570226702277022870229702307023170232702337023470235702367023770238702397024070241702427024370244702457024670247702487024970250702517025270253702547025570256702577025870259702607026170262702637026470265702667026770268702697027070271702727027370274702757027670277702787027970280702817028270283702847028570286702877028870289702907029170292702937029470295702967029770298702997030070301703027030370304703057030670307703087030970310703117031270313703147031570316703177031870319703207032170322703237032470325703267032770328703297033070331703327033370334703357033670337703387033970340703417034270343703447034570346703477034870349703507035170352703537035470355703567035770358703597036070361703627036370364703657036670367703687036970370703717037270373703747037570376703777037870379703807038170382703837038470385703867038770388703897039070391703927039370394703957039670397703987039970400704017040270403704047040570406704077040870409704107041170412704137041470415704167041770418704197042070421704227042370424704257042670427704287042970430704317043270433704347043570436704377043870439704407044170442704437044470445704467044770448704497045070451704527045370454704557045670457704587045970460704617046270463704647046570466704677046870469704707047170472704737047470475704767047770478704797048070481704827048370484704857048670487704887048970490704917049270493704947049570496704977049870499705007050170502705037050470505705067050770508705097051070511705127051370514705157051670517705187051970520705217052270523705247052570526705277052870529705307053170532705337053470535705367053770538705397054070541705427054370544705457054670547705487054970550705517055270553705547055570556705577055870559705607056170562705637056470565705667056770568705697057070571705727057370574705757057670577705787057970580705817058270583705847058570586705877058870589705907059170592705937059470595705967059770598705997060070601706027060370604706057060670607706087060970610706117061270613706147061570616706177061870619706207062170622706237062470625706267062770628706297063070631706327063370634706357063670637706387063970640706417064270643706447064570646706477064870649706507065170652706537065470655706567065770658706597066070661706627066370664706657066670667706687066970670706717067270673706747067570676706777067870679706807068170682706837068470685706867068770688706897069070691706927069370694706957069670697706987069970700707017070270703707047070570706707077070870709707107071170712707137071470715707167071770718707197072070721707227072370724707257072670727707287072970730707317073270733707347073570736707377073870739707407074170742707437074470745707467074770748707497075070751707527075370754707557075670757707587075970760707617076270763707647076570766707677076870769707707077170772707737077470775707767077770778707797078070781707827078370784707857078670787707887078970790707917079270793707947079570796707977079870799708007080170802708037080470805708067080770808708097081070811708127081370814708157081670817708187081970820708217082270823708247082570826708277082870829708307083170832708337083470835708367083770838708397084070841708427084370844708457084670847708487084970850708517085270853708547085570856708577085870859708607086170862708637086470865708667086770868708697087070871708727087370874708757087670877708787087970880708817088270883708847088570886708877088870889708907089170892708937089470895708967089770898708997090070901709027090370904709057090670907709087090970910709117091270913709147091570916709177091870919709207092170922709237092470925709267092770928709297093070931709327093370934709357093670937709387093970940709417094270943709447094570946709477094870949709507095170952709537095470955709567095770958709597096070961709627096370964709657096670967709687096970970709717097270973709747097570976709777097870979709807098170982709837098470985709867098770988709897099070991709927099370994709957099670997709987099971000710017100271003710047100571006710077100871009710107101171012710137101471015710167101771018710197102071021710227102371024710257102671027710287102971030710317103271033710347103571036710377103871039710407104171042710437104471045710467104771048710497105071051710527105371054710557105671057710587105971060710617106271063710647106571066710677106871069710707107171072710737107471075710767107771078710797108071081710827108371084710857108671087710887108971090710917109271093710947109571096710977109871099711007110171102711037110471105711067110771108711097111071111711127111371114711157111671117711187111971120711217112271123711247112571126711277112871129711307113171132711337113471135711367113771138711397114071141711427114371144711457114671147711487114971150711517115271153711547115571156711577115871159711607116171162711637116471165711667116771168711697117071171711727117371174711757117671177711787117971180711817118271183711847118571186711877118871189711907119171192711937119471195711967119771198711997120071201712027120371204712057120671207712087120971210712117121271213712147121571216712177121871219712207122171222712237122471225712267122771228712297123071231712327123371234712357123671237712387123971240712417124271243712447124571246712477124871249712507125171252712537125471255712567125771258712597126071261712627126371264712657126671267712687126971270712717127271273712747127571276712777127871279712807128171282712837128471285712867128771288712897129071291712927129371294712957129671297712987129971300713017130271303713047130571306713077130871309713107131171312713137131471315713167131771318713197132071321713227132371324713257132671327713287132971330713317133271333713347133571336713377133871339713407134171342713437134471345713467134771348713497135071351713527135371354713557135671357713587135971360713617136271363713647136571366713677136871369713707137171372713737137471375713767137771378713797138071381713827138371384713857138671387713887138971390713917139271393713947139571396713977139871399714007140171402714037140471405714067140771408714097141071411714127141371414714157141671417714187141971420714217142271423714247142571426714277142871429714307143171432714337143471435714367143771438714397144071441714427144371444714457144671447714487144971450714517145271453714547145571456714577145871459714607146171462714637146471465714667146771468714697147071471714727147371474714757147671477714787147971480714817148271483714847148571486714877148871489714907149171492714937149471495714967149771498714997150071501715027150371504715057150671507715087150971510715117151271513715147151571516715177151871519715207152171522715237152471525715267152771528715297153071531715327153371534715357153671537715387153971540715417154271543715447154571546715477154871549715507155171552715537155471555715567155771558715597156071561715627156371564715657156671567715687156971570715717157271573715747157571576715777157871579715807158171582715837158471585715867158771588715897159071591715927159371594715957159671597715987159971600716017160271603716047160571606716077160871609716107161171612716137161471615716167161771618716197162071621716227162371624716257162671627716287162971630716317163271633716347163571636716377163871639716407164171642716437164471645716467164771648716497165071651716527165371654716557165671657716587165971660716617166271663716647166571666716677166871669716707167171672716737167471675716767167771678716797168071681716827168371684716857168671687716887168971690716917169271693716947169571696716977169871699717007170171702717037170471705717067170771708717097171071711717127171371714717157171671717717187171971720717217172271723717247172571726717277172871729717307173171732717337173471735717367173771738717397174071741717427174371744717457174671747717487174971750717517175271753717547175571756717577175871759717607176171762717637176471765717667176771768717697177071771717727177371774717757177671777717787177971780717817178271783717847178571786717877178871789717907179171792717937179471795717967179771798717997180071801718027180371804718057180671807718087180971810718117181271813718147181571816718177181871819718207182171822718237182471825718267182771828718297183071831718327183371834718357183671837718387183971840718417184271843718447184571846718477184871849718507185171852718537185471855718567185771858718597186071861718627186371864718657186671867718687186971870718717187271873718747187571876718777187871879718807188171882718837188471885718867188771888718897189071891718927189371894718957189671897718987189971900719017190271903719047190571906719077190871909719107191171912719137191471915719167191771918719197192071921719227192371924719257192671927719287192971930719317193271933719347193571936719377193871939719407194171942719437194471945719467194771948719497195071951719527195371954719557195671957719587195971960719617196271963719647196571966719677196871969719707197171972719737197471975719767197771978719797198071981719827198371984719857198671987719887198971990719917199271993719947199571996719977199871999720007200172002720037200472005720067200772008720097201072011720127201372014720157201672017720187201972020720217202272023720247202572026720277202872029720307203172032720337203472035720367203772038720397204072041720427204372044720457204672047720487204972050720517205272053720547205572056720577205872059720607206172062720637206472065720667206772068720697207072071720727207372074720757207672077720787207972080720817208272083720847208572086720877208872089720907209172092720937209472095720967209772098720997210072101721027210372104721057210672107721087210972110721117211272113721147211572116721177211872119721207212172122721237212472125721267212772128721297213072131721327213372134721357213672137721387213972140721417214272143721447214572146721477214872149721507215172152721537215472155721567215772158721597216072161721627216372164721657216672167721687216972170721717217272173721747217572176721777217872179721807218172182721837218472185721867218772188721897219072191721927219372194721957219672197721987219972200722017220272203722047220572206722077220872209722107221172212722137221472215722167221772218722197222072221722227222372224722257222672227722287222972230722317223272233722347223572236722377223872239722407224172242722437224472245722467224772248722497225072251722527225372254722557225672257722587225972260722617226272263722647226572266722677226872269722707227172272722737227472275722767227772278722797228072281722827228372284722857228672287722887228972290722917229272293722947229572296722977229872299723007230172302723037230472305723067230772308723097231072311723127231372314723157231672317723187231972320723217232272323723247232572326723277232872329723307233172332723337233472335723367233772338723397234072341723427234372344723457234672347723487234972350723517235272353723547235572356723577235872359723607236172362723637236472365723667236772368723697237072371723727237372374723757237672377723787237972380723817238272383723847238572386723877238872389723907239172392723937239472395723967239772398723997240072401724027240372404724057240672407724087240972410724117241272413724147241572416724177241872419724207242172422724237242472425724267242772428724297243072431724327243372434724357243672437724387243972440724417244272443724447244572446724477244872449724507245172452724537245472455724567245772458724597246072461724627246372464724657246672467724687246972470724717247272473724747247572476724777247872479724807248172482724837248472485724867248772488724897249072491724927249372494724957249672497724987249972500725017250272503725047250572506725077250872509725107251172512725137251472515725167251772518725197252072521725227252372524725257252672527725287252972530725317253272533725347253572536725377253872539725407254172542725437254472545725467254772548725497255072551725527255372554725557255672557725587255972560725617256272563725647256572566725677256872569725707257172572725737257472575725767257772578725797258072581725827258372584725857258672587725887258972590725917259272593725947259572596725977259872599726007260172602726037260472605726067260772608726097261072611726127261372614726157261672617726187261972620726217262272623726247262572626726277262872629726307263172632726337263472635726367263772638726397264072641726427264372644726457264672647726487264972650726517265272653726547265572656726577265872659726607266172662726637266472665726667266772668726697267072671726727267372674726757267672677726787267972680726817268272683726847268572686726877268872689726907269172692726937269472695726967269772698726997270072701727027270372704727057270672707727087270972710727117271272713727147271572716727177271872719727207272172722727237272472725727267272772728727297273072731727327273372734727357273672737727387273972740727417274272743727447274572746727477274872749727507275172752727537275472755727567275772758727597276072761727627276372764727657276672767727687276972770727717277272773727747277572776727777277872779727807278172782727837278472785727867278772788727897279072791727927279372794727957279672797727987279972800728017280272803728047280572806728077280872809728107281172812728137281472815728167281772818728197282072821728227282372824728257282672827728287282972830728317283272833728347283572836728377283872839728407284172842728437284472845728467284772848728497285072851728527285372854728557285672857728587285972860728617286272863728647286572866728677286872869728707287172872728737287472875728767287772878728797288072881728827288372884728857288672887728887288972890728917289272893728947289572896728977289872899729007290172902729037290472905729067290772908729097291072911729127291372914729157291672917729187291972920729217292272923729247292572926729277292872929729307293172932729337293472935729367293772938729397294072941729427294372944729457294672947729487294972950729517295272953729547295572956729577295872959729607296172962729637296472965729667296772968729697297072971729727297372974729757297672977729787297972980729817298272983729847298572986729877298872989729907299172992729937299472995729967299772998729997300073001730027300373004730057300673007730087300973010730117301273013730147301573016730177301873019730207302173022730237302473025730267302773028730297303073031730327303373034730357303673037730387303973040730417304273043730447304573046730477304873049730507305173052730537305473055730567305773058730597306073061730627306373064730657306673067730687306973070730717307273073730747307573076730777307873079730807308173082730837308473085730867308773088730897309073091730927309373094730957309673097730987309973100731017310273103731047310573106731077310873109731107311173112731137311473115731167311773118731197312073121731227312373124731257312673127731287312973130731317313273133731347313573136731377313873139731407314173142731437314473145731467314773148731497315073151731527315373154731557315673157731587315973160731617316273163731647316573166731677316873169731707317173172731737317473175731767317773178731797318073181731827318373184731857318673187731887318973190731917319273193731947319573196731977319873199732007320173202732037320473205732067320773208732097321073211732127321373214732157321673217732187321973220732217322273223732247322573226732277322873229732307323173232732337323473235732367323773238732397324073241732427324373244732457324673247732487324973250732517325273253732547325573256732577325873259732607326173262732637326473265732667326773268732697327073271732727327373274732757327673277732787327973280732817328273283732847328573286732877328873289732907329173292732937329473295732967329773298732997330073301733027330373304733057330673307733087330973310733117331273313733147331573316733177331873319733207332173322733237332473325733267332773328733297333073331733327333373334733357333673337733387333973340733417334273343733447334573346733477334873349733507335173352733537335473355733567335773358733597336073361733627336373364733657336673367733687336973370733717337273373733747337573376733777337873379733807338173382733837338473385733867338773388733897339073391733927339373394733957339673397733987339973400734017340273403734047340573406734077340873409734107341173412734137341473415734167341773418734197342073421734227342373424734257342673427734287342973430734317343273433734347343573436734377343873439734407344173442734437344473445734467344773448734497345073451734527345373454734557345673457734587345973460734617346273463734647346573466734677346873469734707347173472734737347473475734767347773478734797348073481734827348373484734857348673487734887348973490734917349273493734947349573496734977349873499735007350173502735037350473505735067350773508735097351073511735127351373514735157351673517735187351973520735217352273523735247352573526735277352873529735307353173532735337353473535735367353773538735397354073541735427354373544735457354673547735487354973550735517355273553735547355573556735577355873559735607356173562735637356473565735667356773568735697357073571735727357373574735757357673577735787357973580735817358273583735847358573586735877358873589735907359173592735937359473595735967359773598735997360073601736027360373604736057360673607736087360973610736117361273613736147361573616736177361873619736207362173622736237362473625736267362773628736297363073631736327363373634736357363673637736387363973640736417364273643736447364573646736477364873649736507365173652736537365473655736567365773658736597366073661736627366373664736657366673667736687366973670736717367273673736747367573676736777367873679736807368173682736837368473685736867368773688736897369073691736927369373694736957369673697736987369973700737017370273703737047370573706737077370873709737107371173712737137371473715737167371773718737197372073721737227372373724737257372673727737287372973730737317373273733737347373573736737377373873739737407374173742737437374473745737467374773748737497375073751737527375373754737557375673757737587375973760737617376273763737647376573766737677376873769737707377173772737737377473775737767377773778737797378073781737827378373784737857378673787737887378973790737917379273793737947379573796737977379873799738007380173802738037380473805738067380773808738097381073811738127381373814738157381673817738187381973820738217382273823738247382573826738277382873829738307383173832738337383473835738367383773838738397384073841738427384373844738457384673847738487384973850738517385273853738547385573856738577385873859738607386173862738637386473865738667386773868738697387073871738727387373874738757387673877738787387973880738817388273883738847388573886738877388873889738907389173892738937389473895738967389773898738997390073901739027390373904739057390673907739087390973910739117391273913739147391573916739177391873919739207392173922739237392473925739267392773928739297393073931739327393373934739357393673937739387393973940739417394273943739447394573946739477394873949739507395173952739537395473955739567395773958739597396073961739627396373964739657396673967739687396973970739717397273973739747397573976739777397873979739807398173982739837398473985739867398773988739897399073991739927399373994739957399673997739987399974000740017400274003740047400574006740077400874009740107401174012740137401474015740167401774018740197402074021740227402374024740257402674027740287402974030740317403274033740347403574036740377403874039740407404174042740437404474045740467404774048740497405074051740527405374054740557405674057740587405974060740617406274063740647406574066740677406874069740707407174072740737407474075740767407774078740797408074081740827408374084740857408674087740887408974090740917409274093740947409574096740977409874099741007410174102741037410474105741067410774108741097411074111741127411374114741157411674117741187411974120741217412274123741247412574126741277412874129741307413174132741337413474135741367413774138741397414074141741427414374144741457414674147741487414974150741517415274153741547415574156741577415874159741607416174162741637416474165741667416774168741697417074171741727417374174741757417674177741787417974180741817418274183741847418574186741877418874189741907419174192741937419474195741967419774198741997420074201742027420374204742057420674207742087420974210742117421274213742147421574216742177421874219742207422174222742237422474225742267422774228742297423074231742327423374234742357423674237742387423974240742417424274243742447424574246742477424874249742507425174252742537425474255742567425774258742597426074261742627426374264742657426674267742687426974270742717427274273742747427574276742777427874279742807428174282742837428474285742867428774288742897429074291742927429374294742957429674297742987429974300743017430274303743047430574306743077430874309743107431174312743137431474315743167431774318743197432074321743227432374324743257432674327743287432974330743317433274333743347433574336743377433874339743407434174342743437434474345743467434774348743497435074351743527435374354743557435674357743587435974360743617436274363743647436574366743677436874369743707437174372743737437474375743767437774378743797438074381743827438374384743857438674387743887438974390743917439274393743947439574396743977439874399744007440174402744037440474405744067440774408744097441074411744127441374414744157441674417744187441974420744217442274423744247442574426744277442874429744307443174432744337443474435744367443774438744397444074441744427444374444744457444674447744487444974450744517445274453744547445574456744577445874459744607446174462744637446474465744667446774468744697447074471744727447374474744757447674477744787447974480744817448274483744847448574486744877448874489744907449174492744937449474495744967449774498744997450074501745027450374504745057450674507745087450974510745117451274513745147451574516745177451874519745207452174522745237452474525745267452774528745297453074531745327453374534745357453674537745387453974540745417454274543745447454574546745477454874549745507455174552745537455474555745567455774558745597456074561745627456374564745657456674567745687456974570745717457274573745747457574576745777457874579745807458174582745837458474585745867458774588745897459074591745927459374594745957459674597745987459974600746017460274603746047460574606746077460874609746107461174612746137461474615746167461774618746197462074621746227462374624746257462674627746287462974630746317463274633746347463574636746377463874639746407464174642746437464474645746467464774648746497465074651746527465374654746557465674657746587465974660746617466274663746647466574666746677466874669746707467174672746737467474675746767467774678746797468074681746827468374684746857468674687746887468974690746917469274693746947469574696746977469874699747007470174702747037470474705747067470774708747097471074711747127471374714747157471674717747187471974720747217472274723747247472574726747277472874729747307473174732747337473474735747367473774738747397474074741747427474374744747457474674747747487474974750747517475274753747547475574756747577475874759747607476174762747637476474765747667476774768747697477074771747727477374774747757477674777747787477974780747817478274783747847478574786747877478874789747907479174792747937479474795747967479774798747997480074801748027480374804748057480674807748087480974810748117481274813748147481574816748177481874819748207482174822748237482474825748267482774828748297483074831748327483374834748357483674837748387483974840748417484274843748447484574846748477484874849748507485174852748537485474855748567485774858748597486074861748627486374864748657486674867748687486974870748717487274873748747487574876748777487874879748807488174882748837488474885748867488774888748897489074891748927489374894748957489674897748987489974900749017490274903749047490574906749077490874909749107491174912749137491474915749167491774918749197492074921749227492374924749257492674927749287492974930749317493274933749347493574936749377493874939749407494174942749437494474945749467494774948749497495074951749527495374954749557495674957749587495974960749617496274963749647496574966749677496874969749707497174972749737497474975749767497774978749797498074981749827498374984749857498674987749887498974990749917499274993749947499574996749977499874999750007500175002750037500475005750067500775008750097501075011750127501375014750157501675017750187501975020750217502275023750247502575026750277502875029750307503175032750337503475035750367503775038750397504075041750427504375044750457504675047750487504975050750517505275053750547505575056750577505875059750607506175062750637506475065750667506775068750697507075071750727507375074750757507675077750787507975080750817508275083750847508575086750877508875089750907509175092750937509475095750967509775098750997510075101751027510375104751057510675107751087510975110751117511275113751147511575116751177511875119751207512175122751237512475125751267512775128751297513075131751327513375134751357513675137751387513975140751417514275143751447514575146751477514875149751507515175152751537515475155751567515775158751597516075161751627516375164751657516675167751687516975170751717517275173751747517575176751777517875179751807518175182751837518475185751867518775188751897519075191751927519375194751957519675197751987519975200752017520275203752047520575206752077520875209752107521175212752137521475215752167521775218752197522075221752227522375224752257522675227752287522975230752317523275233752347523575236752377523875239752407524175242752437524475245752467524775248752497525075251752527525375254752557525675257752587525975260752617526275263752647526575266752677526875269752707527175272752737527475275752767527775278752797528075281752827528375284752857528675287752887528975290752917529275293752947529575296752977529875299753007530175302753037530475305753067530775308753097531075311753127531375314753157531675317753187531975320753217532275323753247532575326753277532875329753307533175332753337533475335753367533775338753397534075341753427534375344753457534675347753487534975350753517535275353753547535575356753577535875359753607536175362753637536475365753667536775368753697537075371753727537375374753757537675377753787537975380753817538275383753847538575386753877538875389753907539175392753937539475395753967539775398753997540075401754027540375404754057540675407754087540975410754117541275413754147541575416754177541875419754207542175422754237542475425754267542775428754297543075431754327543375434754357543675437754387543975440754417544275443754447544575446754477544875449754507545175452754537545475455754567545775458754597546075461754627546375464754657546675467754687546975470754717547275473754747547575476754777547875479754807548175482754837548475485754867548775488754897549075491754927549375494754957549675497754987549975500755017550275503755047550575506755077550875509755107551175512755137551475515755167551775518755197552075521755227552375524755257552675527755287552975530755317553275533755347553575536755377553875539755407554175542755437554475545755467554775548755497555075551755527555375554755557555675557755587555975560755617556275563755647556575566755677556875569755707557175572755737557475575755767557775578755797558075581755827558375584755857558675587755887558975590755917559275593755947559575596755977559875599756007560175602756037560475605756067560775608756097561075611756127561375614756157561675617756187561975620756217562275623756247562575626756277562875629756307563175632756337563475635756367563775638756397564075641756427564375644756457564675647756487564975650756517565275653756547565575656756577565875659756607566175662756637566475665756667566775668756697567075671756727567375674756757567675677756787567975680756817568275683756847568575686756877568875689756907569175692756937569475695756967569775698756997570075701757027570375704757057570675707757087570975710757117571275713757147571575716757177571875719757207572175722757237572475725757267572775728757297573075731757327573375734757357573675737757387573975740757417574275743757447574575746757477574875749757507575175752757537575475755757567575775758757597576075761757627576375764757657576675767757687576975770757717577275773757747577575776757777577875779757807578175782757837578475785757867578775788757897579075791757927579375794757957579675797757987579975800758017580275803758047580575806758077580875809758107581175812758137581475815758167581775818758197582075821758227582375824758257582675827758287582975830758317583275833758347583575836758377583875839758407584175842758437584475845758467584775848758497585075851758527585375854758557585675857758587585975860758617586275863758647586575866758677586875869758707587175872758737587475875758767587775878758797588075881758827588375884758857588675887758887588975890758917589275893758947589575896758977589875899759007590175902759037590475905759067590775908759097591075911759127591375914759157591675917759187591975920759217592275923759247592575926759277592875929759307593175932759337593475935759367593775938759397594075941759427594375944759457594675947759487594975950759517595275953759547595575956759577595875959759607596175962759637596475965759667596775968759697597075971759727597375974759757597675977759787597975980759817598275983759847598575986759877598875989759907599175992759937599475995759967599775998759997600076001760027600376004760057600676007760087600976010760117601276013760147601576016760177601876019760207602176022760237602476025760267602776028760297603076031760327603376034760357603676037760387603976040760417604276043760447604576046760477604876049760507605176052760537605476055760567605776058760597606076061760627606376064760657606676067760687606976070760717607276073760747607576076760777607876079760807608176082760837608476085760867608776088760897609076091760927609376094760957609676097760987609976100761017610276103761047610576106761077610876109761107611176112761137611476115761167611776118761197612076121761227612376124761257612676127761287612976130761317613276133761347613576136761377613876139761407614176142761437614476145761467614776148761497615076151761527615376154761557615676157761587615976160761617616276163761647616576166761677616876169761707617176172761737617476175761767617776178761797618076181761827618376184761857618676187761887618976190761917619276193761947619576196761977619876199762007620176202762037620476205762067620776208762097621076211762127621376214762157621676217762187621976220762217622276223762247622576226762277622876229762307623176232762337623476235762367623776238762397624076241762427624376244762457624676247762487624976250762517625276253762547625576256762577625876259762607626176262762637626476265762667626776268762697627076271762727627376274762757627676277762787627976280762817628276283762847628576286762877628876289762907629176292762937629476295762967629776298762997630076301763027630376304763057630676307763087630976310763117631276313763147631576316763177631876319763207632176322763237632476325763267632776328763297633076331763327633376334763357633676337763387633976340763417634276343763447634576346763477634876349763507635176352763537635476355763567635776358763597636076361763627636376364763657636676367763687636976370763717637276373763747637576376763777637876379763807638176382763837638476385763867638776388763897639076391763927639376394763957639676397763987639976400764017640276403764047640576406764077640876409764107641176412764137641476415764167641776418764197642076421764227642376424764257642676427764287642976430764317643276433764347643576436764377643876439764407644176442764437644476445764467644776448764497645076451764527645376454764557645676457764587645976460764617646276463764647646576466764677646876469764707647176472764737647476475764767647776478764797648076481764827648376484764857648676487764887648976490764917649276493764947649576496764977649876499765007650176502765037650476505765067650776508765097651076511765127651376514765157651676517765187651976520765217652276523765247652576526765277652876529765307653176532765337653476535765367653776538765397654076541765427654376544765457654676547765487654976550765517655276553765547655576556765577655876559765607656176562765637656476565765667656776568765697657076571765727657376574765757657676577765787657976580765817658276583765847658576586765877658876589765907659176592765937659476595765967659776598765997660076601766027660376604766057660676607766087660976610766117661276613766147661576616766177661876619766207662176622766237662476625766267662776628766297663076631766327663376634766357663676637766387663976640766417664276643766447664576646766477664876649766507665176652766537665476655766567665776658766597666076661766627666376664766657666676667766687666976670766717667276673766747667576676766777667876679766807668176682766837668476685766867668776688766897669076691766927669376694766957669676697766987669976700767017670276703767047670576706767077670876709767107671176712767137671476715767167671776718767197672076721767227672376724767257672676727767287672976730767317673276733767347673576736767377673876739767407674176742767437674476745767467674776748767497675076751767527675376754767557675676757767587675976760767617676276763767647676576766767677676876769767707677176772767737677476775767767677776778767797678076781767827678376784767857678676787767887678976790767917679276793767947679576796767977679876799768007680176802768037680476805768067680776808768097681076811768127681376814768157681676817768187681976820768217682276823768247682576826768277682876829768307683176832768337683476835768367683776838768397684076841768427684376844768457684676847768487684976850768517685276853768547685576856768577685876859768607686176862768637686476865768667686776868768697687076871768727687376874768757687676877768787687976880768817688276883768847688576886768877688876889768907689176892768937689476895768967689776898768997690076901769027690376904769057690676907769087690976910769117691276913769147691576916769177691876919769207692176922769237692476925769267692776928769297693076931769327693376934769357693676937769387693976940769417694276943769447694576946769477694876949769507695176952769537695476955769567695776958769597696076961769627696376964769657696676967769687696976970769717697276973769747697576976769777697876979769807698176982769837698476985769867698776988769897699076991769927699376994769957699676997769987699977000770017700277003770047700577006770077700877009770107701177012770137701477015770167701777018770197702077021770227702377024770257702677027770287702977030770317703277033770347703577036770377703877039770407704177042770437704477045770467704777048770497705077051770527705377054770557705677057770587705977060770617706277063770647706577066770677706877069770707707177072770737707477075770767707777078770797708077081770827708377084770857708677087770887708977090770917709277093770947709577096770977709877099771007710177102771037710477105771067710777108771097711077111771127711377114771157711677117771187711977120771217712277123771247712577126771277712877129771307713177132771337713477135771367713777138771397714077141771427714377144771457714677147771487714977150771517715277153771547715577156771577715877159771607716177162771637716477165771667716777168771697717077171771727717377174771757717677177771787717977180771817718277183771847718577186771877718877189771907719177192771937719477195771967719777198771997720077201772027720377204772057720677207772087720977210772117721277213772147721577216772177721877219772207722177222772237722477225772267722777228772297723077231772327723377234772357723677237772387723977240772417724277243772447724577246772477724877249772507725177252772537725477255772567725777258772597726077261772627726377264772657726677267772687726977270772717727277273772747727577276772777727877279772807728177282772837728477285772867728777288772897729077291772927729377294772957729677297772987729977300773017730277303773047730577306773077730877309773107731177312773137731477315773167731777318773197732077321773227732377324773257732677327773287732977330773317733277333773347733577336773377733877339773407734177342773437734477345773467734777348773497735077351773527735377354773557735677357773587735977360773617736277363773647736577366773677736877369773707737177372773737737477375773767737777378773797738077381773827738377384773857738677387773887738977390773917739277393773947739577396773977739877399774007740177402774037740477405774067740777408774097741077411774127741377414774157741677417774187741977420774217742277423774247742577426774277742877429774307743177432774337743477435774367743777438774397744077441774427744377444774457744677447774487744977450774517745277453774547745577456774577745877459774607746177462774637746477465774667746777468774697747077471774727747377474774757747677477774787747977480774817748277483774847748577486774877748877489774907749177492774937749477495774967749777498774997750077501775027750377504775057750677507775087750977510775117751277513775147751577516775177751877519775207752177522775237752477525775267752777528775297753077531775327753377534775357753677537775387753977540775417754277543775447754577546775477754877549775507755177552775537755477555775567755777558775597756077561775627756377564775657756677567775687756977570775717757277573775747757577576775777757877579775807758177582775837758477585775867758777588775897759077591775927759377594775957759677597775987759977600776017760277603776047760577606776077760877609776107761177612776137761477615776167761777618776197762077621776227762377624776257762677627776287762977630776317763277633776347763577636776377763877639776407764177642776437764477645776467764777648776497765077651776527765377654776557765677657776587765977660776617766277663776647766577666776677766877669776707767177672776737767477675776767767777678776797768077681776827768377684776857768677687776887768977690776917769277693776947769577696776977769877699777007770177702777037770477705777067770777708777097771077711777127771377714777157771677717777187771977720777217772277723777247772577726777277772877729777307773177732777337773477735777367773777738777397774077741777427774377744777457774677747777487774977750777517775277753777547775577756777577775877759777607776177762777637776477765777667776777768777697777077771777727777377774777757777677777777787777977780777817778277783777847778577786777877778877789777907779177792777937779477795777967779777798777997780077801778027780377804778057780677807778087780977810778117781277813778147781577816778177781877819778207782177822778237782477825778267782777828778297783077831778327783377834778357783677837778387783977840778417784277843778447784577846778477784877849778507785177852778537785477855778567785777858778597786077861778627786377864778657786677867778687786977870778717787277873778747787577876778777787877879778807788177882778837788477885778867788777888778897789077891778927789377894778957789677897778987789977900779017790277903779047790577906779077790877909779107791177912779137791477915779167791777918779197792077921779227792377924779257792677927779287792977930779317793277933779347793577936779377793877939779407794177942779437794477945779467794777948779497795077951779527795377954779557795677957779587795977960779617796277963779647796577966779677796877969779707797177972779737797477975779767797777978779797798077981779827798377984779857798677987779887798977990779917799277993779947799577996779977799877999780007800178002780037800478005780067800778008780097801078011780127801378014780157801678017780187801978020780217802278023780247802578026780277802878029780307803178032780337803478035780367803778038780397804078041780427804378044780457804678047780487804978050780517805278053780547805578056780577805878059780607806178062780637806478065780667806778068780697807078071780727807378074780757807678077780787807978080780817808278083780847808578086780877808878089780907809178092780937809478095780967809778098780997810078101781027810378104781057810678107781087810978110781117811278113781147811578116781177811878119781207812178122781237812478125781267812778128781297813078131781327813378134781357813678137781387813978140781417814278143781447814578146781477814878149781507815178152781537815478155781567815778158781597816078161781627816378164781657816678167781687816978170781717817278173781747817578176781777817878179781807818178182781837818478185781867818778188781897819078191781927819378194781957819678197781987819978200782017820278203782047820578206782077820878209782107821178212782137821478215782167821778218782197822078221782227822378224782257822678227782287822978230782317823278233782347823578236782377823878239782407824178242782437824478245782467824778248782497825078251782527825378254782557825678257782587825978260782617826278263782647826578266782677826878269782707827178272782737827478275782767827778278782797828078281782827828378284782857828678287782887828978290782917829278293782947829578296782977829878299783007830178302783037830478305783067830778308783097831078311783127831378314783157831678317783187831978320783217832278323783247832578326783277832878329783307833178332783337833478335783367833778338783397834078341783427834378344783457834678347783487834978350783517835278353783547835578356783577835878359783607836178362783637836478365783667836778368783697837078371783727837378374783757837678377783787837978380783817838278383783847838578386783877838878389783907839178392783937839478395783967839778398783997840078401784027840378404784057840678407784087840978410784117841278413784147841578416784177841878419784207842178422784237842478425784267842778428784297843078431784327843378434784357843678437784387843978440784417844278443784447844578446784477844878449784507845178452784537845478455784567845778458784597846078461784627846378464784657846678467784687846978470784717847278473784747847578476784777847878479784807848178482784837848478485784867848778488784897849078491784927849378494784957849678497784987849978500785017850278503785047850578506785077850878509785107851178512785137851478515785167851778518785197852078521785227852378524785257852678527785287852978530785317853278533785347853578536785377853878539785407854178542785437854478545785467854778548785497855078551785527855378554785557855678557785587855978560785617856278563785647856578566785677856878569785707857178572785737857478575785767857778578785797858078581785827858378584785857858678587785887858978590785917859278593785947859578596785977859878599786007860178602786037860478605786067860778608786097861078611786127861378614786157861678617786187861978620786217862278623786247862578626786277862878629786307863178632786337863478635786367863778638786397864078641786427864378644786457864678647786487864978650786517865278653786547865578656786577865878659786607866178662786637866478665786667866778668786697867078671786727867378674786757867678677786787867978680786817868278683786847868578686786877868878689786907869178692786937869478695786967869778698786997870078701787027870378704787057870678707787087870978710787117871278713787147871578716787177871878719787207872178722787237872478725787267872778728787297873078731787327873378734787357873678737787387873978740787417874278743787447874578746787477874878749787507875178752787537875478755787567875778758787597876078761787627876378764787657876678767787687876978770787717877278773787747877578776787777877878779787807878178782787837878478785787867878778788787897879078791787927879378794787957879678797787987879978800788017880278803788047880578806788077880878809788107881178812788137881478815788167881778818788197882078821788227882378824788257882678827788287882978830788317883278833788347883578836788377883878839788407884178842788437884478845788467884778848788497885078851788527885378854788557885678857788587885978860788617886278863788647886578866788677886878869788707887178872788737887478875788767887778878788797888078881788827888378884788857888678887788887888978890788917889278893788947889578896788977889878899789007890178902789037890478905789067890778908789097891078911789127891378914789157891678917789187891978920789217892278923789247892578926789277892878929789307893178932789337893478935789367893778938789397894078941789427894378944789457894678947789487894978950789517895278953789547895578956789577895878959789607896178962789637896478965789667896778968789697897078971789727897378974789757897678977789787897978980789817898278983789847898578986789877898878989789907899178992789937899478995789967899778998789997900079001790027900379004790057900679007790087900979010790117901279013790147901579016790177901879019790207902179022790237902479025790267902779028790297903079031790327903379034790357903679037790387903979040790417904279043790447904579046790477904879049790507905179052790537905479055790567905779058790597906079061790627906379064790657906679067790687906979070790717907279073790747907579076790777907879079790807908179082790837908479085790867908779088790897909079091790927909379094790957909679097790987909979100791017910279103791047910579106791077910879109791107911179112791137911479115791167911779118791197912079121791227912379124791257912679127791287912979130791317913279133791347913579136791377913879139791407914179142791437914479145791467914779148791497915079151791527915379154791557915679157791587915979160791617916279163791647916579166791677916879169791707917179172791737917479175791767917779178791797918079181791827918379184791857918679187791887918979190791917919279193791947919579196791977919879199792007920179202792037920479205792067920779208792097921079211792127921379214792157921679217792187921979220792217922279223792247922579226792277922879229792307923179232792337923479235792367923779238792397924079241792427924379244792457924679247792487924979250792517925279253792547925579256792577925879259792607926179262792637926479265792667926779268792697927079271792727927379274792757927679277792787927979280792817928279283792847928579286792877928879289792907929179292792937929479295792967929779298792997930079301793027930379304793057930679307793087930979310793117931279313793147931579316793177931879319793207932179322793237932479325793267932779328793297933079331793327933379334793357933679337793387933979340793417934279343793447934579346793477934879349793507935179352793537935479355793567935779358793597936079361793627936379364793657936679367793687936979370793717937279373793747937579376793777937879379793807938179382793837938479385793867938779388793897939079391793927939379394793957939679397793987939979400794017940279403794047940579406794077940879409794107941179412794137941479415794167941779418794197942079421794227942379424794257942679427794287942979430794317943279433794347943579436794377943879439794407944179442794437944479445794467944779448794497945079451794527945379454794557945679457794587945979460794617946279463794647946579466794677946879469794707947179472794737947479475794767947779478794797948079481794827948379484794857948679487794887948979490794917949279493794947949579496794977949879499795007950179502795037950479505795067950779508795097951079511795127951379514795157951679517795187951979520795217952279523795247952579526795277952879529795307953179532795337953479535795367953779538795397954079541795427954379544795457954679547795487954979550795517955279553795547955579556795577955879559795607956179562795637956479565795667956779568795697957079571795727957379574795757957679577795787957979580795817958279583795847958579586795877958879589795907959179592795937959479595795967959779598795997960079601796027960379604796057960679607796087960979610796117961279613796147961579616796177961879619796207962179622796237962479625796267962779628796297963079631796327963379634796357963679637796387963979640796417964279643796447964579646796477964879649796507965179652796537965479655796567965779658796597966079661796627966379664796657966679667796687966979670796717967279673796747967579676796777967879679796807968179682796837968479685796867968779688796897969079691796927969379694796957969679697796987969979700797017970279703797047970579706797077970879709797107971179712797137971479715797167971779718797197972079721797227972379724797257972679727797287972979730797317973279733797347973579736797377973879739797407974179742797437974479745797467974779748797497975079751797527975379754797557975679757797587975979760797617976279763797647976579766797677976879769797707977179772797737977479775797767977779778797797978079781797827978379784797857978679787797887978979790797917979279793797947979579796797977979879799798007980179802798037980479805798067980779808798097981079811798127981379814798157981679817798187981979820798217982279823798247982579826798277982879829798307983179832798337983479835798367983779838798397984079841798427984379844798457984679847798487984979850798517985279853798547985579856798577985879859798607986179862798637986479865798667986779868798697987079871798727987379874798757987679877798787987979880798817988279883798847988579886798877988879889798907989179892798937989479895798967989779898798997990079901799027990379904799057990679907799087990979910799117991279913799147991579916799177991879919799207992179922799237992479925799267992779928799297993079931799327993379934799357993679937799387993979940799417994279943799447994579946799477994879949799507995179952799537995479955799567995779958799597996079961799627996379964799657996679967799687996979970799717997279973799747997579976799777997879979799807998179982799837998479985799867998779988799897999079991799927999379994799957999679997799987999980000800018000280003800048000580006800078000880009800108001180012800138001480015800168001780018800198002080021800228002380024800258002680027800288002980030800318003280033800348003580036800378003880039800408004180042800438004480045800468004780048800498005080051800528005380054800558005680057800588005980060800618006280063800648006580066800678006880069800708007180072800738007480075800768007780078800798008080081800828008380084800858008680087800888008980090800918009280093800948009580096800978009880099801008010180102801038010480105801068010780108801098011080111801128011380114801158011680117801188011980120801218012280123801248012580126801278012880129801308013180132801338013480135801368013780138801398014080141801428014380144801458014680147801488014980150801518015280153801548015580156801578015880159801608016180162801638016480165801668016780168801698017080171801728017380174801758017680177801788017980180801818018280183801848018580186801878018880189801908019180192801938019480195801968019780198801998020080201802028020380204802058020680207802088020980210802118021280213802148021580216802178021880219802208022180222802238022480225802268022780228802298023080231802328023380234802358023680237802388023980240802418024280243802448024580246802478024880249802508025180252802538025480255802568025780258802598026080261802628026380264802658026680267802688026980270802718027280273802748027580276802778027880279802808028180282802838028480285802868028780288802898029080291802928029380294802958029680297802988029980300803018030280303803048030580306803078030880309803108031180312803138031480315803168031780318803198032080321803228032380324803258032680327803288032980330803318033280333803348033580336803378033880339803408034180342803438034480345803468034780348803498035080351803528035380354803558035680357803588035980360803618036280363803648036580366803678036880369803708037180372803738037480375803768037780378803798038080381803828038380384803858038680387803888038980390803918039280393803948039580396803978039880399804008040180402804038040480405804068040780408804098041080411804128041380414804158041680417804188041980420804218042280423804248042580426804278042880429804308043180432804338043480435804368043780438804398044080441804428044380444804458044680447804488044980450804518045280453804548045580456804578045880459804608046180462804638046480465804668046780468804698047080471804728047380474804758047680477804788047980480804818048280483804848048580486804878048880489804908049180492804938049480495804968049780498804998050080501805028050380504805058050680507805088050980510805118051280513805148051580516805178051880519805208052180522805238052480525805268052780528805298053080531805328053380534805358053680537805388053980540805418054280543805448054580546805478054880549805508055180552805538055480555805568055780558805598056080561805628056380564805658056680567805688056980570805718057280573805748057580576805778057880579805808058180582805838058480585805868058780588805898059080591805928059380594805958059680597805988059980600806018060280603806048060580606806078060880609806108061180612806138061480615806168061780618806198062080621806228062380624806258062680627806288062980630806318063280633806348063580636806378063880639806408064180642806438064480645806468064780648806498065080651806528065380654806558065680657806588065980660806618066280663806648066580666806678066880669806708067180672806738067480675806768067780678806798068080681806828068380684806858068680687806888068980690806918069280693806948069580696806978069880699807008070180702807038070480705807068070780708807098071080711807128071380714807158071680717807188071980720807218072280723807248072580726807278072880729807308073180732807338073480735807368073780738807398074080741807428074380744807458074680747807488074980750807518075280753807548075580756807578075880759807608076180762807638076480765807668076780768807698077080771807728077380774807758077680777807788077980780807818078280783807848078580786807878078880789807908079180792807938079480795807968079780798807998080080801808028080380804808058080680807808088080980810808118081280813808148081580816808178081880819808208082180822808238082480825808268082780828808298083080831808328083380834808358083680837808388083980840808418084280843808448084580846808478084880849808508085180852808538085480855808568085780858808598086080861808628086380864808658086680867808688086980870808718087280873808748087580876808778087880879808808088180882808838088480885808868088780888808898089080891808928089380894808958089680897808988089980900809018090280903809048090580906809078090880909809108091180912809138091480915809168091780918809198092080921809228092380924809258092680927809288092980930809318093280933809348093580936809378093880939809408094180942809438094480945809468094780948809498095080951809528095380954809558095680957809588095980960809618096280963809648096580966809678096880969809708097180972809738097480975809768097780978809798098080981809828098380984809858098680987809888098980990809918099280993809948099580996809978099880999810008100181002810038100481005810068100781008810098101081011810128101381014810158101681017810188101981020810218102281023810248102581026810278102881029810308103181032810338103481035810368103781038810398104081041810428104381044810458104681047810488104981050810518105281053810548105581056810578105881059810608106181062810638106481065810668106781068810698107081071810728107381074810758107681077810788107981080810818108281083810848108581086810878108881089810908109181092810938109481095810968109781098810998110081101811028110381104811058110681107811088110981110811118111281113811148111581116811178111881119811208112181122811238112481125811268112781128811298113081131811328113381134811358113681137811388113981140811418114281143811448114581146811478114881149811508115181152811538115481155811568115781158811598116081161811628116381164811658116681167811688116981170811718117281173811748117581176811778117881179811808118181182811838118481185811868118781188811898119081191811928119381194811958119681197811988119981200812018120281203812048120581206812078120881209812108121181212812138121481215812168121781218812198122081221812228122381224812258122681227812288122981230812318123281233812348123581236812378123881239812408124181242812438124481245812468124781248812498125081251812528125381254812558125681257812588125981260812618126281263812648126581266812678126881269812708127181272812738127481275812768127781278812798128081281812828128381284812858128681287812888128981290812918129281293812948129581296812978129881299813008130181302813038130481305813068130781308813098131081311813128131381314813158131681317813188131981320813218132281323813248132581326813278132881329813308133181332813338133481335813368133781338813398134081341813428134381344813458134681347813488134981350813518135281353813548135581356813578135881359813608136181362813638136481365813668136781368813698137081371813728137381374813758137681377813788137981380813818138281383813848138581386813878138881389813908139181392813938139481395813968139781398813998140081401814028140381404814058140681407814088140981410814118141281413814148141581416814178141881419814208142181422814238142481425814268142781428814298143081431814328143381434814358143681437814388143981440814418144281443814448144581446814478144881449814508145181452814538145481455814568145781458814598146081461814628146381464814658146681467814688146981470814718147281473814748147581476814778147881479814808148181482814838148481485814868148781488814898149081491814928149381494814958149681497814988149981500815018150281503815048150581506815078150881509815108151181512815138151481515815168151781518815198152081521815228152381524815258152681527815288152981530815318153281533815348153581536815378153881539815408154181542815438154481545815468154781548815498155081551815528155381554815558155681557815588155981560815618156281563815648156581566815678156881569815708157181572815738157481575815768157781578815798158081581815828158381584815858158681587815888158981590815918159281593815948159581596815978159881599816008160181602816038160481605816068160781608816098161081611816128161381614816158161681617816188161981620816218162281623816248162581626816278162881629816308163181632816338163481635816368163781638816398164081641816428164381644816458164681647816488164981650816518165281653816548165581656816578165881659816608166181662816638166481665816668166781668816698167081671816728167381674816758167681677816788167981680816818168281683816848168581686816878168881689816908169181692816938169481695816968169781698816998170081701817028170381704817058170681707817088170981710817118171281713817148171581716817178171881719817208172181722817238172481725817268172781728817298173081731817328173381734817358173681737817388173981740817418174281743817448174581746817478174881749817508175181752817538175481755817568175781758817598176081761817628176381764817658176681767817688176981770817718177281773817748177581776817778177881779817808178181782817838178481785817868178781788817898179081791817928179381794817958179681797817988179981800818018180281803818048180581806818078180881809818108181181812818138181481815818168181781818818198182081821818228182381824818258182681827818288182981830818318183281833818348183581836818378183881839818408184181842818438184481845818468184781848818498185081851818528185381854818558185681857818588185981860818618186281863818648186581866818678186881869818708187181872818738187481875818768187781878818798188081881818828188381884818858188681887818888188981890818918189281893818948189581896818978189881899819008190181902819038190481905819068190781908819098191081911819128191381914819158191681917819188191981920819218192281923819248192581926819278192881929819308193181932819338193481935819368193781938819398194081941819428194381944819458194681947819488194981950819518195281953819548195581956819578195881959819608196181962819638196481965819668196781968819698197081971819728197381974819758197681977819788197981980819818198281983819848198581986819878198881989819908199181992819938199481995819968199781998819998200082001820028200382004820058200682007820088200982010820118201282013820148201582016820178201882019820208202182022820238202482025820268202782028820298203082031820328203382034820358203682037820388203982040820418204282043820448204582046820478204882049820508205182052820538205482055820568205782058820598206082061820628206382064820658206682067820688206982070820718207282073820748207582076820778207882079820808208182082820838208482085820868208782088820898209082091820928209382094820958209682097820988209982100821018210282103821048210582106821078210882109821108211182112821138211482115821168211782118821198212082121821228212382124821258212682127821288212982130821318213282133821348213582136821378213882139821408214182142821438214482145821468214782148821498215082151821528215382154821558215682157821588215982160821618216282163821648216582166821678216882169821708217182172821738217482175821768217782178821798218082181821828218382184821858218682187821888218982190821918219282193821948219582196821978219882199822008220182202822038220482205822068220782208822098221082211822128221382214822158221682217822188221982220822218222282223822248222582226822278222882229822308223182232822338223482235822368223782238822398224082241822428224382244822458224682247822488224982250822518225282253822548225582256822578225882259822608226182262822638226482265822668226782268822698227082271822728227382274822758227682277822788227982280822818228282283822848228582286822878228882289822908229182292822938229482295822968229782298822998230082301823028230382304823058230682307823088230982310823118231282313823148231582316823178231882319823208232182322823238232482325823268232782328823298233082331823328233382334823358233682337823388233982340823418234282343823448234582346823478234882349823508235182352823538235482355823568235782358823598236082361823628236382364823658236682367823688236982370823718237282373823748237582376823778237882379823808238182382823838238482385823868238782388823898239082391823928239382394823958239682397823988239982400824018240282403824048240582406824078240882409824108241182412824138241482415824168241782418824198242082421824228242382424824258242682427824288242982430824318243282433824348243582436824378243882439824408244182442824438244482445824468244782448824498245082451824528245382454824558245682457824588245982460824618246282463824648246582466824678246882469824708247182472824738247482475824768247782478824798248082481824828248382484824858248682487824888248982490824918249282493824948249582496824978249882499825008250182502825038250482505825068250782508825098251082511825128251382514825158251682517825188251982520825218252282523825248252582526825278252882529825308253182532825338253482535825368253782538825398254082541825428254382544825458254682547825488254982550825518255282553825548255582556825578255882559825608256182562825638256482565825668256782568825698257082571825728257382574825758257682577825788257982580825818258282583825848258582586825878258882589825908259182592825938259482595825968259782598825998260082601826028260382604826058260682607826088260982610826118261282613826148261582616826178261882619826208262182622826238262482625826268262782628826298263082631826328263382634826358263682637826388263982640826418264282643826448264582646826478264882649826508265182652826538265482655826568265782658826598266082661826628266382664826658266682667826688266982670826718267282673826748267582676826778267882679826808268182682826838268482685826868268782688826898269082691826928269382694826958269682697826988269982700827018270282703827048270582706827078270882709827108271182712827138271482715827168271782718827198272082721827228272382724827258272682727827288272982730827318273282733827348273582736827378273882739827408274182742827438274482745827468274782748827498275082751827528275382754827558275682757827588275982760827618276282763827648276582766827678276882769827708277182772827738277482775827768277782778827798278082781827828278382784827858278682787827888278982790827918279282793827948279582796827978279882799828008280182802828038280482805828068280782808828098281082811828128281382814828158281682817828188281982820828218282282823828248282582826828278282882829828308283182832828338283482835828368283782838828398284082841828428284382844828458284682847828488284982850828518285282853828548285582856828578285882859828608286182862828638286482865828668286782868828698287082871828728287382874828758287682877828788287982880828818288282883828848288582886828878288882889828908289182892828938289482895828968289782898828998290082901829028290382904829058290682907829088290982910829118291282913829148291582916829178291882919829208292182922829238292482925829268292782928829298293082931829328293382934829358293682937829388293982940829418294282943829448294582946829478294882949829508295182952829538295482955829568295782958829598296082961829628296382964829658296682967829688296982970829718297282973829748297582976829778297882979829808298182982829838298482985829868298782988829898299082991829928299382994829958299682997829988299983000830018300283003830048300583006830078300883009830108301183012830138301483015830168301783018830198302083021830228302383024830258302683027830288302983030830318303283033830348303583036830378303883039830408304183042830438304483045830468304783048830498305083051830528305383054830558305683057830588305983060830618306283063830648306583066830678306883069830708307183072830738307483075830768307783078830798308083081830828308383084830858308683087830888308983090830918309283093830948309583096830978309883099831008310183102831038310483105831068310783108831098311083111831128311383114831158311683117831188311983120831218312283123831248312583126831278312883129831308313183132831338313483135831368313783138831398314083141831428314383144831458314683147831488314983150831518315283153831548315583156831578315883159831608316183162831638316483165831668316783168831698317083171831728317383174831758317683177831788317983180831818318283183831848318583186831878318883189831908319183192831938319483195831968319783198831998320083201832028320383204832058320683207832088320983210832118321283213832148321583216832178321883219832208322183222832238322483225832268322783228832298323083231832328323383234832358323683237832388323983240832418324283243832448324583246832478324883249832508325183252832538325483255832568325783258832598326083261832628326383264832658326683267832688326983270832718327283273832748327583276832778327883279832808328183282832838328483285832868328783288832898329083291832928329383294832958329683297832988329983300833018330283303833048330583306833078330883309833108331183312833138331483315833168331783318833198332083321833228332383324833258332683327833288332983330833318333283333833348333583336833378333883339833408334183342833438334483345833468334783348833498335083351833528335383354833558335683357833588335983360833618336283363833648336583366833678336883369833708337183372833738337483375833768337783378833798338083381833828338383384833858338683387833888338983390833918339283393833948339583396833978339883399834008340183402834038340483405834068340783408834098341083411834128341383414834158341683417834188341983420834218342283423834248342583426834278342883429834308343183432834338343483435834368343783438834398344083441834428344383444834458344683447834488344983450834518345283453834548345583456834578345883459834608346183462834638346483465834668346783468834698347083471834728347383474834758347683477834788347983480834818348283483834848348583486834878348883489834908349183492834938349483495834968349783498834998350083501835028350383504835058350683507835088350983510835118351283513835148351583516835178351883519835208352183522835238352483525835268352783528835298353083531835328353383534835358353683537835388353983540835418354283543835448354583546835478354883549835508355183552835538355483555835568355783558835598356083561835628356383564835658356683567835688356983570835718357283573835748357583576835778357883579835808358183582835838358483585835868358783588835898359083591835928359383594835958359683597835988359983600836018360283603836048360583606836078360883609836108361183612836138361483615836168361783618836198362083621836228362383624836258362683627836288362983630836318363283633836348363583636836378363883639836408364183642836438364483645836468364783648836498365083651836528365383654836558365683657836588365983660836618366283663836648366583666836678366883669836708367183672836738367483675836768367783678836798368083681836828368383684836858368683687836888368983690836918369283693836948369583696836978369883699837008370183702837038370483705837068370783708837098371083711837128371383714837158371683717837188371983720837218372283723837248372583726837278372883729837308373183732837338373483735837368373783738837398374083741837428374383744837458374683747837488374983750837518375283753837548375583756837578375883759837608376183762837638376483765837668376783768837698377083771837728377383774837758377683777837788377983780837818378283783837848378583786837878378883789837908379183792837938379483795837968379783798837998380083801838028380383804838058380683807838088380983810838118381283813838148381583816838178381883819838208382183822838238382483825838268382783828838298383083831838328383383834838358383683837838388383983840838418384283843838448384583846838478384883849838508385183852838538385483855838568385783858838598386083861838628386383864838658386683867838688386983870838718387283873838748387583876838778387883879838808388183882838838388483885838868388783888838898389083891838928389383894838958389683897838988389983900839018390283903839048390583906839078390883909839108391183912839138391483915839168391783918839198392083921839228392383924839258392683927839288392983930839318393283933839348393583936839378393883939839408394183942839438394483945839468394783948839498395083951839528395383954839558395683957839588395983960839618396283963839648396583966839678396883969839708397183972839738397483975839768397783978839798398083981839828398383984839858398683987839888398983990839918399283993839948399583996839978399883999840008400184002840038400484005840068400784008840098401084011840128401384014840158401684017840188401984020840218402284023840248402584026840278402884029840308403184032840338403484035840368403784038840398404084041840428404384044840458404684047840488404984050840518405284053840548405584056840578405884059840608406184062840638406484065840668406784068840698407084071840728407384074840758407684077840788407984080840818408284083840848408584086840878408884089840908409184092840938409484095840968409784098840998410084101841028410384104841058410684107841088410984110841118411284113841148411584116841178411884119841208412184122841238412484125841268412784128841298413084131841328413384134841358413684137841388413984140841418414284143841448414584146841478414884149841508415184152841538415484155841568415784158841598416084161841628416384164841658416684167841688416984170841718417284173841748417584176841778417884179841808418184182841838418484185841868418784188841898419084191841928419384194841958419684197841988419984200842018420284203842048420584206842078420884209842108421184212842138421484215842168421784218842198422084221842228422384224842258422684227842288422984230842318423284233842348423584236842378423884239842408424184242842438424484245842468424784248842498425084251842528425384254842558425684257842588425984260842618426284263842648426584266842678426884269842708427184272842738427484275842768427784278842798428084281842828428384284842858428684287842888428984290842918429284293842948429584296842978429884299843008430184302843038430484305843068430784308843098431084311843128431384314843158431684317843188431984320843218432284323843248432584326843278432884329843308433184332843338433484335843368433784338843398434084341843428434384344843458434684347843488434984350843518435284353843548435584356843578435884359843608436184362843638436484365843668436784368843698437084371843728437384374843758437684377843788437984380843818438284383843848438584386843878438884389843908439184392843938439484395843968439784398843998440084401844028440384404844058440684407844088440984410844118441284413844148441584416844178441884419844208442184422844238442484425844268442784428844298443084431844328443384434844358443684437844388443984440844418444284443844448444584446844478444884449844508445184452844538445484455844568445784458844598446084461844628446384464844658446684467844688446984470844718447284473844748447584476844778447884479844808448184482844838448484485844868448784488844898449084491844928449384494844958449684497844988449984500845018450284503845048450584506845078450884509845108451184512845138451484515845168451784518845198452084521845228452384524845258452684527845288452984530845318453284533845348453584536845378453884539845408454184542845438454484545845468454784548845498455084551845528455384554845558455684557845588455984560845618456284563845648456584566845678456884569845708457184572845738457484575845768457784578845798458084581845828458384584845858458684587845888458984590845918459284593845948459584596845978459884599846008460184602846038460484605846068460784608846098461084611846128461384614846158461684617846188461984620846218462284623846248462584626846278462884629846308463184632846338463484635846368463784638846398464084641846428464384644846458464684647846488464984650846518465284653846548465584656846578465884659846608466184662846638466484665846668466784668846698467084671846728467384674846758467684677846788467984680846818468284683846848468584686846878468884689846908469184692846938469484695846968469784698846998470084701847028470384704847058470684707847088470984710847118471284713847148471584716847178471884719847208472184722847238472484725847268472784728847298473084731847328473384734847358473684737847388473984740847418474284743847448474584746847478474884749847508475184752847538475484755847568475784758847598476084761847628476384764847658476684767847688476984770847718477284773847748477584776847778477884779847808478184782847838478484785847868478784788847898479084791847928479384794847958479684797847988479984800848018480284803848048480584806848078480884809848108481184812848138481484815848168481784818848198482084821848228482384824848258482684827848288482984830848318483284833848348483584836848378483884839848408484184842848438484484845848468484784848848498485084851848528485384854848558485684857848588485984860848618486284863848648486584866848678486884869848708487184872848738487484875848768487784878848798488084881848828488384884848858488684887848888488984890848918489284893848948489584896848978489884899849008490184902849038490484905849068490784908849098491084911849128491384914849158491684917849188491984920849218492284923849248492584926849278492884929849308493184932849338493484935849368493784938849398494084941849428494384944849458494684947849488494984950849518495284953849548495584956849578495884959849608496184962849638496484965849668496784968849698497084971849728497384974849758497684977849788497984980849818498284983849848498584986849878498884989849908499184992849938499484995849968499784998849998500085001850028500385004850058500685007850088500985010850118501285013850148501585016850178501885019850208502185022850238502485025850268502785028850298503085031850328503385034850358503685037850388503985040850418504285043850448504585046850478504885049850508505185052850538505485055850568505785058850598506085061850628506385064850658506685067850688506985070850718507285073850748507585076850778507885079850808508185082850838508485085850868508785088850898509085091850928509385094850958509685097850988509985100851018510285103851048510585106851078510885109851108511185112851138511485115851168511785118851198512085121851228512385124851258512685127851288512985130851318513285133851348513585136851378513885139851408514185142851438514485145851468514785148851498515085151851528515385154851558515685157851588515985160851618516285163851648516585166851678516885169851708517185172851738517485175851768517785178851798518085181851828518385184851858518685187851888518985190851918519285193851948519585196851978519885199852008520185202852038520485205852068520785208852098521085211852128521385214852158521685217852188521985220852218522285223852248522585226852278522885229852308523185232852338523485235852368523785238852398524085241852428524385244852458524685247852488524985250852518525285253852548525585256852578525885259852608526185262852638526485265852668526785268852698527085271852728527385274852758527685277852788527985280852818528285283852848528585286852878528885289852908529185292852938529485295852968529785298852998530085301853028530385304853058530685307853088530985310853118531285313853148531585316853178531885319853208532185322853238532485325853268532785328853298533085331853328533385334853358533685337853388533985340853418534285343853448534585346853478534885349853508535185352853538535485355853568535785358853598536085361853628536385364853658536685367853688536985370853718537285373853748537585376853778537885379853808538185382853838538485385853868538785388853898539085391853928539385394853958539685397853988539985400854018540285403854048540585406854078540885409854108541185412854138541485415854168541785418854198542085421854228542385424854258542685427854288542985430854318543285433854348543585436854378543885439854408544185442854438544485445854468544785448854498545085451854528545385454854558545685457854588545985460854618546285463854648546585466854678546885469854708547185472854738547485475854768547785478854798548085481854828548385484854858548685487854888548985490854918549285493854948549585496854978549885499855008550185502855038550485505855068550785508855098551085511855128551385514855158551685517855188551985520855218552285523855248552585526855278552885529855308553185532855338553485535855368553785538855398554085541855428554385544855458554685547855488554985550855518555285553855548555585556855578555885559855608556185562855638556485565855668556785568855698557085571855728557385574855758557685577855788557985580855818558285583855848558585586855878558885589855908559185592855938559485595855968559785598855998560085601856028560385604856058560685607856088560985610856118561285613856148561585616856178561885619856208562185622856238562485625856268562785628856298563085631856328563385634856358563685637856388563985640856418564285643856448564585646856478564885649856508565185652856538565485655856568565785658856598566085661856628566385664856658566685667856688566985670856718567285673856748567585676856778567885679856808568185682856838568485685856868568785688856898569085691856928569385694856958569685697856988569985700857018570285703857048570585706857078570885709857108571185712857138571485715857168571785718857198572085721857228572385724857258572685727857288572985730857318573285733857348573585736857378573885739857408574185742857438574485745857468574785748857498575085751857528575385754857558575685757857588575985760857618576285763857648576585766857678576885769857708577185772857738577485775857768577785778857798578085781857828578385784857858578685787857888578985790857918579285793857948579585796857978579885799858008580185802858038580485805858068580785808858098581085811858128581385814858158581685817858188581985820858218582285823858248582585826858278582885829858308583185832858338583485835858368583785838858398584085841858428584385844858458584685847858488584985850858518585285853858548585585856858578585885859858608586185862858638586485865858668586785868858698587085871858728587385874858758587685877858788587985880858818588285883858848588585886858878588885889858908589185892858938589485895858968589785898858998590085901859028590385904859058590685907859088590985910859118591285913859148591585916859178591885919859208592185922859238592485925859268592785928859298593085931859328593385934859358593685937859388593985940859418594285943859448594585946859478594885949859508595185952859538595485955859568595785958859598596085961859628596385964859658596685967859688596985970859718597285973859748597585976859778597885979859808598185982859838598485985859868598785988859898599085991859928599385994859958599685997859988599986000860018600286003860048600586006860078600886009860108601186012860138601486015860168601786018860198602086021860228602386024860258602686027860288602986030860318603286033860348603586036860378603886039860408604186042860438604486045860468604786048860498605086051860528605386054860558605686057860588605986060860618606286063860648606586066860678606886069860708607186072860738607486075860768607786078860798608086081860828608386084860858608686087860888608986090860918609286093860948609586096860978609886099861008610186102861038610486105861068610786108861098611086111861128611386114861158611686117861188611986120861218612286123861248612586126861278612886129861308613186132861338613486135861368613786138861398614086141861428614386144861458614686147861488614986150861518615286153861548615586156861578615886159861608616186162861638616486165861668616786168861698617086171861728617386174861758617686177861788617986180861818618286183861848618586186861878618886189861908619186192861938619486195861968619786198861998620086201862028620386204862058620686207862088620986210862118621286213862148621586216862178621886219862208622186222862238622486225862268622786228862298623086231862328623386234862358623686237862388623986240862418624286243862448624586246862478624886249862508625186252862538625486255862568625786258862598626086261862628626386264862658626686267862688626986270862718627286273862748627586276862778627886279862808628186282862838628486285862868628786288862898629086291862928629386294862958629686297862988629986300863018630286303863048630586306863078630886309863108631186312863138631486315863168631786318863198632086321863228632386324863258632686327863288632986330863318633286333863348633586336863378633886339863408634186342863438634486345863468634786348863498635086351863528635386354863558635686357863588635986360863618636286363863648636586366863678636886369863708637186372863738637486375863768637786378863798638086381863828638386384863858638686387863888638986390863918639286393863948639586396863978639886399864008640186402864038640486405864068640786408864098641086411864128641386414864158641686417864188641986420864218642286423864248642586426864278642886429864308643186432864338643486435864368643786438864398644086441864428644386444864458644686447864488644986450864518645286453864548645586456864578645886459864608646186462864638646486465864668646786468864698647086471864728647386474864758647686477864788647986480864818648286483864848648586486864878648886489864908649186492864938649486495864968649786498864998650086501865028650386504865058650686507865088650986510865118651286513865148651586516865178651886519865208652186522865238652486525865268652786528865298653086531865328653386534865358653686537865388653986540865418654286543865448654586546865478654886549865508655186552865538655486555865568655786558865598656086561865628656386564865658656686567865688656986570865718657286573865748657586576865778657886579865808658186582865838658486585865868658786588865898659086591865928659386594865958659686597865988659986600866018660286603866048660586606866078660886609866108661186612866138661486615866168661786618866198662086621866228662386624866258662686627866288662986630866318663286633866348663586636866378663886639866408664186642866438664486645866468664786648866498665086651866528665386654866558665686657866588665986660866618666286663866648666586666866678666886669866708667186672866738667486675866768667786678866798668086681866828668386684866858668686687866888668986690866918669286693866948669586696866978669886699867008670186702867038670486705867068670786708867098671086711867128671386714867158671686717867188671986720867218672286723867248672586726867278672886729867308673186732867338673486735867368673786738867398674086741867428674386744867458674686747867488674986750867518675286753867548675586756867578675886759867608676186762867638676486765867668676786768867698677086771867728677386774867758677686777867788677986780867818678286783867848678586786867878678886789867908679186792867938679486795867968679786798867998680086801868028680386804868058680686807868088680986810868118681286813868148681586816868178681886819868208682186822868238682486825868268682786828868298683086831868328683386834868358683686837868388683986840868418684286843868448684586846868478684886849868508685186852868538685486855868568685786858868598686086861868628686386864868658686686867868688686986870868718687286873868748687586876868778687886879868808688186882868838688486885868868688786888868898689086891868928689386894868958689686897868988689986900869018690286903869048690586906869078690886909869108691186912869138691486915869168691786918869198692086921869228692386924869258692686927869288692986930869318693286933869348693586936869378693886939869408694186942869438694486945869468694786948869498695086951869528695386954869558695686957869588695986960869618696286963869648696586966869678696886969869708697186972869738697486975869768697786978869798698086981869828698386984869858698686987869888698986990869918699286993869948699586996869978699886999870008700187002870038700487005870068700787008870098701087011870128701387014870158701687017870188701987020870218702287023870248702587026870278702887029870308703187032870338703487035870368703787038870398704087041870428704387044870458704687047870488704987050870518705287053870548705587056870578705887059870608706187062870638706487065870668706787068870698707087071870728707387074870758707687077870788707987080870818708287083870848708587086870878708887089870908709187092870938709487095870968709787098870998710087101871028710387104871058710687107871088710987110871118711287113871148711587116871178711887119871208712187122871238712487125871268712787128871298713087131871328713387134871358713687137871388713987140871418714287143871448714587146871478714887149871508715187152871538715487155871568715787158871598716087161871628716387164871658716687167871688716987170871718717287173871748717587176871778717887179871808718187182871838718487185871868718787188871898719087191871928719387194871958719687197871988719987200872018720287203872048720587206872078720887209872108721187212872138721487215872168721787218872198722087221872228722387224872258722687227872288722987230872318723287233872348723587236872378723887239872408724187242872438724487245872468724787248872498725087251872528725387254872558725687257872588725987260872618726287263872648726587266872678726887269872708727187272872738727487275872768727787278872798728087281872828728387284872858728687287872888728987290872918729287293872948729587296872978729887299873008730187302873038730487305873068730787308873098731087311873128731387314873158731687317873188731987320873218732287323873248732587326873278732887329873308733187332873338733487335873368733787338873398734087341873428734387344873458734687347873488734987350873518735287353873548735587356873578735887359873608736187362873638736487365873668736787368873698737087371873728737387374873758737687377873788737987380873818738287383873848738587386873878738887389873908739187392873938739487395873968739787398873998740087401874028740387404874058740687407874088740987410874118741287413874148741587416874178741887419874208742187422874238742487425874268742787428874298743087431874328743387434874358743687437874388743987440874418744287443874448744587446874478744887449874508745187452874538745487455874568745787458874598746087461874628746387464874658746687467874688746987470874718747287473874748747587476874778747887479874808748187482874838748487485874868748787488874898749087491874928749387494874958749687497874988749987500875018750287503875048750587506875078750887509875108751187512875138751487515875168751787518875198752087521875228752387524875258752687527875288752987530875318753287533875348753587536875378753887539875408754187542875438754487545875468754787548875498755087551875528755387554875558755687557875588755987560875618756287563875648756587566875678756887569875708757187572875738757487575875768757787578875798758087581875828758387584875858758687587875888758987590875918759287593875948759587596875978759887599876008760187602876038760487605876068760787608876098761087611876128761387614876158761687617876188761987620876218762287623876248762587626876278762887629876308763187632876338763487635876368763787638876398764087641876428764387644876458764687647876488764987650876518765287653876548765587656876578765887659876608766187662876638766487665876668766787668876698767087671876728767387674876758767687677876788767987680876818768287683876848768587686876878768887689876908769187692876938769487695876968769787698876998770087701877028770387704877058770687707877088770987710877118771287713877148771587716877178771887719877208772187722877238772487725877268772787728877298773087731877328773387734877358773687737877388773987740877418774287743877448774587746877478774887749877508775187752877538775487755877568775787758877598776087761877628776387764877658776687767877688776987770877718777287773877748777587776877778777887779877808778187782877838778487785877868778787788877898779087791877928779387794877958779687797877988779987800878018780287803878048780587806878078780887809878108781187812878138781487815878168781787818878198782087821878228782387824878258782687827878288782987830878318783287833878348783587836878378783887839878408784187842878438784487845878468784787848878498785087851878528785387854878558785687857878588785987860878618786287863878648786587866878678786887869878708787187872878738787487875878768787787878878798788087881878828788387884878858788687887878888788987890878918789287893878948789587896878978789887899879008790187902879038790487905879068790787908879098791087911879128791387914879158791687917879188791987920879218792287923879248792587926879278792887929879308793187932879338793487935879368793787938879398794087941879428794387944879458794687947879488794987950879518795287953879548795587956879578795887959879608796187962879638796487965879668796787968879698797087971879728797387974879758797687977879788797987980879818798287983879848798587986879878798887989879908799187992879938799487995879968799787998879998800088001880028800388004880058800688007880088800988010880118801288013880148801588016880178801888019880208802188022880238802488025880268802788028880298803088031880328803388034880358803688037880388803988040880418804288043880448804588046880478804888049880508805188052880538805488055880568805788058880598806088061880628806388064880658806688067880688806988070880718807288073880748807588076880778807888079880808808188082880838808488085880868808788088880898809088091880928809388094880958809688097880988809988100881018810288103881048810588106881078810888109881108811188112881138811488115881168811788118881198812088121881228812388124881258812688127881288812988130881318813288133881348813588136881378813888139881408814188142881438814488145881468814788148881498815088151881528815388154881558815688157881588815988160881618816288163881648816588166881678816888169881708817188172881738817488175881768817788178881798818088181881828818388184881858818688187881888818988190881918819288193881948819588196881978819888199882008820188202882038820488205882068820788208882098821088211882128821388214882158821688217882188821988220882218822288223882248822588226882278822888229882308823188232882338823488235882368823788238882398824088241882428824388244882458824688247882488824988250882518825288253882548825588256882578825888259882608826188262882638826488265882668826788268882698827088271882728827388274882758827688277882788827988280882818828288283882848828588286882878828888289882908829188292882938829488295882968829788298882998830088301883028830388304883058830688307883088830988310883118831288313883148831588316883178831888319883208832188322883238832488325883268832788328883298833088331883328833388334883358833688337883388833988340883418834288343883448834588346883478834888349883508835188352883538835488355883568835788358883598836088361883628836388364883658836688367883688836988370883718837288373883748837588376883778837888379883808838188382883838838488385883868838788388883898839088391883928839388394883958839688397883988839988400884018840288403884048840588406884078840888409884108841188412884138841488415884168841788418884198842088421884228842388424884258842688427884288842988430884318843288433884348843588436884378843888439884408844188442884438844488445884468844788448884498845088451884528845388454884558845688457884588845988460884618846288463884648846588466884678846888469884708847188472884738847488475884768847788478884798848088481884828848388484884858848688487884888848988490884918849288493884948849588496884978849888499885008850188502885038850488505885068850788508885098851088511885128851388514885158851688517885188851988520885218852288523885248852588526885278852888529885308853188532885338853488535885368853788538885398854088541885428854388544885458854688547885488854988550885518855288553885548855588556885578855888559885608856188562885638856488565885668856788568885698857088571885728857388574885758857688577885788857988580885818858288583885848858588586885878858888589885908859188592885938859488595885968859788598885998860088601886028860388604886058860688607886088860988610886118861288613886148861588616886178861888619886208862188622886238862488625886268862788628886298863088631886328863388634886358863688637886388863988640886418864288643886448864588646886478864888649886508865188652886538865488655886568865788658886598866088661886628866388664886658866688667886688866988670886718867288673886748867588676886778867888679886808868188682886838868488685886868868788688886898869088691886928869388694886958869688697886988869988700887018870288703887048870588706887078870888709887108871188712887138871488715887168871788718887198872088721887228872388724887258872688727887288872988730887318873288733887348873588736887378873888739887408874188742887438874488745887468874788748887498875088751887528875388754887558875688757887588875988760887618876288763887648876588766887678876888769887708877188772887738877488775887768877788778887798878088781887828878388784887858878688787887888878988790887918879288793887948879588796887978879888799888008880188802888038880488805888068880788808888098881088811888128881388814888158881688817888188881988820888218882288823888248882588826888278882888829888308883188832888338883488835888368883788838888398884088841888428884388844888458884688847888488884988850888518885288853888548885588856888578885888859888608886188862888638886488865888668886788868888698887088871888728887388874888758887688877888788887988880888818888288883888848888588886888878888888889888908889188892888938889488895888968889788898888998890088901889028890388904889058890688907889088890988910889118891288913889148891588916889178891888919889208892188922889238892488925889268892788928889298893088931889328893388934889358893688937889388893988940889418894288943889448894588946889478894888949889508895188952889538895488955889568895788958889598896088961889628896388964889658896688967889688896988970889718897288973889748897588976889778897888979889808898188982889838898488985889868898788988889898899088991889928899388994889958899688997889988899989000890018900289003890048900589006890078900889009890108901189012890138901489015890168901789018890198902089021890228902389024890258902689027890288902989030890318903289033890348903589036890378903889039890408904189042890438904489045890468904789048890498905089051890528905389054890558905689057890588905989060890618906289063890648906589066890678906889069890708907189072890738907489075890768907789078890798908089081890828908389084890858908689087890888908989090890918909289093890948909589096890978909889099891008910189102891038910489105891068910789108891098911089111891128911389114891158911689117891188911989120891218912289123891248912589126891278912889129891308913189132891338913489135891368913789138891398914089141891428914389144891458914689147891488914989150891518915289153891548915589156891578915889159891608916189162891638916489165891668916789168891698917089171891728917389174891758917689177891788917989180891818918289183891848918589186891878918889189891908919189192891938919489195891968919789198891998920089201892028920389204892058920689207892088920989210892118921289213892148921589216892178921889219892208922189222892238922489225892268922789228892298923089231892328923389234892358923689237892388923989240892418924289243892448924589246892478924889249892508925189252892538925489255892568925789258892598926089261892628926389264892658926689267892688926989270892718927289273892748927589276892778927889279892808928189282892838928489285892868928789288892898929089291892928929389294892958929689297892988929989300893018930289303893048930589306893078930889309893108931189312893138931489315893168931789318893198932089321893228932389324893258932689327893288932989330893318933289333893348933589336893378933889339893408934189342893438934489345893468934789348893498935089351893528935389354893558935689357893588935989360893618936289363893648936589366893678936889369893708937189372893738937489375893768937789378893798938089381893828938389384893858938689387893888938989390893918939289393893948939589396893978939889399894008940189402894038940489405894068940789408894098941089411894128941389414894158941689417894188941989420894218942289423894248942589426894278942889429894308943189432894338943489435894368943789438894398944089441894428944389444894458944689447894488944989450894518945289453894548945589456894578945889459894608946189462894638946489465894668946789468894698947089471894728947389474894758947689477894788947989480894818948289483894848948589486894878948889489894908949189492894938949489495894968949789498894998950089501895028950389504895058950689507895088950989510895118951289513895148951589516895178951889519895208952189522895238952489525895268952789528895298953089531895328953389534895358953689537895388953989540895418954289543895448954589546895478954889549895508955189552895538955489555895568955789558895598956089561895628956389564895658956689567895688956989570895718957289573895748957589576895778957889579895808958189582895838958489585895868958789588895898959089591895928959389594895958959689597895988959989600896018960289603896048960589606896078960889609896108961189612896138961489615896168961789618896198962089621896228962389624896258962689627896288962989630896318963289633896348963589636896378963889639896408964189642896438964489645896468964789648896498965089651896528965389654896558965689657896588965989660896618966289663896648966589666896678966889669896708967189672896738967489675896768967789678896798968089681896828968389684896858968689687896888968989690896918969289693896948969589696896978969889699897008970189702897038970489705897068970789708897098971089711897128971389714897158971689717897188971989720897218972289723897248972589726897278972889729897308973189732897338973489735897368973789738897398974089741897428974389744897458974689747897488974989750897518975289753897548975589756897578975889759897608976189762897638976489765897668976789768897698977089771897728977389774897758977689777897788977989780897818978289783897848978589786897878978889789897908979189792897938979489795897968979789798897998980089801898028980389804898058980689807898088980989810898118981289813898148981589816898178981889819898208982189822898238982489825898268982789828898298983089831898328983389834898358983689837898388983989840898418984289843898448984589846898478984889849898508985189852898538985489855898568985789858898598986089861898628986389864898658986689867898688986989870898718987289873898748987589876898778987889879898808988189882898838988489885898868988789888898898989089891898928989389894898958989689897898988989989900899018990289903899048990589906899078990889909899108991189912899138991489915899168991789918899198992089921899228992389924899258992689927899288992989930899318993289933899348993589936899378993889939899408994189942899438994489945899468994789948899498995089951899528995389954899558995689957899588995989960899618996289963899648996589966899678996889969899708997189972899738997489975899768997789978899798998089981899828998389984899858998689987899888998989990899918999289993899948999589996899978999889999900009000190002900039000490005900069000790008900099001090011900129001390014900159001690017900189001990020900219002290023900249002590026900279002890029900309003190032900339003490035900369003790038900399004090041900429004390044900459004690047900489004990050900519005290053900549005590056900579005890059900609006190062900639006490065900669006790068900699007090071900729007390074900759007690077900789007990080900819008290083900849008590086900879008890089900909009190092900939009490095900969009790098900999010090101901029010390104901059010690107901089010990110901119011290113901149011590116901179011890119901209012190122901239012490125901269012790128901299013090131901329013390134901359013690137901389013990140901419014290143901449014590146901479014890149901509015190152901539015490155901569015790158901599016090161901629016390164901659016690167901689016990170901719017290173901749017590176901779017890179901809018190182901839018490185901869018790188901899019090191901929019390194901959019690197901989019990200902019020290203902049020590206902079020890209902109021190212902139021490215902169021790218902199022090221902229022390224902259022690227902289022990230902319023290233902349023590236902379023890239902409024190242902439024490245902469024790248902499025090251902529025390254902559025690257902589025990260902619026290263902649026590266902679026890269902709027190272902739027490275902769027790278902799028090281902829028390284902859028690287902889028990290902919029290293902949029590296902979029890299903009030190302903039030490305903069030790308903099031090311903129031390314903159031690317903189031990320903219032290323903249032590326903279032890329903309033190332903339033490335903369033790338903399034090341903429034390344903459034690347903489034990350903519035290353903549035590356903579035890359903609036190362903639036490365903669036790368903699037090371903729037390374903759037690377903789037990380903819038290383903849038590386903879038890389903909039190392903939039490395903969039790398903999040090401904029040390404904059040690407904089040990410904119041290413904149041590416904179041890419904209042190422904239042490425904269042790428904299043090431904329043390434904359043690437904389043990440904419044290443904449044590446904479044890449904509045190452904539045490455904569045790458904599046090461904629046390464904659046690467904689046990470904719047290473904749047590476904779047890479904809048190482904839048490485904869048790488904899049090491904929049390494904959049690497904989049990500905019050290503905049050590506905079050890509905109051190512905139051490515905169051790518905199052090521905229052390524905259052690527905289052990530905319053290533905349053590536905379053890539905409054190542905439054490545905469054790548905499055090551905529055390554905559055690557905589055990560905619056290563905649056590566905679056890569905709057190572905739057490575905769057790578905799058090581905829058390584905859058690587905889058990590905919059290593905949059590596905979059890599906009060190602906039060490605906069060790608906099061090611906129061390614906159061690617906189061990620906219062290623906249062590626906279062890629906309063190632906339063490635906369063790638906399064090641906429064390644906459064690647906489064990650906519065290653906549065590656906579065890659906609066190662906639066490665906669066790668906699067090671906729067390674906759067690677906789067990680906819068290683906849068590686906879068890689906909069190692906939069490695906969069790698906999070090701907029070390704907059070690707907089070990710907119071290713907149071590716907179071890719907209072190722907239072490725907269072790728907299073090731907329073390734907359073690737907389073990740907419074290743907449074590746907479074890749907509075190752907539075490755907569075790758907599076090761907629076390764907659076690767907689076990770907719077290773907749077590776907779077890779907809078190782907839078490785907869078790788907899079090791907929079390794907959079690797907989079990800908019080290803908049080590806908079080890809908109081190812908139081490815908169081790818908199082090821908229082390824908259082690827908289082990830908319083290833908349083590836908379083890839908409084190842908439084490845908469084790848908499085090851908529085390854908559085690857908589085990860908619086290863908649086590866908679086890869908709087190872908739087490875908769087790878908799088090881908829088390884908859088690887908889088990890908919089290893908949089590896908979089890899909009090190902909039090490905909069090790908909099091090911909129091390914909159091690917909189091990920909219092290923909249092590926909279092890929909309093190932909339093490935909369093790938909399094090941909429094390944909459094690947909489094990950909519095290953909549095590956909579095890959909609096190962909639096490965909669096790968909699097090971909729097390974909759097690977909789097990980909819098290983909849098590986909879098890989909909099190992909939099490995909969099790998909999100091001910029100391004910059100691007910089100991010910119101291013910149101591016910179101891019910209102191022910239102491025910269102791028910299103091031910329103391034910359103691037910389103991040910419104291043910449104591046910479104891049910509105191052910539105491055910569105791058910599106091061910629106391064910659106691067910689106991070910719107291073910749107591076910779107891079910809108191082910839108491085910869108791088910899109091091910929109391094910959109691097910989109991100911019110291103911049110591106911079110891109911109111191112911139111491115911169111791118911199112091121911229112391124911259112691127911289112991130911319113291133911349113591136911379113891139911409114191142911439114491145911469114791148911499115091151911529115391154911559115691157911589115991160911619116291163911649116591166911679116891169911709117191172911739117491175911769117791178911799118091181911829118391184911859118691187911889118991190911919119291193911949119591196911979119891199912009120191202912039120491205912069120791208912099121091211912129121391214912159121691217912189121991220912219122291223912249122591226912279122891229912309123191232912339123491235912369123791238912399124091241912429124391244912459124691247912489124991250912519125291253912549125591256912579125891259912609126191262912639126491265912669126791268912699127091271912729127391274912759127691277912789127991280912819128291283912849128591286912879128891289912909129191292912939129491295912969129791298912999130091301913029130391304913059130691307913089130991310913119131291313913149131591316913179131891319913209132191322913239132491325913269132791328913299133091331913329133391334913359133691337913389133991340913419134291343913449134591346913479134891349913509135191352913539135491355913569135791358913599136091361913629136391364913659136691367913689136991370913719137291373913749137591376913779137891379913809138191382913839138491385913869138791388913899139091391913929139391394913959139691397913989139991400914019140291403914049140591406914079140891409914109141191412914139141491415914169141791418914199142091421914229142391424914259142691427914289142991430914319143291433914349143591436914379143891439914409144191442914439144491445914469144791448914499145091451914529145391454914559145691457914589145991460914619146291463914649146591466914679146891469914709147191472914739147491475914769147791478914799148091481914829148391484914859148691487914889148991490914919149291493914949149591496914979149891499915009150191502915039150491505915069150791508915099151091511915129151391514915159151691517915189151991520915219152291523915249152591526915279152891529915309153191532915339153491535915369153791538915399154091541915429154391544915459154691547915489154991550915519155291553915549155591556915579155891559915609156191562915639156491565915669156791568915699157091571915729157391574915759157691577915789157991580915819158291583915849158591586915879158891589915909159191592915939159491595915969159791598915999160091601916029160391604916059160691607916089160991610916119161291613916149161591616916179161891619916209162191622916239162491625916269162791628916299163091631916329163391634916359163691637916389163991640916419164291643916449164591646916479164891649916509165191652916539165491655916569165791658916599166091661916629166391664916659166691667916689166991670916719167291673916749167591676916779167891679916809168191682916839168491685916869168791688916899169091691916929169391694916959169691697916989169991700917019170291703917049170591706917079170891709917109171191712917139171491715917169171791718917199172091721917229172391724917259172691727917289172991730917319173291733917349173591736917379173891739917409174191742917439174491745917469174791748917499175091751917529175391754917559175691757917589175991760917619176291763917649176591766917679176891769917709177191772917739177491775917769177791778917799178091781917829178391784917859178691787917889178991790917919179291793917949179591796917979179891799918009180191802918039180491805918069180791808918099181091811918129181391814918159181691817918189181991820918219182291823918249182591826918279182891829918309183191832918339183491835918369183791838918399184091841918429184391844918459184691847918489184991850918519185291853918549185591856918579185891859918609186191862918639186491865918669186791868918699187091871918729187391874918759187691877918789187991880918819188291883918849188591886918879188891889918909189191892918939189491895918969189791898918999190091901919029190391904919059190691907919089190991910919119191291913919149191591916919179191891919919209192191922919239192491925919269192791928919299193091931919329193391934919359193691937919389193991940919419194291943919449194591946919479194891949919509195191952919539195491955919569195791958919599196091961919629196391964919659196691967919689196991970919719197291973919749197591976919779197891979919809198191982919839198491985919869198791988919899199091991919929199391994919959199691997919989199992000920019200292003920049200592006920079200892009920109201192012920139201492015920169201792018920199202092021920229202392024920259202692027920289202992030920319203292033920349203592036920379203892039920409204192042920439204492045920469204792048920499205092051920529205392054920559205692057920589205992060920619206292063920649206592066920679206892069920709207192072920739207492075920769207792078920799208092081920829208392084920859208692087920889208992090920919209292093920949209592096920979209892099921009210192102921039210492105921069210792108921099211092111921129211392114921159211692117921189211992120921219212292123921249212592126921279212892129921309213192132921339213492135921369213792138921399214092141921429214392144921459214692147921489214992150921519215292153921549215592156921579215892159921609216192162921639216492165921669216792168921699217092171921729217392174921759217692177921789217992180921819218292183921849218592186921879218892189921909219192192921939219492195921969219792198921999220092201922029220392204922059220692207922089220992210922119221292213922149221592216922179221892219922209222192222922239222492225922269222792228922299223092231922329223392234922359223692237922389223992240922419224292243922449224592246922479224892249922509225192252922539225492255922569225792258922599226092261922629226392264922659226692267922689226992270922719227292273922749227592276922779227892279922809228192282922839228492285922869228792288922899229092291922929229392294922959229692297922989229992300923019230292303923049230592306923079230892309923109231192312923139231492315923169231792318923199232092321923229232392324923259232692327923289232992330923319233292333923349233592336923379233892339923409234192342923439234492345923469234792348923499235092351923529235392354923559235692357923589235992360923619236292363923649236592366923679236892369923709237192372923739237492375923769237792378923799238092381923829238392384923859238692387923889238992390923919239292393923949239592396923979239892399924009240192402924039240492405924069240792408924099241092411924129241392414924159241692417924189241992420924219242292423924249242592426924279242892429924309243192432924339243492435924369243792438924399244092441924429244392444924459244692447924489244992450924519245292453924549245592456924579245892459924609246192462924639246492465924669246792468924699247092471924729247392474924759247692477924789247992480924819248292483924849248592486924879248892489924909249192492924939249492495924969249792498924999250092501925029250392504925059250692507925089250992510925119251292513925149251592516925179251892519925209252192522925239252492525925269252792528925299253092531925329253392534925359253692537925389253992540925419254292543925449254592546925479254892549925509255192552925539255492555925569255792558925599256092561925629256392564925659256692567925689256992570925719257292573925749257592576925779257892579925809258192582925839258492585925869258792588925899259092591925929259392594925959259692597925989259992600926019260292603926049260592606926079260892609926109261192612926139261492615926169261792618926199262092621926229262392624926259262692627926289262992630926319263292633926349263592636926379263892639926409264192642926439264492645926469264792648926499265092651926529265392654926559265692657926589265992660926619266292663926649266592666926679266892669926709267192672926739267492675926769267792678926799268092681926829268392684926859268692687926889268992690926919269292693926949269592696926979269892699927009270192702927039270492705927069270792708927099271092711927129271392714927159271692717927189271992720927219272292723927249272592726927279272892729927309273192732927339273492735927369273792738927399274092741927429274392744927459274692747927489274992750927519275292753927549275592756927579275892759927609276192762927639276492765927669276792768927699277092771927729277392774927759277692777927789277992780927819278292783927849278592786927879278892789927909279192792927939279492795927969279792798927999280092801928029280392804928059280692807928089280992810928119281292813928149281592816928179281892819928209282192822928239282492825928269282792828928299283092831928329283392834928359283692837928389283992840928419284292843928449284592846928479284892849928509285192852928539285492855928569285792858928599286092861928629286392864928659286692867928689286992870928719287292873928749287592876928779287892879928809288192882928839288492885928869288792888928899289092891928929289392894928959289692897928989289992900929019290292903929049290592906929079290892909929109291192912929139291492915929169291792918929199292092921929229292392924929259292692927929289292992930929319293292933929349293592936929379293892939929409294192942929439294492945929469294792948929499295092951929529295392954929559295692957929589295992960929619296292963929649296592966929679296892969929709297192972929739297492975929769297792978929799298092981929829298392984929859298692987929889298992990929919299292993929949299592996929979299892999930009300193002930039300493005
  1. (self["webpackChunkGrav"] = self["webpackChunkGrav"] || []).push([[736],{
  2. /***/ 26981:
  3. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4. "use strict";
  5. __webpack_require__(11983);
  6. var _global = _interopRequireDefault(__webpack_require__(40115));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  8. if (_global["default"]._babelPolyfill && typeof console !== "undefined" && console.warn) {
  9. console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended " + "and may have consequences if different versions of the polyfills are applied sequentially. " + "If you do need to load the polyfill more than once, use @babel/polyfill/noConflict " + "instead to bypass the warning.");
  10. }
  11. _global["default"]._babelPolyfill = true;
  12. /***/ }),
  13. /***/ 11983:
  14. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15. "use strict";
  16. __webpack_require__(16266);
  17. __webpack_require__(10990);
  18. __webpack_require__(70911);
  19. __webpack_require__(14160);
  20. __webpack_require__(6197);
  21. __webpack_require__(96728);
  22. __webpack_require__(54039);
  23. __webpack_require__(93568);
  24. __webpack_require__(78051);
  25. __webpack_require__(38250);
  26. __webpack_require__(15434);
  27. __webpack_require__(54952);
  28. __webpack_require__(96337);
  29. __webpack_require__(35666);
  30. /***/ }),
  31. /***/ 31807:
  32. /***/ ((module) => {
  33. var canUseDOM = !!(
  34. typeof window !== 'undefined' &&
  35. window.document &&
  36. window.document.createElement
  37. );
  38. module.exports = canUseDOM;
  39. /***/ }),
  40. /***/ 69259:
  41. /***/ (function(module, exports, __webpack_require__) {
  42. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {
  43. if (true) {
  44. // AMD. Register as an anonymous module unless amdModuleId is set
  45. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  46. return (root['Chartist'] = factory());
  47. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  48. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  49. } else {}
  50. }(this, function () {
  51. /* Chartist.js 0.11.4
  52. * Copyright © 2019 Gion Kunz
  53. * Free to use under either the WTFPL license or the MIT license.
  54. * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL
  55. * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT
  56. */
  57. /**
  58. * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules.
  59. *
  60. * @module Chartist.Core
  61. */
  62. var Chartist = {
  63. version: '0.11.4'
  64. };
  65. (function (globalRoot, Chartist) {
  66. 'use strict';
  67. var window = globalRoot.window;
  68. var document = globalRoot.document;
  69. /**
  70. * This object contains all namespaces used within Chartist.
  71. *
  72. * @memberof Chartist.Core
  73. * @type {{svg: string, xmlns: string, xhtml: string, xlink: string, ct: string}}
  74. */
  75. Chartist.namespaces = {
  76. svg: 'http://www.w3.org/2000/svg',
  77. xmlns: 'http://www.w3.org/2000/xmlns/',
  78. xhtml: 'http://www.w3.org/1999/xhtml',
  79. xlink: 'http://www.w3.org/1999/xlink',
  80. ct: 'http://gionkunz.github.com/chartist-js/ct'
  81. };
  82. /**
  83. * Helps to simplify functional style code
  84. *
  85. * @memberof Chartist.Core
  86. * @param {*} n This exact value will be returned by the noop function
  87. * @return {*} The same value that was provided to the n parameter
  88. */
  89. Chartist.noop = function (n) {
  90. return n;
  91. };
  92. /**
  93. * Generates a-z from a number 0 to 26
  94. *
  95. * @memberof Chartist.Core
  96. * @param {Number} n A number from 0 to 26 that will result in a letter a-z
  97. * @return {String} A character from a-z based on the input number n
  98. */
  99. Chartist.alphaNumerate = function (n) {
  100. // Limit to a-z
  101. return String.fromCharCode(97 + n % 26);
  102. };
  103. /**
  104. * Simple recursive object extend
  105. *
  106. * @memberof Chartist.Core
  107. * @param {Object} target Target object where the source will be merged into
  108. * @param {Object...} sources This object (objects) will be merged into target and then target is returned
  109. * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source
  110. */
  111. Chartist.extend = function (target) {
  112. var i, source, sourceProp;
  113. target = target || {};
  114. for (i = 1; i < arguments.length; i++) {
  115. source = arguments[i];
  116. for (var prop in source) {
  117. sourceProp = source[prop];
  118. if (typeof sourceProp === 'object' && sourceProp !== null && !(sourceProp instanceof Array)) {
  119. target[prop] = Chartist.extend(target[prop], sourceProp);
  120. } else {
  121. target[prop] = sourceProp;
  122. }
  123. }
  124. }
  125. return target;
  126. };
  127. /**
  128. * Replaces all occurrences of subStr in str with newSubStr and returns a new string.
  129. *
  130. * @memberof Chartist.Core
  131. * @param {String} str
  132. * @param {String} subStr
  133. * @param {String} newSubStr
  134. * @return {String}
  135. */
  136. Chartist.replaceAll = function(str, subStr, newSubStr) {
  137. return str.replace(new RegExp(subStr, 'g'), newSubStr);
  138. };
  139. /**
  140. * Converts a number to a string with a unit. If a string is passed then this will be returned unmodified.
  141. *
  142. * @memberof Chartist.Core
  143. * @param {Number} value
  144. * @param {String} unit
  145. * @return {String} Returns the passed number value with unit.
  146. */
  147. Chartist.ensureUnit = function(value, unit) {
  148. if(typeof value === 'number') {
  149. value = value + unit;
  150. }
  151. return value;
  152. };
  153. /**
  154. * Converts a number or string to a quantity object.
  155. *
  156. * @memberof Chartist.Core
  157. * @param {String|Number} input
  158. * @return {Object} Returns an object containing the value as number and the unit as string.
  159. */
  160. Chartist.quantity = function(input) {
  161. if (typeof input === 'string') {
  162. var match = (/^(\d+)\s*(.*)$/g).exec(input);
  163. return {
  164. value : +match[1],
  165. unit: match[2] || undefined
  166. };
  167. }
  168. return { value: input };
  169. };
  170. /**
  171. * This is a wrapper around document.querySelector that will return the query if it's already of type Node
  172. *
  173. * @memberof Chartist.Core
  174. * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly
  175. * @return {Node}
  176. */
  177. Chartist.querySelector = function(query) {
  178. return query instanceof Node ? query : document.querySelector(query);
  179. };
  180. /**
  181. * Functional style helper to produce array with given length initialized with undefined values
  182. *
  183. * @memberof Chartist.Core
  184. * @param length
  185. * @return {Array}
  186. */
  187. Chartist.times = function(length) {
  188. return Array.apply(null, new Array(length));
  189. };
  190. /**
  191. * Sum helper to be used in reduce functions
  192. *
  193. * @memberof Chartist.Core
  194. * @param previous
  195. * @param current
  196. * @return {*}
  197. */
  198. Chartist.sum = function(previous, current) {
  199. return previous + (current ? current : 0);
  200. };
  201. /**
  202. * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor.
  203. *
  204. * @memberof Chartist.Core
  205. * @param {Number} factor
  206. * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array
  207. */
  208. Chartist.mapMultiply = function(factor) {
  209. return function(num) {
  210. return num * factor;
  211. };
  212. };
  213. /**
  214. * Add helper to be used in `Array.map` for adding a addend to each value of an array.
  215. *
  216. * @memberof Chartist.Core
  217. * @param {Number} addend
  218. * @returns {Function} Function that can be used in `Array.map` to add a addend to each value in an array
  219. */
  220. Chartist.mapAdd = function(addend) {
  221. return function(num) {
  222. return num + addend;
  223. };
  224. };
  225. /**
  226. * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).
  227. *
  228. * @memberof Chartist.Core
  229. * @param arr
  230. * @param cb
  231. * @return {Array}
  232. */
  233. Chartist.serialMap = function(arr, cb) {
  234. var result = [],
  235. length = Math.max.apply(null, arr.map(function(e) {
  236. return e.length;
  237. }));
  238. Chartist.times(length).forEach(function(e, index) {
  239. var args = arr.map(function(e) {
  240. return e[index];
  241. });
  242. result[index] = cb.apply(null, args);
  243. });
  244. return result;
  245. };
  246. /**
  247. * This helper function can be used to round values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit.
  248. *
  249. * @memberof Chartist.Core
  250. * @param {Number} value The value that should be rounded with precision
  251. * @param {Number} [digits] The number of digits after decimal used to do the rounding
  252. * @returns {number} Rounded value
  253. */
  254. Chartist.roundWithPrecision = function(value, digits) {
  255. var precision = Math.pow(10, digits || Chartist.precision);
  256. return Math.round(value * precision) / precision;
  257. };
  258. /**
  259. * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number.
  260. *
  261. * @memberof Chartist.Core
  262. * @type {number}
  263. */
  264. Chartist.precision = 8;
  265. /**
  266. * A map with characters to escape for strings to be safely used as attribute values.
  267. *
  268. * @memberof Chartist.Core
  269. * @type {Object}
  270. */
  271. Chartist.escapingMap = {
  272. '&': '&amp;',
  273. '<': '&lt;',
  274. '>': '&gt;',
  275. '"': '&quot;',
  276. '\'': '&#039;'
  277. };
  278. /**
  279. * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap.
  280. * If called with null or undefined the function will return immediately with null or undefined.
  281. *
  282. * @memberof Chartist.Core
  283. * @param {Number|String|Object} data
  284. * @return {String}
  285. */
  286. Chartist.serialize = function(data) {
  287. if(data === null || data === undefined) {
  288. return data;
  289. } else if(typeof data === 'number') {
  290. data = ''+data;
  291. } else if(typeof data === 'object') {
  292. data = JSON.stringify({data: data});
  293. }
  294. return Object.keys(Chartist.escapingMap).reduce(function(result, key) {
  295. return Chartist.replaceAll(result, key, Chartist.escapingMap[key]);
  296. }, data);
  297. };
  298. /**
  299. * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success.
  300. *
  301. * @memberof Chartist.Core
  302. * @param {String} data
  303. * @return {String|Number|Object}
  304. */
  305. Chartist.deserialize = function(data) {
  306. if(typeof data !== 'string') {
  307. return data;
  308. }
  309. data = Object.keys(Chartist.escapingMap).reduce(function(result, key) {
  310. return Chartist.replaceAll(result, Chartist.escapingMap[key], key);
  311. }, data);
  312. try {
  313. data = JSON.parse(data);
  314. data = data.data !== undefined ? data.data : data;
  315. } catch(e) {}
  316. return data;
  317. };
  318. /**
  319. * Create or reinitialize the SVG element for the chart
  320. *
  321. * @memberof Chartist.Core
  322. * @param {Node} container The containing DOM Node object that will be used to plant the SVG element
  323. * @param {String} width Set the width of the SVG element. Default is 100%
  324. * @param {String} height Set the height of the SVG element. Default is 100%
  325. * @param {String} className Specify a class to be added to the SVG element
  326. * @return {Object} The created/reinitialized SVG element
  327. */
  328. Chartist.createSvg = function (container, width, height, className) {
  329. var svg;
  330. width = width || '100%';
  331. height = height || '100%';
  332. // Check if there is a previous SVG element in the container that contains the Chartist XML namespace and remove it
  333. // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/
  334. Array.prototype.slice.call(container.querySelectorAll('svg')).filter(function filterChartistSvgObjects(svg) {
  335. return svg.getAttributeNS(Chartist.namespaces.xmlns, 'ct');
  336. }).forEach(function removePreviousElement(svg) {
  337. container.removeChild(svg);
  338. });
  339. // Create svg object with width and height or use 100% as default
  340. svg = new Chartist.Svg('svg').attr({
  341. width: width,
  342. height: height
  343. }).addClass(className);
  344. svg._node.style.width = width;
  345. svg._node.style.height = height;
  346. // Add the DOM node to our container
  347. container.appendChild(svg._node);
  348. return svg;
  349. };
  350. /**
  351. * Ensures that the data object passed as second argument to the charts is present and correctly initialized.
  352. *
  353. * @param {Object} data The data object that is passed as second argument to the charts
  354. * @return {Object} The normalized data object
  355. */
  356. Chartist.normalizeData = function(data, reverse, multi) {
  357. var labelCount;
  358. var output = {
  359. raw: data,
  360. normalized: {}
  361. };
  362. // Check if we should generate some labels based on existing series data
  363. output.normalized.series = Chartist.getDataArray({
  364. series: data.series || []
  365. }, reverse, multi);
  366. // If all elements of the normalized data array are arrays we're dealing with
  367. // multi series data and we need to find the largest series if they are un-even
  368. if (output.normalized.series.every(function(value) {
  369. return value instanceof Array;
  370. })) {
  371. // Getting the series with the the most elements
  372. labelCount = Math.max.apply(null, output.normalized.series.map(function(series) {
  373. return series.length;
  374. }));
  375. } else {
  376. // We're dealing with Pie data so we just take the normalized array length
  377. labelCount = output.normalized.series.length;
  378. }
  379. output.normalized.labels = (data.labels || []).slice();
  380. // Padding the labels to labelCount with empty strings
  381. Array.prototype.push.apply(
  382. output.normalized.labels,
  383. Chartist.times(Math.max(0, labelCount - output.normalized.labels.length)).map(function() {
  384. return '';
  385. })
  386. );
  387. if(reverse) {
  388. Chartist.reverseData(output.normalized);
  389. }
  390. return output;
  391. };
  392. /**
  393. * This function safely checks if an objects has an owned property.
  394. *
  395. * @param {Object} object The object where to check for a property
  396. * @param {string} property The property name
  397. * @returns {boolean} Returns true if the object owns the specified property
  398. */
  399. Chartist.safeHasProperty = function(object, property) {
  400. return object !== null &&
  401. typeof object === 'object' &&
  402. object.hasOwnProperty(property);
  403. };
  404. /**
  405. * Checks if a value is considered a hole in the data series.
  406. *
  407. * @param {*} value
  408. * @returns {boolean} True if the value is considered a data hole
  409. */
  410. Chartist.isDataHoleValue = function(value) {
  411. return value === null ||
  412. value === undefined ||
  413. (typeof value === 'number' && isNaN(value));
  414. };
  415. /**
  416. * Reverses the series, labels and series data arrays.
  417. *
  418. * @memberof Chartist.Core
  419. * @param data
  420. */
  421. Chartist.reverseData = function(data) {
  422. data.labels.reverse();
  423. data.series.reverse();
  424. for (var i = 0; i < data.series.length; i++) {
  425. if(typeof(data.series[i]) === 'object' && data.series[i].data !== undefined) {
  426. data.series[i].data.reverse();
  427. } else if(data.series[i] instanceof Array) {
  428. data.series[i].reverse();
  429. }
  430. }
  431. };
  432. /**
  433. * Convert data series into plain array
  434. *
  435. * @memberof Chartist.Core
  436. * @param {Object} data The series object that contains the data to be visualized in the chart
  437. * @param {Boolean} [reverse] If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too.
  438. * @param {Boolean} [multi] Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created.
  439. * @return {Array} A plain array that contains the data to be visualized in the chart
  440. */
  441. Chartist.getDataArray = function(data, reverse, multi) {
  442. // Recursively walks through nested arrays and convert string values to numbers and objects with value properties
  443. // to values. Check the tests in data core -> data normalization for a detailed specification of expected values
  444. function recursiveConvert(value) {
  445. if(Chartist.safeHasProperty(value, 'value')) {
  446. // We are dealing with value object notation so we need to recurse on value property
  447. return recursiveConvert(value.value);
  448. } else if(Chartist.safeHasProperty(value, 'data')) {
  449. // We are dealing with series object notation so we need to recurse on data property
  450. return recursiveConvert(value.data);
  451. } else if(value instanceof Array) {
  452. // Data is of type array so we need to recurse on the series
  453. return value.map(recursiveConvert);
  454. } else if(Chartist.isDataHoleValue(value)) {
  455. // We're dealing with a hole in the data and therefore need to return undefined
  456. // We're also returning undefined for multi value output
  457. return undefined;
  458. } else {
  459. // We need to prepare multi value output (x and y data)
  460. if(multi) {
  461. var multiValue = {};
  462. // Single series value arrays are assumed to specify the Y-Axis value
  463. // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]
  464. // If multi is a string then it's assumed that it specified which dimension should be filled as default
  465. if(typeof multi === 'string') {
  466. multiValue[multi] = Chartist.getNumberOrUndefined(value);
  467. } else {
  468. multiValue.y = Chartist.getNumberOrUndefined(value);
  469. }
  470. multiValue.x = value.hasOwnProperty('x') ? Chartist.getNumberOrUndefined(value.x) : multiValue.x;
  471. multiValue.y = value.hasOwnProperty('y') ? Chartist.getNumberOrUndefined(value.y) : multiValue.y;
  472. return multiValue;
  473. } else {
  474. // We can return simple data
  475. return Chartist.getNumberOrUndefined(value);
  476. }
  477. }
  478. }
  479. return data.series.map(recursiveConvert);
  480. };
  481. /**
  482. * Converts a number into a padding object.
  483. *
  484. * @memberof Chartist.Core
  485. * @param {Object|Number} padding
  486. * @param {Number} [fallback] This value is used to fill missing values if a incomplete padding object was passed
  487. * @returns {Object} Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned.
  488. */
  489. Chartist.normalizePadding = function(padding, fallback) {
  490. fallback = fallback || 0;
  491. return typeof padding === 'number' ? {
  492. top: padding,
  493. right: padding,
  494. bottom: padding,
  495. left: padding
  496. } : {
  497. top: typeof padding.top === 'number' ? padding.top : fallback,
  498. right: typeof padding.right === 'number' ? padding.right : fallback,
  499. bottom: typeof padding.bottom === 'number' ? padding.bottom : fallback,
  500. left: typeof padding.left === 'number' ? padding.left : fallback
  501. };
  502. };
  503. Chartist.getMetaData = function(series, index) {
  504. var value = series.data ? series.data[index] : series[index];
  505. return value ? value.meta : undefined;
  506. };
  507. /**
  508. * Calculate the order of magnitude for the chart scale
  509. *
  510. * @memberof Chartist.Core
  511. * @param {Number} value The value Range of the chart
  512. * @return {Number} The order of magnitude
  513. */
  514. Chartist.orderOfMagnitude = function (value) {
  515. return Math.floor(Math.log(Math.abs(value)) / Math.LN10);
  516. };
  517. /**
  518. * Project a data length into screen coordinates (pixels)
  519. *
  520. * @memberof Chartist.Core
  521. * @param {Object} axisLength The svg element for the chart
  522. * @param {Number} length Single data value from a series array
  523. * @param {Object} bounds All the values to set the bounds of the chart
  524. * @return {Number} The projected data length in pixels
  525. */
  526. Chartist.projectLength = function (axisLength, length, bounds) {
  527. return length / bounds.range * axisLength;
  528. };
  529. /**
  530. * Get the height of the area in the chart for the data series
  531. *
  532. * @memberof Chartist.Core
  533. * @param {Object} svg The svg element for the chart
  534. * @param {Object} options The Object that contains all the optional values for the chart
  535. * @return {Number} The height of the area in the chart for the data series
  536. */
  537. Chartist.getAvailableHeight = function (svg, options) {
  538. return Math.max((Chartist.quantity(options.height).value || svg.height()) - (options.chartPadding.top + options.chartPadding.bottom) - options.axisX.offset, 0);
  539. };
  540. /**
  541. * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart.
  542. *
  543. * @memberof Chartist.Core
  544. * @param {Array} data The array that contains the data to be visualized in the chart
  545. * @param {Object} options The Object that contains the chart options
  546. * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration
  547. * @return {Object} An object that contains the highest and lowest value that will be visualized on the chart.
  548. */
  549. Chartist.getHighLow = function (data, options, dimension) {
  550. // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred
  551. options = Chartist.extend({}, options, dimension ? options['axis' + dimension.toUpperCase()] : {});
  552. var highLow = {
  553. high: options.high === undefined ? -Number.MAX_VALUE : +options.high,
  554. low: options.low === undefined ? Number.MAX_VALUE : +options.low
  555. };
  556. var findHigh = options.high === undefined;
  557. var findLow = options.low === undefined;
  558. // Function to recursively walk through arrays and find highest and lowest number
  559. function recursiveHighLow(data) {
  560. if(data === undefined) {
  561. return undefined;
  562. } else if(data instanceof Array) {
  563. for (var i = 0; i < data.length; i++) {
  564. recursiveHighLow(data[i]);
  565. }
  566. } else {
  567. var value = dimension ? +data[dimension] : +data;
  568. if (findHigh && value > highLow.high) {
  569. highLow.high = value;
  570. }
  571. if (findLow && value < highLow.low) {
  572. highLow.low = value;
  573. }
  574. }
  575. }
  576. // Start to find highest and lowest number recursively
  577. if(findHigh || findLow) {
  578. recursiveHighLow(data);
  579. }
  580. // Overrides of high / low based on reference value, it will make sure that the invisible reference value is
  581. // used to generate the chart. This is useful when the chart always needs to contain the position of the
  582. // invisible reference value in the view i.e. for bipolar scales.
  583. if (options.referenceValue || options.referenceValue === 0) {
  584. highLow.high = Math.max(options.referenceValue, highLow.high);
  585. highLow.low = Math.min(options.referenceValue, highLow.low);
  586. }
  587. // If high and low are the same because of misconfiguration or flat data (only the same value) we need
  588. // to set the high or low to 0 depending on the polarity
  589. if (highLow.high <= highLow.low) {
  590. // If both values are 0 we set high to 1
  591. if (highLow.low === 0) {
  592. highLow.high = 1;
  593. } else if (highLow.low < 0) {
  594. // If we have the same negative value for the bounds we set bounds.high to 0
  595. highLow.high = 0;
  596. } else if (highLow.high > 0) {
  597. // If we have the same positive value for the bounds we set bounds.low to 0
  598. highLow.low = 0;
  599. } else {
  600. // If data array was empty, values are Number.MAX_VALUE and -Number.MAX_VALUE. Set bounds to prevent errors
  601. highLow.high = 1;
  602. highLow.low = 0;
  603. }
  604. }
  605. return highLow;
  606. };
  607. /**
  608. * Checks if a value can be safely coerced to a number. This includes all values except null which result in finite numbers when coerced. This excludes NaN, since it's not finite.
  609. *
  610. * @memberof Chartist.Core
  611. * @param value
  612. * @returns {Boolean}
  613. */
  614. Chartist.isNumeric = function(value) {
  615. return value === null ? false : isFinite(value);
  616. };
  617. /**
  618. * Returns true on all falsey values except the numeric value 0.
  619. *
  620. * @memberof Chartist.Core
  621. * @param value
  622. * @returns {boolean}
  623. */
  624. Chartist.isFalseyButZero = function(value) {
  625. return !value && value !== 0;
  626. };
  627. /**
  628. * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.
  629. *
  630. * @memberof Chartist.Core
  631. * @param value
  632. * @returns {*}
  633. */
  634. Chartist.getNumberOrUndefined = function(value) {
  635. return Chartist.isNumeric(value) ? +value : undefined;
  636. };
  637. /**
  638. * Checks if provided value object is multi value (contains x or y properties)
  639. *
  640. * @memberof Chartist.Core
  641. * @param value
  642. */
  643. Chartist.isMultiValue = function(value) {
  644. return typeof value === 'object' && ('x' in value || 'y' in value);
  645. };
  646. /**
  647. * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return `defaultValue`.
  648. *
  649. * @memberof Chartist.Core
  650. * @param value
  651. * @param dimension
  652. * @param defaultValue
  653. * @returns {*}
  654. */
  655. Chartist.getMultiValue = function(value, dimension) {
  656. if(Chartist.isMultiValue(value)) {
  657. return Chartist.getNumberOrUndefined(value[dimension || 'y']);
  658. } else {
  659. return Chartist.getNumberOrUndefined(value);
  660. }
  661. };
  662. /**
  663. * Pollard Rho Algorithm to find smallest factor of an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex.
  664. *
  665. * @memberof Chartist.Core
  666. * @param {Number} num An integer number where the smallest factor should be searched for
  667. * @returns {Number} The smallest integer factor of the parameter num.
  668. */
  669. Chartist.rho = function(num) {
  670. if(num === 1) {
  671. return num;
  672. }
  673. function gcd(p, q) {
  674. if (p % q === 0) {
  675. return q;
  676. } else {
  677. return gcd(q, p % q);
  678. }
  679. }
  680. function f(x) {
  681. return x * x + 1;
  682. }
  683. var x1 = 2, x2 = 2, divisor;
  684. if (num % 2 === 0) {
  685. return 2;
  686. }
  687. do {
  688. x1 = f(x1) % num;
  689. x2 = f(f(x2)) % num;
  690. divisor = gcd(Math.abs(x1 - x2), num);
  691. } while (divisor === 1);
  692. return divisor;
  693. };
  694. /**
  695. * Calculate and retrieve all the bounds for the chart and return them in one array
  696. *
  697. * @memberof Chartist.Core
  698. * @param {Number} axisLength The length of the Axis used for
  699. * @param {Object} highLow An object containing a high and low property indicating the value range of the chart.
  700. * @param {Number} scaleMinSpace The minimum projected length a step should result in
  701. * @param {Boolean} onlyInteger
  702. * @return {Object} All the values to set the bounds of the chart
  703. */
  704. Chartist.getBounds = function (axisLength, highLow, scaleMinSpace, onlyInteger) {
  705. var i,
  706. optimizationCounter = 0,
  707. newMin,
  708. newMax,
  709. bounds = {
  710. high: highLow.high,
  711. low: highLow.low
  712. };
  713. bounds.valueRange = bounds.high - bounds.low;
  714. bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange);
  715. bounds.step = Math.pow(10, bounds.oom);
  716. bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step;
  717. bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step;
  718. bounds.range = bounds.max - bounds.min;
  719. bounds.numberOfSteps = Math.round(bounds.range / bounds.step);
  720. // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace
  721. // If we are already below the scaleMinSpace value we will scale up
  722. var length = Chartist.projectLength(axisLength, bounds.step, bounds);
  723. var scaleUp = length < scaleMinSpace;
  724. var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0;
  725. // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1
  726. if(onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace) {
  727. bounds.step = 1;
  728. } else if(onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace) {
  729. // If step 1 was too small, we can try the smallest factor of range
  730. // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor
  731. // is larger than the scaleMinSpace we should go for it.
  732. bounds.step = smallestFactor;
  733. } else {
  734. // Trying to divide or multiply by 2 and find the best step value
  735. while (true) {
  736. if (scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace) {
  737. bounds.step *= 2;
  738. } else if (!scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace) {
  739. bounds.step /= 2;
  740. if(onlyInteger && bounds.step % 1 !== 0) {
  741. bounds.step *= 2;
  742. break;
  743. }
  744. } else {
  745. break;
  746. }
  747. if(optimizationCounter++ > 1000) {
  748. throw new Error('Exceeded maximum number of iterations while optimizing scale step!');
  749. }
  750. }
  751. }
  752. var EPSILON = 2.221E-16;
  753. bounds.step = Math.max(bounds.step, EPSILON);
  754. function safeIncrement(value, increment) {
  755. // If increment is too small use *= (1+EPSILON) as a simple nextafter
  756. if (value === (value += increment)) {
  757. value *= (1 + (increment > 0 ? EPSILON : -EPSILON));
  758. }
  759. return value;
  760. }
  761. // Narrow min and max based on new step
  762. newMin = bounds.min;
  763. newMax = bounds.max;
  764. while (newMin + bounds.step <= bounds.low) {
  765. newMin = safeIncrement(newMin, bounds.step);
  766. }
  767. while (newMax - bounds.step >= bounds.high) {
  768. newMax = safeIncrement(newMax, -bounds.step);
  769. }
  770. bounds.min = newMin;
  771. bounds.max = newMax;
  772. bounds.range = bounds.max - bounds.min;
  773. var values = [];
  774. for (i = bounds.min; i <= bounds.max; i = safeIncrement(i, bounds.step)) {
  775. var value = Chartist.roundWithPrecision(i);
  776. if (value !== values[values.length - 1]) {
  777. values.push(value);
  778. }
  779. }
  780. bounds.values = values;
  781. return bounds;
  782. };
  783. /**
  784. * Calculate cartesian coordinates of polar coordinates
  785. *
  786. * @memberof Chartist.Core
  787. * @param {Number} centerX X-axis coordinates of center point of circle segment
  788. * @param {Number} centerY X-axis coordinates of center point of circle segment
  789. * @param {Number} radius Radius of circle segment
  790. * @param {Number} angleInDegrees Angle of circle segment in degrees
  791. * @return {{x:Number, y:Number}} Coordinates of point on circumference
  792. */
  793. Chartist.polarToCartesian = function (centerX, centerY, radius, angleInDegrees) {
  794. var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
  795. return {
  796. x: centerX + (radius * Math.cos(angleInRadians)),
  797. y: centerY + (radius * Math.sin(angleInRadians))
  798. };
  799. };
  800. /**
  801. * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right
  802. *
  803. * @memberof Chartist.Core
  804. * @param {Object} svg The svg element for the chart
  805. * @param {Object} options The Object that contains all the optional values for the chart
  806. * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used
  807. * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements
  808. */
  809. Chartist.createChartRect = function (svg, options, fallbackPadding) {
  810. var hasAxis = !!(options.axisX || options.axisY);
  811. var yAxisOffset = hasAxis ? options.axisY.offset : 0;
  812. var xAxisOffset = hasAxis ? options.axisX.offset : 0;
  813. // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0
  814. var width = svg.width() || Chartist.quantity(options.width).value || 0;
  815. var height = svg.height() || Chartist.quantity(options.height).value || 0;
  816. var normalizedPadding = Chartist.normalizePadding(options.chartPadding, fallbackPadding);
  817. // If settings were to small to cope with offset (legacy) and padding, we'll adjust
  818. width = Math.max(width, yAxisOffset + normalizedPadding.left + normalizedPadding.right);
  819. height = Math.max(height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom);
  820. var chartRect = {
  821. padding: normalizedPadding,
  822. width: function () {
  823. return this.x2 - this.x1;
  824. },
  825. height: function () {
  826. return this.y1 - this.y2;
  827. }
  828. };
  829. if(hasAxis) {
  830. if (options.axisX.position === 'start') {
  831. chartRect.y2 = normalizedPadding.top + xAxisOffset;
  832. chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
  833. } else {
  834. chartRect.y2 = normalizedPadding.top;
  835. chartRect.y1 = Math.max(height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1);
  836. }
  837. if (options.axisY.position === 'start') {
  838. chartRect.x1 = normalizedPadding.left + yAxisOffset;
  839. chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
  840. } else {
  841. chartRect.x1 = normalizedPadding.left;
  842. chartRect.x2 = Math.max(width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1);
  843. }
  844. } else {
  845. chartRect.x1 = normalizedPadding.left;
  846. chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
  847. chartRect.y2 = normalizedPadding.top;
  848. chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
  849. }
  850. return chartRect;
  851. };
  852. /**
  853. * Creates a grid line based on a projected value.
  854. *
  855. * @memberof Chartist.Core
  856. * @param position
  857. * @param index
  858. * @param axis
  859. * @param offset
  860. * @param length
  861. * @param group
  862. * @param classes
  863. * @param eventEmitter
  864. */
  865. Chartist.createGrid = function(position, index, axis, offset, length, group, classes, eventEmitter) {
  866. var positionalData = {};
  867. positionalData[axis.units.pos + '1'] = position;
  868. positionalData[axis.units.pos + '2'] = position;
  869. positionalData[axis.counterUnits.pos + '1'] = offset;
  870. positionalData[axis.counterUnits.pos + '2'] = offset + length;
  871. var gridElement = group.elem('line', positionalData, classes.join(' '));
  872. // Event for grid draw
  873. eventEmitter.emit('draw',
  874. Chartist.extend({
  875. type: 'grid',
  876. axis: axis,
  877. index: index,
  878. group: group,
  879. element: gridElement
  880. }, positionalData)
  881. );
  882. };
  883. /**
  884. * Creates a grid background rect and emits the draw event.
  885. *
  886. * @memberof Chartist.Core
  887. * @param gridGroup
  888. * @param chartRect
  889. * @param className
  890. * @param eventEmitter
  891. */
  892. Chartist.createGridBackground = function (gridGroup, chartRect, className, eventEmitter) {
  893. var gridBackground = gridGroup.elem('rect', {
  894. x: chartRect.x1,
  895. y: chartRect.y2,
  896. width: chartRect.width(),
  897. height: chartRect.height(),
  898. }, className, true);
  899. // Event for grid background draw
  900. eventEmitter.emit('draw', {
  901. type: 'gridBackground',
  902. group: gridGroup,
  903. element: gridBackground
  904. });
  905. };
  906. /**
  907. * Creates a label based on a projected value and an axis.
  908. *
  909. * @memberof Chartist.Core
  910. * @param position
  911. * @param length
  912. * @param index
  913. * @param labels
  914. * @param axis
  915. * @param axisOffset
  916. * @param labelOffset
  917. * @param group
  918. * @param classes
  919. * @param useForeignObject
  920. * @param eventEmitter
  921. */
  922. Chartist.createLabel = function(position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter) {
  923. var labelElement;
  924. var positionalData = {};
  925. positionalData[axis.units.pos] = position + labelOffset[axis.units.pos];
  926. positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos];
  927. positionalData[axis.units.len] = length;
  928. positionalData[axis.counterUnits.len] = Math.max(0, axisOffset - 10);
  929. if(useForeignObject) {
  930. // We need to set width and height explicitly to px as span will not expand with width and height being
  931. // 100% in all browsers
  932. var content = document.createElement('span');
  933. content.className = classes.join(' ');
  934. content.setAttribute('xmlns', Chartist.namespaces.xhtml);
  935. content.innerText = labels[index];
  936. content.style[axis.units.len] = Math.round(positionalData[axis.units.len]) + 'px';
  937. content.style[axis.counterUnits.len] = Math.round(positionalData[axis.counterUnits.len]) + 'px';
  938. labelElement = group.foreignObject(content, Chartist.extend({
  939. style: 'overflow: visible;'
  940. }, positionalData));
  941. } else {
  942. labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]);
  943. }
  944. eventEmitter.emit('draw', Chartist.extend({
  945. type: 'label',
  946. axis: axis,
  947. index: index,
  948. group: group,
  949. element: labelElement,
  950. text: labels[index]
  951. }, positionalData));
  952. };
  953. /**
  954. * Helper to read series specific options from options object. It automatically falls back to the global option if
  955. * there is no option in the series options.
  956. *
  957. * @param {Object} series Series object
  958. * @param {Object} options Chartist options object
  959. * @param {string} key The options key that should be used to obtain the options
  960. * @returns {*}
  961. */
  962. Chartist.getSeriesOption = function(series, options, key) {
  963. if(series.name && options.series && options.series[series.name]) {
  964. var seriesOptions = options.series[series.name];
  965. return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key];
  966. } else {
  967. return options[key];
  968. }
  969. };
  970. /**
  971. * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches
  972. *
  973. * @memberof Chartist.Core
  974. * @param {Object} options Options set by user
  975. * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart
  976. * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events
  977. * @return {Object} The consolidated options object from the defaults, base and matching responsive options
  978. */
  979. Chartist.optionsProvider = function (options, responsiveOptions, eventEmitter) {
  980. var baseOptions = Chartist.extend({}, options),
  981. currentOptions,
  982. mediaQueryListeners = [],
  983. i;
  984. function updateCurrentOptions(mediaEvent) {
  985. var previousOptions = currentOptions;
  986. currentOptions = Chartist.extend({}, baseOptions);
  987. if (responsiveOptions) {
  988. for (i = 0; i < responsiveOptions.length; i++) {
  989. var mql = window.matchMedia(responsiveOptions[i][0]);
  990. if (mql.matches) {
  991. currentOptions = Chartist.extend(currentOptions, responsiveOptions[i][1]);
  992. }
  993. }
  994. }
  995. if(eventEmitter && mediaEvent) {
  996. eventEmitter.emit('optionsChanged', {
  997. previousOptions: previousOptions,
  998. currentOptions: currentOptions
  999. });
  1000. }
  1001. }
  1002. function removeMediaQueryListeners() {
  1003. mediaQueryListeners.forEach(function(mql) {
  1004. mql.removeListener(updateCurrentOptions);
  1005. });
  1006. }
  1007. if (!window.matchMedia) {
  1008. throw 'window.matchMedia not found! Make sure you\'re using a polyfill.';
  1009. } else if (responsiveOptions) {
  1010. for (i = 0; i < responsiveOptions.length; i++) {
  1011. var mql = window.matchMedia(responsiveOptions[i][0]);
  1012. mql.addListener(updateCurrentOptions);
  1013. mediaQueryListeners.push(mql);
  1014. }
  1015. }
  1016. // Execute initially without an event argument so we get the correct options
  1017. updateCurrentOptions();
  1018. return {
  1019. removeMediaQueryListeners: removeMediaQueryListeners,
  1020. getCurrentOptions: function getCurrentOptions() {
  1021. return Chartist.extend({}, currentOptions);
  1022. }
  1023. };
  1024. };
  1025. /**
  1026. * Splits a list of coordinates and associated values into segments. Each returned segment contains a pathCoordinates
  1027. * valueData property describing the segment.
  1028. *
  1029. * With the default options, segments consist of contiguous sets of points that do not have an undefined value. Any
  1030. * points with undefined values are discarded.
  1031. *
  1032. * **Options**
  1033. * The following options are used to determine how segments are formed
  1034. * ```javascript
  1035. * var options = {
  1036. * // If fillHoles is true, undefined values are simply discarded without creating a new segment. Assuming other options are default, this returns single segment.
  1037. * fillHoles: false,
  1038. * // If increasingX is true, the coordinates in all segments have strictly increasing x-values.
  1039. * increasingX: false
  1040. * };
  1041. * ```
  1042. *
  1043. * @memberof Chartist.Core
  1044. * @param {Array} pathCoordinates List of point coordinates to be split in the form [x1, y1, x2, y2 ... xn, yn]
  1045. * @param {Array} values List of associated point values in the form [v1, v2 .. vn]
  1046. * @param {Object} options Options set by user
  1047. * @return {Array} List of segments, each containing a pathCoordinates and valueData property.
  1048. */
  1049. Chartist.splitIntoSegments = function(pathCoordinates, valueData, options) {
  1050. var defaultOptions = {
  1051. increasingX: false,
  1052. fillHoles: false
  1053. };
  1054. options = Chartist.extend({}, defaultOptions, options);
  1055. var segments = [];
  1056. var hole = true;
  1057. for(var i = 0; i < pathCoordinates.length; i += 2) {
  1058. // If this value is a "hole" we set the hole flag
  1059. if(Chartist.getMultiValue(valueData[i / 2].value) === undefined) {
  1060. // if(valueData[i / 2].value === undefined) {
  1061. if(!options.fillHoles) {
  1062. hole = true;
  1063. }
  1064. } else {
  1065. if(options.increasingX && i >= 2 && pathCoordinates[i] <= pathCoordinates[i-2]) {
  1066. // X is not increasing, so we need to make sure we start a new segment
  1067. hole = true;
  1068. }
  1069. // If it's a valid value we need to check if we're coming out of a hole and create a new empty segment
  1070. if(hole) {
  1071. segments.push({
  1072. pathCoordinates: [],
  1073. valueData: []
  1074. });
  1075. // As we have a valid value now, we are not in a "hole" anymore
  1076. hole = false;
  1077. }
  1078. // Add to the segment pathCoordinates and valueData
  1079. segments[segments.length - 1].pathCoordinates.push(pathCoordinates[i], pathCoordinates[i + 1]);
  1080. segments[segments.length - 1].valueData.push(valueData[i / 2]);
  1081. }
  1082. }
  1083. return segments;
  1084. };
  1085. }(this || __webpack_require__.g, Chartist));
  1086. ;/**
  1087. * Chartist path interpolation functions.
  1088. *
  1089. * @module Chartist.Interpolation
  1090. */
  1091. /* global Chartist */
  1092. (function(globalRoot, Chartist) {
  1093. 'use strict';
  1094. Chartist.Interpolation = {};
  1095. /**
  1096. * This interpolation function does not smooth the path and the result is only containing lines and no curves.
  1097. *
  1098. * @example
  1099. * var chart = new Chartist.Line('.ct-chart', {
  1100. * labels: [1, 2, 3, 4, 5],
  1101. * series: [[1, 2, 8, 1, 7]]
  1102. * }, {
  1103. * lineSmooth: Chartist.Interpolation.none({
  1104. * fillHoles: false
  1105. * })
  1106. * });
  1107. *
  1108. *
  1109. * @memberof Chartist.Interpolation
  1110. * @return {Function}
  1111. */
  1112. Chartist.Interpolation.none = function(options) {
  1113. var defaultOptions = {
  1114. fillHoles: false
  1115. };
  1116. options = Chartist.extend({}, defaultOptions, options);
  1117. return function none(pathCoordinates, valueData) {
  1118. var path = new Chartist.Svg.Path();
  1119. var hole = true;
  1120. for(var i = 0; i < pathCoordinates.length; i += 2) {
  1121. var currX = pathCoordinates[i];
  1122. var currY = pathCoordinates[i + 1];
  1123. var currData = valueData[i / 2];
  1124. if(Chartist.getMultiValue(currData.value) !== undefined) {
  1125. if(hole) {
  1126. path.move(currX, currY, false, currData);
  1127. } else {
  1128. path.line(currX, currY, false, currData);
  1129. }
  1130. hole = false;
  1131. } else if(!options.fillHoles) {
  1132. hole = true;
  1133. }
  1134. }
  1135. return path;
  1136. };
  1137. };
  1138. /**
  1139. * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing.
  1140. *
  1141. * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothing produces less flowing lines but is accurate by hitting the points and it also doesn't swing below or above the given data point.
  1142. *
  1143. * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics.
  1144. *
  1145. * @example
  1146. * var chart = new Chartist.Line('.ct-chart', {
  1147. * labels: [1, 2, 3, 4, 5],
  1148. * series: [[1, 2, 8, 1, 7]]
  1149. * }, {
  1150. * lineSmooth: Chartist.Interpolation.simple({
  1151. * divisor: 2,
  1152. * fillHoles: false
  1153. * })
  1154. * });
  1155. *
  1156. *
  1157. * @memberof Chartist.Interpolation
  1158. * @param {Object} options The options of the simple interpolation factory function.
  1159. * @return {Function}
  1160. */
  1161. Chartist.Interpolation.simple = function(options) {
  1162. var defaultOptions = {
  1163. divisor: 2,
  1164. fillHoles: false
  1165. };
  1166. options = Chartist.extend({}, defaultOptions, options);
  1167. var d = 1 / Math.max(1, options.divisor);
  1168. return function simple(pathCoordinates, valueData) {
  1169. var path = new Chartist.Svg.Path();
  1170. var prevX, prevY, prevData;
  1171. for(var i = 0; i < pathCoordinates.length; i += 2) {
  1172. var currX = pathCoordinates[i];
  1173. var currY = pathCoordinates[i + 1];
  1174. var length = (currX - prevX) * d;
  1175. var currData = valueData[i / 2];
  1176. if(currData.value !== undefined) {
  1177. if(prevData === undefined) {
  1178. path.move(currX, currY, false, currData);
  1179. } else {
  1180. path.curve(
  1181. prevX + length,
  1182. prevY,
  1183. currX - length,
  1184. currY,
  1185. currX,
  1186. currY,
  1187. false,
  1188. currData
  1189. );
  1190. }
  1191. prevX = currX;
  1192. prevY = currY;
  1193. prevData = currData;
  1194. } else if(!options.fillHoles) {
  1195. prevX = currX = prevData = undefined;
  1196. }
  1197. }
  1198. return path;
  1199. };
  1200. };
  1201. /**
  1202. * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results.
  1203. *
  1204. * Cardinal splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
  1205. *
  1206. * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity.
  1207. *
  1208. * @example
  1209. * var chart = new Chartist.Line('.ct-chart', {
  1210. * labels: [1, 2, 3, 4, 5],
  1211. * series: [[1, 2, 8, 1, 7]]
  1212. * }, {
  1213. * lineSmooth: Chartist.Interpolation.cardinal({
  1214. * tension: 1,
  1215. * fillHoles: false
  1216. * })
  1217. * });
  1218. *
  1219. * @memberof Chartist.Interpolation
  1220. * @param {Object} options The options of the cardinal factory function.
  1221. * @return {Function}
  1222. */
  1223. Chartist.Interpolation.cardinal = function(options) {
  1224. var defaultOptions = {
  1225. tension: 1,
  1226. fillHoles: false
  1227. };
  1228. options = Chartist.extend({}, defaultOptions, options);
  1229. var t = Math.min(1, Math.max(0, options.tension)),
  1230. c = 1 - t;
  1231. return function cardinal(pathCoordinates, valueData) {
  1232. // First we try to split the coordinates into segments
  1233. // This is necessary to treat "holes" in line charts
  1234. var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, {
  1235. fillHoles: options.fillHoles
  1236. });
  1237. if(!segments.length) {
  1238. // If there were no segments return 'Chartist.Interpolation.none'
  1239. return Chartist.Interpolation.none()([]);
  1240. } else if(segments.length > 1) {
  1241. // If the split resulted in more that one segment we need to interpolate each segment individually and join them
  1242. // afterwards together into a single path.
  1243. var paths = [];
  1244. // For each segment we will recurse the cardinal function
  1245. segments.forEach(function(segment) {
  1246. paths.push(cardinal(segment.pathCoordinates, segment.valueData));
  1247. });
  1248. // Join the segment path data into a single path and return
  1249. return Chartist.Svg.Path.join(paths);
  1250. } else {
  1251. // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
  1252. // segment
  1253. pathCoordinates = segments[0].pathCoordinates;
  1254. valueData = segments[0].valueData;
  1255. // If less than two points we need to fallback to no smoothing
  1256. if(pathCoordinates.length <= 4) {
  1257. return Chartist.Interpolation.none()(pathCoordinates, valueData);
  1258. }
  1259. var path = new Chartist.Svg.Path().move(pathCoordinates[0], pathCoordinates[1], false, valueData[0]),
  1260. z;
  1261. for (var i = 0, iLen = pathCoordinates.length; iLen - 2 * !z > i; i += 2) {
  1262. var p = [
  1263. {x: +pathCoordinates[i - 2], y: +pathCoordinates[i - 1]},
  1264. {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]},
  1265. {x: +pathCoordinates[i + 2], y: +pathCoordinates[i + 3]},
  1266. {x: +pathCoordinates[i + 4], y: +pathCoordinates[i + 5]}
  1267. ];
  1268. if (z) {
  1269. if (!i) {
  1270. p[0] = {x: +pathCoordinates[iLen - 2], y: +pathCoordinates[iLen - 1]};
  1271. } else if (iLen - 4 === i) {
  1272. p[3] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
  1273. } else if (iLen - 2 === i) {
  1274. p[2] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
  1275. p[3] = {x: +pathCoordinates[2], y: +pathCoordinates[3]};
  1276. }
  1277. } else {
  1278. if (iLen - 4 === i) {
  1279. p[3] = p[2];
  1280. } else if (!i) {
  1281. p[0] = {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]};
  1282. }
  1283. }
  1284. path.curve(
  1285. (t * (-p[0].x + 6 * p[1].x + p[2].x) / 6) + (c * p[2].x),
  1286. (t * (-p[0].y + 6 * p[1].y + p[2].y) / 6) + (c * p[2].y),
  1287. (t * (p[1].x + 6 * p[2].x - p[3].x) / 6) + (c * p[2].x),
  1288. (t * (p[1].y + 6 * p[2].y - p[3].y) / 6) + (c * p[2].y),
  1289. p[2].x,
  1290. p[2].y,
  1291. false,
  1292. valueData[(i + 2) / 2]
  1293. );
  1294. }
  1295. return path;
  1296. }
  1297. };
  1298. };
  1299. /**
  1300. * Monotone Cubic spline interpolation produces a smooth curve which preserves monotonicity. Unlike cardinal splines, the curve will not extend beyond the range of y-values of the original data points.
  1301. *
  1302. * Monotone Cubic splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
  1303. *
  1304. * The x-values of subsequent points must be increasing to fit a Monotone Cubic spline. If this condition is not met for a pair of adjacent points, then there will be a break in the curve between those data points.
  1305. *
  1306. * All smoothing functions within Chartist are factory functions that accept an options parameter.
  1307. *
  1308. * @example
  1309. * var chart = new Chartist.Line('.ct-chart', {
  1310. * labels: [1, 2, 3, 4, 5],
  1311. * series: [[1, 2, 8, 1, 7]]
  1312. * }, {
  1313. * lineSmooth: Chartist.Interpolation.monotoneCubic({
  1314. * fillHoles: false
  1315. * })
  1316. * });
  1317. *
  1318. * @memberof Chartist.Interpolation
  1319. * @param {Object} options The options of the monotoneCubic factory function.
  1320. * @return {Function}
  1321. */
  1322. Chartist.Interpolation.monotoneCubic = function(options) {
  1323. var defaultOptions = {
  1324. fillHoles: false
  1325. };
  1326. options = Chartist.extend({}, defaultOptions, options);
  1327. return function monotoneCubic(pathCoordinates, valueData) {
  1328. // First we try to split the coordinates into segments
  1329. // This is necessary to treat "holes" in line charts
  1330. var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, {
  1331. fillHoles: options.fillHoles,
  1332. increasingX: true
  1333. });
  1334. if(!segments.length) {
  1335. // If there were no segments return 'Chartist.Interpolation.none'
  1336. return Chartist.Interpolation.none()([]);
  1337. } else if(segments.length > 1) {
  1338. // If the split resulted in more that one segment we need to interpolate each segment individually and join them
  1339. // afterwards together into a single path.
  1340. var paths = [];
  1341. // For each segment we will recurse the monotoneCubic fn function
  1342. segments.forEach(function(segment) {
  1343. paths.push(monotoneCubic(segment.pathCoordinates, segment.valueData));
  1344. });
  1345. // Join the segment path data into a single path and return
  1346. return Chartist.Svg.Path.join(paths);
  1347. } else {
  1348. // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
  1349. // segment
  1350. pathCoordinates = segments[0].pathCoordinates;
  1351. valueData = segments[0].valueData;
  1352. // If less than three points we need to fallback to no smoothing
  1353. if(pathCoordinates.length <= 4) {
  1354. return Chartist.Interpolation.none()(pathCoordinates, valueData);
  1355. }
  1356. var xs = [],
  1357. ys = [],
  1358. i,
  1359. n = pathCoordinates.length / 2,
  1360. ms = [],
  1361. ds = [], dys = [], dxs = [],
  1362. path;
  1363. // Populate x and y coordinates into separate arrays, for readability
  1364. for(i = 0; i < n; i++) {
  1365. xs[i] = pathCoordinates[i * 2];
  1366. ys[i] = pathCoordinates[i * 2 + 1];
  1367. }
  1368. // Calculate deltas and derivative
  1369. for(i = 0; i < n - 1; i++) {
  1370. dys[i] = ys[i + 1] - ys[i];
  1371. dxs[i] = xs[i + 1] - xs[i];
  1372. ds[i] = dys[i] / dxs[i];
  1373. }
  1374. // Determine desired slope (m) at each point using Fritsch-Carlson method
  1375. // See: http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation
  1376. ms[0] = ds[0];
  1377. ms[n - 1] = ds[n - 2];
  1378. for(i = 1; i < n - 1; i++) {
  1379. if(ds[i] === 0 || ds[i - 1] === 0 || (ds[i - 1] > 0) !== (ds[i] > 0)) {
  1380. ms[i] = 0;
  1381. } else {
  1382. ms[i] = 3 * (dxs[i - 1] + dxs[i]) / (
  1383. (2 * dxs[i] + dxs[i - 1]) / ds[i - 1] +
  1384. (dxs[i] + 2 * dxs[i - 1]) / ds[i]);
  1385. if(!isFinite(ms[i])) {
  1386. ms[i] = 0;
  1387. }
  1388. }
  1389. }
  1390. // Now build a path from the slopes
  1391. path = new Chartist.Svg.Path().move(xs[0], ys[0], false, valueData[0]);
  1392. for(i = 0; i < n - 1; i++) {
  1393. path.curve(
  1394. // First control point
  1395. xs[i] + dxs[i] / 3,
  1396. ys[i] + ms[i] * dxs[i] / 3,
  1397. // Second control point
  1398. xs[i + 1] - dxs[i] / 3,
  1399. ys[i + 1] - ms[i + 1] * dxs[i] / 3,
  1400. // End point
  1401. xs[i + 1],
  1402. ys[i + 1],
  1403. false,
  1404. valueData[i + 1]
  1405. );
  1406. }
  1407. return path;
  1408. }
  1409. };
  1410. };
  1411. /**
  1412. * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the `showPoint` option is enabled.
  1413. *
  1414. * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`.
  1415. *
  1416. * @example
  1417. * var chart = new Chartist.Line('.ct-chart', {
  1418. * labels: [1, 2, 3, 4, 5],
  1419. * series: [[1, 2, 8, 1, 7]]
  1420. * }, {
  1421. * lineSmooth: Chartist.Interpolation.step({
  1422. * postpone: true,
  1423. * fillHoles: false
  1424. * })
  1425. * });
  1426. *
  1427. * @memberof Chartist.Interpolation
  1428. * @param options
  1429. * @returns {Function}
  1430. */
  1431. Chartist.Interpolation.step = function(options) {
  1432. var defaultOptions = {
  1433. postpone: true,
  1434. fillHoles: false
  1435. };
  1436. options = Chartist.extend({}, defaultOptions, options);
  1437. return function step(pathCoordinates, valueData) {
  1438. var path = new Chartist.Svg.Path();
  1439. var prevX, prevY, prevData;
  1440. for (var i = 0; i < pathCoordinates.length; i += 2) {
  1441. var currX = pathCoordinates[i];
  1442. var currY = pathCoordinates[i + 1];
  1443. var currData = valueData[i / 2];
  1444. // If the current point is also not a hole we can draw the step lines
  1445. if(currData.value !== undefined) {
  1446. if(prevData === undefined) {
  1447. path.move(currX, currY, false, currData);
  1448. } else {
  1449. if(options.postpone) {
  1450. // If postponed we should draw the step line with the value of the previous value
  1451. path.line(currX, prevY, false, prevData);
  1452. } else {
  1453. // If not postponed we should draw the step line with the value of the current value
  1454. path.line(prevX, currY, false, currData);
  1455. }
  1456. // Line to the actual point (this should only be a Y-Axis movement
  1457. path.line(currX, currY, false, currData);
  1458. }
  1459. prevX = currX;
  1460. prevY = currY;
  1461. prevData = currData;
  1462. } else if(!options.fillHoles) {
  1463. prevX = prevY = prevData = undefined;
  1464. }
  1465. }
  1466. return path;
  1467. };
  1468. };
  1469. }(this || __webpack_require__.g, Chartist));
  1470. ;/**
  1471. * A very basic event module that helps to generate and catch events.
  1472. *
  1473. * @module Chartist.Event
  1474. */
  1475. /* global Chartist */
  1476. (function (globalRoot, Chartist) {
  1477. 'use strict';
  1478. Chartist.EventEmitter = function () {
  1479. var handlers = [];
  1480. /**
  1481. * Add an event handler for a specific event
  1482. *
  1483. * @memberof Chartist.Event
  1484. * @param {String} event The event name
  1485. * @param {Function} handler A event handler function
  1486. */
  1487. function addEventHandler(event, handler) {
  1488. handlers[event] = handlers[event] || [];
  1489. handlers[event].push(handler);
  1490. }
  1491. /**
  1492. * Remove an event handler of a specific event name or remove all event handlers for a specific event.
  1493. *
  1494. * @memberof Chartist.Event
  1495. * @param {String} event The event name where a specific or all handlers should be removed
  1496. * @param {Function} [handler] An optional event handler function. If specified only this specific handler will be removed and otherwise all handlers are removed.
  1497. */
  1498. function removeEventHandler(event, handler) {
  1499. // Only do something if there are event handlers with this name existing
  1500. if(handlers[event]) {
  1501. // If handler is set we will look for a specific handler and only remove this
  1502. if(handler) {
  1503. handlers[event].splice(handlers[event].indexOf(handler), 1);
  1504. if(handlers[event].length === 0) {
  1505. delete handlers[event];
  1506. }
  1507. } else {
  1508. // If no handler is specified we remove all handlers for this event
  1509. delete handlers[event];
  1510. }
  1511. }
  1512. }
  1513. /**
  1514. * Use this function to emit an event. All handlers that are listening for this event will be triggered with the data parameter.
  1515. *
  1516. * @memberof Chartist.Event
  1517. * @param {String} event The event name that should be triggered
  1518. * @param {*} data Arbitrary data that will be passed to the event handler callback functions
  1519. */
  1520. function emit(event, data) {
  1521. // Only do something if there are event handlers with this name existing
  1522. if(handlers[event]) {
  1523. handlers[event].forEach(function(handler) {
  1524. handler(data);
  1525. });
  1526. }
  1527. // Emit event to star event handlers
  1528. if(handlers['*']) {
  1529. handlers['*'].forEach(function(starHandler) {
  1530. starHandler(event, data);
  1531. });
  1532. }
  1533. }
  1534. return {
  1535. addEventHandler: addEventHandler,
  1536. removeEventHandler: removeEventHandler,
  1537. emit: emit
  1538. };
  1539. };
  1540. }(this || __webpack_require__.g, Chartist));
  1541. ;/**
  1542. * This module provides some basic prototype inheritance utilities.
  1543. *
  1544. * @module Chartist.Class
  1545. */
  1546. /* global Chartist */
  1547. (function(globalRoot, Chartist) {
  1548. 'use strict';
  1549. function listToArray(list) {
  1550. var arr = [];
  1551. if (list.length) {
  1552. for (var i = 0; i < list.length; i++) {
  1553. arr.push(list[i]);
  1554. }
  1555. }
  1556. return arr;
  1557. }
  1558. /**
  1559. * Method to extend from current prototype.
  1560. *
  1561. * @memberof Chartist.Class
  1562. * @param {Object} properties The object that serves as definition for the prototype that gets created for the new class. This object should always contain a constructor property that is the desired constructor for the newly created class.
  1563. * @param {Object} [superProtoOverride] By default extens will use the current class prototype or Chartist.class. With this parameter you can specify any super prototype that will be used.
  1564. * @return {Function} Constructor function of the new class
  1565. *
  1566. * @example
  1567. * var Fruit = Class.extend({
  1568. * color: undefined,
  1569. * sugar: undefined,
  1570. *
  1571. * constructor: function(color, sugar) {
  1572. * this.color = color;
  1573. * this.sugar = sugar;
  1574. * },
  1575. *
  1576. * eat: function() {
  1577. * this.sugar = 0;
  1578. * return this;
  1579. * }
  1580. * });
  1581. *
  1582. * var Banana = Fruit.extend({
  1583. * length: undefined,
  1584. *
  1585. * constructor: function(length, sugar) {
  1586. * Banana.super.constructor.call(this, 'Yellow', sugar);
  1587. * this.length = length;
  1588. * }
  1589. * });
  1590. *
  1591. * var banana = new Banana(20, 40);
  1592. * console.log('banana instanceof Fruit', banana instanceof Fruit);
  1593. * console.log('Fruit is prototype of banana', Fruit.prototype.isPrototypeOf(banana));
  1594. * console.log('bananas prototype is Fruit', Object.getPrototypeOf(banana) === Fruit.prototype);
  1595. * console.log(banana.sugar);
  1596. * console.log(banana.eat().sugar);
  1597. * console.log(banana.color);
  1598. */
  1599. function extend(properties, superProtoOverride) {
  1600. var superProto = superProtoOverride || this.prototype || Chartist.Class;
  1601. var proto = Object.create(superProto);
  1602. Chartist.Class.cloneDefinitions(proto, properties);
  1603. var constr = function() {
  1604. var fn = proto.constructor || function () {},
  1605. instance;
  1606. // If this is linked to the Chartist namespace the constructor was not called with new
  1607. // To provide a fallback we will instantiate here and return the instance
  1608. instance = this === Chartist ? Object.create(proto) : this;
  1609. fn.apply(instance, Array.prototype.slice.call(arguments, 0));
  1610. // If this constructor was not called with new we need to return the instance
  1611. // This will not harm when the constructor has been called with new as the returned value is ignored
  1612. return instance;
  1613. };
  1614. constr.prototype = proto;
  1615. constr.super = superProto;
  1616. constr.extend = this.extend;
  1617. return constr;
  1618. }
  1619. // Variable argument list clones args > 0 into args[0] and retruns modified args[0]
  1620. function cloneDefinitions() {
  1621. var args = listToArray(arguments);
  1622. var target = args[0];
  1623. args.splice(1, args.length - 1).forEach(function (source) {
  1624. Object.getOwnPropertyNames(source).forEach(function (propName) {
  1625. // If this property already exist in target we delete it first
  1626. delete target[propName];
  1627. // Define the property with the descriptor from source
  1628. Object.defineProperty(target, propName,
  1629. Object.getOwnPropertyDescriptor(source, propName));
  1630. });
  1631. });
  1632. return target;
  1633. }
  1634. Chartist.Class = {
  1635. extend: extend,
  1636. cloneDefinitions: cloneDefinitions
  1637. };
  1638. }(this || __webpack_require__.g, Chartist));
  1639. ;/**
  1640. * Base for all chart types. The methods in Chartist.Base are inherited to all chart types.
  1641. *
  1642. * @module Chartist.Base
  1643. */
  1644. /* global Chartist */
  1645. (function(globalRoot, Chartist) {
  1646. 'use strict';
  1647. var window = globalRoot.window;
  1648. // TODO: Currently we need to re-draw the chart on window resize. This is usually very bad and will affect performance.
  1649. // This is done because we can't work with relative coordinates when drawing the chart because SVG Path does not
  1650. // work with relative positions yet. We need to check if we can do a viewBox hack to switch to percentage.
  1651. // See http://mozilla.6506.n7.nabble.com/Specyfing-paths-with-percentages-unit-td247474.html
  1652. // Update: can be done using the above method tested here: http://codepen.io/gionkunz/pen/KDvLj
  1653. // The problem is with the label offsets that can't be converted into percentage and affecting the chart container
  1654. /**
  1655. * Updates the chart which currently does a full reconstruction of the SVG DOM
  1656. *
  1657. * @param {Object} [data] Optional data you'd like to set for the chart before it will update. If not specified the update method will use the data that is already configured with the chart.
  1658. * @param {Object} [options] Optional options you'd like to add to the previous options for the chart before it will update. If not specified the update method will use the options that have been already configured with the chart.
  1659. * @param {Boolean} [override] If set to true, the passed options will be used to extend the options that have been configured already. Otherwise the chart default options will be used as the base
  1660. * @memberof Chartist.Base
  1661. */
  1662. function update(data, options, override) {
  1663. if(data) {
  1664. this.data = data || {};
  1665. this.data.labels = this.data.labels || [];
  1666. this.data.series = this.data.series || [];
  1667. // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
  1668. this.eventEmitter.emit('data', {
  1669. type: 'update',
  1670. data: this.data
  1671. });
  1672. }
  1673. if(options) {
  1674. this.options = Chartist.extend({}, override ? this.options : this.defaultOptions, options);
  1675. // If chartist was not initialized yet, we just set the options and leave the rest to the initialization
  1676. // Otherwise we re-create the optionsProvider at this point
  1677. if(!this.initializeTimeoutId) {
  1678. this.optionsProvider.removeMediaQueryListeners();
  1679. this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
  1680. }
  1681. }
  1682. // Only re-created the chart if it has been initialized yet
  1683. if(!this.initializeTimeoutId) {
  1684. this.createChart(this.optionsProvider.getCurrentOptions());
  1685. }
  1686. // Return a reference to the chart object to chain up calls
  1687. return this;
  1688. }
  1689. /**
  1690. * This method can be called on the API object of each chart and will un-register all event listeners that were added to other components. This currently includes a window.resize listener as well as media query listeners if any responsive options have been provided. Use this function if you need to destroy and recreate Chartist charts dynamically.
  1691. *
  1692. * @memberof Chartist.Base
  1693. */
  1694. function detach() {
  1695. // Only detach if initialization already occurred on this chart. If this chart still hasn't initialized (therefore
  1696. // the initializationTimeoutId is still a valid timeout reference, we will clear the timeout
  1697. if(!this.initializeTimeoutId) {
  1698. window.removeEventListener('resize', this.resizeListener);
  1699. this.optionsProvider.removeMediaQueryListeners();
  1700. } else {
  1701. window.clearTimeout(this.initializeTimeoutId);
  1702. }
  1703. return this;
  1704. }
  1705. /**
  1706. * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop.
  1707. *
  1708. * @memberof Chartist.Base
  1709. * @param {String} event Name of the event. Check the examples for supported events.
  1710. * @param {Function} handler The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details.
  1711. */
  1712. function on(event, handler) {
  1713. this.eventEmitter.addEventHandler(event, handler);
  1714. return this;
  1715. }
  1716. /**
  1717. * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered.
  1718. *
  1719. * @memberof Chartist.Base
  1720. * @param {String} event Name of the event for which a handler should be removed
  1721. * @param {Function} [handler] The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list.
  1722. */
  1723. function off(event, handler) {
  1724. this.eventEmitter.removeEventHandler(event, handler);
  1725. return this;
  1726. }
  1727. function initialize() {
  1728. // Add window resize listener that re-creates the chart
  1729. window.addEventListener('resize', this.resizeListener);
  1730. // Obtain current options based on matching media queries (if responsive options are given)
  1731. // This will also register a listener that is re-creating the chart based on media changes
  1732. this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
  1733. // Register options change listener that will trigger a chart update
  1734. this.eventEmitter.addEventHandler('optionsChanged', function() {
  1735. this.update();
  1736. }.bind(this));
  1737. // Before the first chart creation we need to register us with all plugins that are configured
  1738. // Initialize all relevant plugins with our chart object and the plugin options specified in the config
  1739. if(this.options.plugins) {
  1740. this.options.plugins.forEach(function(plugin) {
  1741. if(plugin instanceof Array) {
  1742. plugin[0](this, plugin[1]);
  1743. } else {
  1744. plugin(this);
  1745. }
  1746. }.bind(this));
  1747. }
  1748. // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
  1749. this.eventEmitter.emit('data', {
  1750. type: 'initial',
  1751. data: this.data
  1752. });
  1753. // Create the first chart
  1754. this.createChart(this.optionsProvider.getCurrentOptions());
  1755. // As chart is initialized from the event loop now we can reset our timeout reference
  1756. // This is important if the chart gets initialized on the same element twice
  1757. this.initializeTimeoutId = undefined;
  1758. }
  1759. /**
  1760. * Constructor of chart base class.
  1761. *
  1762. * @param query
  1763. * @param data
  1764. * @param defaultOptions
  1765. * @param options
  1766. * @param responsiveOptions
  1767. * @constructor
  1768. */
  1769. function Base(query, data, defaultOptions, options, responsiveOptions) {
  1770. this.container = Chartist.querySelector(query);
  1771. this.data = data || {};
  1772. this.data.labels = this.data.labels || [];
  1773. this.data.series = this.data.series || [];
  1774. this.defaultOptions = defaultOptions;
  1775. this.options = options;
  1776. this.responsiveOptions = responsiveOptions;
  1777. this.eventEmitter = Chartist.EventEmitter();
  1778. this.supportsForeignObject = Chartist.Svg.isSupported('Extensibility');
  1779. this.supportsAnimations = Chartist.Svg.isSupported('AnimationEventsAttribute');
  1780. this.resizeListener = function resizeListener(){
  1781. this.update();
  1782. }.bind(this);
  1783. if(this.container) {
  1784. // If chartist was already initialized in this container we are detaching all event listeners first
  1785. if(this.container.__chartist__) {
  1786. this.container.__chartist__.detach();
  1787. }
  1788. this.container.__chartist__ = this;
  1789. }
  1790. // Using event loop for first draw to make it possible to register event listeners in the same call stack where
  1791. // the chart was created.
  1792. this.initializeTimeoutId = setTimeout(initialize.bind(this), 0);
  1793. }
  1794. // Creating the chart base class
  1795. Chartist.Base = Chartist.Class.extend({
  1796. constructor: Base,
  1797. optionsProvider: undefined,
  1798. container: undefined,
  1799. svg: undefined,
  1800. eventEmitter: undefined,
  1801. createChart: function() {
  1802. throw new Error('Base chart type can\'t be instantiated!');
  1803. },
  1804. update: update,
  1805. detach: detach,
  1806. on: on,
  1807. off: off,
  1808. version: Chartist.version,
  1809. supportsForeignObject: false
  1810. });
  1811. }(this || __webpack_require__.g, Chartist));
  1812. ;/**
  1813. * Chartist SVG module for simple SVG DOM abstraction
  1814. *
  1815. * @module Chartist.Svg
  1816. */
  1817. /* global Chartist */
  1818. (function(globalRoot, Chartist) {
  1819. 'use strict';
  1820. var document = globalRoot.document;
  1821. /**
  1822. * Chartist.Svg creates a new SVG object wrapper with a starting element. You can use the wrapper to fluently create sub-elements and modify them.
  1823. *
  1824. * @memberof Chartist.Svg
  1825. * @constructor
  1826. * @param {String|Element} name The name of the SVG element to create or an SVG dom element which should be wrapped into Chartist.Svg
  1827. * @param {Object} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
  1828. * @param {String} className This class or class list will be added to the SVG element
  1829. * @param {Object} parent The parent SVG wrapper object where this newly created wrapper and it's element will be attached to as child
  1830. * @param {Boolean} insertFirst If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
  1831. */
  1832. function Svg(name, attributes, className, parent, insertFirst) {
  1833. // If Svg is getting called with an SVG element we just return the wrapper
  1834. if(name instanceof Element) {
  1835. this._node = name;
  1836. } else {
  1837. this._node = document.createElementNS(Chartist.namespaces.svg, name);
  1838. // If this is an SVG element created then custom namespace
  1839. if(name === 'svg') {
  1840. this.attr({
  1841. 'xmlns:ct': Chartist.namespaces.ct
  1842. });
  1843. }
  1844. }
  1845. if(attributes) {
  1846. this.attr(attributes);
  1847. }
  1848. if(className) {
  1849. this.addClass(className);
  1850. }
  1851. if(parent) {
  1852. if (insertFirst && parent._node.firstChild) {
  1853. parent._node.insertBefore(this._node, parent._node.firstChild);
  1854. } else {
  1855. parent._node.appendChild(this._node);
  1856. }
  1857. }
  1858. }
  1859. /**
  1860. * Set attributes on the current SVG element of the wrapper you're currently working on.
  1861. *
  1862. * @memberof Chartist.Svg
  1863. * @param {Object|String} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. If this parameter is a String then the function is used as a getter and will return the attribute value.
  1864. * @param {String} [ns] If specified, the attribute will be obtained using getAttributeNs. In order to write namepsaced attributes you can use the namespace:attribute notation within the attributes object.
  1865. * @return {Object|String} The current wrapper object will be returned so it can be used for chaining or the attribute value if used as getter function.
  1866. */
  1867. function attr(attributes, ns) {
  1868. if(typeof attributes === 'string') {
  1869. if(ns) {
  1870. return this._node.getAttributeNS(ns, attributes);
  1871. } else {
  1872. return this._node.getAttribute(attributes);
  1873. }
  1874. }
  1875. Object.keys(attributes).forEach(function(key) {
  1876. // If the attribute value is undefined we can skip this one
  1877. if(attributes[key] === undefined) {
  1878. return;
  1879. }
  1880. if (key.indexOf(':') !== -1) {
  1881. var namespacedAttribute = key.split(':');
  1882. this._node.setAttributeNS(Chartist.namespaces[namespacedAttribute[0]], key, attributes[key]);
  1883. } else {
  1884. this._node.setAttribute(key, attributes[key]);
  1885. }
  1886. }.bind(this));
  1887. return this;
  1888. }
  1889. /**
  1890. * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily.
  1891. *
  1892. * @memberof Chartist.Svg
  1893. * @param {String} name The name of the SVG element that should be created as child element of the currently selected element wrapper
  1894. * @param {Object} [attributes] An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
  1895. * @param {String} [className] This class or class list will be added to the SVG element
  1896. * @param {Boolean} [insertFirst] If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
  1897. * @return {Chartist.Svg} Returns a Chartist.Svg wrapper object that can be used to modify the containing SVG data
  1898. */
  1899. function elem(name, attributes, className, insertFirst) {
  1900. return new Chartist.Svg(name, attributes, className, this, insertFirst);
  1901. }
  1902. /**
  1903. * Returns the parent Chartist.SVG wrapper object
  1904. *
  1905. * @memberof Chartist.Svg
  1906. * @return {Chartist.Svg} Returns a Chartist.Svg wrapper around the parent node of the current node. If the parent node is not existing or it's not an SVG node then this function will return null.
  1907. */
  1908. function parent() {
  1909. return this._node.parentNode instanceof SVGElement ? new Chartist.Svg(this._node.parentNode) : null;
  1910. }
  1911. /**
  1912. * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree.
  1913. *
  1914. * @memberof Chartist.Svg
  1915. * @return {Chartist.Svg} The root SVG element wrapped in a Chartist.Svg element
  1916. */
  1917. function root() {
  1918. var node = this._node;
  1919. while(node.nodeName !== 'svg') {
  1920. node = node.parentNode;
  1921. }
  1922. return new Chartist.Svg(node);
  1923. }
  1924. /**
  1925. * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper.
  1926. *
  1927. * @memberof Chartist.Svg
  1928. * @param {String} selector A CSS selector that is used to query for child SVG elements
  1929. * @return {Chartist.Svg} The SVG wrapper for the element found or null if no element was found
  1930. */
  1931. function querySelector(selector) {
  1932. var foundNode = this._node.querySelector(selector);
  1933. return foundNode ? new Chartist.Svg(foundNode) : null;
  1934. }
  1935. /**
  1936. * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper.
  1937. *
  1938. * @memberof Chartist.Svg
  1939. * @param {String} selector A CSS selector that is used to query for child SVG elements
  1940. * @return {Chartist.Svg.List} The SVG wrapper list for the element found or null if no element was found
  1941. */
  1942. function querySelectorAll(selector) {
  1943. var foundNodes = this._node.querySelectorAll(selector);
  1944. return foundNodes.length ? new Chartist.Svg.List(foundNodes) : null;
  1945. }
  1946. /**
  1947. * Returns the underlying SVG node for the current element.
  1948. *
  1949. * @memberof Chartist.Svg
  1950. * @returns {Node}
  1951. */
  1952. function getNode() {
  1953. return this._node;
  1954. }
  1955. /**
  1956. * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM.
  1957. *
  1958. * @memberof Chartist.Svg
  1959. * @param {Node|String} content The DOM Node, or HTML string that will be converted to a DOM Node, that is then placed into and wrapped by the foreignObject
  1960. * @param {String} [attributes] An object with properties that will be added as attributes to the foreignObject element that is created. Attributes with undefined values will not be added.
  1961. * @param {String} [className] This class or class list will be added to the SVG element
  1962. * @param {Boolean} [insertFirst] Specifies if the foreignObject should be inserted as first child
  1963. * @return {Chartist.Svg} New wrapper object that wraps the foreignObject element
  1964. */
  1965. function foreignObject(content, attributes, className, insertFirst) {
  1966. // If content is string then we convert it to DOM
  1967. // TODO: Handle case where content is not a string nor a DOM Node
  1968. if(typeof content === 'string') {
  1969. var container = document.createElement('div');
  1970. container.innerHTML = content;
  1971. content = container.firstChild;
  1972. }
  1973. // Adding namespace to content element
  1974. content.setAttribute('xmlns', Chartist.namespaces.xmlns);
  1975. // Creating the foreignObject without required extension attribute (as described here
  1976. // http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement)
  1977. var fnObj = this.elem('foreignObject', attributes, className, insertFirst);
  1978. // Add content to foreignObjectElement
  1979. fnObj._node.appendChild(content);
  1980. return fnObj;
  1981. }
  1982. /**
  1983. * This method adds a new text element to the current Chartist.Svg wrapper.
  1984. *
  1985. * @memberof Chartist.Svg
  1986. * @param {String} t The text that should be added to the text element that is created
  1987. * @return {Chartist.Svg} The same wrapper object that was used to add the newly created element
  1988. */
  1989. function text(t) {
  1990. this._node.appendChild(document.createTextNode(t));
  1991. return this;
  1992. }
  1993. /**
  1994. * This method will clear all child nodes of the current wrapper object.
  1995. *
  1996. * @memberof Chartist.Svg
  1997. * @return {Chartist.Svg} The same wrapper object that got emptied
  1998. */
  1999. function empty() {
  2000. while (this._node.firstChild) {
  2001. this._node.removeChild(this._node.firstChild);
  2002. }
  2003. return this;
  2004. }
  2005. /**
  2006. * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure.
  2007. *
  2008. * @memberof Chartist.Svg
  2009. * @return {Chartist.Svg} The parent wrapper object of the element that got removed
  2010. */
  2011. function remove() {
  2012. this._node.parentNode.removeChild(this._node);
  2013. return this.parent();
  2014. }
  2015. /**
  2016. * This method will replace the element with a new element that can be created outside of the current DOM.
  2017. *
  2018. * @memberof Chartist.Svg
  2019. * @param {Chartist.Svg} newElement The new Chartist.Svg object that will be used to replace the current wrapper object
  2020. * @return {Chartist.Svg} The wrapper of the new element
  2021. */
  2022. function replace(newElement) {
  2023. this._node.parentNode.replaceChild(newElement._node, this._node);
  2024. return newElement;
  2025. }
  2026. /**
  2027. * This method will append an element to the current element as a child.
  2028. *
  2029. * @memberof Chartist.Svg
  2030. * @param {Chartist.Svg} element The Chartist.Svg element that should be added as a child
  2031. * @param {Boolean} [insertFirst] Specifies if the element should be inserted as first child
  2032. * @return {Chartist.Svg} The wrapper of the appended object
  2033. */
  2034. function append(element, insertFirst) {
  2035. if(insertFirst && this._node.firstChild) {
  2036. this._node.insertBefore(element._node, this._node.firstChild);
  2037. } else {
  2038. this._node.appendChild(element._node);
  2039. }
  2040. return this;
  2041. }
  2042. /**
  2043. * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further.
  2044. *
  2045. * @memberof Chartist.Svg
  2046. * @return {Array} A list of classes or an empty array if there are no classes on the current element
  2047. */
  2048. function classes() {
  2049. return this._node.getAttribute('class') ? this._node.getAttribute('class').trim().split(/\s+/) : [];
  2050. }
  2051. /**
  2052. * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once.
  2053. *
  2054. * @memberof Chartist.Svg
  2055. * @param {String} names A white space separated list of class names
  2056. * @return {Chartist.Svg} The wrapper of the current element
  2057. */
  2058. function addClass(names) {
  2059. this._node.setAttribute('class',
  2060. this.classes(this._node)
  2061. .concat(names.trim().split(/\s+/))
  2062. .filter(function(elem, pos, self) {
  2063. return self.indexOf(elem) === pos;
  2064. }).join(' ')
  2065. );
  2066. return this;
  2067. }
  2068. /**
  2069. * Removes one or a space separated list of classes from the current element.
  2070. *
  2071. * @memberof Chartist.Svg
  2072. * @param {String} names A white space separated list of class names
  2073. * @return {Chartist.Svg} The wrapper of the current element
  2074. */
  2075. function removeClass(names) {
  2076. var removedClasses = names.trim().split(/\s+/);
  2077. this._node.setAttribute('class', this.classes(this._node).filter(function(name) {
  2078. return removedClasses.indexOf(name) === -1;
  2079. }).join(' '));
  2080. return this;
  2081. }
  2082. /**
  2083. * Removes all classes from the current element.
  2084. *
  2085. * @memberof Chartist.Svg
  2086. * @return {Chartist.Svg} The wrapper of the current element
  2087. */
  2088. function removeAllClasses() {
  2089. this._node.setAttribute('class', '');
  2090. return this;
  2091. }
  2092. /**
  2093. * Get element height using `getBoundingClientRect`
  2094. *
  2095. * @memberof Chartist.Svg
  2096. * @return {Number} The elements height in pixels
  2097. */
  2098. function height() {
  2099. return this._node.getBoundingClientRect().height;
  2100. }
  2101. /**
  2102. * Get element width using `getBoundingClientRect`
  2103. *
  2104. * @memberof Chartist.Core
  2105. * @return {Number} The elements width in pixels
  2106. */
  2107. function width() {
  2108. return this._node.getBoundingClientRect().width;
  2109. }
  2110. /**
  2111. * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. Please refer to http://www.w3.org/TR/SVG/animate.html for a detailed specification about the available animation attributes. Additionally an easing property can be passed in the animation definition object. This can be a string with a name of an easing function in `Chartist.Svg.Easing` or an array with four numbers specifying a cubic Bézier curve.
  2112. * **An animations object could look like this:**
  2113. * ```javascript
  2114. * element.animate({
  2115. * opacity: {
  2116. * dur: 1000,
  2117. * from: 0,
  2118. * to: 1
  2119. * },
  2120. * x1: {
  2121. * dur: '1000ms',
  2122. * from: 100,
  2123. * to: 200,
  2124. * easing: 'easeOutQuart'
  2125. * },
  2126. * y1: {
  2127. * dur: '2s',
  2128. * from: 0,
  2129. * to: 100
  2130. * }
  2131. * });
  2132. * ```
  2133. * **Automatic unit conversion**
  2134. * For the `dur` and the `begin` animate attribute you can also omit a unit by passing a number. The number will automatically be converted to milli seconds.
  2135. * **Guided mode**
  2136. * The default behavior of SMIL animations with offset using the `begin` attribute is that the attribute will keep it's original value until the animation starts. Mostly this behavior is not desired as you'd like to have your element attributes already initialized with the animation `from` value even before the animation starts. Also if you don't specify `fill="freeze"` on an animate element or if you delete the animation after it's done (which is done in guided mode) the attribute will switch back to the initial value. This behavior is also not desired when performing simple one-time animations. For one-time animations you'd want to trigger animations immediately instead of relative to the document begin time. That's why in guided mode Chartist.Svg will also use the `begin` property to schedule a timeout and manually start the animation after the timeout. If you're using multiple SMIL definition objects for an attribute (in an array), guided mode will be disabled for this attribute, even if you explicitly enabled it.
  2137. * If guided mode is enabled the following behavior is added:
  2138. * - Before the animation starts (even when delayed with `begin`) the animated attribute will be set already to the `from` value of the animation
  2139. * - `begin` is explicitly set to `indefinite` so it can be started manually without relying on document begin time (creation)
  2140. * - The animate element will be forced to use `fill="freeze"`
  2141. * - The animation will be triggered with `beginElement()` in a timeout where `begin` of the definition object is interpreted in milli seconds. If no `begin` was specified the timeout is triggered immediately.
  2142. * - After the animation the element attribute value will be set to the `to` value of the animation
  2143. * - The animate element is deleted from the DOM
  2144. *
  2145. * @memberof Chartist.Svg
  2146. * @param {Object} animations An animations object where the property keys are the attributes you'd like to animate. The properties should be objects again that contain the SMIL animation attributes (usually begin, dur, from, and to). The property begin and dur is auto converted (see Automatic unit conversion). You can also schedule multiple animations for the same attribute by passing an Array of SMIL definition objects. Attributes that contain an array of SMIL definition objects will not be executed in guided mode.
  2147. * @param {Boolean} guided Specify if guided mode should be activated for this animation (see Guided mode). If not otherwise specified, guided mode will be activated.
  2148. * @param {Object} eventEmitter If specified, this event emitter will be notified when an animation starts or ends.
  2149. * @return {Chartist.Svg} The current element where the animation was added
  2150. */
  2151. function animate(animations, guided, eventEmitter) {
  2152. if(guided === undefined) {
  2153. guided = true;
  2154. }
  2155. Object.keys(animations).forEach(function createAnimateForAttributes(attribute) {
  2156. function createAnimate(animationDefinition, guided) {
  2157. var attributeProperties = {},
  2158. animate,
  2159. timeout,
  2160. easing;
  2161. // Check if an easing is specified in the definition object and delete it from the object as it will not
  2162. // be part of the animate element attributes.
  2163. if(animationDefinition.easing) {
  2164. // If already an easing Bézier curve array we take it or we lookup a easing array in the Easing object
  2165. easing = animationDefinition.easing instanceof Array ?
  2166. animationDefinition.easing :
  2167. Chartist.Svg.Easing[animationDefinition.easing];
  2168. delete animationDefinition.easing;
  2169. }
  2170. // If numeric dur or begin was provided we assume milli seconds
  2171. animationDefinition.begin = Chartist.ensureUnit(animationDefinition.begin, 'ms');
  2172. animationDefinition.dur = Chartist.ensureUnit(animationDefinition.dur, 'ms');
  2173. if(easing) {
  2174. animationDefinition.calcMode = 'spline';
  2175. animationDefinition.keySplines = easing.join(' ');
  2176. animationDefinition.keyTimes = '0;1';
  2177. }
  2178. // Adding "fill: freeze" if we are in guided mode and set initial attribute values
  2179. if(guided) {
  2180. animationDefinition.fill = 'freeze';
  2181. // Animated property on our element should already be set to the animation from value in guided mode
  2182. attributeProperties[attribute] = animationDefinition.from;
  2183. this.attr(attributeProperties);
  2184. // In guided mode we also set begin to indefinite so we can trigger the start manually and put the begin
  2185. // which needs to be in ms aside
  2186. timeout = Chartist.quantity(animationDefinition.begin || 0).value;
  2187. animationDefinition.begin = 'indefinite';
  2188. }
  2189. animate = this.elem('animate', Chartist.extend({
  2190. attributeName: attribute
  2191. }, animationDefinition));
  2192. if(guided) {
  2193. // If guided we take the value that was put aside in timeout and trigger the animation manually with a timeout
  2194. setTimeout(function() {
  2195. // If beginElement fails we set the animated attribute to the end position and remove the animate element
  2196. // This happens if the SMIL ElementTimeControl interface is not supported or any other problems occured in
  2197. // the browser. (Currently FF 34 does not support animate elements in foreignObjects)
  2198. try {
  2199. animate._node.beginElement();
  2200. } catch(err) {
  2201. // Set animated attribute to current animated value
  2202. attributeProperties[attribute] = animationDefinition.to;
  2203. this.attr(attributeProperties);
  2204. // Remove the animate element as it's no longer required
  2205. animate.remove();
  2206. }
  2207. }.bind(this), timeout);
  2208. }
  2209. if(eventEmitter) {
  2210. animate._node.addEventListener('beginEvent', function handleBeginEvent() {
  2211. eventEmitter.emit('animationBegin', {
  2212. element: this,
  2213. animate: animate._node,
  2214. params: animationDefinition
  2215. });
  2216. }.bind(this));
  2217. }
  2218. animate._node.addEventListener('endEvent', function handleEndEvent() {
  2219. if(eventEmitter) {
  2220. eventEmitter.emit('animationEnd', {
  2221. element: this,
  2222. animate: animate._node,
  2223. params: animationDefinition
  2224. });
  2225. }
  2226. if(guided) {
  2227. // Set animated attribute to current animated value
  2228. attributeProperties[attribute] = animationDefinition.to;
  2229. this.attr(attributeProperties);
  2230. // Remove the animate element as it's no longer required
  2231. animate.remove();
  2232. }
  2233. }.bind(this));
  2234. }
  2235. // If current attribute is an array of definition objects we create an animate for each and disable guided mode
  2236. if(animations[attribute] instanceof Array) {
  2237. animations[attribute].forEach(function(animationDefinition) {
  2238. createAnimate.bind(this)(animationDefinition, false);
  2239. }.bind(this));
  2240. } else {
  2241. createAnimate.bind(this)(animations[attribute], guided);
  2242. }
  2243. }.bind(this));
  2244. return this;
  2245. }
  2246. Chartist.Svg = Chartist.Class.extend({
  2247. constructor: Svg,
  2248. attr: attr,
  2249. elem: elem,
  2250. parent: parent,
  2251. root: root,
  2252. querySelector: querySelector,
  2253. querySelectorAll: querySelectorAll,
  2254. getNode: getNode,
  2255. foreignObject: foreignObject,
  2256. text: text,
  2257. empty: empty,
  2258. remove: remove,
  2259. replace: replace,
  2260. append: append,
  2261. classes: classes,
  2262. addClass: addClass,
  2263. removeClass: removeClass,
  2264. removeAllClasses: removeAllClasses,
  2265. height: height,
  2266. width: width,
  2267. animate: animate
  2268. });
  2269. /**
  2270. * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list.
  2271. *
  2272. * @memberof Chartist.Svg
  2273. * @param {String} feature The SVG 1.1 feature that should be checked for support.
  2274. * @return {Boolean} True of false if the feature is supported or not
  2275. */
  2276. Chartist.Svg.isSupported = function(feature) {
  2277. return document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#' + feature, '1.1');
  2278. };
  2279. /**
  2280. * This Object contains some standard easing cubic bezier curves. Then can be used with their name in the `Chartist.Svg.animate`. You can also extend the list and use your own name in the `animate` function. Click the show code button to see the available bezier functions.
  2281. *
  2282. * @memberof Chartist.Svg
  2283. */
  2284. var easingCubicBeziers = {
  2285. easeInSine: [0.47, 0, 0.745, 0.715],
  2286. easeOutSine: [0.39, 0.575, 0.565, 1],
  2287. easeInOutSine: [0.445, 0.05, 0.55, 0.95],
  2288. easeInQuad: [0.55, 0.085, 0.68, 0.53],
  2289. easeOutQuad: [0.25, 0.46, 0.45, 0.94],
  2290. easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
  2291. easeInCubic: [0.55, 0.055, 0.675, 0.19],
  2292. easeOutCubic: [0.215, 0.61, 0.355, 1],
  2293. easeInOutCubic: [0.645, 0.045, 0.355, 1],
  2294. easeInQuart: [0.895, 0.03, 0.685, 0.22],
  2295. easeOutQuart: [0.165, 0.84, 0.44, 1],
  2296. easeInOutQuart: [0.77, 0, 0.175, 1],
  2297. easeInQuint: [0.755, 0.05, 0.855, 0.06],
  2298. easeOutQuint: [0.23, 1, 0.32, 1],
  2299. easeInOutQuint: [0.86, 0, 0.07, 1],
  2300. easeInExpo: [0.95, 0.05, 0.795, 0.035],
  2301. easeOutExpo: [0.19, 1, 0.22, 1],
  2302. easeInOutExpo: [1, 0, 0, 1],
  2303. easeInCirc: [0.6, 0.04, 0.98, 0.335],
  2304. easeOutCirc: [0.075, 0.82, 0.165, 1],
  2305. easeInOutCirc: [0.785, 0.135, 0.15, 0.86],
  2306. easeInBack: [0.6, -0.28, 0.735, 0.045],
  2307. easeOutBack: [0.175, 0.885, 0.32, 1.275],
  2308. easeInOutBack: [0.68, -0.55, 0.265, 1.55]
  2309. };
  2310. Chartist.Svg.Easing = easingCubicBeziers;
  2311. /**
  2312. * This helper class is to wrap multiple `Chartist.Svg` elements into a list where you can call the `Chartist.Svg` functions on all elements in the list with one call. This is helpful when you'd like to perform calls with `Chartist.Svg` on multiple elements.
  2313. * An instance of this class is also returned by `Chartist.Svg.querySelectorAll`.
  2314. *
  2315. * @memberof Chartist.Svg
  2316. * @param {Array<Node>|NodeList} nodeList An Array of SVG DOM nodes or a SVG DOM NodeList (as returned by document.querySelectorAll)
  2317. * @constructor
  2318. */
  2319. function SvgList(nodeList) {
  2320. var list = this;
  2321. this.svgElements = [];
  2322. for(var i = 0; i < nodeList.length; i++) {
  2323. this.svgElements.push(new Chartist.Svg(nodeList[i]));
  2324. }
  2325. // Add delegation methods for Chartist.Svg
  2326. Object.keys(Chartist.Svg.prototype).filter(function(prototypeProperty) {
  2327. return ['constructor',
  2328. 'parent',
  2329. 'querySelector',
  2330. 'querySelectorAll',
  2331. 'replace',
  2332. 'append',
  2333. 'classes',
  2334. 'height',
  2335. 'width'].indexOf(prototypeProperty) === -1;
  2336. }).forEach(function(prototypeProperty) {
  2337. list[prototypeProperty] = function() {
  2338. var args = Array.prototype.slice.call(arguments, 0);
  2339. list.svgElements.forEach(function(element) {
  2340. Chartist.Svg.prototype[prototypeProperty].apply(element, args);
  2341. });
  2342. return list;
  2343. };
  2344. });
  2345. }
  2346. Chartist.Svg.List = Chartist.Class.extend({
  2347. constructor: SvgList
  2348. });
  2349. }(this || __webpack_require__.g, Chartist));
  2350. ;/**
  2351. * Chartist SVG path module for SVG path description creation and modification.
  2352. *
  2353. * @module Chartist.Svg.Path
  2354. */
  2355. /* global Chartist */
  2356. (function(globalRoot, Chartist) {
  2357. 'use strict';
  2358. /**
  2359. * Contains the descriptors of supported element types in a SVG path. Currently only move, line and curve are supported.
  2360. *
  2361. * @memberof Chartist.Svg.Path
  2362. * @type {Object}
  2363. */
  2364. var elementDescriptions = {
  2365. m: ['x', 'y'],
  2366. l: ['x', 'y'],
  2367. c: ['x1', 'y1', 'x2', 'y2', 'x', 'y'],
  2368. a: ['rx', 'ry', 'xAr', 'lAf', 'sf', 'x', 'y']
  2369. };
  2370. /**
  2371. * Default options for newly created SVG path objects.
  2372. *
  2373. * @memberof Chartist.Svg.Path
  2374. * @type {Object}
  2375. */
  2376. var defaultOptions = {
  2377. // The accuracy in digit count after the decimal point. This will be used to round numbers in the SVG path. If this option is set to false then no rounding will be performed.
  2378. accuracy: 3
  2379. };
  2380. function element(command, params, pathElements, pos, relative, data) {
  2381. var pathElement = Chartist.extend({
  2382. command: relative ? command.toLowerCase() : command.toUpperCase()
  2383. }, params, data ? { data: data } : {} );
  2384. pathElements.splice(pos, 0, pathElement);
  2385. }
  2386. function forEachParam(pathElements, cb) {
  2387. pathElements.forEach(function(pathElement, pathElementIndex) {
  2388. elementDescriptions[pathElement.command.toLowerCase()].forEach(function(paramName, paramIndex) {
  2389. cb(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
  2390. });
  2391. });
  2392. }
  2393. /**
  2394. * Used to construct a new path object.
  2395. *
  2396. * @memberof Chartist.Svg.Path
  2397. * @param {Boolean} close If set to true then this path will be closed when stringified (with a Z at the end)
  2398. * @param {Object} options Options object that overrides the default objects. See default options for more details.
  2399. * @constructor
  2400. */
  2401. function SvgPath(close, options) {
  2402. this.pathElements = [];
  2403. this.pos = 0;
  2404. this.close = close;
  2405. this.options = Chartist.extend({}, defaultOptions, options);
  2406. }
  2407. /**
  2408. * Gets or sets the current position (cursor) inside of the path. You can move around the cursor freely but limited to 0 or the count of existing elements. All modifications with element functions will insert new elements at the position of this cursor.
  2409. *
  2410. * @memberof Chartist.Svg.Path
  2411. * @param {Number} [pos] If a number is passed then the cursor is set to this position in the path element array.
  2412. * @return {Chartist.Svg.Path|Number} If the position parameter was passed then the return value will be the path object for easy call chaining. If no position parameter was passed then the current position is returned.
  2413. */
  2414. function position(pos) {
  2415. if(pos !== undefined) {
  2416. this.pos = Math.max(0, Math.min(this.pathElements.length, pos));
  2417. return this;
  2418. } else {
  2419. return this.pos;
  2420. }
  2421. }
  2422. /**
  2423. * Removes elements from the path starting at the current position.
  2424. *
  2425. * @memberof Chartist.Svg.Path
  2426. * @param {Number} count Number of path elements that should be removed from the current position.
  2427. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2428. */
  2429. function remove(count) {
  2430. this.pathElements.splice(this.pos, count);
  2431. return this;
  2432. }
  2433. /**
  2434. * Use this function to add a new move SVG path element.
  2435. *
  2436. * @memberof Chartist.Svg.Path
  2437. * @param {Number} x The x coordinate for the move element.
  2438. * @param {Number} y The y coordinate for the move element.
  2439. * @param {Boolean} [relative] If set to true the move element will be created with relative coordinates (lowercase letter)
  2440. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2441. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2442. */
  2443. function move(x, y, relative, data) {
  2444. element('M', {
  2445. x: +x,
  2446. y: +y
  2447. }, this.pathElements, this.pos++, relative, data);
  2448. return this;
  2449. }
  2450. /**
  2451. * Use this function to add a new line SVG path element.
  2452. *
  2453. * @memberof Chartist.Svg.Path
  2454. * @param {Number} x The x coordinate for the line element.
  2455. * @param {Number} y The y coordinate for the line element.
  2456. * @param {Boolean} [relative] If set to true the line element will be created with relative coordinates (lowercase letter)
  2457. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2458. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2459. */
  2460. function line(x, y, relative, data) {
  2461. element('L', {
  2462. x: +x,
  2463. y: +y
  2464. }, this.pathElements, this.pos++, relative, data);
  2465. return this;
  2466. }
  2467. /**
  2468. * Use this function to add a new curve SVG path element.
  2469. *
  2470. * @memberof Chartist.Svg.Path
  2471. * @param {Number} x1 The x coordinate for the first control point of the bezier curve.
  2472. * @param {Number} y1 The y coordinate for the first control point of the bezier curve.
  2473. * @param {Number} x2 The x coordinate for the second control point of the bezier curve.
  2474. * @param {Number} y2 The y coordinate for the second control point of the bezier curve.
  2475. * @param {Number} x The x coordinate for the target point of the curve element.
  2476. * @param {Number} y The y coordinate for the target point of the curve element.
  2477. * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
  2478. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2479. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2480. */
  2481. function curve(x1, y1, x2, y2, x, y, relative, data) {
  2482. element('C', {
  2483. x1: +x1,
  2484. y1: +y1,
  2485. x2: +x2,
  2486. y2: +y2,
  2487. x: +x,
  2488. y: +y
  2489. }, this.pathElements, this.pos++, relative, data);
  2490. return this;
  2491. }
  2492. /**
  2493. * Use this function to add a new non-bezier curve SVG path element.
  2494. *
  2495. * @memberof Chartist.Svg.Path
  2496. * @param {Number} rx The radius to be used for the x-axis of the arc.
  2497. * @param {Number} ry The radius to be used for the y-axis of the arc.
  2498. * @param {Number} xAr Defines the orientation of the arc
  2499. * @param {Number} lAf Large arc flag
  2500. * @param {Number} sf Sweep flag
  2501. * @param {Number} x The x coordinate for the target point of the curve element.
  2502. * @param {Number} y The y coordinate for the target point of the curve element.
  2503. * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
  2504. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2505. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2506. */
  2507. function arc(rx, ry, xAr, lAf, sf, x, y, relative, data) {
  2508. element('A', {
  2509. rx: +rx,
  2510. ry: +ry,
  2511. xAr: +xAr,
  2512. lAf: +lAf,
  2513. sf: +sf,
  2514. x: +x,
  2515. y: +y
  2516. }, this.pathElements, this.pos++, relative, data);
  2517. return this;
  2518. }
  2519. /**
  2520. * Parses an SVG path seen in the d attribute of path elements, and inserts the parsed elements into the existing path object at the current cursor position. Any closing path indicators (Z at the end of the path) will be ignored by the parser as this is provided by the close option in the options of the path object.
  2521. *
  2522. * @memberof Chartist.Svg.Path
  2523. * @param {String} path Any SVG path that contains move (m), line (l) or curve (c) components.
  2524. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2525. */
  2526. function parse(path) {
  2527. // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']]
  2528. var chunks = path.replace(/([A-Za-z])([0-9])/g, '$1 $2')
  2529. .replace(/([0-9])([A-Za-z])/g, '$1 $2')
  2530. .split(/[\s,]+/)
  2531. .reduce(function(result, element) {
  2532. if(element.match(/[A-Za-z]/)) {
  2533. result.push([]);
  2534. }
  2535. result[result.length - 1].push(element);
  2536. return result;
  2537. }, []);
  2538. // If this is a closed path we remove the Z at the end because this is determined by the close option
  2539. if(chunks[chunks.length - 1][0].toUpperCase() === 'Z') {
  2540. chunks.pop();
  2541. }
  2542. // Using svgPathElementDescriptions to map raw path arrays into objects that contain the command and the parameters
  2543. // For example {command: 'M', x: '10', y: '10'}
  2544. var elements = chunks.map(function(chunk) {
  2545. var command = chunk.shift(),
  2546. description = elementDescriptions[command.toLowerCase()];
  2547. return Chartist.extend({
  2548. command: command
  2549. }, description.reduce(function(result, paramName, index) {
  2550. result[paramName] = +chunk[index];
  2551. return result;
  2552. }, {}));
  2553. });
  2554. // Preparing a splice call with the elements array as var arg params and insert the parsed elements at the current position
  2555. var spliceArgs = [this.pos, 0];
  2556. Array.prototype.push.apply(spliceArgs, elements);
  2557. Array.prototype.splice.apply(this.pathElements, spliceArgs);
  2558. // Increase the internal position by the element count
  2559. this.pos += elements.length;
  2560. return this;
  2561. }
  2562. /**
  2563. * This function renders to current SVG path object into a final SVG string that can be used in the d attribute of SVG path elements. It uses the accuracy option to round big decimals. If the close parameter was set in the constructor of this path object then a path closing Z will be appended to the output string.
  2564. *
  2565. * @memberof Chartist.Svg.Path
  2566. * @return {String}
  2567. */
  2568. function stringify() {
  2569. var accuracyMultiplier = Math.pow(10, this.options.accuracy);
  2570. return this.pathElements.reduce(function(path, pathElement) {
  2571. var params = elementDescriptions[pathElement.command.toLowerCase()].map(function(paramName) {
  2572. return this.options.accuracy ?
  2573. (Math.round(pathElement[paramName] * accuracyMultiplier) / accuracyMultiplier) :
  2574. pathElement[paramName];
  2575. }.bind(this));
  2576. return path + pathElement.command + params.join(',');
  2577. }.bind(this), '') + (this.close ? 'Z' : '');
  2578. }
  2579. /**
  2580. * Scales all elements in the current SVG path object. There is an individual parameter for each coordinate. Scaling will also be done for control points of curves, affecting the given coordinate.
  2581. *
  2582. * @memberof Chartist.Svg.Path
  2583. * @param {Number} x The number which will be used to scale the x, x1 and x2 of all path elements.
  2584. * @param {Number} y The number which will be used to scale the y, y1 and y2 of all path elements.
  2585. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2586. */
  2587. function scale(x, y) {
  2588. forEachParam(this.pathElements, function(pathElement, paramName) {
  2589. pathElement[paramName] *= paramName[0] === 'x' ? x : y;
  2590. });
  2591. return this;
  2592. }
  2593. /**
  2594. * Translates all elements in the current SVG path object. The translation is relative and there is an individual parameter for each coordinate. Translation will also be done for control points of curves, affecting the given coordinate.
  2595. *
  2596. * @memberof Chartist.Svg.Path
  2597. * @param {Number} x The number which will be used to translate the x, x1 and x2 of all path elements.
  2598. * @param {Number} y The number which will be used to translate the y, y1 and y2 of all path elements.
  2599. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2600. */
  2601. function translate(x, y) {
  2602. forEachParam(this.pathElements, function(pathElement, paramName) {
  2603. pathElement[paramName] += paramName[0] === 'x' ? x : y;
  2604. });
  2605. return this;
  2606. }
  2607. /**
  2608. * This function will run over all existing path elements and then loop over their attributes. The callback function will be called for every path element attribute that exists in the current path.
  2609. * The method signature of the callback function looks like this:
  2610. * ```javascript
  2611. * function(pathElement, paramName, pathElementIndex, paramIndex, pathElements)
  2612. * ```
  2613. * If something else than undefined is returned by the callback function, this value will be used to replace the old value. This allows you to build custom transformations of path objects that can't be achieved using the basic transformation functions scale and translate.
  2614. *
  2615. * @memberof Chartist.Svg.Path
  2616. * @param {Function} transformFnc The callback function for the transformation. Check the signature in the function description.
  2617. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2618. */
  2619. function transform(transformFnc) {
  2620. forEachParam(this.pathElements, function(pathElement, paramName, pathElementIndex, paramIndex, pathElements) {
  2621. var transformed = transformFnc(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
  2622. if(transformed || transformed === 0) {
  2623. pathElement[paramName] = transformed;
  2624. }
  2625. });
  2626. return this;
  2627. }
  2628. /**
  2629. * This function clones a whole path object with all its properties. This is a deep clone and path element objects will also be cloned.
  2630. *
  2631. * @memberof Chartist.Svg.Path
  2632. * @param {Boolean} [close] Optional option to set the new cloned path to closed. If not specified or false, the original path close option will be used.
  2633. * @return {Chartist.Svg.Path}
  2634. */
  2635. function clone(close) {
  2636. var c = new Chartist.Svg.Path(close || this.close);
  2637. c.pos = this.pos;
  2638. c.pathElements = this.pathElements.slice().map(function cloneElements(pathElement) {
  2639. return Chartist.extend({}, pathElement);
  2640. });
  2641. c.options = Chartist.extend({}, this.options);
  2642. return c;
  2643. }
  2644. /**
  2645. * Split a Svg.Path object by a specific command in the path chain. The path chain will be split and an array of newly created paths objects will be returned. This is useful if you'd like to split an SVG path by it's move commands, for example, in order to isolate chunks of drawings.
  2646. *
  2647. * @memberof Chartist.Svg.Path
  2648. * @param {String} command The command you'd like to use to split the path
  2649. * @return {Array<Chartist.Svg.Path>}
  2650. */
  2651. function splitByCommand(command) {
  2652. var split = [
  2653. new Chartist.Svg.Path()
  2654. ];
  2655. this.pathElements.forEach(function(pathElement) {
  2656. if(pathElement.command === command.toUpperCase() && split[split.length - 1].pathElements.length !== 0) {
  2657. split.push(new Chartist.Svg.Path());
  2658. }
  2659. split[split.length - 1].pathElements.push(pathElement);
  2660. });
  2661. return split;
  2662. }
  2663. /**
  2664. * This static function on `Chartist.Svg.Path` is joining multiple paths together into one paths.
  2665. *
  2666. * @memberof Chartist.Svg.Path
  2667. * @param {Array<Chartist.Svg.Path>} paths A list of paths to be joined together. The order is important.
  2668. * @param {boolean} close If the newly created path should be a closed path
  2669. * @param {Object} options Path options for the newly created path.
  2670. * @return {Chartist.Svg.Path}
  2671. */
  2672. function join(paths, close, options) {
  2673. var joinedPath = new Chartist.Svg.Path(close, options);
  2674. for(var i = 0; i < paths.length; i++) {
  2675. var path = paths[i];
  2676. for(var j = 0; j < path.pathElements.length; j++) {
  2677. joinedPath.pathElements.push(path.pathElements[j]);
  2678. }
  2679. }
  2680. return joinedPath;
  2681. }
  2682. Chartist.Svg.Path = Chartist.Class.extend({
  2683. constructor: SvgPath,
  2684. position: position,
  2685. remove: remove,
  2686. move: move,
  2687. line: line,
  2688. curve: curve,
  2689. arc: arc,
  2690. scale: scale,
  2691. translate: translate,
  2692. transform: transform,
  2693. parse: parse,
  2694. stringify: stringify,
  2695. clone: clone,
  2696. splitByCommand: splitByCommand
  2697. });
  2698. Chartist.Svg.Path.elementDescriptions = elementDescriptions;
  2699. Chartist.Svg.Path.join = join;
  2700. }(this || __webpack_require__.g, Chartist));
  2701. ;/* global Chartist */
  2702. (function (globalRoot, Chartist) {
  2703. 'use strict';
  2704. var window = globalRoot.window;
  2705. var document = globalRoot.document;
  2706. var axisUnits = {
  2707. x: {
  2708. pos: 'x',
  2709. len: 'width',
  2710. dir: 'horizontal',
  2711. rectStart: 'x1',
  2712. rectEnd: 'x2',
  2713. rectOffset: 'y2'
  2714. },
  2715. y: {
  2716. pos: 'y',
  2717. len: 'height',
  2718. dir: 'vertical',
  2719. rectStart: 'y2',
  2720. rectEnd: 'y1',
  2721. rectOffset: 'x1'
  2722. }
  2723. };
  2724. function Axis(units, chartRect, ticks, options) {
  2725. this.units = units;
  2726. this.counterUnits = units === axisUnits.x ? axisUnits.y : axisUnits.x;
  2727. this.chartRect = chartRect;
  2728. this.axisLength = chartRect[units.rectEnd] - chartRect[units.rectStart];
  2729. this.gridOffset = chartRect[units.rectOffset];
  2730. this.ticks = ticks;
  2731. this.options = options;
  2732. }
  2733. function createGridAndLabels(gridGroup, labelGroup, useForeignObject, chartOptions, eventEmitter) {
  2734. var axisOptions = chartOptions['axis' + this.units.pos.toUpperCase()];
  2735. var projectedValues = this.ticks.map(this.projectValue.bind(this));
  2736. var labelValues = this.ticks.map(axisOptions.labelInterpolationFnc);
  2737. projectedValues.forEach(function(projectedValue, index) {
  2738. var labelOffset = {
  2739. x: 0,
  2740. y: 0
  2741. };
  2742. // TODO: Find better solution for solving this problem
  2743. // Calculate how much space we have available for the label
  2744. var labelLength;
  2745. if(projectedValues[index + 1]) {
  2746. // If we still have one label ahead, we can calculate the distance to the next tick / label
  2747. labelLength = projectedValues[index + 1] - projectedValue;
  2748. } else {
  2749. // If we don't have a label ahead and we have only two labels in total, we just take the remaining distance to
  2750. // on the whole axis length. We limit that to a minimum of 30 pixel, so that labels close to the border will
  2751. // still be visible inside of the chart padding.
  2752. labelLength = Math.max(this.axisLength - projectedValue, 30);
  2753. }
  2754. // Skip grid lines and labels where interpolated label values are falsey (execpt for 0)
  2755. if(Chartist.isFalseyButZero(labelValues[index]) && labelValues[index] !== '') {
  2756. return;
  2757. }
  2758. // Transform to global coordinates using the chartRect
  2759. // We also need to set the label offset for the createLabel function
  2760. if(this.units.pos === 'x') {
  2761. projectedValue = this.chartRect.x1 + projectedValue;
  2762. labelOffset.x = chartOptions.axisX.labelOffset.x;
  2763. // If the labels should be positioned in start position (top side for vertical axis) we need to set a
  2764. // different offset as for positioned with end (bottom)
  2765. if(chartOptions.axisX.position === 'start') {
  2766. labelOffset.y = this.chartRect.padding.top + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
  2767. } else {
  2768. labelOffset.y = this.chartRect.y1 + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
  2769. }
  2770. } else {
  2771. projectedValue = this.chartRect.y1 - projectedValue;
  2772. labelOffset.y = chartOptions.axisY.labelOffset.y - (useForeignObject ? labelLength : 0);
  2773. // If the labels should be positioned in start position (left side for horizontal axis) we need to set a
  2774. // different offset as for positioned with end (right side)
  2775. if(chartOptions.axisY.position === 'start') {
  2776. labelOffset.x = useForeignObject ? this.chartRect.padding.left + chartOptions.axisY.labelOffset.x : this.chartRect.x1 - 10;
  2777. } else {
  2778. labelOffset.x = this.chartRect.x2 + chartOptions.axisY.labelOffset.x + 10;
  2779. }
  2780. }
  2781. if(axisOptions.showGrid) {
  2782. Chartist.createGrid(projectedValue, index, this, this.gridOffset, this.chartRect[this.counterUnits.len](), gridGroup, [
  2783. chartOptions.classNames.grid,
  2784. chartOptions.classNames[this.units.dir]
  2785. ], eventEmitter);
  2786. }
  2787. if(axisOptions.showLabel) {
  2788. Chartist.createLabel(projectedValue, labelLength, index, labelValues, this, axisOptions.offset, labelOffset, labelGroup, [
  2789. chartOptions.classNames.label,
  2790. chartOptions.classNames[this.units.dir],
  2791. (axisOptions.position === 'start' ? chartOptions.classNames[axisOptions.position] : chartOptions.classNames['end'])
  2792. ], useForeignObject, eventEmitter);
  2793. }
  2794. }.bind(this));
  2795. }
  2796. Chartist.Axis = Chartist.Class.extend({
  2797. constructor: Axis,
  2798. createGridAndLabels: createGridAndLabels,
  2799. projectValue: function(value, index, data) {
  2800. throw new Error('Base axis can\'t be instantiated!');
  2801. }
  2802. });
  2803. Chartist.Axis.units = axisUnits;
  2804. }(this || __webpack_require__.g, Chartist));
  2805. ;/**
  2806. * The auto scale axis uses standard linear scale projection of values along an axis. It uses order of magnitude to find a scale automatically and evaluates the available space in order to find the perfect amount of ticks for your chart.
  2807. * **Options**
  2808. * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
  2809. * ```javascript
  2810. * var options = {
  2811. * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
  2812. * high: 100,
  2813. * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
  2814. * low: 0,
  2815. * // This option will be used when finding the right scale division settings. The amount of ticks on the scale will be determined so that as many ticks as possible will be displayed, while not violating this minimum required space (in pixel).
  2816. * scaleMinSpace: 20,
  2817. * // Can be set to true or false. If set to true, the scale will be generated with whole numbers only.
  2818. * onlyInteger: true,
  2819. * // The reference value can be used to make sure that this value will always be on the chart. This is especially useful on bipolar charts where the bipolar center always needs to be part of the chart.
  2820. * referenceValue: 5
  2821. * };
  2822. * ```
  2823. *
  2824. * @module Chartist.AutoScaleAxis
  2825. */
  2826. /* global Chartist */
  2827. (function (globalRoot, Chartist) {
  2828. 'use strict';
  2829. var window = globalRoot.window;
  2830. var document = globalRoot.document;
  2831. function AutoScaleAxis(axisUnit, data, chartRect, options) {
  2832. // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options
  2833. var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos);
  2834. this.bounds = Chartist.getBounds(chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger);
  2835. this.range = {
  2836. min: this.bounds.min,
  2837. max: this.bounds.max
  2838. };
  2839. Chartist.AutoScaleAxis.super.constructor.call(this,
  2840. axisUnit,
  2841. chartRect,
  2842. this.bounds.values,
  2843. options);
  2844. }
  2845. function projectValue(value) {
  2846. return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.bounds.min) / this.bounds.range;
  2847. }
  2848. Chartist.AutoScaleAxis = Chartist.Axis.extend({
  2849. constructor: AutoScaleAxis,
  2850. projectValue: projectValue
  2851. });
  2852. }(this || __webpack_require__.g, Chartist));
  2853. ;/**
  2854. * The fixed scale axis uses standard linear projection of values along an axis. It makes use of a divisor option to divide the range provided from the minimum and maximum value or the options high and low that will override the computed minimum and maximum.
  2855. * **Options**
  2856. * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
  2857. * ```javascript
  2858. * var options = {
  2859. * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
  2860. * high: 100,
  2861. * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
  2862. * low: 0,
  2863. * // If specified then the value range determined from minimum to maximum (or low and high) will be divided by this number and ticks will be generated at those division points. The default divisor is 1.
  2864. * divisor: 4,
  2865. * // If ticks is explicitly set, then the axis will not compute the ticks with the divisor, but directly use the data in ticks to determine at what points on the axis a tick need to be generated.
  2866. * ticks: [1, 10, 20, 30]
  2867. * };
  2868. * ```
  2869. *
  2870. * @module Chartist.FixedScaleAxis
  2871. */
  2872. /* global Chartist */
  2873. (function (globalRoot, Chartist) {
  2874. 'use strict';
  2875. var window = globalRoot.window;
  2876. var document = globalRoot.document;
  2877. function FixedScaleAxis(axisUnit, data, chartRect, options) {
  2878. var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos);
  2879. this.divisor = options.divisor || 1;
  2880. this.ticks = options.ticks || Chartist.times(this.divisor).map(function(value, index) {
  2881. return highLow.low + (highLow.high - highLow.low) / this.divisor * index;
  2882. }.bind(this));
  2883. this.ticks.sort(function(a, b) {
  2884. return a - b;
  2885. });
  2886. this.range = {
  2887. min: highLow.low,
  2888. max: highLow.high
  2889. };
  2890. Chartist.FixedScaleAxis.super.constructor.call(this,
  2891. axisUnit,
  2892. chartRect,
  2893. this.ticks,
  2894. options);
  2895. this.stepLength = this.axisLength / this.divisor;
  2896. }
  2897. function projectValue(value) {
  2898. return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.range.min) / (this.range.max - this.range.min);
  2899. }
  2900. Chartist.FixedScaleAxis = Chartist.Axis.extend({
  2901. constructor: FixedScaleAxis,
  2902. projectValue: projectValue
  2903. });
  2904. }(this || __webpack_require__.g, Chartist));
  2905. ;/**
  2906. * The step axis for step based charts like bar chart or step based line charts. It uses a fixed amount of ticks that will be equally distributed across the whole axis length. The projection is done using the index of the data value rather than the value itself and therefore it's only useful for distribution purpose.
  2907. * **Options**
  2908. * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
  2909. * ```javascript
  2910. * var options = {
  2911. * // Ticks to be used to distribute across the axis length. As this axis type relies on the index of the value rather than the value, arbitrary data that can be converted to a string can be used as ticks.
  2912. * ticks: ['One', 'Two', 'Three'],
  2913. * // If set to true the full width will be used to distribute the values where the last value will be at the maximum of the axis length. If false the spaces between the ticks will be evenly distributed instead.
  2914. * stretch: true
  2915. * };
  2916. * ```
  2917. *
  2918. * @module Chartist.StepAxis
  2919. */
  2920. /* global Chartist */
  2921. (function (globalRoot, Chartist) {
  2922. 'use strict';
  2923. var window = globalRoot.window;
  2924. var document = globalRoot.document;
  2925. function StepAxis(axisUnit, data, chartRect, options) {
  2926. Chartist.StepAxis.super.constructor.call(this,
  2927. axisUnit,
  2928. chartRect,
  2929. options.ticks,
  2930. options);
  2931. var calc = Math.max(1, options.ticks.length - (options.stretch ? 1 : 0));
  2932. this.stepLength = this.axisLength / calc;
  2933. }
  2934. function projectValue(value, index) {
  2935. return this.stepLength * index;
  2936. }
  2937. Chartist.StepAxis = Chartist.Axis.extend({
  2938. constructor: StepAxis,
  2939. projectValue: projectValue
  2940. });
  2941. }(this || __webpack_require__.g, Chartist));
  2942. ;/**
  2943. * The Chartist line chart can be used to draw Line or Scatter charts. If used in the browser you can access the global `Chartist` namespace where you find the `Line` function as a main entry point.
  2944. *
  2945. * For examples on how to use the line chart please check the examples of the `Chartist.Line` method.
  2946. *
  2947. * @module Chartist.Line
  2948. */
  2949. /* global Chartist */
  2950. (function(globalRoot, Chartist){
  2951. 'use strict';
  2952. var window = globalRoot.window;
  2953. var document = globalRoot.document;
  2954. /**
  2955. * Default options in line charts. Expand the code view to see a detailed list of options with comments.
  2956. *
  2957. * @memberof Chartist.Line
  2958. */
  2959. var defaultOptions = {
  2960. // Options for X-Axis
  2961. axisX: {
  2962. // The offset of the labels to the chart area
  2963. offset: 30,
  2964. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  2965. position: 'end',
  2966. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  2967. labelOffset: {
  2968. x: 0,
  2969. y: 0
  2970. },
  2971. // If labels should be shown or not
  2972. showLabel: true,
  2973. // If the axis grid should be drawn or not
  2974. showGrid: true,
  2975. // Interpolation function that allows you to intercept the value from the axis label
  2976. labelInterpolationFnc: Chartist.noop,
  2977. // Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
  2978. type: undefined
  2979. },
  2980. // Options for Y-Axis
  2981. axisY: {
  2982. // The offset of the labels to the chart area
  2983. offset: 40,
  2984. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  2985. position: 'start',
  2986. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  2987. labelOffset: {
  2988. x: 0,
  2989. y: 0
  2990. },
  2991. // If labels should be shown or not
  2992. showLabel: true,
  2993. // If the axis grid should be drawn or not
  2994. showGrid: true,
  2995. // Interpolation function that allows you to intercept the value from the axis label
  2996. labelInterpolationFnc: Chartist.noop,
  2997. // Set the axis type to be used to project values on this axis. If not defined, Chartist.AutoScaleAxis will be used for the Y-Axis, where the high and low options will be set to the global high and low options. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
  2998. type: undefined,
  2999. // This value specifies the minimum height in pixel of the scale steps
  3000. scaleMinSpace: 20,
  3001. // Use only integer values (whole numbers) for the scale steps
  3002. onlyInteger: false
  3003. },
  3004. // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
  3005. width: undefined,
  3006. // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
  3007. height: undefined,
  3008. // If the line should be drawn or not
  3009. showLine: true,
  3010. // If dots should be drawn or not
  3011. showPoint: true,
  3012. // If the line chart should draw an area
  3013. showArea: false,
  3014. // The base for the area chart that will be used to close the area shape (is normally 0)
  3015. areaBase: 0,
  3016. // Specify if the lines should be smoothed. This value can be true or false where true will result in smoothing using the default smoothing interpolation function Chartist.Interpolation.cardinal and false results in Chartist.Interpolation.none. You can also choose other smoothing / interpolation functions available in the Chartist.Interpolation module, or write your own interpolation function. Check the examples for a brief description.
  3017. lineSmooth: true,
  3018. // If the line chart should add a background fill to the .ct-grids group.
  3019. showGridBackground: false,
  3020. // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
  3021. low: undefined,
  3022. // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
  3023. high: undefined,
  3024. // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
  3025. chartPadding: {
  3026. top: 15,
  3027. right: 15,
  3028. bottom: 5,
  3029. left: 10
  3030. },
  3031. // When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler.
  3032. fullWidth: false,
  3033. // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
  3034. reverseData: false,
  3035. // Override the class names that get used to generate the SVG structure of the chart
  3036. classNames: {
  3037. chart: 'ct-chart-line',
  3038. label: 'ct-label',
  3039. labelGroup: 'ct-labels',
  3040. series: 'ct-series',
  3041. line: 'ct-line',
  3042. point: 'ct-point',
  3043. area: 'ct-area',
  3044. grid: 'ct-grid',
  3045. gridGroup: 'ct-grids',
  3046. gridBackground: 'ct-grid-background',
  3047. vertical: 'ct-vertical',
  3048. horizontal: 'ct-horizontal',
  3049. start: 'ct-start',
  3050. end: 'ct-end'
  3051. }
  3052. };
  3053. /**
  3054. * Creates a new chart
  3055. *
  3056. */
  3057. function createChart(options) {
  3058. var data = Chartist.normalizeData(this.data, options.reverseData, true);
  3059. // Create new svg object
  3060. this.svg = Chartist.createSvg(this.container, options.width, options.height, options.classNames.chart);
  3061. // Create groups for labels, grid and series
  3062. var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
  3063. var seriesGroup = this.svg.elem('g');
  3064. var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
  3065. var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
  3066. var axisX, axisY;
  3067. if(options.axisX.type === undefined) {
  3068. axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
  3069. ticks: data.normalized.labels,
  3070. stretch: options.fullWidth
  3071. }));
  3072. } else {
  3073. axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);
  3074. }
  3075. if(options.axisY.type === undefined) {
  3076. axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
  3077. high: Chartist.isNumeric(options.high) ? options.high : options.axisY.high,
  3078. low: Chartist.isNumeric(options.low) ? options.low : options.axisY.low
  3079. }));
  3080. } else {
  3081. axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);
  3082. }
  3083. axisX.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3084. axisY.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3085. if (options.showGridBackground) {
  3086. Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
  3087. }
  3088. // Draw the series
  3089. data.raw.series.forEach(function(series, seriesIndex) {
  3090. var seriesElement = seriesGroup.elem('g');
  3091. // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
  3092. seriesElement.attr({
  3093. 'ct:series-name': series.name,
  3094. 'ct:meta': Chartist.serialize(series.meta)
  3095. });
  3096. // Use series class from series data or if not set generate one
  3097. seriesElement.addClass([
  3098. options.classNames.series,
  3099. (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
  3100. ].join(' '));
  3101. var pathCoordinates = [],
  3102. pathData = [];
  3103. data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
  3104. var p = {
  3105. x: chartRect.x1 + axisX.projectValue(value, valueIndex, data.normalized.series[seriesIndex]),
  3106. y: chartRect.y1 - axisY.projectValue(value, valueIndex, data.normalized.series[seriesIndex])
  3107. };
  3108. pathCoordinates.push(p.x, p.y);
  3109. pathData.push({
  3110. value: value,
  3111. valueIndex: valueIndex,
  3112. meta: Chartist.getMetaData(series, valueIndex)
  3113. });
  3114. }.bind(this));
  3115. var seriesOptions = {
  3116. lineSmooth: Chartist.getSeriesOption(series, options, 'lineSmooth'),
  3117. showPoint: Chartist.getSeriesOption(series, options, 'showPoint'),
  3118. showLine: Chartist.getSeriesOption(series, options, 'showLine'),
  3119. showArea: Chartist.getSeriesOption(series, options, 'showArea'),
  3120. areaBase: Chartist.getSeriesOption(series, options, 'areaBase')
  3121. };
  3122. var smoothing = typeof seriesOptions.lineSmooth === 'function' ?
  3123. seriesOptions.lineSmooth : (seriesOptions.lineSmooth ? Chartist.Interpolation.monotoneCubic() : Chartist.Interpolation.none());
  3124. // Interpolating path where pathData will be used to annotate each path element so we can trace back the original
  3125. // index, value and meta data
  3126. var path = smoothing(pathCoordinates, pathData);
  3127. // If we should show points we need to create them now to avoid secondary loop
  3128. // Points are drawn from the pathElements returned by the interpolation function
  3129. // Small offset for Firefox to render squares correctly
  3130. if (seriesOptions.showPoint) {
  3131. path.pathElements.forEach(function(pathElement) {
  3132. var point = seriesElement.elem('line', {
  3133. x1: pathElement.x,
  3134. y1: pathElement.y,
  3135. x2: pathElement.x + 0.01,
  3136. y2: pathElement.y
  3137. }, options.classNames.point).attr({
  3138. 'ct:value': [pathElement.data.value.x, pathElement.data.value.y].filter(Chartist.isNumeric).join(','),
  3139. 'ct:meta': Chartist.serialize(pathElement.data.meta)
  3140. });
  3141. this.eventEmitter.emit('draw', {
  3142. type: 'point',
  3143. value: pathElement.data.value,
  3144. index: pathElement.data.valueIndex,
  3145. meta: pathElement.data.meta,
  3146. series: series,
  3147. seriesIndex: seriesIndex,
  3148. axisX: axisX,
  3149. axisY: axisY,
  3150. group: seriesElement,
  3151. element: point,
  3152. x: pathElement.x,
  3153. y: pathElement.y
  3154. });
  3155. }.bind(this));
  3156. }
  3157. if(seriesOptions.showLine) {
  3158. var line = seriesElement.elem('path', {
  3159. d: path.stringify()
  3160. }, options.classNames.line, true);
  3161. this.eventEmitter.emit('draw', {
  3162. type: 'line',
  3163. values: data.normalized.series[seriesIndex],
  3164. path: path.clone(),
  3165. chartRect: chartRect,
  3166. index: seriesIndex,
  3167. series: series,
  3168. seriesIndex: seriesIndex,
  3169. seriesMeta: series.meta,
  3170. axisX: axisX,
  3171. axisY: axisY,
  3172. group: seriesElement,
  3173. element: line
  3174. });
  3175. }
  3176. // Area currently only works with axes that support a range!
  3177. if(seriesOptions.showArea && axisY.range) {
  3178. // If areaBase is outside the chart area (< min or > max) we need to set it respectively so that
  3179. // the area is not drawn outside the chart area.
  3180. var areaBase = Math.max(Math.min(seriesOptions.areaBase, axisY.range.max), axisY.range.min);
  3181. // We project the areaBase value into screen coordinates
  3182. var areaBaseProjected = chartRect.y1 - axisY.projectValue(areaBase);
  3183. // In order to form the area we'll first split the path by move commands so we can chunk it up into segments
  3184. path.splitByCommand('M').filter(function onlySolidSegments(pathSegment) {
  3185. // We filter only "solid" segments that contain more than one point. Otherwise there's no need for an area
  3186. return pathSegment.pathElements.length > 1;
  3187. }).map(function convertToArea(solidPathSegments) {
  3188. // Receiving the filtered solid path segments we can now convert those segments into fill areas
  3189. var firstElement = solidPathSegments.pathElements[0];
  3190. var lastElement = solidPathSegments.pathElements[solidPathSegments.pathElements.length - 1];
  3191. // Cloning the solid path segment with closing option and removing the first move command from the clone
  3192. // We then insert a new move that should start at the area base and draw a straight line up or down
  3193. // at the end of the path we add an additional straight line to the projected area base value
  3194. // As the closing option is set our path will be automatically closed
  3195. return solidPathSegments.clone(true)
  3196. .position(0)
  3197. .remove(1)
  3198. .move(firstElement.x, areaBaseProjected)
  3199. .line(firstElement.x, firstElement.y)
  3200. .position(solidPathSegments.pathElements.length + 1)
  3201. .line(lastElement.x, areaBaseProjected);
  3202. }).forEach(function createArea(areaPath) {
  3203. // For each of our newly created area paths, we'll now create path elements by stringifying our path objects
  3204. // and adding the created DOM elements to the correct series group
  3205. var area = seriesElement.elem('path', {
  3206. d: areaPath.stringify()
  3207. }, options.classNames.area, true);
  3208. // Emit an event for each area that was drawn
  3209. this.eventEmitter.emit('draw', {
  3210. type: 'area',
  3211. values: data.normalized.series[seriesIndex],
  3212. path: areaPath.clone(),
  3213. series: series,
  3214. seriesIndex: seriesIndex,
  3215. axisX: axisX,
  3216. axisY: axisY,
  3217. chartRect: chartRect,
  3218. index: seriesIndex,
  3219. group: seriesElement,
  3220. element: area
  3221. });
  3222. }.bind(this));
  3223. }
  3224. }.bind(this));
  3225. this.eventEmitter.emit('created', {
  3226. bounds: axisY.bounds,
  3227. chartRect: chartRect,
  3228. axisX: axisX,
  3229. axisY: axisY,
  3230. svg: this.svg,
  3231. options: options
  3232. });
  3233. }
  3234. /**
  3235. * This method creates a new line chart.
  3236. *
  3237. * @memberof Chartist.Line
  3238. * @param {String|Node} query A selector query string or directly a DOM element
  3239. * @param {Object} data The data object that needs to consist of a labels and a series array
  3240. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
  3241. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
  3242. * @return {Object} An object which exposes the API for the created chart
  3243. *
  3244. * @example
  3245. * // Create a simple line chart
  3246. * var data = {
  3247. * // A labels array that can contain any sort of values
  3248. * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  3249. * // Our series array that contains series objects or in this case series data arrays
  3250. * series: [
  3251. * [5, 2, 4, 2, 0]
  3252. * ]
  3253. * };
  3254. *
  3255. * // As options we currently only set a static size of 300x200 px
  3256. * var options = {
  3257. * width: '300px',
  3258. * height: '200px'
  3259. * };
  3260. *
  3261. * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options
  3262. * new Chartist.Line('.ct-chart', data, options);
  3263. *
  3264. * @example
  3265. * // Use specific interpolation function with configuration from the Chartist.Interpolation module
  3266. *
  3267. * var chart = new Chartist.Line('.ct-chart', {
  3268. * labels: [1, 2, 3, 4, 5],
  3269. * series: [
  3270. * [1, 1, 8, 1, 7]
  3271. * ]
  3272. * }, {
  3273. * lineSmooth: Chartist.Interpolation.cardinal({
  3274. * tension: 0.2
  3275. * })
  3276. * });
  3277. *
  3278. * @example
  3279. * // Create a line chart with responsive options
  3280. *
  3281. * var data = {
  3282. * // A labels array that can contain any sort of values
  3283. * labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
  3284. * // Our series array that contains series objects or in this case series data arrays
  3285. * series: [
  3286. * [5, 2, 4, 2, 0]
  3287. * ]
  3288. * };
  3289. *
  3290. * // In addition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries.
  3291. * var responsiveOptions = [
  3292. * ['screen and (min-width: 641px) and (max-width: 1024px)', {
  3293. * showPoint: false,
  3294. * axisX: {
  3295. * labelInterpolationFnc: function(value) {
  3296. * // Will return Mon, Tue, Wed etc. on medium screens
  3297. * return value.slice(0, 3);
  3298. * }
  3299. * }
  3300. * }],
  3301. * ['screen and (max-width: 640px)', {
  3302. * showLine: false,
  3303. * axisX: {
  3304. * labelInterpolationFnc: function(value) {
  3305. * // Will return M, T, W etc. on small screens
  3306. * return value[0];
  3307. * }
  3308. * }
  3309. * }]
  3310. * ];
  3311. *
  3312. * new Chartist.Line('.ct-chart', data, null, responsiveOptions);
  3313. *
  3314. */
  3315. function Line(query, data, options, responsiveOptions) {
  3316. Chartist.Line.super.constructor.call(this,
  3317. query,
  3318. data,
  3319. defaultOptions,
  3320. Chartist.extend({}, defaultOptions, options),
  3321. responsiveOptions);
  3322. }
  3323. // Creating line chart type in Chartist namespace
  3324. Chartist.Line = Chartist.Base.extend({
  3325. constructor: Line,
  3326. createChart: createChart
  3327. });
  3328. }(this || __webpack_require__.g, Chartist));
  3329. ;/**
  3330. * The bar chart module of Chartist that can be used to draw unipolar or bipolar bar and grouped bar charts.
  3331. *
  3332. * @module Chartist.Bar
  3333. */
  3334. /* global Chartist */
  3335. (function(globalRoot, Chartist){
  3336. 'use strict';
  3337. var window = globalRoot.window;
  3338. var document = globalRoot.document;
  3339. /**
  3340. * Default options in bar charts. Expand the code view to see a detailed list of options with comments.
  3341. *
  3342. * @memberof Chartist.Bar
  3343. */
  3344. var defaultOptions = {
  3345. // Options for X-Axis
  3346. axisX: {
  3347. // The offset of the chart drawing area to the border of the container
  3348. offset: 30,
  3349. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  3350. position: 'end',
  3351. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  3352. labelOffset: {
  3353. x: 0,
  3354. y: 0
  3355. },
  3356. // If labels should be shown or not
  3357. showLabel: true,
  3358. // If the axis grid should be drawn or not
  3359. showGrid: true,
  3360. // Interpolation function that allows you to intercept the value from the axis label
  3361. labelInterpolationFnc: Chartist.noop,
  3362. // This value specifies the minimum width in pixel of the scale steps
  3363. scaleMinSpace: 30,
  3364. // Use only integer values (whole numbers) for the scale steps
  3365. onlyInteger: false
  3366. },
  3367. // Options for Y-Axis
  3368. axisY: {
  3369. // The offset of the chart drawing area to the border of the container
  3370. offset: 40,
  3371. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  3372. position: 'start',
  3373. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  3374. labelOffset: {
  3375. x: 0,
  3376. y: 0
  3377. },
  3378. // If labels should be shown or not
  3379. showLabel: true,
  3380. // If the axis grid should be drawn or not
  3381. showGrid: true,
  3382. // Interpolation function that allows you to intercept the value from the axis label
  3383. labelInterpolationFnc: Chartist.noop,
  3384. // This value specifies the minimum height in pixel of the scale steps
  3385. scaleMinSpace: 20,
  3386. // Use only integer values (whole numbers) for the scale steps
  3387. onlyInteger: false
  3388. },
  3389. // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
  3390. width: undefined,
  3391. // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
  3392. height: undefined,
  3393. // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
  3394. high: undefined,
  3395. // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
  3396. low: undefined,
  3397. // Unless low/high are explicitly set, bar chart will be centered at zero by default. Set referenceValue to null to auto scale.
  3398. referenceValue: 0,
  3399. // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
  3400. chartPadding: {
  3401. top: 15,
  3402. right: 15,
  3403. bottom: 5,
  3404. left: 10
  3405. },
  3406. // Specify the distance in pixel of bars in a group
  3407. seriesBarDistance: 15,
  3408. // If set to true this property will cause the series bars to be stacked. Check the `stackMode` option for further stacking options.
  3409. stackBars: false,
  3410. // If set to 'overlap' this property will force the stacked bars to draw from the zero line.
  3411. // If set to 'accumulate' this property will form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect.
  3412. stackMode: 'accumulate',
  3413. // Inverts the axes of the bar chart in order to draw a horizontal bar chart. Be aware that you also need to invert your axis settings as the Y Axis will now display the labels and the X Axis the values.
  3414. horizontalBars: false,
  3415. // If set to true then each bar will represent a series and the data array is expected to be a one dimensional array of data values rather than a series array of series. This is useful if the bar chart should represent a profile rather than some data over time.
  3416. distributeSeries: false,
  3417. // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
  3418. reverseData: false,
  3419. // If the bar chart should add a background fill to the .ct-grids group.
  3420. showGridBackground: false,
  3421. // Override the class names that get used to generate the SVG structure of the chart
  3422. classNames: {
  3423. chart: 'ct-chart-bar',
  3424. horizontalBars: 'ct-horizontal-bars',
  3425. label: 'ct-label',
  3426. labelGroup: 'ct-labels',
  3427. series: 'ct-series',
  3428. bar: 'ct-bar',
  3429. grid: 'ct-grid',
  3430. gridGroup: 'ct-grids',
  3431. gridBackground: 'ct-grid-background',
  3432. vertical: 'ct-vertical',
  3433. horizontal: 'ct-horizontal',
  3434. start: 'ct-start',
  3435. end: 'ct-end'
  3436. }
  3437. };
  3438. /**
  3439. * Creates a new chart
  3440. *
  3441. */
  3442. function createChart(options) {
  3443. var data;
  3444. var highLow;
  3445. if(options.distributeSeries) {
  3446. data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');
  3447. data.normalized.series = data.normalized.series.map(function(value) {
  3448. return [value];
  3449. });
  3450. } else {
  3451. data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');
  3452. }
  3453. // Create new svg element
  3454. this.svg = Chartist.createSvg(
  3455. this.container,
  3456. options.width,
  3457. options.height,
  3458. options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')
  3459. );
  3460. // Drawing groups in correct order
  3461. var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
  3462. var seriesGroup = this.svg.elem('g');
  3463. var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
  3464. if(options.stackBars && data.normalized.series.length !== 0) {
  3465. // If stacked bars we need to calculate the high low from stacked values from each series
  3466. var serialSums = Chartist.serialMap(data.normalized.series, function serialSums() {
  3467. return Array.prototype.slice.call(arguments).map(function(value) {
  3468. return value;
  3469. }).reduce(function(prev, curr) {
  3470. return {
  3471. x: prev.x + (curr && curr.x) || 0,
  3472. y: prev.y + (curr && curr.y) || 0
  3473. };
  3474. }, {x: 0, y: 0});
  3475. });
  3476. highLow = Chartist.getHighLow([serialSums], options, options.horizontalBars ? 'x' : 'y');
  3477. } else {
  3478. highLow = Chartist.getHighLow(data.normalized.series, options, options.horizontalBars ? 'x' : 'y');
  3479. }
  3480. // Overrides of high / low from settings
  3481. highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);
  3482. highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);
  3483. var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
  3484. var valueAxis,
  3485. labelAxisTicks,
  3486. labelAxis,
  3487. axisX,
  3488. axisY;
  3489. // We need to set step count based on some options combinations
  3490. if(options.distributeSeries && options.stackBars) {
  3491. // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should
  3492. // use only the first label for the step axis
  3493. labelAxisTicks = data.normalized.labels.slice(0, 1);
  3494. } else {
  3495. // If distributed series are enabled but stacked bars aren't, we should use the series labels
  3496. // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array
  3497. // as the bars are normalized
  3498. labelAxisTicks = data.normalized.labels;
  3499. }
  3500. // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.
  3501. if(options.horizontalBars) {
  3502. if(options.axisX.type === undefined) {
  3503. valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
  3504. highLow: highLow,
  3505. referenceValue: 0
  3506. }));
  3507. } else {
  3508. valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
  3509. highLow: highLow,
  3510. referenceValue: 0
  3511. }));
  3512. }
  3513. if(options.axisY.type === undefined) {
  3514. labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, {
  3515. ticks: labelAxisTicks
  3516. });
  3517. } else {
  3518. labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);
  3519. }
  3520. } else {
  3521. if(options.axisX.type === undefined) {
  3522. labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, {
  3523. ticks: labelAxisTicks
  3524. });
  3525. } else {
  3526. labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);
  3527. }
  3528. if(options.axisY.type === undefined) {
  3529. valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
  3530. highLow: highLow,
  3531. referenceValue: 0
  3532. }));
  3533. } else {
  3534. valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
  3535. highLow: highLow,
  3536. referenceValue: 0
  3537. }));
  3538. }
  3539. }
  3540. // Projected 0 point
  3541. var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.projectValue(0)) : (chartRect.y1 - valueAxis.projectValue(0));
  3542. // Used to track the screen coordinates of stacked bars
  3543. var stackedBarValues = [];
  3544. labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3545. valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3546. if (options.showGridBackground) {
  3547. Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
  3548. }
  3549. // Draw the series
  3550. data.raw.series.forEach(function(series, seriesIndex) {
  3551. // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.
  3552. var biPol = seriesIndex - (data.raw.series.length - 1) / 2;
  3553. // Half of the period width between vertical grid lines used to position bars
  3554. var periodHalfLength;
  3555. // Current series SVG element
  3556. var seriesElement;
  3557. // We need to set periodHalfLength based on some options combinations
  3558. if(options.distributeSeries && !options.stackBars) {
  3559. // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array
  3560. // which is the series count and divide by 2
  3561. periodHalfLength = labelAxis.axisLength / data.normalized.series.length / 2;
  3562. } else if(options.distributeSeries && options.stackBars) {
  3563. // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis
  3564. // length by 2
  3565. periodHalfLength = labelAxis.axisLength / 2;
  3566. } else {
  3567. // On regular bar charts we should just use the series length
  3568. periodHalfLength = labelAxis.axisLength / data.normalized.series[seriesIndex].length / 2;
  3569. }
  3570. // Adding the series group to the series element
  3571. seriesElement = seriesGroup.elem('g');
  3572. // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
  3573. seriesElement.attr({
  3574. 'ct:series-name': series.name,
  3575. 'ct:meta': Chartist.serialize(series.meta)
  3576. });
  3577. // Use series class from series data or if not set generate one
  3578. seriesElement.addClass([
  3579. options.classNames.series,
  3580. (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
  3581. ].join(' '));
  3582. data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
  3583. var projected,
  3584. bar,
  3585. previousStack,
  3586. labelAxisValueIndex;
  3587. // We need to set labelAxisValueIndex based on some options combinations
  3588. if(options.distributeSeries && !options.stackBars) {
  3589. // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection
  3590. // on the step axis for label positioning
  3591. labelAxisValueIndex = seriesIndex;
  3592. } else if(options.distributeSeries && options.stackBars) {
  3593. // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use
  3594. // 0 for projection on the label step axis
  3595. labelAxisValueIndex = 0;
  3596. } else {
  3597. // On regular bar charts we just use the value index to project on the label step axis
  3598. labelAxisValueIndex = valueIndex;
  3599. }
  3600. // We need to transform coordinates differently based on the chart layout
  3601. if(options.horizontalBars) {
  3602. projected = {
  3603. x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized.series[seriesIndex]),
  3604. y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized.series[seriesIndex])
  3605. };
  3606. } else {
  3607. projected = {
  3608. x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized.series[seriesIndex]),
  3609. y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized.series[seriesIndex])
  3610. }
  3611. }
  3612. // If the label axis is a step based axis we will offset the bar into the middle of between two steps using
  3613. // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using
  3614. // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not
  3615. // add any automated positioning.
  3616. if(labelAxis instanceof Chartist.StepAxis) {
  3617. // Offset to center bar between grid lines, but only if the step axis is not stretched
  3618. if(!labelAxis.options.stretch) {
  3619. projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);
  3620. }
  3621. // Using bi-polar offset for multiple series if no stacked bars or series distribution is used
  3622. projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);
  3623. }
  3624. // Enter value in stacked bar values used to remember previous screen value for stacking up bars
  3625. previousStack = stackedBarValues[valueIndex] || zeroPoint;
  3626. stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);
  3627. // Skip if value is undefined
  3628. if(value === undefined) {
  3629. return;
  3630. }
  3631. var positions = {};
  3632. positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];
  3633. positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];
  3634. if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {
  3635. // Stack mode: accumulate (default)
  3636. // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line
  3637. // We want backwards compatibility, so the expected fallback without the 'stackMode' option
  3638. // to be the original behaviour (accumulate)
  3639. positions[labelAxis.counterUnits.pos + '1'] = previousStack;
  3640. positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];
  3641. } else {
  3642. // Draw from the zero line normally
  3643. // This is also the same code for Stack mode: overlap
  3644. positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;
  3645. positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];
  3646. }
  3647. // Limit x and y so that they are within the chart rect
  3648. positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);
  3649. positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);
  3650. positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);
  3651. positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);
  3652. var metaData = Chartist.getMetaData(series, valueIndex);
  3653. // Create bar element
  3654. bar = seriesElement.elem('line', positions, options.classNames.bar).attr({
  3655. 'ct:value': [value.x, value.y].filter(Chartist.isNumeric).join(','),
  3656. 'ct:meta': Chartist.serialize(metaData)
  3657. });
  3658. this.eventEmitter.emit('draw', Chartist.extend({
  3659. type: 'bar',
  3660. value: value,
  3661. index: valueIndex,
  3662. meta: metaData,
  3663. series: series,
  3664. seriesIndex: seriesIndex,
  3665. axisX: axisX,
  3666. axisY: axisY,
  3667. chartRect: chartRect,
  3668. group: seriesElement,
  3669. element: bar
  3670. }, positions));
  3671. }.bind(this));
  3672. }.bind(this));
  3673. this.eventEmitter.emit('created', {
  3674. bounds: valueAxis.bounds,
  3675. chartRect: chartRect,
  3676. axisX: axisX,
  3677. axisY: axisY,
  3678. svg: this.svg,
  3679. options: options
  3680. });
  3681. }
  3682. /**
  3683. * This method creates a new bar chart and returns API object that you can use for later changes.
  3684. *
  3685. * @memberof Chartist.Bar
  3686. * @param {String|Node} query A selector query string or directly a DOM element
  3687. * @param {Object} data The data object that needs to consist of a labels and a series array
  3688. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
  3689. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
  3690. * @return {Object} An object which exposes the API for the created chart
  3691. *
  3692. * @example
  3693. * // Create a simple bar chart
  3694. * var data = {
  3695. * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  3696. * series: [
  3697. * [5, 2, 4, 2, 0]
  3698. * ]
  3699. * };
  3700. *
  3701. * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.
  3702. * new Chartist.Bar('.ct-chart', data);
  3703. *
  3704. * @example
  3705. * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10
  3706. * new Chartist.Bar('.ct-chart', {
  3707. * labels: [1, 2, 3, 4, 5, 6, 7],
  3708. * series: [
  3709. * [1, 3, 2, -5, -3, 1, -6],
  3710. * [-5, -2, -4, -1, 2, -3, 1]
  3711. * ]
  3712. * }, {
  3713. * seriesBarDistance: 12,
  3714. * low: -10,
  3715. * high: 10
  3716. * });
  3717. *
  3718. */
  3719. function Bar(query, data, options, responsiveOptions) {
  3720. Chartist.Bar.super.constructor.call(this,
  3721. query,
  3722. data,
  3723. defaultOptions,
  3724. Chartist.extend({}, defaultOptions, options),
  3725. responsiveOptions);
  3726. }
  3727. // Creating bar chart type in Chartist namespace
  3728. Chartist.Bar = Chartist.Base.extend({
  3729. constructor: Bar,
  3730. createChart: createChart
  3731. });
  3732. }(this || __webpack_require__.g, Chartist));
  3733. ;/**
  3734. * The pie chart module of Chartist that can be used to draw pie, donut or gauge charts
  3735. *
  3736. * @module Chartist.Pie
  3737. */
  3738. /* global Chartist */
  3739. (function(globalRoot, Chartist) {
  3740. 'use strict';
  3741. var window = globalRoot.window;
  3742. var document = globalRoot.document;
  3743. /**
  3744. * Default options in line charts. Expand the code view to see a detailed list of options with comments.
  3745. *
  3746. * @memberof Chartist.Pie
  3747. */
  3748. var defaultOptions = {
  3749. // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
  3750. width: undefined,
  3751. // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
  3752. height: undefined,
  3753. // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
  3754. chartPadding: 5,
  3755. // Override the class names that are used to generate the SVG structure of the chart
  3756. classNames: {
  3757. chartPie: 'ct-chart-pie',
  3758. chartDonut: 'ct-chart-donut',
  3759. series: 'ct-series',
  3760. slicePie: 'ct-slice-pie',
  3761. sliceDonut: 'ct-slice-donut',
  3762. sliceDonutSolid: 'ct-slice-donut-solid',
  3763. label: 'ct-label'
  3764. },
  3765. // The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise.
  3766. startAngle: 0,
  3767. // An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts.
  3768. total: undefined,
  3769. // If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices.
  3770. donut: false,
  3771. // If specified the donut segments will be drawn as shapes instead of strokes.
  3772. donutSolid: false,
  3773. // Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future.
  3774. // This option can be set as number or string to specify a relative width (i.e. 100 or '30%').
  3775. donutWidth: 60,
  3776. // If a label should be shown or not
  3777. showLabel: true,
  3778. // Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center.
  3779. labelOffset: 0,
  3780. // This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option.
  3781. labelPosition: 'inside',
  3782. // An interpolation function for the label value
  3783. labelInterpolationFnc: Chartist.noop,
  3784. // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.
  3785. labelDirection: 'neutral',
  3786. // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
  3787. reverseData: false,
  3788. // If true empty values will be ignored to avoid drawing unncessary slices and labels
  3789. ignoreEmptyValues: false
  3790. };
  3791. /**
  3792. * Determines SVG anchor position based on direction and center parameter
  3793. *
  3794. * @param center
  3795. * @param label
  3796. * @param direction
  3797. * @return {string}
  3798. */
  3799. function determineAnchorPosition(center, label, direction) {
  3800. var toTheRight = label.x > center.x;
  3801. if(toTheRight && direction === 'explode' ||
  3802. !toTheRight && direction === 'implode') {
  3803. return 'start';
  3804. } else if(toTheRight && direction === 'implode' ||
  3805. !toTheRight && direction === 'explode') {
  3806. return 'end';
  3807. } else {
  3808. return 'middle';
  3809. }
  3810. }
  3811. /**
  3812. * Creates the pie chart
  3813. *
  3814. * @param options
  3815. */
  3816. function createChart(options) {
  3817. var data = Chartist.normalizeData(this.data);
  3818. var seriesGroups = [],
  3819. labelsGroup,
  3820. chartRect,
  3821. radius,
  3822. labelRadius,
  3823. totalDataSum,
  3824. startAngle = options.startAngle;
  3825. // Create SVG.js draw
  3826. this.svg = Chartist.createSvg(this.container, options.width, options.height,options.donut ? options.classNames.chartDonut : options.classNames.chartPie);
  3827. // Calculate charting rect
  3828. chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
  3829. // Get biggest circle radius possible within chartRect
  3830. radius = Math.min(chartRect.width() / 2, chartRect.height() / 2);
  3831. // Calculate total of all series to get reference value or use total reference from optional options
  3832. totalDataSum = options.total || data.normalized.series.reduce(function(previousValue, currentValue) {
  3833. return previousValue + currentValue;
  3834. }, 0);
  3835. var donutWidth = Chartist.quantity(options.donutWidth);
  3836. if (donutWidth.unit === '%') {
  3837. donutWidth.value *= radius / 100;
  3838. }
  3839. // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside
  3840. // Unfortunately this is not possible with the current SVG Spec
  3841. // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html
  3842. radius -= options.donut && !options.donutSolid ? donutWidth.value / 2 : 0;
  3843. // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,
  3844. // if regular pie chart it's half of the radius
  3845. if(options.labelPosition === 'outside' || options.donut && !options.donutSolid) {
  3846. labelRadius = radius;
  3847. } else if(options.labelPosition === 'center') {
  3848. // If labelPosition is center we start with 0 and will later wait for the labelOffset
  3849. labelRadius = 0;
  3850. } else if(options.donutSolid) {
  3851. labelRadius = radius - donutWidth.value / 2;
  3852. } else {
  3853. // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie
  3854. // slice
  3855. labelRadius = radius / 2;
  3856. }
  3857. // Add the offset to the labelRadius where a negative offset means closed to the center of the chart
  3858. labelRadius += options.labelOffset;
  3859. // Calculate end angle based on total sum and current data value and offset with padding
  3860. var center = {
  3861. x: chartRect.x1 + chartRect.width() / 2,
  3862. y: chartRect.y2 + chartRect.height() / 2
  3863. };
  3864. // Check if there is only one non-zero value in the series array.
  3865. var hasSingleValInSeries = data.raw.series.filter(function(val) {
  3866. return val.hasOwnProperty('value') ? val.value !== 0 : val !== 0;
  3867. }).length === 1;
  3868. // Creating the series groups
  3869. data.raw.series.forEach(function(series, index) {
  3870. seriesGroups[index] = this.svg.elem('g', null, null);
  3871. }.bind(this));
  3872. //if we need to show labels we create the label group now
  3873. if(options.showLabel) {
  3874. labelsGroup = this.svg.elem('g', null, null);
  3875. }
  3876. // Draw the series
  3877. // initialize series groups
  3878. data.raw.series.forEach(function(series, index) {
  3879. // If current value is zero and we are ignoring empty values then skip to next value
  3880. if (data.normalized.series[index] === 0 && options.ignoreEmptyValues) return;
  3881. // If the series is an object and contains a name or meta data we add a custom attribute
  3882. seriesGroups[index].attr({
  3883. 'ct:series-name': series.name
  3884. });
  3885. // Use series class from series data or if not set generate one
  3886. seriesGroups[index].addClass([
  3887. options.classNames.series,
  3888. (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(index))
  3889. ].join(' '));
  3890. // If the whole dataset is 0 endAngle should be zero. Can't divide by 0.
  3891. var endAngle = (totalDataSum > 0 ? startAngle + data.normalized.series[index] / totalDataSum * 360 : 0);
  3892. // Use slight offset so there are no transparent hairline issues
  3893. var overlappigStartAngle = Math.max(0, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2));
  3894. // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle
  3895. // with Z and use 359.99 degrees
  3896. if(endAngle - overlappigStartAngle >= 359.99) {
  3897. endAngle = overlappigStartAngle + 359.99;
  3898. }
  3899. var start = Chartist.polarToCartesian(center.x, center.y, radius, overlappigStartAngle),
  3900. end = Chartist.polarToCartesian(center.x, center.y, radius, endAngle);
  3901. var innerStart,
  3902. innerEnd,
  3903. donutSolidRadius;
  3904. // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke
  3905. var path = new Chartist.Svg.Path(!options.donut || options.donutSolid)
  3906. .move(end.x, end.y)
  3907. .arc(radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y);
  3908. // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie
  3909. if(!options.donut) {
  3910. path.line(center.x, center.y);
  3911. } else if (options.donutSolid) {
  3912. donutSolidRadius = radius - donutWidth.value;
  3913. innerStart = Chartist.polarToCartesian(center.x, center.y, donutSolidRadius, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2));
  3914. innerEnd = Chartist.polarToCartesian(center.x, center.y, donutSolidRadius, endAngle);
  3915. path.line(innerStart.x, innerStart.y);
  3916. path.arc(donutSolidRadius, donutSolidRadius, 0, endAngle - startAngle > 180, 1, innerEnd.x, innerEnd.y);
  3917. }
  3918. // Create the SVG path
  3919. // If this is a donut chart we add the donut class, otherwise just a regular slice
  3920. var pathClassName = options.classNames.slicePie;
  3921. if (options.donut) {
  3922. pathClassName = options.classNames.sliceDonut;
  3923. if (options.donutSolid) {
  3924. pathClassName = options.classNames.sliceDonutSolid;
  3925. }
  3926. }
  3927. var pathElement = seriesGroups[index].elem('path', {
  3928. d: path.stringify()
  3929. }, pathClassName);
  3930. // Adding the pie series value to the path
  3931. pathElement.attr({
  3932. 'ct:value': data.normalized.series[index],
  3933. 'ct:meta': Chartist.serialize(series.meta)
  3934. });
  3935. // If this is a donut, we add the stroke-width as style attribute
  3936. if(options.donut && !options.donutSolid) {
  3937. pathElement._node.style.strokeWidth = donutWidth.value + 'px';
  3938. }
  3939. // Fire off draw event
  3940. this.eventEmitter.emit('draw', {
  3941. type: 'slice',
  3942. value: data.normalized.series[index],
  3943. totalDataSum: totalDataSum,
  3944. index: index,
  3945. meta: series.meta,
  3946. series: series,
  3947. group: seriesGroups[index],
  3948. element: pathElement,
  3949. path: path.clone(),
  3950. center: center,
  3951. radius: radius,
  3952. startAngle: startAngle,
  3953. endAngle: endAngle
  3954. });
  3955. // If we need to show labels we need to add the label for this slice now
  3956. if(options.showLabel) {
  3957. var labelPosition;
  3958. if(data.raw.series.length === 1) {
  3959. // If we have only 1 series, we can position the label in the center of the pie
  3960. labelPosition = {
  3961. x: center.x,
  3962. y: center.y
  3963. };
  3964. } else {
  3965. // Position at the labelRadius distance from center and between start and end angle
  3966. labelPosition = Chartist.polarToCartesian(
  3967. center.x,
  3968. center.y,
  3969. labelRadius,
  3970. startAngle + (endAngle - startAngle) / 2
  3971. );
  3972. }
  3973. var rawValue;
  3974. if(data.normalized.labels && !Chartist.isFalseyButZero(data.normalized.labels[index])) {
  3975. rawValue = data.normalized.labels[index];
  3976. } else {
  3977. rawValue = data.normalized.series[index];
  3978. }
  3979. var interpolatedValue = options.labelInterpolationFnc(rawValue, index);
  3980. if(interpolatedValue || interpolatedValue === 0) {
  3981. var labelElement = labelsGroup.elem('text', {
  3982. dx: labelPosition.x,
  3983. dy: labelPosition.y,
  3984. 'text-anchor': determineAnchorPosition(center, labelPosition, options.labelDirection)
  3985. }, options.classNames.label).text('' + interpolatedValue);
  3986. // Fire off draw event
  3987. this.eventEmitter.emit('draw', {
  3988. type: 'label',
  3989. index: index,
  3990. group: labelsGroup,
  3991. element: labelElement,
  3992. text: '' + interpolatedValue,
  3993. x: labelPosition.x,
  3994. y: labelPosition.y
  3995. });
  3996. }
  3997. }
  3998. // Set next startAngle to current endAngle.
  3999. // (except for last slice)
  4000. startAngle = endAngle;
  4001. }.bind(this));
  4002. this.eventEmitter.emit('created', {
  4003. chartRect: chartRect,
  4004. svg: this.svg,
  4005. options: options
  4006. });
  4007. }
  4008. /**
  4009. * This method creates a new pie chart and returns an object that can be used to redraw the chart.
  4010. *
  4011. * @memberof Chartist.Pie
  4012. * @param {String|Node} query A selector query string or directly a DOM element
  4013. * @param {Object} data The data object in the pie chart needs to have a series property with a one dimensional data array. The values will be normalized against each other and don't necessarily need to be in percentage. The series property can also be an array of value objects that contain a value property and a className property to override the CSS class name for the series group.
  4014. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
  4015. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
  4016. * @return {Object} An object with a version and an update method to manually redraw the chart
  4017. *
  4018. * @example
  4019. * // Simple pie chart example with four series
  4020. * new Chartist.Pie('.ct-chart', {
  4021. * series: [10, 2, 4, 3]
  4022. * });
  4023. *
  4024. * @example
  4025. * // Drawing a donut chart
  4026. * new Chartist.Pie('.ct-chart', {
  4027. * series: [10, 2, 4, 3]
  4028. * }, {
  4029. * donut: true
  4030. * });
  4031. *
  4032. * @example
  4033. * // Using donut, startAngle and total to draw a gauge chart
  4034. * new Chartist.Pie('.ct-chart', {
  4035. * series: [20, 10, 30, 40]
  4036. * }, {
  4037. * donut: true,
  4038. * donutWidth: 20,
  4039. * startAngle: 270,
  4040. * total: 200
  4041. * });
  4042. *
  4043. * @example
  4044. * // Drawing a pie chart with padding and labels that are outside the pie
  4045. * new Chartist.Pie('.ct-chart', {
  4046. * series: [20, 10, 30, 40]
  4047. * }, {
  4048. * chartPadding: 30,
  4049. * labelOffset: 50,
  4050. * labelDirection: 'explode'
  4051. * });
  4052. *
  4053. * @example
  4054. * // Overriding the class names for individual series as well as a name and meta data.
  4055. * // The name will be written as ct:series-name attribute and the meta data will be serialized and written
  4056. * // to a ct:meta attribute.
  4057. * new Chartist.Pie('.ct-chart', {
  4058. * series: [{
  4059. * value: 20,
  4060. * name: 'Series 1',
  4061. * className: 'my-custom-class-one',
  4062. * meta: 'Meta One'
  4063. * }, {
  4064. * value: 10,
  4065. * name: 'Series 2',
  4066. * className: 'my-custom-class-two',
  4067. * meta: 'Meta Two'
  4068. * }, {
  4069. * value: 70,
  4070. * name: 'Series 3',
  4071. * className: 'my-custom-class-three',
  4072. * meta: 'Meta Three'
  4073. * }]
  4074. * });
  4075. */
  4076. function Pie(query, data, options, responsiveOptions) {
  4077. Chartist.Pie.super.constructor.call(this,
  4078. query,
  4079. data,
  4080. defaultOptions,
  4081. Chartist.extend({}, defaultOptions, options),
  4082. responsiveOptions);
  4083. }
  4084. // Creating pie chart type in Chartist namespace
  4085. Chartist.Pie = Chartist.Base.extend({
  4086. constructor: Pie,
  4087. createChart: createChart,
  4088. determineAnchorPosition: determineAnchorPosition
  4089. });
  4090. }(this || __webpack_require__.g, Chartist));
  4091. return Chartist;
  4092. }));
  4093. /***/ }),
  4094. /***/ 23350:
  4095. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4096. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4097. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4098. (function(mod) {
  4099. if (true) // CommonJS
  4100. mod(__webpack_require__(4631));
  4101. else {}
  4102. })(function(CodeMirror) {
  4103. "use strict";
  4104. var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,
  4105. emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,
  4106. unorderedListRE = /[*+-]\s/;
  4107. CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
  4108. if (cm.getOption("disableInput")) return CodeMirror.Pass;
  4109. var ranges = cm.listSelections(), replacements = [];
  4110. for (var i = 0; i < ranges.length; i++) {
  4111. var pos = ranges[i].head;
  4112. // If we're not in Markdown mode, fall back to normal newlineAndIndent
  4113. var eolState = cm.getStateAfter(pos.line);
  4114. var inner = CodeMirror.innerMode(cm.getMode(), eolState);
  4115. if (inner.mode.name !== "markdown") {
  4116. cm.execCommand("newlineAndIndent");
  4117. return;
  4118. } else {
  4119. eolState = inner.state;
  4120. }
  4121. var inList = eolState.list !== false;
  4122. var inQuote = eolState.quote !== 0;
  4123. var line = cm.getLine(pos.line), match = listRE.exec(line);
  4124. var cursorBeforeBullet = /^\s*$/.test(line.slice(0, pos.ch));
  4125. if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {
  4126. cm.execCommand("newlineAndIndent");
  4127. return;
  4128. }
  4129. if (emptyListRE.test(line)) {
  4130. var endOfQuote = inQuote && />\s*$/.test(line)
  4131. var endOfList = !/>\s*$/.test(line)
  4132. if (endOfQuote || endOfList) cm.replaceRange("", {
  4133. line: pos.line, ch: 0
  4134. }, {
  4135. line: pos.line, ch: pos.ch + 1
  4136. });
  4137. replacements[i] = "\n";
  4138. } else {
  4139. var indent = match[1], after = match[5];
  4140. var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
  4141. var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace("x", " ");
  4142. replacements[i] = "\n" + indent + bullet + after;
  4143. if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
  4144. }
  4145. }
  4146. cm.replaceSelections(replacements);
  4147. };
  4148. // Auto-updating Markdown list numbers when a new item is added to the
  4149. // middle of a list
  4150. function incrementRemainingMarkdownListNumbers(cm, pos) {
  4151. var startLine = pos.line, lookAhead = 0, skipCount = 0;
  4152. var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];
  4153. do {
  4154. lookAhead += 1;
  4155. var nextLineNumber = startLine + lookAhead;
  4156. var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);
  4157. if (nextItem) {
  4158. var nextIndent = nextItem[1];
  4159. var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);
  4160. var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;
  4161. if (startIndent === nextIndent && !isNaN(nextNumber)) {
  4162. if (newNumber === nextNumber) itemNumber = nextNumber + 1;
  4163. if (newNumber > nextNumber) itemNumber = newNumber + 1;
  4164. cm.replaceRange(
  4165. nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
  4166. {
  4167. line: nextLineNumber, ch: 0
  4168. }, {
  4169. line: nextLineNumber, ch: nextLine.length
  4170. });
  4171. } else {
  4172. if (startIndent.length > nextIndent.length) return;
  4173. // This doesn't run if the next line immediately indents, as it is
  4174. // not clear of the users intention (new indented item or same level)
  4175. if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;
  4176. skipCount += 1;
  4177. }
  4178. }
  4179. } while (nextItem);
  4180. }
  4181. });
  4182. /***/ }),
  4183. /***/ 41423:
  4184. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4185. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4186. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4187. // Depends on csslint.js from https://github.com/stubbornella/csslint
  4188. // declare global: CSSLint
  4189. (function(mod) {
  4190. if (true) // CommonJS
  4191. mod(__webpack_require__(4631));
  4192. else {}
  4193. })(function(CodeMirror) {
  4194. "use strict";
  4195. CodeMirror.registerHelper("lint", "css", function(text, options) {
  4196. var found = [];
  4197. if (!window.CSSLint) {
  4198. if (window.console) {
  4199. window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run.");
  4200. }
  4201. return found;
  4202. }
  4203. var results = CSSLint.verify(text, options), messages = results.messages, message = null;
  4204. for ( var i = 0; i < messages.length; i++) {
  4205. message = messages[i];
  4206. var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;
  4207. found.push({
  4208. from: CodeMirror.Pos(startLine, startCol),
  4209. to: CodeMirror.Pos(endLine, endCol),
  4210. message: message.message,
  4211. severity : message.type
  4212. });
  4213. }
  4214. return found;
  4215. });
  4216. });
  4217. /***/ }),
  4218. /***/ 96477:
  4219. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4220. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4221. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4222. // Depends on jshint.js from https://github.com/jshint/jshint
  4223. (function(mod) {
  4224. if (true) // CommonJS
  4225. mod(__webpack_require__(4631));
  4226. else {}
  4227. })(function(CodeMirror) {
  4228. "use strict";
  4229. // declare global: JSHINT
  4230. function validator(text, options) {
  4231. if (!window.JSHINT) {
  4232. if (window.console) {
  4233. window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run.");
  4234. }
  4235. return [];
  4236. }
  4237. if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation
  4238. options.indent = 1; // JSHint default value is 4
  4239. JSHINT(text, options, options.globals);
  4240. var errors = JSHINT.data().errors, result = [];
  4241. if (errors) parseErrors(errors, result);
  4242. return result;
  4243. }
  4244. CodeMirror.registerHelper("lint", "javascript", validator);
  4245. function parseErrors(errors, output) {
  4246. for ( var i = 0; i < errors.length; i++) {
  4247. var error = errors[i];
  4248. if (error) {
  4249. if (error.line <= 0) {
  4250. if (window.console) {
  4251. window.console.warn("Cannot display JSHint error (invalid line " + error.line + ")", error);
  4252. }
  4253. continue;
  4254. }
  4255. var start = error.character - 1, end = start + 1;
  4256. if (error.evidence) {
  4257. var index = error.evidence.substring(start).search(/.\b/);
  4258. if (index > -1) {
  4259. end += index;
  4260. }
  4261. }
  4262. // Convert to format expected by validation service
  4263. var hint = {
  4264. message: error.reason,
  4265. severity: error.code ? (error.code.startsWith('W') ? "warning" : "error") : "error",
  4266. from: CodeMirror.Pos(error.line - 1, start),
  4267. to: CodeMirror.Pos(error.line - 1, end)
  4268. };
  4269. output.push(hint);
  4270. }
  4271. }
  4272. }
  4273. });
  4274. /***/ }),
  4275. /***/ 62193:
  4276. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4277. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4278. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4279. // Depends on jsonlint.js from https://github.com/zaach/jsonlint
  4280. // declare global: jsonlint
  4281. (function(mod) {
  4282. if (true) // CommonJS
  4283. mod(__webpack_require__(4631));
  4284. else {}
  4285. })(function(CodeMirror) {
  4286. "use strict";
  4287. CodeMirror.registerHelper("lint", "json", function(text) {
  4288. var found = [];
  4289. if (!window.jsonlint) {
  4290. if (window.console) {
  4291. window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run.");
  4292. }
  4293. return found;
  4294. }
  4295. // for jsonlint's web dist jsonlint is exported as an object with a single property parser, of which parseError
  4296. // is a subproperty
  4297. var jsonlint = window.jsonlint.parser || window.jsonlint
  4298. jsonlint.parseError = function(str, hash) {
  4299. var loc = hash.loc;
  4300. found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
  4301. to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
  4302. message: str});
  4303. };
  4304. try { jsonlint.parse(text); }
  4305. catch(e) {}
  4306. return found;
  4307. });
  4308. });
  4309. /***/ }),
  4310. /***/ 3256:
  4311. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4312. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4313. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4314. (function(mod) {
  4315. if (true) // CommonJS
  4316. mod(__webpack_require__(4631));
  4317. else {}
  4318. })(function(CodeMirror) {
  4319. "use strict";
  4320. var GUTTER_ID = "CodeMirror-lint-markers";
  4321. function showTooltip(cm, e, content) {
  4322. var tt = document.createElement("div");
  4323. tt.className = "CodeMirror-lint-tooltip cm-s-" + cm.options.theme;
  4324. tt.appendChild(content.cloneNode(true));
  4325. if (cm.state.lint.options.selfContain)
  4326. cm.getWrapperElement().appendChild(tt);
  4327. else
  4328. document.body.appendChild(tt);
  4329. function position(e) {
  4330. if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
  4331. tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
  4332. tt.style.left = (e.clientX + 5) + "px";
  4333. }
  4334. CodeMirror.on(document, "mousemove", position);
  4335. position(e);
  4336. if (tt.style.opacity != null) tt.style.opacity = 1;
  4337. return tt;
  4338. }
  4339. function rm(elt) {
  4340. if (elt.parentNode) elt.parentNode.removeChild(elt);
  4341. }
  4342. function hideTooltip(tt) {
  4343. if (!tt.parentNode) return;
  4344. if (tt.style.opacity == null) rm(tt);
  4345. tt.style.opacity = 0;
  4346. setTimeout(function() { rm(tt); }, 600);
  4347. }
  4348. function showTooltipFor(cm, e, content, node) {
  4349. var tooltip = showTooltip(cm, e, content);
  4350. function hide() {
  4351. CodeMirror.off(node, "mouseout", hide);
  4352. if (tooltip) { hideTooltip(tooltip); tooltip = null; }
  4353. }
  4354. var poll = setInterval(function() {
  4355. if (tooltip) for (var n = node;; n = n.parentNode) {
  4356. if (n && n.nodeType == 11) n = n.host;
  4357. if (n == document.body) return;
  4358. if (!n) { hide(); break; }
  4359. }
  4360. if (!tooltip) return clearInterval(poll);
  4361. }, 400);
  4362. CodeMirror.on(node, "mouseout", hide);
  4363. }
  4364. function LintState(cm, options, hasGutter) {
  4365. this.marked = [];
  4366. this.options = options;
  4367. this.timeout = null;
  4368. this.hasGutter = hasGutter;
  4369. this.onMouseOver = function(e) { onMouseOver(cm, e); };
  4370. this.waitingFor = 0
  4371. }
  4372. function parseOptions(_cm, options) {
  4373. if (options instanceof Function) return {getAnnotations: options};
  4374. if (!options || options === true) options = {};
  4375. return options;
  4376. }
  4377. function clearMarks(cm) {
  4378. var state = cm.state.lint;
  4379. if (state.hasGutter) cm.clearGutter(GUTTER_ID);
  4380. for (var i = 0; i < state.marked.length; ++i)
  4381. state.marked[i].clear();
  4382. state.marked.length = 0;
  4383. }
  4384. function makeMarker(cm, labels, severity, multiple, tooltips) {
  4385. var marker = document.createElement("div"), inner = marker;
  4386. marker.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + severity;
  4387. if (multiple) {
  4388. inner = marker.appendChild(document.createElement("div"));
  4389. inner.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple";
  4390. }
  4391. if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) {
  4392. showTooltipFor(cm, e, labels, inner);
  4393. });
  4394. return marker;
  4395. }
  4396. function getMaxSeverity(a, b) {
  4397. if (a == "error") return a;
  4398. else return b;
  4399. }
  4400. function groupByLine(annotations) {
  4401. var lines = [];
  4402. for (var i = 0; i < annotations.length; ++i) {
  4403. var ann = annotations[i], line = ann.from.line;
  4404. (lines[line] || (lines[line] = [])).push(ann);
  4405. }
  4406. return lines;
  4407. }
  4408. function annotationTooltip(ann) {
  4409. var severity = ann.severity;
  4410. if (!severity) severity = "error";
  4411. var tip = document.createElement("div");
  4412. tip.className = "CodeMirror-lint-message CodeMirror-lint-message-" + severity;
  4413. if (typeof ann.messageHTML != 'undefined') {
  4414. tip.innerHTML = ann.messageHTML;
  4415. } else {
  4416. tip.appendChild(document.createTextNode(ann.message));
  4417. }
  4418. return tip;
  4419. }
  4420. function lintAsync(cm, getAnnotations, passOptions) {
  4421. var state = cm.state.lint
  4422. var id = ++state.waitingFor
  4423. function abort() {
  4424. id = -1
  4425. cm.off("change", abort)
  4426. }
  4427. cm.on("change", abort)
  4428. getAnnotations(cm.getValue(), function(annotations, arg2) {
  4429. cm.off("change", abort)
  4430. if (state.waitingFor != id) return
  4431. if (arg2 && annotations instanceof CodeMirror) annotations = arg2
  4432. cm.operation(function() {updateLinting(cm, annotations)})
  4433. }, passOptions, cm);
  4434. }
  4435. function startLinting(cm) {
  4436. var state = cm.state.lint, options = state.options;
  4437. /*
  4438. * Passing rules in `options` property prevents JSHint (and other linters) from complaining
  4439. * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.
  4440. */
  4441. var passOptions = options.options || options;
  4442. var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
  4443. if (!getAnnotations) return;
  4444. if (options.async || getAnnotations.async) {
  4445. lintAsync(cm, getAnnotations, passOptions)
  4446. } else {
  4447. var annotations = getAnnotations(cm.getValue(), passOptions, cm);
  4448. if (!annotations) return;
  4449. if (annotations.then) annotations.then(function(issues) {
  4450. cm.operation(function() {updateLinting(cm, issues)})
  4451. });
  4452. else cm.operation(function() {updateLinting(cm, annotations)})
  4453. }
  4454. }
  4455. function updateLinting(cm, annotationsNotSorted) {
  4456. clearMarks(cm);
  4457. var state = cm.state.lint, options = state.options;
  4458. var annotations = groupByLine(annotationsNotSorted);
  4459. for (var line = 0; line < annotations.length; ++line) {
  4460. var anns = annotations[line];
  4461. if (!anns) continue;
  4462. // filter out duplicate messages
  4463. var message = [];
  4464. anns = anns.filter(function(item) { return message.indexOf(item.message) > -1 ? false : message.push(item.message) });
  4465. var maxSeverity = null;
  4466. var tipLabel = state.hasGutter && document.createDocumentFragment();
  4467. for (var i = 0; i < anns.length; ++i) {
  4468. var ann = anns[i];
  4469. var severity = ann.severity;
  4470. if (!severity) severity = "error";
  4471. maxSeverity = getMaxSeverity(maxSeverity, severity);
  4472. if (options.formatAnnotation) ann = options.formatAnnotation(ann);
  4473. if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
  4474. if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
  4475. className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity,
  4476. __annotation: ann
  4477. }));
  4478. }
  4479. // use original annotations[line] to show multiple messages
  4480. if (state.hasGutter)
  4481. cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, annotations[line].length > 1,
  4482. state.options.tooltips));
  4483. }
  4484. if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
  4485. }
  4486. function onChange(cm) {
  4487. var state = cm.state.lint;
  4488. if (!state) return;
  4489. clearTimeout(state.timeout);
  4490. state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500);
  4491. }
  4492. function popupTooltips(cm, annotations, e) {
  4493. var target = e.target || e.srcElement;
  4494. var tooltip = document.createDocumentFragment();
  4495. for (var i = 0; i < annotations.length; i++) {
  4496. var ann = annotations[i];
  4497. tooltip.appendChild(annotationTooltip(ann));
  4498. }
  4499. showTooltipFor(cm, e, tooltip, target);
  4500. }
  4501. function onMouseOver(cm, e) {
  4502. var target = e.target || e.srcElement;
  4503. if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
  4504. var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
  4505. var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
  4506. var annotations = [];
  4507. for (var i = 0; i < spans.length; ++i) {
  4508. var ann = spans[i].__annotation;
  4509. if (ann) annotations.push(ann);
  4510. }
  4511. if (annotations.length) popupTooltips(cm, annotations, e);
  4512. }
  4513. CodeMirror.defineOption("lint", false, function(cm, val, old) {
  4514. if (old && old != CodeMirror.Init) {
  4515. clearMarks(cm);
  4516. if (cm.state.lint.options.lintOnChange !== false)
  4517. cm.off("change", onChange);
  4518. CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
  4519. clearTimeout(cm.state.lint.timeout);
  4520. delete cm.state.lint;
  4521. }
  4522. if (val) {
  4523. var gutters = cm.getOption("gutters"), hasLintGutter = false;
  4524. for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
  4525. var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
  4526. if (state.options.lintOnChange !== false)
  4527. cm.on("change", onChange);
  4528. if (state.options.tooltips != false && state.options.tooltips != "gutter")
  4529. CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
  4530. startLinting(cm);
  4531. }
  4532. });
  4533. CodeMirror.defineExtension("performLint", function() {
  4534. if (this.state.lint) startLinting(this);
  4535. });
  4536. });
  4537. /***/ }),
  4538. /***/ 82783:
  4539. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4540. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4541. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4542. (function(mod) {
  4543. if (true) // CommonJS
  4544. mod(__webpack_require__(4631));
  4545. else {}
  4546. })(function(CodeMirror) {
  4547. "use strict";
  4548. // Depends on js-yaml.js from https://github.com/nodeca/js-yaml
  4549. // declare global: jsyaml
  4550. CodeMirror.registerHelper("lint", "yaml", function(text) {
  4551. var found = [];
  4552. if (!window.jsyaml) {
  4553. if (window.console) {
  4554. window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run.");
  4555. }
  4556. return found;
  4557. }
  4558. try { jsyaml.loadAll(text); }
  4559. catch(e) {
  4560. var loc = e.mark,
  4561. // js-yaml YAMLException doesn't always provide an accurate lineno
  4562. // e.g., when there are multiple yaml docs
  4563. // ---
  4564. // ---
  4565. // foo:bar
  4566. from = loc ? CodeMirror.Pos(loc.line, loc.column) : CodeMirror.Pos(0, 0),
  4567. to = from;
  4568. found.push({ from: from, to: to, message: e.message });
  4569. }
  4570. return found;
  4571. });
  4572. });
  4573. /***/ }),
  4574. /***/ 87093:
  4575. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4576. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4577. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4578. (function(mod) {
  4579. if (true) // CommonJS
  4580. mod(__webpack_require__(4631));
  4581. else {}
  4582. })(function(CodeMirror) {
  4583. "use strict";
  4584. CodeMirror.multiplexingMode = function(outer /*, others */) {
  4585. // Others should be {open, close, mode [, delimStyle] [, innerStyle] [, parseDelimiters]} objects
  4586. var others = Array.prototype.slice.call(arguments, 1);
  4587. function indexOf(string, pattern, from, returnEnd) {
  4588. if (typeof pattern == "string") {
  4589. var found = string.indexOf(pattern, from);
  4590. return returnEnd && found > -1 ? found + pattern.length : found;
  4591. }
  4592. var m = pattern.exec(from ? string.slice(from) : string);
  4593. return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;
  4594. }
  4595. return {
  4596. startState: function() {
  4597. return {
  4598. outer: CodeMirror.startState(outer),
  4599. innerActive: null,
  4600. inner: null,
  4601. startingInner: false
  4602. };
  4603. },
  4604. copyState: function(state) {
  4605. return {
  4606. outer: CodeMirror.copyState(outer, state.outer),
  4607. innerActive: state.innerActive,
  4608. inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner),
  4609. startingInner: state.startingInner
  4610. };
  4611. },
  4612. token: function(stream, state) {
  4613. if (!state.innerActive) {
  4614. var cutOff = Infinity, oldContent = stream.string;
  4615. for (var i = 0; i < others.length; ++i) {
  4616. var other = others[i];
  4617. var found = indexOf(oldContent, other.open, stream.pos);
  4618. if (found == stream.pos) {
  4619. if (!other.parseDelimiters) stream.match(other.open);
  4620. state.startingInner = !!other.parseDelimiters
  4621. state.innerActive = other;
  4622. // Get the outer indent, making sure to handle CodeMirror.Pass
  4623. var outerIndent = 0;
  4624. if (outer.indent) {
  4625. var possibleOuterIndent = outer.indent(state.outer, "", "");
  4626. if (possibleOuterIndent !== CodeMirror.Pass) outerIndent = possibleOuterIndent;
  4627. }
  4628. state.inner = CodeMirror.startState(other.mode, outerIndent);
  4629. return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");
  4630. } else if (found != -1 && found < cutOff) {
  4631. cutOff = found;
  4632. }
  4633. }
  4634. if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);
  4635. var outerToken = outer.token(stream, state.outer);
  4636. if (cutOff != Infinity) stream.string = oldContent;
  4637. return outerToken;
  4638. } else {
  4639. var curInner = state.innerActive, oldContent = stream.string;
  4640. if (!curInner.close && stream.sol()) {
  4641. state.innerActive = state.inner = null;
  4642. return this.token(stream, state);
  4643. }
  4644. var found = curInner.close && !state.startingInner ?
  4645. indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;
  4646. if (found == stream.pos && !curInner.parseDelimiters) {
  4647. stream.match(curInner.close);
  4648. state.innerActive = state.inner = null;
  4649. return curInner.delimStyle && (curInner.delimStyle + " " + curInner.delimStyle + "-close");
  4650. }
  4651. if (found > -1) stream.string = oldContent.slice(0, found);
  4652. var innerToken = curInner.mode.token(stream, state.inner);
  4653. if (found > -1) stream.string = oldContent;
  4654. else if (stream.pos > stream.start) state.startingInner = false
  4655. if (found == stream.pos && curInner.parseDelimiters)
  4656. state.innerActive = state.inner = null;
  4657. if (curInner.innerStyle) {
  4658. if (innerToken) innerToken = innerToken + " " + curInner.innerStyle;
  4659. else innerToken = curInner.innerStyle;
  4660. }
  4661. return innerToken;
  4662. }
  4663. },
  4664. indent: function(state, textAfter, line) {
  4665. var mode = state.innerActive ? state.innerActive.mode : outer;
  4666. if (!mode.indent) return CodeMirror.Pass;
  4667. return mode.indent(state.innerActive ? state.inner : state.outer, textAfter, line);
  4668. },
  4669. blankLine: function(state) {
  4670. var mode = state.innerActive ? state.innerActive.mode : outer;
  4671. if (mode.blankLine) {
  4672. mode.blankLine(state.innerActive ? state.inner : state.outer);
  4673. }
  4674. if (!state.innerActive) {
  4675. for (var i = 0; i < others.length; ++i) {
  4676. var other = others[i];
  4677. if (other.open === "\n") {
  4678. state.innerActive = other;
  4679. state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "", "") : 0);
  4680. }
  4681. }
  4682. } else if (state.innerActive.close === "\n") {
  4683. state.innerActive = state.inner = null;
  4684. }
  4685. },
  4686. electricChars: outer.electricChars,
  4687. innerMode: function(state) {
  4688. return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};
  4689. }
  4690. };
  4691. };
  4692. });
  4693. /***/ }),
  4694. /***/ 14146:
  4695. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4696. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4697. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4698. // Utility function that allows modes to be combined. The mode given
  4699. // as the base argument takes care of most of the normal mode
  4700. // functionality, but a second (typically simple) mode is used, which
  4701. // can override the style of text. Both modes get to parse all of the
  4702. // text, but when both assign a non-null style to a piece of code, the
  4703. // overlay wins, unless the combine argument was true and not overridden,
  4704. // or state.overlay.combineTokens was true, in which case the styles are
  4705. // combined.
  4706. (function(mod) {
  4707. if (true) // CommonJS
  4708. mod(__webpack_require__(4631));
  4709. else {}
  4710. })(function(CodeMirror) {
  4711. "use strict";
  4712. CodeMirror.overlayMode = function(base, overlay, combine) {
  4713. return {
  4714. startState: function() {
  4715. return {
  4716. base: CodeMirror.startState(base),
  4717. overlay: CodeMirror.startState(overlay),
  4718. basePos: 0, baseCur: null,
  4719. overlayPos: 0, overlayCur: null,
  4720. streamSeen: null
  4721. };
  4722. },
  4723. copyState: function(state) {
  4724. return {
  4725. base: CodeMirror.copyState(base, state.base),
  4726. overlay: CodeMirror.copyState(overlay, state.overlay),
  4727. basePos: state.basePos, baseCur: null,
  4728. overlayPos: state.overlayPos, overlayCur: null
  4729. };
  4730. },
  4731. token: function(stream, state) {
  4732. if (stream != state.streamSeen ||
  4733. Math.min(state.basePos, state.overlayPos) < stream.start) {
  4734. state.streamSeen = stream;
  4735. state.basePos = state.overlayPos = stream.start;
  4736. }
  4737. if (stream.start == state.basePos) {
  4738. state.baseCur = base.token(stream, state.base);
  4739. state.basePos = stream.pos;
  4740. }
  4741. if (stream.start == state.overlayPos) {
  4742. stream.pos = stream.start;
  4743. state.overlayCur = overlay.token(stream, state.overlay);
  4744. state.overlayPos = stream.pos;
  4745. }
  4746. stream.pos = Math.min(state.basePos, state.overlayPos);
  4747. // state.overlay.combineTokens always takes precedence over combine,
  4748. // unless set to null
  4749. if (state.overlayCur == null) return state.baseCur;
  4750. else if (state.baseCur != null &&
  4751. state.overlay.combineTokens ||
  4752. combine && state.overlay.combineTokens == null)
  4753. return state.baseCur + " " + state.overlayCur;
  4754. else return state.overlayCur;
  4755. },
  4756. indent: base.indent && function(state, textAfter, line) {
  4757. return base.indent(state.base, textAfter, line);
  4758. },
  4759. electricChars: base.electricChars,
  4760. innerMode: function(state) { return {state: state.base, mode: base}; },
  4761. blankLine: function(state) {
  4762. var baseToken, overlayToken;
  4763. if (base.blankLine) baseToken = base.blankLine(state.base);
  4764. if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);
  4765. return overlayToken == null ?
  4766. baseToken :
  4767. (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
  4768. }
  4769. };
  4770. };
  4771. });
  4772. /***/ }),
  4773. /***/ 20017:
  4774. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4775. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4776. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4777. (function(mod) {
  4778. if (true) // CommonJS
  4779. mod(__webpack_require__(4631));
  4780. else {}
  4781. })(function(CodeMirror) {
  4782. "use strict";
  4783. var WRAP_CLASS = "CodeMirror-activeline";
  4784. var BACK_CLASS = "CodeMirror-activeline-background";
  4785. var GUTT_CLASS = "CodeMirror-activeline-gutter";
  4786. CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {
  4787. var prev = old == CodeMirror.Init ? false : old;
  4788. if (val == prev) return
  4789. if (prev) {
  4790. cm.off("beforeSelectionChange", selectionChange);
  4791. clearActiveLines(cm);
  4792. delete cm.state.activeLines;
  4793. }
  4794. if (val) {
  4795. cm.state.activeLines = [];
  4796. updateActiveLines(cm, cm.listSelections());
  4797. cm.on("beforeSelectionChange", selectionChange);
  4798. }
  4799. });
  4800. function clearActiveLines(cm) {
  4801. for (var i = 0; i < cm.state.activeLines.length; i++) {
  4802. cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);
  4803. cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);
  4804. cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS);
  4805. }
  4806. }
  4807. function sameArray(a, b) {
  4808. if (a.length != b.length) return false;
  4809. for (var i = 0; i < a.length; i++)
  4810. if (a[i] != b[i]) return false;
  4811. return true;
  4812. }
  4813. function updateActiveLines(cm, ranges) {
  4814. var active = [];
  4815. for (var i = 0; i < ranges.length; i++) {
  4816. var range = ranges[i];
  4817. var option = cm.getOption("styleActiveLine");
  4818. if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())
  4819. continue
  4820. var line = cm.getLineHandleVisualStart(range.head.line);
  4821. if (active[active.length - 1] != line) active.push(line);
  4822. }
  4823. if (sameArray(cm.state.activeLines, active)) return;
  4824. cm.operation(function() {
  4825. clearActiveLines(cm);
  4826. for (var i = 0; i < active.length; i++) {
  4827. cm.addLineClass(active[i], "wrap", WRAP_CLASS);
  4828. cm.addLineClass(active[i], "background", BACK_CLASS);
  4829. cm.addLineClass(active[i], "gutter", GUTT_CLASS);
  4830. }
  4831. cm.state.activeLines = active;
  4832. });
  4833. }
  4834. function selectionChange(cm, sel) {
  4835. updateActiveLines(cm, sel.ranges);
  4836. }
  4837. });
  4838. /***/ }),
  4839. /***/ 4631:
  4840. /***/ (function(module) {
  4841. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4842. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4843. // This is CodeMirror (https://codemirror.net), a code editor
  4844. // implemented in JavaScript on top of the browser's DOM.
  4845. //
  4846. // You can find some technical background for some of the code below
  4847. // at http://marijnhaverbeke.nl/blog/#cm-internals .
  4848. (function (global, factory) {
  4849. true ? module.exports = factory() :
  4850. 0;
  4851. }(this, (function () { 'use strict';
  4852. // Kludges for bugs and behavior differences that can't be feature
  4853. // detected are enabled based on userAgent etc sniffing.
  4854. var userAgent = navigator.userAgent;
  4855. var platform = navigator.platform;
  4856. var gecko = /gecko\/\d/i.test(userAgent);
  4857. var ie_upto10 = /MSIE \d/.test(userAgent);
  4858. var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
  4859. var edge = /Edge\/(\d+)/.exec(userAgent);
  4860. var ie = ie_upto10 || ie_11up || edge;
  4861. var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
  4862. var webkit = !edge && /WebKit\//.test(userAgent);
  4863. var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
  4864. var chrome = !edge && /Chrome\//.test(userAgent);
  4865. var presto = /Opera\//.test(userAgent);
  4866. var safari = /Apple Computer/.test(navigator.vendor);
  4867. var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
  4868. var phantom = /PhantomJS/.test(userAgent);
  4869. var ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2);
  4870. var android = /Android/.test(userAgent);
  4871. // This is woefully incomplete. Suggestions for alternative methods welcome.
  4872. var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
  4873. var mac = ios || /Mac/.test(platform);
  4874. var chromeOS = /\bCrOS\b/.test(userAgent);
  4875. var windows = /win/i.test(platform);
  4876. var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
  4877. if (presto_version) { presto_version = Number(presto_version[1]); }
  4878. if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
  4879. // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
  4880. var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
  4881. var captureRightClick = gecko || (ie && ie_version >= 9);
  4882. function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
  4883. var rmClass = function(node, cls) {
  4884. var current = node.className;
  4885. var match = classTest(cls).exec(current);
  4886. if (match) {
  4887. var after = current.slice(match.index + match[0].length);
  4888. node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
  4889. }
  4890. };
  4891. function removeChildren(e) {
  4892. for (var count = e.childNodes.length; count > 0; --count)
  4893. { e.removeChild(e.firstChild); }
  4894. return e
  4895. }
  4896. function removeChildrenAndAdd(parent, e) {
  4897. return removeChildren(parent).appendChild(e)
  4898. }
  4899. function elt(tag, content, className, style) {
  4900. var e = document.createElement(tag);
  4901. if (className) { e.className = className; }
  4902. if (style) { e.style.cssText = style; }
  4903. if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }
  4904. else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }
  4905. return e
  4906. }
  4907. // wrapper for elt, which removes the elt from the accessibility tree
  4908. function eltP(tag, content, className, style) {
  4909. var e = elt(tag, content, className, style);
  4910. e.setAttribute("role", "presentation");
  4911. return e
  4912. }
  4913. var range;
  4914. if (document.createRange) { range = function(node, start, end, endNode) {
  4915. var r = document.createRange();
  4916. r.setEnd(endNode || node, end);
  4917. r.setStart(node, start);
  4918. return r
  4919. }; }
  4920. else { range = function(node, start, end) {
  4921. var r = document.body.createTextRange();
  4922. try { r.moveToElementText(node.parentNode); }
  4923. catch(e) { return r }
  4924. r.collapse(true);
  4925. r.moveEnd("character", end);
  4926. r.moveStart("character", start);
  4927. return r
  4928. }; }
  4929. function contains(parent, child) {
  4930. if (child.nodeType == 3) // Android browser always returns false when child is a textnode
  4931. { child = child.parentNode; }
  4932. if (parent.contains)
  4933. { return parent.contains(child) }
  4934. do {
  4935. if (child.nodeType == 11) { child = child.host; }
  4936. if (child == parent) { return true }
  4937. } while (child = child.parentNode)
  4938. }
  4939. function activeElt() {
  4940. // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
  4941. // IE < 10 will throw when accessed while the page is loading or in an iframe.
  4942. // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
  4943. var activeElement;
  4944. try {
  4945. activeElement = document.activeElement;
  4946. } catch(e) {
  4947. activeElement = document.body || null;
  4948. }
  4949. while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
  4950. { activeElement = activeElement.shadowRoot.activeElement; }
  4951. return activeElement
  4952. }
  4953. function addClass(node, cls) {
  4954. var current = node.className;
  4955. if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }
  4956. }
  4957. function joinClasses(a, b) {
  4958. var as = a.split(" ");
  4959. for (var i = 0; i < as.length; i++)
  4960. { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }
  4961. return b
  4962. }
  4963. var selectInput = function(node) { node.select(); };
  4964. if (ios) // Mobile Safari apparently has a bug where select() is broken.
  4965. { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }
  4966. else if (ie) // Suppress mysterious IE10 errors
  4967. { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }
  4968. function bind(f) {
  4969. var args = Array.prototype.slice.call(arguments, 1);
  4970. return function(){return f.apply(null, args)}
  4971. }
  4972. function copyObj(obj, target, overwrite) {
  4973. if (!target) { target = {}; }
  4974. for (var prop in obj)
  4975. { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
  4976. { target[prop] = obj[prop]; } }
  4977. return target
  4978. }
  4979. // Counts the column offset in a string, taking tabs into account.
  4980. // Used mostly to find indentation.
  4981. function countColumn(string, end, tabSize, startIndex, startValue) {
  4982. if (end == null) {
  4983. end = string.search(/[^\s\u00a0]/);
  4984. if (end == -1) { end = string.length; }
  4985. }
  4986. for (var i = startIndex || 0, n = startValue || 0;;) {
  4987. var nextTab = string.indexOf("\t", i);
  4988. if (nextTab < 0 || nextTab >= end)
  4989. { return n + (end - i) }
  4990. n += nextTab - i;
  4991. n += tabSize - (n % tabSize);
  4992. i = nextTab + 1;
  4993. }
  4994. }
  4995. var Delayed = function() {
  4996. this.id = null;
  4997. this.f = null;
  4998. this.time = 0;
  4999. this.handler = bind(this.onTimeout, this);
  5000. };
  5001. Delayed.prototype.onTimeout = function (self) {
  5002. self.id = 0;
  5003. if (self.time <= +new Date) {
  5004. self.f();
  5005. } else {
  5006. setTimeout(self.handler, self.time - +new Date);
  5007. }
  5008. };
  5009. Delayed.prototype.set = function (ms, f) {
  5010. this.f = f;
  5011. var time = +new Date + ms;
  5012. if (!this.id || time < this.time) {
  5013. clearTimeout(this.id);
  5014. this.id = setTimeout(this.handler, ms);
  5015. this.time = time;
  5016. }
  5017. };
  5018. function indexOf(array, elt) {
  5019. for (var i = 0; i < array.length; ++i)
  5020. { if (array[i] == elt) { return i } }
  5021. return -1
  5022. }
  5023. // Number of pixels added to scroller and sizer to hide scrollbar
  5024. var scrollerGap = 50;
  5025. // Returned or thrown by various protocols to signal 'I'm not
  5026. // handling this'.
  5027. var Pass = {toString: function(){return "CodeMirror.Pass"}};
  5028. // Reused option objects for setSelection & friends
  5029. var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"};
  5030. // The inverse of countColumn -- find the offset that corresponds to
  5031. // a particular column.
  5032. function findColumn(string, goal, tabSize) {
  5033. for (var pos = 0, col = 0;;) {
  5034. var nextTab = string.indexOf("\t", pos);
  5035. if (nextTab == -1) { nextTab = string.length; }
  5036. var skipped = nextTab - pos;
  5037. if (nextTab == string.length || col + skipped >= goal)
  5038. { return pos + Math.min(skipped, goal - col) }
  5039. col += nextTab - pos;
  5040. col += tabSize - (col % tabSize);
  5041. pos = nextTab + 1;
  5042. if (col >= goal) { return pos }
  5043. }
  5044. }
  5045. var spaceStrs = [""];
  5046. function spaceStr(n) {
  5047. while (spaceStrs.length <= n)
  5048. { spaceStrs.push(lst(spaceStrs) + " "); }
  5049. return spaceStrs[n]
  5050. }
  5051. function lst(arr) { return arr[arr.length-1] }
  5052. function map(array, f) {
  5053. var out = [];
  5054. for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }
  5055. return out
  5056. }
  5057. function insertSorted(array, value, score) {
  5058. var pos = 0, priority = score(value);
  5059. while (pos < array.length && score(array[pos]) <= priority) { pos++; }
  5060. array.splice(pos, 0, value);
  5061. }
  5062. function nothing() {}
  5063. function createObj(base, props) {
  5064. var inst;
  5065. if (Object.create) {
  5066. inst = Object.create(base);
  5067. } else {
  5068. nothing.prototype = base;
  5069. inst = new nothing();
  5070. }
  5071. if (props) { copyObj(props, inst); }
  5072. return inst
  5073. }
  5074. var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
  5075. function isWordCharBasic(ch) {
  5076. return /\w/.test(ch) || ch > "\x80" &&
  5077. (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
  5078. }
  5079. function isWordChar(ch, helper) {
  5080. if (!helper) { return isWordCharBasic(ch) }
  5081. if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true }
  5082. return helper.test(ch)
  5083. }
  5084. function isEmpty(obj) {
  5085. for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }
  5086. return true
  5087. }
  5088. // Extending unicode characters. A series of a non-extending char +
  5089. // any number of extending chars is treated as a single unit as far
  5090. // as editing and measuring is concerned. This is not fully correct,
  5091. // since some scripts/fonts/browsers also treat other configurations
  5092. // of code points as a group.
  5093. var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
  5094. function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }
  5095. // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
  5096. function skipExtendingChars(str, pos, dir) {
  5097. while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }
  5098. return pos
  5099. }
  5100. // Returns the value from the range [`from`; `to`] that satisfies
  5101. // `pred` and is closest to `from`. Assumes that at least `to`
  5102. // satisfies `pred`. Supports `from` being greater than `to`.
  5103. function findFirst(pred, from, to) {
  5104. // At any point we are certain `to` satisfies `pred`, don't know
  5105. // whether `from` does.
  5106. var dir = from > to ? -1 : 1;
  5107. for (;;) {
  5108. if (from == to) { return from }
  5109. var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);
  5110. if (mid == from) { return pred(mid) ? from : to }
  5111. if (pred(mid)) { to = mid; }
  5112. else { from = mid + dir; }
  5113. }
  5114. }
  5115. // BIDI HELPERS
  5116. function iterateBidiSections(order, from, to, f) {
  5117. if (!order) { return f(from, to, "ltr", 0) }
  5118. var found = false;
  5119. for (var i = 0; i < order.length; ++i) {
  5120. var part = order[i];
  5121. if (part.from < to && part.to > from || from == to && part.to == from) {
  5122. f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);
  5123. found = true;
  5124. }
  5125. }
  5126. if (!found) { f(from, to, "ltr"); }
  5127. }
  5128. var bidiOther = null;
  5129. function getBidiPartAt(order, ch, sticky) {
  5130. var found;
  5131. bidiOther = null;
  5132. for (var i = 0; i < order.length; ++i) {
  5133. var cur = order[i];
  5134. if (cur.from < ch && cur.to > ch) { return i }
  5135. if (cur.to == ch) {
  5136. if (cur.from != cur.to && sticky == "before") { found = i; }
  5137. else { bidiOther = i; }
  5138. }
  5139. if (cur.from == ch) {
  5140. if (cur.from != cur.to && sticky != "before") { found = i; }
  5141. else { bidiOther = i; }
  5142. }
  5143. }
  5144. return found != null ? found : bidiOther
  5145. }
  5146. // Bidirectional ordering algorithm
  5147. // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
  5148. // that this (partially) implements.
  5149. // One-char codes used for character types:
  5150. // L (L): Left-to-Right
  5151. // R (R): Right-to-Left
  5152. // r (AL): Right-to-Left Arabic
  5153. // 1 (EN): European Number
  5154. // + (ES): European Number Separator
  5155. // % (ET): European Number Terminator
  5156. // n (AN): Arabic Number
  5157. // , (CS): Common Number Separator
  5158. // m (NSM): Non-Spacing Mark
  5159. // b (BN): Boundary Neutral
  5160. // s (B): Paragraph Separator
  5161. // t (S): Segment Separator
  5162. // w (WS): Whitespace
  5163. // N (ON): Other Neutrals
  5164. // Returns null if characters are ordered as they appear
  5165. // (left-to-right), or an array of sections ({from, to, level}
  5166. // objects) in the order in which they occur visually.
  5167. var bidiOrdering = (function() {
  5168. // Character types for codepoints 0 to 0xff
  5169. var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
  5170. // Character types for codepoints 0x600 to 0x6f9
  5171. var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
  5172. function charType(code) {
  5173. if (code <= 0xf7) { return lowTypes.charAt(code) }
  5174. else if (0x590 <= code && code <= 0x5f4) { return "R" }
  5175. else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }
  5176. else if (0x6ee <= code && code <= 0x8ac) { return "r" }
  5177. else if (0x2000 <= code && code <= 0x200b) { return "w" }
  5178. else if (code == 0x200c) { return "b" }
  5179. else { return "L" }
  5180. }
  5181. var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
  5182. var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
  5183. function BidiSpan(level, from, to) {
  5184. this.level = level;
  5185. this.from = from; this.to = to;
  5186. }
  5187. return function(str, direction) {
  5188. var outerType = direction == "ltr" ? "L" : "R";
  5189. if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }
  5190. var len = str.length, types = [];
  5191. for (var i = 0; i < len; ++i)
  5192. { types.push(charType(str.charCodeAt(i))); }
  5193. // W1. Examine each non-spacing mark (NSM) in the level run, and
  5194. // change the type of the NSM to the type of the previous
  5195. // character. If the NSM is at the start of the level run, it will
  5196. // get the type of sor.
  5197. for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
  5198. var type = types[i$1];
  5199. if (type == "m") { types[i$1] = prev; }
  5200. else { prev = type; }
  5201. }
  5202. // W2. Search backwards from each instance of a European number
  5203. // until the first strong type (R, L, AL, or sor) is found. If an
  5204. // AL is found, change the type of the European number to Arabic
  5205. // number.
  5206. // W3. Change all ALs to R.
  5207. for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
  5208. var type$1 = types[i$2];
  5209. if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }
  5210. else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }
  5211. }
  5212. // W4. A single European separator between two European numbers
  5213. // changes to a European number. A single common separator between
  5214. // two numbers of the same type changes to that type.
  5215. for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
  5216. var type$2 = types[i$3];
  5217. if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }
  5218. else if (type$2 == "," && prev$1 == types[i$3+1] &&
  5219. (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }
  5220. prev$1 = type$2;
  5221. }
  5222. // W5. A sequence of European terminators adjacent to European
  5223. // numbers changes to all European numbers.
  5224. // W6. Otherwise, separators and terminators change to Other
  5225. // Neutral.
  5226. for (var i$4 = 0; i$4 < len; ++i$4) {
  5227. var type$3 = types[i$4];
  5228. if (type$3 == ",") { types[i$4] = "N"; }
  5229. else if (type$3 == "%") {
  5230. var end = (void 0);
  5231. for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
  5232. var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
  5233. for (var j = i$4; j < end; ++j) { types[j] = replace; }
  5234. i$4 = end - 1;
  5235. }
  5236. }
  5237. // W7. Search backwards from each instance of a European number
  5238. // until the first strong type (R, L, or sor) is found. If an L is
  5239. // found, then change the type of the European number to L.
  5240. for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
  5241. var type$4 = types[i$5];
  5242. if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }
  5243. else if (isStrong.test(type$4)) { cur$1 = type$4; }
  5244. }
  5245. // N1. A sequence of neutrals takes the direction of the
  5246. // surrounding strong text if the text on both sides has the same
  5247. // direction. European and Arabic numbers act as if they were R in
  5248. // terms of their influence on neutrals. Start-of-level-run (sor)
  5249. // and end-of-level-run (eor) are used at level run boundaries.
  5250. // N2. Any remaining neutrals take the embedding direction.
  5251. for (var i$6 = 0; i$6 < len; ++i$6) {
  5252. if (isNeutral.test(types[i$6])) {
  5253. var end$1 = (void 0);
  5254. for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
  5255. var before = (i$6 ? types[i$6-1] : outerType) == "L";
  5256. var after = (end$1 < len ? types[end$1] : outerType) == "L";
  5257. var replace$1 = before == after ? (before ? "L" : "R") : outerType;
  5258. for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }
  5259. i$6 = end$1 - 1;
  5260. }
  5261. }
  5262. // Here we depart from the documented algorithm, in order to avoid
  5263. // building up an actual levels array. Since there are only three
  5264. // levels (0, 1, 2) in an implementation that doesn't take
  5265. // explicit embedding into account, we can build up the order on
  5266. // the fly, without following the level-based algorithm.
  5267. var order = [], m;
  5268. for (var i$7 = 0; i$7 < len;) {
  5269. if (countsAsLeft.test(types[i$7])) {
  5270. var start = i$7;
  5271. for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
  5272. order.push(new BidiSpan(0, start, i$7));
  5273. } else {
  5274. var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0;
  5275. for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
  5276. for (var j$2 = pos; j$2 < i$7;) {
  5277. if (countsAsNum.test(types[j$2])) {
  5278. if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }
  5279. var nstart = j$2;
  5280. for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
  5281. order.splice(at, 0, new BidiSpan(2, nstart, j$2));
  5282. at += isRTL;
  5283. pos = j$2;
  5284. } else { ++j$2; }
  5285. }
  5286. if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }
  5287. }
  5288. }
  5289. if (direction == "ltr") {
  5290. if (order[0].level == 1 && (m = str.match(/^\s+/))) {
  5291. order[0].from = m[0].length;
  5292. order.unshift(new BidiSpan(0, 0, m[0].length));
  5293. }
  5294. if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
  5295. lst(order).to -= m[0].length;
  5296. order.push(new BidiSpan(0, len - m[0].length, len));
  5297. }
  5298. }
  5299. return direction == "rtl" ? order.reverse() : order
  5300. }
  5301. })();
  5302. // Get the bidi ordering for the given line (and cache it). Returns
  5303. // false for lines that are fully left-to-right, and an array of
  5304. // BidiSpan objects otherwise.
  5305. function getOrder(line, direction) {
  5306. var order = line.order;
  5307. if (order == null) { order = line.order = bidiOrdering(line.text, direction); }
  5308. return order
  5309. }
  5310. // EVENT HANDLING
  5311. // Lightweight event framework. on/off also work on DOM nodes,
  5312. // registering native DOM handlers.
  5313. var noHandlers = [];
  5314. var on = function(emitter, type, f) {
  5315. if (emitter.addEventListener) {
  5316. emitter.addEventListener(type, f, false);
  5317. } else if (emitter.attachEvent) {
  5318. emitter.attachEvent("on" + type, f);
  5319. } else {
  5320. var map = emitter._handlers || (emitter._handlers = {});
  5321. map[type] = (map[type] || noHandlers).concat(f);
  5322. }
  5323. };
  5324. function getHandlers(emitter, type) {
  5325. return emitter._handlers && emitter._handlers[type] || noHandlers
  5326. }
  5327. function off(emitter, type, f) {
  5328. if (emitter.removeEventListener) {
  5329. emitter.removeEventListener(type, f, false);
  5330. } else if (emitter.detachEvent) {
  5331. emitter.detachEvent("on" + type, f);
  5332. } else {
  5333. var map = emitter._handlers, arr = map && map[type];
  5334. if (arr) {
  5335. var index = indexOf(arr, f);
  5336. if (index > -1)
  5337. { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }
  5338. }
  5339. }
  5340. }
  5341. function signal(emitter, type /*, values...*/) {
  5342. var handlers = getHandlers(emitter, type);
  5343. if (!handlers.length) { return }
  5344. var args = Array.prototype.slice.call(arguments, 2);
  5345. for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }
  5346. }
  5347. // The DOM events that CodeMirror handles can be overridden by
  5348. // registering a (non-DOM) handler on the editor for the event name,
  5349. // and preventDefault-ing the event in that handler.
  5350. function signalDOMEvent(cm, e, override) {
  5351. if (typeof e == "string")
  5352. { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }
  5353. signal(cm, override || e.type, cm, e);
  5354. return e_defaultPrevented(e) || e.codemirrorIgnore
  5355. }
  5356. function signalCursorActivity(cm) {
  5357. var arr = cm._handlers && cm._handlers.cursorActivity;
  5358. if (!arr) { return }
  5359. var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
  5360. for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
  5361. { set.push(arr[i]); } }
  5362. }
  5363. function hasHandler(emitter, type) {
  5364. return getHandlers(emitter, type).length > 0
  5365. }
  5366. // Add on and off methods to a constructor's prototype, to make
  5367. // registering events on such objects more convenient.
  5368. function eventMixin(ctor) {
  5369. ctor.prototype.on = function(type, f) {on(this, type, f);};
  5370. ctor.prototype.off = function(type, f) {off(this, type, f);};
  5371. }
  5372. // Due to the fact that we still support jurassic IE versions, some
  5373. // compatibility wrappers are needed.
  5374. function e_preventDefault(e) {
  5375. if (e.preventDefault) { e.preventDefault(); }
  5376. else { e.returnValue = false; }
  5377. }
  5378. function e_stopPropagation(e) {
  5379. if (e.stopPropagation) { e.stopPropagation(); }
  5380. else { e.cancelBubble = true; }
  5381. }
  5382. function e_defaultPrevented(e) {
  5383. return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
  5384. }
  5385. function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
  5386. function e_target(e) {return e.target || e.srcElement}
  5387. function e_button(e) {
  5388. var b = e.which;
  5389. if (b == null) {
  5390. if (e.button & 1) { b = 1; }
  5391. else if (e.button & 2) { b = 3; }
  5392. else if (e.button & 4) { b = 2; }
  5393. }
  5394. if (mac && e.ctrlKey && b == 1) { b = 3; }
  5395. return b
  5396. }
  5397. // Detect drag-and-drop
  5398. var dragAndDrop = function() {
  5399. // There is *some* kind of drag-and-drop support in IE6-8, but I
  5400. // couldn't get it to work yet.
  5401. if (ie && ie_version < 9) { return false }
  5402. var div = elt('div');
  5403. return "draggable" in div || "dragDrop" in div
  5404. }();
  5405. var zwspSupported;
  5406. function zeroWidthElement(measure) {
  5407. if (zwspSupported == null) {
  5408. var test = elt("span", "\u200b");
  5409. removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
  5410. if (measure.firstChild.offsetHeight != 0)
  5411. { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }
  5412. }
  5413. var node = zwspSupported ? elt("span", "\u200b") :
  5414. elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
  5415. node.setAttribute("cm-text", "");
  5416. return node
  5417. }
  5418. // Feature-detect IE's crummy client rect reporting for bidi text
  5419. var badBidiRects;
  5420. function hasBadBidiRects(measure) {
  5421. if (badBidiRects != null) { return badBidiRects }
  5422. var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
  5423. var r0 = range(txt, 0, 1).getBoundingClientRect();
  5424. var r1 = range(txt, 1, 2).getBoundingClientRect();
  5425. removeChildren(measure);
  5426. if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
  5427. return badBidiRects = (r1.right - r0.right < 3)
  5428. }
  5429. // See if "".split is the broken IE version, if so, provide an
  5430. // alternative way to split lines.
  5431. var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
  5432. var pos = 0, result = [], l = string.length;
  5433. while (pos <= l) {
  5434. var nl = string.indexOf("\n", pos);
  5435. if (nl == -1) { nl = string.length; }
  5436. var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
  5437. var rt = line.indexOf("\r");
  5438. if (rt != -1) {
  5439. result.push(line.slice(0, rt));
  5440. pos += rt + 1;
  5441. } else {
  5442. result.push(line);
  5443. pos = nl + 1;
  5444. }
  5445. }
  5446. return result
  5447. } : function (string) { return string.split(/\r\n?|\n/); };
  5448. var hasSelection = window.getSelection ? function (te) {
  5449. try { return te.selectionStart != te.selectionEnd }
  5450. catch(e) { return false }
  5451. } : function (te) {
  5452. var range;
  5453. try {range = te.ownerDocument.selection.createRange();}
  5454. catch(e) {}
  5455. if (!range || range.parentElement() != te) { return false }
  5456. return range.compareEndPoints("StartToEnd", range) != 0
  5457. };
  5458. var hasCopyEvent = (function () {
  5459. var e = elt("div");
  5460. if ("oncopy" in e) { return true }
  5461. e.setAttribute("oncopy", "return;");
  5462. return typeof e.oncopy == "function"
  5463. })();
  5464. var badZoomedRects = null;
  5465. function hasBadZoomedRects(measure) {
  5466. if (badZoomedRects != null) { return badZoomedRects }
  5467. var node = removeChildrenAndAdd(measure, elt("span", "x"));
  5468. var normal = node.getBoundingClientRect();
  5469. var fromRange = range(node, 0, 1).getBoundingClientRect();
  5470. return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
  5471. }
  5472. // Known modes, by name and by MIME
  5473. var modes = {}, mimeModes = {};
  5474. // Extra arguments are stored as the mode's dependencies, which is
  5475. // used by (legacy) mechanisms like loadmode.js to automatically
  5476. // load a mode. (Preferred mechanism is the require/define calls.)
  5477. function defineMode(name, mode) {
  5478. if (arguments.length > 2)
  5479. { mode.dependencies = Array.prototype.slice.call(arguments, 2); }
  5480. modes[name] = mode;
  5481. }
  5482. function defineMIME(mime, spec) {
  5483. mimeModes[mime] = spec;
  5484. }
  5485. // Given a MIME type, a {name, ...options} config object, or a name
  5486. // string, return a mode config object.
  5487. function resolveMode(spec) {
  5488. if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
  5489. spec = mimeModes[spec];
  5490. } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
  5491. var found = mimeModes[spec.name];
  5492. if (typeof found == "string") { found = {name: found}; }
  5493. spec = createObj(found, spec);
  5494. spec.name = found.name;
  5495. } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
  5496. return resolveMode("application/xml")
  5497. } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
  5498. return resolveMode("application/json")
  5499. }
  5500. if (typeof spec == "string") { return {name: spec} }
  5501. else { return spec || {name: "null"} }
  5502. }
  5503. // Given a mode spec (anything that resolveMode accepts), find and
  5504. // initialize an actual mode object.
  5505. function getMode(options, spec) {
  5506. spec = resolveMode(spec);
  5507. var mfactory = modes[spec.name];
  5508. if (!mfactory) { return getMode(options, "text/plain") }
  5509. var modeObj = mfactory(options, spec);
  5510. if (modeExtensions.hasOwnProperty(spec.name)) {
  5511. var exts = modeExtensions[spec.name];
  5512. for (var prop in exts) {
  5513. if (!exts.hasOwnProperty(prop)) { continue }
  5514. if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
  5515. modeObj[prop] = exts[prop];
  5516. }
  5517. }
  5518. modeObj.name = spec.name;
  5519. if (spec.helperType) { modeObj.helperType = spec.helperType; }
  5520. if (spec.modeProps) { for (var prop$1 in spec.modeProps)
  5521. { modeObj[prop$1] = spec.modeProps[prop$1]; } }
  5522. return modeObj
  5523. }
  5524. // This can be used to attach properties to mode objects from
  5525. // outside the actual mode definition.
  5526. var modeExtensions = {};
  5527. function extendMode(mode, properties) {
  5528. var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
  5529. copyObj(properties, exts);
  5530. }
  5531. function copyState(mode, state) {
  5532. if (state === true) { return state }
  5533. if (mode.copyState) { return mode.copyState(state) }
  5534. var nstate = {};
  5535. for (var n in state) {
  5536. var val = state[n];
  5537. if (val instanceof Array) { val = val.concat([]); }
  5538. nstate[n] = val;
  5539. }
  5540. return nstate
  5541. }
  5542. // Given a mode and a state (for that mode), find the inner mode and
  5543. // state at the position that the state refers to.
  5544. function innerMode(mode, state) {
  5545. var info;
  5546. while (mode.innerMode) {
  5547. info = mode.innerMode(state);
  5548. if (!info || info.mode == mode) { break }
  5549. state = info.state;
  5550. mode = info.mode;
  5551. }
  5552. return info || {mode: mode, state: state}
  5553. }
  5554. function startState(mode, a1, a2) {
  5555. return mode.startState ? mode.startState(a1, a2) : true
  5556. }
  5557. // STRING STREAM
  5558. // Fed to the mode parsers, provides helper functions to make
  5559. // parsers more succinct.
  5560. var StringStream = function(string, tabSize, lineOracle) {
  5561. this.pos = this.start = 0;
  5562. this.string = string;
  5563. this.tabSize = tabSize || 8;
  5564. this.lastColumnPos = this.lastColumnValue = 0;
  5565. this.lineStart = 0;
  5566. this.lineOracle = lineOracle;
  5567. };
  5568. StringStream.prototype.eol = function () {return this.pos >= this.string.length};
  5569. StringStream.prototype.sol = function () {return this.pos == this.lineStart};
  5570. StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};
  5571. StringStream.prototype.next = function () {
  5572. if (this.pos < this.string.length)
  5573. { return this.string.charAt(this.pos++) }
  5574. };
  5575. StringStream.prototype.eat = function (match) {
  5576. var ch = this.string.charAt(this.pos);
  5577. var ok;
  5578. if (typeof match == "string") { ok = ch == match; }
  5579. else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
  5580. if (ok) {++this.pos; return ch}
  5581. };
  5582. StringStream.prototype.eatWhile = function (match) {
  5583. var start = this.pos;
  5584. while (this.eat(match)){}
  5585. return this.pos > start
  5586. };
  5587. StringStream.prototype.eatSpace = function () {
  5588. var start = this.pos;
  5589. while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }
  5590. return this.pos > start
  5591. };
  5592. StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
  5593. StringStream.prototype.skipTo = function (ch) {
  5594. var found = this.string.indexOf(ch, this.pos);
  5595. if (found > -1) {this.pos = found; return true}
  5596. };
  5597. StringStream.prototype.backUp = function (n) {this.pos -= n;};
  5598. StringStream.prototype.column = function () {
  5599. if (this.lastColumnPos < this.start) {
  5600. this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
  5601. this.lastColumnPos = this.start;
  5602. }
  5603. return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
  5604. };
  5605. StringStream.prototype.indentation = function () {
  5606. return countColumn(this.string, null, this.tabSize) -
  5607. (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
  5608. };
  5609. StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
  5610. if (typeof pattern == "string") {
  5611. var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
  5612. var substr = this.string.substr(this.pos, pattern.length);
  5613. if (cased(substr) == cased(pattern)) {
  5614. if (consume !== false) { this.pos += pattern.length; }
  5615. return true
  5616. }
  5617. } else {
  5618. var match = this.string.slice(this.pos).match(pattern);
  5619. if (match && match.index > 0) { return null }
  5620. if (match && consume !== false) { this.pos += match[0].length; }
  5621. return match
  5622. }
  5623. };
  5624. StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
  5625. StringStream.prototype.hideFirstChars = function (n, inner) {
  5626. this.lineStart += n;
  5627. try { return inner() }
  5628. finally { this.lineStart -= n; }
  5629. };
  5630. StringStream.prototype.lookAhead = function (n) {
  5631. var oracle = this.lineOracle;
  5632. return oracle && oracle.lookAhead(n)
  5633. };
  5634. StringStream.prototype.baseToken = function () {
  5635. var oracle = this.lineOracle;
  5636. return oracle && oracle.baseToken(this.pos)
  5637. };
  5638. // Find the line object corresponding to the given line number.
  5639. function getLine(doc, n) {
  5640. n -= doc.first;
  5641. if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
  5642. var chunk = doc;
  5643. while (!chunk.lines) {
  5644. for (var i = 0;; ++i) {
  5645. var child = chunk.children[i], sz = child.chunkSize();
  5646. if (n < sz) { chunk = child; break }
  5647. n -= sz;
  5648. }
  5649. }
  5650. return chunk.lines[n]
  5651. }
  5652. // Get the part of a document between two positions, as an array of
  5653. // strings.
  5654. function getBetween(doc, start, end) {
  5655. var out = [], n = start.line;
  5656. doc.iter(start.line, end.line + 1, function (line) {
  5657. var text = line.text;
  5658. if (n == end.line) { text = text.slice(0, end.ch); }
  5659. if (n == start.line) { text = text.slice(start.ch); }
  5660. out.push(text);
  5661. ++n;
  5662. });
  5663. return out
  5664. }
  5665. // Get the lines between from and to, as array of strings.
  5666. function getLines(doc, from, to) {
  5667. var out = [];
  5668. doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value
  5669. return out
  5670. }
  5671. // Update the height of a line, propagating the height change
  5672. // upwards to parent nodes.
  5673. function updateLineHeight(line, height) {
  5674. var diff = height - line.height;
  5675. if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }
  5676. }
  5677. // Given a line object, find its line number by walking up through
  5678. // its parent links.
  5679. function lineNo(line) {
  5680. if (line.parent == null) { return null }
  5681. var cur = line.parent, no = indexOf(cur.lines, line);
  5682. for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
  5683. for (var i = 0;; ++i) {
  5684. if (chunk.children[i] == cur) { break }
  5685. no += chunk.children[i].chunkSize();
  5686. }
  5687. }
  5688. return no + cur.first
  5689. }
  5690. // Find the line at the given vertical position, using the height
  5691. // information in the document tree.
  5692. function lineAtHeight(chunk, h) {
  5693. var n = chunk.first;
  5694. outer: do {
  5695. for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
  5696. var child = chunk.children[i$1], ch = child.height;
  5697. if (h < ch) { chunk = child; continue outer }
  5698. h -= ch;
  5699. n += child.chunkSize();
  5700. }
  5701. return n
  5702. } while (!chunk.lines)
  5703. var i = 0;
  5704. for (; i < chunk.lines.length; ++i) {
  5705. var line = chunk.lines[i], lh = line.height;
  5706. if (h < lh) { break }
  5707. h -= lh;
  5708. }
  5709. return n + i
  5710. }
  5711. function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}
  5712. function lineNumberFor(options, i) {
  5713. return String(options.lineNumberFormatter(i + options.firstLineNumber))
  5714. }
  5715. // A Pos instance represents a position within the text.
  5716. function Pos(line, ch, sticky) {
  5717. if ( sticky === void 0 ) sticky = null;
  5718. if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
  5719. this.line = line;
  5720. this.ch = ch;
  5721. this.sticky = sticky;
  5722. }
  5723. // Compare two positions, return 0 if they are the same, a negative
  5724. // number when a is less, and a positive number otherwise.
  5725. function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
  5726. function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }
  5727. function copyPos(x) {return Pos(x.line, x.ch)}
  5728. function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }
  5729. function minPos(a, b) { return cmp(a, b) < 0 ? a : b }
  5730. // Most of the external API clips given positions to make sure they
  5731. // actually exist within the document.
  5732. function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
  5733. function clipPos(doc, pos) {
  5734. if (pos.line < doc.first) { return Pos(doc.first, 0) }
  5735. var last = doc.first + doc.size - 1;
  5736. if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
  5737. return clipToLen(pos, getLine(doc, pos.line).text.length)
  5738. }
  5739. function clipToLen(pos, linelen) {
  5740. var ch = pos.ch;
  5741. if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
  5742. else if (ch < 0) { return Pos(pos.line, 0) }
  5743. else { return pos }
  5744. }
  5745. function clipPosArray(doc, array) {
  5746. var out = [];
  5747. for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }
  5748. return out
  5749. }
  5750. var SavedContext = function(state, lookAhead) {
  5751. this.state = state;
  5752. this.lookAhead = lookAhead;
  5753. };
  5754. var Context = function(doc, state, line, lookAhead) {
  5755. this.state = state;
  5756. this.doc = doc;
  5757. this.line = line;
  5758. this.maxLookAhead = lookAhead || 0;
  5759. this.baseTokens = null;
  5760. this.baseTokenPos = 1;
  5761. };
  5762. Context.prototype.lookAhead = function (n) {
  5763. var line = this.doc.getLine(this.line + n);
  5764. if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }
  5765. return line
  5766. };
  5767. Context.prototype.baseToken = function (n) {
  5768. if (!this.baseTokens) { return null }
  5769. while (this.baseTokens[this.baseTokenPos] <= n)
  5770. { this.baseTokenPos += 2; }
  5771. var type = this.baseTokens[this.baseTokenPos + 1];
  5772. return {type: type && type.replace(/( |^)overlay .*/, ""),
  5773. size: this.baseTokens[this.baseTokenPos] - n}
  5774. };
  5775. Context.prototype.nextLine = function () {
  5776. this.line++;
  5777. if (this.maxLookAhead > 0) { this.maxLookAhead--; }
  5778. };
  5779. Context.fromSaved = function (doc, saved, line) {
  5780. if (saved instanceof SavedContext)
  5781. { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }
  5782. else
  5783. { return new Context(doc, copyState(doc.mode, saved), line) }
  5784. };
  5785. Context.prototype.save = function (copy) {
  5786. var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;
  5787. return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state
  5788. };
  5789. // Compute a style array (an array starting with a mode generation
  5790. // -- for invalidation -- followed by pairs of end positions and
  5791. // style strings), which is used to highlight the tokens on the
  5792. // line.
  5793. function highlightLine(cm, line, context, forceToEnd) {
  5794. // A styles array always starts with a number identifying the
  5795. // mode/overlays that it is based on (for easy invalidation).
  5796. var st = [cm.state.modeGen], lineClasses = {};
  5797. // Compute the base array of styles
  5798. runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },
  5799. lineClasses, forceToEnd);
  5800. var state = context.state;
  5801. // Run overlays, adjust style array.
  5802. var loop = function ( o ) {
  5803. context.baseTokens = st;
  5804. var overlay = cm.state.overlays[o], i = 1, at = 0;
  5805. context.state = true;
  5806. runMode(cm, line.text, overlay.mode, context, function (end, style) {
  5807. var start = i;
  5808. // Ensure there's a token end at the current position, and that i points at it
  5809. while (at < end) {
  5810. var i_end = st[i];
  5811. if (i_end > end)
  5812. { st.splice(i, 1, end, st[i+1], i_end); }
  5813. i += 2;
  5814. at = Math.min(end, i_end);
  5815. }
  5816. if (!style) { return }
  5817. if (overlay.opaque) {
  5818. st.splice(start, i - start, end, "overlay " + style);
  5819. i = start + 2;
  5820. } else {
  5821. for (; start < i; start += 2) {
  5822. var cur = st[start+1];
  5823. st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
  5824. }
  5825. }
  5826. }, lineClasses);
  5827. context.state = state;
  5828. context.baseTokens = null;
  5829. context.baseTokenPos = 1;
  5830. };
  5831. for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
  5832. return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}
  5833. }
  5834. function getLineStyles(cm, line, updateFrontier) {
  5835. if (!line.styles || line.styles[0] != cm.state.modeGen) {
  5836. var context = getContextBefore(cm, lineNo(line));
  5837. var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);
  5838. var result = highlightLine(cm, line, context);
  5839. if (resetState) { context.state = resetState; }
  5840. line.stateAfter = context.save(!resetState);
  5841. line.styles = result.styles;
  5842. if (result.classes) { line.styleClasses = result.classes; }
  5843. else if (line.styleClasses) { line.styleClasses = null; }
  5844. if (updateFrontier === cm.doc.highlightFrontier)
  5845. { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }
  5846. }
  5847. return line.styles
  5848. }
  5849. function getContextBefore(cm, n, precise) {
  5850. var doc = cm.doc, display = cm.display;
  5851. if (!doc.mode.startState) { return new Context(doc, true, n) }
  5852. var start = findStartLine(cm, n, precise);
  5853. var saved = start > doc.first && getLine(doc, start - 1).stateAfter;
  5854. var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);
  5855. doc.iter(start, n, function (line) {
  5856. processLine(cm, line.text, context);
  5857. var pos = context.line;
  5858. line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;
  5859. context.nextLine();
  5860. });
  5861. if (precise) { doc.modeFrontier = context.line; }
  5862. return context
  5863. }
  5864. // Lightweight form of highlight -- proceed over this line and
  5865. // update state, but don't save a style array. Used for lines that
  5866. // aren't currently visible.
  5867. function processLine(cm, text, context, startAt) {
  5868. var mode = cm.doc.mode;
  5869. var stream = new StringStream(text, cm.options.tabSize, context);
  5870. stream.start = stream.pos = startAt || 0;
  5871. if (text == "") { callBlankLine(mode, context.state); }
  5872. while (!stream.eol()) {
  5873. readToken(mode, stream, context.state);
  5874. stream.start = stream.pos;
  5875. }
  5876. }
  5877. function callBlankLine(mode, state) {
  5878. if (mode.blankLine) { return mode.blankLine(state) }
  5879. if (!mode.innerMode) { return }
  5880. var inner = innerMode(mode, state);
  5881. if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
  5882. }
  5883. function readToken(mode, stream, state, inner) {
  5884. for (var i = 0; i < 10; i++) {
  5885. if (inner) { inner[0] = innerMode(mode, state).mode; }
  5886. var style = mode.token(stream, state);
  5887. if (stream.pos > stream.start) { return style }
  5888. }
  5889. throw new Error("Mode " + mode.name + " failed to advance stream.")
  5890. }
  5891. var Token = function(stream, type, state) {
  5892. this.start = stream.start; this.end = stream.pos;
  5893. this.string = stream.current();
  5894. this.type = type || null;
  5895. this.state = state;
  5896. };
  5897. // Utility for getTokenAt and getLineTokens
  5898. function takeToken(cm, pos, precise, asArray) {
  5899. var doc = cm.doc, mode = doc.mode, style;
  5900. pos = clipPos(doc, pos);
  5901. var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);
  5902. var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;
  5903. if (asArray) { tokens = []; }
  5904. while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
  5905. stream.start = stream.pos;
  5906. style = readToken(mode, stream, context.state);
  5907. if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }
  5908. }
  5909. return asArray ? tokens : new Token(stream, style, context.state)
  5910. }
  5911. function extractLineClasses(type, output) {
  5912. if (type) { for (;;) {
  5913. var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
  5914. if (!lineClass) { break }
  5915. type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
  5916. var prop = lineClass[1] ? "bgClass" : "textClass";
  5917. if (output[prop] == null)
  5918. { output[prop] = lineClass[2]; }
  5919. else if (!(new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)")).test(output[prop]))
  5920. { output[prop] += " " + lineClass[2]; }
  5921. } }
  5922. return type
  5923. }
  5924. // Run the given mode's parser over a line, calling f for each token.
  5925. function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
  5926. var flattenSpans = mode.flattenSpans;
  5927. if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }
  5928. var curStart = 0, curStyle = null;
  5929. var stream = new StringStream(text, cm.options.tabSize, context), style;
  5930. var inner = cm.options.addModeClass && [null];
  5931. if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }
  5932. while (!stream.eol()) {
  5933. if (stream.pos > cm.options.maxHighlightLength) {
  5934. flattenSpans = false;
  5935. if (forceToEnd) { processLine(cm, text, context, stream.pos); }
  5936. stream.pos = text.length;
  5937. style = null;
  5938. } else {
  5939. style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);
  5940. }
  5941. if (inner) {
  5942. var mName = inner[0].name;
  5943. if (mName) { style = "m-" + (style ? mName + " " + style : mName); }
  5944. }
  5945. if (!flattenSpans || curStyle != style) {
  5946. while (curStart < stream.start) {
  5947. curStart = Math.min(stream.start, curStart + 5000);
  5948. f(curStart, curStyle);
  5949. }
  5950. curStyle = style;
  5951. }
  5952. stream.start = stream.pos;
  5953. }
  5954. while (curStart < stream.pos) {
  5955. // Webkit seems to refuse to render text nodes longer than 57444
  5956. // characters, and returns inaccurate measurements in nodes
  5957. // starting around 5000 chars.
  5958. var pos = Math.min(stream.pos, curStart + 5000);
  5959. f(pos, curStyle);
  5960. curStart = pos;
  5961. }
  5962. }
  5963. // Finds the line to start with when starting a parse. Tries to
  5964. // find a line with a stateAfter, so that it can start with a
  5965. // valid state. If that fails, it returns the line with the
  5966. // smallest indentation, which tends to need the least context to
  5967. // parse correctly.
  5968. function findStartLine(cm, n, precise) {
  5969. var minindent, minline, doc = cm.doc;
  5970. var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
  5971. for (var search = n; search > lim; --search) {
  5972. if (search <= doc.first) { return doc.first }
  5973. var line = getLine(doc, search - 1), after = line.stateAfter;
  5974. if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))
  5975. { return search }
  5976. var indented = countColumn(line.text, null, cm.options.tabSize);
  5977. if (minline == null || minindent > indented) {
  5978. minline = search - 1;
  5979. minindent = indented;
  5980. }
  5981. }
  5982. return minline
  5983. }
  5984. function retreatFrontier(doc, n) {
  5985. doc.modeFrontier = Math.min(doc.modeFrontier, n);
  5986. if (doc.highlightFrontier < n - 10) { return }
  5987. var start = doc.first;
  5988. for (var line = n - 1; line > start; line--) {
  5989. var saved = getLine(doc, line).stateAfter;
  5990. // change is on 3
  5991. // state on line 1 looked ahead 2 -- so saw 3
  5992. // test 1 + 2 < 3 should cover this
  5993. if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {
  5994. start = line + 1;
  5995. break
  5996. }
  5997. }
  5998. doc.highlightFrontier = Math.min(doc.highlightFrontier, start);
  5999. }
  6000. // Optimize some code when these features are not used.
  6001. var sawReadOnlySpans = false, sawCollapsedSpans = false;
  6002. function seeReadOnlySpans() {
  6003. sawReadOnlySpans = true;
  6004. }
  6005. function seeCollapsedSpans() {
  6006. sawCollapsedSpans = true;
  6007. }
  6008. // TEXTMARKER SPANS
  6009. function MarkedSpan(marker, from, to) {
  6010. this.marker = marker;
  6011. this.from = from; this.to = to;
  6012. }
  6013. // Search an array of spans for a span matching the given marker.
  6014. function getMarkedSpanFor(spans, marker) {
  6015. if (spans) { for (var i = 0; i < spans.length; ++i) {
  6016. var span = spans[i];
  6017. if (span.marker == marker) { return span }
  6018. } }
  6019. }
  6020. // Remove a span from an array, returning undefined if no spans are
  6021. // left (we don't store arrays for lines without spans).
  6022. function removeMarkedSpan(spans, span) {
  6023. var r;
  6024. for (var i = 0; i < spans.length; ++i)
  6025. { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
  6026. return r
  6027. }
  6028. // Add a span to a line.
  6029. function addMarkedSpan(line, span) {
  6030. line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
  6031. span.marker.attachLine(line);
  6032. }
  6033. // Used for the algorithm that adjusts markers for a change in the
  6034. // document. These functions cut an array of spans at a given
  6035. // character position, returning an array of remaining chunks (or
  6036. // undefined if nothing remains).
  6037. function markedSpansBefore(old, startCh, isInsert) {
  6038. var nw;
  6039. if (old) { for (var i = 0; i < old.length; ++i) {
  6040. var span = old[i], marker = span.marker;
  6041. var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
  6042. if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
  6043. var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
  6044. ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
  6045. }
  6046. } }
  6047. return nw
  6048. }
  6049. function markedSpansAfter(old, endCh, isInsert) {
  6050. var nw;
  6051. if (old) { for (var i = 0; i < old.length; ++i) {
  6052. var span = old[i], marker = span.marker;
  6053. var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
  6054. if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
  6055. var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
  6056. ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
  6057. span.to == null ? null : span.to - endCh));
  6058. }
  6059. } }
  6060. return nw
  6061. }
  6062. // Given a change object, compute the new set of marker spans that
  6063. // cover the line in which the change took place. Removes spans
  6064. // entirely within the change, reconnects spans belonging to the
  6065. // same marker that appear on both sides of the change, and cuts off
  6066. // spans partially within the change. Returns an array of span
  6067. // arrays with one element for each line in (after) the change.
  6068. function stretchSpansOverChange(doc, change) {
  6069. if (change.full) { return null }
  6070. var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
  6071. var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
  6072. if (!oldFirst && !oldLast) { return null }
  6073. var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
  6074. // Get the spans that 'stick out' on both sides
  6075. var first = markedSpansBefore(oldFirst, startCh, isInsert);
  6076. var last = markedSpansAfter(oldLast, endCh, isInsert);
  6077. // Next, merge those two ends
  6078. var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
  6079. if (first) {
  6080. // Fix up .to properties of first
  6081. for (var i = 0; i < first.length; ++i) {
  6082. var span = first[i];
  6083. if (span.to == null) {
  6084. var found = getMarkedSpanFor(last, span.marker);
  6085. if (!found) { span.to = startCh; }
  6086. else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }
  6087. }
  6088. }
  6089. }
  6090. if (last) {
  6091. // Fix up .from in last (or move them into first in case of sameLine)
  6092. for (var i$1 = 0; i$1 < last.length; ++i$1) {
  6093. var span$1 = last[i$1];
  6094. if (span$1.to != null) { span$1.to += offset; }
  6095. if (span$1.from == null) {
  6096. var found$1 = getMarkedSpanFor(first, span$1.marker);
  6097. if (!found$1) {
  6098. span$1.from = offset;
  6099. if (sameLine) { (first || (first = [])).push(span$1); }
  6100. }
  6101. } else {
  6102. span$1.from += offset;
  6103. if (sameLine) { (first || (first = [])).push(span$1); }
  6104. }
  6105. }
  6106. }
  6107. // Make sure we didn't create any zero-length spans
  6108. if (first) { first = clearEmptySpans(first); }
  6109. if (last && last != first) { last = clearEmptySpans(last); }
  6110. var newMarkers = [first];
  6111. if (!sameLine) {
  6112. // Fill gap with whole-line-spans
  6113. var gap = change.text.length - 2, gapMarkers;
  6114. if (gap > 0 && first)
  6115. { for (var i$2 = 0; i$2 < first.length; ++i$2)
  6116. { if (first[i$2].to == null)
  6117. { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }
  6118. for (var i$3 = 0; i$3 < gap; ++i$3)
  6119. { newMarkers.push(gapMarkers); }
  6120. newMarkers.push(last);
  6121. }
  6122. return newMarkers
  6123. }
  6124. // Remove spans that are empty and don't have a clearWhenEmpty
  6125. // option of false.
  6126. function clearEmptySpans(spans) {
  6127. for (var i = 0; i < spans.length; ++i) {
  6128. var span = spans[i];
  6129. if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
  6130. { spans.splice(i--, 1); }
  6131. }
  6132. if (!spans.length) { return null }
  6133. return spans
  6134. }
  6135. // Used to 'clip' out readOnly ranges when making a change.
  6136. function removeReadOnlyRanges(doc, from, to) {
  6137. var markers = null;
  6138. doc.iter(from.line, to.line + 1, function (line) {
  6139. if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
  6140. var mark = line.markedSpans[i].marker;
  6141. if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
  6142. { (markers || (markers = [])).push(mark); }
  6143. } }
  6144. });
  6145. if (!markers) { return null }
  6146. var parts = [{from: from, to: to}];
  6147. for (var i = 0; i < markers.length; ++i) {
  6148. var mk = markers[i], m = mk.find(0);
  6149. for (var j = 0; j < parts.length; ++j) {
  6150. var p = parts[j];
  6151. if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
  6152. var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
  6153. if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
  6154. { newParts.push({from: p.from, to: m.from}); }
  6155. if (dto > 0 || !mk.inclusiveRight && !dto)
  6156. { newParts.push({from: m.to, to: p.to}); }
  6157. parts.splice.apply(parts, newParts);
  6158. j += newParts.length - 3;
  6159. }
  6160. }
  6161. return parts
  6162. }
  6163. // Connect or disconnect spans from a line.
  6164. function detachMarkedSpans(line) {
  6165. var spans = line.markedSpans;
  6166. if (!spans) { return }
  6167. for (var i = 0; i < spans.length; ++i)
  6168. { spans[i].marker.detachLine(line); }
  6169. line.markedSpans = null;
  6170. }
  6171. function attachMarkedSpans(line, spans) {
  6172. if (!spans) { return }
  6173. for (var i = 0; i < spans.length; ++i)
  6174. { spans[i].marker.attachLine(line); }
  6175. line.markedSpans = spans;
  6176. }
  6177. // Helpers used when computing which overlapping collapsed span
  6178. // counts as the larger one.
  6179. function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
  6180. function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }
  6181. // Returns a number indicating which of two overlapping collapsed
  6182. // spans is larger (and thus includes the other). Falls back to
  6183. // comparing ids when the spans cover exactly the same range.
  6184. function compareCollapsedMarkers(a, b) {
  6185. var lenDiff = a.lines.length - b.lines.length;
  6186. if (lenDiff != 0) { return lenDiff }
  6187. var aPos = a.find(), bPos = b.find();
  6188. var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
  6189. if (fromCmp) { return -fromCmp }
  6190. var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
  6191. if (toCmp) { return toCmp }
  6192. return b.id - a.id
  6193. }
  6194. // Find out whether a line ends or starts in a collapsed span. If
  6195. // so, return the marker for that span.
  6196. function collapsedSpanAtSide(line, start) {
  6197. var sps = sawCollapsedSpans && line.markedSpans, found;
  6198. if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
  6199. sp = sps[i];
  6200. if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
  6201. (!found || compareCollapsedMarkers(found, sp.marker) < 0))
  6202. { found = sp.marker; }
  6203. } }
  6204. return found
  6205. }
  6206. function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
  6207. function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
  6208. function collapsedSpanAround(line, ch) {
  6209. var sps = sawCollapsedSpans && line.markedSpans, found;
  6210. if (sps) { for (var i = 0; i < sps.length; ++i) {
  6211. var sp = sps[i];
  6212. if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
  6213. (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
  6214. } }
  6215. return found
  6216. }
  6217. // Test whether there exists a collapsed span that partially
  6218. // overlaps (covers the start or end, but not both) of a new span.
  6219. // Such overlap is not allowed.
  6220. function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
  6221. var line = getLine(doc, lineNo);
  6222. var sps = sawCollapsedSpans && line.markedSpans;
  6223. if (sps) { for (var i = 0; i < sps.length; ++i) {
  6224. var sp = sps[i];
  6225. if (!sp.marker.collapsed) { continue }
  6226. var found = sp.marker.find(0);
  6227. var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
  6228. var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
  6229. if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
  6230. if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
  6231. fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
  6232. { return true }
  6233. } }
  6234. }
  6235. // A visual line is a line as drawn on the screen. Folding, for
  6236. // example, can cause multiple logical lines to appear on the same
  6237. // visual line. This finds the start of the visual line that the
  6238. // given line is part of (usually that is the line itself).
  6239. function visualLine(line) {
  6240. var merged;
  6241. while (merged = collapsedSpanAtStart(line))
  6242. { line = merged.find(-1, true).line; }
  6243. return line
  6244. }
  6245. function visualLineEnd(line) {
  6246. var merged;
  6247. while (merged = collapsedSpanAtEnd(line))
  6248. { line = merged.find(1, true).line; }
  6249. return line
  6250. }
  6251. // Returns an array of logical lines that continue the visual line
  6252. // started by the argument, or undefined if there are no such lines.
  6253. function visualLineContinued(line) {
  6254. var merged, lines;
  6255. while (merged = collapsedSpanAtEnd(line)) {
  6256. line = merged.find(1, true).line
  6257. ;(lines || (lines = [])).push(line);
  6258. }
  6259. return lines
  6260. }
  6261. // Get the line number of the start of the visual line that the
  6262. // given line number is part of.
  6263. function visualLineNo(doc, lineN) {
  6264. var line = getLine(doc, lineN), vis = visualLine(line);
  6265. if (line == vis) { return lineN }
  6266. return lineNo(vis)
  6267. }
  6268. // Get the line number of the start of the next visual line after
  6269. // the given line.
  6270. function visualLineEndNo(doc, lineN) {
  6271. if (lineN > doc.lastLine()) { return lineN }
  6272. var line = getLine(doc, lineN), merged;
  6273. if (!lineIsHidden(doc, line)) { return lineN }
  6274. while (merged = collapsedSpanAtEnd(line))
  6275. { line = merged.find(1, true).line; }
  6276. return lineNo(line) + 1
  6277. }
  6278. // Compute whether a line is hidden. Lines count as hidden when they
  6279. // are part of a visual line that starts with another line, or when
  6280. // they are entirely covered by collapsed, non-widget span.
  6281. function lineIsHidden(doc, line) {
  6282. var sps = sawCollapsedSpans && line.markedSpans;
  6283. if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
  6284. sp = sps[i];
  6285. if (!sp.marker.collapsed) { continue }
  6286. if (sp.from == null) { return true }
  6287. if (sp.marker.widgetNode) { continue }
  6288. if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
  6289. { return true }
  6290. } }
  6291. }
  6292. function lineIsHiddenInner(doc, line, span) {
  6293. if (span.to == null) {
  6294. var end = span.marker.find(1, true);
  6295. return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
  6296. }
  6297. if (span.marker.inclusiveRight && span.to == line.text.length)
  6298. { return true }
  6299. for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
  6300. sp = line.markedSpans[i];
  6301. if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
  6302. (sp.to == null || sp.to != span.from) &&
  6303. (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
  6304. lineIsHiddenInner(doc, line, sp)) { return true }
  6305. }
  6306. }
  6307. // Find the height above the given line.
  6308. function heightAtLine(lineObj) {
  6309. lineObj = visualLine(lineObj);
  6310. var h = 0, chunk = lineObj.parent;
  6311. for (var i = 0; i < chunk.lines.length; ++i) {
  6312. var line = chunk.lines[i];
  6313. if (line == lineObj) { break }
  6314. else { h += line.height; }
  6315. }
  6316. for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
  6317. for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
  6318. var cur = p.children[i$1];
  6319. if (cur == chunk) { break }
  6320. else { h += cur.height; }
  6321. }
  6322. }
  6323. return h
  6324. }
  6325. // Compute the character length of a line, taking into account
  6326. // collapsed ranges (see markText) that might hide parts, and join
  6327. // other lines onto it.
  6328. function lineLength(line) {
  6329. if (line.height == 0) { return 0 }
  6330. var len = line.text.length, merged, cur = line;
  6331. while (merged = collapsedSpanAtStart(cur)) {
  6332. var found = merged.find(0, true);
  6333. cur = found.from.line;
  6334. len += found.from.ch - found.to.ch;
  6335. }
  6336. cur = line;
  6337. while (merged = collapsedSpanAtEnd(cur)) {
  6338. var found$1 = merged.find(0, true);
  6339. len -= cur.text.length - found$1.from.ch;
  6340. cur = found$1.to.line;
  6341. len += cur.text.length - found$1.to.ch;
  6342. }
  6343. return len
  6344. }
  6345. // Find the longest line in the document.
  6346. function findMaxLine(cm) {
  6347. var d = cm.display, doc = cm.doc;
  6348. d.maxLine = getLine(doc, doc.first);
  6349. d.maxLineLength = lineLength(d.maxLine);
  6350. d.maxLineChanged = true;
  6351. doc.iter(function (line) {
  6352. var len = lineLength(line);
  6353. if (len > d.maxLineLength) {
  6354. d.maxLineLength = len;
  6355. d.maxLine = line;
  6356. }
  6357. });
  6358. }
  6359. // LINE DATA STRUCTURE
  6360. // Line objects. These hold state related to a line, including
  6361. // highlighting info (the styles array).
  6362. var Line = function(text, markedSpans, estimateHeight) {
  6363. this.text = text;
  6364. attachMarkedSpans(this, markedSpans);
  6365. this.height = estimateHeight ? estimateHeight(this) : 1;
  6366. };
  6367. Line.prototype.lineNo = function () { return lineNo(this) };
  6368. eventMixin(Line);
  6369. // Change the content (text, markers) of a line. Automatically
  6370. // invalidates cached information and tries to re-estimate the
  6371. // line's height.
  6372. function updateLine(line, text, markedSpans, estimateHeight) {
  6373. line.text = text;
  6374. if (line.stateAfter) { line.stateAfter = null; }
  6375. if (line.styles) { line.styles = null; }
  6376. if (line.order != null) { line.order = null; }
  6377. detachMarkedSpans(line);
  6378. attachMarkedSpans(line, markedSpans);
  6379. var estHeight = estimateHeight ? estimateHeight(line) : 1;
  6380. if (estHeight != line.height) { updateLineHeight(line, estHeight); }
  6381. }
  6382. // Detach a line from the document tree and its markers.
  6383. function cleanUpLine(line) {
  6384. line.parent = null;
  6385. detachMarkedSpans(line);
  6386. }
  6387. // Convert a style as returned by a mode (either null, or a string
  6388. // containing one or more styles) to a CSS style. This is cached,
  6389. // and also looks for line-wide styles.
  6390. var styleToClassCache = {}, styleToClassCacheWithMode = {};
  6391. function interpretTokenStyle(style, options) {
  6392. if (!style || /^\s*$/.test(style)) { return null }
  6393. var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
  6394. return cache[style] ||
  6395. (cache[style] = style.replace(/\S+/g, "cm-$&"))
  6396. }
  6397. // Render the DOM representation of the text of a line. Also builds
  6398. // up a 'line map', which points at the DOM nodes that represent
  6399. // specific stretches of text, and is used by the measuring code.
  6400. // The returned object contains the DOM node, this map, and
  6401. // information about line-wide styles that were set by the mode.
  6402. function buildLineContent(cm, lineView) {
  6403. // The padding-right forces the element to have a 'border', which
  6404. // is needed on Webkit to be able to get line-level bounding
  6405. // rectangles for it (in measureChar).
  6406. var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
  6407. var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,
  6408. col: 0, pos: 0, cm: cm,
  6409. trailingSpace: false,
  6410. splitSpaces: cm.getOption("lineWrapping")};
  6411. lineView.measure = {};
  6412. // Iterate over the logical lines that make up this visual line.
  6413. for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
  6414. var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);
  6415. builder.pos = 0;
  6416. builder.addToken = buildToken;
  6417. // Optionally wire in some hacks into the token-rendering
  6418. // algorithm, to deal with browser quirks.
  6419. if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))
  6420. { builder.addToken = buildTokenBadBidi(builder.addToken, order); }
  6421. builder.map = [];
  6422. var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
  6423. insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
  6424. if (line.styleClasses) {
  6425. if (line.styleClasses.bgClass)
  6426. { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }
  6427. if (line.styleClasses.textClass)
  6428. { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }
  6429. }
  6430. // Ensure at least a single node is present, for measuring.
  6431. if (builder.map.length == 0)
  6432. { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }
  6433. // Store the map and a cache object for the current logical line
  6434. if (i == 0) {
  6435. lineView.measure.map = builder.map;
  6436. lineView.measure.cache = {};
  6437. } else {
  6438. (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
  6439. ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});
  6440. }
  6441. }
  6442. // See issue #2901
  6443. if (webkit) {
  6444. var last = builder.content.lastChild;
  6445. if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
  6446. { builder.content.className = "cm-tab-wrap-hack"; }
  6447. }
  6448. signal(cm, "renderLine", cm, lineView.line, builder.pre);
  6449. if (builder.pre.className)
  6450. { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }
  6451. return builder
  6452. }
  6453. function defaultSpecialCharPlaceholder(ch) {
  6454. var token = elt("span", "\u2022", "cm-invalidchar");
  6455. token.title = "\\u" + ch.charCodeAt(0).toString(16);
  6456. token.setAttribute("aria-label", token.title);
  6457. return token
  6458. }
  6459. // Build up the DOM representation for a single token, and add it to
  6460. // the line map. Takes care to render special characters separately.
  6461. function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {
  6462. if (!text) { return }
  6463. var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
  6464. var special = builder.cm.state.specialChars, mustWrap = false;
  6465. var content;
  6466. if (!special.test(text)) {
  6467. builder.col += text.length;
  6468. content = document.createTextNode(displayText);
  6469. builder.map.push(builder.pos, builder.pos + text.length, content);
  6470. if (ie && ie_version < 9) { mustWrap = true; }
  6471. builder.pos += text.length;
  6472. } else {
  6473. content = document.createDocumentFragment();
  6474. var pos = 0;
  6475. while (true) {
  6476. special.lastIndex = pos;
  6477. var m = special.exec(text);
  6478. var skipped = m ? m.index - pos : text.length - pos;
  6479. if (skipped) {
  6480. var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
  6481. if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }
  6482. else { content.appendChild(txt); }
  6483. builder.map.push(builder.pos, builder.pos + skipped, txt);
  6484. builder.col += skipped;
  6485. builder.pos += skipped;
  6486. }
  6487. if (!m) { break }
  6488. pos += skipped + 1;
  6489. var txt$1 = (void 0);
  6490. if (m[0] == "\t") {
  6491. var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
  6492. txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
  6493. txt$1.setAttribute("role", "presentation");
  6494. txt$1.setAttribute("cm-text", "\t");
  6495. builder.col += tabWidth;
  6496. } else if (m[0] == "\r" || m[0] == "\n") {
  6497. txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
  6498. txt$1.setAttribute("cm-text", m[0]);
  6499. builder.col += 1;
  6500. } else {
  6501. txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
  6502. txt$1.setAttribute("cm-text", m[0]);
  6503. if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }
  6504. else { content.appendChild(txt$1); }
  6505. builder.col += 1;
  6506. }
  6507. builder.map.push(builder.pos, builder.pos + 1, txt$1);
  6508. builder.pos++;
  6509. }
  6510. }
  6511. builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
  6512. if (style || startStyle || endStyle || mustWrap || css || attributes) {
  6513. var fullStyle = style || "";
  6514. if (startStyle) { fullStyle += startStyle; }
  6515. if (endStyle) { fullStyle += endStyle; }
  6516. var token = elt("span", [content], fullStyle, css);
  6517. if (attributes) {
  6518. for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class")
  6519. { token.setAttribute(attr, attributes[attr]); } }
  6520. }
  6521. return builder.content.appendChild(token)
  6522. }
  6523. builder.content.appendChild(content);
  6524. }
  6525. // Change some spaces to NBSP to prevent the browser from collapsing
  6526. // trailing spaces at the end of a line when rendering text (issue #1362).
  6527. function splitSpaces(text, trailingBefore) {
  6528. if (text.length > 1 && !/ /.test(text)) { return text }
  6529. var spaceBefore = trailingBefore, result = "";
  6530. for (var i = 0; i < text.length; i++) {
  6531. var ch = text.charAt(i);
  6532. if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
  6533. { ch = "\u00a0"; }
  6534. result += ch;
  6535. spaceBefore = ch == " ";
  6536. }
  6537. return result
  6538. }
  6539. // Work around nonsense dimensions being reported for stretches of
  6540. // right-to-left text.
  6541. function buildTokenBadBidi(inner, order) {
  6542. return function (builder, text, style, startStyle, endStyle, css, attributes) {
  6543. style = style ? style + " cm-force-border" : "cm-force-border";
  6544. var start = builder.pos, end = start + text.length;
  6545. for (;;) {
  6546. // Find the part that overlaps with the start of this text
  6547. var part = (void 0);
  6548. for (var i = 0; i < order.length; i++) {
  6549. part = order[i];
  6550. if (part.to > start && part.from <= start) { break }
  6551. }
  6552. if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }
  6553. inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);
  6554. startStyle = null;
  6555. text = text.slice(part.to - start);
  6556. start = part.to;
  6557. }
  6558. }
  6559. }
  6560. function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
  6561. var widget = !ignoreWidget && marker.widgetNode;
  6562. if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }
  6563. if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
  6564. if (!widget)
  6565. { widget = builder.content.appendChild(document.createElement("span")); }
  6566. widget.setAttribute("cm-marker", marker.id);
  6567. }
  6568. if (widget) {
  6569. builder.cm.display.input.setUneditable(widget);
  6570. builder.content.appendChild(widget);
  6571. }
  6572. builder.pos += size;
  6573. builder.trailingSpace = false;
  6574. }
  6575. // Outputs a number of spans to make up a line, taking highlighting
  6576. // and marked text into account.
  6577. function insertLineContent(line, builder, styles) {
  6578. var spans = line.markedSpans, allText = line.text, at = 0;
  6579. if (!spans) {
  6580. for (var i$1 = 1; i$1 < styles.length; i$1+=2)
  6581. { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }
  6582. return
  6583. }
  6584. var len = allText.length, pos = 0, i = 1, text = "", style, css;
  6585. var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;
  6586. for (;;) {
  6587. if (nextChange == pos) { // Update current marker set
  6588. spanStyle = spanEndStyle = spanStartStyle = css = "";
  6589. attributes = null;
  6590. collapsed = null; nextChange = Infinity;
  6591. var foundBookmarks = [], endStyles = (void 0);
  6592. for (var j = 0; j < spans.length; ++j) {
  6593. var sp = spans[j], m = sp.marker;
  6594. if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
  6595. foundBookmarks.push(m);
  6596. } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
  6597. if (sp.to != null && sp.to != pos && nextChange > sp.to) {
  6598. nextChange = sp.to;
  6599. spanEndStyle = "";
  6600. }
  6601. if (m.className) { spanStyle += " " + m.className; }
  6602. if (m.css) { css = (css ? css + ";" : "") + m.css; }
  6603. if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
  6604. if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
  6605. // support for the old title property
  6606. // https://github.com/codemirror/CodeMirror/pull/5673
  6607. if (m.title) { (attributes || (attributes = {})).title = m.title; }
  6608. if (m.attributes) {
  6609. for (var attr in m.attributes)
  6610. { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }
  6611. }
  6612. if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
  6613. { collapsed = sp; }
  6614. } else if (sp.from > pos && nextChange > sp.from) {
  6615. nextChange = sp.from;
  6616. }
  6617. }
  6618. if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
  6619. { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }
  6620. if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
  6621. { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }
  6622. if (collapsed && (collapsed.from || 0) == pos) {
  6623. buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
  6624. collapsed.marker, collapsed.from == null);
  6625. if (collapsed.to == null) { return }
  6626. if (collapsed.to == pos) { collapsed = false; }
  6627. }
  6628. }
  6629. if (pos >= len) { break }
  6630. var upto = Math.min(len, nextChange);
  6631. while (true) {
  6632. if (text) {
  6633. var end = pos + text.length;
  6634. if (!collapsed) {
  6635. var tokenText = end > upto ? text.slice(0, upto - pos) : text;
  6636. builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
  6637. spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);
  6638. }
  6639. if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
  6640. pos = end;
  6641. spanStartStyle = "";
  6642. }
  6643. text = allText.slice(at, at = styles[i++]);
  6644. style = interpretTokenStyle(styles[i++], builder.cm.options);
  6645. }
  6646. }
  6647. }
  6648. // These objects are used to represent the visible (currently drawn)
  6649. // part of the document. A LineView may correspond to multiple
  6650. // logical lines, if those are connected by collapsed ranges.
  6651. function LineView(doc, line, lineN) {
  6652. // The starting line
  6653. this.line = line;
  6654. // Continuing lines, if any
  6655. this.rest = visualLineContinued(line);
  6656. // Number of logical lines in this visual line
  6657. this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
  6658. this.node = this.text = null;
  6659. this.hidden = lineIsHidden(doc, line);
  6660. }
  6661. // Create a range of LineView objects for the given lines.
  6662. function buildViewArray(cm, from, to) {
  6663. var array = [], nextPos;
  6664. for (var pos = from; pos < to; pos = nextPos) {
  6665. var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
  6666. nextPos = pos + view.size;
  6667. array.push(view);
  6668. }
  6669. return array
  6670. }
  6671. var operationGroup = null;
  6672. function pushOperation(op) {
  6673. if (operationGroup) {
  6674. operationGroup.ops.push(op);
  6675. } else {
  6676. op.ownsGroup = operationGroup = {
  6677. ops: [op],
  6678. delayedCallbacks: []
  6679. };
  6680. }
  6681. }
  6682. function fireCallbacksForOps(group) {
  6683. // Calls delayed callbacks and cursorActivity handlers until no
  6684. // new ones appear
  6685. var callbacks = group.delayedCallbacks, i = 0;
  6686. do {
  6687. for (; i < callbacks.length; i++)
  6688. { callbacks[i].call(null); }
  6689. for (var j = 0; j < group.ops.length; j++) {
  6690. var op = group.ops[j];
  6691. if (op.cursorActivityHandlers)
  6692. { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
  6693. { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }
  6694. }
  6695. } while (i < callbacks.length)
  6696. }
  6697. function finishOperation(op, endCb) {
  6698. var group = op.ownsGroup;
  6699. if (!group) { return }
  6700. try { fireCallbacksForOps(group); }
  6701. finally {
  6702. operationGroup = null;
  6703. endCb(group);
  6704. }
  6705. }
  6706. var orphanDelayedCallbacks = null;
  6707. // Often, we want to signal events at a point where we are in the
  6708. // middle of some work, but don't want the handler to start calling
  6709. // other methods on the editor, which might be in an inconsistent
  6710. // state or simply not expect any other events to happen.
  6711. // signalLater looks whether there are any handlers, and schedules
  6712. // them to be executed when the last operation ends, or, if no
  6713. // operation is active, when a timeout fires.
  6714. function signalLater(emitter, type /*, values...*/) {
  6715. var arr = getHandlers(emitter, type);
  6716. if (!arr.length) { return }
  6717. var args = Array.prototype.slice.call(arguments, 2), list;
  6718. if (operationGroup) {
  6719. list = operationGroup.delayedCallbacks;
  6720. } else if (orphanDelayedCallbacks) {
  6721. list = orphanDelayedCallbacks;
  6722. } else {
  6723. list = orphanDelayedCallbacks = [];
  6724. setTimeout(fireOrphanDelayed, 0);
  6725. }
  6726. var loop = function ( i ) {
  6727. list.push(function () { return arr[i].apply(null, args); });
  6728. };
  6729. for (var i = 0; i < arr.length; ++i)
  6730. loop( i );
  6731. }
  6732. function fireOrphanDelayed() {
  6733. var delayed = orphanDelayedCallbacks;
  6734. orphanDelayedCallbacks = null;
  6735. for (var i = 0; i < delayed.length; ++i) { delayed[i](); }
  6736. }
  6737. // When an aspect of a line changes, a string is added to
  6738. // lineView.changes. This updates the relevant part of the line's
  6739. // DOM structure.
  6740. function updateLineForChanges(cm, lineView, lineN, dims) {
  6741. for (var j = 0; j < lineView.changes.length; j++) {
  6742. var type = lineView.changes[j];
  6743. if (type == "text") { updateLineText(cm, lineView); }
  6744. else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
  6745. else if (type == "class") { updateLineClasses(cm, lineView); }
  6746. else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
  6747. }
  6748. lineView.changes = null;
  6749. }
  6750. // Lines with gutter elements, widgets or a background class need to
  6751. // be wrapped, and have the extra elements added to the wrapper div
  6752. function ensureLineWrapped(lineView) {
  6753. if (lineView.node == lineView.text) {
  6754. lineView.node = elt("div", null, null, "position: relative");
  6755. if (lineView.text.parentNode)
  6756. { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
  6757. lineView.node.appendChild(lineView.text);
  6758. if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
  6759. }
  6760. return lineView.node
  6761. }
  6762. function updateLineBackground(cm, lineView) {
  6763. var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
  6764. if (cls) { cls += " CodeMirror-linebackground"; }
  6765. if (lineView.background) {
  6766. if (cls) { lineView.background.className = cls; }
  6767. else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
  6768. } else if (cls) {
  6769. var wrap = ensureLineWrapped(lineView);
  6770. lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
  6771. cm.display.input.setUneditable(lineView.background);
  6772. }
  6773. }
  6774. // Wrapper around buildLineContent which will reuse the structure
  6775. // in display.externalMeasured when possible.
  6776. function getLineContent(cm, lineView) {
  6777. var ext = cm.display.externalMeasured;
  6778. if (ext && ext.line == lineView.line) {
  6779. cm.display.externalMeasured = null;
  6780. lineView.measure = ext.measure;
  6781. return ext.built
  6782. }
  6783. return buildLineContent(cm, lineView)
  6784. }
  6785. // Redraw the line's text. Interacts with the background and text
  6786. // classes because the mode may output tokens that influence these
  6787. // classes.
  6788. function updateLineText(cm, lineView) {
  6789. var cls = lineView.text.className;
  6790. var built = getLineContent(cm, lineView);
  6791. if (lineView.text == lineView.node) { lineView.node = built.pre; }
  6792. lineView.text.parentNode.replaceChild(built.pre, lineView.text);
  6793. lineView.text = built.pre;
  6794. if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
  6795. lineView.bgClass = built.bgClass;
  6796. lineView.textClass = built.textClass;
  6797. updateLineClasses(cm, lineView);
  6798. } else if (cls) {
  6799. lineView.text.className = cls;
  6800. }
  6801. }
  6802. function updateLineClasses(cm, lineView) {
  6803. updateLineBackground(cm, lineView);
  6804. if (lineView.line.wrapClass)
  6805. { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }
  6806. else if (lineView.node != lineView.text)
  6807. { lineView.node.className = ""; }
  6808. var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
  6809. lineView.text.className = textClass || "";
  6810. }
  6811. function updateLineGutter(cm, lineView, lineN, dims) {
  6812. if (lineView.gutter) {
  6813. lineView.node.removeChild(lineView.gutter);
  6814. lineView.gutter = null;
  6815. }
  6816. if (lineView.gutterBackground) {
  6817. lineView.node.removeChild(lineView.gutterBackground);
  6818. lineView.gutterBackground = null;
  6819. }
  6820. if (lineView.line.gutterClass) {
  6821. var wrap = ensureLineWrapped(lineView);
  6822. lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
  6823. ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));
  6824. cm.display.input.setUneditable(lineView.gutterBackground);
  6825. wrap.insertBefore(lineView.gutterBackground, lineView.text);
  6826. }
  6827. var markers = lineView.line.gutterMarkers;
  6828. if (cm.options.lineNumbers || markers) {
  6829. var wrap$1 = ensureLineWrapped(lineView);
  6830. var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
  6831. gutterWrap.setAttribute("aria-hidden", "true");
  6832. cm.display.input.setUneditable(gutterWrap);
  6833. wrap$1.insertBefore(gutterWrap, lineView.text);
  6834. if (lineView.line.gutterClass)
  6835. { gutterWrap.className += " " + lineView.line.gutterClass; }
  6836. if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
  6837. { lineView.lineNumber = gutterWrap.appendChild(
  6838. elt("div", lineNumberFor(cm.options, lineN),
  6839. "CodeMirror-linenumber CodeMirror-gutter-elt",
  6840. ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }
  6841. if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {
  6842. var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];
  6843. if (found)
  6844. { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
  6845. ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }
  6846. } }
  6847. }
  6848. }
  6849. function updateLineWidgets(cm, lineView, dims) {
  6850. if (lineView.alignable) { lineView.alignable = null; }
  6851. var isWidget = classTest("CodeMirror-linewidget");
  6852. for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
  6853. next = node.nextSibling;
  6854. if (isWidget.test(node.className)) { lineView.node.removeChild(node); }
  6855. }
  6856. insertLineWidgets(cm, lineView, dims);
  6857. }
  6858. // Build a line's DOM representation from scratch
  6859. function buildLineElement(cm, lineView, lineN, dims) {
  6860. var built = getLineContent(cm, lineView);
  6861. lineView.text = lineView.node = built.pre;
  6862. if (built.bgClass) { lineView.bgClass = built.bgClass; }
  6863. if (built.textClass) { lineView.textClass = built.textClass; }
  6864. updateLineClasses(cm, lineView);
  6865. updateLineGutter(cm, lineView, lineN, dims);
  6866. insertLineWidgets(cm, lineView, dims);
  6867. return lineView.node
  6868. }
  6869. // A lineView may contain multiple logical lines (when merged by
  6870. // collapsed spans). The widgets for all of them need to be drawn.
  6871. function insertLineWidgets(cm, lineView, dims) {
  6872. insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
  6873. if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
  6874. { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }
  6875. }
  6876. function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
  6877. if (!line.widgets) { return }
  6878. var wrap = ensureLineWrapped(lineView);
  6879. for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
  6880. var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));
  6881. if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }
  6882. positionLineWidget(widget, node, lineView, dims);
  6883. cm.display.input.setUneditable(node);
  6884. if (allowAbove && widget.above)
  6885. { wrap.insertBefore(node, lineView.gutter || lineView.text); }
  6886. else
  6887. { wrap.appendChild(node); }
  6888. signalLater(widget, "redraw");
  6889. }
  6890. }
  6891. function positionLineWidget(widget, node, lineView, dims) {
  6892. if (widget.noHScroll) {
  6893. (lineView.alignable || (lineView.alignable = [])).push(node);
  6894. var width = dims.wrapperWidth;
  6895. node.style.left = dims.fixedPos + "px";
  6896. if (!widget.coverGutter) {
  6897. width -= dims.gutterTotalWidth;
  6898. node.style.paddingLeft = dims.gutterTotalWidth + "px";
  6899. }
  6900. node.style.width = width + "px";
  6901. }
  6902. if (widget.coverGutter) {
  6903. node.style.zIndex = 5;
  6904. node.style.position = "relative";
  6905. if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }
  6906. }
  6907. }
  6908. function widgetHeight(widget) {
  6909. if (widget.height != null) { return widget.height }
  6910. var cm = widget.doc.cm;
  6911. if (!cm) { return 0 }
  6912. if (!contains(document.body, widget.node)) {
  6913. var parentStyle = "position: relative;";
  6914. if (widget.coverGutter)
  6915. { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }
  6916. if (widget.noHScroll)
  6917. { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }
  6918. removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
  6919. }
  6920. return widget.height = widget.node.parentNode.offsetHeight
  6921. }
  6922. // Return true when the given mouse event happened in a widget
  6923. function eventInWidget(display, e) {
  6924. for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
  6925. if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") ||
  6926. (n.parentNode == display.sizer && n != display.mover))
  6927. { return true }
  6928. }
  6929. }
  6930. // POSITION MEASUREMENT
  6931. function paddingTop(display) {return display.lineSpace.offsetTop}
  6932. function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
  6933. function paddingH(display) {
  6934. if (display.cachedPaddingH) { return display.cachedPaddingH }
  6935. var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));
  6936. var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
  6937. var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
  6938. if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
  6939. return data
  6940. }
  6941. function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }
  6942. function displayWidth(cm) {
  6943. return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth
  6944. }
  6945. function displayHeight(cm) {
  6946. return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight
  6947. }
  6948. // Ensure the lineView.wrapping.heights array is populated. This is
  6949. // an array of bottom offsets for the lines that make up a drawn
  6950. // line. When lineWrapping is on, there might be more than one
  6951. // height.
  6952. function ensureLineHeights(cm, lineView, rect) {
  6953. var wrapping = cm.options.lineWrapping;
  6954. var curWidth = wrapping && displayWidth(cm);
  6955. if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
  6956. var heights = lineView.measure.heights = [];
  6957. if (wrapping) {
  6958. lineView.measure.width = curWidth;
  6959. var rects = lineView.text.firstChild.getClientRects();
  6960. for (var i = 0; i < rects.length - 1; i++) {
  6961. var cur = rects[i], next = rects[i + 1];
  6962. if (Math.abs(cur.bottom - next.bottom) > 2)
  6963. { heights.push((cur.bottom + next.top) / 2 - rect.top); }
  6964. }
  6965. }
  6966. heights.push(rect.bottom - rect.top);
  6967. }
  6968. }
  6969. // Find a line map (mapping character offsets to text nodes) and a
  6970. // measurement cache for the given line number. (A line view might
  6971. // contain multiple lines when collapsed ranges are present.)
  6972. function mapFromLineView(lineView, line, lineN) {
  6973. if (lineView.line == line)
  6974. { return {map: lineView.measure.map, cache: lineView.measure.cache} }
  6975. for (var i = 0; i < lineView.rest.length; i++)
  6976. { if (lineView.rest[i] == line)
  6977. { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }
  6978. for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)
  6979. { if (lineNo(lineView.rest[i$1]) > lineN)
  6980. { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }
  6981. }
  6982. // Render a line into the hidden node display.externalMeasured. Used
  6983. // when measurement is needed for a line that's not in the viewport.
  6984. function updateExternalMeasurement(cm, line) {
  6985. line = visualLine(line);
  6986. var lineN = lineNo(line);
  6987. var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
  6988. view.lineN = lineN;
  6989. var built = view.built = buildLineContent(cm, view);
  6990. view.text = built.pre;
  6991. removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
  6992. return view
  6993. }
  6994. // Get a {top, bottom, left, right} box (in line-local coordinates)
  6995. // for a given character.
  6996. function measureChar(cm, line, ch, bias) {
  6997. return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)
  6998. }
  6999. // Find a line view that corresponds to the given line number.
  7000. function findViewForLine(cm, lineN) {
  7001. if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
  7002. { return cm.display.view[findViewIndex(cm, lineN)] }
  7003. var ext = cm.display.externalMeasured;
  7004. if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
  7005. { return ext }
  7006. }
  7007. // Measurement can be split in two steps, the set-up work that
  7008. // applies to the whole line, and the measurement of the actual
  7009. // character. Functions like coordsChar, that need to do a lot of
  7010. // measurements in a row, can thus ensure that the set-up work is
  7011. // only done once.
  7012. function prepareMeasureForLine(cm, line) {
  7013. var lineN = lineNo(line);
  7014. var view = findViewForLine(cm, lineN);
  7015. if (view && !view.text) {
  7016. view = null;
  7017. } else if (view && view.changes) {
  7018. updateLineForChanges(cm, view, lineN, getDimensions(cm));
  7019. cm.curOp.forceUpdate = true;
  7020. }
  7021. if (!view)
  7022. { view = updateExternalMeasurement(cm, line); }
  7023. var info = mapFromLineView(view, line, lineN);
  7024. return {
  7025. line: line, view: view, rect: null,
  7026. map: info.map, cache: info.cache, before: info.before,
  7027. hasHeights: false
  7028. }
  7029. }
  7030. // Given a prepared measurement object, measures the position of an
  7031. // actual character (or fetches it from the cache).
  7032. function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
  7033. if (prepared.before) { ch = -1; }
  7034. var key = ch + (bias || ""), found;
  7035. if (prepared.cache.hasOwnProperty(key)) {
  7036. found = prepared.cache[key];
  7037. } else {
  7038. if (!prepared.rect)
  7039. { prepared.rect = prepared.view.text.getBoundingClientRect(); }
  7040. if (!prepared.hasHeights) {
  7041. ensureLineHeights(cm, prepared.view, prepared.rect);
  7042. prepared.hasHeights = true;
  7043. }
  7044. found = measureCharInner(cm, prepared, ch, bias);
  7045. if (!found.bogus) { prepared.cache[key] = found; }
  7046. }
  7047. return {left: found.left, right: found.right,
  7048. top: varHeight ? found.rtop : found.top,
  7049. bottom: varHeight ? found.rbottom : found.bottom}
  7050. }
  7051. var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
  7052. function nodeAndOffsetInLineMap(map, ch, bias) {
  7053. var node, start, end, collapse, mStart, mEnd;
  7054. // First, search the line map for the text node corresponding to,
  7055. // or closest to, the target character.
  7056. for (var i = 0; i < map.length; i += 3) {
  7057. mStart = map[i];
  7058. mEnd = map[i + 1];
  7059. if (ch < mStart) {
  7060. start = 0; end = 1;
  7061. collapse = "left";
  7062. } else if (ch < mEnd) {
  7063. start = ch - mStart;
  7064. end = start + 1;
  7065. } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
  7066. end = mEnd - mStart;
  7067. start = end - 1;
  7068. if (ch >= mEnd) { collapse = "right"; }
  7069. }
  7070. if (start != null) {
  7071. node = map[i + 2];
  7072. if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
  7073. { collapse = bias; }
  7074. if (bias == "left" && start == 0)
  7075. { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
  7076. node = map[(i -= 3) + 2];
  7077. collapse = "left";
  7078. } }
  7079. if (bias == "right" && start == mEnd - mStart)
  7080. { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
  7081. node = map[(i += 3) + 2];
  7082. collapse = "right";
  7083. } }
  7084. break
  7085. }
  7086. }
  7087. return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}
  7088. }
  7089. function getUsefulRect(rects, bias) {
  7090. var rect = nullRect;
  7091. if (bias == "left") { for (var i = 0; i < rects.length; i++) {
  7092. if ((rect = rects[i]).left != rect.right) { break }
  7093. } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
  7094. if ((rect = rects[i$1]).left != rect.right) { break }
  7095. } }
  7096. return rect
  7097. }
  7098. function measureCharInner(cm, prepared, ch, bias) {
  7099. var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
  7100. var node = place.node, start = place.start, end = place.end, collapse = place.collapse;
  7101. var rect;
  7102. if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
  7103. for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned
  7104. while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }
  7105. while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }
  7106. if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
  7107. { rect = node.parentNode.getBoundingClientRect(); }
  7108. else
  7109. { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }
  7110. if (rect.left || rect.right || start == 0) { break }
  7111. end = start;
  7112. start = start - 1;
  7113. collapse = "right";
  7114. }
  7115. if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }
  7116. } else { // If it is a widget, simply get the box for the whole widget.
  7117. if (start > 0) { collapse = bias = "right"; }
  7118. var rects;
  7119. if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
  7120. { rect = rects[bias == "right" ? rects.length - 1 : 0]; }
  7121. else
  7122. { rect = node.getBoundingClientRect(); }
  7123. }
  7124. if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
  7125. var rSpan = node.parentNode.getClientRects()[0];
  7126. if (rSpan)
  7127. { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }
  7128. else
  7129. { rect = nullRect; }
  7130. }
  7131. var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
  7132. var mid = (rtop + rbot) / 2;
  7133. var heights = prepared.view.measure.heights;
  7134. var i = 0;
  7135. for (; i < heights.length - 1; i++)
  7136. { if (mid < heights[i]) { break } }
  7137. var top = i ? heights[i - 1] : 0, bot = heights[i];
  7138. var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
  7139. right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
  7140. top: top, bottom: bot};
  7141. if (!rect.left && !rect.right) { result.bogus = true; }
  7142. if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }
  7143. return result
  7144. }
  7145. // Work around problem with bounding client rects on ranges being
  7146. // returned incorrectly when zoomed on IE10 and below.
  7147. function maybeUpdateRectForZooming(measure, rect) {
  7148. if (!window.screen || screen.logicalXDPI == null ||
  7149. screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
  7150. { return rect }
  7151. var scaleX = screen.logicalXDPI / screen.deviceXDPI;
  7152. var scaleY = screen.logicalYDPI / screen.deviceYDPI;
  7153. return {left: rect.left * scaleX, right: rect.right * scaleX,
  7154. top: rect.top * scaleY, bottom: rect.bottom * scaleY}
  7155. }
  7156. function clearLineMeasurementCacheFor(lineView) {
  7157. if (lineView.measure) {
  7158. lineView.measure.cache = {};
  7159. lineView.measure.heights = null;
  7160. if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
  7161. { lineView.measure.caches[i] = {}; } }
  7162. }
  7163. }
  7164. function clearLineMeasurementCache(cm) {
  7165. cm.display.externalMeasure = null;
  7166. removeChildren(cm.display.lineMeasure);
  7167. for (var i = 0; i < cm.display.view.length; i++)
  7168. { clearLineMeasurementCacheFor(cm.display.view[i]); }
  7169. }
  7170. function clearCaches(cm) {
  7171. clearLineMeasurementCache(cm);
  7172. cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
  7173. if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }
  7174. cm.display.lineNumChars = null;
  7175. }
  7176. function pageScrollX() {
  7177. // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
  7178. // which causes page_Offset and bounding client rects to use
  7179. // different reference viewports and invalidate our calculations.
  7180. if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }
  7181. return window.pageXOffset || (document.documentElement || document.body).scrollLeft
  7182. }
  7183. function pageScrollY() {
  7184. if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }
  7185. return window.pageYOffset || (document.documentElement || document.body).scrollTop
  7186. }
  7187. function widgetTopHeight(lineObj) {
  7188. var height = 0;
  7189. if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)
  7190. { height += widgetHeight(lineObj.widgets[i]); } } }
  7191. return height
  7192. }
  7193. // Converts a {top, bottom, left, right} box from line-local
  7194. // coordinates into another coordinate system. Context may be one of
  7195. // "line", "div" (display.lineDiv), "local"./null (editor), "window",
  7196. // or "page".
  7197. function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
  7198. if (!includeWidgets) {
  7199. var height = widgetTopHeight(lineObj);
  7200. rect.top += height; rect.bottom += height;
  7201. }
  7202. if (context == "line") { return rect }
  7203. if (!context) { context = "local"; }
  7204. var yOff = heightAtLine(lineObj);
  7205. if (context == "local") { yOff += paddingTop(cm.display); }
  7206. else { yOff -= cm.display.viewOffset; }
  7207. if (context == "page" || context == "window") {
  7208. var lOff = cm.display.lineSpace.getBoundingClientRect();
  7209. yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
  7210. var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
  7211. rect.left += xOff; rect.right += xOff;
  7212. }
  7213. rect.top += yOff; rect.bottom += yOff;
  7214. return rect
  7215. }
  7216. // Coverts a box from "div" coords to another coordinate system.
  7217. // Context may be "window", "page", "div", or "local"./null.
  7218. function fromCoordSystem(cm, coords, context) {
  7219. if (context == "div") { return coords }
  7220. var left = coords.left, top = coords.top;
  7221. // First move into "page" coordinate system
  7222. if (context == "page") {
  7223. left -= pageScrollX();
  7224. top -= pageScrollY();
  7225. } else if (context == "local" || !context) {
  7226. var localBox = cm.display.sizer.getBoundingClientRect();
  7227. left += localBox.left;
  7228. top += localBox.top;
  7229. }
  7230. var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
  7231. return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}
  7232. }
  7233. function charCoords(cm, pos, context, lineObj, bias) {
  7234. if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }
  7235. return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)
  7236. }
  7237. // Returns a box for a given cursor position, which may have an
  7238. // 'other' property containing the position of the secondary cursor
  7239. // on a bidi boundary.
  7240. // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`
  7241. // and after `char - 1` in writing order of `char - 1`
  7242. // A cursor Pos(line, char, "after") is on the same visual line as `char`
  7243. // and before `char` in writing order of `char`
  7244. // Examples (upper-case letters are RTL, lower-case are LTR):
  7245. // Pos(0, 1, ...)
  7246. // before after
  7247. // ab a|b a|b
  7248. // aB a|B aB|
  7249. // Ab |Ab A|b
  7250. // AB B|A B|A
  7251. // Every position after the last character on a line is considered to stick
  7252. // to the last character on the line.
  7253. function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
  7254. lineObj = lineObj || getLine(cm.doc, pos.line);
  7255. if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
  7256. function get(ch, right) {
  7257. var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
  7258. if (right) { m.left = m.right; } else { m.right = m.left; }
  7259. return intoCoordSystem(cm, lineObj, m, context)
  7260. }
  7261. var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;
  7262. if (ch >= lineObj.text.length) {
  7263. ch = lineObj.text.length;
  7264. sticky = "before";
  7265. } else if (ch <= 0) {
  7266. ch = 0;
  7267. sticky = "after";
  7268. }
  7269. if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }
  7270. function getBidi(ch, partPos, invert) {
  7271. var part = order[partPos], right = part.level == 1;
  7272. return get(invert ? ch - 1 : ch, right != invert)
  7273. }
  7274. var partPos = getBidiPartAt(order, ch, sticky);
  7275. var other = bidiOther;
  7276. var val = getBidi(ch, partPos, sticky == "before");
  7277. if (other != null) { val.other = getBidi(ch, other, sticky != "before"); }
  7278. return val
  7279. }
  7280. // Used to cheaply estimate the coordinates for a position. Used for
  7281. // intermediate scroll updates.
  7282. function estimateCoords(cm, pos) {
  7283. var left = 0;
  7284. pos = clipPos(cm.doc, pos);
  7285. if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }
  7286. var lineObj = getLine(cm.doc, pos.line);
  7287. var top = heightAtLine(lineObj) + paddingTop(cm.display);
  7288. return {left: left, right: left, top: top, bottom: top + lineObj.height}
  7289. }
  7290. // Positions returned by coordsChar contain some extra information.
  7291. // xRel is the relative x position of the input coordinates compared
  7292. // to the found position (so xRel > 0 means the coordinates are to
  7293. // the right of the character position, for example). When outside
  7294. // is true, that means the coordinates lie outside the line's
  7295. // vertical range.
  7296. function PosWithInfo(line, ch, sticky, outside, xRel) {
  7297. var pos = Pos(line, ch, sticky);
  7298. pos.xRel = xRel;
  7299. if (outside) { pos.outside = outside; }
  7300. return pos
  7301. }
  7302. // Compute the character position closest to the given coordinates.
  7303. // Input must be lineSpace-local ("div" coordinate system).
  7304. function coordsChar(cm, x, y) {
  7305. var doc = cm.doc;
  7306. y += cm.display.viewOffset;
  7307. if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }
  7308. var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
  7309. if (lineN > last)
  7310. { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }
  7311. if (x < 0) { x = 0; }
  7312. var lineObj = getLine(doc, lineN);
  7313. for (;;) {
  7314. var found = coordsCharInner(cm, lineObj, lineN, x, y);
  7315. var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));
  7316. if (!collapsed) { return found }
  7317. var rangeEnd = collapsed.find(1);
  7318. if (rangeEnd.line == lineN) { return rangeEnd }
  7319. lineObj = getLine(doc, lineN = rangeEnd.line);
  7320. }
  7321. }
  7322. function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
  7323. y -= widgetTopHeight(lineObj);
  7324. var end = lineObj.text.length;
  7325. var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);
  7326. end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);
  7327. return {begin: begin, end: end}
  7328. }
  7329. function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
  7330. if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
  7331. var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
  7332. return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)
  7333. }
  7334. // Returns true if the given side of a box is after the given
  7335. // coordinates, in top-to-bottom, left-to-right order.
  7336. function boxIsAfter(box, x, y, left) {
  7337. return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x
  7338. }
  7339. function coordsCharInner(cm, lineObj, lineNo, x, y) {
  7340. // Move y into line-local coordinate space
  7341. y -= heightAtLine(lineObj);
  7342. var preparedMeasure = prepareMeasureForLine(cm, lineObj);
  7343. // When directly calling `measureCharPrepared`, we have to adjust
  7344. // for the widgets at this line.
  7345. var widgetHeight = widgetTopHeight(lineObj);
  7346. var begin = 0, end = lineObj.text.length, ltr = true;
  7347. var order = getOrder(lineObj, cm.doc.direction);
  7348. // If the line isn't plain left-to-right text, first figure out
  7349. // which bidi section the coordinates fall into.
  7350. if (order) {
  7351. var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)
  7352. (cm, lineObj, lineNo, preparedMeasure, order, x, y);
  7353. ltr = part.level != 1;
  7354. // The awkward -1 offsets are needed because findFirst (called
  7355. // on these below) will treat its first bound as inclusive,
  7356. // second as exclusive, but we want to actually address the
  7357. // characters in the part's range
  7358. begin = ltr ? part.from : part.to - 1;
  7359. end = ltr ? part.to : part.from - 1;
  7360. }
  7361. // A binary search to find the first character whose bounding box
  7362. // starts after the coordinates. If we run across any whose box wrap
  7363. // the coordinates, store that.
  7364. var chAround = null, boxAround = null;
  7365. var ch = findFirst(function (ch) {
  7366. var box = measureCharPrepared(cm, preparedMeasure, ch);
  7367. box.top += widgetHeight; box.bottom += widgetHeight;
  7368. if (!boxIsAfter(box, x, y, false)) { return false }
  7369. if (box.top <= y && box.left <= x) {
  7370. chAround = ch;
  7371. boxAround = box;
  7372. }
  7373. return true
  7374. }, begin, end);
  7375. var baseX, sticky, outside = false;
  7376. // If a box around the coordinates was found, use that
  7377. if (boxAround) {
  7378. // Distinguish coordinates nearer to the left or right side of the box
  7379. var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;
  7380. ch = chAround + (atStart ? 0 : 1);
  7381. sticky = atStart ? "after" : "before";
  7382. baseX = atLeft ? boxAround.left : boxAround.right;
  7383. } else {
  7384. // (Adjust for extended bound, if necessary.)
  7385. if (!ltr && (ch == end || ch == begin)) { ch++; }
  7386. // To determine which side to associate with, get the box to the
  7387. // left of the character and compare it's vertical position to the
  7388. // coordinates
  7389. sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" :
  7390. (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?
  7391. "after" : "before";
  7392. // Now get accurate coordinates for this place, in order to get a
  7393. // base X position
  7394. var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure);
  7395. baseX = coords.left;
  7396. outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;
  7397. }
  7398. ch = skipExtendingChars(lineObj.text, ch, 1);
  7399. return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)
  7400. }
  7401. function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {
  7402. // Bidi parts are sorted left-to-right, and in a non-line-wrapping
  7403. // situation, we can take this ordering to correspond to the visual
  7404. // ordering. This finds the first part whose end is after the given
  7405. // coordinates.
  7406. var index = findFirst(function (i) {
  7407. var part = order[i], ltr = part.level != 1;
  7408. return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"),
  7409. "line", lineObj, preparedMeasure), x, y, true)
  7410. }, 0, order.length - 1);
  7411. var part = order[index];
  7412. // If this isn't the first part, the part's start is also after
  7413. // the coordinates, and the coordinates aren't on the same line as
  7414. // that start, move one part back.
  7415. if (index > 0) {
  7416. var ltr = part.level != 1;
  7417. var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"),
  7418. "line", lineObj, preparedMeasure);
  7419. if (boxIsAfter(start, x, y, true) && start.top > y)
  7420. { part = order[index - 1]; }
  7421. }
  7422. return part
  7423. }
  7424. function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
  7425. // In a wrapped line, rtl text on wrapping boundaries can do things
  7426. // that don't correspond to the ordering in our `order` array at
  7427. // all, so a binary search doesn't work, and we want to return a
  7428. // part that only spans one line so that the binary search in
  7429. // coordsCharInner is safe. As such, we first find the extent of the
  7430. // wrapped line, and then do a flat search in which we discard any
  7431. // spans that aren't on the line.
  7432. var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);
  7433. var begin = ref.begin;
  7434. var end = ref.end;
  7435. if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; }
  7436. var part = null, closestDist = null;
  7437. for (var i = 0; i < order.length; i++) {
  7438. var p = order[i];
  7439. if (p.from >= end || p.to <= begin) { continue }
  7440. var ltr = p.level != 1;
  7441. var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;
  7442. // Weigh against spans ending before this, so that they are only
  7443. // picked if nothing ends after
  7444. var dist = endX < x ? x - endX + 1e9 : endX - x;
  7445. if (!part || closestDist > dist) {
  7446. part = p;
  7447. closestDist = dist;
  7448. }
  7449. }
  7450. if (!part) { part = order[order.length - 1]; }
  7451. // Clip the part to the wrapped line.
  7452. if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }
  7453. if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }
  7454. return part
  7455. }
  7456. var measureText;
  7457. // Compute the default text height.
  7458. function textHeight(display) {
  7459. if (display.cachedTextHeight != null) { return display.cachedTextHeight }
  7460. if (measureText == null) {
  7461. measureText = elt("pre", null, "CodeMirror-line-like");
  7462. // Measure a bunch of lines, for browsers that compute
  7463. // fractional heights.
  7464. for (var i = 0; i < 49; ++i) {
  7465. measureText.appendChild(document.createTextNode("x"));
  7466. measureText.appendChild(elt("br"));
  7467. }
  7468. measureText.appendChild(document.createTextNode("x"));
  7469. }
  7470. removeChildrenAndAdd(display.measure, measureText);
  7471. var height = measureText.offsetHeight / 50;
  7472. if (height > 3) { display.cachedTextHeight = height; }
  7473. removeChildren(display.measure);
  7474. return height || 1
  7475. }
  7476. // Compute the default character width.
  7477. function charWidth(display) {
  7478. if (display.cachedCharWidth != null) { return display.cachedCharWidth }
  7479. var anchor = elt("span", "xxxxxxxxxx");
  7480. var pre = elt("pre", [anchor], "CodeMirror-line-like");
  7481. removeChildrenAndAdd(display.measure, pre);
  7482. var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
  7483. if (width > 2) { display.cachedCharWidth = width; }
  7484. return width || 10
  7485. }
  7486. // Do a bulk-read of the DOM positions and sizes needed to draw the
  7487. // view, so that we don't interleave reading and writing to the DOM.
  7488. function getDimensions(cm) {
  7489. var d = cm.display, left = {}, width = {};
  7490. var gutterLeft = d.gutters.clientLeft;
  7491. for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
  7492. var id = cm.display.gutterSpecs[i].className;
  7493. left[id] = n.offsetLeft + n.clientLeft + gutterLeft;
  7494. width[id] = n.clientWidth;
  7495. }
  7496. return {fixedPos: compensateForHScroll(d),
  7497. gutterTotalWidth: d.gutters.offsetWidth,
  7498. gutterLeft: left,
  7499. gutterWidth: width,
  7500. wrapperWidth: d.wrapper.clientWidth}
  7501. }
  7502. // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
  7503. // but using getBoundingClientRect to get a sub-pixel-accurate
  7504. // result.
  7505. function compensateForHScroll(display) {
  7506. return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left
  7507. }
  7508. // Returns a function that estimates the height of a line, to use as
  7509. // first approximation until the line becomes visible (and is thus
  7510. // properly measurable).
  7511. function estimateHeight(cm) {
  7512. var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
  7513. var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
  7514. return function (line) {
  7515. if (lineIsHidden(cm.doc, line)) { return 0 }
  7516. var widgetsHeight = 0;
  7517. if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {
  7518. if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }
  7519. } }
  7520. if (wrapping)
  7521. { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }
  7522. else
  7523. { return widgetsHeight + th }
  7524. }
  7525. }
  7526. function estimateLineHeights(cm) {
  7527. var doc = cm.doc, est = estimateHeight(cm);
  7528. doc.iter(function (line) {
  7529. var estHeight = est(line);
  7530. if (estHeight != line.height) { updateLineHeight(line, estHeight); }
  7531. });
  7532. }
  7533. // Given a mouse event, find the corresponding position. If liberal
  7534. // is false, it checks whether a gutter or scrollbar was clicked,
  7535. // and returns null if it was. forRect is used by rectangular
  7536. // selections, and tries to estimate a character position even for
  7537. // coordinates beyond the right of the text.
  7538. function posFromMouse(cm, e, liberal, forRect) {
  7539. var display = cm.display;
  7540. if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }
  7541. var x, y, space = display.lineSpace.getBoundingClientRect();
  7542. // Fails unpredictably on IE[67] when mouse is dragged around quickly.
  7543. try { x = e.clientX - space.left; y = e.clientY - space.top; }
  7544. catch (e$1) { return null }
  7545. var coords = coordsChar(cm, x, y), line;
  7546. if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
  7547. var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
  7548. coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
  7549. }
  7550. return coords
  7551. }
  7552. // Find the view element corresponding to a given line. Return null
  7553. // when the line isn't visible.
  7554. function findViewIndex(cm, n) {
  7555. if (n >= cm.display.viewTo) { return null }
  7556. n -= cm.display.viewFrom;
  7557. if (n < 0) { return null }
  7558. var view = cm.display.view;
  7559. for (var i = 0; i < view.length; i++) {
  7560. n -= view[i].size;
  7561. if (n < 0) { return i }
  7562. }
  7563. }
  7564. // Updates the display.view data structure for a given change to the
  7565. // document. From and to are in pre-change coordinates. Lendiff is
  7566. // the amount of lines added or subtracted by the change. This is
  7567. // used for changes that span multiple lines, or change the way
  7568. // lines are divided into visual lines. regLineChange (below)
  7569. // registers single-line changes.
  7570. function regChange(cm, from, to, lendiff) {
  7571. if (from == null) { from = cm.doc.first; }
  7572. if (to == null) { to = cm.doc.first + cm.doc.size; }
  7573. if (!lendiff) { lendiff = 0; }
  7574. var display = cm.display;
  7575. if (lendiff && to < display.viewTo &&
  7576. (display.updateLineNumbers == null || display.updateLineNumbers > from))
  7577. { display.updateLineNumbers = from; }
  7578. cm.curOp.viewChanged = true;
  7579. if (from >= display.viewTo) { // Change after
  7580. if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
  7581. { resetView(cm); }
  7582. } else if (to <= display.viewFrom) { // Change before
  7583. if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
  7584. resetView(cm);
  7585. } else {
  7586. display.viewFrom += lendiff;
  7587. display.viewTo += lendiff;
  7588. }
  7589. } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
  7590. resetView(cm);
  7591. } else if (from <= display.viewFrom) { // Top overlap
  7592. var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
  7593. if (cut) {
  7594. display.view = display.view.slice(cut.index);
  7595. display.viewFrom = cut.lineN;
  7596. display.viewTo += lendiff;
  7597. } else {
  7598. resetView(cm);
  7599. }
  7600. } else if (to >= display.viewTo) { // Bottom overlap
  7601. var cut$1 = viewCuttingPoint(cm, from, from, -1);
  7602. if (cut$1) {
  7603. display.view = display.view.slice(0, cut$1.index);
  7604. display.viewTo = cut$1.lineN;
  7605. } else {
  7606. resetView(cm);
  7607. }
  7608. } else { // Gap in the middle
  7609. var cutTop = viewCuttingPoint(cm, from, from, -1);
  7610. var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
  7611. if (cutTop && cutBot) {
  7612. display.view = display.view.slice(0, cutTop.index)
  7613. .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
  7614. .concat(display.view.slice(cutBot.index));
  7615. display.viewTo += lendiff;
  7616. } else {
  7617. resetView(cm);
  7618. }
  7619. }
  7620. var ext = display.externalMeasured;
  7621. if (ext) {
  7622. if (to < ext.lineN)
  7623. { ext.lineN += lendiff; }
  7624. else if (from < ext.lineN + ext.size)
  7625. { display.externalMeasured = null; }
  7626. }
  7627. }
  7628. // Register a change to a single line. Type must be one of "text",
  7629. // "gutter", "class", "widget"
  7630. function regLineChange(cm, line, type) {
  7631. cm.curOp.viewChanged = true;
  7632. var display = cm.display, ext = cm.display.externalMeasured;
  7633. if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
  7634. { display.externalMeasured = null; }
  7635. if (line < display.viewFrom || line >= display.viewTo) { return }
  7636. var lineView = display.view[findViewIndex(cm, line)];
  7637. if (lineView.node == null) { return }
  7638. var arr = lineView.changes || (lineView.changes = []);
  7639. if (indexOf(arr, type) == -1) { arr.push(type); }
  7640. }
  7641. // Clear the view.
  7642. function resetView(cm) {
  7643. cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
  7644. cm.display.view = [];
  7645. cm.display.viewOffset = 0;
  7646. }
  7647. function viewCuttingPoint(cm, oldN, newN, dir) {
  7648. var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
  7649. if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
  7650. { return {index: index, lineN: newN} }
  7651. var n = cm.display.viewFrom;
  7652. for (var i = 0; i < index; i++)
  7653. { n += view[i].size; }
  7654. if (n != oldN) {
  7655. if (dir > 0) {
  7656. if (index == view.length - 1) { return null }
  7657. diff = (n + view[index].size) - oldN;
  7658. index++;
  7659. } else {
  7660. diff = n - oldN;
  7661. }
  7662. oldN += diff; newN += diff;
  7663. }
  7664. while (visualLineNo(cm.doc, newN) != newN) {
  7665. if (index == (dir < 0 ? 0 : view.length - 1)) { return null }
  7666. newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
  7667. index += dir;
  7668. }
  7669. return {index: index, lineN: newN}
  7670. }
  7671. // Force the view to cover a given range, adding empty view element
  7672. // or clipping off existing ones as needed.
  7673. function adjustView(cm, from, to) {
  7674. var display = cm.display, view = display.view;
  7675. if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
  7676. display.view = buildViewArray(cm, from, to);
  7677. display.viewFrom = from;
  7678. } else {
  7679. if (display.viewFrom > from)
  7680. { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }
  7681. else if (display.viewFrom < from)
  7682. { display.view = display.view.slice(findViewIndex(cm, from)); }
  7683. display.viewFrom = from;
  7684. if (display.viewTo < to)
  7685. { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }
  7686. else if (display.viewTo > to)
  7687. { display.view = display.view.slice(0, findViewIndex(cm, to)); }
  7688. }
  7689. display.viewTo = to;
  7690. }
  7691. // Count the number of lines in the view whose DOM representation is
  7692. // out of date (or nonexistent).
  7693. function countDirtyView(cm) {
  7694. var view = cm.display.view, dirty = 0;
  7695. for (var i = 0; i < view.length; i++) {
  7696. var lineView = view[i];
  7697. if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }
  7698. }
  7699. return dirty
  7700. }
  7701. function updateSelection(cm) {
  7702. cm.display.input.showSelection(cm.display.input.prepareSelection());
  7703. }
  7704. function prepareSelection(cm, primary) {
  7705. if ( primary === void 0 ) primary = true;
  7706. var doc = cm.doc, result = {};
  7707. var curFragment = result.cursors = document.createDocumentFragment();
  7708. var selFragment = result.selection = document.createDocumentFragment();
  7709. for (var i = 0; i < doc.sel.ranges.length; i++) {
  7710. if (!primary && i == doc.sel.primIndex) { continue }
  7711. var range = doc.sel.ranges[i];
  7712. if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }
  7713. var collapsed = range.empty();
  7714. if (collapsed || cm.options.showCursorWhenSelecting)
  7715. { drawSelectionCursor(cm, range.head, curFragment); }
  7716. if (!collapsed)
  7717. { drawSelectionRange(cm, range, selFragment); }
  7718. }
  7719. return result
  7720. }
  7721. // Draws a cursor for the given range
  7722. function drawSelectionCursor(cm, head, output) {
  7723. var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);
  7724. var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
  7725. cursor.style.left = pos.left + "px";
  7726. cursor.style.top = pos.top + "px";
  7727. cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
  7728. if (pos.other) {
  7729. // Secondary cursor, shown when on a 'jump' in bi-directional text
  7730. var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
  7731. otherCursor.style.display = "";
  7732. otherCursor.style.left = pos.other.left + "px";
  7733. otherCursor.style.top = pos.other.top + "px";
  7734. otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
  7735. }
  7736. }
  7737. function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }
  7738. // Draws the given range as a highlighted selection
  7739. function drawSelectionRange(cm, range, output) {
  7740. var display = cm.display, doc = cm.doc;
  7741. var fragment = document.createDocumentFragment();
  7742. var padding = paddingH(cm.display), leftSide = padding.left;
  7743. var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
  7744. var docLTR = doc.direction == "ltr";
  7745. function add(left, top, width, bottom) {
  7746. if (top < 0) { top = 0; }
  7747. top = Math.round(top);
  7748. bottom = Math.round(bottom);
  7749. fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px")));
  7750. }
  7751. function drawForLine(line, fromArg, toArg) {
  7752. var lineObj = getLine(doc, line);
  7753. var lineLen = lineObj.text.length;
  7754. var start, end;
  7755. function coords(ch, bias) {
  7756. return charCoords(cm, Pos(line, ch), "div", lineObj, bias)
  7757. }
  7758. function wrapX(pos, dir, side) {
  7759. var extent = wrappedLineExtentChar(cm, lineObj, null, pos);
  7760. var prop = (dir == "ltr") == (side == "after") ? "left" : "right";
  7761. var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);
  7762. return coords(ch, prop)[prop]
  7763. }
  7764. var order = getOrder(lineObj, doc.direction);
  7765. iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {
  7766. var ltr = dir == "ltr";
  7767. var fromPos = coords(from, ltr ? "left" : "right");
  7768. var toPos = coords(to - 1, ltr ? "right" : "left");
  7769. var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;
  7770. var first = i == 0, last = !order || i == order.length - 1;
  7771. if (toPos.top - fromPos.top <= 3) { // Single line
  7772. var openLeft = (docLTR ? openStart : openEnd) && first;
  7773. var openRight = (docLTR ? openEnd : openStart) && last;
  7774. var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;
  7775. var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;
  7776. add(left, fromPos.top, right - left, fromPos.bottom);
  7777. } else { // Multiple lines
  7778. var topLeft, topRight, botLeft, botRight;
  7779. if (ltr) {
  7780. topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
  7781. topRight = docLTR ? rightSide : wrapX(from, dir, "before");
  7782. botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
  7783. botRight = docLTR && openEnd && last ? rightSide : toPos.right;
  7784. } else {
  7785. topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");
  7786. topRight = !docLTR && openStart && first ? rightSide : fromPos.right;
  7787. botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;
  7788. botRight = !docLTR ? rightSide : wrapX(to, dir, "after");
  7789. }
  7790. add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);
  7791. if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }
  7792. add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);
  7793. }
  7794. if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }
  7795. if (cmpCoords(toPos, start) < 0) { start = toPos; }
  7796. if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }
  7797. if (cmpCoords(toPos, end) < 0) { end = toPos; }
  7798. });
  7799. return {start: start, end: end}
  7800. }
  7801. var sFrom = range.from(), sTo = range.to();
  7802. if (sFrom.line == sTo.line) {
  7803. drawForLine(sFrom.line, sFrom.ch, sTo.ch);
  7804. } else {
  7805. var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
  7806. var singleVLine = visualLine(fromLine) == visualLine(toLine);
  7807. var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
  7808. var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
  7809. if (singleVLine) {
  7810. if (leftEnd.top < rightStart.top - 2) {
  7811. add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
  7812. add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
  7813. } else {
  7814. add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
  7815. }
  7816. }
  7817. if (leftEnd.bottom < rightStart.top)
  7818. { add(leftSide, leftEnd.bottom, null, rightStart.top); }
  7819. }
  7820. output.appendChild(fragment);
  7821. }
  7822. // Cursor-blinking
  7823. function restartBlink(cm) {
  7824. if (!cm.state.focused) { return }
  7825. var display = cm.display;
  7826. clearInterval(display.blinker);
  7827. var on = true;
  7828. display.cursorDiv.style.visibility = "";
  7829. if (cm.options.cursorBlinkRate > 0)
  7830. { display.blinker = setInterval(function () {
  7831. if (!cm.hasFocus()) { onBlur(cm); }
  7832. display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
  7833. }, cm.options.cursorBlinkRate); }
  7834. else if (cm.options.cursorBlinkRate < 0)
  7835. { display.cursorDiv.style.visibility = "hidden"; }
  7836. }
  7837. function ensureFocus(cm) {
  7838. if (!cm.hasFocus()) {
  7839. cm.display.input.focus();
  7840. if (!cm.state.focused) { onFocus(cm); }
  7841. }
  7842. }
  7843. function delayBlurEvent(cm) {
  7844. cm.state.delayingBlurEvent = true;
  7845. setTimeout(function () { if (cm.state.delayingBlurEvent) {
  7846. cm.state.delayingBlurEvent = false;
  7847. if (cm.state.focused) { onBlur(cm); }
  7848. } }, 100);
  7849. }
  7850. function onFocus(cm, e) {
  7851. if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }
  7852. if (cm.options.readOnly == "nocursor") { return }
  7853. if (!cm.state.focused) {
  7854. signal(cm, "focus", cm, e);
  7855. cm.state.focused = true;
  7856. addClass(cm.display.wrapper, "CodeMirror-focused");
  7857. // This test prevents this from firing when a context
  7858. // menu is closed (since the input reset would kill the
  7859. // select-all detection hack)
  7860. if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
  7861. cm.display.input.reset();
  7862. if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730
  7863. }
  7864. cm.display.input.receivedFocus();
  7865. }
  7866. restartBlink(cm);
  7867. }
  7868. function onBlur(cm, e) {
  7869. if (cm.state.delayingBlurEvent) { return }
  7870. if (cm.state.focused) {
  7871. signal(cm, "blur", cm, e);
  7872. cm.state.focused = false;
  7873. rmClass(cm.display.wrapper, "CodeMirror-focused");
  7874. }
  7875. clearInterval(cm.display.blinker);
  7876. setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);
  7877. }
  7878. // Read the actual heights of the rendered lines, and update their
  7879. // stored heights to match.
  7880. function updateHeightsInViewport(cm) {
  7881. var display = cm.display;
  7882. var prevBottom = display.lineDiv.offsetTop;
  7883. for (var i = 0; i < display.view.length; i++) {
  7884. var cur = display.view[i], wrapping = cm.options.lineWrapping;
  7885. var height = (void 0), width = 0;
  7886. if (cur.hidden) { continue }
  7887. if (ie && ie_version < 8) {
  7888. var bot = cur.node.offsetTop + cur.node.offsetHeight;
  7889. height = bot - prevBottom;
  7890. prevBottom = bot;
  7891. } else {
  7892. var box = cur.node.getBoundingClientRect();
  7893. height = box.bottom - box.top;
  7894. // Check that lines don't extend past the right of the current
  7895. // editor width
  7896. if (!wrapping && cur.text.firstChild)
  7897. { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }
  7898. }
  7899. var diff = cur.line.height - height;
  7900. if (diff > .005 || diff < -.005) {
  7901. updateLineHeight(cur.line, height);
  7902. updateWidgetHeight(cur.line);
  7903. if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
  7904. { updateWidgetHeight(cur.rest[j]); } }
  7905. }
  7906. if (width > cm.display.sizerWidth) {
  7907. var chWidth = Math.ceil(width / charWidth(cm.display));
  7908. if (chWidth > cm.display.maxLineLength) {
  7909. cm.display.maxLineLength = chWidth;
  7910. cm.display.maxLine = cur.line;
  7911. cm.display.maxLineChanged = true;
  7912. }
  7913. }
  7914. }
  7915. }
  7916. // Read and store the height of line widgets associated with the
  7917. // given line.
  7918. function updateWidgetHeight(line) {
  7919. if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
  7920. var w = line.widgets[i], parent = w.node.parentNode;
  7921. if (parent) { w.height = parent.offsetHeight; }
  7922. } }
  7923. }
  7924. // Compute the lines that are visible in a given viewport (defaults
  7925. // the the current scroll position). viewport may contain top,
  7926. // height, and ensure (see op.scrollToPos) properties.
  7927. function visibleLines(display, doc, viewport) {
  7928. var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
  7929. top = Math.floor(top - paddingTop(display));
  7930. var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
  7931. var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
  7932. // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
  7933. // forces those lines into the viewport (if possible).
  7934. if (viewport && viewport.ensure) {
  7935. var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;
  7936. if (ensureFrom < from) {
  7937. from = ensureFrom;
  7938. to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
  7939. } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
  7940. from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
  7941. to = ensureTo;
  7942. }
  7943. }
  7944. return {from: from, to: Math.max(to, from + 1)}
  7945. }
  7946. // SCROLLING THINGS INTO VIEW
  7947. // If an editor sits on the top or bottom of the window, partially
  7948. // scrolled out of view, this ensures that the cursor is visible.
  7949. function maybeScrollWindow(cm, rect) {
  7950. if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }
  7951. var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
  7952. if (rect.top + box.top < 0) { doScroll = true; }
  7953. else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }
  7954. if (doScroll != null && !phantom) {
  7955. var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));
  7956. cm.display.lineSpace.appendChild(scrollNode);
  7957. scrollNode.scrollIntoView(doScroll);
  7958. cm.display.lineSpace.removeChild(scrollNode);
  7959. }
  7960. }
  7961. // Scroll a given position into view (immediately), verifying that
  7962. // it actually became visible (as line heights are accurately
  7963. // measured, the position of something may 'drift' during drawing).
  7964. function scrollPosIntoView(cm, pos, end, margin) {
  7965. if (margin == null) { margin = 0; }
  7966. var rect;
  7967. if (!cm.options.lineWrapping && pos == end) {
  7968. // Set pos and end to the cursor positions around the character pos sticks to
  7969. // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
  7970. // If pos == Pos(_, 0, "before"), pos and end are unchanged
  7971. pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
  7972. end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
  7973. }
  7974. for (var limit = 0; limit < 5; limit++) {
  7975. var changed = false;
  7976. var coords = cursorCoords(cm, pos);
  7977. var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
  7978. rect = {left: Math.min(coords.left, endCoords.left),
  7979. top: Math.min(coords.top, endCoords.top) - margin,
  7980. right: Math.max(coords.left, endCoords.left),
  7981. bottom: Math.max(coords.bottom, endCoords.bottom) + margin};
  7982. var scrollPos = calculateScrollPos(cm, rect);
  7983. var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
  7984. if (scrollPos.scrollTop != null) {
  7985. updateScrollTop(cm, scrollPos.scrollTop);
  7986. if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }
  7987. }
  7988. if (scrollPos.scrollLeft != null) {
  7989. setScrollLeft(cm, scrollPos.scrollLeft);
  7990. if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }
  7991. }
  7992. if (!changed) { break }
  7993. }
  7994. return rect
  7995. }
  7996. // Scroll a given set of coordinates into view (immediately).
  7997. function scrollIntoView(cm, rect) {
  7998. var scrollPos = calculateScrollPos(cm, rect);
  7999. if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }
  8000. if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }
  8001. }
  8002. // Calculate a new scroll position needed to scroll the given
  8003. // rectangle into view. Returns an object with scrollTop and
  8004. // scrollLeft properties. When these are undefined, the
  8005. // vertical/horizontal position does not need to be adjusted.
  8006. function calculateScrollPos(cm, rect) {
  8007. var display = cm.display, snapMargin = textHeight(cm.display);
  8008. if (rect.top < 0) { rect.top = 0; }
  8009. var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
  8010. var screen = displayHeight(cm), result = {};
  8011. if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }
  8012. var docBottom = cm.doc.height + paddingVert(display);
  8013. var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;
  8014. if (rect.top < screentop) {
  8015. result.scrollTop = atTop ? 0 : rect.top;
  8016. } else if (rect.bottom > screentop + screen) {
  8017. var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);
  8018. if (newTop != screentop) { result.scrollTop = newTop; }
  8019. }
  8020. var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;
  8021. var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;
  8022. var screenw = displayWidth(cm) - display.gutters.offsetWidth;
  8023. var tooWide = rect.right - rect.left > screenw;
  8024. if (tooWide) { rect.right = rect.left + screenw; }
  8025. if (rect.left < 10)
  8026. { result.scrollLeft = 0; }
  8027. else if (rect.left < screenleft)
  8028. { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }
  8029. else if (rect.right > screenw + screenleft - 3)
  8030. { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }
  8031. return result
  8032. }
  8033. // Store a relative adjustment to the scroll position in the current
  8034. // operation (to be applied when the operation finishes).
  8035. function addToScrollTop(cm, top) {
  8036. if (top == null) { return }
  8037. resolveScrollToPos(cm);
  8038. cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
  8039. }
  8040. // Make sure that at the end of the operation the current cursor is
  8041. // shown.
  8042. function ensureCursorVisible(cm) {
  8043. resolveScrollToPos(cm);
  8044. var cur = cm.getCursor();
  8045. cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};
  8046. }
  8047. function scrollToCoords(cm, x, y) {
  8048. if (x != null || y != null) { resolveScrollToPos(cm); }
  8049. if (x != null) { cm.curOp.scrollLeft = x; }
  8050. if (y != null) { cm.curOp.scrollTop = y; }
  8051. }
  8052. function scrollToRange(cm, range) {
  8053. resolveScrollToPos(cm);
  8054. cm.curOp.scrollToPos = range;
  8055. }
  8056. // When an operation has its scrollToPos property set, and another
  8057. // scroll action is applied before the end of the operation, this
  8058. // 'simulates' scrolling that position into view in a cheap way, so
  8059. // that the effect of intermediate scroll commands is not ignored.
  8060. function resolveScrollToPos(cm) {
  8061. var range = cm.curOp.scrollToPos;
  8062. if (range) {
  8063. cm.curOp.scrollToPos = null;
  8064. var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);
  8065. scrollToCoordsRange(cm, from, to, range.margin);
  8066. }
  8067. }
  8068. function scrollToCoordsRange(cm, from, to, margin) {
  8069. var sPos = calculateScrollPos(cm, {
  8070. left: Math.min(from.left, to.left),
  8071. top: Math.min(from.top, to.top) - margin,
  8072. right: Math.max(from.right, to.right),
  8073. bottom: Math.max(from.bottom, to.bottom) + margin
  8074. });
  8075. scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
  8076. }
  8077. // Sync the scrollable area and scrollbars, ensure the viewport
  8078. // covers the visible area.
  8079. function updateScrollTop(cm, val) {
  8080. if (Math.abs(cm.doc.scrollTop - val) < 2) { return }
  8081. if (!gecko) { updateDisplaySimple(cm, {top: val}); }
  8082. setScrollTop(cm, val, true);
  8083. if (gecko) { updateDisplaySimple(cm); }
  8084. startWorker(cm, 100);
  8085. }
  8086. function setScrollTop(cm, val, forceScroll) {
  8087. val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));
  8088. if (cm.display.scroller.scrollTop == val && !forceScroll) { return }
  8089. cm.doc.scrollTop = val;
  8090. cm.display.scrollbars.setScrollTop(val);
  8091. if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }
  8092. }
  8093. // Sync scroller and scrollbar, ensure the gutter elements are
  8094. // aligned.
  8095. function setScrollLeft(cm, val, isScroller, forceScroll) {
  8096. val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));
  8097. if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }
  8098. cm.doc.scrollLeft = val;
  8099. alignHorizontally(cm);
  8100. if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }
  8101. cm.display.scrollbars.setScrollLeft(val);
  8102. }
  8103. // SCROLLBARS
  8104. // Prepare DOM reads needed to update the scrollbars. Done in one
  8105. // shot to minimize update/measure roundtrips.
  8106. function measureForScrollbars(cm) {
  8107. var d = cm.display, gutterW = d.gutters.offsetWidth;
  8108. var docH = Math.round(cm.doc.height + paddingVert(cm.display));
  8109. return {
  8110. clientHeight: d.scroller.clientHeight,
  8111. viewHeight: d.wrapper.clientHeight,
  8112. scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,
  8113. viewWidth: d.wrapper.clientWidth,
  8114. barLeft: cm.options.fixedGutter ? gutterW : 0,
  8115. docHeight: docH,
  8116. scrollHeight: docH + scrollGap(cm) + d.barHeight,
  8117. nativeBarWidth: d.nativeBarWidth,
  8118. gutterWidth: gutterW
  8119. }
  8120. }
  8121. var NativeScrollbars = function(place, scroll, cm) {
  8122. this.cm = cm;
  8123. var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
  8124. var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
  8125. vert.tabIndex = horiz.tabIndex = -1;
  8126. place(vert); place(horiz);
  8127. on(vert, "scroll", function () {
  8128. if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); }
  8129. });
  8130. on(horiz, "scroll", function () {
  8131. if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); }
  8132. });
  8133. this.checkedZeroWidth = false;
  8134. // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
  8135. if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; }
  8136. };
  8137. NativeScrollbars.prototype.update = function (measure) {
  8138. var needsH = measure.scrollWidth > measure.clientWidth + 1;
  8139. var needsV = measure.scrollHeight > measure.clientHeight + 1;
  8140. var sWidth = measure.nativeBarWidth;
  8141. if (needsV) {
  8142. this.vert.style.display = "block";
  8143. this.vert.style.bottom = needsH ? sWidth + "px" : "0";
  8144. var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
  8145. // A bug in IE8 can cause this value to be negative, so guard it.
  8146. this.vert.firstChild.style.height =
  8147. Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
  8148. } else {
  8149. this.vert.style.display = "";
  8150. this.vert.firstChild.style.height = "0";
  8151. }
  8152. if (needsH) {
  8153. this.horiz.style.display = "block";
  8154. this.horiz.style.right = needsV ? sWidth + "px" : "0";
  8155. this.horiz.style.left = measure.barLeft + "px";
  8156. var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
  8157. this.horiz.firstChild.style.width =
  8158. Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
  8159. } else {
  8160. this.horiz.style.display = "";
  8161. this.horiz.firstChild.style.width = "0";
  8162. }
  8163. if (!this.checkedZeroWidth && measure.clientHeight > 0) {
  8164. if (sWidth == 0) { this.zeroWidthHack(); }
  8165. this.checkedZeroWidth = true;
  8166. }
  8167. return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}
  8168. };
  8169. NativeScrollbars.prototype.setScrollLeft = function (pos) {
  8170. if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }
  8171. if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); }
  8172. };
  8173. NativeScrollbars.prototype.setScrollTop = function (pos) {
  8174. if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }
  8175. if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); }
  8176. };
  8177. NativeScrollbars.prototype.zeroWidthHack = function () {
  8178. var w = mac && !mac_geMountainLion ? "12px" : "18px";
  8179. this.horiz.style.height = this.vert.style.width = w;
  8180. this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
  8181. this.disableHoriz = new Delayed;
  8182. this.disableVert = new Delayed;
  8183. };
  8184. NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {
  8185. bar.style.pointerEvents = "auto";
  8186. function maybeDisable() {
  8187. // To find out whether the scrollbar is still visible, we
  8188. // check whether the element under the pixel in the bottom
  8189. // right corner of the scrollbar box is the scrollbar box
  8190. // itself (when the bar is still visible) or its filler child
  8191. // (when the bar is hidden). If it is still visible, we keep
  8192. // it enabled, if it's hidden, we disable pointer events.
  8193. var box = bar.getBoundingClientRect();
  8194. var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)
  8195. : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);
  8196. if (elt != bar) { bar.style.pointerEvents = "none"; }
  8197. else { delay.set(1000, maybeDisable); }
  8198. }
  8199. delay.set(1000, maybeDisable);
  8200. };
  8201. NativeScrollbars.prototype.clear = function () {
  8202. var parent = this.horiz.parentNode;
  8203. parent.removeChild(this.horiz);
  8204. parent.removeChild(this.vert);
  8205. };
  8206. var NullScrollbars = function () {};
  8207. NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };
  8208. NullScrollbars.prototype.setScrollLeft = function () {};
  8209. NullScrollbars.prototype.setScrollTop = function () {};
  8210. NullScrollbars.prototype.clear = function () {};
  8211. function updateScrollbars(cm, measure) {
  8212. if (!measure) { measure = measureForScrollbars(cm); }
  8213. var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;
  8214. updateScrollbarsInner(cm, measure);
  8215. for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
  8216. if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
  8217. { updateHeightsInViewport(cm); }
  8218. updateScrollbarsInner(cm, measureForScrollbars(cm));
  8219. startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;
  8220. }
  8221. }
  8222. // Re-synchronize the fake scrollbars with the actual size of the
  8223. // content.
  8224. function updateScrollbarsInner(cm, measure) {
  8225. var d = cm.display;
  8226. var sizes = d.scrollbars.update(measure);
  8227. d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
  8228. d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
  8229. d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";
  8230. if (sizes.right && sizes.bottom) {
  8231. d.scrollbarFiller.style.display = "block";
  8232. d.scrollbarFiller.style.height = sizes.bottom + "px";
  8233. d.scrollbarFiller.style.width = sizes.right + "px";
  8234. } else { d.scrollbarFiller.style.display = ""; }
  8235. if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
  8236. d.gutterFiller.style.display = "block";
  8237. d.gutterFiller.style.height = sizes.bottom + "px";
  8238. d.gutterFiller.style.width = measure.gutterWidth + "px";
  8239. } else { d.gutterFiller.style.display = ""; }
  8240. }
  8241. var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};
  8242. function initScrollbars(cm) {
  8243. if (cm.display.scrollbars) {
  8244. cm.display.scrollbars.clear();
  8245. if (cm.display.scrollbars.addClass)
  8246. { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
  8247. }
  8248. cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
  8249. cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
  8250. // Prevent clicks in the scrollbars from killing focus
  8251. on(node, "mousedown", function () {
  8252. if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }
  8253. });
  8254. node.setAttribute("cm-not-content", "true");
  8255. }, function (pos, axis) {
  8256. if (axis == "horizontal") { setScrollLeft(cm, pos); }
  8257. else { updateScrollTop(cm, pos); }
  8258. }, cm);
  8259. if (cm.display.scrollbars.addClass)
  8260. { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
  8261. }
  8262. // Operations are used to wrap a series of changes to the editor
  8263. // state in such a way that each change won't have to update the
  8264. // cursor and display (which would be awkward, slow, and
  8265. // error-prone). Instead, display updates are batched and then all
  8266. // combined and executed at once.
  8267. var nextOpId = 0;
  8268. // Start a new operation.
  8269. function startOperation(cm) {
  8270. cm.curOp = {
  8271. cm: cm,
  8272. viewChanged: false, // Flag that indicates that lines might need to be redrawn
  8273. startHeight: cm.doc.height, // Used to detect need to update scrollbar
  8274. forceUpdate: false, // Used to force a redraw
  8275. updateInput: 0, // Whether to reset the input textarea
  8276. typing: false, // Whether this reset should be careful to leave existing text (for compositing)
  8277. changeObjs: null, // Accumulated changes, for firing change events
  8278. cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
  8279. cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already
  8280. selectionChanged: false, // Whether the selection needs to be redrawn
  8281. updateMaxLine: false, // Set when the widest line needs to be determined anew
  8282. scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
  8283. scrollToPos: null, // Used to scroll to a specific position
  8284. focus: false,
  8285. id: ++nextOpId // Unique ID
  8286. };
  8287. pushOperation(cm.curOp);
  8288. }
  8289. // Finish an operation, updating the display and signalling delayed events
  8290. function endOperation(cm) {
  8291. var op = cm.curOp;
  8292. if (op) { finishOperation(op, function (group) {
  8293. for (var i = 0; i < group.ops.length; i++)
  8294. { group.ops[i].cm.curOp = null; }
  8295. endOperations(group);
  8296. }); }
  8297. }
  8298. // The DOM updates done when an operation finishes are batched so
  8299. // that the minimum number of relayouts are required.
  8300. function endOperations(group) {
  8301. var ops = group.ops;
  8302. for (var i = 0; i < ops.length; i++) // Read DOM
  8303. { endOperation_R1(ops[i]); }
  8304. for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
  8305. { endOperation_W1(ops[i$1]); }
  8306. for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
  8307. { endOperation_R2(ops[i$2]); }
  8308. for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
  8309. { endOperation_W2(ops[i$3]); }
  8310. for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
  8311. { endOperation_finish(ops[i$4]); }
  8312. }
  8313. function endOperation_R1(op) {
  8314. var cm = op.cm, display = cm.display;
  8315. maybeClipScrollbars(cm);
  8316. if (op.updateMaxLine) { findMaxLine(cm); }
  8317. op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
  8318. op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
  8319. op.scrollToPos.to.line >= display.viewTo) ||
  8320. display.maxLineChanged && cm.options.lineWrapping;
  8321. op.update = op.mustUpdate &&
  8322. new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
  8323. }
  8324. function endOperation_W1(op) {
  8325. op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
  8326. }
  8327. function endOperation_R2(op) {
  8328. var cm = op.cm, display = cm.display;
  8329. if (op.updatedDisplay) { updateHeightsInViewport(cm); }
  8330. op.barMeasure = measureForScrollbars(cm);
  8331. // If the max line changed since it was last measured, measure it,
  8332. // and ensure the document's width matches it.
  8333. // updateDisplay_W2 will use these properties to do the actual resizing
  8334. if (display.maxLineChanged && !cm.options.lineWrapping) {
  8335. op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
  8336. cm.display.sizerWidth = op.adjustWidthTo;
  8337. op.barMeasure.scrollWidth =
  8338. Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
  8339. op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
  8340. }
  8341. if (op.updatedDisplay || op.selectionChanged)
  8342. { op.preparedSelection = display.input.prepareSelection(); }
  8343. }
  8344. function endOperation_W2(op) {
  8345. var cm = op.cm;
  8346. if (op.adjustWidthTo != null) {
  8347. cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
  8348. if (op.maxScrollLeft < cm.doc.scrollLeft)
  8349. { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }
  8350. cm.display.maxLineChanged = false;
  8351. }
  8352. var takeFocus = op.focus && op.focus == activeElt();
  8353. if (op.preparedSelection)
  8354. { cm.display.input.showSelection(op.preparedSelection, takeFocus); }
  8355. if (op.updatedDisplay || op.startHeight != cm.doc.height)
  8356. { updateScrollbars(cm, op.barMeasure); }
  8357. if (op.updatedDisplay)
  8358. { setDocumentHeight(cm, op.barMeasure); }
  8359. if (op.selectionChanged) { restartBlink(cm); }
  8360. if (cm.state.focused && op.updateInput)
  8361. { cm.display.input.reset(op.typing); }
  8362. if (takeFocus) { ensureFocus(op.cm); }
  8363. }
  8364. function endOperation_finish(op) {
  8365. var cm = op.cm, display = cm.display, doc = cm.doc;
  8366. if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }
  8367. // Abort mouse wheel delta measurement, when scrolling explicitly
  8368. if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
  8369. { display.wheelStartX = display.wheelStartY = null; }
  8370. // Propagate the scroll position to the actual DOM scroller
  8371. if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }
  8372. if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }
  8373. // If we need to scroll a specific position into view, do so.
  8374. if (op.scrollToPos) {
  8375. var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
  8376. clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
  8377. maybeScrollWindow(cm, rect);
  8378. }
  8379. // Fire events for markers that are hidden/unidden by editing or
  8380. // undoing
  8381. var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
  8382. if (hidden) { for (var i = 0; i < hidden.length; ++i)
  8383. { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } }
  8384. if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)
  8385. { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } }
  8386. if (display.wrapper.offsetHeight)
  8387. { doc.scrollTop = cm.display.scroller.scrollTop; }
  8388. // Fire change events, and delayed event handlers
  8389. if (op.changeObjs)
  8390. { signal(cm, "changes", cm, op.changeObjs); }
  8391. if (op.update)
  8392. { op.update.finish(); }
  8393. }
  8394. // Run the given function in an operation
  8395. function runInOp(cm, f) {
  8396. if (cm.curOp) { return f() }
  8397. startOperation(cm);
  8398. try { return f() }
  8399. finally { endOperation(cm); }
  8400. }
  8401. // Wraps a function in an operation. Returns the wrapped function.
  8402. function operation(cm, f) {
  8403. return function() {
  8404. if (cm.curOp) { return f.apply(cm, arguments) }
  8405. startOperation(cm);
  8406. try { return f.apply(cm, arguments) }
  8407. finally { endOperation(cm); }
  8408. }
  8409. }
  8410. // Used to add methods to editor and doc instances, wrapping them in
  8411. // operations.
  8412. function methodOp(f) {
  8413. return function() {
  8414. if (this.curOp) { return f.apply(this, arguments) }
  8415. startOperation(this);
  8416. try { return f.apply(this, arguments) }
  8417. finally { endOperation(this); }
  8418. }
  8419. }
  8420. function docMethodOp(f) {
  8421. return function() {
  8422. var cm = this.cm;
  8423. if (!cm || cm.curOp) { return f.apply(this, arguments) }
  8424. startOperation(cm);
  8425. try { return f.apply(this, arguments) }
  8426. finally { endOperation(cm); }
  8427. }
  8428. }
  8429. // HIGHLIGHT WORKER
  8430. function startWorker(cm, time) {
  8431. if (cm.doc.highlightFrontier < cm.display.viewTo)
  8432. { cm.state.highlight.set(time, bind(highlightWorker, cm)); }
  8433. }
  8434. function highlightWorker(cm) {
  8435. var doc = cm.doc;
  8436. if (doc.highlightFrontier >= cm.display.viewTo) { return }
  8437. var end = +new Date + cm.options.workTime;
  8438. var context = getContextBefore(cm, doc.highlightFrontier);
  8439. var changedLines = [];
  8440. doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
  8441. if (context.line >= cm.display.viewFrom) { // Visible
  8442. var oldStyles = line.styles;
  8443. var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;
  8444. var highlighted = highlightLine(cm, line, context, true);
  8445. if (resetState) { context.state = resetState; }
  8446. line.styles = highlighted.styles;
  8447. var oldCls = line.styleClasses, newCls = highlighted.classes;
  8448. if (newCls) { line.styleClasses = newCls; }
  8449. else if (oldCls) { line.styleClasses = null; }
  8450. var ischange = !oldStyles || oldStyles.length != line.styles.length ||
  8451. oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
  8452. for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }
  8453. if (ischange) { changedLines.push(context.line); }
  8454. line.stateAfter = context.save();
  8455. context.nextLine();
  8456. } else {
  8457. if (line.text.length <= cm.options.maxHighlightLength)
  8458. { processLine(cm, line.text, context); }
  8459. line.stateAfter = context.line % 5 == 0 ? context.save() : null;
  8460. context.nextLine();
  8461. }
  8462. if (+new Date > end) {
  8463. startWorker(cm, cm.options.workDelay);
  8464. return true
  8465. }
  8466. });
  8467. doc.highlightFrontier = context.line;
  8468. doc.modeFrontier = Math.max(doc.modeFrontier, context.line);
  8469. if (changedLines.length) { runInOp(cm, function () {
  8470. for (var i = 0; i < changedLines.length; i++)
  8471. { regLineChange(cm, changedLines[i], "text"); }
  8472. }); }
  8473. }
  8474. // DISPLAY DRAWING
  8475. var DisplayUpdate = function(cm, viewport, force) {
  8476. var display = cm.display;
  8477. this.viewport = viewport;
  8478. // Store some values that we'll need later (but don't want to force a relayout for)
  8479. this.visible = visibleLines(display, cm.doc, viewport);
  8480. this.editorIsHidden = !display.wrapper.offsetWidth;
  8481. this.wrapperHeight = display.wrapper.clientHeight;
  8482. this.wrapperWidth = display.wrapper.clientWidth;
  8483. this.oldDisplayWidth = displayWidth(cm);
  8484. this.force = force;
  8485. this.dims = getDimensions(cm);
  8486. this.events = [];
  8487. };
  8488. DisplayUpdate.prototype.signal = function (emitter, type) {
  8489. if (hasHandler(emitter, type))
  8490. { this.events.push(arguments); }
  8491. };
  8492. DisplayUpdate.prototype.finish = function () {
  8493. for (var i = 0; i < this.events.length; i++)
  8494. { signal.apply(null, this.events[i]); }
  8495. };
  8496. function maybeClipScrollbars(cm) {
  8497. var display = cm.display;
  8498. if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
  8499. display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
  8500. display.heightForcer.style.height = scrollGap(cm) + "px";
  8501. display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
  8502. display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
  8503. display.scrollbarsClipped = true;
  8504. }
  8505. }
  8506. function selectionSnapshot(cm) {
  8507. if (cm.hasFocus()) { return null }
  8508. var active = activeElt();
  8509. if (!active || !contains(cm.display.lineDiv, active)) { return null }
  8510. var result = {activeElt: active};
  8511. if (window.getSelection) {
  8512. var sel = window.getSelection();
  8513. if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
  8514. result.anchorNode = sel.anchorNode;
  8515. result.anchorOffset = sel.anchorOffset;
  8516. result.focusNode = sel.focusNode;
  8517. result.focusOffset = sel.focusOffset;
  8518. }
  8519. }
  8520. return result
  8521. }
  8522. function restoreSelection(snapshot) {
  8523. if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }
  8524. snapshot.activeElt.focus();
  8525. if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&
  8526. snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
  8527. var sel = window.getSelection(), range = document.createRange();
  8528. range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
  8529. range.collapse(false);
  8530. sel.removeAllRanges();
  8531. sel.addRange(range);
  8532. sel.extend(snapshot.focusNode, snapshot.focusOffset);
  8533. }
  8534. }
  8535. // Does the actual updating of the line display. Bails out
  8536. // (returning false) when there is nothing to be done and forced is
  8537. // false.
  8538. function updateDisplayIfNeeded(cm, update) {
  8539. var display = cm.display, doc = cm.doc;
  8540. if (update.editorIsHidden) {
  8541. resetView(cm);
  8542. return false
  8543. }
  8544. // Bail out if the visible area is already rendered and nothing changed.
  8545. if (!update.force &&
  8546. update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&
  8547. (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
  8548. display.renderedView == display.view && countDirtyView(cm) == 0)
  8549. { return false }
  8550. if (maybeUpdateLineNumberWidth(cm)) {
  8551. resetView(cm);
  8552. update.dims = getDimensions(cm);
  8553. }
  8554. // Compute a suitable new viewport (from & to)
  8555. var end = doc.first + doc.size;
  8556. var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
  8557. var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
  8558. if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }
  8559. if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }
  8560. if (sawCollapsedSpans) {
  8561. from = visualLineNo(cm.doc, from);
  8562. to = visualLineEndNo(cm.doc, to);
  8563. }
  8564. var different = from != display.viewFrom || to != display.viewTo ||
  8565. display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
  8566. adjustView(cm, from, to);
  8567. display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
  8568. // Position the mover div to align with the current scroll position
  8569. cm.display.mover.style.top = display.viewOffset + "px";
  8570. var toUpdate = countDirtyView(cm);
  8571. if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
  8572. (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
  8573. { return false }
  8574. // For big changes, we hide the enclosing element during the
  8575. // update, since that speeds up the operations on most browsers.
  8576. var selSnapshot = selectionSnapshot(cm);
  8577. if (toUpdate > 4) { display.lineDiv.style.display = "none"; }
  8578. patchDisplay(cm, display.updateLineNumbers, update.dims);
  8579. if (toUpdate > 4) { display.lineDiv.style.display = ""; }
  8580. display.renderedView = display.view;
  8581. // There might have been a widget with a focused element that got
  8582. // hidden or updated, if so re-focus it.
  8583. restoreSelection(selSnapshot);
  8584. // Prevent selection and cursors from interfering with the scroll
  8585. // width and height.
  8586. removeChildren(display.cursorDiv);
  8587. removeChildren(display.selectionDiv);
  8588. display.gutters.style.height = display.sizer.style.minHeight = 0;
  8589. if (different) {
  8590. display.lastWrapHeight = update.wrapperHeight;
  8591. display.lastWrapWidth = update.wrapperWidth;
  8592. startWorker(cm, 400);
  8593. }
  8594. display.updateLineNumbers = null;
  8595. return true
  8596. }
  8597. function postUpdateDisplay(cm, update) {
  8598. var viewport = update.viewport;
  8599. for (var first = true;; first = false) {
  8600. if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
  8601. // Clip forced viewport to actual scrollable area.
  8602. if (viewport && viewport.top != null)
  8603. { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }
  8604. // Updated line heights might result in the drawn area not
  8605. // actually covering the viewport. Keep looping until it does.
  8606. update.visible = visibleLines(cm.display, cm.doc, viewport);
  8607. if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
  8608. { break }
  8609. } else if (first) {
  8610. update.visible = visibleLines(cm.display, cm.doc, viewport);
  8611. }
  8612. if (!updateDisplayIfNeeded(cm, update)) { break }
  8613. updateHeightsInViewport(cm);
  8614. var barMeasure = measureForScrollbars(cm);
  8615. updateSelection(cm);
  8616. updateScrollbars(cm, barMeasure);
  8617. setDocumentHeight(cm, barMeasure);
  8618. update.force = false;
  8619. }
  8620. update.signal(cm, "update", cm);
  8621. if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
  8622. update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
  8623. cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
  8624. }
  8625. }
  8626. function updateDisplaySimple(cm, viewport) {
  8627. var update = new DisplayUpdate(cm, viewport);
  8628. if (updateDisplayIfNeeded(cm, update)) {
  8629. updateHeightsInViewport(cm);
  8630. postUpdateDisplay(cm, update);
  8631. var barMeasure = measureForScrollbars(cm);
  8632. updateSelection(cm);
  8633. updateScrollbars(cm, barMeasure);
  8634. setDocumentHeight(cm, barMeasure);
  8635. update.finish();
  8636. }
  8637. }
  8638. // Sync the actual display DOM structure with display.view, removing
  8639. // nodes for lines that are no longer in view, and creating the ones
  8640. // that are not there yet, and updating the ones that are out of
  8641. // date.
  8642. function patchDisplay(cm, updateNumbersFrom, dims) {
  8643. var display = cm.display, lineNumbers = cm.options.lineNumbers;
  8644. var container = display.lineDiv, cur = container.firstChild;
  8645. function rm(node) {
  8646. var next = node.nextSibling;
  8647. // Works around a throw-scroll bug in OS X Webkit
  8648. if (webkit && mac && cm.display.currentWheelTarget == node)
  8649. { node.style.display = "none"; }
  8650. else
  8651. { node.parentNode.removeChild(node); }
  8652. return next
  8653. }
  8654. var view = display.view, lineN = display.viewFrom;
  8655. // Loop over the elements in the view, syncing cur (the DOM nodes
  8656. // in display.lineDiv) with the view as we go.
  8657. for (var i = 0; i < view.length; i++) {
  8658. var lineView = view[i];
  8659. if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
  8660. var node = buildLineElement(cm, lineView, lineN, dims);
  8661. container.insertBefore(node, cur);
  8662. } else { // Already drawn
  8663. while (cur != lineView.node) { cur = rm(cur); }
  8664. var updateNumber = lineNumbers && updateNumbersFrom != null &&
  8665. updateNumbersFrom <= lineN && lineView.lineNumber;
  8666. if (lineView.changes) {
  8667. if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; }
  8668. updateLineForChanges(cm, lineView, lineN, dims);
  8669. }
  8670. if (updateNumber) {
  8671. removeChildren(lineView.lineNumber);
  8672. lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
  8673. }
  8674. cur = lineView.node.nextSibling;
  8675. }
  8676. lineN += lineView.size;
  8677. }
  8678. while (cur) { cur = rm(cur); }
  8679. }
  8680. function updateGutterSpace(display) {
  8681. var width = display.gutters.offsetWidth;
  8682. display.sizer.style.marginLeft = width + "px";
  8683. // Send an event to consumers responding to changes in gutter width.
  8684. signalLater(display, "gutterChanged", display);
  8685. }
  8686. function setDocumentHeight(cm, measure) {
  8687. cm.display.sizer.style.minHeight = measure.docHeight + "px";
  8688. cm.display.heightForcer.style.top = measure.docHeight + "px";
  8689. cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
  8690. }
  8691. // Re-align line numbers and gutter marks to compensate for
  8692. // horizontal scrolling.
  8693. function alignHorizontally(cm) {
  8694. var display = cm.display, view = display.view;
  8695. if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }
  8696. var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
  8697. var gutterW = display.gutters.offsetWidth, left = comp + "px";
  8698. for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {
  8699. if (cm.options.fixedGutter) {
  8700. if (view[i].gutter)
  8701. { view[i].gutter.style.left = left; }
  8702. if (view[i].gutterBackground)
  8703. { view[i].gutterBackground.style.left = left; }
  8704. }
  8705. var align = view[i].alignable;
  8706. if (align) { for (var j = 0; j < align.length; j++)
  8707. { align[j].style.left = left; } }
  8708. } }
  8709. if (cm.options.fixedGutter)
  8710. { display.gutters.style.left = (comp + gutterW) + "px"; }
  8711. }
  8712. // Used to ensure that the line number gutter is still the right
  8713. // size for the current document size. Returns true when an update
  8714. // is needed.
  8715. function maybeUpdateLineNumberWidth(cm) {
  8716. if (!cm.options.lineNumbers) { return false }
  8717. var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
  8718. if (last.length != display.lineNumChars) {
  8719. var test = display.measure.appendChild(elt("div", [elt("div", last)],
  8720. "CodeMirror-linenumber CodeMirror-gutter-elt"));
  8721. var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
  8722. display.lineGutter.style.width = "";
  8723. display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
  8724. display.lineNumWidth = display.lineNumInnerWidth + padding;
  8725. display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
  8726. display.lineGutter.style.width = display.lineNumWidth + "px";
  8727. updateGutterSpace(cm.display);
  8728. return true
  8729. }
  8730. return false
  8731. }
  8732. function getGutters(gutters, lineNumbers) {
  8733. var result = [], sawLineNumbers = false;
  8734. for (var i = 0; i < gutters.length; i++) {
  8735. var name = gutters[i], style = null;
  8736. if (typeof name != "string") { style = name.style; name = name.className; }
  8737. if (name == "CodeMirror-linenumbers") {
  8738. if (!lineNumbers) { continue }
  8739. else { sawLineNumbers = true; }
  8740. }
  8741. result.push({className: name, style: style});
  8742. }
  8743. if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); }
  8744. return result
  8745. }
  8746. // Rebuild the gutter elements, ensure the margin to the left of the
  8747. // code matches their width.
  8748. function renderGutters(display) {
  8749. var gutters = display.gutters, specs = display.gutterSpecs;
  8750. removeChildren(gutters);
  8751. display.lineGutter = null;
  8752. for (var i = 0; i < specs.length; ++i) {
  8753. var ref = specs[i];
  8754. var className = ref.className;
  8755. var style = ref.style;
  8756. var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));
  8757. if (style) { gElt.style.cssText = style; }
  8758. if (className == "CodeMirror-linenumbers") {
  8759. display.lineGutter = gElt;
  8760. gElt.style.width = (display.lineNumWidth || 1) + "px";
  8761. }
  8762. }
  8763. gutters.style.display = specs.length ? "" : "none";
  8764. updateGutterSpace(display);
  8765. }
  8766. function updateGutters(cm) {
  8767. renderGutters(cm.display);
  8768. regChange(cm);
  8769. alignHorizontally(cm);
  8770. }
  8771. // The display handles the DOM integration, both for input reading
  8772. // and content drawing. It holds references to DOM nodes and
  8773. // display-related state.
  8774. function Display(place, doc, input, options) {
  8775. var d = this;
  8776. this.input = input;
  8777. // Covers bottom-right square when both scrollbars are present.
  8778. d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
  8779. d.scrollbarFiller.setAttribute("cm-not-content", "true");
  8780. // Covers bottom of gutter when coverGutterNextToScrollbar is on
  8781. // and h scrollbar is present.
  8782. d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
  8783. d.gutterFiller.setAttribute("cm-not-content", "true");
  8784. // Will contain the actual code, positioned to cover the viewport.
  8785. d.lineDiv = eltP("div", null, "CodeMirror-code");
  8786. // Elements are added to these to represent selection and cursors.
  8787. d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
  8788. d.cursorDiv = elt("div", null, "CodeMirror-cursors");
  8789. // A visibility: hidden element used to find the size of things.
  8790. d.measure = elt("div", null, "CodeMirror-measure");
  8791. // When lines outside of the viewport are measured, they are drawn in this.
  8792. d.lineMeasure = elt("div", null, "CodeMirror-measure");
  8793. // Wraps everything that needs to exist inside the vertically-padded coordinate system
  8794. d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
  8795. null, "position: relative; outline: none");
  8796. var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
  8797. // Moved around its parent to cover visible view.
  8798. d.mover = elt("div", [lines], null, "position: relative");
  8799. // Set to the height of the document, allowing scrolling.
  8800. d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
  8801. d.sizerWidth = null;
  8802. // Behavior of elts with overflow: auto and padding is
  8803. // inconsistent across browsers. This is used to ensure the
  8804. // scrollable area is big enough.
  8805. d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
  8806. // Will contain the gutters, if any.
  8807. d.gutters = elt("div", null, "CodeMirror-gutters");
  8808. d.lineGutter = null;
  8809. // Actual scrollable element.
  8810. d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
  8811. d.scroller.setAttribute("tabIndex", "-1");
  8812. // The element in which the editor lives.
  8813. d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
  8814. // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
  8815. if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
  8816. if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
  8817. if (place) {
  8818. if (place.appendChild) { place.appendChild(d.wrapper); }
  8819. else { place(d.wrapper); }
  8820. }
  8821. // Current rendered range (may be bigger than the view window).
  8822. d.viewFrom = d.viewTo = doc.first;
  8823. d.reportedViewFrom = d.reportedViewTo = doc.first;
  8824. // Information about the rendered lines.
  8825. d.view = [];
  8826. d.renderedView = null;
  8827. // Holds info about a single rendered line when it was rendered
  8828. // for measurement, while not in view.
  8829. d.externalMeasured = null;
  8830. // Empty space (in pixels) above the view
  8831. d.viewOffset = 0;
  8832. d.lastWrapHeight = d.lastWrapWidth = 0;
  8833. d.updateLineNumbers = null;
  8834. d.nativeBarWidth = d.barHeight = d.barWidth = 0;
  8835. d.scrollbarsClipped = false;
  8836. // Used to only resize the line number gutter when necessary (when
  8837. // the amount of lines crosses a boundary that makes its width change)
  8838. d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
  8839. // Set to true when a non-horizontal-scrolling line widget is
  8840. // added. As an optimization, line widget aligning is skipped when
  8841. // this is false.
  8842. d.alignWidgets = false;
  8843. d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
  8844. // Tracks the maximum line length so that the horizontal scrollbar
  8845. // can be kept static when scrolling.
  8846. d.maxLine = null;
  8847. d.maxLineLength = 0;
  8848. d.maxLineChanged = false;
  8849. // Used for measuring wheel scrolling granularity
  8850. d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
  8851. // True when shift is held down.
  8852. d.shift = false;
  8853. // Used to track whether anything happened since the context menu
  8854. // was opened.
  8855. d.selForContextMenu = null;
  8856. d.activeTouch = null;
  8857. d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);
  8858. renderGutters(d);
  8859. input.init(d);
  8860. }
  8861. // Since the delta values reported on mouse wheel events are
  8862. // unstandardized between browsers and even browser versions, and
  8863. // generally horribly unpredictable, this code starts by measuring
  8864. // the scroll effect that the first few mouse wheel events have,
  8865. // and, from that, detects the way it can convert deltas to pixel
  8866. // offsets afterwards.
  8867. //
  8868. // The reason we want to know the amount a wheel event will scroll
  8869. // is that it gives us a chance to update the display before the
  8870. // actual scrolling happens, reducing flickering.
  8871. var wheelSamples = 0, wheelPixelsPerUnit = null;
  8872. // Fill in a browser-detected starting value on browsers where we
  8873. // know one. These don't have to be accurate -- the result of them
  8874. // being wrong would just be a slight flicker on the first wheel
  8875. // scroll (if it is large enough).
  8876. if (ie) { wheelPixelsPerUnit = -.53; }
  8877. else if (gecko) { wheelPixelsPerUnit = 15; }
  8878. else if (chrome) { wheelPixelsPerUnit = -.7; }
  8879. else if (safari) { wheelPixelsPerUnit = -1/3; }
  8880. function wheelEventDelta(e) {
  8881. var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
  8882. if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }
  8883. if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }
  8884. else if (dy == null) { dy = e.wheelDelta; }
  8885. return {x: dx, y: dy}
  8886. }
  8887. function wheelEventPixels(e) {
  8888. var delta = wheelEventDelta(e);
  8889. delta.x *= wheelPixelsPerUnit;
  8890. delta.y *= wheelPixelsPerUnit;
  8891. return delta
  8892. }
  8893. function onScrollWheel(cm, e) {
  8894. var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
  8895. var display = cm.display, scroll = display.scroller;
  8896. // Quit if there's nothing to scroll here
  8897. var canScrollX = scroll.scrollWidth > scroll.clientWidth;
  8898. var canScrollY = scroll.scrollHeight > scroll.clientHeight;
  8899. if (!(dx && canScrollX || dy && canScrollY)) { return }
  8900. // Webkit browsers on OS X abort momentum scrolls when the target
  8901. // of the scroll event is removed from the scrollable element.
  8902. // This hack (see related code in patchDisplay) makes sure the
  8903. // element is kept around.
  8904. if (dy && mac && webkit) {
  8905. outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
  8906. for (var i = 0; i < view.length; i++) {
  8907. if (view[i].node == cur) {
  8908. cm.display.currentWheelTarget = cur;
  8909. break outer
  8910. }
  8911. }
  8912. }
  8913. }
  8914. // On some browsers, horizontal scrolling will cause redraws to
  8915. // happen before the gutter has been realigned, causing it to
  8916. // wriggle around in a most unseemly way. When we have an
  8917. // estimated pixels/delta value, we just handle horizontal
  8918. // scrolling entirely here. It'll be slightly off from native, but
  8919. // better than glitching out.
  8920. if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
  8921. if (dy && canScrollY)
  8922. { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }
  8923. setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));
  8924. // Only prevent default scrolling if vertical scrolling is
  8925. // actually possible. Otherwise, it causes vertical scroll
  8926. // jitter on OSX trackpads when deltaX is small and deltaY
  8927. // is large (issue #3579)
  8928. if (!dy || (dy && canScrollY))
  8929. { e_preventDefault(e); }
  8930. display.wheelStartX = null; // Abort measurement, if in progress
  8931. return
  8932. }
  8933. // 'Project' the visible viewport to cover the area that is being
  8934. // scrolled into view (if we know enough to estimate it).
  8935. if (dy && wheelPixelsPerUnit != null) {
  8936. var pixels = dy * wheelPixelsPerUnit;
  8937. var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
  8938. if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
  8939. else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
  8940. updateDisplaySimple(cm, {top: top, bottom: bot});
  8941. }
  8942. if (wheelSamples < 20) {
  8943. if (display.wheelStartX == null) {
  8944. display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
  8945. display.wheelDX = dx; display.wheelDY = dy;
  8946. setTimeout(function () {
  8947. if (display.wheelStartX == null) { return }
  8948. var movedX = scroll.scrollLeft - display.wheelStartX;
  8949. var movedY = scroll.scrollTop - display.wheelStartY;
  8950. var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
  8951. (movedX && display.wheelDX && movedX / display.wheelDX);
  8952. display.wheelStartX = display.wheelStartY = null;
  8953. if (!sample) { return }
  8954. wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
  8955. ++wheelSamples;
  8956. }, 200);
  8957. } else {
  8958. display.wheelDX += dx; display.wheelDY += dy;
  8959. }
  8960. }
  8961. }
  8962. // Selection objects are immutable. A new one is created every time
  8963. // the selection changes. A selection is one or more non-overlapping
  8964. // (and non-touching) ranges, sorted, and an integer that indicates
  8965. // which one is the primary selection (the one that's scrolled into
  8966. // view, that getCursor returns, etc).
  8967. var Selection = function(ranges, primIndex) {
  8968. this.ranges = ranges;
  8969. this.primIndex = primIndex;
  8970. };
  8971. Selection.prototype.primary = function () { return this.ranges[this.primIndex] };
  8972. Selection.prototype.equals = function (other) {
  8973. if (other == this) { return true }
  8974. if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }
  8975. for (var i = 0; i < this.ranges.length; i++) {
  8976. var here = this.ranges[i], there = other.ranges[i];
  8977. if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }
  8978. }
  8979. return true
  8980. };
  8981. Selection.prototype.deepCopy = function () {
  8982. var out = [];
  8983. for (var i = 0; i < this.ranges.length; i++)
  8984. { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }
  8985. return new Selection(out, this.primIndex)
  8986. };
  8987. Selection.prototype.somethingSelected = function () {
  8988. for (var i = 0; i < this.ranges.length; i++)
  8989. { if (!this.ranges[i].empty()) { return true } }
  8990. return false
  8991. };
  8992. Selection.prototype.contains = function (pos, end) {
  8993. if (!end) { end = pos; }
  8994. for (var i = 0; i < this.ranges.length; i++) {
  8995. var range = this.ranges[i];
  8996. if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
  8997. { return i }
  8998. }
  8999. return -1
  9000. };
  9001. var Range = function(anchor, head) {
  9002. this.anchor = anchor; this.head = head;
  9003. };
  9004. Range.prototype.from = function () { return minPos(this.anchor, this.head) };
  9005. Range.prototype.to = function () { return maxPos(this.anchor, this.head) };
  9006. Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };
  9007. // Take an unsorted, potentially overlapping set of ranges, and
  9008. // build a selection out of it. 'Consumes' ranges array (modifying
  9009. // it).
  9010. function normalizeSelection(cm, ranges, primIndex) {
  9011. var mayTouch = cm && cm.options.selectionsMayTouch;
  9012. var prim = ranges[primIndex];
  9013. ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });
  9014. primIndex = indexOf(ranges, prim);
  9015. for (var i = 1; i < ranges.length; i++) {
  9016. var cur = ranges[i], prev = ranges[i - 1];
  9017. var diff = cmp(prev.to(), cur.from());
  9018. if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {
  9019. var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
  9020. var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
  9021. if (i <= primIndex) { --primIndex; }
  9022. ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
  9023. }
  9024. }
  9025. return new Selection(ranges, primIndex)
  9026. }
  9027. function simpleSelection(anchor, head) {
  9028. return new Selection([new Range(anchor, head || anchor)], 0)
  9029. }
  9030. // Compute the position of the end of a change (its 'to' property
  9031. // refers to the pre-change end).
  9032. function changeEnd(change) {
  9033. if (!change.text) { return change.to }
  9034. return Pos(change.from.line + change.text.length - 1,
  9035. lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))
  9036. }
  9037. // Adjust a position to refer to the post-change position of the
  9038. // same text, or the end of the change if the change covers it.
  9039. function adjustForChange(pos, change) {
  9040. if (cmp(pos, change.from) < 0) { return pos }
  9041. if (cmp(pos, change.to) <= 0) { return changeEnd(change) }
  9042. var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
  9043. if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }
  9044. return Pos(line, ch)
  9045. }
  9046. function computeSelAfterChange(doc, change) {
  9047. var out = [];
  9048. for (var i = 0; i < doc.sel.ranges.length; i++) {
  9049. var range = doc.sel.ranges[i];
  9050. out.push(new Range(adjustForChange(range.anchor, change),
  9051. adjustForChange(range.head, change)));
  9052. }
  9053. return normalizeSelection(doc.cm, out, doc.sel.primIndex)
  9054. }
  9055. function offsetPos(pos, old, nw) {
  9056. if (pos.line == old.line)
  9057. { return Pos(nw.line, pos.ch - old.ch + nw.ch) }
  9058. else
  9059. { return Pos(nw.line + (pos.line - old.line), pos.ch) }
  9060. }
  9061. // Used by replaceSelections to allow moving the selection to the
  9062. // start or around the replaced test. Hint may be "start" or "around".
  9063. function computeReplacedSel(doc, changes, hint) {
  9064. var out = [];
  9065. var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;
  9066. for (var i = 0; i < changes.length; i++) {
  9067. var change = changes[i];
  9068. var from = offsetPos(change.from, oldPrev, newPrev);
  9069. var to = offsetPos(changeEnd(change), oldPrev, newPrev);
  9070. oldPrev = change.to;
  9071. newPrev = to;
  9072. if (hint == "around") {
  9073. var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;
  9074. out[i] = new Range(inv ? to : from, inv ? from : to);
  9075. } else {
  9076. out[i] = new Range(from, from);
  9077. }
  9078. }
  9079. return new Selection(out, doc.sel.primIndex)
  9080. }
  9081. // Used to get the editor into a consistent state again when options change.
  9082. function loadMode(cm) {
  9083. cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
  9084. resetModeState(cm);
  9085. }
  9086. function resetModeState(cm) {
  9087. cm.doc.iter(function (line) {
  9088. if (line.stateAfter) { line.stateAfter = null; }
  9089. if (line.styles) { line.styles = null; }
  9090. });
  9091. cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;
  9092. startWorker(cm, 100);
  9093. cm.state.modeGen++;
  9094. if (cm.curOp) { regChange(cm); }
  9095. }
  9096. // DOCUMENT DATA STRUCTURE
  9097. // By default, updates that start and end at the beginning of a line
  9098. // are treated specially, in order to make the association of line
  9099. // widgets and marker elements with the text behave more intuitive.
  9100. function isWholeLineUpdate(doc, change) {
  9101. return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" &&
  9102. (!doc.cm || doc.cm.options.wholeLineUpdateBefore)
  9103. }
  9104. // Perform a change on the document data structure.
  9105. function updateDoc(doc, change, markedSpans, estimateHeight) {
  9106. function spansFor(n) {return markedSpans ? markedSpans[n] : null}
  9107. function update(line, text, spans) {
  9108. updateLine(line, text, spans, estimateHeight);
  9109. signalLater(line, "change", line, change);
  9110. }
  9111. function linesFor(start, end) {
  9112. var result = [];
  9113. for (var i = start; i < end; ++i)
  9114. { result.push(new Line(text[i], spansFor(i), estimateHeight)); }
  9115. return result
  9116. }
  9117. var from = change.from, to = change.to, text = change.text;
  9118. var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
  9119. var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
  9120. // Adjust the line structure
  9121. if (change.full) {
  9122. doc.insert(0, linesFor(0, text.length));
  9123. doc.remove(text.length, doc.size - text.length);
  9124. } else if (isWholeLineUpdate(doc, change)) {
  9125. // This is a whole-line replace. Treated specially to make
  9126. // sure line objects move the way they are supposed to.
  9127. var added = linesFor(0, text.length - 1);
  9128. update(lastLine, lastLine.text, lastSpans);
  9129. if (nlines) { doc.remove(from.line, nlines); }
  9130. if (added.length) { doc.insert(from.line, added); }
  9131. } else if (firstLine == lastLine) {
  9132. if (text.length == 1) {
  9133. update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
  9134. } else {
  9135. var added$1 = linesFor(1, text.length - 1);
  9136. added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
  9137. update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
  9138. doc.insert(from.line + 1, added$1);
  9139. }
  9140. } else if (text.length == 1) {
  9141. update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
  9142. doc.remove(from.line + 1, nlines);
  9143. } else {
  9144. update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
  9145. update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
  9146. var added$2 = linesFor(1, text.length - 1);
  9147. if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }
  9148. doc.insert(from.line + 1, added$2);
  9149. }
  9150. signalLater(doc, "change", doc, change);
  9151. }
  9152. // Call f for all linked documents.
  9153. function linkedDocs(doc, f, sharedHistOnly) {
  9154. function propagate(doc, skip, sharedHist) {
  9155. if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {
  9156. var rel = doc.linked[i];
  9157. if (rel.doc == skip) { continue }
  9158. var shared = sharedHist && rel.sharedHist;
  9159. if (sharedHistOnly && !shared) { continue }
  9160. f(rel.doc, shared);
  9161. propagate(rel.doc, doc, shared);
  9162. } }
  9163. }
  9164. propagate(doc, null, true);
  9165. }
  9166. // Attach a document to an editor.
  9167. function attachDoc(cm, doc) {
  9168. if (doc.cm) { throw new Error("This document is already in use.") }
  9169. cm.doc = doc;
  9170. doc.cm = cm;
  9171. estimateLineHeights(cm);
  9172. loadMode(cm);
  9173. setDirectionClass(cm);
  9174. if (!cm.options.lineWrapping) { findMaxLine(cm); }
  9175. cm.options.mode = doc.modeOption;
  9176. regChange(cm);
  9177. }
  9178. function setDirectionClass(cm) {
  9179. (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
  9180. }
  9181. function directionChanged(cm) {
  9182. runInOp(cm, function () {
  9183. setDirectionClass(cm);
  9184. regChange(cm);
  9185. });
  9186. }
  9187. function History(prev) {
  9188. // Arrays of change events and selections. Doing something adds an
  9189. // event to done and clears undo. Undoing moves events from done
  9190. // to undone, redoing moves them in the other direction.
  9191. this.done = []; this.undone = [];
  9192. this.undoDepth = prev ? prev.undoDepth : Infinity;
  9193. // Used to track when changes can be merged into a single undo
  9194. // event
  9195. this.lastModTime = this.lastSelTime = 0;
  9196. this.lastOp = this.lastSelOp = null;
  9197. this.lastOrigin = this.lastSelOrigin = null;
  9198. // Used by the isClean() method
  9199. this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;
  9200. }
  9201. // Create a history change event from an updateDoc-style change
  9202. // object.
  9203. function historyChangeFromChange(doc, change) {
  9204. var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
  9205. attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
  9206. linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);
  9207. return histChange
  9208. }
  9209. // Pop all selection events off the end of a history array. Stop at
  9210. // a change event.
  9211. function clearSelectionEvents(array) {
  9212. while (array.length) {
  9213. var last = lst(array);
  9214. if (last.ranges) { array.pop(); }
  9215. else { break }
  9216. }
  9217. }
  9218. // Find the top change event in the history. Pop off selection
  9219. // events that are in the way.
  9220. function lastChangeEvent(hist, force) {
  9221. if (force) {
  9222. clearSelectionEvents(hist.done);
  9223. return lst(hist.done)
  9224. } else if (hist.done.length && !lst(hist.done).ranges) {
  9225. return lst(hist.done)
  9226. } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
  9227. hist.done.pop();
  9228. return lst(hist.done)
  9229. }
  9230. }
  9231. // Register a change in the history. Merges changes that are within
  9232. // a single operation, or are close together with an origin that
  9233. // allows merging (starting with "+") into a single event.
  9234. function addChangeToHistory(doc, change, selAfter, opId) {
  9235. var hist = doc.history;
  9236. hist.undone.length = 0;
  9237. var time = +new Date, cur;
  9238. var last;
  9239. if ((hist.lastOp == opId ||
  9240. hist.lastOrigin == change.origin && change.origin &&
  9241. ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
  9242. change.origin.charAt(0) == "*")) &&
  9243. (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
  9244. // Merge this change into the last event
  9245. last = lst(cur.changes);
  9246. if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
  9247. // Optimized case for simple insertion -- don't want to add
  9248. // new changesets for every character typed
  9249. last.to = changeEnd(change);
  9250. } else {
  9251. // Add new sub-event
  9252. cur.changes.push(historyChangeFromChange(doc, change));
  9253. }
  9254. } else {
  9255. // Can not be merged, start a new event.
  9256. var before = lst(hist.done);
  9257. if (!before || !before.ranges)
  9258. { pushSelectionToHistory(doc.sel, hist.done); }
  9259. cur = {changes: [historyChangeFromChange(doc, change)],
  9260. generation: hist.generation};
  9261. hist.done.push(cur);
  9262. while (hist.done.length > hist.undoDepth) {
  9263. hist.done.shift();
  9264. if (!hist.done[0].ranges) { hist.done.shift(); }
  9265. }
  9266. }
  9267. hist.done.push(selAfter);
  9268. hist.generation = ++hist.maxGeneration;
  9269. hist.lastModTime = hist.lastSelTime = time;
  9270. hist.lastOp = hist.lastSelOp = opId;
  9271. hist.lastOrigin = hist.lastSelOrigin = change.origin;
  9272. if (!last) { signal(doc, "historyAdded"); }
  9273. }
  9274. function selectionEventCanBeMerged(doc, origin, prev, sel) {
  9275. var ch = origin.charAt(0);
  9276. return ch == "*" ||
  9277. ch == "+" &&
  9278. prev.ranges.length == sel.ranges.length &&
  9279. prev.somethingSelected() == sel.somethingSelected() &&
  9280. new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)
  9281. }
  9282. // Called whenever the selection changes, sets the new selection as
  9283. // the pending selection in the history, and pushes the old pending
  9284. // selection into the 'done' array when it was significantly
  9285. // different (in number of selected ranges, emptiness, or time).
  9286. function addSelectionToHistory(doc, sel, opId, options) {
  9287. var hist = doc.history, origin = options && options.origin;
  9288. // A new event is started when the previous origin does not match
  9289. // the current, or the origins don't allow matching. Origins
  9290. // starting with * are always merged, those starting with + are
  9291. // merged when similar and close together in time.
  9292. if (opId == hist.lastSelOp ||
  9293. (origin && hist.lastSelOrigin == origin &&
  9294. (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
  9295. selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
  9296. { hist.done[hist.done.length - 1] = sel; }
  9297. else
  9298. { pushSelectionToHistory(sel, hist.done); }
  9299. hist.lastSelTime = +new Date;
  9300. hist.lastSelOrigin = origin;
  9301. hist.lastSelOp = opId;
  9302. if (options && options.clearRedo !== false)
  9303. { clearSelectionEvents(hist.undone); }
  9304. }
  9305. function pushSelectionToHistory(sel, dest) {
  9306. var top = lst(dest);
  9307. if (!(top && top.ranges && top.equals(sel)))
  9308. { dest.push(sel); }
  9309. }
  9310. // Used to store marked span information in the history.
  9311. function attachLocalSpans(doc, change, from, to) {
  9312. var existing = change["spans_" + doc.id], n = 0;
  9313. doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
  9314. if (line.markedSpans)
  9315. { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }
  9316. ++n;
  9317. });
  9318. }
  9319. // When un/re-doing restores text containing marked spans, those
  9320. // that have been explicitly cleared should not be restored.
  9321. function removeClearedSpans(spans) {
  9322. if (!spans) { return null }
  9323. var out;
  9324. for (var i = 0; i < spans.length; ++i) {
  9325. if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }
  9326. else if (out) { out.push(spans[i]); }
  9327. }
  9328. return !out ? spans : out.length ? out : null
  9329. }
  9330. // Retrieve and filter the old marked spans stored in a change event.
  9331. function getOldSpans(doc, change) {
  9332. var found = change["spans_" + doc.id];
  9333. if (!found) { return null }
  9334. var nw = [];
  9335. for (var i = 0; i < change.text.length; ++i)
  9336. { nw.push(removeClearedSpans(found[i])); }
  9337. return nw
  9338. }
  9339. // Used for un/re-doing changes from the history. Combines the
  9340. // result of computing the existing spans with the set of spans that
  9341. // existed in the history (so that deleting around a span and then
  9342. // undoing brings back the span).
  9343. function mergeOldSpans(doc, change) {
  9344. var old = getOldSpans(doc, change);
  9345. var stretched = stretchSpansOverChange(doc, change);
  9346. if (!old) { return stretched }
  9347. if (!stretched) { return old }
  9348. for (var i = 0; i < old.length; ++i) {
  9349. var oldCur = old[i], stretchCur = stretched[i];
  9350. if (oldCur && stretchCur) {
  9351. spans: for (var j = 0; j < stretchCur.length; ++j) {
  9352. var span = stretchCur[j];
  9353. for (var k = 0; k < oldCur.length; ++k)
  9354. { if (oldCur[k].marker == span.marker) { continue spans } }
  9355. oldCur.push(span);
  9356. }
  9357. } else if (stretchCur) {
  9358. old[i] = stretchCur;
  9359. }
  9360. }
  9361. return old
  9362. }
  9363. // Used both to provide a JSON-safe object in .getHistory, and, when
  9364. // detaching a document, to split the history in two
  9365. function copyHistoryArray(events, newGroup, instantiateSel) {
  9366. var copy = [];
  9367. for (var i = 0; i < events.length; ++i) {
  9368. var event = events[i];
  9369. if (event.ranges) {
  9370. copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
  9371. continue
  9372. }
  9373. var changes = event.changes, newChanges = [];
  9374. copy.push({changes: newChanges});
  9375. for (var j = 0; j < changes.length; ++j) {
  9376. var change = changes[j], m = (void 0);
  9377. newChanges.push({from: change.from, to: change.to, text: change.text});
  9378. if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
  9379. if (indexOf(newGroup, Number(m[1])) > -1) {
  9380. lst(newChanges)[prop] = change[prop];
  9381. delete change[prop];
  9382. }
  9383. } } }
  9384. }
  9385. }
  9386. return copy
  9387. }
  9388. // The 'scroll' parameter given to many of these indicated whether
  9389. // the new cursor position should be scrolled into view after
  9390. // modifying the selection.
  9391. // If shift is held or the extend flag is set, extends a range to
  9392. // include a given position (and optionally a second position).
  9393. // Otherwise, simply returns the range between the given positions.
  9394. // Used for cursor motion and such.
  9395. function extendRange(range, head, other, extend) {
  9396. if (extend) {
  9397. var anchor = range.anchor;
  9398. if (other) {
  9399. var posBefore = cmp(head, anchor) < 0;
  9400. if (posBefore != (cmp(other, anchor) < 0)) {
  9401. anchor = head;
  9402. head = other;
  9403. } else if (posBefore != (cmp(head, other) < 0)) {
  9404. head = other;
  9405. }
  9406. }
  9407. return new Range(anchor, head)
  9408. } else {
  9409. return new Range(other || head, head)
  9410. }
  9411. }
  9412. // Extend the primary selection range, discard the rest.
  9413. function extendSelection(doc, head, other, options, extend) {
  9414. if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }
  9415. setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);
  9416. }
  9417. // Extend all selections (pos is an array of selections with length
  9418. // equal the number of selections)
  9419. function extendSelections(doc, heads, options) {
  9420. var out = [];
  9421. var extend = doc.cm && (doc.cm.display.shift || doc.extend);
  9422. for (var i = 0; i < doc.sel.ranges.length; i++)
  9423. { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }
  9424. var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);
  9425. setSelection(doc, newSel, options);
  9426. }
  9427. // Updates a single range in the selection.
  9428. function replaceOneSelection(doc, i, range, options) {
  9429. var ranges = doc.sel.ranges.slice(0);
  9430. ranges[i] = range;
  9431. setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);
  9432. }
  9433. // Reset the selection to a single range.
  9434. function setSimpleSelection(doc, anchor, head, options) {
  9435. setSelection(doc, simpleSelection(anchor, head), options);
  9436. }
  9437. // Give beforeSelectionChange handlers a change to influence a
  9438. // selection update.
  9439. function filterSelectionChange(doc, sel, options) {
  9440. var obj = {
  9441. ranges: sel.ranges,
  9442. update: function(ranges) {
  9443. this.ranges = [];
  9444. for (var i = 0; i < ranges.length; i++)
  9445. { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
  9446. clipPos(doc, ranges[i].head)); }
  9447. },
  9448. origin: options && options.origin
  9449. };
  9450. signal(doc, "beforeSelectionChange", doc, obj);
  9451. if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); }
  9452. if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }
  9453. else { return sel }
  9454. }
  9455. function setSelectionReplaceHistory(doc, sel, options) {
  9456. var done = doc.history.done, last = lst(done);
  9457. if (last && last.ranges) {
  9458. done[done.length - 1] = sel;
  9459. setSelectionNoUndo(doc, sel, options);
  9460. } else {
  9461. setSelection(doc, sel, options);
  9462. }
  9463. }
  9464. // Set a new selection.
  9465. function setSelection(doc, sel, options) {
  9466. setSelectionNoUndo(doc, sel, options);
  9467. addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
  9468. }
  9469. function setSelectionNoUndo(doc, sel, options) {
  9470. if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
  9471. { sel = filterSelectionChange(doc, sel, options); }
  9472. var bias = options && options.bias ||
  9473. (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
  9474. setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
  9475. if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor")
  9476. { ensureCursorVisible(doc.cm); }
  9477. }
  9478. function setSelectionInner(doc, sel) {
  9479. if (sel.equals(doc.sel)) { return }
  9480. doc.sel = sel;
  9481. if (doc.cm) {
  9482. doc.cm.curOp.updateInput = 1;
  9483. doc.cm.curOp.selectionChanged = true;
  9484. signalCursorActivity(doc.cm);
  9485. }
  9486. signalLater(doc, "cursorActivity", doc);
  9487. }
  9488. // Verify that the selection does not partially select any atomic
  9489. // marked ranges.
  9490. function reCheckSelection(doc) {
  9491. setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));
  9492. }
  9493. // Return a selection that does not partially select any atomic
  9494. // ranges.
  9495. function skipAtomicInSelection(doc, sel, bias, mayClear) {
  9496. var out;
  9497. for (var i = 0; i < sel.ranges.length; i++) {
  9498. var range = sel.ranges[i];
  9499. var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
  9500. var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
  9501. var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
  9502. if (out || newAnchor != range.anchor || newHead != range.head) {
  9503. if (!out) { out = sel.ranges.slice(0, i); }
  9504. out[i] = new Range(newAnchor, newHead);
  9505. }
  9506. }
  9507. return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel
  9508. }
  9509. function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
  9510. var line = getLine(doc, pos.line);
  9511. if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
  9512. var sp = line.markedSpans[i], m = sp.marker;
  9513. // Determine if we should prevent the cursor being placed to the left/right of an atomic marker
  9514. // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it
  9515. // is with selectLeft/Right
  9516. var preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft;
  9517. var preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight;
  9518. if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
  9519. (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
  9520. if (mayClear) {
  9521. signal(m, "beforeCursorEnter");
  9522. if (m.explicitlyCleared) {
  9523. if (!line.markedSpans) { break }
  9524. else {--i; continue}
  9525. }
  9526. }
  9527. if (!m.atomic) { continue }
  9528. if (oldPos) {
  9529. var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);
  9530. if (dir < 0 ? preventCursorRight : preventCursorLeft)
  9531. { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }
  9532. if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
  9533. { return skipAtomicInner(doc, near, pos, dir, mayClear) }
  9534. }
  9535. var far = m.find(dir < 0 ? -1 : 1);
  9536. if (dir < 0 ? preventCursorLeft : preventCursorRight)
  9537. { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }
  9538. return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null
  9539. }
  9540. } }
  9541. return pos
  9542. }
  9543. // Ensure a given position is not inside an atomic range.
  9544. function skipAtomic(doc, pos, oldPos, bias, mayClear) {
  9545. var dir = bias || 1;
  9546. var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
  9547. (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
  9548. skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
  9549. (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
  9550. if (!found) {
  9551. doc.cantEdit = true;
  9552. return Pos(doc.first, 0)
  9553. }
  9554. return found
  9555. }
  9556. function movePos(doc, pos, dir, line) {
  9557. if (dir < 0 && pos.ch == 0) {
  9558. if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }
  9559. else { return null }
  9560. } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
  9561. if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }
  9562. else { return null }
  9563. } else {
  9564. return new Pos(pos.line, pos.ch + dir)
  9565. }
  9566. }
  9567. function selectAll(cm) {
  9568. cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
  9569. }
  9570. // UPDATING
  9571. // Allow "beforeChange" event handlers to influence a change
  9572. function filterChange(doc, change, update) {
  9573. var obj = {
  9574. canceled: false,
  9575. from: change.from,
  9576. to: change.to,
  9577. text: change.text,
  9578. origin: change.origin,
  9579. cancel: function () { return obj.canceled = true; }
  9580. };
  9581. if (update) { obj.update = function (from, to, text, origin) {
  9582. if (from) { obj.from = clipPos(doc, from); }
  9583. if (to) { obj.to = clipPos(doc, to); }
  9584. if (text) { obj.text = text; }
  9585. if (origin !== undefined) { obj.origin = origin; }
  9586. }; }
  9587. signal(doc, "beforeChange", doc, obj);
  9588. if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); }
  9589. if (obj.canceled) {
  9590. if (doc.cm) { doc.cm.curOp.updateInput = 2; }
  9591. return null
  9592. }
  9593. return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}
  9594. }
  9595. // Apply a change to a document, and add it to the document's
  9596. // history, and propagating it to all linked documents.
  9597. function makeChange(doc, change, ignoreReadOnly) {
  9598. if (doc.cm) {
  9599. if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }
  9600. if (doc.cm.state.suppressEdits) { return }
  9601. }
  9602. if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
  9603. change = filterChange(doc, change, true);
  9604. if (!change) { return }
  9605. }
  9606. // Possibly split or suppress the update based on the presence
  9607. // of read-only spans in its range.
  9608. var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
  9609. if (split) {
  9610. for (var i = split.length - 1; i >= 0; --i)
  9611. { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); }
  9612. } else {
  9613. makeChangeInner(doc, change);
  9614. }
  9615. }
  9616. function makeChangeInner(doc, change) {
  9617. if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
  9618. var selAfter = computeSelAfterChange(doc, change);
  9619. addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
  9620. makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
  9621. var rebased = [];
  9622. linkedDocs(doc, function (doc, sharedHist) {
  9623. if (!sharedHist && indexOf(rebased, doc.history) == -1) {
  9624. rebaseHist(doc.history, change);
  9625. rebased.push(doc.history);
  9626. }
  9627. makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
  9628. });
  9629. }
  9630. // Revert a change stored in a document's history.
  9631. function makeChangeFromHistory(doc, type, allowSelectionOnly) {
  9632. var suppress = doc.cm && doc.cm.state.suppressEdits;
  9633. if (suppress && !allowSelectionOnly) { return }
  9634. var hist = doc.history, event, selAfter = doc.sel;
  9635. var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
  9636. // Verify that there is a useable event (so that ctrl-z won't
  9637. // needlessly clear selection events)
  9638. var i = 0;
  9639. for (; i < source.length; i++) {
  9640. event = source[i];
  9641. if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
  9642. { break }
  9643. }
  9644. if (i == source.length) { return }
  9645. hist.lastOrigin = hist.lastSelOrigin = null;
  9646. for (;;) {
  9647. event = source.pop();
  9648. if (event.ranges) {
  9649. pushSelectionToHistory(event, dest);
  9650. if (allowSelectionOnly && !event.equals(doc.sel)) {
  9651. setSelection(doc, event, {clearRedo: false});
  9652. return
  9653. }
  9654. selAfter = event;
  9655. } else if (suppress) {
  9656. source.push(event);
  9657. return
  9658. } else { break }
  9659. }
  9660. // Build up a reverse change object to add to the opposite history
  9661. // stack (redo when undoing, and vice versa).
  9662. var antiChanges = [];
  9663. pushSelectionToHistory(selAfter, dest);
  9664. dest.push({changes: antiChanges, generation: hist.generation});
  9665. hist.generation = event.generation || ++hist.maxGeneration;
  9666. var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
  9667. var loop = function ( i ) {
  9668. var change = event.changes[i];
  9669. change.origin = type;
  9670. if (filter && !filterChange(doc, change, false)) {
  9671. source.length = 0;
  9672. return {}
  9673. }
  9674. antiChanges.push(historyChangeFromChange(doc, change));
  9675. var after = i ? computeSelAfterChange(doc, change) : lst(source);
  9676. makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
  9677. if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }
  9678. var rebased = [];
  9679. // Propagate to the linked documents
  9680. linkedDocs(doc, function (doc, sharedHist) {
  9681. if (!sharedHist && indexOf(rebased, doc.history) == -1) {
  9682. rebaseHist(doc.history, change);
  9683. rebased.push(doc.history);
  9684. }
  9685. makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
  9686. });
  9687. };
  9688. for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
  9689. var returned = loop( i$1 );
  9690. if ( returned ) return returned.v;
  9691. }
  9692. }
  9693. // Sub-views need their line numbers shifted when text is added
  9694. // above or below them in the parent document.
  9695. function shiftDoc(doc, distance) {
  9696. if (distance == 0) { return }
  9697. doc.first += distance;
  9698. doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(
  9699. Pos(range.anchor.line + distance, range.anchor.ch),
  9700. Pos(range.head.line + distance, range.head.ch)
  9701. ); }), doc.sel.primIndex);
  9702. if (doc.cm) {
  9703. regChange(doc.cm, doc.first, doc.first - distance, distance);
  9704. for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
  9705. { regLineChange(doc.cm, l, "gutter"); }
  9706. }
  9707. }
  9708. // More lower-level change function, handling only a single document
  9709. // (not linked ones).
  9710. function makeChangeSingleDoc(doc, change, selAfter, spans) {
  9711. if (doc.cm && !doc.cm.curOp)
  9712. { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }
  9713. if (change.to.line < doc.first) {
  9714. shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
  9715. return
  9716. }
  9717. if (change.from.line > doc.lastLine()) { return }
  9718. // Clip the change to the size of this doc
  9719. if (change.from.line < doc.first) {
  9720. var shift = change.text.length - 1 - (doc.first - change.from.line);
  9721. shiftDoc(doc, shift);
  9722. change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
  9723. text: [lst(change.text)], origin: change.origin};
  9724. }
  9725. var last = doc.lastLine();
  9726. if (change.to.line > last) {
  9727. change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
  9728. text: [change.text[0]], origin: change.origin};
  9729. }
  9730. change.removed = getBetween(doc, change.from, change.to);
  9731. if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }
  9732. if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }
  9733. else { updateDoc(doc, change, spans); }
  9734. setSelectionNoUndo(doc, selAfter, sel_dontScroll);
  9735. if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))
  9736. { doc.cantEdit = false; }
  9737. }
  9738. // Handle the interaction of a change to a document with the editor
  9739. // that this document is part of.
  9740. function makeChangeSingleDocInEditor(cm, change, spans) {
  9741. var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
  9742. var recomputeMaxLength = false, checkWidthStart = from.line;
  9743. if (!cm.options.lineWrapping) {
  9744. checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
  9745. doc.iter(checkWidthStart, to.line + 1, function (line) {
  9746. if (line == display.maxLine) {
  9747. recomputeMaxLength = true;
  9748. return true
  9749. }
  9750. });
  9751. }
  9752. if (doc.sel.contains(change.from, change.to) > -1)
  9753. { signalCursorActivity(cm); }
  9754. updateDoc(doc, change, spans, estimateHeight(cm));
  9755. if (!cm.options.lineWrapping) {
  9756. doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
  9757. var len = lineLength(line);
  9758. if (len > display.maxLineLength) {
  9759. display.maxLine = line;
  9760. display.maxLineLength = len;
  9761. display.maxLineChanged = true;
  9762. recomputeMaxLength = false;
  9763. }
  9764. });
  9765. if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }
  9766. }
  9767. retreatFrontier(doc, from.line);
  9768. startWorker(cm, 400);
  9769. var lendiff = change.text.length - (to.line - from.line) - 1;
  9770. // Remember that these lines changed, for updating the display
  9771. if (change.full)
  9772. { regChange(cm); }
  9773. else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
  9774. { regLineChange(cm, from.line, "text"); }
  9775. else
  9776. { regChange(cm, from.line, to.line + 1, lendiff); }
  9777. var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");
  9778. if (changeHandler || changesHandler) {
  9779. var obj = {
  9780. from: from, to: to,
  9781. text: change.text,
  9782. removed: change.removed,
  9783. origin: change.origin
  9784. };
  9785. if (changeHandler) { signalLater(cm, "change", cm, obj); }
  9786. if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }
  9787. }
  9788. cm.display.selForContextMenu = null;
  9789. }
  9790. function replaceRange(doc, code, from, to, origin) {
  9791. var assign;
  9792. if (!to) { to = from; }
  9793. if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }
  9794. if (typeof code == "string") { code = doc.splitLines(code); }
  9795. makeChange(doc, {from: from, to: to, text: code, origin: origin});
  9796. }
  9797. // Rebasing/resetting history to deal with externally-sourced changes
  9798. function rebaseHistSelSingle(pos, from, to, diff) {
  9799. if (to < pos.line) {
  9800. pos.line += diff;
  9801. } else if (from < pos.line) {
  9802. pos.line = from;
  9803. pos.ch = 0;
  9804. }
  9805. }
  9806. // Tries to rebase an array of history events given a change in the
  9807. // document. If the change touches the same lines as the event, the
  9808. // event, and everything 'behind' it, is discarded. If the change is
  9809. // before the event, the event's positions are updated. Uses a
  9810. // copy-on-write scheme for the positions, to avoid having to
  9811. // reallocate them all on every rebase, but also avoid problems with
  9812. // shared position objects being unsafely updated.
  9813. function rebaseHistArray(array, from, to, diff) {
  9814. for (var i = 0; i < array.length; ++i) {
  9815. var sub = array[i], ok = true;
  9816. if (sub.ranges) {
  9817. if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }
  9818. for (var j = 0; j < sub.ranges.length; j++) {
  9819. rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
  9820. rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
  9821. }
  9822. continue
  9823. }
  9824. for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
  9825. var cur = sub.changes[j$1];
  9826. if (to < cur.from.line) {
  9827. cur.from = Pos(cur.from.line + diff, cur.from.ch);
  9828. cur.to = Pos(cur.to.line + diff, cur.to.ch);
  9829. } else if (from <= cur.to.line) {
  9830. ok = false;
  9831. break
  9832. }
  9833. }
  9834. if (!ok) {
  9835. array.splice(0, i + 1);
  9836. i = 0;
  9837. }
  9838. }
  9839. }
  9840. function rebaseHist(hist, change) {
  9841. var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
  9842. rebaseHistArray(hist.done, from, to, diff);
  9843. rebaseHistArray(hist.undone, from, to, diff);
  9844. }
  9845. // Utility for applying a change to a line by handle or number,
  9846. // returning the number and optionally registering the line as
  9847. // changed.
  9848. function changeLine(doc, handle, changeType, op) {
  9849. var no = handle, line = handle;
  9850. if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }
  9851. else { no = lineNo(handle); }
  9852. if (no == null) { return null }
  9853. if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }
  9854. return line
  9855. }
  9856. // The document is represented as a BTree consisting of leaves, with
  9857. // chunk of lines in them, and branches, with up to ten leaves or
  9858. // other branch nodes below them. The top node is always a branch
  9859. // node, and is the document object itself (meaning it has
  9860. // additional methods and properties).
  9861. //
  9862. // All nodes have parent links. The tree is used both to go from
  9863. // line numbers to line objects, and to go from objects to numbers.
  9864. // It also indexes by height, and is used to convert between height
  9865. // and line object, and to find the total height of the document.
  9866. //
  9867. // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html
  9868. function LeafChunk(lines) {
  9869. this.lines = lines;
  9870. this.parent = null;
  9871. var height = 0;
  9872. for (var i = 0; i < lines.length; ++i) {
  9873. lines[i].parent = this;
  9874. height += lines[i].height;
  9875. }
  9876. this.height = height;
  9877. }
  9878. LeafChunk.prototype = {
  9879. chunkSize: function() { return this.lines.length },
  9880. // Remove the n lines at offset 'at'.
  9881. removeInner: function(at, n) {
  9882. for (var i = at, e = at + n; i < e; ++i) {
  9883. var line = this.lines[i];
  9884. this.height -= line.height;
  9885. cleanUpLine(line);
  9886. signalLater(line, "delete");
  9887. }
  9888. this.lines.splice(at, n);
  9889. },
  9890. // Helper used to collapse a small branch into a single leaf.
  9891. collapse: function(lines) {
  9892. lines.push.apply(lines, this.lines);
  9893. },
  9894. // Insert the given array of lines at offset 'at', count them as
  9895. // having the given height.
  9896. insertInner: function(at, lines, height) {
  9897. this.height += height;
  9898. this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
  9899. for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }
  9900. },
  9901. // Used to iterate over a part of the tree.
  9902. iterN: function(at, n, op) {
  9903. for (var e = at + n; at < e; ++at)
  9904. { if (op(this.lines[at])) { return true } }
  9905. }
  9906. };
  9907. function BranchChunk(children) {
  9908. this.children = children;
  9909. var size = 0, height = 0;
  9910. for (var i = 0; i < children.length; ++i) {
  9911. var ch = children[i];
  9912. size += ch.chunkSize(); height += ch.height;
  9913. ch.parent = this;
  9914. }
  9915. this.size = size;
  9916. this.height = height;
  9917. this.parent = null;
  9918. }
  9919. BranchChunk.prototype = {
  9920. chunkSize: function() { return this.size },
  9921. removeInner: function(at, n) {
  9922. this.size -= n;
  9923. for (var i = 0; i < this.children.length; ++i) {
  9924. var child = this.children[i], sz = child.chunkSize();
  9925. if (at < sz) {
  9926. var rm = Math.min(n, sz - at), oldHeight = child.height;
  9927. child.removeInner(at, rm);
  9928. this.height -= oldHeight - child.height;
  9929. if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
  9930. if ((n -= rm) == 0) { break }
  9931. at = 0;
  9932. } else { at -= sz; }
  9933. }
  9934. // If the result is smaller than 25 lines, ensure that it is a
  9935. // single leaf node.
  9936. if (this.size - n < 25 &&
  9937. (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
  9938. var lines = [];
  9939. this.collapse(lines);
  9940. this.children = [new LeafChunk(lines)];
  9941. this.children[0].parent = this;
  9942. }
  9943. },
  9944. collapse: function(lines) {
  9945. for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }
  9946. },
  9947. insertInner: function(at, lines, height) {
  9948. this.size += lines.length;
  9949. this.height += height;
  9950. for (var i = 0; i < this.children.length; ++i) {
  9951. var child = this.children[i], sz = child.chunkSize();
  9952. if (at <= sz) {
  9953. child.insertInner(at, lines, height);
  9954. if (child.lines && child.lines.length > 50) {
  9955. // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
  9956. // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
  9957. var remaining = child.lines.length % 25 + 25;
  9958. for (var pos = remaining; pos < child.lines.length;) {
  9959. var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
  9960. child.height -= leaf.height;
  9961. this.children.splice(++i, 0, leaf);
  9962. leaf.parent = this;
  9963. }
  9964. child.lines = child.lines.slice(0, remaining);
  9965. this.maybeSpill();
  9966. }
  9967. break
  9968. }
  9969. at -= sz;
  9970. }
  9971. },
  9972. // When a node has grown, check whether it should be split.
  9973. maybeSpill: function() {
  9974. if (this.children.length <= 10) { return }
  9975. var me = this;
  9976. do {
  9977. var spilled = me.children.splice(me.children.length - 5, 5);
  9978. var sibling = new BranchChunk(spilled);
  9979. if (!me.parent) { // Become the parent node
  9980. var copy = new BranchChunk(me.children);
  9981. copy.parent = me;
  9982. me.children = [copy, sibling];
  9983. me = copy;
  9984. } else {
  9985. me.size -= sibling.size;
  9986. me.height -= sibling.height;
  9987. var myIndex = indexOf(me.parent.children, me);
  9988. me.parent.children.splice(myIndex + 1, 0, sibling);
  9989. }
  9990. sibling.parent = me.parent;
  9991. } while (me.children.length > 10)
  9992. me.parent.maybeSpill();
  9993. },
  9994. iterN: function(at, n, op) {
  9995. for (var i = 0; i < this.children.length; ++i) {
  9996. var child = this.children[i], sz = child.chunkSize();
  9997. if (at < sz) {
  9998. var used = Math.min(n, sz - at);
  9999. if (child.iterN(at, used, op)) { return true }
  10000. if ((n -= used) == 0) { break }
  10001. at = 0;
  10002. } else { at -= sz; }
  10003. }
  10004. }
  10005. };
  10006. // Line widgets are block elements displayed above or below a line.
  10007. var LineWidget = function(doc, node, options) {
  10008. if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))
  10009. { this[opt] = options[opt]; } } }
  10010. this.doc = doc;
  10011. this.node = node;
  10012. };
  10013. LineWidget.prototype.clear = function () {
  10014. var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
  10015. if (no == null || !ws) { return }
  10016. for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }
  10017. if (!ws.length) { line.widgets = null; }
  10018. var height = widgetHeight(this);
  10019. updateLineHeight(line, Math.max(0, line.height - height));
  10020. if (cm) {
  10021. runInOp(cm, function () {
  10022. adjustScrollWhenAboveVisible(cm, line, -height);
  10023. regLineChange(cm, no, "widget");
  10024. });
  10025. signalLater(cm, "lineWidgetCleared", cm, this, no);
  10026. }
  10027. };
  10028. LineWidget.prototype.changed = function () {
  10029. var this$1 = this;
  10030. var oldH = this.height, cm = this.doc.cm, line = this.line;
  10031. this.height = null;
  10032. var diff = widgetHeight(this) - oldH;
  10033. if (!diff) { return }
  10034. if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }
  10035. if (cm) {
  10036. runInOp(cm, function () {
  10037. cm.curOp.forceUpdate = true;
  10038. adjustScrollWhenAboveVisible(cm, line, diff);
  10039. signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
  10040. });
  10041. }
  10042. };
  10043. eventMixin(LineWidget);
  10044. function adjustScrollWhenAboveVisible(cm, line, diff) {
  10045. if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
  10046. { addToScrollTop(cm, diff); }
  10047. }
  10048. function addLineWidget(doc, handle, node, options) {
  10049. var widget = new LineWidget(doc, node, options);
  10050. var cm = doc.cm;
  10051. if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }
  10052. changeLine(doc, handle, "widget", function (line) {
  10053. var widgets = line.widgets || (line.widgets = []);
  10054. if (widget.insertAt == null) { widgets.push(widget); }
  10055. else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }
  10056. widget.line = line;
  10057. if (cm && !lineIsHidden(doc, line)) {
  10058. var aboveVisible = heightAtLine(line) < doc.scrollTop;
  10059. updateLineHeight(line, line.height + widgetHeight(widget));
  10060. if (aboveVisible) { addToScrollTop(cm, widget.height); }
  10061. cm.curOp.forceUpdate = true;
  10062. }
  10063. return true
  10064. });
  10065. if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
  10066. return widget
  10067. }
  10068. // TEXTMARKERS
  10069. // Created with markText and setBookmark methods. A TextMarker is a
  10070. // handle that can be used to clear or find a marked position in the
  10071. // document. Line objects hold arrays (markedSpans) containing
  10072. // {from, to, marker} object pointing to such marker objects, and
  10073. // indicating that such a marker is present on that line. Multiple
  10074. // lines may point to the same marker when it spans across lines.
  10075. // The spans will have null for their from/to properties when the
  10076. // marker continues beyond the start/end of the line. Markers have
  10077. // links back to the lines they currently touch.
  10078. // Collapsed markers have unique ids, in order to be able to order
  10079. // them, which is needed for uniquely determining an outer marker
  10080. // when they overlap (they may nest, but not partially overlap).
  10081. var nextMarkerId = 0;
  10082. var TextMarker = function(doc, type) {
  10083. this.lines = [];
  10084. this.type = type;
  10085. this.doc = doc;
  10086. this.id = ++nextMarkerId;
  10087. };
  10088. // Clear the marker.
  10089. TextMarker.prototype.clear = function () {
  10090. if (this.explicitlyCleared) { return }
  10091. var cm = this.doc.cm, withOp = cm && !cm.curOp;
  10092. if (withOp) { startOperation(cm); }
  10093. if (hasHandler(this, "clear")) {
  10094. var found = this.find();
  10095. if (found) { signalLater(this, "clear", found.from, found.to); }
  10096. }
  10097. var min = null, max = null;
  10098. for (var i = 0; i < this.lines.length; ++i) {
  10099. var line = this.lines[i];
  10100. var span = getMarkedSpanFor(line.markedSpans, this);
  10101. if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), "text"); }
  10102. else if (cm) {
  10103. if (span.to != null) { max = lineNo(line); }
  10104. if (span.from != null) { min = lineNo(line); }
  10105. }
  10106. line.markedSpans = removeMarkedSpan(line.markedSpans, span);
  10107. if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)
  10108. { updateLineHeight(line, textHeight(cm.display)); }
  10109. }
  10110. if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
  10111. var visual = visualLine(this.lines[i$1]), len = lineLength(visual);
  10112. if (len > cm.display.maxLineLength) {
  10113. cm.display.maxLine = visual;
  10114. cm.display.maxLineLength = len;
  10115. cm.display.maxLineChanged = true;
  10116. }
  10117. } }
  10118. if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }
  10119. this.lines.length = 0;
  10120. this.explicitlyCleared = true;
  10121. if (this.atomic && this.doc.cantEdit) {
  10122. this.doc.cantEdit = false;
  10123. if (cm) { reCheckSelection(cm.doc); }
  10124. }
  10125. if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); }
  10126. if (withOp) { endOperation(cm); }
  10127. if (this.parent) { this.parent.clear(); }
  10128. };
  10129. // Find the position of the marker in the document. Returns a {from,
  10130. // to} object by default. Side can be passed to get a specific side
  10131. // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
  10132. // Pos objects returned contain a line object, rather than a line
  10133. // number (used to prevent looking up the same line twice).
  10134. TextMarker.prototype.find = function (side, lineObj) {
  10135. if (side == null && this.type == "bookmark") { side = 1; }
  10136. var from, to;
  10137. for (var i = 0; i < this.lines.length; ++i) {
  10138. var line = this.lines[i];
  10139. var span = getMarkedSpanFor(line.markedSpans, this);
  10140. if (span.from != null) {
  10141. from = Pos(lineObj ? line : lineNo(line), span.from);
  10142. if (side == -1) { return from }
  10143. }
  10144. if (span.to != null) {
  10145. to = Pos(lineObj ? line : lineNo(line), span.to);
  10146. if (side == 1) { return to }
  10147. }
  10148. }
  10149. return from && {from: from, to: to}
  10150. };
  10151. // Signals that the marker's widget changed, and surrounding layout
  10152. // should be recomputed.
  10153. TextMarker.prototype.changed = function () {
  10154. var this$1 = this;
  10155. var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
  10156. if (!pos || !cm) { return }
  10157. runInOp(cm, function () {
  10158. var line = pos.line, lineN = lineNo(pos.line);
  10159. var view = findViewForLine(cm, lineN);
  10160. if (view) {
  10161. clearLineMeasurementCacheFor(view);
  10162. cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
  10163. }
  10164. cm.curOp.updateMaxLine = true;
  10165. if (!lineIsHidden(widget.doc, line) && widget.height != null) {
  10166. var oldHeight = widget.height;
  10167. widget.height = null;
  10168. var dHeight = widgetHeight(widget) - oldHeight;
  10169. if (dHeight)
  10170. { updateLineHeight(line, line.height + dHeight); }
  10171. }
  10172. signalLater(cm, "markerChanged", cm, this$1);
  10173. });
  10174. };
  10175. TextMarker.prototype.attachLine = function (line) {
  10176. if (!this.lines.length && this.doc.cm) {
  10177. var op = this.doc.cm.curOp;
  10178. if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
  10179. { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }
  10180. }
  10181. this.lines.push(line);
  10182. };
  10183. TextMarker.prototype.detachLine = function (line) {
  10184. this.lines.splice(indexOf(this.lines, line), 1);
  10185. if (!this.lines.length && this.doc.cm) {
  10186. var op = this.doc.cm.curOp
  10187. ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
  10188. }
  10189. };
  10190. eventMixin(TextMarker);
  10191. // Create a marker, wire it up to the right lines, and
  10192. function markText(doc, from, to, options, type) {
  10193. // Shared markers (across linked documents) are handled separately
  10194. // (markTextShared will call out to this again, once per
  10195. // document).
  10196. if (options && options.shared) { return markTextShared(doc, from, to, options, type) }
  10197. // Ensure we are in an operation.
  10198. if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }
  10199. var marker = new TextMarker(doc, type), diff = cmp(from, to);
  10200. if (options) { copyObj(options, marker, false); }
  10201. // Don't connect empty markers unless clearWhenEmpty is false
  10202. if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
  10203. { return marker }
  10204. if (marker.replacedWith) {
  10205. // Showing up as a widget implies collapsed (widget replaces text)
  10206. marker.collapsed = true;
  10207. marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");
  10208. if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); }
  10209. if (options.insertLeft) { marker.widgetNode.insertLeft = true; }
  10210. }
  10211. if (marker.collapsed) {
  10212. if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
  10213. from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
  10214. { throw new Error("Inserting collapsed marker partially overlapping an existing one") }
  10215. seeCollapsedSpans();
  10216. }
  10217. if (marker.addToHistory)
  10218. { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); }
  10219. var curLine = from.line, cm = doc.cm, updateMaxLine;
  10220. doc.iter(curLine, to.line + 1, function (line) {
  10221. if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
  10222. { updateMaxLine = true; }
  10223. if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
  10224. addMarkedSpan(line, new MarkedSpan(marker,
  10225. curLine == from.line ? from.ch : null,
  10226. curLine == to.line ? to.ch : null));
  10227. ++curLine;
  10228. });
  10229. // lineIsHidden depends on the presence of the spans, so needs a second pass
  10230. if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {
  10231. if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }
  10232. }); }
  10233. if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); }
  10234. if (marker.readOnly) {
  10235. seeReadOnlySpans();
  10236. if (doc.history.done.length || doc.history.undone.length)
  10237. { doc.clearHistory(); }
  10238. }
  10239. if (marker.collapsed) {
  10240. marker.id = ++nextMarkerId;
  10241. marker.atomic = true;
  10242. }
  10243. if (cm) {
  10244. // Sync editor state
  10245. if (updateMaxLine) { cm.curOp.updateMaxLine = true; }
  10246. if (marker.collapsed)
  10247. { regChange(cm, from.line, to.line + 1); }
  10248. else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||
  10249. marker.attributes || marker.title)
  10250. { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } }
  10251. if (marker.atomic) { reCheckSelection(cm.doc); }
  10252. signalLater(cm, "markerAdded", cm, marker);
  10253. }
  10254. return marker
  10255. }
  10256. // SHARED TEXTMARKERS
  10257. // A shared marker spans multiple linked documents. It is
  10258. // implemented as a meta-marker-object controlling multiple normal
  10259. // markers.
  10260. var SharedTextMarker = function(markers, primary) {
  10261. this.markers = markers;
  10262. this.primary = primary;
  10263. for (var i = 0; i < markers.length; ++i)
  10264. { markers[i].parent = this; }
  10265. };
  10266. SharedTextMarker.prototype.clear = function () {
  10267. if (this.explicitlyCleared) { return }
  10268. this.explicitlyCleared = true;
  10269. for (var i = 0; i < this.markers.length; ++i)
  10270. { this.markers[i].clear(); }
  10271. signalLater(this, "clear");
  10272. };
  10273. SharedTextMarker.prototype.find = function (side, lineObj) {
  10274. return this.primary.find(side, lineObj)
  10275. };
  10276. eventMixin(SharedTextMarker);
  10277. function markTextShared(doc, from, to, options, type) {
  10278. options = copyObj(options);
  10279. options.shared = false;
  10280. var markers = [markText(doc, from, to, options, type)], primary = markers[0];
  10281. var widget = options.widgetNode;
  10282. linkedDocs(doc, function (doc) {
  10283. if (widget) { options.widgetNode = widget.cloneNode(true); }
  10284. markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
  10285. for (var i = 0; i < doc.linked.length; ++i)
  10286. { if (doc.linked[i].isParent) { return } }
  10287. primary = lst(markers);
  10288. });
  10289. return new SharedTextMarker(markers, primary)
  10290. }
  10291. function findSharedMarkers(doc) {
  10292. return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })
  10293. }
  10294. function copySharedMarkers(doc, markers) {
  10295. for (var i = 0; i < markers.length; i++) {
  10296. var marker = markers[i], pos = marker.find();
  10297. var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);
  10298. if (cmp(mFrom, mTo)) {
  10299. var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
  10300. marker.markers.push(subMark);
  10301. subMark.parent = marker;
  10302. }
  10303. }
  10304. }
  10305. function detachSharedMarkers(markers) {
  10306. var loop = function ( i ) {
  10307. var marker = markers[i], linked = [marker.primary.doc];
  10308. linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });
  10309. for (var j = 0; j < marker.markers.length; j++) {
  10310. var subMarker = marker.markers[j];
  10311. if (indexOf(linked, subMarker.doc) == -1) {
  10312. subMarker.parent = null;
  10313. marker.markers.splice(j--, 1);
  10314. }
  10315. }
  10316. };
  10317. for (var i = 0; i < markers.length; i++) loop( i );
  10318. }
  10319. var nextDocId = 0;
  10320. var Doc = function(text, mode, firstLine, lineSep, direction) {
  10321. if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }
  10322. if (firstLine == null) { firstLine = 0; }
  10323. BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
  10324. this.first = firstLine;
  10325. this.scrollTop = this.scrollLeft = 0;
  10326. this.cantEdit = false;
  10327. this.cleanGeneration = 1;
  10328. this.modeFrontier = this.highlightFrontier = firstLine;
  10329. var start = Pos(firstLine, 0);
  10330. this.sel = simpleSelection(start);
  10331. this.history = new History(null);
  10332. this.id = ++nextDocId;
  10333. this.modeOption = mode;
  10334. this.lineSep = lineSep;
  10335. this.direction = (direction == "rtl") ? "rtl" : "ltr";
  10336. this.extend = false;
  10337. if (typeof text == "string") { text = this.splitLines(text); }
  10338. updateDoc(this, {from: start, to: start, text: text});
  10339. setSelection(this, simpleSelection(start), sel_dontScroll);
  10340. };
  10341. Doc.prototype = createObj(BranchChunk.prototype, {
  10342. constructor: Doc,
  10343. // Iterate over the document. Supports two forms -- with only one
  10344. // argument, it calls that for each line in the document. With
  10345. // three, it iterates over the range given by the first two (with
  10346. // the second being non-inclusive).
  10347. iter: function(from, to, op) {
  10348. if (op) { this.iterN(from - this.first, to - from, op); }
  10349. else { this.iterN(this.first, this.first + this.size, from); }
  10350. },
  10351. // Non-public interface for adding and removing lines.
  10352. insert: function(at, lines) {
  10353. var height = 0;
  10354. for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }
  10355. this.insertInner(at - this.first, lines, height);
  10356. },
  10357. remove: function(at, n) { this.removeInner(at - this.first, n); },
  10358. // From here, the methods are part of the public interface. Most
  10359. // are also available from CodeMirror (editor) instances.
  10360. getValue: function(lineSep) {
  10361. var lines = getLines(this, this.first, this.first + this.size);
  10362. if (lineSep === false) { return lines }
  10363. return lines.join(lineSep || this.lineSeparator())
  10364. },
  10365. setValue: docMethodOp(function(code) {
  10366. var top = Pos(this.first, 0), last = this.first + this.size - 1;
  10367. makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
  10368. text: this.splitLines(code), origin: "setValue", full: true}, true);
  10369. if (this.cm) { scrollToCoords(this.cm, 0, 0); }
  10370. setSelection(this, simpleSelection(top), sel_dontScroll);
  10371. }),
  10372. replaceRange: function(code, from, to, origin) {
  10373. from = clipPos(this, from);
  10374. to = to ? clipPos(this, to) : from;
  10375. replaceRange(this, code, from, to, origin);
  10376. },
  10377. getRange: function(from, to, lineSep) {
  10378. var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
  10379. if (lineSep === false) { return lines }
  10380. return lines.join(lineSep || this.lineSeparator())
  10381. },
  10382. getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},
  10383. getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},
  10384. getLineNumber: function(line) {return lineNo(line)},
  10385. getLineHandleVisualStart: function(line) {
  10386. if (typeof line == "number") { line = getLine(this, line); }
  10387. return visualLine(line)
  10388. },
  10389. lineCount: function() {return this.size},
  10390. firstLine: function() {return this.first},
  10391. lastLine: function() {return this.first + this.size - 1},
  10392. clipPos: function(pos) {return clipPos(this, pos)},
  10393. getCursor: function(start) {
  10394. var range = this.sel.primary(), pos;
  10395. if (start == null || start == "head") { pos = range.head; }
  10396. else if (start == "anchor") { pos = range.anchor; }
  10397. else if (start == "end" || start == "to" || start === false) { pos = range.to(); }
  10398. else { pos = range.from(); }
  10399. return pos
  10400. },
  10401. listSelections: function() { return this.sel.ranges },
  10402. somethingSelected: function() {return this.sel.somethingSelected()},
  10403. setCursor: docMethodOp(function(line, ch, options) {
  10404. setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
  10405. }),
  10406. setSelection: docMethodOp(function(anchor, head, options) {
  10407. setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
  10408. }),
  10409. extendSelection: docMethodOp(function(head, other, options) {
  10410. extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
  10411. }),
  10412. extendSelections: docMethodOp(function(heads, options) {
  10413. extendSelections(this, clipPosArray(this, heads), options);
  10414. }),
  10415. extendSelectionsBy: docMethodOp(function(f, options) {
  10416. var heads = map(this.sel.ranges, f);
  10417. extendSelections(this, clipPosArray(this, heads), options);
  10418. }),
  10419. setSelections: docMethodOp(function(ranges, primary, options) {
  10420. if (!ranges.length) { return }
  10421. var out = [];
  10422. for (var i = 0; i < ranges.length; i++)
  10423. { out[i] = new Range(clipPos(this, ranges[i].anchor),
  10424. clipPos(this, ranges[i].head || ranges[i].anchor)); }
  10425. if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }
  10426. setSelection(this, normalizeSelection(this.cm, out, primary), options);
  10427. }),
  10428. addSelection: docMethodOp(function(anchor, head, options) {
  10429. var ranges = this.sel.ranges.slice(0);
  10430. ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
  10431. setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);
  10432. }),
  10433. getSelection: function(lineSep) {
  10434. var ranges = this.sel.ranges, lines;
  10435. for (var i = 0; i < ranges.length; i++) {
  10436. var sel = getBetween(this, ranges[i].from(), ranges[i].to());
  10437. lines = lines ? lines.concat(sel) : sel;
  10438. }
  10439. if (lineSep === false) { return lines }
  10440. else { return lines.join(lineSep || this.lineSeparator()) }
  10441. },
  10442. getSelections: function(lineSep) {
  10443. var parts = [], ranges = this.sel.ranges;
  10444. for (var i = 0; i < ranges.length; i++) {
  10445. var sel = getBetween(this, ranges[i].from(), ranges[i].to());
  10446. if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }
  10447. parts[i] = sel;
  10448. }
  10449. return parts
  10450. },
  10451. replaceSelection: function(code, collapse, origin) {
  10452. var dup = [];
  10453. for (var i = 0; i < this.sel.ranges.length; i++)
  10454. { dup[i] = code; }
  10455. this.replaceSelections(dup, collapse, origin || "+input");
  10456. },
  10457. replaceSelections: docMethodOp(function(code, collapse, origin) {
  10458. var changes = [], sel = this.sel;
  10459. for (var i = 0; i < sel.ranges.length; i++) {
  10460. var range = sel.ranges[i];
  10461. changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};
  10462. }
  10463. var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
  10464. for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)
  10465. { makeChange(this, changes[i$1]); }
  10466. if (newSel) { setSelectionReplaceHistory(this, newSel); }
  10467. else if (this.cm) { ensureCursorVisible(this.cm); }
  10468. }),
  10469. undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),
  10470. redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),
  10471. undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),
  10472. redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),
  10473. setExtending: function(val) {this.extend = val;},
  10474. getExtending: function() {return this.extend},
  10475. historySize: function() {
  10476. var hist = this.history, done = 0, undone = 0;
  10477. for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }
  10478. for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }
  10479. return {undo: done, redo: undone}
  10480. },
  10481. clearHistory: function() {
  10482. var this$1 = this;
  10483. this.history = new History(this.history);
  10484. linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);
  10485. },
  10486. markClean: function() {
  10487. this.cleanGeneration = this.changeGeneration(true);
  10488. },
  10489. changeGeneration: function(forceSplit) {
  10490. if (forceSplit)
  10491. { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }
  10492. return this.history.generation
  10493. },
  10494. isClean: function (gen) {
  10495. return this.history.generation == (gen || this.cleanGeneration)
  10496. },
  10497. getHistory: function() {
  10498. return {done: copyHistoryArray(this.history.done),
  10499. undone: copyHistoryArray(this.history.undone)}
  10500. },
  10501. setHistory: function(histData) {
  10502. var hist = this.history = new History(this.history);
  10503. hist.done = copyHistoryArray(histData.done.slice(0), null, true);
  10504. hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
  10505. },
  10506. setGutterMarker: docMethodOp(function(line, gutterID, value) {
  10507. return changeLine(this, line, "gutter", function (line) {
  10508. var markers = line.gutterMarkers || (line.gutterMarkers = {});
  10509. markers[gutterID] = value;
  10510. if (!value && isEmpty(markers)) { line.gutterMarkers = null; }
  10511. return true
  10512. })
  10513. }),
  10514. clearGutter: docMethodOp(function(gutterID) {
  10515. var this$1 = this;
  10516. this.iter(function (line) {
  10517. if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
  10518. changeLine(this$1, line, "gutter", function () {
  10519. line.gutterMarkers[gutterID] = null;
  10520. if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }
  10521. return true
  10522. });
  10523. }
  10524. });
  10525. }),
  10526. lineInfo: function(line) {
  10527. var n;
  10528. if (typeof line == "number") {
  10529. if (!isLine(this, line)) { return null }
  10530. n = line;
  10531. line = getLine(this, line);
  10532. if (!line) { return null }
  10533. } else {
  10534. n = lineNo(line);
  10535. if (n == null) { return null }
  10536. }
  10537. return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
  10538. textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
  10539. widgets: line.widgets}
  10540. },
  10541. addLineClass: docMethodOp(function(handle, where, cls) {
  10542. return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
  10543. var prop = where == "text" ? "textClass"
  10544. : where == "background" ? "bgClass"
  10545. : where == "gutter" ? "gutterClass" : "wrapClass";
  10546. if (!line[prop]) { line[prop] = cls; }
  10547. else if (classTest(cls).test(line[prop])) { return false }
  10548. else { line[prop] += " " + cls; }
  10549. return true
  10550. })
  10551. }),
  10552. removeLineClass: docMethodOp(function(handle, where, cls) {
  10553. return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
  10554. var prop = where == "text" ? "textClass"
  10555. : where == "background" ? "bgClass"
  10556. : where == "gutter" ? "gutterClass" : "wrapClass";
  10557. var cur = line[prop];
  10558. if (!cur) { return false }
  10559. else if (cls == null) { line[prop] = null; }
  10560. else {
  10561. var found = cur.match(classTest(cls));
  10562. if (!found) { return false }
  10563. var end = found.index + found[0].length;
  10564. line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
  10565. }
  10566. return true
  10567. })
  10568. }),
  10569. addLineWidget: docMethodOp(function(handle, node, options) {
  10570. return addLineWidget(this, handle, node, options)
  10571. }),
  10572. removeLineWidget: function(widget) { widget.clear(); },
  10573. markText: function(from, to, options) {
  10574. return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")
  10575. },
  10576. setBookmark: function(pos, options) {
  10577. var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
  10578. insertLeft: options && options.insertLeft,
  10579. clearWhenEmpty: false, shared: options && options.shared,
  10580. handleMouseEvents: options && options.handleMouseEvents};
  10581. pos = clipPos(this, pos);
  10582. return markText(this, pos, pos, realOpts, "bookmark")
  10583. },
  10584. findMarksAt: function(pos) {
  10585. pos = clipPos(this, pos);
  10586. var markers = [], spans = getLine(this, pos.line).markedSpans;
  10587. if (spans) { for (var i = 0; i < spans.length; ++i) {
  10588. var span = spans[i];
  10589. if ((span.from == null || span.from <= pos.ch) &&
  10590. (span.to == null || span.to >= pos.ch))
  10591. { markers.push(span.marker.parent || span.marker); }
  10592. } }
  10593. return markers
  10594. },
  10595. findMarks: function(from, to, filter) {
  10596. from = clipPos(this, from); to = clipPos(this, to);
  10597. var found = [], lineNo = from.line;
  10598. this.iter(from.line, to.line + 1, function (line) {
  10599. var spans = line.markedSpans;
  10600. if (spans) { for (var i = 0; i < spans.length; i++) {
  10601. var span = spans[i];
  10602. if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
  10603. span.from == null && lineNo != from.line ||
  10604. span.from != null && lineNo == to.line && span.from >= to.ch) &&
  10605. (!filter || filter(span.marker)))
  10606. { found.push(span.marker.parent || span.marker); }
  10607. } }
  10608. ++lineNo;
  10609. });
  10610. return found
  10611. },
  10612. getAllMarks: function() {
  10613. var markers = [];
  10614. this.iter(function (line) {
  10615. var sps = line.markedSpans;
  10616. if (sps) { for (var i = 0; i < sps.length; ++i)
  10617. { if (sps[i].from != null) { markers.push(sps[i].marker); } } }
  10618. });
  10619. return markers
  10620. },
  10621. posFromIndex: function(off) {
  10622. var ch, lineNo = this.first, sepSize = this.lineSeparator().length;
  10623. this.iter(function (line) {
  10624. var sz = line.text.length + sepSize;
  10625. if (sz > off) { ch = off; return true }
  10626. off -= sz;
  10627. ++lineNo;
  10628. });
  10629. return clipPos(this, Pos(lineNo, ch))
  10630. },
  10631. indexFromPos: function (coords) {
  10632. coords = clipPos(this, coords);
  10633. var index = coords.ch;
  10634. if (coords.line < this.first || coords.ch < 0) { return 0 }
  10635. var sepSize = this.lineSeparator().length;
  10636. this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value
  10637. index += line.text.length + sepSize;
  10638. });
  10639. return index
  10640. },
  10641. copy: function(copyHistory) {
  10642. var doc = new Doc(getLines(this, this.first, this.first + this.size),
  10643. this.modeOption, this.first, this.lineSep, this.direction);
  10644. doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
  10645. doc.sel = this.sel;
  10646. doc.extend = false;
  10647. if (copyHistory) {
  10648. doc.history.undoDepth = this.history.undoDepth;
  10649. doc.setHistory(this.getHistory());
  10650. }
  10651. return doc
  10652. },
  10653. linkedDoc: function(options) {
  10654. if (!options) { options = {}; }
  10655. var from = this.first, to = this.first + this.size;
  10656. if (options.from != null && options.from > from) { from = options.from; }
  10657. if (options.to != null && options.to < to) { to = options.to; }
  10658. var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);
  10659. if (options.sharedHist) { copy.history = this.history
  10660. ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
  10661. copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
  10662. copySharedMarkers(copy, findSharedMarkers(this));
  10663. return copy
  10664. },
  10665. unlinkDoc: function(other) {
  10666. if (other instanceof CodeMirror) { other = other.doc; }
  10667. if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {
  10668. var link = this.linked[i];
  10669. if (link.doc != other) { continue }
  10670. this.linked.splice(i, 1);
  10671. other.unlinkDoc(this);
  10672. detachSharedMarkers(findSharedMarkers(this));
  10673. break
  10674. } }
  10675. // If the histories were shared, split them again
  10676. if (other.history == this.history) {
  10677. var splitIds = [other.id];
  10678. linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);
  10679. other.history = new History(null);
  10680. other.history.done = copyHistoryArray(this.history.done, splitIds);
  10681. other.history.undone = copyHistoryArray(this.history.undone, splitIds);
  10682. }
  10683. },
  10684. iterLinkedDocs: function(f) {linkedDocs(this, f);},
  10685. getMode: function() {return this.mode},
  10686. getEditor: function() {return this.cm},
  10687. splitLines: function(str) {
  10688. if (this.lineSep) { return str.split(this.lineSep) }
  10689. return splitLinesAuto(str)
  10690. },
  10691. lineSeparator: function() { return this.lineSep || "\n" },
  10692. setDirection: docMethodOp(function (dir) {
  10693. if (dir != "rtl") { dir = "ltr"; }
  10694. if (dir == this.direction) { return }
  10695. this.direction = dir;
  10696. this.iter(function (line) { return line.order = null; });
  10697. if (this.cm) { directionChanged(this.cm); }
  10698. })
  10699. });
  10700. // Public alias.
  10701. Doc.prototype.eachLine = Doc.prototype.iter;
  10702. // Kludge to work around strange IE behavior where it'll sometimes
  10703. // re-fire a series of drag-related events right after the drop (#1551)
  10704. var lastDrop = 0;
  10705. function onDrop(e) {
  10706. var cm = this;
  10707. clearDragCursor(cm);
  10708. if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
  10709. { return }
  10710. e_preventDefault(e);
  10711. if (ie) { lastDrop = +new Date; }
  10712. var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
  10713. if (!pos || cm.isReadOnly()) { return }
  10714. // Might be a file drop, in which case we simply extract the text
  10715. // and insert it.
  10716. if (files && files.length && window.FileReader && window.File) {
  10717. var n = files.length, text = Array(n), read = 0;
  10718. var markAsReadAndPasteIfAllFilesAreRead = function () {
  10719. if (++read == n) {
  10720. operation(cm, function () {
  10721. pos = clipPos(cm.doc, pos);
  10722. var change = {from: pos, to: pos,
  10723. text: cm.doc.splitLines(
  10724. text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),
  10725. origin: "paste"};
  10726. makeChange(cm.doc, change);
  10727. setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));
  10728. })();
  10729. }
  10730. };
  10731. var readTextFromFile = function (file, i) {
  10732. if (cm.options.allowDropFileTypes &&
  10733. indexOf(cm.options.allowDropFileTypes, file.type) == -1) {
  10734. markAsReadAndPasteIfAllFilesAreRead();
  10735. return
  10736. }
  10737. var reader = new FileReader;
  10738. reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };
  10739. reader.onload = function () {
  10740. var content = reader.result;
  10741. if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) {
  10742. markAsReadAndPasteIfAllFilesAreRead();
  10743. return
  10744. }
  10745. text[i] = content;
  10746. markAsReadAndPasteIfAllFilesAreRead();
  10747. };
  10748. reader.readAsText(file);
  10749. };
  10750. for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }
  10751. } else { // Normal drop
  10752. // Don't do a replace if the drop happened inside of the selected text.
  10753. if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
  10754. cm.state.draggingText(e);
  10755. // Ensure the editor is re-focused
  10756. setTimeout(function () { return cm.display.input.focus(); }, 20);
  10757. return
  10758. }
  10759. try {
  10760. var text$1 = e.dataTransfer.getData("Text");
  10761. if (text$1) {
  10762. var selected;
  10763. if (cm.state.draggingText && !cm.state.draggingText.copy)
  10764. { selected = cm.listSelections(); }
  10765. setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
  10766. if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)
  10767. { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } }
  10768. cm.replaceSelection(text$1, "around", "paste");
  10769. cm.display.input.focus();
  10770. }
  10771. }
  10772. catch(e$1){}
  10773. }
  10774. }
  10775. function onDragStart(cm, e) {
  10776. if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
  10777. if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }
  10778. e.dataTransfer.setData("Text", cm.getSelection());
  10779. e.dataTransfer.effectAllowed = "copyMove";
  10780. // Use dummy image instead of default browsers image.
  10781. // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
  10782. if (e.dataTransfer.setDragImage && !safari) {
  10783. var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
  10784. img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
  10785. if (presto) {
  10786. img.width = img.height = 1;
  10787. cm.display.wrapper.appendChild(img);
  10788. // Force a relayout, or Opera won't use our image for some obscure reason
  10789. img._top = img.offsetTop;
  10790. }
  10791. e.dataTransfer.setDragImage(img, 0, 0);
  10792. if (presto) { img.parentNode.removeChild(img); }
  10793. }
  10794. }
  10795. function onDragOver(cm, e) {
  10796. var pos = posFromMouse(cm, e);
  10797. if (!pos) { return }
  10798. var frag = document.createDocumentFragment();
  10799. drawSelectionCursor(cm, pos, frag);
  10800. if (!cm.display.dragCursor) {
  10801. cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
  10802. cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
  10803. }
  10804. removeChildrenAndAdd(cm.display.dragCursor, frag);
  10805. }
  10806. function clearDragCursor(cm) {
  10807. if (cm.display.dragCursor) {
  10808. cm.display.lineSpace.removeChild(cm.display.dragCursor);
  10809. cm.display.dragCursor = null;
  10810. }
  10811. }
  10812. // These must be handled carefully, because naively registering a
  10813. // handler for each editor will cause the editors to never be
  10814. // garbage collected.
  10815. function forEachCodeMirror(f) {
  10816. if (!document.getElementsByClassName) { return }
  10817. var byClass = document.getElementsByClassName("CodeMirror"), editors = [];
  10818. for (var i = 0; i < byClass.length; i++) {
  10819. var cm = byClass[i].CodeMirror;
  10820. if (cm) { editors.push(cm); }
  10821. }
  10822. if (editors.length) { editors[0].operation(function () {
  10823. for (var i = 0; i < editors.length; i++) { f(editors[i]); }
  10824. }); }
  10825. }
  10826. var globalsRegistered = false;
  10827. function ensureGlobalHandlers() {
  10828. if (globalsRegistered) { return }
  10829. registerGlobalHandlers();
  10830. globalsRegistered = true;
  10831. }
  10832. function registerGlobalHandlers() {
  10833. // When the window resizes, we need to refresh active editors.
  10834. var resizeTimer;
  10835. on(window, "resize", function () {
  10836. if (resizeTimer == null) { resizeTimer = setTimeout(function () {
  10837. resizeTimer = null;
  10838. forEachCodeMirror(onResize);
  10839. }, 100); }
  10840. });
  10841. // When the window loses focus, we want to show the editor as blurred
  10842. on(window, "blur", function () { return forEachCodeMirror(onBlur); });
  10843. }
  10844. // Called when the window resizes
  10845. function onResize(cm) {
  10846. var d = cm.display;
  10847. // Might be a text scaling operation, clear size caches.
  10848. d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
  10849. d.scrollbarsClipped = false;
  10850. cm.setSize();
  10851. }
  10852. var keyNames = {
  10853. 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
  10854. 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
  10855. 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
  10856. 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
  10857. 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
  10858. 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
  10859. 221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
  10860. 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
  10861. };
  10862. // Number keys
  10863. for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }
  10864. // Alphabetic keys
  10865. for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }
  10866. // Function keys
  10867. for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; }
  10868. var keyMap = {};
  10869. keyMap.basic = {
  10870. "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
  10871. "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
  10872. "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",
  10873. "Tab": "defaultTab", "Shift-Tab": "indentAuto",
  10874. "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
  10875. "Esc": "singleSelection"
  10876. };
  10877. // Note that the save and find-related commands aren't defined by
  10878. // default. User code or addons can define them. Unknown commands
  10879. // are simply ignored.
  10880. keyMap.pcDefault = {
  10881. "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
  10882. "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown",
  10883. "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
  10884. "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
  10885. "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
  10886. "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
  10887. "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
  10888. "fallthrough": "basic"
  10889. };
  10890. // Very basic readline/emacs-style bindings, which are standard on Mac.
  10891. keyMap.emacsy = {
  10892. "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
  10893. "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp",
  10894. "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine",
  10895. "Ctrl-T": "transposeChars", "Ctrl-O": "openLine"
  10896. };
  10897. keyMap.macDefault = {
  10898. "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
  10899. "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
  10900. "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore",
  10901. "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
  10902. "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
  10903. "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
  10904. "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
  10905. "fallthrough": ["basic", "emacsy"]
  10906. };
  10907. keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
  10908. // KEYMAP DISPATCH
  10909. function normalizeKeyName(name) {
  10910. var parts = name.split(/-(?!$)/);
  10911. name = parts[parts.length - 1];
  10912. var alt, ctrl, shift, cmd;
  10913. for (var i = 0; i < parts.length - 1; i++) {
  10914. var mod = parts[i];
  10915. if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }
  10916. else if (/^a(lt)?$/i.test(mod)) { alt = true; }
  10917. else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }
  10918. else if (/^s(hift)?$/i.test(mod)) { shift = true; }
  10919. else { throw new Error("Unrecognized modifier name: " + mod) }
  10920. }
  10921. if (alt) { name = "Alt-" + name; }
  10922. if (ctrl) { name = "Ctrl-" + name; }
  10923. if (cmd) { name = "Cmd-" + name; }
  10924. if (shift) { name = "Shift-" + name; }
  10925. return name
  10926. }
  10927. // This is a kludge to keep keymaps mostly working as raw objects
  10928. // (backwards compatibility) while at the same time support features
  10929. // like normalization and multi-stroke key bindings. It compiles a
  10930. // new normalized keymap, and then updates the old object to reflect
  10931. // this.
  10932. function normalizeKeyMap(keymap) {
  10933. var copy = {};
  10934. for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {
  10935. var value = keymap[keyname];
  10936. if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }
  10937. if (value == "...") { delete keymap[keyname]; continue }
  10938. var keys = map(keyname.split(" "), normalizeKeyName);
  10939. for (var i = 0; i < keys.length; i++) {
  10940. var val = (void 0), name = (void 0);
  10941. if (i == keys.length - 1) {
  10942. name = keys.join(" ");
  10943. val = value;
  10944. } else {
  10945. name = keys.slice(0, i + 1).join(" ");
  10946. val = "...";
  10947. }
  10948. var prev = copy[name];
  10949. if (!prev) { copy[name] = val; }
  10950. else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }
  10951. }
  10952. delete keymap[keyname];
  10953. } }
  10954. for (var prop in copy) { keymap[prop] = copy[prop]; }
  10955. return keymap
  10956. }
  10957. function lookupKey(key, map, handle, context) {
  10958. map = getKeyMap(map);
  10959. var found = map.call ? map.call(key, context) : map[key];
  10960. if (found === false) { return "nothing" }
  10961. if (found === "...") { return "multi" }
  10962. if (found != null && handle(found)) { return "handled" }
  10963. if (map.fallthrough) {
  10964. if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")
  10965. { return lookupKey(key, map.fallthrough, handle, context) }
  10966. for (var i = 0; i < map.fallthrough.length; i++) {
  10967. var result = lookupKey(key, map.fallthrough[i], handle, context);
  10968. if (result) { return result }
  10969. }
  10970. }
  10971. }
  10972. // Modifier key presses don't count as 'real' key presses for the
  10973. // purpose of keymap fallthrough.
  10974. function isModifierKey(value) {
  10975. var name = typeof value == "string" ? value : keyNames[value.keyCode];
  10976. return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"
  10977. }
  10978. function addModifierNames(name, event, noShift) {
  10979. var base = name;
  10980. if (event.altKey && base != "Alt") { name = "Alt-" + name; }
  10981. if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
  10982. if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }
  10983. if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
  10984. return name
  10985. }
  10986. // Look up the name of a key as indicated by an event object.
  10987. function keyName(event, noShift) {
  10988. if (presto && event.keyCode == 34 && event["char"]) { return false }
  10989. var name = keyNames[event.keyCode];
  10990. if (name == null || event.altGraphKey) { return false }
  10991. // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
  10992. // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
  10993. if (event.keyCode == 3 && event.code) { name = event.code; }
  10994. return addModifierNames(name, event, noShift)
  10995. }
  10996. function getKeyMap(val) {
  10997. return typeof val == "string" ? keyMap[val] : val
  10998. }
  10999. // Helper for deleting text near the selection(s), used to implement
  11000. // backspace, delete, and similar functionality.
  11001. function deleteNearSelection(cm, compute) {
  11002. var ranges = cm.doc.sel.ranges, kill = [];
  11003. // Build up a set of ranges to kill first, merging overlapping
  11004. // ranges.
  11005. for (var i = 0; i < ranges.length; i++) {
  11006. var toKill = compute(ranges[i]);
  11007. while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
  11008. var replaced = kill.pop();
  11009. if (cmp(replaced.from, toKill.from) < 0) {
  11010. toKill.from = replaced.from;
  11011. break
  11012. }
  11013. }
  11014. kill.push(toKill);
  11015. }
  11016. // Next, remove those actual ranges.
  11017. runInOp(cm, function () {
  11018. for (var i = kill.length - 1; i >= 0; i--)
  11019. { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); }
  11020. ensureCursorVisible(cm);
  11021. });
  11022. }
  11023. function moveCharLogically(line, ch, dir) {
  11024. var target = skipExtendingChars(line.text, ch + dir, dir);
  11025. return target < 0 || target > line.text.length ? null : target
  11026. }
  11027. function moveLogically(line, start, dir) {
  11028. var ch = moveCharLogically(line, start.ch, dir);
  11029. return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
  11030. }
  11031. function endOfLine(visually, cm, lineObj, lineNo, dir) {
  11032. if (visually) {
  11033. if (cm.doc.direction == "rtl") { dir = -dir; }
  11034. var order = getOrder(lineObj, cm.doc.direction);
  11035. if (order) {
  11036. var part = dir < 0 ? lst(order) : order[0];
  11037. var moveInStorageOrder = (dir < 0) == (part.level == 1);
  11038. var sticky = moveInStorageOrder ? "after" : "before";
  11039. var ch;
  11040. // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
  11041. // it could be that the last bidi part is not on the last visual line,
  11042. // since visual lines contain content order-consecutive chunks.
  11043. // Thus, in rtl, we are looking for the first (content-order) character
  11044. // in the rtl chunk that is on the last line (that is, the same line
  11045. // as the last (content-order) character).
  11046. if (part.level > 0 || cm.doc.direction == "rtl") {
  11047. var prep = prepareMeasureForLine(cm, lineObj);
  11048. ch = dir < 0 ? lineObj.text.length - 1 : 0;
  11049. var targetTop = measureCharPrepared(cm, prep, ch).top;
  11050. ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);
  11051. if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); }
  11052. } else { ch = dir < 0 ? part.to : part.from; }
  11053. return new Pos(lineNo, ch, sticky)
  11054. }
  11055. }
  11056. return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after")
  11057. }
  11058. function moveVisually(cm, line, start, dir) {
  11059. var bidi = getOrder(line, cm.doc.direction);
  11060. if (!bidi) { return moveLogically(line, start, dir) }
  11061. if (start.ch >= line.text.length) {
  11062. start.ch = line.text.length;
  11063. start.sticky = "before";
  11064. } else if (start.ch <= 0) {
  11065. start.ch = 0;
  11066. start.sticky = "after";
  11067. }
  11068. var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];
  11069. if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
  11070. // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
  11071. // nothing interesting happens.
  11072. return moveLogically(line, start, dir)
  11073. }
  11074. var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };
  11075. var prep;
  11076. var getWrappedLineExtent = function (ch) {
  11077. if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
  11078. prep = prep || prepareMeasureForLine(cm, line);
  11079. return wrappedLineExtentChar(cm, line, prep, ch)
  11080. };
  11081. var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);
  11082. if (cm.doc.direction == "rtl" || part.level == 1) {
  11083. var moveInStorageOrder = (part.level == 1) == (dir < 0);
  11084. var ch = mv(start, moveInStorageOrder ? 1 : -1);
  11085. if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
  11086. // Case 2: We move within an rtl part or in an rtl editor on the same visual line
  11087. var sticky = moveInStorageOrder ? "before" : "after";
  11088. return new Pos(start.line, ch, sticky)
  11089. }
  11090. }
  11091. // Case 3: Could not move within this bidi part in this visual line, so leave
  11092. // the current bidi part
  11093. var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
  11094. var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
  11095. ? new Pos(start.line, mv(ch, 1), "before")
  11096. : new Pos(start.line, ch, "after"); };
  11097. for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
  11098. var part = bidi[partPos];
  11099. var moveInStorageOrder = (dir > 0) == (part.level != 1);
  11100. var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
  11101. if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
  11102. ch = moveInStorageOrder ? part.from : mv(part.to, -1);
  11103. if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
  11104. }
  11105. };
  11106. // Case 3a: Look for other bidi parts on the same visual line
  11107. var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
  11108. if (res) { return res }
  11109. // Case 3b: Look for other bidi parts on the next visual line
  11110. var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
  11111. if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
  11112. res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
  11113. if (res) { return res }
  11114. }
  11115. // Case 4: Nowhere to move
  11116. return null
  11117. }
  11118. // Commands are parameter-less actions that can be performed on an
  11119. // editor, mostly used for keybindings.
  11120. var commands = {
  11121. selectAll: selectAll,
  11122. singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },
  11123. killLine: function (cm) { return deleteNearSelection(cm, function (range) {
  11124. if (range.empty()) {
  11125. var len = getLine(cm.doc, range.head.line).text.length;
  11126. if (range.head.ch == len && range.head.line < cm.lastLine())
  11127. { return {from: range.head, to: Pos(range.head.line + 1, 0)} }
  11128. else
  11129. { return {from: range.head, to: Pos(range.head.line, len)} }
  11130. } else {
  11131. return {from: range.from(), to: range.to()}
  11132. }
  11133. }); },
  11134. deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({
  11135. from: Pos(range.from().line, 0),
  11136. to: clipPos(cm.doc, Pos(range.to().line + 1, 0))
  11137. }); }); },
  11138. delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({
  11139. from: Pos(range.from().line, 0), to: range.from()
  11140. }); }); },
  11141. delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {
  11142. var top = cm.charCoords(range.head, "div").top + 5;
  11143. var leftPos = cm.coordsChar({left: 0, top: top}, "div");
  11144. return {from: leftPos, to: range.from()}
  11145. }); },
  11146. delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {
  11147. var top = cm.charCoords(range.head, "div").top + 5;
  11148. var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
  11149. return {from: range.from(), to: rightPos }
  11150. }); },
  11151. undo: function (cm) { return cm.undo(); },
  11152. redo: function (cm) { return cm.redo(); },
  11153. undoSelection: function (cm) { return cm.undoSelection(); },
  11154. redoSelection: function (cm) { return cm.redoSelection(); },
  11155. goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },
  11156. goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },
  11157. goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },
  11158. {origin: "+move", bias: 1}
  11159. ); },
  11160. goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },
  11161. {origin: "+move", bias: 1}
  11162. ); },
  11163. goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },
  11164. {origin: "+move", bias: -1}
  11165. ); },
  11166. goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
  11167. var top = cm.cursorCoords(range.head, "div").top + 5;
  11168. return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
  11169. }, sel_move); },
  11170. goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
  11171. var top = cm.cursorCoords(range.head, "div").top + 5;
  11172. return cm.coordsChar({left: 0, top: top}, "div")
  11173. }, sel_move); },
  11174. goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
  11175. var top = cm.cursorCoords(range.head, "div").top + 5;
  11176. var pos = cm.coordsChar({left: 0, top: top}, "div");
  11177. if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
  11178. return pos
  11179. }, sel_move); },
  11180. goLineUp: function (cm) { return cm.moveV(-1, "line"); },
  11181. goLineDown: function (cm) { return cm.moveV(1, "line"); },
  11182. goPageUp: function (cm) { return cm.moveV(-1, "page"); },
  11183. goPageDown: function (cm) { return cm.moveV(1, "page"); },
  11184. goCharLeft: function (cm) { return cm.moveH(-1, "char"); },
  11185. goCharRight: function (cm) { return cm.moveH(1, "char"); },
  11186. goColumnLeft: function (cm) { return cm.moveH(-1, "column"); },
  11187. goColumnRight: function (cm) { return cm.moveH(1, "column"); },
  11188. goWordLeft: function (cm) { return cm.moveH(-1, "word"); },
  11189. goGroupRight: function (cm) { return cm.moveH(1, "group"); },
  11190. goGroupLeft: function (cm) { return cm.moveH(-1, "group"); },
  11191. goWordRight: function (cm) { return cm.moveH(1, "word"); },
  11192. delCharBefore: function (cm) { return cm.deleteH(-1, "codepoint"); },
  11193. delCharAfter: function (cm) { return cm.deleteH(1, "char"); },
  11194. delWordBefore: function (cm) { return cm.deleteH(-1, "word"); },
  11195. delWordAfter: function (cm) { return cm.deleteH(1, "word"); },
  11196. delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); },
  11197. delGroupAfter: function (cm) { return cm.deleteH(1, "group"); },
  11198. indentAuto: function (cm) { return cm.indentSelection("smart"); },
  11199. indentMore: function (cm) { return cm.indentSelection("add"); },
  11200. indentLess: function (cm) { return cm.indentSelection("subtract"); },
  11201. insertTab: function (cm) { return cm.replaceSelection("\t"); },
  11202. insertSoftTab: function (cm) {
  11203. var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;
  11204. for (var i = 0; i < ranges.length; i++) {
  11205. var pos = ranges[i].from();
  11206. var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
  11207. spaces.push(spaceStr(tabSize - col % tabSize));
  11208. }
  11209. cm.replaceSelections(spaces);
  11210. },
  11211. defaultTab: function (cm) {
  11212. if (cm.somethingSelected()) { cm.indentSelection("add"); }
  11213. else { cm.execCommand("insertTab"); }
  11214. },
  11215. // Swap the two chars left and right of each selection's head.
  11216. // Move cursor behind the two swapped characters afterwards.
  11217. //
  11218. // Doesn't consider line feeds a character.
  11219. // Doesn't scan more than one line above to find a character.
  11220. // Doesn't do anything on an empty line.
  11221. // Doesn't do anything with non-empty selections.
  11222. transposeChars: function (cm) { return runInOp(cm, function () {
  11223. var ranges = cm.listSelections(), newSel = [];
  11224. for (var i = 0; i < ranges.length; i++) {
  11225. if (!ranges[i].empty()) { continue }
  11226. var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
  11227. if (line) {
  11228. if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }
  11229. if (cur.ch > 0) {
  11230. cur = new Pos(cur.line, cur.ch + 1);
  11231. cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
  11232. Pos(cur.line, cur.ch - 2), cur, "+transpose");
  11233. } else if (cur.line > cm.doc.first) {
  11234. var prev = getLine(cm.doc, cur.line - 1).text;
  11235. if (prev) {
  11236. cur = new Pos(cur.line, 1);
  11237. cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
  11238. prev.charAt(prev.length - 1),
  11239. Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
  11240. }
  11241. }
  11242. }
  11243. newSel.push(new Range(cur, cur));
  11244. }
  11245. cm.setSelections(newSel);
  11246. }); },
  11247. newlineAndIndent: function (cm) { return runInOp(cm, function () {
  11248. var sels = cm.listSelections();
  11249. for (var i = sels.length - 1; i >= 0; i--)
  11250. { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }
  11251. sels = cm.listSelections();
  11252. for (var i$1 = 0; i$1 < sels.length; i$1++)
  11253. { cm.indentLine(sels[i$1].from().line, null, true); }
  11254. ensureCursorVisible(cm);
  11255. }); },
  11256. openLine: function (cm) { return cm.replaceSelection("\n", "start"); },
  11257. toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }
  11258. };
  11259. function lineStart(cm, lineN) {
  11260. var line = getLine(cm.doc, lineN);
  11261. var visual = visualLine(line);
  11262. if (visual != line) { lineN = lineNo(visual); }
  11263. return endOfLine(true, cm, visual, lineN, 1)
  11264. }
  11265. function lineEnd(cm, lineN) {
  11266. var line = getLine(cm.doc, lineN);
  11267. var visual = visualLineEnd(line);
  11268. if (visual != line) { lineN = lineNo(visual); }
  11269. return endOfLine(true, cm, line, lineN, -1)
  11270. }
  11271. function lineStartSmart(cm, pos) {
  11272. var start = lineStart(cm, pos.line);
  11273. var line = getLine(cm.doc, start.line);
  11274. var order = getOrder(line, cm.doc.direction);
  11275. if (!order || order[0].level == 0) {
  11276. var firstNonWS = Math.max(start.ch, line.text.search(/\S/));
  11277. var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
  11278. return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
  11279. }
  11280. return start
  11281. }
  11282. // Run a handler that was bound to a key.
  11283. function doHandleBinding(cm, bound, dropShift) {
  11284. if (typeof bound == "string") {
  11285. bound = commands[bound];
  11286. if (!bound) { return false }
  11287. }
  11288. // Ensure previous input has been read, so that the handler sees a
  11289. // consistent view of the document
  11290. cm.display.input.ensurePolled();
  11291. var prevShift = cm.display.shift, done = false;
  11292. try {
  11293. if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
  11294. if (dropShift) { cm.display.shift = false; }
  11295. done = bound(cm) != Pass;
  11296. } finally {
  11297. cm.display.shift = prevShift;
  11298. cm.state.suppressEdits = false;
  11299. }
  11300. return done
  11301. }
  11302. function lookupKeyForEditor(cm, name, handle) {
  11303. for (var i = 0; i < cm.state.keyMaps.length; i++) {
  11304. var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
  11305. if (result) { return result }
  11306. }
  11307. return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
  11308. || lookupKey(name, cm.options.keyMap, handle, cm)
  11309. }
  11310. // Note that, despite the name, this function is also used to check
  11311. // for bound mouse clicks.
  11312. var stopSeq = new Delayed;
  11313. function dispatchKey(cm, name, e, handle) {
  11314. var seq = cm.state.keySeq;
  11315. if (seq) {
  11316. if (isModifierKey(name)) { return "handled" }
  11317. if (/\'$/.test(name))
  11318. { cm.state.keySeq = null; }
  11319. else
  11320. { stopSeq.set(50, function () {
  11321. if (cm.state.keySeq == seq) {
  11322. cm.state.keySeq = null;
  11323. cm.display.input.reset();
  11324. }
  11325. }); }
  11326. if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
  11327. }
  11328. return dispatchKeyInner(cm, name, e, handle)
  11329. }
  11330. function dispatchKeyInner(cm, name, e, handle) {
  11331. var result = lookupKeyForEditor(cm, name, handle);
  11332. if (result == "multi")
  11333. { cm.state.keySeq = name; }
  11334. if (result == "handled")
  11335. { signalLater(cm, "keyHandled", cm, name, e); }
  11336. if (result == "handled" || result == "multi") {
  11337. e_preventDefault(e);
  11338. restartBlink(cm);
  11339. }
  11340. return !!result
  11341. }
  11342. // Handle a key from the keydown event.
  11343. function handleKeyBinding(cm, e) {
  11344. var name = keyName(e, true);
  11345. if (!name) { return false }
  11346. if (e.shiftKey && !cm.state.keySeq) {
  11347. // First try to resolve full name (including 'Shift-'). Failing
  11348. // that, see if there is a cursor-motion command (starting with
  11349. // 'go') bound to the keyname without 'Shift-'.
  11350. return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); })
  11351. || dispatchKey(cm, name, e, function (b) {
  11352. if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
  11353. { return doHandleBinding(cm, b) }
  11354. })
  11355. } else {
  11356. return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })
  11357. }
  11358. }
  11359. // Handle a key from the keypress event
  11360. function handleCharBinding(cm, e, ch) {
  11361. return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); })
  11362. }
  11363. var lastStoppedKey = null;
  11364. function onKeyDown(e) {
  11365. var cm = this;
  11366. if (e.target && e.target != cm.display.input.getField()) { return }
  11367. cm.curOp.focus = activeElt();
  11368. if (signalDOMEvent(cm, e)) { return }
  11369. // IE does strange things with escape.
  11370. if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
  11371. var code = e.keyCode;
  11372. cm.display.shift = code == 16 || e.shiftKey;
  11373. var handled = handleKeyBinding(cm, e);
  11374. if (presto) {
  11375. lastStoppedKey = handled ? code : null;
  11376. // Opera has no cut event... we try to at least catch the key combo
  11377. if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
  11378. { cm.replaceSelection("", null, "cut"); }
  11379. }
  11380. if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)
  11381. { document.execCommand("cut"); }
  11382. // Turn mouse into crosshair when Alt is held on Mac.
  11383. if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
  11384. { showCrossHair(cm); }
  11385. }
  11386. function showCrossHair(cm) {
  11387. var lineDiv = cm.display.lineDiv;
  11388. addClass(lineDiv, "CodeMirror-crosshair");
  11389. function up(e) {
  11390. if (e.keyCode == 18 || !e.altKey) {
  11391. rmClass(lineDiv, "CodeMirror-crosshair");
  11392. off(document, "keyup", up);
  11393. off(document, "mouseover", up);
  11394. }
  11395. }
  11396. on(document, "keyup", up);
  11397. on(document, "mouseover", up);
  11398. }
  11399. function onKeyUp(e) {
  11400. if (e.keyCode == 16) { this.doc.sel.shift = false; }
  11401. signalDOMEvent(this, e);
  11402. }
  11403. function onKeyPress(e) {
  11404. var cm = this;
  11405. if (e.target && e.target != cm.display.input.getField()) { return }
  11406. if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
  11407. var keyCode = e.keyCode, charCode = e.charCode;
  11408. if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
  11409. if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
  11410. var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
  11411. // Some browsers fire keypress events for backspace
  11412. if (ch == "\x08") { return }
  11413. if (handleCharBinding(cm, e, ch)) { return }
  11414. cm.display.input.onKeyPress(e);
  11415. }
  11416. var DOUBLECLICK_DELAY = 400;
  11417. var PastClick = function(time, pos, button) {
  11418. this.time = time;
  11419. this.pos = pos;
  11420. this.button = button;
  11421. };
  11422. PastClick.prototype.compare = function (time, pos, button) {
  11423. return this.time + DOUBLECLICK_DELAY > time &&
  11424. cmp(pos, this.pos) == 0 && button == this.button
  11425. };
  11426. var lastClick, lastDoubleClick;
  11427. function clickRepeat(pos, button) {
  11428. var now = +new Date;
  11429. if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
  11430. lastClick = lastDoubleClick = null;
  11431. return "triple"
  11432. } else if (lastClick && lastClick.compare(now, pos, button)) {
  11433. lastDoubleClick = new PastClick(now, pos, button);
  11434. lastClick = null;
  11435. return "double"
  11436. } else {
  11437. lastClick = new PastClick(now, pos, button);
  11438. lastDoubleClick = null;
  11439. return "single"
  11440. }
  11441. }
  11442. // A mouse down can be a single click, double click, triple click,
  11443. // start of selection drag, start of text drag, new cursor
  11444. // (ctrl-click), rectangle drag (alt-drag), or xwin
  11445. // middle-click-paste. Or it might be a click on something we should
  11446. // not interfere with, such as a scrollbar or widget.
  11447. function onMouseDown(e) {
  11448. var cm = this, display = cm.display;
  11449. if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
  11450. display.input.ensurePolled();
  11451. display.shift = e.shiftKey;
  11452. if (eventInWidget(display, e)) {
  11453. if (!webkit) {
  11454. // Briefly turn off draggability, to allow widgets to do
  11455. // normal dragging things.
  11456. display.scroller.draggable = false;
  11457. setTimeout(function () { return display.scroller.draggable = true; }, 100);
  11458. }
  11459. return
  11460. }
  11461. if (clickInGutter(cm, e)) { return }
  11462. var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single";
  11463. window.focus();
  11464. // #3261: make sure, that we're not starting a second selection
  11465. if (button == 1 && cm.state.selectingText)
  11466. { cm.state.selectingText(e); }
  11467. if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }
  11468. if (button == 1) {
  11469. if (pos) { leftButtonDown(cm, pos, repeat, e); }
  11470. else if (e_target(e) == display.scroller) { e_preventDefault(e); }
  11471. } else if (button == 2) {
  11472. if (pos) { extendSelection(cm.doc, pos); }
  11473. setTimeout(function () { return display.input.focus(); }, 20);
  11474. } else if (button == 3) {
  11475. if (captureRightClick) { cm.display.input.onContextMenu(e); }
  11476. else { delayBlurEvent(cm); }
  11477. }
  11478. }
  11479. function handleMappedButton(cm, button, pos, repeat, event) {
  11480. var name = "Click";
  11481. if (repeat == "double") { name = "Double" + name; }
  11482. else if (repeat == "triple") { name = "Triple" + name; }
  11483. name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;
  11484. return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {
  11485. if (typeof bound == "string") { bound = commands[bound]; }
  11486. if (!bound) { return false }
  11487. var done = false;
  11488. try {
  11489. if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
  11490. done = bound(cm, pos) != Pass;
  11491. } finally {
  11492. cm.state.suppressEdits = false;
  11493. }
  11494. return done
  11495. })
  11496. }
  11497. function configureMouse(cm, repeat, event) {
  11498. var option = cm.getOption("configureMouse");
  11499. var value = option ? option(cm, repeat, event) : {};
  11500. if (value.unit == null) {
  11501. var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
  11502. value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
  11503. }
  11504. if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }
  11505. if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }
  11506. if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }
  11507. return value
  11508. }
  11509. function leftButtonDown(cm, pos, repeat, event) {
  11510. if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
  11511. else { cm.curOp.focus = activeElt(); }
  11512. var behavior = configureMouse(cm, repeat, event);
  11513. var sel = cm.doc.sel, contained;
  11514. if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
  11515. repeat == "single" && (contained = sel.contains(pos)) > -1 &&
  11516. (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
  11517. (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
  11518. { leftButtonStartDrag(cm, event, pos, behavior); }
  11519. else
  11520. { leftButtonSelect(cm, event, pos, behavior); }
  11521. }
  11522. // Start a text drag. When it ends, see if any dragging actually
  11523. // happen, and treat as a click if it didn't.
  11524. function leftButtonStartDrag(cm, event, pos, behavior) {
  11525. var display = cm.display, moved = false;
  11526. var dragEnd = operation(cm, function (e) {
  11527. if (webkit) { display.scroller.draggable = false; }
  11528. cm.state.draggingText = false;
  11529. if (cm.state.delayingBlurEvent) {
  11530. if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }
  11531. else { delayBlurEvent(cm); }
  11532. }
  11533. off(display.wrapper.ownerDocument, "mouseup", dragEnd);
  11534. off(display.wrapper.ownerDocument, "mousemove", mouseMove);
  11535. off(display.scroller, "dragstart", dragStart);
  11536. off(display.scroller, "drop", dragEnd);
  11537. if (!moved) {
  11538. e_preventDefault(e);
  11539. if (!behavior.addNew)
  11540. { extendSelection(cm.doc, pos, null, null, behavior.extend); }
  11541. // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
  11542. if ((webkit && !safari) || ie && ie_version == 9)
  11543. { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }
  11544. else
  11545. { display.input.focus(); }
  11546. }
  11547. });
  11548. var mouseMove = function(e2) {
  11549. moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;
  11550. };
  11551. var dragStart = function () { return moved = true; };
  11552. // Let the drag handler handle this.
  11553. if (webkit) { display.scroller.draggable = true; }
  11554. cm.state.draggingText = dragEnd;
  11555. dragEnd.copy = !behavior.moveOnDrag;
  11556. on(display.wrapper.ownerDocument, "mouseup", dragEnd);
  11557. on(display.wrapper.ownerDocument, "mousemove", mouseMove);
  11558. on(display.scroller, "dragstart", dragStart);
  11559. on(display.scroller, "drop", dragEnd);
  11560. cm.state.delayingBlurEvent = true;
  11561. setTimeout(function () { return display.input.focus(); }, 20);
  11562. // IE's approach to draggable
  11563. if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
  11564. }
  11565. function rangeForUnit(cm, pos, unit) {
  11566. if (unit == "char") { return new Range(pos, pos) }
  11567. if (unit == "word") { return cm.findWordAt(pos) }
  11568. if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }
  11569. var result = unit(cm, pos);
  11570. return new Range(result.from, result.to)
  11571. }
  11572. // Normal selection, as opposed to text dragging.
  11573. function leftButtonSelect(cm, event, start, behavior) {
  11574. if (ie) { delayBlurEvent(cm); }
  11575. var display = cm.display, doc = cm.doc;
  11576. e_preventDefault(event);
  11577. var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
  11578. if (behavior.addNew && !behavior.extend) {
  11579. ourIndex = doc.sel.contains(start);
  11580. if (ourIndex > -1)
  11581. { ourRange = ranges[ourIndex]; }
  11582. else
  11583. { ourRange = new Range(start, start); }
  11584. } else {
  11585. ourRange = doc.sel.primary();
  11586. ourIndex = doc.sel.primIndex;
  11587. }
  11588. if (behavior.unit == "rectangle") {
  11589. if (!behavior.addNew) { ourRange = new Range(start, start); }
  11590. start = posFromMouse(cm, event, true, true);
  11591. ourIndex = -1;
  11592. } else {
  11593. var range = rangeForUnit(cm, start, behavior.unit);
  11594. if (behavior.extend)
  11595. { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }
  11596. else
  11597. { ourRange = range; }
  11598. }
  11599. if (!behavior.addNew) {
  11600. ourIndex = 0;
  11601. setSelection(doc, new Selection([ourRange], 0), sel_mouse);
  11602. startSel = doc.sel;
  11603. } else if (ourIndex == -1) {
  11604. ourIndex = ranges.length;
  11605. setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
  11606. {scroll: false, origin: "*mouse"});
  11607. } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
  11608. setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
  11609. {scroll: false, origin: "*mouse"});
  11610. startSel = doc.sel;
  11611. } else {
  11612. replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
  11613. }
  11614. var lastPos = start;
  11615. function extendTo(pos) {
  11616. if (cmp(lastPos, pos) == 0) { return }
  11617. lastPos = pos;
  11618. if (behavior.unit == "rectangle") {
  11619. var ranges = [], tabSize = cm.options.tabSize;
  11620. var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
  11621. var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
  11622. var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
  11623. for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
  11624. line <= end; line++) {
  11625. var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
  11626. if (left == right)
  11627. { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
  11628. else if (text.length > leftPos)
  11629. { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
  11630. }
  11631. if (!ranges.length) { ranges.push(new Range(start, start)); }
  11632. setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
  11633. {origin: "*mouse", scroll: false});
  11634. cm.scrollIntoView(pos);
  11635. } else {
  11636. var oldRange = ourRange;
  11637. var range = rangeForUnit(cm, pos, behavior.unit);
  11638. var anchor = oldRange.anchor, head;
  11639. if (cmp(range.anchor, anchor) > 0) {
  11640. head = range.head;
  11641. anchor = minPos(oldRange.from(), range.anchor);
  11642. } else {
  11643. head = range.anchor;
  11644. anchor = maxPos(oldRange.to(), range.head);
  11645. }
  11646. var ranges$1 = startSel.ranges.slice(0);
  11647. ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
  11648. setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
  11649. }
  11650. }
  11651. var editorSize = display.wrapper.getBoundingClientRect();
  11652. // Used to ensure timeout re-tries don't fire when another extend
  11653. // happened in the meantime (clearTimeout isn't reliable -- at
  11654. // least on Chrome, the timeouts still happen even when cleared,
  11655. // if the clear happens after their scheduled firing time).
  11656. var counter = 0;
  11657. function extend(e) {
  11658. var curCount = ++counter;
  11659. var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
  11660. if (!cur) { return }
  11661. if (cmp(cur, lastPos) != 0) {
  11662. cm.curOp.focus = activeElt();
  11663. extendTo(cur);
  11664. var visible = visibleLines(display, doc);
  11665. if (cur.line >= visible.to || cur.line < visible.from)
  11666. { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
  11667. } else {
  11668. var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
  11669. if (outside) { setTimeout(operation(cm, function () {
  11670. if (counter != curCount) { return }
  11671. display.scroller.scrollTop += outside;
  11672. extend(e);
  11673. }), 50); }
  11674. }
  11675. }
  11676. function done(e) {
  11677. cm.state.selectingText = false;
  11678. counter = Infinity;
  11679. // If e is null or undefined we interpret this as someone trying
  11680. // to explicitly cancel the selection rather than the user
  11681. // letting go of the mouse button.
  11682. if (e) {
  11683. e_preventDefault(e);
  11684. display.input.focus();
  11685. }
  11686. off(display.wrapper.ownerDocument, "mousemove", move);
  11687. off(display.wrapper.ownerDocument, "mouseup", up);
  11688. doc.history.lastSelOrigin = null;
  11689. }
  11690. var move = operation(cm, function (e) {
  11691. if (e.buttons === 0 || !e_button(e)) { done(e); }
  11692. else { extend(e); }
  11693. });
  11694. var up = operation(cm, done);
  11695. cm.state.selectingText = up;
  11696. on(display.wrapper.ownerDocument, "mousemove", move);
  11697. on(display.wrapper.ownerDocument, "mouseup", up);
  11698. }
  11699. // Used when mouse-selecting to adjust the anchor to the proper side
  11700. // of a bidi jump depending on the visual position of the head.
  11701. function bidiSimplify(cm, range) {
  11702. var anchor = range.anchor;
  11703. var head = range.head;
  11704. var anchorLine = getLine(cm.doc, anchor.line);
  11705. if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }
  11706. var order = getOrder(anchorLine);
  11707. if (!order) { return range }
  11708. var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];
  11709. if (part.from != anchor.ch && part.to != anchor.ch) { return range }
  11710. var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);
  11711. if (boundary == 0 || boundary == order.length) { return range }
  11712. // Compute the relative visual position of the head compared to the
  11713. // anchor (<0 is to the left, >0 to the right)
  11714. var leftSide;
  11715. if (head.line != anchor.line) {
  11716. leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
  11717. } else {
  11718. var headIndex = getBidiPartAt(order, head.ch, head.sticky);
  11719. var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
  11720. if (headIndex == boundary - 1 || headIndex == boundary)
  11721. { leftSide = dir < 0; }
  11722. else
  11723. { leftSide = dir > 0; }
  11724. }
  11725. var usePart = order[boundary + (leftSide ? -1 : 0)];
  11726. var from = leftSide == (usePart.level == 1);
  11727. var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before";
  11728. return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)
  11729. }
  11730. // Determines whether an event happened in the gutter, and fires the
  11731. // handlers for the corresponding event.
  11732. function gutterEvent(cm, e, type, prevent) {
  11733. var mX, mY;
  11734. if (e.touches) {
  11735. mX = e.touches[0].clientX;
  11736. mY = e.touches[0].clientY;
  11737. } else {
  11738. try { mX = e.clientX; mY = e.clientY; }
  11739. catch(e$1) { return false }
  11740. }
  11741. if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
  11742. if (prevent) { e_preventDefault(e); }
  11743. var display = cm.display;
  11744. var lineBox = display.lineDiv.getBoundingClientRect();
  11745. if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }
  11746. mY -= lineBox.top - display.viewOffset;
  11747. for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {
  11748. var g = display.gutters.childNodes[i];
  11749. if (g && g.getBoundingClientRect().right >= mX) {
  11750. var line = lineAtHeight(cm.doc, mY);
  11751. var gutter = cm.display.gutterSpecs[i];
  11752. signal(cm, type, cm, line, gutter.className, e);
  11753. return e_defaultPrevented(e)
  11754. }
  11755. }
  11756. }
  11757. function clickInGutter(cm, e) {
  11758. return gutterEvent(cm, e, "gutterClick", true)
  11759. }
  11760. // CONTEXT MENU HANDLING
  11761. // To make the context menu work, we need to briefly unhide the
  11762. // textarea (making it as unobtrusive as possible) to let the
  11763. // right-click take effect on it.
  11764. function onContextMenu(cm, e) {
  11765. if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }
  11766. if (signalDOMEvent(cm, e, "contextmenu")) { return }
  11767. if (!captureRightClick) { cm.display.input.onContextMenu(e); }
  11768. }
  11769. function contextMenuInGutter(cm, e) {
  11770. if (!hasHandler(cm, "gutterContextMenu")) { return false }
  11771. return gutterEvent(cm, e, "gutterContextMenu", false)
  11772. }
  11773. function themeChanged(cm) {
  11774. cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
  11775. cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
  11776. clearCaches(cm);
  11777. }
  11778. var Init = {toString: function(){return "CodeMirror.Init"}};
  11779. var defaults = {};
  11780. var optionHandlers = {};
  11781. function defineOptions(CodeMirror) {
  11782. var optionHandlers = CodeMirror.optionHandlers;
  11783. function option(name, deflt, handle, notOnInit) {
  11784. CodeMirror.defaults[name] = deflt;
  11785. if (handle) { optionHandlers[name] =
  11786. notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }
  11787. }
  11788. CodeMirror.defineOption = option;
  11789. // Passed to option handlers when there is no old value.
  11790. CodeMirror.Init = Init;
  11791. // These two are, on init, called from the constructor because they
  11792. // have to be initialized before the editor can start at all.
  11793. option("value", "", function (cm, val) { return cm.setValue(val); }, true);
  11794. option("mode", null, function (cm, val) {
  11795. cm.doc.modeOption = val;
  11796. loadMode(cm);
  11797. }, true);
  11798. option("indentUnit", 2, loadMode, true);
  11799. option("indentWithTabs", false);
  11800. option("smartIndent", true);
  11801. option("tabSize", 4, function (cm) {
  11802. resetModeState(cm);
  11803. clearCaches(cm);
  11804. regChange(cm);
  11805. }, true);
  11806. option("lineSeparator", null, function (cm, val) {
  11807. cm.doc.lineSep = val;
  11808. if (!val) { return }
  11809. var newBreaks = [], lineNo = cm.doc.first;
  11810. cm.doc.iter(function (line) {
  11811. for (var pos = 0;;) {
  11812. var found = line.text.indexOf(val, pos);
  11813. if (found == -1) { break }
  11814. pos = found + val.length;
  11815. newBreaks.push(Pos(lineNo, found));
  11816. }
  11817. lineNo++;
  11818. });
  11819. for (var i = newBreaks.length - 1; i >= 0; i--)
  11820. { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
  11821. });
  11822. option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
  11823. cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
  11824. if (old != Init) { cm.refresh(); }
  11825. });
  11826. option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);
  11827. option("electricChars", true);
  11828. option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
  11829. throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME
  11830. }, true);
  11831. option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);
  11832. option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);
  11833. option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);
  11834. option("rtlMoveVisually", !windows);
  11835. option("wholeLineUpdateBefore", true);
  11836. option("theme", "default", function (cm) {
  11837. themeChanged(cm);
  11838. updateGutters(cm);
  11839. }, true);
  11840. option("keyMap", "default", function (cm, val, old) {
  11841. var next = getKeyMap(val);
  11842. var prev = old != Init && getKeyMap(old);
  11843. if (prev && prev.detach) { prev.detach(cm, next); }
  11844. if (next.attach) { next.attach(cm, prev || null); }
  11845. });
  11846. option("extraKeys", null);
  11847. option("configureMouse", null);
  11848. option("lineWrapping", false, wrappingChanged, true);
  11849. option("gutters", [], function (cm, val) {
  11850. cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);
  11851. updateGutters(cm);
  11852. }, true);
  11853. option("fixedGutter", true, function (cm, val) {
  11854. cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
  11855. cm.refresh();
  11856. }, true);
  11857. option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true);
  11858. option("scrollbarStyle", "native", function (cm) {
  11859. initScrollbars(cm);
  11860. updateScrollbars(cm);
  11861. cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
  11862. cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
  11863. }, true);
  11864. option("lineNumbers", false, function (cm, val) {
  11865. cm.display.gutterSpecs = getGutters(cm.options.gutters, val);
  11866. updateGutters(cm);
  11867. }, true);
  11868. option("firstLineNumber", 1, updateGutters, true);
  11869. option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true);
  11870. option("showCursorWhenSelecting", false, updateSelection, true);
  11871. option("resetSelectionOnContextMenu", true);
  11872. option("lineWiseCopyCut", true);
  11873. option("pasteLinesPerSelection", true);
  11874. option("selectionsMayTouch", false);
  11875. option("readOnly", false, function (cm, val) {
  11876. if (val == "nocursor") {
  11877. onBlur(cm);
  11878. cm.display.input.blur();
  11879. }
  11880. cm.display.input.readOnlyChanged(val);
  11881. });
  11882. option("screenReaderLabel", null, function (cm, val) {
  11883. val = (val === '') ? null : val;
  11884. cm.display.input.screenReaderLabelChanged(val);
  11885. });
  11886. option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);
  11887. option("dragDrop", true, dragDropChanged);
  11888. option("allowDropFileTypes", null);
  11889. option("cursorBlinkRate", 530);
  11890. option("cursorScrollMargin", 0);
  11891. option("cursorHeight", 1, updateSelection, true);
  11892. option("singleCursorHeightPerLine", true, updateSelection, true);
  11893. option("workTime", 100);
  11894. option("workDelay", 100);
  11895. option("flattenSpans", true, resetModeState, true);
  11896. option("addModeClass", false, resetModeState, true);
  11897. option("pollInterval", 100);
  11898. option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });
  11899. option("historyEventDelay", 1250);
  11900. option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true);
  11901. option("maxHighlightLength", 10000, resetModeState, true);
  11902. option("moveInputWithCursor", true, function (cm, val) {
  11903. if (!val) { cm.display.input.resetPosition(); }
  11904. });
  11905. option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; });
  11906. option("autofocus", null);
  11907. option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true);
  11908. option("phrases", null);
  11909. }
  11910. function dragDropChanged(cm, value, old) {
  11911. var wasOn = old && old != Init;
  11912. if (!value != !wasOn) {
  11913. var funcs = cm.display.dragFunctions;
  11914. var toggle = value ? on : off;
  11915. toggle(cm.display.scroller, "dragstart", funcs.start);
  11916. toggle(cm.display.scroller, "dragenter", funcs.enter);
  11917. toggle(cm.display.scroller, "dragover", funcs.over);
  11918. toggle(cm.display.scroller, "dragleave", funcs.leave);
  11919. toggle(cm.display.scroller, "drop", funcs.drop);
  11920. }
  11921. }
  11922. function wrappingChanged(cm) {
  11923. if (cm.options.lineWrapping) {
  11924. addClass(cm.display.wrapper, "CodeMirror-wrap");
  11925. cm.display.sizer.style.minWidth = "";
  11926. cm.display.sizerWidth = null;
  11927. } else {
  11928. rmClass(cm.display.wrapper, "CodeMirror-wrap");
  11929. findMaxLine(cm);
  11930. }
  11931. estimateLineHeights(cm);
  11932. regChange(cm);
  11933. clearCaches(cm);
  11934. setTimeout(function () { return updateScrollbars(cm); }, 100);
  11935. }
  11936. // A CodeMirror instance represents an editor. This is the object
  11937. // that user code is usually dealing with.
  11938. function CodeMirror(place, options) {
  11939. var this$1 = this;
  11940. if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }
  11941. this.options = options = options ? copyObj(options) : {};
  11942. // Determine effective options based on given values and defaults.
  11943. copyObj(defaults, options, false);
  11944. var doc = options.value;
  11945. if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
  11946. else if (options.mode) { doc.modeOption = options.mode; }
  11947. this.doc = doc;
  11948. var input = new CodeMirror.inputStyles[options.inputStyle](this);
  11949. var display = this.display = new Display(place, doc, input, options);
  11950. display.wrapper.CodeMirror = this;
  11951. themeChanged(this);
  11952. if (options.lineWrapping)
  11953. { this.display.wrapper.className += " CodeMirror-wrap"; }
  11954. initScrollbars(this);
  11955. this.state = {
  11956. keyMaps: [], // stores maps added by addKeyMap
  11957. overlays: [], // highlighting overlays, as added by addOverlay
  11958. modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info
  11959. overwrite: false,
  11960. delayingBlurEvent: false,
  11961. focused: false,
  11962. suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
  11963. pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll
  11964. selectingText: false,
  11965. draggingText: false,
  11966. highlight: new Delayed(), // stores highlight worker timeout
  11967. keySeq: null, // Unfinished key sequence
  11968. specialChars: null
  11969. };
  11970. if (options.autofocus && !mobile) { display.input.focus(); }
  11971. // Override magic textarea content restore that IE sometimes does
  11972. // on our hidden textarea on reload
  11973. if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }
  11974. registerEventHandlers(this);
  11975. ensureGlobalHandlers();
  11976. startOperation(this);
  11977. this.curOp.forceUpdate = true;
  11978. attachDoc(this, doc);
  11979. if ((options.autofocus && !mobile) || this.hasFocus())
  11980. { setTimeout(function () {
  11981. if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }
  11982. }, 20); }
  11983. else
  11984. { onBlur(this); }
  11985. for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))
  11986. { optionHandlers[opt](this, options[opt], Init); } }
  11987. maybeUpdateLineNumberWidth(this);
  11988. if (options.finishInit) { options.finishInit(this); }
  11989. for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }
  11990. endOperation(this);
  11991. // Suppress optimizelegibility in Webkit, since it breaks text
  11992. // measuring on line wrapping boundaries.
  11993. if (webkit && options.lineWrapping &&
  11994. getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
  11995. { display.lineDiv.style.textRendering = "auto"; }
  11996. }
  11997. // The default configuration options.
  11998. CodeMirror.defaults = defaults;
  11999. // Functions to run when options are changed.
  12000. CodeMirror.optionHandlers = optionHandlers;
  12001. // Attach the necessary event handlers when initializing the editor
  12002. function registerEventHandlers(cm) {
  12003. var d = cm.display;
  12004. on(d.scroller, "mousedown", operation(cm, onMouseDown));
  12005. // Older IE's will not fire a second mousedown for a double click
  12006. if (ie && ie_version < 11)
  12007. { on(d.scroller, "dblclick", operation(cm, function (e) {
  12008. if (signalDOMEvent(cm, e)) { return }
  12009. var pos = posFromMouse(cm, e);
  12010. if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }
  12011. e_preventDefault(e);
  12012. var word = cm.findWordAt(pos);
  12013. extendSelection(cm.doc, word.anchor, word.head);
  12014. })); }
  12015. else
  12016. { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }
  12017. // Some browsers fire contextmenu *after* opening the menu, at
  12018. // which point we can't mess with it anymore. Context menu is
  12019. // handled in onMouseDown for these browsers.
  12020. on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); });
  12021. on(d.input.getField(), "contextmenu", function (e) {
  12022. if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }
  12023. });
  12024. // Used to suppress mouse event handling when a touch happens
  12025. var touchFinished, prevTouch = {end: 0};
  12026. function finishTouch() {
  12027. if (d.activeTouch) {
  12028. touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);
  12029. prevTouch = d.activeTouch;
  12030. prevTouch.end = +new Date;
  12031. }
  12032. }
  12033. function isMouseLikeTouchEvent(e) {
  12034. if (e.touches.length != 1) { return false }
  12035. var touch = e.touches[0];
  12036. return touch.radiusX <= 1 && touch.radiusY <= 1
  12037. }
  12038. function farAway(touch, other) {
  12039. if (other.left == null) { return true }
  12040. var dx = other.left - touch.left, dy = other.top - touch.top;
  12041. return dx * dx + dy * dy > 20 * 20
  12042. }
  12043. on(d.scroller, "touchstart", function (e) {
  12044. if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {
  12045. d.input.ensurePolled();
  12046. clearTimeout(touchFinished);
  12047. var now = +new Date;
  12048. d.activeTouch = {start: now, moved: false,
  12049. prev: now - prevTouch.end <= 300 ? prevTouch : null};
  12050. if (e.touches.length == 1) {
  12051. d.activeTouch.left = e.touches[0].pageX;
  12052. d.activeTouch.top = e.touches[0].pageY;
  12053. }
  12054. }
  12055. });
  12056. on(d.scroller, "touchmove", function () {
  12057. if (d.activeTouch) { d.activeTouch.moved = true; }
  12058. });
  12059. on(d.scroller, "touchend", function (e) {
  12060. var touch = d.activeTouch;
  12061. if (touch && !eventInWidget(d, e) && touch.left != null &&
  12062. !touch.moved && new Date - touch.start < 300) {
  12063. var pos = cm.coordsChar(d.activeTouch, "page"), range;
  12064. if (!touch.prev || farAway(touch, touch.prev)) // Single tap
  12065. { range = new Range(pos, pos); }
  12066. else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
  12067. { range = cm.findWordAt(pos); }
  12068. else // Triple tap
  12069. { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }
  12070. cm.setSelection(range.anchor, range.head);
  12071. cm.focus();
  12072. e_preventDefault(e);
  12073. }
  12074. finishTouch();
  12075. });
  12076. on(d.scroller, "touchcancel", finishTouch);
  12077. // Sync scrolling between fake scrollbars and real scrollable
  12078. // area, ensure viewport is updated when scrolling.
  12079. on(d.scroller, "scroll", function () {
  12080. if (d.scroller.clientHeight) {
  12081. updateScrollTop(cm, d.scroller.scrollTop);
  12082. setScrollLeft(cm, d.scroller.scrollLeft, true);
  12083. signal(cm, "scroll", cm);
  12084. }
  12085. });
  12086. // Listen to wheel events in order to try and update the viewport on time.
  12087. on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); });
  12088. on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); });
  12089. // Prevent wrapper from ever scrolling
  12090. on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
  12091. d.dragFunctions = {
  12092. enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},
  12093. over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
  12094. start: function (e) { return onDragStart(cm, e); },
  12095. drop: operation(cm, onDrop),
  12096. leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
  12097. };
  12098. var inp = d.input.getField();
  12099. on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); });
  12100. on(inp, "keydown", operation(cm, onKeyDown));
  12101. on(inp, "keypress", operation(cm, onKeyPress));
  12102. on(inp, "focus", function (e) { return onFocus(cm, e); });
  12103. on(inp, "blur", function (e) { return onBlur(cm, e); });
  12104. }
  12105. var initHooks = [];
  12106. CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };
  12107. // Indent the given line. The how parameter can be "smart",
  12108. // "add"/null, "subtract", or "prev". When aggressive is false
  12109. // (typically set to true for forced single-line indents), empty
  12110. // lines are not indented, and places where the mode returns Pass
  12111. // are left alone.
  12112. function indentLine(cm, n, how, aggressive) {
  12113. var doc = cm.doc, state;
  12114. if (how == null) { how = "add"; }
  12115. if (how == "smart") {
  12116. // Fall back to "prev" when the mode doesn't have an indentation
  12117. // method.
  12118. if (!doc.mode.indent) { how = "prev"; }
  12119. else { state = getContextBefore(cm, n).state; }
  12120. }
  12121. var tabSize = cm.options.tabSize;
  12122. var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
  12123. if (line.stateAfter) { line.stateAfter = null; }
  12124. var curSpaceString = line.text.match(/^\s*/)[0], indentation;
  12125. if (!aggressive && !/\S/.test(line.text)) {
  12126. indentation = 0;
  12127. how = "not";
  12128. } else if (how == "smart") {
  12129. indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
  12130. if (indentation == Pass || indentation > 150) {
  12131. if (!aggressive) { return }
  12132. how = "prev";
  12133. }
  12134. }
  12135. if (how == "prev") {
  12136. if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }
  12137. else { indentation = 0; }
  12138. } else if (how == "add") {
  12139. indentation = curSpace + cm.options.indentUnit;
  12140. } else if (how == "subtract") {
  12141. indentation = curSpace - cm.options.indentUnit;
  12142. } else if (typeof how == "number") {
  12143. indentation = curSpace + how;
  12144. }
  12145. indentation = Math.max(0, indentation);
  12146. var indentString = "", pos = 0;
  12147. if (cm.options.indentWithTabs)
  12148. { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} }
  12149. if (pos < indentation) { indentString += spaceStr(indentation - pos); }
  12150. if (indentString != curSpaceString) {
  12151. replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
  12152. line.stateAfter = null;
  12153. return true
  12154. } else {
  12155. // Ensure that, if the cursor was in the whitespace at the start
  12156. // of the line, it is moved to the end of that space.
  12157. for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
  12158. var range = doc.sel.ranges[i$1];
  12159. if (range.head.line == n && range.head.ch < curSpaceString.length) {
  12160. var pos$1 = Pos(n, curSpaceString.length);
  12161. replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
  12162. break
  12163. }
  12164. }
  12165. }
  12166. }
  12167. // This will be set to a {lineWise: bool, text: [string]} object, so
  12168. // that, when pasting, we know what kind of selections the copied
  12169. // text was made out of.
  12170. var lastCopied = null;
  12171. function setLastCopied(newLastCopied) {
  12172. lastCopied = newLastCopied;
  12173. }
  12174. function applyTextInput(cm, inserted, deleted, sel, origin) {
  12175. var doc = cm.doc;
  12176. cm.display.shift = false;
  12177. if (!sel) { sel = doc.sel; }
  12178. var recent = +new Date - 200;
  12179. var paste = origin == "paste" || cm.state.pasteIncoming > recent;
  12180. var textLines = splitLinesAuto(inserted), multiPaste = null;
  12181. // When pasting N lines into N selections, insert one line per selection
  12182. if (paste && sel.ranges.length > 1) {
  12183. if (lastCopied && lastCopied.text.join("\n") == inserted) {
  12184. if (sel.ranges.length % lastCopied.text.length == 0) {
  12185. multiPaste = [];
  12186. for (var i = 0; i < lastCopied.text.length; i++)
  12187. { multiPaste.push(doc.splitLines(lastCopied.text[i])); }
  12188. }
  12189. } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {
  12190. multiPaste = map(textLines, function (l) { return [l]; });
  12191. }
  12192. }
  12193. var updateInput = cm.curOp.updateInput;
  12194. // Normal behavior is to insert the new text into every selection
  12195. for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
  12196. var range = sel.ranges[i$1];
  12197. var from = range.from(), to = range.to();
  12198. if (range.empty()) {
  12199. if (deleted && deleted > 0) // Handle deletion
  12200. { from = Pos(from.line, from.ch - deleted); }
  12201. else if (cm.state.overwrite && !paste) // Handle overwrite
  12202. { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
  12203. else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
  12204. { from = to = Pos(from.line, 0); }
  12205. }
  12206. var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
  12207. origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")};
  12208. makeChange(cm.doc, changeEvent);
  12209. signalLater(cm, "inputRead", cm, changeEvent);
  12210. }
  12211. if (inserted && !paste)
  12212. { triggerElectric(cm, inserted); }
  12213. ensureCursorVisible(cm);
  12214. if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }
  12215. cm.curOp.typing = true;
  12216. cm.state.pasteIncoming = cm.state.cutIncoming = -1;
  12217. }
  12218. function handlePaste(e, cm) {
  12219. var pasted = e.clipboardData && e.clipboardData.getData("Text");
  12220. if (pasted) {
  12221. e.preventDefault();
  12222. if (!cm.isReadOnly() && !cm.options.disableInput)
  12223. { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }
  12224. return true
  12225. }
  12226. }
  12227. function triggerElectric(cm, inserted) {
  12228. // When an 'electric' character is inserted, immediately trigger a reindent
  12229. if (!cm.options.electricChars || !cm.options.smartIndent) { return }
  12230. var sel = cm.doc.sel;
  12231. for (var i = sel.ranges.length - 1; i >= 0; i--) {
  12232. var range = sel.ranges[i];
  12233. if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }
  12234. var mode = cm.getModeAt(range.head);
  12235. var indented = false;
  12236. if (mode.electricChars) {
  12237. for (var j = 0; j < mode.electricChars.length; j++)
  12238. { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
  12239. indented = indentLine(cm, range.head.line, "smart");
  12240. break
  12241. } }
  12242. } else if (mode.electricInput) {
  12243. if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))
  12244. { indented = indentLine(cm, range.head.line, "smart"); }
  12245. }
  12246. if (indented) { signalLater(cm, "electricInput", cm, range.head.line); }
  12247. }
  12248. }
  12249. function copyableRanges(cm) {
  12250. var text = [], ranges = [];
  12251. for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
  12252. var line = cm.doc.sel.ranges[i].head.line;
  12253. var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
  12254. ranges.push(lineRange);
  12255. text.push(cm.getRange(lineRange.anchor, lineRange.head));
  12256. }
  12257. return {text: text, ranges: ranges}
  12258. }
  12259. function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
  12260. field.setAttribute("autocorrect", autocorrect ? "" : "off");
  12261. field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
  12262. field.setAttribute("spellcheck", !!spellcheck);
  12263. }
  12264. function hiddenTextarea() {
  12265. var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
  12266. var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
  12267. // The textarea is kept positioned near the cursor to prevent the
  12268. // fact that it'll be scrolled into view on input from scrolling
  12269. // our fake cursor out of view. On webkit, when wrap=off, paste is
  12270. // very slow. So make the area wide instead.
  12271. if (webkit) { te.style.width = "1000px"; }
  12272. else { te.setAttribute("wrap", "off"); }
  12273. // If border: 0; -- iOS fails to open keyboard (issue #1287)
  12274. if (ios) { te.style.border = "1px solid black"; }
  12275. disableBrowserMagic(te);
  12276. return div
  12277. }
  12278. // The publicly visible API. Note that methodOp(f) means
  12279. // 'wrap f in an operation, performed on its `this` parameter'.
  12280. // This is not the complete set of editor methods. Most of the
  12281. // methods defined on the Doc type are also injected into
  12282. // CodeMirror.prototype, for backwards compatibility and
  12283. // convenience.
  12284. function addEditorMethods(CodeMirror) {
  12285. var optionHandlers = CodeMirror.optionHandlers;
  12286. var helpers = CodeMirror.helpers = {};
  12287. CodeMirror.prototype = {
  12288. constructor: CodeMirror,
  12289. focus: function(){window.focus(); this.display.input.focus();},
  12290. setOption: function(option, value) {
  12291. var options = this.options, old = options[option];
  12292. if (options[option] == value && option != "mode") { return }
  12293. options[option] = value;
  12294. if (optionHandlers.hasOwnProperty(option))
  12295. { operation(this, optionHandlers[option])(this, value, old); }
  12296. signal(this, "optionChange", this, option);
  12297. },
  12298. getOption: function(option) {return this.options[option]},
  12299. getDoc: function() {return this.doc},
  12300. addKeyMap: function(map, bottom) {
  12301. this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));
  12302. },
  12303. removeKeyMap: function(map) {
  12304. var maps = this.state.keyMaps;
  12305. for (var i = 0; i < maps.length; ++i)
  12306. { if (maps[i] == map || maps[i].name == map) {
  12307. maps.splice(i, 1);
  12308. return true
  12309. } }
  12310. },
  12311. addOverlay: methodOp(function(spec, options) {
  12312. var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
  12313. if (mode.startState) { throw new Error("Overlays may not be stateful.") }
  12314. insertSorted(this.state.overlays,
  12315. {mode: mode, modeSpec: spec, opaque: options && options.opaque,
  12316. priority: (options && options.priority) || 0},
  12317. function (overlay) { return overlay.priority; });
  12318. this.state.modeGen++;
  12319. regChange(this);
  12320. }),
  12321. removeOverlay: methodOp(function(spec) {
  12322. var overlays = this.state.overlays;
  12323. for (var i = 0; i < overlays.length; ++i) {
  12324. var cur = overlays[i].modeSpec;
  12325. if (cur == spec || typeof spec == "string" && cur.name == spec) {
  12326. overlays.splice(i, 1);
  12327. this.state.modeGen++;
  12328. regChange(this);
  12329. return
  12330. }
  12331. }
  12332. }),
  12333. indentLine: methodOp(function(n, dir, aggressive) {
  12334. if (typeof dir != "string" && typeof dir != "number") {
  12335. if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; }
  12336. else { dir = dir ? "add" : "subtract"; }
  12337. }
  12338. if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }
  12339. }),
  12340. indentSelection: methodOp(function(how) {
  12341. var ranges = this.doc.sel.ranges, end = -1;
  12342. for (var i = 0; i < ranges.length; i++) {
  12343. var range = ranges[i];
  12344. if (!range.empty()) {
  12345. var from = range.from(), to = range.to();
  12346. var start = Math.max(end, from.line);
  12347. end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
  12348. for (var j = start; j < end; ++j)
  12349. { indentLine(this, j, how); }
  12350. var newRanges = this.doc.sel.ranges;
  12351. if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
  12352. { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }
  12353. } else if (range.head.line > end) {
  12354. indentLine(this, range.head.line, how, true);
  12355. end = range.head.line;
  12356. if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }
  12357. }
  12358. }
  12359. }),
  12360. // Fetch the parser token for a given character. Useful for hacks
  12361. // that want to inspect the mode state (say, for completion).
  12362. getTokenAt: function(pos, precise) {
  12363. return takeToken(this, pos, precise)
  12364. },
  12365. getLineTokens: function(line, precise) {
  12366. return takeToken(this, Pos(line), precise, true)
  12367. },
  12368. getTokenTypeAt: function(pos) {
  12369. pos = clipPos(this.doc, pos);
  12370. var styles = getLineStyles(this, getLine(this.doc, pos.line));
  12371. var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
  12372. var type;
  12373. if (ch == 0) { type = styles[2]; }
  12374. else { for (;;) {
  12375. var mid = (before + after) >> 1;
  12376. if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }
  12377. else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }
  12378. else { type = styles[mid * 2 + 2]; break }
  12379. } }
  12380. var cut = type ? type.indexOf("overlay ") : -1;
  12381. return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)
  12382. },
  12383. getModeAt: function(pos) {
  12384. var mode = this.doc.mode;
  12385. if (!mode.innerMode) { return mode }
  12386. return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode
  12387. },
  12388. getHelper: function(pos, type) {
  12389. return this.getHelpers(pos, type)[0]
  12390. },
  12391. getHelpers: function(pos, type) {
  12392. var found = [];
  12393. if (!helpers.hasOwnProperty(type)) { return found }
  12394. var help = helpers[type], mode = this.getModeAt(pos);
  12395. if (typeof mode[type] == "string") {
  12396. if (help[mode[type]]) { found.push(help[mode[type]]); }
  12397. } else if (mode[type]) {
  12398. for (var i = 0; i < mode[type].length; i++) {
  12399. var val = help[mode[type][i]];
  12400. if (val) { found.push(val); }
  12401. }
  12402. } else if (mode.helperType && help[mode.helperType]) {
  12403. found.push(help[mode.helperType]);
  12404. } else if (help[mode.name]) {
  12405. found.push(help[mode.name]);
  12406. }
  12407. for (var i$1 = 0; i$1 < help._global.length; i$1++) {
  12408. var cur = help._global[i$1];
  12409. if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)
  12410. { found.push(cur.val); }
  12411. }
  12412. return found
  12413. },
  12414. getStateAfter: function(line, precise) {
  12415. var doc = this.doc;
  12416. line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
  12417. return getContextBefore(this, line + 1, precise).state
  12418. },
  12419. cursorCoords: function(start, mode) {
  12420. var pos, range = this.doc.sel.primary();
  12421. if (start == null) { pos = range.head; }
  12422. else if (typeof start == "object") { pos = clipPos(this.doc, start); }
  12423. else { pos = start ? range.from() : range.to(); }
  12424. return cursorCoords(this, pos, mode || "page")
  12425. },
  12426. charCoords: function(pos, mode) {
  12427. return charCoords(this, clipPos(this.doc, pos), mode || "page")
  12428. },
  12429. coordsChar: function(coords, mode) {
  12430. coords = fromCoordSystem(this, coords, mode || "page");
  12431. return coordsChar(this, coords.left, coords.top)
  12432. },
  12433. lineAtHeight: function(height, mode) {
  12434. height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
  12435. return lineAtHeight(this.doc, height + this.display.viewOffset)
  12436. },
  12437. heightAtLine: function(line, mode, includeWidgets) {
  12438. var end = false, lineObj;
  12439. if (typeof line == "number") {
  12440. var last = this.doc.first + this.doc.size - 1;
  12441. if (line < this.doc.first) { line = this.doc.first; }
  12442. else if (line > last) { line = last; end = true; }
  12443. lineObj = getLine(this.doc, line);
  12444. } else {
  12445. lineObj = line;
  12446. }
  12447. return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +
  12448. (end ? this.doc.height - heightAtLine(lineObj) : 0)
  12449. },
  12450. defaultTextHeight: function() { return textHeight(this.display) },
  12451. defaultCharWidth: function() { return charWidth(this.display) },
  12452. getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},
  12453. addWidget: function(pos, node, scroll, vert, horiz) {
  12454. var display = this.display;
  12455. pos = cursorCoords(this, clipPos(this.doc, pos));
  12456. var top = pos.bottom, left = pos.left;
  12457. node.style.position = "absolute";
  12458. node.setAttribute("cm-ignore-events", "true");
  12459. this.display.input.setUneditable(node);
  12460. display.sizer.appendChild(node);
  12461. if (vert == "over") {
  12462. top = pos.top;
  12463. } else if (vert == "above" || vert == "near") {
  12464. var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
  12465. hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
  12466. // Default to positioning above (if specified and possible); otherwise default to positioning below
  12467. if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
  12468. { top = pos.top - node.offsetHeight; }
  12469. else if (pos.bottom + node.offsetHeight <= vspace)
  12470. { top = pos.bottom; }
  12471. if (left + node.offsetWidth > hspace)
  12472. { left = hspace - node.offsetWidth; }
  12473. }
  12474. node.style.top = top + "px";
  12475. node.style.left = node.style.right = "";
  12476. if (horiz == "right") {
  12477. left = display.sizer.clientWidth - node.offsetWidth;
  12478. node.style.right = "0px";
  12479. } else {
  12480. if (horiz == "left") { left = 0; }
  12481. else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }
  12482. node.style.left = left + "px";
  12483. }
  12484. if (scroll)
  12485. { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }
  12486. },
  12487. triggerOnKeyDown: methodOp(onKeyDown),
  12488. triggerOnKeyPress: methodOp(onKeyPress),
  12489. triggerOnKeyUp: onKeyUp,
  12490. triggerOnMouseDown: methodOp(onMouseDown),
  12491. execCommand: function(cmd) {
  12492. if (commands.hasOwnProperty(cmd))
  12493. { return commands[cmd].call(null, this) }
  12494. },
  12495. triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),
  12496. findPosH: function(from, amount, unit, visually) {
  12497. var dir = 1;
  12498. if (amount < 0) { dir = -1; amount = -amount; }
  12499. var cur = clipPos(this.doc, from);
  12500. for (var i = 0; i < amount; ++i) {
  12501. cur = findPosH(this.doc, cur, dir, unit, visually);
  12502. if (cur.hitSide) { break }
  12503. }
  12504. return cur
  12505. },
  12506. moveH: methodOp(function(dir, unit) {
  12507. var this$1 = this;
  12508. this.extendSelectionsBy(function (range) {
  12509. if (this$1.display.shift || this$1.doc.extend || range.empty())
  12510. { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }
  12511. else
  12512. { return dir < 0 ? range.from() : range.to() }
  12513. }, sel_move);
  12514. }),
  12515. deleteH: methodOp(function(dir, unit) {
  12516. var sel = this.doc.sel, doc = this.doc;
  12517. if (sel.somethingSelected())
  12518. { doc.replaceSelection("", null, "+delete"); }
  12519. else
  12520. { deleteNearSelection(this, function (range) {
  12521. var other = findPosH(doc, range.head, dir, unit, false);
  12522. return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}
  12523. }); }
  12524. }),
  12525. findPosV: function(from, amount, unit, goalColumn) {
  12526. var dir = 1, x = goalColumn;
  12527. if (amount < 0) { dir = -1; amount = -amount; }
  12528. var cur = clipPos(this.doc, from);
  12529. for (var i = 0; i < amount; ++i) {
  12530. var coords = cursorCoords(this, cur, "div");
  12531. if (x == null) { x = coords.left; }
  12532. else { coords.left = x; }
  12533. cur = findPosV(this, coords, dir, unit);
  12534. if (cur.hitSide) { break }
  12535. }
  12536. return cur
  12537. },
  12538. moveV: methodOp(function(dir, unit) {
  12539. var this$1 = this;
  12540. var doc = this.doc, goals = [];
  12541. var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
  12542. doc.extendSelectionsBy(function (range) {
  12543. if (collapse)
  12544. { return dir < 0 ? range.from() : range.to() }
  12545. var headPos = cursorCoords(this$1, range.head, "div");
  12546. if (range.goalColumn != null) { headPos.left = range.goalColumn; }
  12547. goals.push(headPos.left);
  12548. var pos = findPosV(this$1, headPos, dir, unit);
  12549. if (unit == "page" && range == doc.sel.primary())
  12550. { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); }
  12551. return pos
  12552. }, sel_move);
  12553. if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
  12554. { doc.sel.ranges[i].goalColumn = goals[i]; } }
  12555. }),
  12556. // Find the word at the given position (as returned by coordsChar).
  12557. findWordAt: function(pos) {
  12558. var doc = this.doc, line = getLine(doc, pos.line).text;
  12559. var start = pos.ch, end = pos.ch;
  12560. if (line) {
  12561. var helper = this.getHelper(pos, "wordChars");
  12562. if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; }
  12563. var startChar = line.charAt(start);
  12564. var check = isWordChar(startChar, helper)
  12565. ? function (ch) { return isWordChar(ch, helper); }
  12566. : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); }
  12567. : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); };
  12568. while (start > 0 && check(line.charAt(start - 1))) { --start; }
  12569. while (end < line.length && check(line.charAt(end))) { ++end; }
  12570. }
  12571. return new Range(Pos(pos.line, start), Pos(pos.line, end))
  12572. },
  12573. toggleOverwrite: function(value) {
  12574. if (value != null && value == this.state.overwrite) { return }
  12575. if (this.state.overwrite = !this.state.overwrite)
  12576. { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
  12577. else
  12578. { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
  12579. signal(this, "overwriteToggle", this, this.state.overwrite);
  12580. },
  12581. hasFocus: function() { return this.display.input.getField() == activeElt() },
  12582. isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
  12583. scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),
  12584. getScrollInfo: function() {
  12585. var scroller = this.display.scroller;
  12586. return {left: scroller.scrollLeft, top: scroller.scrollTop,
  12587. height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
  12588. width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
  12589. clientHeight: displayHeight(this), clientWidth: displayWidth(this)}
  12590. },
  12591. scrollIntoView: methodOp(function(range, margin) {
  12592. if (range == null) {
  12593. range = {from: this.doc.sel.primary().head, to: null};
  12594. if (margin == null) { margin = this.options.cursorScrollMargin; }
  12595. } else if (typeof range == "number") {
  12596. range = {from: Pos(range, 0), to: null};
  12597. } else if (range.from == null) {
  12598. range = {from: range, to: null};
  12599. }
  12600. if (!range.to) { range.to = range.from; }
  12601. range.margin = margin || 0;
  12602. if (range.from.line != null) {
  12603. scrollToRange(this, range);
  12604. } else {
  12605. scrollToCoordsRange(this, range.from, range.to, range.margin);
  12606. }
  12607. }),
  12608. setSize: methodOp(function(width, height) {
  12609. var this$1 = this;
  12610. var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; };
  12611. if (width != null) { this.display.wrapper.style.width = interpret(width); }
  12612. if (height != null) { this.display.wrapper.style.height = interpret(height); }
  12613. if (this.options.lineWrapping) { clearLineMeasurementCache(this); }
  12614. var lineNo = this.display.viewFrom;
  12615. this.doc.iter(lineNo, this.display.viewTo, function (line) {
  12616. if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
  12617. { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } }
  12618. ++lineNo;
  12619. });
  12620. this.curOp.forceUpdate = true;
  12621. signal(this, "refresh", this);
  12622. }),
  12623. operation: function(f){return runInOp(this, f)},
  12624. startOperation: function(){return startOperation(this)},
  12625. endOperation: function(){return endOperation(this)},
  12626. refresh: methodOp(function() {
  12627. var oldHeight = this.display.cachedTextHeight;
  12628. regChange(this);
  12629. this.curOp.forceUpdate = true;
  12630. clearCaches(this);
  12631. scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
  12632. updateGutterSpace(this.display);
  12633. if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)
  12634. { estimateLineHeights(this); }
  12635. signal(this, "refresh", this);
  12636. }),
  12637. swapDoc: methodOp(function(doc) {
  12638. var old = this.doc;
  12639. old.cm = null;
  12640. // Cancel the current text selection if any (#5821)
  12641. if (this.state.selectingText) { this.state.selectingText(); }
  12642. attachDoc(this, doc);
  12643. clearCaches(this);
  12644. this.display.input.reset();
  12645. scrollToCoords(this, doc.scrollLeft, doc.scrollTop);
  12646. this.curOp.forceScroll = true;
  12647. signalLater(this, "swapDoc", this, old);
  12648. return old
  12649. }),
  12650. phrase: function(phraseText) {
  12651. var phrases = this.options.phrases;
  12652. return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText
  12653. },
  12654. getInputField: function(){return this.display.input.getField()},
  12655. getWrapperElement: function(){return this.display.wrapper},
  12656. getScrollerElement: function(){return this.display.scroller},
  12657. getGutterElement: function(){return this.display.gutters}
  12658. };
  12659. eventMixin(CodeMirror);
  12660. CodeMirror.registerHelper = function(type, name, value) {
  12661. if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }
  12662. helpers[type][name] = value;
  12663. };
  12664. CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
  12665. CodeMirror.registerHelper(type, name, value);
  12666. helpers[type]._global.push({pred: predicate, val: value});
  12667. };
  12668. }
  12669. // Used for horizontal relative motion. Dir is -1 or 1 (left or
  12670. // right), unit can be "codepoint", "char", "column" (like char, but
  12671. // doesn't cross line boundaries), "word" (across next word), or
  12672. // "group" (to the start of next group of word or
  12673. // non-word-non-whitespace chars). The visually param controls
  12674. // whether, in right-to-left text, direction 1 means to move towards
  12675. // the next index in the string, or towards the character to the right
  12676. // of the current position. The resulting position will have a
  12677. // hitSide=true property if it reached the end of the document.
  12678. function findPosH(doc, pos, dir, unit, visually) {
  12679. var oldPos = pos;
  12680. var origDir = dir;
  12681. var lineObj = getLine(doc, pos.line);
  12682. var lineDir = visually && doc.direction == "rtl" ? -dir : dir;
  12683. function findNextLine() {
  12684. var l = pos.line + lineDir;
  12685. if (l < doc.first || l >= doc.first + doc.size) { return false }
  12686. pos = new Pos(l, pos.ch, pos.sticky);
  12687. return lineObj = getLine(doc, l)
  12688. }
  12689. function moveOnce(boundToLine) {
  12690. var next;
  12691. if (unit == "codepoint") {
  12692. var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));
  12693. if (isNaN(ch)) {
  12694. next = null;
  12695. } else {
  12696. var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;
  12697. next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);
  12698. }
  12699. } else if (visually) {
  12700. next = moveVisually(doc.cm, lineObj, pos, dir);
  12701. } else {
  12702. next = moveLogically(lineObj, pos, dir);
  12703. }
  12704. if (next == null) {
  12705. if (!boundToLine && findNextLine())
  12706. { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }
  12707. else
  12708. { return false }
  12709. } else {
  12710. pos = next;
  12711. }
  12712. return true
  12713. }
  12714. if (unit == "char" || unit == "codepoint") {
  12715. moveOnce();
  12716. } else if (unit == "column") {
  12717. moveOnce(true);
  12718. } else if (unit == "word" || unit == "group") {
  12719. var sawType = null, group = unit == "group";
  12720. var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
  12721. for (var first = true;; first = false) {
  12722. if (dir < 0 && !moveOnce(!first)) { break }
  12723. var cur = lineObj.text.charAt(pos.ch) || "\n";
  12724. var type = isWordChar(cur, helper) ? "w"
  12725. : group && cur == "\n" ? "n"
  12726. : !group || /\s/.test(cur) ? null
  12727. : "p";
  12728. if (group && !first && !type) { type = "s"; }
  12729. if (sawType && sawType != type) {
  12730. if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";}
  12731. break
  12732. }
  12733. if (type) { sawType = type; }
  12734. if (dir > 0 && !moveOnce(!first)) { break }
  12735. }
  12736. }
  12737. var result = skipAtomic(doc, pos, oldPos, origDir, true);
  12738. if (equalCursorPos(oldPos, result)) { result.hitSide = true; }
  12739. return result
  12740. }
  12741. // For relative vertical movement. Dir may be -1 or 1. Unit can be
  12742. // "page" or "line". The resulting position will have a hitSide=true
  12743. // property if it reached the end of the document.
  12744. function findPosV(cm, pos, dir, unit) {
  12745. var doc = cm.doc, x = pos.left, y;
  12746. if (unit == "page") {
  12747. var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
  12748. var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
  12749. y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
  12750. } else if (unit == "line") {
  12751. y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
  12752. }
  12753. var target;
  12754. for (;;) {
  12755. target = coordsChar(cm, x, y);
  12756. if (!target.outside) { break }
  12757. if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }
  12758. y += dir * 5;
  12759. }
  12760. return target
  12761. }
  12762. // CONTENTEDITABLE INPUT STYLE
  12763. var ContentEditableInput = function(cm) {
  12764. this.cm = cm;
  12765. this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
  12766. this.polling = new Delayed();
  12767. this.composing = null;
  12768. this.gracePeriod = false;
  12769. this.readDOMTimeout = null;
  12770. };
  12771. ContentEditableInput.prototype.init = function (display) {
  12772. var this$1 = this;
  12773. var input = this, cm = input.cm;
  12774. var div = input.div = display.lineDiv;
  12775. div.contentEditable = true;
  12776. disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);
  12777. function belongsToInput(e) {
  12778. for (var t = e.target; t; t = t.parentNode) {
  12779. if (t == div) { return true }
  12780. if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) { break }
  12781. }
  12782. return false
  12783. }
  12784. on(div, "paste", function (e) {
  12785. if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
  12786. // IE doesn't fire input events, so we schedule a read for the pasted content in this way
  12787. if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }
  12788. });
  12789. on(div, "compositionstart", function (e) {
  12790. this$1.composing = {data: e.data, done: false};
  12791. });
  12792. on(div, "compositionupdate", function (e) {
  12793. if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }
  12794. });
  12795. on(div, "compositionend", function (e) {
  12796. if (this$1.composing) {
  12797. if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }
  12798. this$1.composing.done = true;
  12799. }
  12800. });
  12801. on(div, "touchstart", function () { return input.forceCompositionEnd(); });
  12802. on(div, "input", function () {
  12803. if (!this$1.composing) { this$1.readFromDOMSoon(); }
  12804. });
  12805. function onCopyCut(e) {
  12806. if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }
  12807. if (cm.somethingSelected()) {
  12808. setLastCopied({lineWise: false, text: cm.getSelections()});
  12809. if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }
  12810. } else if (!cm.options.lineWiseCopyCut) {
  12811. return
  12812. } else {
  12813. var ranges = copyableRanges(cm);
  12814. setLastCopied({lineWise: true, text: ranges.text});
  12815. if (e.type == "cut") {
  12816. cm.operation(function () {
  12817. cm.setSelections(ranges.ranges, 0, sel_dontScroll);
  12818. cm.replaceSelection("", null, "cut");
  12819. });
  12820. }
  12821. }
  12822. if (e.clipboardData) {
  12823. e.clipboardData.clearData();
  12824. var content = lastCopied.text.join("\n");
  12825. // iOS exposes the clipboard API, but seems to discard content inserted into it
  12826. e.clipboardData.setData("Text", content);
  12827. if (e.clipboardData.getData("Text") == content) {
  12828. e.preventDefault();
  12829. return
  12830. }
  12831. }
  12832. // Old-fashioned briefly-focus-a-textarea hack
  12833. var kludge = hiddenTextarea(), te = kludge.firstChild;
  12834. cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
  12835. te.value = lastCopied.text.join("\n");
  12836. var hadFocus = activeElt();
  12837. selectInput(te);
  12838. setTimeout(function () {
  12839. cm.display.lineSpace.removeChild(kludge);
  12840. hadFocus.focus();
  12841. if (hadFocus == div) { input.showPrimarySelection(); }
  12842. }, 50);
  12843. }
  12844. on(div, "copy", onCopyCut);
  12845. on(div, "cut", onCopyCut);
  12846. };
  12847. ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {
  12848. // Label for screenreaders, accessibility
  12849. if(label) {
  12850. this.div.setAttribute('aria-label', label);
  12851. } else {
  12852. this.div.removeAttribute('aria-label');
  12853. }
  12854. };
  12855. ContentEditableInput.prototype.prepareSelection = function () {
  12856. var result = prepareSelection(this.cm, false);
  12857. result.focus = activeElt() == this.div;
  12858. return result
  12859. };
  12860. ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
  12861. if (!info || !this.cm.display.view.length) { return }
  12862. if (info.focus || takeFocus) { this.showPrimarySelection(); }
  12863. this.showMultipleSelections(info);
  12864. };
  12865. ContentEditableInput.prototype.getSelection = function () {
  12866. return this.cm.display.wrapper.ownerDocument.getSelection()
  12867. };
  12868. ContentEditableInput.prototype.showPrimarySelection = function () {
  12869. var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
  12870. var from = prim.from(), to = prim.to();
  12871. if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
  12872. sel.removeAllRanges();
  12873. return
  12874. }
  12875. var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
  12876. var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);
  12877. if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
  12878. cmp(minPos(curAnchor, curFocus), from) == 0 &&
  12879. cmp(maxPos(curAnchor, curFocus), to) == 0)
  12880. { return }
  12881. var view = cm.display.view;
  12882. var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||
  12883. {node: view[0].measure.map[2], offset: 0};
  12884. var end = to.line < cm.display.viewTo && posToDOM(cm, to);
  12885. if (!end) {
  12886. var measure = view[view.length - 1].measure;
  12887. var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
  12888. end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};
  12889. }
  12890. if (!start || !end) {
  12891. sel.removeAllRanges();
  12892. return
  12893. }
  12894. var old = sel.rangeCount && sel.getRangeAt(0), rng;
  12895. try { rng = range(start.node, start.offset, end.offset, end.node); }
  12896. catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
  12897. if (rng) {
  12898. if (!gecko && cm.state.focused) {
  12899. sel.collapse(start.node, start.offset);
  12900. if (!rng.collapsed) {
  12901. sel.removeAllRanges();
  12902. sel.addRange(rng);
  12903. }
  12904. } else {
  12905. sel.removeAllRanges();
  12906. sel.addRange(rng);
  12907. }
  12908. if (old && sel.anchorNode == null) { sel.addRange(old); }
  12909. else if (gecko) { this.startGracePeriod(); }
  12910. }
  12911. this.rememberSelection();
  12912. };
  12913. ContentEditableInput.prototype.startGracePeriod = function () {
  12914. var this$1 = this;
  12915. clearTimeout(this.gracePeriod);
  12916. this.gracePeriod = setTimeout(function () {
  12917. this$1.gracePeriod = false;
  12918. if (this$1.selectionChanged())
  12919. { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }
  12920. }, 20);
  12921. };
  12922. ContentEditableInput.prototype.showMultipleSelections = function (info) {
  12923. removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
  12924. removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
  12925. };
  12926. ContentEditableInput.prototype.rememberSelection = function () {
  12927. var sel = this.getSelection();
  12928. this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
  12929. this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
  12930. };
  12931. ContentEditableInput.prototype.selectionInEditor = function () {
  12932. var sel = this.getSelection();
  12933. if (!sel.rangeCount) { return false }
  12934. var node = sel.getRangeAt(0).commonAncestorContainer;
  12935. return contains(this.div, node)
  12936. };
  12937. ContentEditableInput.prototype.focus = function () {
  12938. if (this.cm.options.readOnly != "nocursor") {
  12939. if (!this.selectionInEditor() || activeElt() != this.div)
  12940. { this.showSelection(this.prepareSelection(), true); }
  12941. this.div.focus();
  12942. }
  12943. };
  12944. ContentEditableInput.prototype.blur = function () { this.div.blur(); };
  12945. ContentEditableInput.prototype.getField = function () { return this.div };
  12946. ContentEditableInput.prototype.supportsTouch = function () { return true };
  12947. ContentEditableInput.prototype.receivedFocus = function () {
  12948. var input = this;
  12949. if (this.selectionInEditor())
  12950. { this.pollSelection(); }
  12951. else
  12952. { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }
  12953. function poll() {
  12954. if (input.cm.state.focused) {
  12955. input.pollSelection();
  12956. input.polling.set(input.cm.options.pollInterval, poll);
  12957. }
  12958. }
  12959. this.polling.set(this.cm.options.pollInterval, poll);
  12960. };
  12961. ContentEditableInput.prototype.selectionChanged = function () {
  12962. var sel = this.getSelection();
  12963. return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
  12964. sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
  12965. };
  12966. ContentEditableInput.prototype.pollSelection = function () {
  12967. if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
  12968. var sel = this.getSelection(), cm = this.cm;
  12969. // On Android Chrome (version 56, at least), backspacing into an
  12970. // uneditable block element will put the cursor in that element,
  12971. // and then, because it's not editable, hide the virtual keyboard.
  12972. // Because Android doesn't allow us to actually detect backspace
  12973. // presses in a sane way, this code checks for when that happens
  12974. // and simulates a backspace press in this case.
  12975. if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {
  12976. this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs});
  12977. this.blur();
  12978. this.focus();
  12979. return
  12980. }
  12981. if (this.composing) { return }
  12982. this.rememberSelection();
  12983. var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
  12984. var head = domToPos(cm, sel.focusNode, sel.focusOffset);
  12985. if (anchor && head) { runInOp(cm, function () {
  12986. setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
  12987. if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }
  12988. }); }
  12989. };
  12990. ContentEditableInput.prototype.pollContent = function () {
  12991. if (this.readDOMTimeout != null) {
  12992. clearTimeout(this.readDOMTimeout);
  12993. this.readDOMTimeout = null;
  12994. }
  12995. var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();
  12996. var from = sel.from(), to = sel.to();
  12997. if (from.ch == 0 && from.line > cm.firstLine())
  12998. { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }
  12999. if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())
  13000. { to = Pos(to.line + 1, 0); }
  13001. if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }
  13002. var fromIndex, fromLine, fromNode;
  13003. if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
  13004. fromLine = lineNo(display.view[0].line);
  13005. fromNode = display.view[0].node;
  13006. } else {
  13007. fromLine = lineNo(display.view[fromIndex].line);
  13008. fromNode = display.view[fromIndex - 1].node.nextSibling;
  13009. }
  13010. var toIndex = findViewIndex(cm, to.line);
  13011. var toLine, toNode;
  13012. if (toIndex == display.view.length - 1) {
  13013. toLine = display.viewTo - 1;
  13014. toNode = display.lineDiv.lastChild;
  13015. } else {
  13016. toLine = lineNo(display.view[toIndex + 1].line) - 1;
  13017. toNode = display.view[toIndex + 1].node.previousSibling;
  13018. }
  13019. if (!fromNode) { return false }
  13020. var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
  13021. var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
  13022. while (newText.length > 1 && oldText.length > 1) {
  13023. if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
  13024. else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }
  13025. else { break }
  13026. }
  13027. var cutFront = 0, cutEnd = 0;
  13028. var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);
  13029. while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
  13030. { ++cutFront; }
  13031. var newBot = lst(newText), oldBot = lst(oldText);
  13032. var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
  13033. oldBot.length - (oldText.length == 1 ? cutFront : 0));
  13034. while (cutEnd < maxCutEnd &&
  13035. newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
  13036. { ++cutEnd; }
  13037. // Try to move start of change to start of selection if ambiguous
  13038. if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
  13039. while (cutFront && cutFront > from.ch &&
  13040. newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
  13041. cutFront--;
  13042. cutEnd++;
  13043. }
  13044. }
  13045. newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
  13046. newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");
  13047. var chFrom = Pos(fromLine, cutFront);
  13048. var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
  13049. if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
  13050. replaceRange(cm.doc, newText, chFrom, chTo, "+input");
  13051. return true
  13052. }
  13053. };
  13054. ContentEditableInput.prototype.ensurePolled = function () {
  13055. this.forceCompositionEnd();
  13056. };
  13057. ContentEditableInput.prototype.reset = function () {
  13058. this.forceCompositionEnd();
  13059. };
  13060. ContentEditableInput.prototype.forceCompositionEnd = function () {
  13061. if (!this.composing) { return }
  13062. clearTimeout(this.readDOMTimeout);
  13063. this.composing = null;
  13064. this.updateFromDOM();
  13065. this.div.blur();
  13066. this.div.focus();
  13067. };
  13068. ContentEditableInput.prototype.readFromDOMSoon = function () {
  13069. var this$1 = this;
  13070. if (this.readDOMTimeout != null) { return }
  13071. this.readDOMTimeout = setTimeout(function () {
  13072. this$1.readDOMTimeout = null;
  13073. if (this$1.composing) {
  13074. if (this$1.composing.done) { this$1.composing = null; }
  13075. else { return }
  13076. }
  13077. this$1.updateFromDOM();
  13078. }, 80);
  13079. };
  13080. ContentEditableInput.prototype.updateFromDOM = function () {
  13081. var this$1 = this;
  13082. if (this.cm.isReadOnly() || !this.pollContent())
  13083. { runInOp(this.cm, function () { return regChange(this$1.cm); }); }
  13084. };
  13085. ContentEditableInput.prototype.setUneditable = function (node) {
  13086. node.contentEditable = "false";
  13087. };
  13088. ContentEditableInput.prototype.onKeyPress = function (e) {
  13089. if (e.charCode == 0 || this.composing) { return }
  13090. e.preventDefault();
  13091. if (!this.cm.isReadOnly())
  13092. { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
  13093. };
  13094. ContentEditableInput.prototype.readOnlyChanged = function (val) {
  13095. this.div.contentEditable = String(val != "nocursor");
  13096. };
  13097. ContentEditableInput.prototype.onContextMenu = function () {};
  13098. ContentEditableInput.prototype.resetPosition = function () {};
  13099. ContentEditableInput.prototype.needsContentAttribute = true;
  13100. function posToDOM(cm, pos) {
  13101. var view = findViewForLine(cm, pos.line);
  13102. if (!view || view.hidden) { return null }
  13103. var line = getLine(cm.doc, pos.line);
  13104. var info = mapFromLineView(view, line, pos.line);
  13105. var order = getOrder(line, cm.doc.direction), side = "left";
  13106. if (order) {
  13107. var partPos = getBidiPartAt(order, pos.ch);
  13108. side = partPos % 2 ? "right" : "left";
  13109. }
  13110. var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
  13111. result.offset = result.collapse == "right" ? result.end : result.start;
  13112. return result
  13113. }
  13114. function isInGutter(node) {
  13115. for (var scan = node; scan; scan = scan.parentNode)
  13116. { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }
  13117. return false
  13118. }
  13119. function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
  13120. function domTextBetween(cm, from, to, fromLine, toLine) {
  13121. var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
  13122. function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
  13123. function close() {
  13124. if (closing) {
  13125. text += lineSep;
  13126. if (extraLinebreak) { text += lineSep; }
  13127. closing = extraLinebreak = false;
  13128. }
  13129. }
  13130. function addText(str) {
  13131. if (str) {
  13132. close();
  13133. text += str;
  13134. }
  13135. }
  13136. function walk(node) {
  13137. if (node.nodeType == 1) {
  13138. var cmText = node.getAttribute("cm-text");
  13139. if (cmText) {
  13140. addText(cmText);
  13141. return
  13142. }
  13143. var markerID = node.getAttribute("cm-marker"), range;
  13144. if (markerID) {
  13145. var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
  13146. if (found.length && (range = found[0].find(0)))
  13147. { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }
  13148. return
  13149. }
  13150. if (node.getAttribute("contenteditable") == "false") { return }
  13151. var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
  13152. if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
  13153. if (isBlock) { close(); }
  13154. for (var i = 0; i < node.childNodes.length; i++)
  13155. { walk(node.childNodes[i]); }
  13156. if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
  13157. if (isBlock) { closing = true; }
  13158. } else if (node.nodeType == 3) {
  13159. addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
  13160. }
  13161. }
  13162. for (;;) {
  13163. walk(from);
  13164. if (from == to) { break }
  13165. from = from.nextSibling;
  13166. extraLinebreak = false;
  13167. }
  13168. return text
  13169. }
  13170. function domToPos(cm, node, offset) {
  13171. var lineNode;
  13172. if (node == cm.display.lineDiv) {
  13173. lineNode = cm.display.lineDiv.childNodes[offset];
  13174. if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }
  13175. node = null; offset = 0;
  13176. } else {
  13177. for (lineNode = node;; lineNode = lineNode.parentNode) {
  13178. if (!lineNode || lineNode == cm.display.lineDiv) { return null }
  13179. if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }
  13180. }
  13181. }
  13182. for (var i = 0; i < cm.display.view.length; i++) {
  13183. var lineView = cm.display.view[i];
  13184. if (lineView.node == lineNode)
  13185. { return locateNodeInLineView(lineView, node, offset) }
  13186. }
  13187. }
  13188. function locateNodeInLineView(lineView, node, offset) {
  13189. var wrapper = lineView.text.firstChild, bad = false;
  13190. if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
  13191. if (node == wrapper) {
  13192. bad = true;
  13193. node = wrapper.childNodes[offset];
  13194. offset = 0;
  13195. if (!node) {
  13196. var line = lineView.rest ? lst(lineView.rest) : lineView.line;
  13197. return badPos(Pos(lineNo(line), line.text.length), bad)
  13198. }
  13199. }
  13200. var textNode = node.nodeType == 3 ? node : null, topNode = node;
  13201. if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
  13202. textNode = node.firstChild;
  13203. if (offset) { offset = textNode.nodeValue.length; }
  13204. }
  13205. while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }
  13206. var measure = lineView.measure, maps = measure.maps;
  13207. function find(textNode, topNode, offset) {
  13208. for (var i = -1; i < (maps ? maps.length : 0); i++) {
  13209. var map = i < 0 ? measure.map : maps[i];
  13210. for (var j = 0; j < map.length; j += 3) {
  13211. var curNode = map[j + 2];
  13212. if (curNode == textNode || curNode == topNode) {
  13213. var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
  13214. var ch = map[j] + offset;
  13215. if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }
  13216. return Pos(line, ch)
  13217. }
  13218. }
  13219. }
  13220. }
  13221. var found = find(textNode, topNode, offset);
  13222. if (found) { return badPos(found, bad) }
  13223. // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
  13224. for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
  13225. found = find(after, after.firstChild, 0);
  13226. if (found)
  13227. { return badPos(Pos(found.line, found.ch - dist), bad) }
  13228. else
  13229. { dist += after.textContent.length; }
  13230. }
  13231. for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
  13232. found = find(before, before.firstChild, -1);
  13233. if (found)
  13234. { return badPos(Pos(found.line, found.ch + dist$1), bad) }
  13235. else
  13236. { dist$1 += before.textContent.length; }
  13237. }
  13238. }
  13239. // TEXTAREA INPUT STYLE
  13240. var TextareaInput = function(cm) {
  13241. this.cm = cm;
  13242. // See input.poll and input.reset
  13243. this.prevInput = "";
  13244. // Flag that indicates whether we expect input to appear real soon
  13245. // now (after some event like 'keypress' or 'input') and are
  13246. // polling intensively.
  13247. this.pollingFast = false;
  13248. // Self-resetting timeout for the poller
  13249. this.polling = new Delayed();
  13250. // Used to work around IE issue with selection being forgotten when focus moves away from textarea
  13251. this.hasSelection = false;
  13252. this.composing = null;
  13253. };
  13254. TextareaInput.prototype.init = function (display) {
  13255. var this$1 = this;
  13256. var input = this, cm = this.cm;
  13257. this.createField(display);
  13258. var te = this.textarea;
  13259. display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
  13260. // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
  13261. if (ios) { te.style.width = "0px"; }
  13262. on(te, "input", function () {
  13263. if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }
  13264. input.poll();
  13265. });
  13266. on(te, "paste", function (e) {
  13267. if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
  13268. cm.state.pasteIncoming = +new Date;
  13269. input.fastPoll();
  13270. });
  13271. function prepareCopyCut(e) {
  13272. if (signalDOMEvent(cm, e)) { return }
  13273. if (cm.somethingSelected()) {
  13274. setLastCopied({lineWise: false, text: cm.getSelections()});
  13275. } else if (!cm.options.lineWiseCopyCut) {
  13276. return
  13277. } else {
  13278. var ranges = copyableRanges(cm);
  13279. setLastCopied({lineWise: true, text: ranges.text});
  13280. if (e.type == "cut") {
  13281. cm.setSelections(ranges.ranges, null, sel_dontScroll);
  13282. } else {
  13283. input.prevInput = "";
  13284. te.value = ranges.text.join("\n");
  13285. selectInput(te);
  13286. }
  13287. }
  13288. if (e.type == "cut") { cm.state.cutIncoming = +new Date; }
  13289. }
  13290. on(te, "cut", prepareCopyCut);
  13291. on(te, "copy", prepareCopyCut);
  13292. on(display.scroller, "paste", function (e) {
  13293. if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
  13294. if (!te.dispatchEvent) {
  13295. cm.state.pasteIncoming = +new Date;
  13296. input.focus();
  13297. return
  13298. }
  13299. // Pass the `paste` event to the textarea so it's handled by its event listener.
  13300. var event = new Event("paste");
  13301. event.clipboardData = e.clipboardData;
  13302. te.dispatchEvent(event);
  13303. });
  13304. // Prevent normal selection in the editor (we handle our own)
  13305. on(display.lineSpace, "selectstart", function (e) {
  13306. if (!eventInWidget(display, e)) { e_preventDefault(e); }
  13307. });
  13308. on(te, "compositionstart", function () {
  13309. var start = cm.getCursor("from");
  13310. if (input.composing) { input.composing.range.clear(); }
  13311. input.composing = {
  13312. start: start,
  13313. range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
  13314. };
  13315. });
  13316. on(te, "compositionend", function () {
  13317. if (input.composing) {
  13318. input.poll();
  13319. input.composing.range.clear();
  13320. input.composing = null;
  13321. }
  13322. });
  13323. };
  13324. TextareaInput.prototype.createField = function (_display) {
  13325. // Wraps and hides input textarea
  13326. this.wrapper = hiddenTextarea();
  13327. // The semihidden textarea that is focused when the editor is
  13328. // focused, and receives input.
  13329. this.textarea = this.wrapper.firstChild;
  13330. };
  13331. TextareaInput.prototype.screenReaderLabelChanged = function (label) {
  13332. // Label for screenreaders, accessibility
  13333. if(label) {
  13334. this.textarea.setAttribute('aria-label', label);
  13335. } else {
  13336. this.textarea.removeAttribute('aria-label');
  13337. }
  13338. };
  13339. TextareaInput.prototype.prepareSelection = function () {
  13340. // Redraw the selection and/or cursor
  13341. var cm = this.cm, display = cm.display, doc = cm.doc;
  13342. var result = prepareSelection(cm);
  13343. // Move the hidden textarea near the cursor to prevent scrolling artifacts
  13344. if (cm.options.moveInputWithCursor) {
  13345. var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
  13346. var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
  13347. result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
  13348. headPos.top + lineOff.top - wrapOff.top));
  13349. result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
  13350. headPos.left + lineOff.left - wrapOff.left));
  13351. }
  13352. return result
  13353. };
  13354. TextareaInput.prototype.showSelection = function (drawn) {
  13355. var cm = this.cm, display = cm.display;
  13356. removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
  13357. removeChildrenAndAdd(display.selectionDiv, drawn.selection);
  13358. if (drawn.teTop != null) {
  13359. this.wrapper.style.top = drawn.teTop + "px";
  13360. this.wrapper.style.left = drawn.teLeft + "px";
  13361. }
  13362. };
  13363. // Reset the input to correspond to the selection (or to be empty,
  13364. // when not typing and nothing is selected)
  13365. TextareaInput.prototype.reset = function (typing) {
  13366. if (this.contextMenuPending || this.composing) { return }
  13367. var cm = this.cm;
  13368. if (cm.somethingSelected()) {
  13369. this.prevInput = "";
  13370. var content = cm.getSelection();
  13371. this.textarea.value = content;
  13372. if (cm.state.focused) { selectInput(this.textarea); }
  13373. if (ie && ie_version >= 9) { this.hasSelection = content; }
  13374. } else if (!typing) {
  13375. this.prevInput = this.textarea.value = "";
  13376. if (ie && ie_version >= 9) { this.hasSelection = null; }
  13377. }
  13378. };
  13379. TextareaInput.prototype.getField = function () { return this.textarea };
  13380. TextareaInput.prototype.supportsTouch = function () { return false };
  13381. TextareaInput.prototype.focus = function () {
  13382. if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
  13383. try { this.textarea.focus(); }
  13384. catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
  13385. }
  13386. };
  13387. TextareaInput.prototype.blur = function () { this.textarea.blur(); };
  13388. TextareaInput.prototype.resetPosition = function () {
  13389. this.wrapper.style.top = this.wrapper.style.left = 0;
  13390. };
  13391. TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };
  13392. // Poll for input changes, using the normal rate of polling. This
  13393. // runs as long as the editor is focused.
  13394. TextareaInput.prototype.slowPoll = function () {
  13395. var this$1 = this;
  13396. if (this.pollingFast) { return }
  13397. this.polling.set(this.cm.options.pollInterval, function () {
  13398. this$1.poll();
  13399. if (this$1.cm.state.focused) { this$1.slowPoll(); }
  13400. });
  13401. };
  13402. // When an event has just come in that is likely to add or change
  13403. // something in the input textarea, we poll faster, to ensure that
  13404. // the change appears on the screen quickly.
  13405. TextareaInput.prototype.fastPoll = function () {
  13406. var missed = false, input = this;
  13407. input.pollingFast = true;
  13408. function p() {
  13409. var changed = input.poll();
  13410. if (!changed && !missed) {missed = true; input.polling.set(60, p);}
  13411. else {input.pollingFast = false; input.slowPoll();}
  13412. }
  13413. input.polling.set(20, p);
  13414. };
  13415. // Read input from the textarea, and update the document to match.
  13416. // When something is selected, it is present in the textarea, and
  13417. // selected (unless it is huge, in which case a placeholder is
  13418. // used). When nothing is selected, the cursor sits after previously
  13419. // seen text (can be empty), which is stored in prevInput (we must
  13420. // not reset the textarea when typing, because that breaks IME).
  13421. TextareaInput.prototype.poll = function () {
  13422. var this$1 = this;
  13423. var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
  13424. // Since this is called a *lot*, try to bail out as cheaply as
  13425. // possible when it is clear that nothing happened. hasSelection
  13426. // will be the case when there is a lot of text in the textarea,
  13427. // in which case reading its value would be expensive.
  13428. if (this.contextMenuPending || !cm.state.focused ||
  13429. (hasSelection(input) && !prevInput && !this.composing) ||
  13430. cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
  13431. { return false }
  13432. var text = input.value;
  13433. // If nothing changed, bail.
  13434. if (text == prevInput && !cm.somethingSelected()) { return false }
  13435. // Work around nonsensical selection resetting in IE9/10, and
  13436. // inexplicable appearance of private area unicode characters on
  13437. // some key combos in Mac (#2689).
  13438. if (ie && ie_version >= 9 && this.hasSelection === text ||
  13439. mac && /[\uf700-\uf7ff]/.test(text)) {
  13440. cm.display.input.reset();
  13441. return false
  13442. }
  13443. if (cm.doc.sel == cm.display.selForContextMenu) {
  13444. var first = text.charCodeAt(0);
  13445. if (first == 0x200b && !prevInput) { prevInput = "\u200b"; }
  13446. if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }
  13447. }
  13448. // Find the part of the input that is actually new
  13449. var same = 0, l = Math.min(prevInput.length, text.length);
  13450. while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }
  13451. runInOp(cm, function () {
  13452. applyTextInput(cm, text.slice(same), prevInput.length - same,
  13453. null, this$1.composing ? "*compose" : null);
  13454. // Don't leave long text in the textarea, since it makes further polling slow
  13455. if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; }
  13456. else { this$1.prevInput = text; }
  13457. if (this$1.composing) {
  13458. this$1.composing.range.clear();
  13459. this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
  13460. {className: "CodeMirror-composing"});
  13461. }
  13462. });
  13463. return true
  13464. };
  13465. TextareaInput.prototype.ensurePolled = function () {
  13466. if (this.pollingFast && this.poll()) { this.pollingFast = false; }
  13467. };
  13468. TextareaInput.prototype.onKeyPress = function () {
  13469. if (ie && ie_version >= 9) { this.hasSelection = null; }
  13470. this.fastPoll();
  13471. };
  13472. TextareaInput.prototype.onContextMenu = function (e) {
  13473. var input = this, cm = input.cm, display = cm.display, te = input.textarea;
  13474. if (input.contextMenuPending) { input.contextMenuPending(); }
  13475. var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
  13476. if (!pos || presto) { return } // Opera is difficult.
  13477. // Reset the current text selection only if the click is done outside of the selection
  13478. // and 'resetSelectionOnContextMenu' option is true.
  13479. var reset = cm.options.resetSelectionOnContextMenu;
  13480. if (reset && cm.doc.sel.contains(pos) == -1)
  13481. { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }
  13482. var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;
  13483. var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();
  13484. input.wrapper.style.cssText = "position: static";
  13485. te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
  13486. var oldScrollY;
  13487. if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)
  13488. display.input.focus();
  13489. if (webkit) { window.scrollTo(null, oldScrollY); }
  13490. display.input.reset();
  13491. // Adds "Select all" to context menu in FF
  13492. if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }
  13493. input.contextMenuPending = rehide;
  13494. display.selForContextMenu = cm.doc.sel;
  13495. clearTimeout(display.detectingSelectAll);
  13496. // Select-all will be greyed out if there's nothing to select, so
  13497. // this adds a zero-width space so that we can later check whether
  13498. // it got selected.
  13499. function prepareSelectAllHack() {
  13500. if (te.selectionStart != null) {
  13501. var selected = cm.somethingSelected();
  13502. var extval = "\u200b" + (selected ? te.value : "");
  13503. te.value = "\u21da"; // Used to catch context-menu undo
  13504. te.value = extval;
  13505. input.prevInput = selected ? "" : "\u200b";
  13506. te.selectionStart = 1; te.selectionEnd = extval.length;
  13507. // Re-set this, in case some other handler touched the
  13508. // selection in the meantime.
  13509. display.selForContextMenu = cm.doc.sel;
  13510. }
  13511. }
  13512. function rehide() {
  13513. if (input.contextMenuPending != rehide) { return }
  13514. input.contextMenuPending = false;
  13515. input.wrapper.style.cssText = oldWrapperCSS;
  13516. te.style.cssText = oldCSS;
  13517. if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }
  13518. // Try to detect the user choosing select-all
  13519. if (te.selectionStart != null) {
  13520. if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }
  13521. var i = 0, poll = function () {
  13522. if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
  13523. te.selectionEnd > 0 && input.prevInput == "\u200b") {
  13524. operation(cm, selectAll)(cm);
  13525. } else if (i++ < 10) {
  13526. display.detectingSelectAll = setTimeout(poll, 500);
  13527. } else {
  13528. display.selForContextMenu = null;
  13529. display.input.reset();
  13530. }
  13531. };
  13532. display.detectingSelectAll = setTimeout(poll, 200);
  13533. }
  13534. }
  13535. if (ie && ie_version >= 9) { prepareSelectAllHack(); }
  13536. if (captureRightClick) {
  13537. e_stop(e);
  13538. var mouseup = function () {
  13539. off(window, "mouseup", mouseup);
  13540. setTimeout(rehide, 20);
  13541. };
  13542. on(window, "mouseup", mouseup);
  13543. } else {
  13544. setTimeout(rehide, 50);
  13545. }
  13546. };
  13547. TextareaInput.prototype.readOnlyChanged = function (val) {
  13548. if (!val) { this.reset(); }
  13549. this.textarea.disabled = val == "nocursor";
  13550. this.textarea.readOnly = !!val;
  13551. };
  13552. TextareaInput.prototype.setUneditable = function () {};
  13553. TextareaInput.prototype.needsContentAttribute = false;
  13554. function fromTextArea(textarea, options) {
  13555. options = options ? copyObj(options) : {};
  13556. options.value = textarea.value;
  13557. if (!options.tabindex && textarea.tabIndex)
  13558. { options.tabindex = textarea.tabIndex; }
  13559. if (!options.placeholder && textarea.placeholder)
  13560. { options.placeholder = textarea.placeholder; }
  13561. // Set autofocus to true if this textarea is focused, or if it has
  13562. // autofocus and no other element is focused.
  13563. if (options.autofocus == null) {
  13564. var hasFocus = activeElt();
  13565. options.autofocus = hasFocus == textarea ||
  13566. textarea.getAttribute("autofocus") != null && hasFocus == document.body;
  13567. }
  13568. function save() {textarea.value = cm.getValue();}
  13569. var realSubmit;
  13570. if (textarea.form) {
  13571. on(textarea.form, "submit", save);
  13572. // Deplorable hack to make the submit method do the right thing.
  13573. if (!options.leaveSubmitMethodAlone) {
  13574. var form = textarea.form;
  13575. realSubmit = form.submit;
  13576. try {
  13577. var wrappedSubmit = form.submit = function () {
  13578. save();
  13579. form.submit = realSubmit;
  13580. form.submit();
  13581. form.submit = wrappedSubmit;
  13582. };
  13583. } catch(e) {}
  13584. }
  13585. }
  13586. options.finishInit = function (cm) {
  13587. cm.save = save;
  13588. cm.getTextArea = function () { return textarea; };
  13589. cm.toTextArea = function () {
  13590. cm.toTextArea = isNaN; // Prevent this from being ran twice
  13591. save();
  13592. textarea.parentNode.removeChild(cm.getWrapperElement());
  13593. textarea.style.display = "";
  13594. if (textarea.form) {
  13595. off(textarea.form, "submit", save);
  13596. if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function")
  13597. { textarea.form.submit = realSubmit; }
  13598. }
  13599. };
  13600. };
  13601. textarea.style.display = "none";
  13602. var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },
  13603. options);
  13604. return cm
  13605. }
  13606. function addLegacyProps(CodeMirror) {
  13607. CodeMirror.off = off;
  13608. CodeMirror.on = on;
  13609. CodeMirror.wheelEventPixels = wheelEventPixels;
  13610. CodeMirror.Doc = Doc;
  13611. CodeMirror.splitLines = splitLinesAuto;
  13612. CodeMirror.countColumn = countColumn;
  13613. CodeMirror.findColumn = findColumn;
  13614. CodeMirror.isWordChar = isWordCharBasic;
  13615. CodeMirror.Pass = Pass;
  13616. CodeMirror.signal = signal;
  13617. CodeMirror.Line = Line;
  13618. CodeMirror.changeEnd = changeEnd;
  13619. CodeMirror.scrollbarModel = scrollbarModel;
  13620. CodeMirror.Pos = Pos;
  13621. CodeMirror.cmpPos = cmp;
  13622. CodeMirror.modes = modes;
  13623. CodeMirror.mimeModes = mimeModes;
  13624. CodeMirror.resolveMode = resolveMode;
  13625. CodeMirror.getMode = getMode;
  13626. CodeMirror.modeExtensions = modeExtensions;
  13627. CodeMirror.extendMode = extendMode;
  13628. CodeMirror.copyState = copyState;
  13629. CodeMirror.startState = startState;
  13630. CodeMirror.innerMode = innerMode;
  13631. CodeMirror.commands = commands;
  13632. CodeMirror.keyMap = keyMap;
  13633. CodeMirror.keyName = keyName;
  13634. CodeMirror.isModifierKey = isModifierKey;
  13635. CodeMirror.lookupKey = lookupKey;
  13636. CodeMirror.normalizeKeyMap = normalizeKeyMap;
  13637. CodeMirror.StringStream = StringStream;
  13638. CodeMirror.SharedTextMarker = SharedTextMarker;
  13639. CodeMirror.TextMarker = TextMarker;
  13640. CodeMirror.LineWidget = LineWidget;
  13641. CodeMirror.e_preventDefault = e_preventDefault;
  13642. CodeMirror.e_stopPropagation = e_stopPropagation;
  13643. CodeMirror.e_stop = e_stop;
  13644. CodeMirror.addClass = addClass;
  13645. CodeMirror.contains = contains;
  13646. CodeMirror.rmClass = rmClass;
  13647. CodeMirror.keyNames = keyNames;
  13648. }
  13649. // EDITOR CONSTRUCTOR
  13650. defineOptions(CodeMirror);
  13651. addEditorMethods(CodeMirror);
  13652. // Set up methods on CodeMirror's prototype to redirect to the editor's document.
  13653. var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
  13654. for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
  13655. { CodeMirror.prototype[prop] = (function(method) {
  13656. return function() {return method.apply(this.doc, arguments)}
  13657. })(Doc.prototype[prop]); } }
  13658. eventMixin(Doc);
  13659. CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};
  13660. // Extra arguments are stored as the mode's dependencies, which is
  13661. // used by (legacy) mechanisms like loadmode.js to automatically
  13662. // load a mode. (Preferred mechanism is the require/define calls.)
  13663. CodeMirror.defineMode = function(name/*, mode, …*/) {
  13664. if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; }
  13665. defineMode.apply(this, arguments);
  13666. };
  13667. CodeMirror.defineMIME = defineMIME;
  13668. // Minimal default mode.
  13669. CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });
  13670. CodeMirror.defineMIME("text/plain", "null");
  13671. // EXTENSIONS
  13672. CodeMirror.defineExtension = function (name, func) {
  13673. CodeMirror.prototype[name] = func;
  13674. };
  13675. CodeMirror.defineDocExtension = function (name, func) {
  13676. Doc.prototype[name] = func;
  13677. };
  13678. CodeMirror.fromTextArea = fromTextArea;
  13679. addLegacyProps(CodeMirror);
  13680. CodeMirror.version = "5.61.0";
  13681. return CodeMirror;
  13682. })));
  13683. /***/ }),
  13684. /***/ 99762:
  13685. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  13686. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  13687. // Distributed under an MIT license: https://codemirror.net/LICENSE
  13688. (function(mod) {
  13689. if (true) // CommonJS
  13690. mod(__webpack_require__(4631));
  13691. else {}
  13692. })(function(CodeMirror) {
  13693. "use strict";
  13694. function Context(indented, column, type, info, align, prev) {
  13695. this.indented = indented;
  13696. this.column = column;
  13697. this.type = type;
  13698. this.info = info;
  13699. this.align = align;
  13700. this.prev = prev;
  13701. }
  13702. function pushContext(state, col, type, info) {
  13703. var indent = state.indented;
  13704. if (state.context && state.context.type == "statement" && type != "statement")
  13705. indent = state.context.indented;
  13706. return state.context = new Context(indent, col, type, info, null, state.context);
  13707. }
  13708. function popContext(state) {
  13709. var t = state.context.type;
  13710. if (t == ")" || t == "]" || t == "}")
  13711. state.indented = state.context.indented;
  13712. return state.context = state.context.prev;
  13713. }
  13714. function typeBefore(stream, state, pos) {
  13715. if (state.prevToken == "variable" || state.prevToken == "type") return true;
  13716. if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true;
  13717. if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;
  13718. }
  13719. function isTopScope(context) {
  13720. for (;;) {
  13721. if (!context || context.type == "top") return true;
  13722. if (context.type == "}" && context.prev.info != "namespace") return false;
  13723. context = context.prev;
  13724. }
  13725. }
  13726. CodeMirror.defineMode("clike", function(config, parserConfig) {
  13727. var indentUnit = config.indentUnit,
  13728. statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
  13729. dontAlignCalls = parserConfig.dontAlignCalls,
  13730. keywords = parserConfig.keywords || {},
  13731. types = parserConfig.types || {},
  13732. builtin = parserConfig.builtin || {},
  13733. blockKeywords = parserConfig.blockKeywords || {},
  13734. defKeywords = parserConfig.defKeywords || {},
  13735. atoms = parserConfig.atoms || {},
  13736. hooks = parserConfig.hooks || {},
  13737. multiLineStrings = parserConfig.multiLineStrings,
  13738. indentStatements = parserConfig.indentStatements !== false,
  13739. indentSwitch = parserConfig.indentSwitch !== false,
  13740. namespaceSeparator = parserConfig.namespaceSeparator,
  13741. isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/,
  13742. numberStart = parserConfig.numberStart || /[\d\.]/,
  13743. number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,
  13744. isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/,
  13745. isIdentifierChar = parserConfig.isIdentifierChar || /[\w\$_\xa1-\uffff]/,
  13746. // An optional function that takes a {string} token and returns true if it
  13747. // should be treated as a builtin.
  13748. isReservedIdentifier = parserConfig.isReservedIdentifier || false;
  13749. var curPunc, isDefKeyword;
  13750. function tokenBase(stream, state) {
  13751. var ch = stream.next();
  13752. if (hooks[ch]) {
  13753. var result = hooks[ch](stream, state);
  13754. if (result !== false) return result;
  13755. }
  13756. if (ch == '"' || ch == "'") {
  13757. state.tokenize = tokenString(ch);
  13758. return state.tokenize(stream, state);
  13759. }
  13760. if (numberStart.test(ch)) {
  13761. stream.backUp(1)
  13762. if (stream.match(number)) return "number"
  13763. stream.next()
  13764. }
  13765. if (isPunctuationChar.test(ch)) {
  13766. curPunc = ch;
  13767. return null;
  13768. }
  13769. if (ch == "/") {
  13770. if (stream.eat("*")) {
  13771. state.tokenize = tokenComment;
  13772. return tokenComment(stream, state);
  13773. }
  13774. if (stream.eat("/")) {
  13775. stream.skipToEnd();
  13776. return "comment";
  13777. }
  13778. }
  13779. if (isOperatorChar.test(ch)) {
  13780. while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {}
  13781. return "operator";
  13782. }
  13783. stream.eatWhile(isIdentifierChar);
  13784. if (namespaceSeparator) while (stream.match(namespaceSeparator))
  13785. stream.eatWhile(isIdentifierChar);
  13786. var cur = stream.current();
  13787. if (contains(keywords, cur)) {
  13788. if (contains(blockKeywords, cur)) curPunc = "newstatement";
  13789. if (contains(defKeywords, cur)) isDefKeyword = true;
  13790. return "keyword";
  13791. }
  13792. if (contains(types, cur)) return "type";
  13793. if (contains(builtin, cur)
  13794. || (isReservedIdentifier && isReservedIdentifier(cur))) {
  13795. if (contains(blockKeywords, cur)) curPunc = "newstatement";
  13796. return "builtin";
  13797. }
  13798. if (contains(atoms, cur)) return "atom";
  13799. return "variable";
  13800. }
  13801. function tokenString(quote) {
  13802. return function(stream, state) {
  13803. var escaped = false, next, end = false;
  13804. while ((next = stream.next()) != null) {
  13805. if (next == quote && !escaped) {end = true; break;}
  13806. escaped = !escaped && next == "\\";
  13807. }
  13808. if (end || !(escaped || multiLineStrings))
  13809. state.tokenize = null;
  13810. return "string";
  13811. };
  13812. }
  13813. function tokenComment(stream, state) {
  13814. var maybeEnd = false, ch;
  13815. while (ch = stream.next()) {
  13816. if (ch == "/" && maybeEnd) {
  13817. state.tokenize = null;
  13818. break;
  13819. }
  13820. maybeEnd = (ch == "*");
  13821. }
  13822. return "comment";
  13823. }
  13824. function maybeEOL(stream, state) {
  13825. if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))
  13826. state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)
  13827. }
  13828. // Interface
  13829. return {
  13830. startState: function(basecolumn) {
  13831. return {
  13832. tokenize: null,
  13833. context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false),
  13834. indented: 0,
  13835. startOfLine: true,
  13836. prevToken: null
  13837. };
  13838. },
  13839. token: function(stream, state) {
  13840. var ctx = state.context;
  13841. if (stream.sol()) {
  13842. if (ctx.align == null) ctx.align = false;
  13843. state.indented = stream.indentation();
  13844. state.startOfLine = true;
  13845. }
  13846. if (stream.eatSpace()) { maybeEOL(stream, state); return null; }
  13847. curPunc = isDefKeyword = null;
  13848. var style = (state.tokenize || tokenBase)(stream, state);
  13849. if (style == "comment" || style == "meta") return style;
  13850. if (ctx.align == null) ctx.align = true;
  13851. if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false)))
  13852. while (state.context.type == "statement") popContext(state);
  13853. else if (curPunc == "{") pushContext(state, stream.column(), "}");
  13854. else if (curPunc == "[") pushContext(state, stream.column(), "]");
  13855. else if (curPunc == "(") pushContext(state, stream.column(), ")");
  13856. else if (curPunc == "}") {
  13857. while (ctx.type == "statement") ctx = popContext(state);
  13858. if (ctx.type == "}") ctx = popContext(state);
  13859. while (ctx.type == "statement") ctx = popContext(state);
  13860. }
  13861. else if (curPunc == ctx.type) popContext(state);
  13862. else if (indentStatements &&
  13863. (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") ||
  13864. (ctx.type == "statement" && curPunc == "newstatement"))) {
  13865. pushContext(state, stream.column(), "statement", stream.current());
  13866. }
  13867. if (style == "variable" &&
  13868. ((state.prevToken == "def" ||
  13869. (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&
  13870. isTopScope(state.context) && stream.match(/^\s*\(/, false)))))
  13871. style = "def";
  13872. if (hooks.token) {
  13873. var result = hooks.token(stream, state, style);
  13874. if (result !== undefined) style = result;
  13875. }
  13876. if (style == "def" && parserConfig.styleDefs === false) style = "variable";
  13877. state.startOfLine = false;
  13878. state.prevToken = isDefKeyword ? "def" : style || curPunc;
  13879. maybeEOL(stream, state);
  13880. return style;
  13881. },
  13882. indent: function(state, textAfter) {
  13883. if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;
  13884. var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
  13885. var closing = firstChar == ctx.type;
  13886. if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
  13887. if (parserConfig.dontIndentStatements)
  13888. while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))
  13889. ctx = ctx.prev
  13890. if (hooks.indent) {
  13891. var hook = hooks.indent(state, ctx, textAfter, indentUnit);
  13892. if (typeof hook == "number") return hook
  13893. }
  13894. var switchBlock = ctx.prev && ctx.prev.info == "switch";
  13895. if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {
  13896. while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev
  13897. return ctx.indented
  13898. }
  13899. if (ctx.type == "statement")
  13900. return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
  13901. if (ctx.align && (!dontAlignCalls || ctx.type != ")"))
  13902. return ctx.column + (closing ? 0 : 1);
  13903. if (ctx.type == ")" && !closing)
  13904. return ctx.indented + statementIndentUnit;
  13905. return ctx.indented + (closing ? 0 : indentUnit) +
  13906. (!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? indentUnit : 0);
  13907. },
  13908. electricInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
  13909. blockCommentStart: "/*",
  13910. blockCommentEnd: "*/",
  13911. blockCommentContinue: " * ",
  13912. lineComment: "//",
  13913. fold: "brace"
  13914. };
  13915. });
  13916. function words(str) {
  13917. var obj = {}, words = str.split(" ");
  13918. for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
  13919. return obj;
  13920. }
  13921. function contains(words, word) {
  13922. if (typeof words === "function") {
  13923. return words(word);
  13924. } else {
  13925. return words.propertyIsEnumerable(word);
  13926. }
  13927. }
  13928. var cKeywords = "auto if break case register continue return default do sizeof " +
  13929. "static else struct switch extern typedef union for goto while enum const " +
  13930. "volatile inline restrict asm fortran";
  13931. // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20.
  13932. var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " +
  13933. "class compl concept constexpr const_cast decltype delete dynamic_cast " +
  13934. "explicit export final friend import module mutable namespace new noexcept " +
  13935. "not not_eq operator or or_eq override private protected public " +
  13936. "reinterpret_cast requires static_assert static_cast template this " +
  13937. "thread_local throw try typeid typename using virtual xor xor_eq";
  13938. var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " +
  13939. "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " +
  13940. "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " +
  13941. "@public @package @private @protected @required @optional @try @catch @finally @import " +
  13942. "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available";
  13943. var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " +
  13944. " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " +
  13945. "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " +
  13946. "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"
  13947. // Do not use this. Use the cTypes function below. This is global just to avoid
  13948. // excessive calls when cTypes is being called multiple times during a parse.
  13949. var basicCTypes = words("int long char short double float unsigned signed " +
  13950. "void bool");
  13951. // Do not use this. Use the objCTypes function below. This is global just to avoid
  13952. // excessive calls when objCTypes is being called multiple times during a parse.
  13953. var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL");
  13954. // Returns true if identifier is a "C" type.
  13955. // C type is defined as those that are reserved by the compiler (basicTypes),
  13956. // and those that end in _t (Reserved by POSIX for types)
  13957. // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
  13958. function cTypes(identifier) {
  13959. return contains(basicCTypes, identifier) || /.+_t$/.test(identifier);
  13960. }
  13961. // Returns true if identifier is a "Objective C" type.
  13962. function objCTypes(identifier) {
  13963. return cTypes(identifier) || contains(basicObjCTypes, identifier);
  13964. }
  13965. var cBlockKeywords = "case do else for if switch while struct enum union";
  13966. var cDefKeywords = "struct enum union";
  13967. function cppHook(stream, state) {
  13968. if (!state.startOfLine) return false
  13969. for (var ch, next = null; ch = stream.peek();) {
  13970. if (ch == "\\" && stream.match(/^.$/)) {
  13971. next = cppHook
  13972. break
  13973. } else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) {
  13974. break
  13975. }
  13976. stream.next()
  13977. }
  13978. state.tokenize = next
  13979. return "meta"
  13980. }
  13981. function pointerHook(_stream, state) {
  13982. if (state.prevToken == "type") return "type";
  13983. return false;
  13984. }
  13985. // For C and C++ (and ObjC): identifiers starting with __
  13986. // or _ followed by a capital letter are reserved for the compiler.
  13987. function cIsReservedIdentifier(token) {
  13988. if (!token || token.length < 2) return false;
  13989. if (token[0] != '_') return false;
  13990. return (token[1] == '_') || (token[1] !== token[1].toLowerCase());
  13991. }
  13992. function cpp14Literal(stream) {
  13993. stream.eatWhile(/[\w\.']/);
  13994. return "number";
  13995. }
  13996. function cpp11StringHook(stream, state) {
  13997. stream.backUp(1);
  13998. // Raw strings.
  13999. if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) {
  14000. var match = stream.match(/^"([^\s\\()]{0,16})\(/);
  14001. if (!match) {
  14002. return false;
  14003. }
  14004. state.cpp11RawStringDelim = match[1];
  14005. state.tokenize = tokenRawString;
  14006. return tokenRawString(stream, state);
  14007. }
  14008. // Unicode strings/chars.
  14009. if (stream.match(/^(?:u8|u|U|L)/)) {
  14010. if (stream.match(/^["']/, /* eat */ false)) {
  14011. return "string";
  14012. }
  14013. return false;
  14014. }
  14015. // Ignore this hook.
  14016. stream.next();
  14017. return false;
  14018. }
  14019. function cppLooksLikeConstructor(word) {
  14020. var lastTwo = /(\w+)::~?(\w+)$/.exec(word);
  14021. return lastTwo && lastTwo[1] == lastTwo[2];
  14022. }
  14023. // C#-style strings where "" escapes a quote.
  14024. function tokenAtString(stream, state) {
  14025. var next;
  14026. while ((next = stream.next()) != null) {
  14027. if (next == '"' && !stream.eat('"')) {
  14028. state.tokenize = null;
  14029. break;
  14030. }
  14031. }
  14032. return "string";
  14033. }
  14034. // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
  14035. // <delim> can be a string up to 16 characters long.
  14036. function tokenRawString(stream, state) {
  14037. // Escape characters that have special regex meanings.
  14038. var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
  14039. var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
  14040. if (match)
  14041. state.tokenize = null;
  14042. else
  14043. stream.skipToEnd();
  14044. return "string";
  14045. }
  14046. function def(mimes, mode) {
  14047. if (typeof mimes == "string") mimes = [mimes];
  14048. var words = [];
  14049. function add(obj) {
  14050. if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
  14051. words.push(prop);
  14052. }
  14053. add(mode.keywords);
  14054. add(mode.types);
  14055. add(mode.builtin);
  14056. add(mode.atoms);
  14057. if (words.length) {
  14058. mode.helperType = mimes[0];
  14059. CodeMirror.registerHelper("hintWords", mimes[0], words);
  14060. }
  14061. for (var i = 0; i < mimes.length; ++i)
  14062. CodeMirror.defineMIME(mimes[i], mode);
  14063. }
  14064. def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
  14065. name: "clike",
  14066. keywords: words(cKeywords),
  14067. types: cTypes,
  14068. blockKeywords: words(cBlockKeywords),
  14069. defKeywords: words(cDefKeywords),
  14070. typeFirstDefinitions: true,
  14071. atoms: words("NULL true false"),
  14072. isReservedIdentifier: cIsReservedIdentifier,
  14073. hooks: {
  14074. "#": cppHook,
  14075. "*": pointerHook,
  14076. },
  14077. modeProps: {fold: ["brace", "include"]}
  14078. });
  14079. def(["text/x-c++src", "text/x-c++hdr"], {
  14080. name: "clike",
  14081. keywords: words(cKeywords + " " + cppKeywords),
  14082. types: cTypes,
  14083. blockKeywords: words(cBlockKeywords + " class try catch"),
  14084. defKeywords: words(cDefKeywords + " class namespace"),
  14085. typeFirstDefinitions: true,
  14086. atoms: words("true false NULL nullptr"),
  14087. dontIndentStatements: /^template$/,
  14088. isIdentifierChar: /[\w\$_~\xa1-\uffff]/,
  14089. isReservedIdentifier: cIsReservedIdentifier,
  14090. hooks: {
  14091. "#": cppHook,
  14092. "*": pointerHook,
  14093. "u": cpp11StringHook,
  14094. "U": cpp11StringHook,
  14095. "L": cpp11StringHook,
  14096. "R": cpp11StringHook,
  14097. "0": cpp14Literal,
  14098. "1": cpp14Literal,
  14099. "2": cpp14Literal,
  14100. "3": cpp14Literal,
  14101. "4": cpp14Literal,
  14102. "5": cpp14Literal,
  14103. "6": cpp14Literal,
  14104. "7": cpp14Literal,
  14105. "8": cpp14Literal,
  14106. "9": cpp14Literal,
  14107. token: function(stream, state, style) {
  14108. if (style == "variable" && stream.peek() == "(" &&
  14109. (state.prevToken == ";" || state.prevToken == null ||
  14110. state.prevToken == "}") &&
  14111. cppLooksLikeConstructor(stream.current()))
  14112. return "def";
  14113. }
  14114. },
  14115. namespaceSeparator: "::",
  14116. modeProps: {fold: ["brace", "include"]}
  14117. });
  14118. def("text/x-java", {
  14119. name: "clike",
  14120. keywords: words("abstract assert break case catch class const continue default " +
  14121. "do else enum extends final finally for goto if implements import " +
  14122. "instanceof interface native new package private protected public " +
  14123. "return static strictfp super switch synchronized this throw throws transient " +
  14124. "try volatile while @interface"),
  14125. types: words("byte short int long float double boolean char void Boolean Byte Character Double Float " +
  14126. "Integer Long Number Object Short String StringBuffer StringBuilder Void"),
  14127. blockKeywords: words("catch class do else finally for if switch try while"),
  14128. defKeywords: words("class interface enum @interface"),
  14129. typeFirstDefinitions: true,
  14130. atoms: words("true false null"),
  14131. number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
  14132. hooks: {
  14133. "@": function(stream) {
  14134. // Don't match the @interface keyword.
  14135. if (stream.match('interface', false)) return false;
  14136. stream.eatWhile(/[\w\$_]/);
  14137. return "meta";
  14138. }
  14139. },
  14140. modeProps: {fold: ["brace", "import"]}
  14141. });
  14142. def("text/x-csharp", {
  14143. name: "clike",
  14144. keywords: words("abstract as async await base break case catch checked class const continue" +
  14145. " default delegate do else enum event explicit extern finally fixed for" +
  14146. " foreach goto if implicit in interface internal is lock namespace new" +
  14147. " operator out override params private protected public readonly ref return sealed" +
  14148. " sizeof stackalloc static struct switch this throw try typeof unchecked" +
  14149. " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
  14150. " global group into join let orderby partial remove select set value var yield"),
  14151. types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" +
  14152. " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" +
  14153. " UInt64 bool byte char decimal double short int long object" +
  14154. " sbyte float string ushort uint ulong"),
  14155. blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
  14156. defKeywords: words("class interface namespace struct var"),
  14157. typeFirstDefinitions: true,
  14158. atoms: words("true false null"),
  14159. hooks: {
  14160. "@": function(stream, state) {
  14161. if (stream.eat('"')) {
  14162. state.tokenize = tokenAtString;
  14163. return tokenAtString(stream, state);
  14164. }
  14165. stream.eatWhile(/[\w\$_]/);
  14166. return "meta";
  14167. }
  14168. }
  14169. });
  14170. function tokenTripleString(stream, state) {
  14171. var escaped = false;
  14172. while (!stream.eol()) {
  14173. if (!escaped && stream.match('"""')) {
  14174. state.tokenize = null;
  14175. break;
  14176. }
  14177. escaped = stream.next() == "\\" && !escaped;
  14178. }
  14179. return "string";
  14180. }
  14181. function tokenNestedComment(depth) {
  14182. return function (stream, state) {
  14183. var ch
  14184. while (ch = stream.next()) {
  14185. if (ch == "*" && stream.eat("/")) {
  14186. if (depth == 1) {
  14187. state.tokenize = null
  14188. break
  14189. } else {
  14190. state.tokenize = tokenNestedComment(depth - 1)
  14191. return state.tokenize(stream, state)
  14192. }
  14193. } else if (ch == "/" && stream.eat("*")) {
  14194. state.tokenize = tokenNestedComment(depth + 1)
  14195. return state.tokenize(stream, state)
  14196. }
  14197. }
  14198. return "comment"
  14199. }
  14200. }
  14201. def("text/x-scala", {
  14202. name: "clike",
  14203. keywords: words(
  14204. /* scala */
  14205. "abstract case catch class def do else extends final finally for forSome if " +
  14206. "implicit import lazy match new null object override package private protected return " +
  14207. "sealed super this throw trait try type val var while with yield _ " +
  14208. /* package scala */
  14209. "assert assume require print println printf readLine readBoolean readByte readShort " +
  14210. "readChar readInt readLong readFloat readDouble"
  14211. ),
  14212. types: words(
  14213. "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
  14214. "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " +
  14215. "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
  14216. "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
  14217. "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " +
  14218. /* package java.lang */
  14219. "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
  14220. "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
  14221. "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
  14222. "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
  14223. ),
  14224. multiLineStrings: true,
  14225. blockKeywords: words("catch class enum do else finally for forSome if match switch try while"),
  14226. defKeywords: words("class enum def object package trait type val var"),
  14227. atoms: words("true false null"),
  14228. indentStatements: false,
  14229. indentSwitch: false,
  14230. isOperatorChar: /[+\-*&%=<>!?|\/#:@]/,
  14231. hooks: {
  14232. "@": function(stream) {
  14233. stream.eatWhile(/[\w\$_]/);
  14234. return "meta";
  14235. },
  14236. '"': function(stream, state) {
  14237. if (!stream.match('""')) return false;
  14238. state.tokenize = tokenTripleString;
  14239. return state.tokenize(stream, state);
  14240. },
  14241. "'": function(stream) {
  14242. stream.eatWhile(/[\w\$_\xa1-\uffff]/);
  14243. return "atom";
  14244. },
  14245. "=": function(stream, state) {
  14246. var cx = state.context
  14247. if (cx.type == "}" && cx.align && stream.eat(">")) {
  14248. state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev)
  14249. return "operator"
  14250. } else {
  14251. return false
  14252. }
  14253. },
  14254. "/": function(stream, state) {
  14255. if (!stream.eat("*")) return false
  14256. state.tokenize = tokenNestedComment(1)
  14257. return state.tokenize(stream, state)
  14258. }
  14259. },
  14260. modeProps: {closeBrackets: {pairs: '()[]{}""', triples: '"'}}
  14261. });
  14262. function tokenKotlinString(tripleString){
  14263. return function (stream, state) {
  14264. var escaped = false, next, end = false;
  14265. while (!stream.eol()) {
  14266. if (!tripleString && !escaped && stream.match('"') ) {end = true; break;}
  14267. if (tripleString && stream.match('"""')) {end = true; break;}
  14268. next = stream.next();
  14269. if(!escaped && next == "$" && stream.match('{'))
  14270. stream.skipTo("}");
  14271. escaped = !escaped && next == "\\" && !tripleString;
  14272. }
  14273. if (end || !tripleString)
  14274. state.tokenize = null;
  14275. return "string";
  14276. }
  14277. }
  14278. def("text/x-kotlin", {
  14279. name: "clike",
  14280. keywords: words(
  14281. /*keywords*/
  14282. "package as typealias class interface this super val operator " +
  14283. "var fun for is in This throw return annotation " +
  14284. "break continue object if else while do try when !in !is as? " +
  14285. /*soft keywords*/
  14286. "file import where by get set abstract enum open inner override private public internal " +
  14287. "protected catch finally out final vararg reified dynamic companion constructor init " +
  14288. "sealed field property receiver param sparam lateinit data inline noinline tailrec " +
  14289. "external annotation crossinline const operator infix suspend actual expect setparam value"
  14290. ),
  14291. types: words(
  14292. /* package java.lang */
  14293. "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
  14294. "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
  14295. "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
  14296. "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " +
  14297. "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " +
  14298. "LazyThreadSafetyMode LongArray Nothing ShortArray Unit"
  14299. ),
  14300. intendSwitch: false,
  14301. indentStatements: false,
  14302. multiLineStrings: true,
  14303. number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
  14304. blockKeywords: words("catch class do else finally for if where try while enum"),
  14305. defKeywords: words("class val var object interface fun"),
  14306. atoms: words("true false null this"),
  14307. hooks: {
  14308. "@": function(stream) {
  14309. stream.eatWhile(/[\w\$_]/);
  14310. return "meta";
  14311. },
  14312. '*': function(_stream, state) {
  14313. return state.prevToken == '.' ? 'variable' : 'operator';
  14314. },
  14315. '"': function(stream, state) {
  14316. state.tokenize = tokenKotlinString(stream.match('""'));
  14317. return state.tokenize(stream, state);
  14318. },
  14319. "/": function(stream, state) {
  14320. if (!stream.eat("*")) return false;
  14321. state.tokenize = tokenNestedComment(1);
  14322. return state.tokenize(stream, state)
  14323. },
  14324. indent: function(state, ctx, textAfter, indentUnit) {
  14325. var firstChar = textAfter && textAfter.charAt(0);
  14326. if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "")
  14327. return state.indented;
  14328. if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") ||
  14329. state.prevToken == "variable" && firstChar == "." ||
  14330. (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".")
  14331. return indentUnit * 2 + ctx.indented;
  14332. if (ctx.align && ctx.type == "}")
  14333. return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit);
  14334. }
  14335. },
  14336. modeProps: {closeBrackets: {triples: '"'}}
  14337. });
  14338. def(["x-shader/x-vertex", "x-shader/x-fragment"], {
  14339. name: "clike",
  14340. keywords: words("sampler1D sampler2D sampler3D samplerCube " +
  14341. "sampler1DShadow sampler2DShadow " +
  14342. "const attribute uniform varying " +
  14343. "break continue discard return " +
  14344. "for while do if else struct " +
  14345. "in out inout"),
  14346. types: words("float int bool void " +
  14347. "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
  14348. "mat2 mat3 mat4"),
  14349. blockKeywords: words("for while do if else struct"),
  14350. builtin: words("radians degrees sin cos tan asin acos atan " +
  14351. "pow exp log exp2 sqrt inversesqrt " +
  14352. "abs sign floor ceil fract mod min max clamp mix step smoothstep " +
  14353. "length distance dot cross normalize ftransform faceforward " +
  14354. "reflect refract matrixCompMult " +
  14355. "lessThan lessThanEqual greaterThan greaterThanEqual " +
  14356. "equal notEqual any all not " +
  14357. "texture1D texture1DProj texture1DLod texture1DProjLod " +
  14358. "texture2D texture2DProj texture2DLod texture2DProjLod " +
  14359. "texture3D texture3DProj texture3DLod texture3DProjLod " +
  14360. "textureCube textureCubeLod " +
  14361. "shadow1D shadow2D shadow1DProj shadow2DProj " +
  14362. "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
  14363. "dFdx dFdy fwidth " +
  14364. "noise1 noise2 noise3 noise4"),
  14365. atoms: words("true false " +
  14366. "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
  14367. "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
  14368. "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
  14369. "gl_FogCoord gl_PointCoord " +
  14370. "gl_Position gl_PointSize gl_ClipVertex " +
  14371. "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
  14372. "gl_TexCoord gl_FogFragCoord " +
  14373. "gl_FragCoord gl_FrontFacing " +
  14374. "gl_FragData gl_FragDepth " +
  14375. "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
  14376. "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
  14377. "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
  14378. "gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
  14379. "gl_ProjectionMatrixInverseTranspose " +
  14380. "gl_ModelViewProjectionMatrixInverseTranspose " +
  14381. "gl_TextureMatrixInverseTranspose " +
  14382. "gl_NormalScale gl_DepthRange gl_ClipPlane " +
  14383. "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
  14384. "gl_FrontLightModelProduct gl_BackLightModelProduct " +
  14385. "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
  14386. "gl_FogParameters " +
  14387. "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
  14388. "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
  14389. "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
  14390. "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
  14391. "gl_MaxDrawBuffers"),
  14392. indentSwitch: false,
  14393. hooks: {"#": cppHook},
  14394. modeProps: {fold: ["brace", "include"]}
  14395. });
  14396. def("text/x-nesc", {
  14397. name: "clike",
  14398. keywords: words(cKeywords + " as atomic async call command component components configuration event generic " +
  14399. "implementation includes interface module new norace nx_struct nx_union post provides " +
  14400. "signal task uses abstract extends"),
  14401. types: cTypes,
  14402. blockKeywords: words(cBlockKeywords),
  14403. atoms: words("null true false"),
  14404. hooks: {"#": cppHook},
  14405. modeProps: {fold: ["brace", "include"]}
  14406. });
  14407. def("text/x-objectivec", {
  14408. name: "clike",
  14409. keywords: words(cKeywords + " " + objCKeywords),
  14410. types: objCTypes,
  14411. builtin: words(objCBuiltins),
  14412. blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"),
  14413. defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"),
  14414. dontIndentStatements: /^@.*$/,
  14415. typeFirstDefinitions: true,
  14416. atoms: words("YES NO NULL Nil nil true false nullptr"),
  14417. isReservedIdentifier: cIsReservedIdentifier,
  14418. hooks: {
  14419. "#": cppHook,
  14420. "*": pointerHook,
  14421. },
  14422. modeProps: {fold: ["brace", "include"]}
  14423. });
  14424. def("text/x-objectivec++", {
  14425. name: "clike",
  14426. keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords),
  14427. types: objCTypes,
  14428. builtin: words(objCBuiltins),
  14429. blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
  14430. defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"),
  14431. dontIndentStatements: /^@.*$|^template$/,
  14432. typeFirstDefinitions: true,
  14433. atoms: words("YES NO NULL Nil nil true false nullptr"),
  14434. isReservedIdentifier: cIsReservedIdentifier,
  14435. hooks: {
  14436. "#": cppHook,
  14437. "*": pointerHook,
  14438. "u": cpp11StringHook,
  14439. "U": cpp11StringHook,
  14440. "L": cpp11StringHook,
  14441. "R": cpp11StringHook,
  14442. "0": cpp14Literal,
  14443. "1": cpp14Literal,
  14444. "2": cpp14Literal,
  14445. "3": cpp14Literal,
  14446. "4": cpp14Literal,
  14447. "5": cpp14Literal,
  14448. "6": cpp14Literal,
  14449. "7": cpp14Literal,
  14450. "8": cpp14Literal,
  14451. "9": cpp14Literal,
  14452. token: function(stream, state, style) {
  14453. if (style == "variable" && stream.peek() == "(" &&
  14454. (state.prevToken == ";" || state.prevToken == null ||
  14455. state.prevToken == "}") &&
  14456. cppLooksLikeConstructor(stream.current()))
  14457. return "def";
  14458. }
  14459. },
  14460. namespaceSeparator: "::",
  14461. modeProps: {fold: ["brace", "include"]}
  14462. });
  14463. def("text/x-squirrel", {
  14464. name: "clike",
  14465. keywords: words("base break clone continue const default delete enum extends function in class" +
  14466. " foreach local resume return this throw typeof yield constructor instanceof static"),
  14467. types: cTypes,
  14468. blockKeywords: words("case catch class else for foreach if switch try while"),
  14469. defKeywords: words("function local class"),
  14470. typeFirstDefinitions: true,
  14471. atoms: words("true false null"),
  14472. hooks: {"#": cppHook},
  14473. modeProps: {fold: ["brace", "include"]}
  14474. });
  14475. // Ceylon Strings need to deal with interpolation
  14476. var stringTokenizer = null;
  14477. function tokenCeylonString(type) {
  14478. return function(stream, state) {
  14479. var escaped = false, next, end = false;
  14480. while (!stream.eol()) {
  14481. if (!escaped && stream.match('"') &&
  14482. (type == "single" || stream.match('""'))) {
  14483. end = true;
  14484. break;
  14485. }
  14486. if (!escaped && stream.match('``')) {
  14487. stringTokenizer = tokenCeylonString(type);
  14488. end = true;
  14489. break;
  14490. }
  14491. next = stream.next();
  14492. escaped = type == "single" && !escaped && next == "\\";
  14493. }
  14494. if (end)
  14495. state.tokenize = null;
  14496. return "string";
  14497. }
  14498. }
  14499. def("text/x-ceylon", {
  14500. name: "clike",
  14501. keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" +
  14502. " exists extends finally for function given if import in interface is let module new" +
  14503. " nonempty object of out outer package return satisfies super switch then this throw" +
  14504. " try value void while"),
  14505. types: function(word) {
  14506. // In Ceylon all identifiers that start with an uppercase are types
  14507. var first = word.charAt(0);
  14508. return (first === first.toUpperCase() && first !== first.toLowerCase());
  14509. },
  14510. blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"),
  14511. defKeywords: words("class dynamic function interface module object package value"),
  14512. builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" +
  14513. " native optional sealed see serializable shared suppressWarnings tagged throws variable"),
  14514. isPunctuationChar: /[\[\]{}\(\),;\:\.`]/,
  14515. isOperatorChar: /[+\-*&%=<>!?|^~:\/]/,
  14516. numberStart: /[\d#$]/,
  14517. number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,
  14518. multiLineStrings: true,
  14519. typeFirstDefinitions: true,
  14520. atoms: words("true false null larger smaller equal empty finished"),
  14521. indentSwitch: false,
  14522. styleDefs: false,
  14523. hooks: {
  14524. "@": function(stream) {
  14525. stream.eatWhile(/[\w\$_]/);
  14526. return "meta";
  14527. },
  14528. '"': function(stream, state) {
  14529. state.tokenize = tokenCeylonString(stream.match('""') ? "triple" : "single");
  14530. return state.tokenize(stream, state);
  14531. },
  14532. '`': function(stream, state) {
  14533. if (!stringTokenizer || !stream.match('`')) return false;
  14534. state.tokenize = stringTokenizer;
  14535. stringTokenizer = null;
  14536. return state.tokenize(stream, state);
  14537. },
  14538. "'": function(stream) {
  14539. stream.eatWhile(/[\w\$_\xa1-\uffff]/);
  14540. return "atom";
  14541. },
  14542. token: function(_stream, state, style) {
  14543. if ((style == "variable" || style == "type") &&
  14544. state.prevToken == ".") {
  14545. return "variable-2";
  14546. }
  14547. }
  14548. },
  14549. modeProps: {
  14550. fold: ["brace", "import"],
  14551. closeBrackets: {triples: '"'}
  14552. }
  14553. });
  14554. });
  14555. /***/ }),
  14556. /***/ 36629:
  14557. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  14558. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  14559. // Distributed under an MIT license: https://codemirror.net/LICENSE
  14560. (function(mod) {
  14561. if (true) // CommonJS
  14562. mod(__webpack_require__(4631));
  14563. else {}
  14564. })(function(CodeMirror) {
  14565. "use strict";
  14566. CodeMirror.defineMode("css", function(config, parserConfig) {
  14567. var inline = parserConfig.inline
  14568. if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
  14569. var indentUnit = config.indentUnit,
  14570. tokenHooks = parserConfig.tokenHooks,
  14571. documentTypes = parserConfig.documentTypes || {},
  14572. mediaTypes = parserConfig.mediaTypes || {},
  14573. mediaFeatures = parserConfig.mediaFeatures || {},
  14574. mediaValueKeywords = parserConfig.mediaValueKeywords || {},
  14575. propertyKeywords = parserConfig.propertyKeywords || {},
  14576. nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
  14577. fontProperties = parserConfig.fontProperties || {},
  14578. counterDescriptors = parserConfig.counterDescriptors || {},
  14579. colorKeywords = parserConfig.colorKeywords || {},
  14580. valueKeywords = parserConfig.valueKeywords || {},
  14581. allowNested = parserConfig.allowNested,
  14582. lineComment = parserConfig.lineComment,
  14583. supportsAtComponent = parserConfig.supportsAtComponent === true,
  14584. highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
  14585. var type, override;
  14586. function ret(style, tp) { type = tp; return style; }
  14587. // Tokenizers
  14588. function tokenBase(stream, state) {
  14589. var ch = stream.next();
  14590. if (tokenHooks[ch]) {
  14591. var result = tokenHooks[ch](stream, state);
  14592. if (result !== false) return result;
  14593. }
  14594. if (ch == "@") {
  14595. stream.eatWhile(/[\w\\\-]/);
  14596. return ret("def", stream.current());
  14597. } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
  14598. return ret(null, "compare");
  14599. } else if (ch == "\"" || ch == "'") {
  14600. state.tokenize = tokenString(ch);
  14601. return state.tokenize(stream, state);
  14602. } else if (ch == "#") {
  14603. stream.eatWhile(/[\w\\\-]/);
  14604. return ret("atom", "hash");
  14605. } else if (ch == "!") {
  14606. stream.match(/^\s*\w*/);
  14607. return ret("keyword", "important");
  14608. } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
  14609. stream.eatWhile(/[\w.%]/);
  14610. return ret("number", "unit");
  14611. } else if (ch === "-") {
  14612. if (/[\d.]/.test(stream.peek())) {
  14613. stream.eatWhile(/[\w.%]/);
  14614. return ret("number", "unit");
  14615. } else if (stream.match(/^-[\w\\\-]*/)) {
  14616. stream.eatWhile(/[\w\\\-]/);
  14617. if (stream.match(/^\s*:/, false))
  14618. return ret("variable-2", "variable-definition");
  14619. return ret("variable-2", "variable");
  14620. } else if (stream.match(/^\w+-/)) {
  14621. return ret("meta", "meta");
  14622. }
  14623. } else if (/[,+>*\/]/.test(ch)) {
  14624. return ret(null, "select-op");
  14625. } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
  14626. return ret("qualifier", "qualifier");
  14627. } else if (/[:;{}\[\]\(\)]/.test(ch)) {
  14628. return ret(null, ch);
  14629. } else if (stream.match(/^[\w-.]+(?=\()/)) {
  14630. if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
  14631. state.tokenize = tokenParenthesized;
  14632. }
  14633. return ret("variable callee", "variable");
  14634. } else if (/[\w\\\-]/.test(ch)) {
  14635. stream.eatWhile(/[\w\\\-]/);
  14636. return ret("property", "word");
  14637. } else {
  14638. return ret(null, null);
  14639. }
  14640. }
  14641. function tokenString(quote) {
  14642. return function(stream, state) {
  14643. var escaped = false, ch;
  14644. while ((ch = stream.next()) != null) {
  14645. if (ch == quote && !escaped) {
  14646. if (quote == ")") stream.backUp(1);
  14647. break;
  14648. }
  14649. escaped = !escaped && ch == "\\";
  14650. }
  14651. if (ch == quote || !escaped && quote != ")") state.tokenize = null;
  14652. return ret("string", "string");
  14653. };
  14654. }
  14655. function tokenParenthesized(stream, state) {
  14656. stream.next(); // Must be '('
  14657. if (!stream.match(/^\s*[\"\')]/, false))
  14658. state.tokenize = tokenString(")");
  14659. else
  14660. state.tokenize = null;
  14661. return ret(null, "(");
  14662. }
  14663. // Context management
  14664. function Context(type, indent, prev) {
  14665. this.type = type;
  14666. this.indent = indent;
  14667. this.prev = prev;
  14668. }
  14669. function pushContext(state, stream, type, indent) {
  14670. state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
  14671. return type;
  14672. }
  14673. function popContext(state) {
  14674. if (state.context.prev)
  14675. state.context = state.context.prev;
  14676. return state.context.type;
  14677. }
  14678. function pass(type, stream, state) {
  14679. return states[state.context.type](type, stream, state);
  14680. }
  14681. function popAndPass(type, stream, state, n) {
  14682. for (var i = n || 1; i > 0; i--)
  14683. state.context = state.context.prev;
  14684. return pass(type, stream, state);
  14685. }
  14686. // Parser
  14687. function wordAsValue(stream) {
  14688. var word = stream.current().toLowerCase();
  14689. if (valueKeywords.hasOwnProperty(word))
  14690. override = "atom";
  14691. else if (colorKeywords.hasOwnProperty(word))
  14692. override = "keyword";
  14693. else
  14694. override = "variable";
  14695. }
  14696. var states = {};
  14697. states.top = function(type, stream, state) {
  14698. if (type == "{") {
  14699. return pushContext(state, stream, "block");
  14700. } else if (type == "}" && state.context.prev) {
  14701. return popContext(state);
  14702. } else if (supportsAtComponent && /@component/i.test(type)) {
  14703. return pushContext(state, stream, "atComponentBlock");
  14704. } else if (/^@(-moz-)?document$/i.test(type)) {
  14705. return pushContext(state, stream, "documentTypes");
  14706. } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
  14707. return pushContext(state, stream, "atBlock");
  14708. } else if (/^@(font-face|counter-style)/i.test(type)) {
  14709. state.stateArg = type;
  14710. return "restricted_atBlock_before";
  14711. } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
  14712. return "keyframes";
  14713. } else if (type && type.charAt(0) == "@") {
  14714. return pushContext(state, stream, "at");
  14715. } else if (type == "hash") {
  14716. override = "builtin";
  14717. } else if (type == "word") {
  14718. override = "tag";
  14719. } else if (type == "variable-definition") {
  14720. return "maybeprop";
  14721. } else if (type == "interpolation") {
  14722. return pushContext(state, stream, "interpolation");
  14723. } else if (type == ":") {
  14724. return "pseudo";
  14725. } else if (allowNested && type == "(") {
  14726. return pushContext(state, stream, "parens");
  14727. }
  14728. return state.context.type;
  14729. };
  14730. states.block = function(type, stream, state) {
  14731. if (type == "word") {
  14732. var word = stream.current().toLowerCase();
  14733. if (propertyKeywords.hasOwnProperty(word)) {
  14734. override = "property";
  14735. return "maybeprop";
  14736. } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
  14737. override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
  14738. return "maybeprop";
  14739. } else if (allowNested) {
  14740. override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
  14741. return "block";
  14742. } else {
  14743. override += " error";
  14744. return "maybeprop";
  14745. }
  14746. } else if (type == "meta") {
  14747. return "block";
  14748. } else if (!allowNested && (type == "hash" || type == "qualifier")) {
  14749. override = "error";
  14750. return "block";
  14751. } else {
  14752. return states.top(type, stream, state);
  14753. }
  14754. };
  14755. states.maybeprop = function(type, stream, state) {
  14756. if (type == ":") return pushContext(state, stream, "prop");
  14757. return pass(type, stream, state);
  14758. };
  14759. states.prop = function(type, stream, state) {
  14760. if (type == ";") return popContext(state);
  14761. if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
  14762. if (type == "}" || type == "{") return popAndPass(type, stream, state);
  14763. if (type == "(") return pushContext(state, stream, "parens");
  14764. if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
  14765. override += " error";
  14766. } else if (type == "word") {
  14767. wordAsValue(stream);
  14768. } else if (type == "interpolation") {
  14769. return pushContext(state, stream, "interpolation");
  14770. }
  14771. return "prop";
  14772. };
  14773. states.propBlock = function(type, _stream, state) {
  14774. if (type == "}") return popContext(state);
  14775. if (type == "word") { override = "property"; return "maybeprop"; }
  14776. return state.context.type;
  14777. };
  14778. states.parens = function(type, stream, state) {
  14779. if (type == "{" || type == "}") return popAndPass(type, stream, state);
  14780. if (type == ")") return popContext(state);
  14781. if (type == "(") return pushContext(state, stream, "parens");
  14782. if (type == "interpolation") return pushContext(state, stream, "interpolation");
  14783. if (type == "word") wordAsValue(stream);
  14784. return "parens";
  14785. };
  14786. states.pseudo = function(type, stream, state) {
  14787. if (type == "meta") return "pseudo";
  14788. if (type == "word") {
  14789. override = "variable-3";
  14790. return state.context.type;
  14791. }
  14792. return pass(type, stream, state);
  14793. };
  14794. states.documentTypes = function(type, stream, state) {
  14795. if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
  14796. override = "tag";
  14797. return state.context.type;
  14798. } else {
  14799. return states.atBlock(type, stream, state);
  14800. }
  14801. };
  14802. states.atBlock = function(type, stream, state) {
  14803. if (type == "(") return pushContext(state, stream, "atBlock_parens");
  14804. if (type == "}" || type == ";") return popAndPass(type, stream, state);
  14805. if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
  14806. if (type == "interpolation") return pushContext(state, stream, "interpolation");
  14807. if (type == "word") {
  14808. var word = stream.current().toLowerCase();
  14809. if (word == "only" || word == "not" || word == "and" || word == "or")
  14810. override = "keyword";
  14811. else if (mediaTypes.hasOwnProperty(word))
  14812. override = "attribute";
  14813. else if (mediaFeatures.hasOwnProperty(word))
  14814. override = "property";
  14815. else if (mediaValueKeywords.hasOwnProperty(word))
  14816. override = "keyword";
  14817. else if (propertyKeywords.hasOwnProperty(word))
  14818. override = "property";
  14819. else if (nonStandardPropertyKeywords.hasOwnProperty(word))
  14820. override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
  14821. else if (valueKeywords.hasOwnProperty(word))
  14822. override = "atom";
  14823. else if (colorKeywords.hasOwnProperty(word))
  14824. override = "keyword";
  14825. else
  14826. override = "error";
  14827. }
  14828. return state.context.type;
  14829. };
  14830. states.atComponentBlock = function(type, stream, state) {
  14831. if (type == "}")
  14832. return popAndPass(type, stream, state);
  14833. if (type == "{")
  14834. return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
  14835. if (type == "word")
  14836. override = "error";
  14837. return state.context.type;
  14838. };
  14839. states.atBlock_parens = function(type, stream, state) {
  14840. if (type == ")") return popContext(state);
  14841. if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
  14842. return states.atBlock(type, stream, state);
  14843. };
  14844. states.restricted_atBlock_before = function(type, stream, state) {
  14845. if (type == "{")
  14846. return pushContext(state, stream, "restricted_atBlock");
  14847. if (type == "word" && state.stateArg == "@counter-style") {
  14848. override = "variable";
  14849. return "restricted_atBlock_before";
  14850. }
  14851. return pass(type, stream, state);
  14852. };
  14853. states.restricted_atBlock = function(type, stream, state) {
  14854. if (type == "}") {
  14855. state.stateArg = null;
  14856. return popContext(state);
  14857. }
  14858. if (type == "word") {
  14859. if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
  14860. (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
  14861. override = "error";
  14862. else
  14863. override = "property";
  14864. return "maybeprop";
  14865. }
  14866. return "restricted_atBlock";
  14867. };
  14868. states.keyframes = function(type, stream, state) {
  14869. if (type == "word") { override = "variable"; return "keyframes"; }
  14870. if (type == "{") return pushContext(state, stream, "top");
  14871. return pass(type, stream, state);
  14872. };
  14873. states.at = function(type, stream, state) {
  14874. if (type == ";") return popContext(state);
  14875. if (type == "{" || type == "}") return popAndPass(type, stream, state);
  14876. if (type == "word") override = "tag";
  14877. else if (type == "hash") override = "builtin";
  14878. return "at";
  14879. };
  14880. states.interpolation = function(type, stream, state) {
  14881. if (type == "}") return popContext(state);
  14882. if (type == "{" || type == ";") return popAndPass(type, stream, state);
  14883. if (type == "word") override = "variable";
  14884. else if (type != "variable" && type != "(" && type != ")") override = "error";
  14885. return "interpolation";
  14886. };
  14887. return {
  14888. startState: function(base) {
  14889. return {tokenize: null,
  14890. state: inline ? "block" : "top",
  14891. stateArg: null,
  14892. context: new Context(inline ? "block" : "top", base || 0, null)};
  14893. },
  14894. token: function(stream, state) {
  14895. if (!state.tokenize && stream.eatSpace()) return null;
  14896. var style = (state.tokenize || tokenBase)(stream, state);
  14897. if (style && typeof style == "object") {
  14898. type = style[1];
  14899. style = style[0];
  14900. }
  14901. override = style;
  14902. if (type != "comment")
  14903. state.state = states[state.state](type, stream, state);
  14904. return override;
  14905. },
  14906. indent: function(state, textAfter) {
  14907. var cx = state.context, ch = textAfter && textAfter.charAt(0);
  14908. var indent = cx.indent;
  14909. if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
  14910. if (cx.prev) {
  14911. if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
  14912. cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
  14913. // Resume indentation from parent context.
  14914. cx = cx.prev;
  14915. indent = cx.indent;
  14916. } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
  14917. ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
  14918. // Dedent relative to current context.
  14919. indent = Math.max(0, cx.indent - indentUnit);
  14920. }
  14921. }
  14922. return indent;
  14923. },
  14924. electricChars: "}",
  14925. blockCommentStart: "/*",
  14926. blockCommentEnd: "*/",
  14927. blockCommentContinue: " * ",
  14928. lineComment: lineComment,
  14929. fold: "brace"
  14930. };
  14931. });
  14932. function keySet(array) {
  14933. var keys = {};
  14934. for (var i = 0; i < array.length; ++i) {
  14935. keys[array[i].toLowerCase()] = true;
  14936. }
  14937. return keys;
  14938. }
  14939. var documentTypes_ = [
  14940. "domain", "regexp", "url", "url-prefix"
  14941. ], documentTypes = keySet(documentTypes_);
  14942. var mediaTypes_ = [
  14943. "all", "aural", "braille", "handheld", "print", "projection", "screen",
  14944. "tty", "tv", "embossed"
  14945. ], mediaTypes = keySet(mediaTypes_);
  14946. var mediaFeatures_ = [
  14947. "width", "min-width", "max-width", "height", "min-height", "max-height",
  14948. "device-width", "min-device-width", "max-device-width", "device-height",
  14949. "min-device-height", "max-device-height", "aspect-ratio",
  14950. "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
  14951. "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
  14952. "max-color", "color-index", "min-color-index", "max-color-index",
  14953. "monochrome", "min-monochrome", "max-monochrome", "resolution",
  14954. "min-resolution", "max-resolution", "scan", "grid", "orientation",
  14955. "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
  14956. "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme"
  14957. ], mediaFeatures = keySet(mediaFeatures_);
  14958. var mediaValueKeywords_ = [
  14959. "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
  14960. "interlace", "progressive",
  14961. "dark", "light"
  14962. ], mediaValueKeywords = keySet(mediaValueKeywords_);
  14963. var propertyKeywords_ = [
  14964. "align-content", "align-items", "align-self", "alignment-adjust",
  14965. "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
  14966. "animation-direction", "animation-duration", "animation-fill-mode",
  14967. "animation-iteration-count", "animation-name", "animation-play-state",
  14968. "animation-timing-function", "appearance", "azimuth", "backdrop-filter",
  14969. "backface-visibility", "background", "background-attachment",
  14970. "background-blend-mode", "background-clip", "background-color",
  14971. "background-image", "background-origin", "background-position",
  14972. "background-position-x", "background-position-y", "background-repeat",
  14973. "background-size", "baseline-shift", "binding", "bleed", "block-size",
  14974. "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
  14975. "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
  14976. "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
  14977. "border-collapse", "border-color", "border-image", "border-image-outset",
  14978. "border-image-repeat", "border-image-slice", "border-image-source",
  14979. "border-image-width", "border-left", "border-left-color", "border-left-style",
  14980. "border-left-width", "border-radius", "border-right", "border-right-color",
  14981. "border-right-style", "border-right-width", "border-spacing", "border-style",
  14982. "border-top", "border-top-color", "border-top-left-radius",
  14983. "border-top-right-radius", "border-top-style", "border-top-width",
  14984. "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
  14985. "break-after", "break-before", "break-inside", "caption-side", "caret-color",
  14986. "clear", "clip", "color", "color-profile", "column-count", "column-fill",
  14987. "column-gap", "column-rule", "column-rule-color", "column-rule-style",
  14988. "column-rule-width", "column-span", "column-width", "columns", "contain",
  14989. "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
  14990. "cue-before", "cursor", "direction", "display", "dominant-baseline",
  14991. "drop-initial-after-adjust", "drop-initial-after-align",
  14992. "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
  14993. "drop-initial-value", "elevation", "empty-cells", "fit", "fit-position",
  14994. "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
  14995. "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
  14996. "font", "font-family", "font-feature-settings", "font-kerning",
  14997. "font-language-override", "font-optical-sizing", "font-size",
  14998. "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
  14999. "font-variant", "font-variant-alternates", "font-variant-caps",
  15000. "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
  15001. "font-variant-position", "font-variation-settings", "font-weight", "gap",
  15002. "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
  15003. "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
  15004. "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
  15005. "grid-template", "grid-template-areas", "grid-template-columns",
  15006. "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
  15007. "image-orientation", "image-rendering", "image-resolution", "inline-box-align",
  15008. "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
  15009. "inset-inline-end", "inset-inline-start", "isolation", "justify-content",
  15010. "justify-items", "justify-self", "left", "letter-spacing", "line-break",
  15011. "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
  15012. "line-stacking-shift", "line-stacking-strategy", "list-style",
  15013. "list-style-image", "list-style-position", "list-style-type", "margin",
  15014. "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
  15015. "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
  15016. "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
  15017. "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
  15018. "max-block-size", "max-height", "max-inline-size",
  15019. "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
  15020. "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
  15021. "nav-up", "object-fit", "object-position", "offset", "offset-anchor",
  15022. "offset-distance", "offset-path", "offset-position", "offset-rotate",
  15023. "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
  15024. "outline-style", "outline-width", "overflow", "overflow-style",
  15025. "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
  15026. "padding-left", "padding-right", "padding-top", "page", "page-break-after",
  15027. "page-break-before", "page-break-inside", "page-policy", "pause",
  15028. "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
  15029. "pitch-range", "place-content", "place-items", "place-self", "play-during",
  15030. "position", "presentation-level", "punctuation-trim", "quotes",
  15031. "region-break-after", "region-break-before", "region-break-inside",
  15032. "region-fragment", "rendering-intent", "resize", "rest", "rest-after",
  15033. "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
  15034. "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
  15035. "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
  15036. "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
  15037. "scroll-margin-inline", "scroll-margin-inline-end",
  15038. "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
  15039. "scroll-margin-top", "scroll-padding", "scroll-padding-block",
  15040. "scroll-padding-block-end", "scroll-padding-block-start",
  15041. "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
  15042. "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
  15043. "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
  15044. "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
  15045. "size", "speak", "speak-as", "speak-header", "speak-numeral",
  15046. "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
  15047. "table-layout", "target", "target-name", "target-new", "target-position",
  15048. "text-align", "text-align-last", "text-combine-upright", "text-decoration",
  15049. "text-decoration-color", "text-decoration-line", "text-decoration-skip",
  15050. "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
  15051. "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
  15052. "text-height", "text-indent", "text-justify", "text-orientation",
  15053. "text-outline", "text-overflow", "text-rendering", "text-shadow",
  15054. "text-size-adjust", "text-space-collapse", "text-transform",
  15055. "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
  15056. "transform-style", "transition", "transition-delay", "transition-duration",
  15057. "transition-property", "transition-timing-function", "translate",
  15058. "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
  15059. "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
  15060. "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
  15061. "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
  15062. // SVG-specific
  15063. "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
  15064. "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
  15065. "color-interpolation", "color-interpolation-filters",
  15066. "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
  15067. "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
  15068. "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
  15069. "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
  15070. "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
  15071. "glyph-orientation-vertical", "text-anchor", "writing-mode",
  15072. ], propertyKeywords = keySet(propertyKeywords_);
  15073. var nonStandardPropertyKeywords_ = [
  15074. "border-block", "border-block-color", "border-block-end",
  15075. "border-block-end-color", "border-block-end-style", "border-block-end-width",
  15076. "border-block-start", "border-block-start-color", "border-block-start-style",
  15077. "border-block-start-width", "border-block-style", "border-block-width",
  15078. "border-inline", "border-inline-color", "border-inline-end",
  15079. "border-inline-end-color", "border-inline-end-style",
  15080. "border-inline-end-width", "border-inline-start", "border-inline-start-color",
  15081. "border-inline-start-style", "border-inline-start-width",
  15082. "border-inline-style", "border-inline-width", "margin-block",
  15083. "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
  15084. "margin-inline-start", "padding-block", "padding-block-end",
  15085. "padding-block-start", "padding-inline", "padding-inline-end",
  15086. "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
  15087. "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
  15088. "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
  15089. "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
  15090. "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
  15091. ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
  15092. var fontProperties_ = [
  15093. "font-display", "font-family", "src", "unicode-range", "font-variant",
  15094. "font-feature-settings", "font-stretch", "font-weight", "font-style"
  15095. ], fontProperties = keySet(fontProperties_);
  15096. var counterDescriptors_ = [
  15097. "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
  15098. "speak-as", "suffix", "symbols", "system"
  15099. ], counterDescriptors = keySet(counterDescriptors_);
  15100. var colorKeywords_ = [
  15101. "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
  15102. "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
  15103. "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
  15104. "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
  15105. "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
  15106. "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
  15107. "darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
  15108. "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
  15109. "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
  15110. "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
  15111. "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
  15112. "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
  15113. "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
  15114. "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
  15115. "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
  15116. "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
  15117. "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
  15118. "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
  15119. "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
  15120. "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
  15121. "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
  15122. "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
  15123. "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
  15124. "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
  15125. "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
  15126. "whitesmoke", "yellow", "yellowgreen"
  15127. ], colorKeywords = keySet(colorKeywords_);
  15128. var valueKeywords_ = [
  15129. "above", "absolute", "activeborder", "additive", "activecaption", "afar",
  15130. "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
  15131. "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
  15132. "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
  15133. "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
  15134. "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
  15135. "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
  15136. "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
  15137. "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
  15138. "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
  15139. "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
  15140. "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
  15141. "compact", "condensed", "contain", "content", "contents",
  15142. "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
  15143. "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
  15144. "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
  15145. "destination-in", "destination-out", "destination-over", "devanagari", "difference",
  15146. "disc", "discard", "disclosure-closed", "disclosure-open", "document",
  15147. "dot-dash", "dot-dot-dash",
  15148. "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
  15149. "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
  15150. "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
  15151. "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
  15152. "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
  15153. "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
  15154. "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
  15155. "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
  15156. "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
  15157. "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
  15158. "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
  15159. "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
  15160. "help", "hidden", "hide", "higher", "highlight", "highlighttext",
  15161. "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
  15162. "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
  15163. "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
  15164. "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
  15165. "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
  15166. "katakana", "katakana-iroha", "keep-all", "khmer",
  15167. "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
  15168. "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
  15169. "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
  15170. "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
  15171. "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
  15172. "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
  15173. "media-controls-background", "media-current-time-display",
  15174. "media-fullscreen-button", "media-mute-button", "media-play-button",
  15175. "media-return-to-realtime-button", "media-rewind-button",
  15176. "media-seek-back-button", "media-seek-forward-button", "media-slider",
  15177. "media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
  15178. "media-volume-slider-container", "media-volume-sliderthumb", "medium",
  15179. "menu", "menulist", "menulist-button", "menulist-text",
  15180. "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
  15181. "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
  15182. "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
  15183. "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
  15184. "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
  15185. "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
  15186. "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
  15187. "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
  15188. "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
  15189. "progress", "push-button", "radial-gradient", "radio", "read-only",
  15190. "read-write", "read-write-plaintext-only", "rectangle", "region",
  15191. "relative", "repeat", "repeating-linear-gradient",
  15192. "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
  15193. "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
  15194. "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
  15195. "s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
  15196. "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
  15197. "searchfield-cancel-button", "searchfield-decoration",
  15198. "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
  15199. "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
  15200. "simp-chinese-formal", "simp-chinese-informal", "single",
  15201. "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
  15202. "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
  15203. "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
  15204. "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
  15205. "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
  15206. "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
  15207. "table-caption", "table-cell", "table-column", "table-column-group",
  15208. "table-footer-group", "table-header-group", "table-row", "table-row-group",
  15209. "tamil",
  15210. "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
  15211. "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
  15212. "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
  15213. "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
  15214. "trad-chinese-formal", "trad-chinese-informal", "transform",
  15215. "translate", "translate3d", "translateX", "translateY", "translateZ",
  15216. "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
  15217. "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
  15218. "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
  15219. "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
  15220. "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
  15221. "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
  15222. "xx-large", "xx-small"
  15223. ], valueKeywords = keySet(valueKeywords_);
  15224. var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
  15225. .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
  15226. .concat(valueKeywords_);
  15227. CodeMirror.registerHelper("hintWords", "css", allWords);
  15228. function tokenCComment(stream, state) {
  15229. var maybeEnd = false, ch;
  15230. while ((ch = stream.next()) != null) {
  15231. if (maybeEnd && ch == "/") {
  15232. state.tokenize = null;
  15233. break;
  15234. }
  15235. maybeEnd = (ch == "*");
  15236. }
  15237. return ["comment", "comment"];
  15238. }
  15239. CodeMirror.defineMIME("text/css", {
  15240. documentTypes: documentTypes,
  15241. mediaTypes: mediaTypes,
  15242. mediaFeatures: mediaFeatures,
  15243. mediaValueKeywords: mediaValueKeywords,
  15244. propertyKeywords: propertyKeywords,
  15245. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15246. fontProperties: fontProperties,
  15247. counterDescriptors: counterDescriptors,
  15248. colorKeywords: colorKeywords,
  15249. valueKeywords: valueKeywords,
  15250. tokenHooks: {
  15251. "/": function(stream, state) {
  15252. if (!stream.eat("*")) return false;
  15253. state.tokenize = tokenCComment;
  15254. return tokenCComment(stream, state);
  15255. }
  15256. },
  15257. name: "css"
  15258. });
  15259. CodeMirror.defineMIME("text/x-scss", {
  15260. mediaTypes: mediaTypes,
  15261. mediaFeatures: mediaFeatures,
  15262. mediaValueKeywords: mediaValueKeywords,
  15263. propertyKeywords: propertyKeywords,
  15264. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15265. colorKeywords: colorKeywords,
  15266. valueKeywords: valueKeywords,
  15267. fontProperties: fontProperties,
  15268. allowNested: true,
  15269. lineComment: "//",
  15270. tokenHooks: {
  15271. "/": function(stream, state) {
  15272. if (stream.eat("/")) {
  15273. stream.skipToEnd();
  15274. return ["comment", "comment"];
  15275. } else if (stream.eat("*")) {
  15276. state.tokenize = tokenCComment;
  15277. return tokenCComment(stream, state);
  15278. } else {
  15279. return ["operator", "operator"];
  15280. }
  15281. },
  15282. ":": function(stream) {
  15283. if (stream.match(/^\s*\{/, false))
  15284. return [null, null]
  15285. return false;
  15286. },
  15287. "$": function(stream) {
  15288. stream.match(/^[\w-]+/);
  15289. if (stream.match(/^\s*:/, false))
  15290. return ["variable-2", "variable-definition"];
  15291. return ["variable-2", "variable"];
  15292. },
  15293. "#": function(stream) {
  15294. if (!stream.eat("{")) return false;
  15295. return [null, "interpolation"];
  15296. }
  15297. },
  15298. name: "css",
  15299. helperType: "scss"
  15300. });
  15301. CodeMirror.defineMIME("text/x-less", {
  15302. mediaTypes: mediaTypes,
  15303. mediaFeatures: mediaFeatures,
  15304. mediaValueKeywords: mediaValueKeywords,
  15305. propertyKeywords: propertyKeywords,
  15306. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15307. colorKeywords: colorKeywords,
  15308. valueKeywords: valueKeywords,
  15309. fontProperties: fontProperties,
  15310. allowNested: true,
  15311. lineComment: "//",
  15312. tokenHooks: {
  15313. "/": function(stream, state) {
  15314. if (stream.eat("/")) {
  15315. stream.skipToEnd();
  15316. return ["comment", "comment"];
  15317. } else if (stream.eat("*")) {
  15318. state.tokenize = tokenCComment;
  15319. return tokenCComment(stream, state);
  15320. } else {
  15321. return ["operator", "operator"];
  15322. }
  15323. },
  15324. "@": function(stream) {
  15325. if (stream.eat("{")) return [null, "interpolation"];
  15326. if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
  15327. stream.eatWhile(/[\w\\\-]/);
  15328. if (stream.match(/^\s*:/, false))
  15329. return ["variable-2", "variable-definition"];
  15330. return ["variable-2", "variable"];
  15331. },
  15332. "&": function() {
  15333. return ["atom", "atom"];
  15334. }
  15335. },
  15336. name: "css",
  15337. helperType: "less"
  15338. });
  15339. CodeMirror.defineMIME("text/x-gss", {
  15340. documentTypes: documentTypes,
  15341. mediaTypes: mediaTypes,
  15342. mediaFeatures: mediaFeatures,
  15343. propertyKeywords: propertyKeywords,
  15344. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15345. fontProperties: fontProperties,
  15346. counterDescriptors: counterDescriptors,
  15347. colorKeywords: colorKeywords,
  15348. valueKeywords: valueKeywords,
  15349. supportsAtComponent: true,
  15350. tokenHooks: {
  15351. "/": function(stream, state) {
  15352. if (!stream.eat("*")) return false;
  15353. state.tokenize = tokenCComment;
  15354. return tokenCComment(stream, state);
  15355. }
  15356. },
  15357. name: "css",
  15358. helperType: "gss"
  15359. });
  15360. });
  15361. /***/ }),
  15362. /***/ 42425:
  15363. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15364. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  15365. // Distributed under an MIT license: https://codemirror.net/LICENSE
  15366. (function(mod) {
  15367. if (true) // CommonJS
  15368. mod(__webpack_require__(4631), __webpack_require__(49047), __webpack_require__(14146));
  15369. else {}
  15370. })(function(CodeMirror) {
  15371. "use strict";
  15372. var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i
  15373. CodeMirror.defineMode("gfm", function(config, modeConfig) {
  15374. var codeDepth = 0;
  15375. function blankLine(state) {
  15376. state.code = false;
  15377. return null;
  15378. }
  15379. var gfmOverlay = {
  15380. startState: function() {
  15381. return {
  15382. code: false,
  15383. codeBlock: false,
  15384. ateSpace: false
  15385. };
  15386. },
  15387. copyState: function(s) {
  15388. return {
  15389. code: s.code,
  15390. codeBlock: s.codeBlock,
  15391. ateSpace: s.ateSpace
  15392. };
  15393. },
  15394. token: function(stream, state) {
  15395. state.combineTokens = null;
  15396. // Hack to prevent formatting override inside code blocks (block and inline)
  15397. if (state.codeBlock) {
  15398. if (stream.match(/^```+/)) {
  15399. state.codeBlock = false;
  15400. return null;
  15401. }
  15402. stream.skipToEnd();
  15403. return null;
  15404. }
  15405. if (stream.sol()) {
  15406. state.code = false;
  15407. }
  15408. if (stream.sol() && stream.match(/^```+/)) {
  15409. stream.skipToEnd();
  15410. state.codeBlock = true;
  15411. return null;
  15412. }
  15413. // If this block is changed, it may need to be updated in Markdown mode
  15414. if (stream.peek() === '`') {
  15415. stream.next();
  15416. var before = stream.pos;
  15417. stream.eatWhile('`');
  15418. var difference = 1 + stream.pos - before;
  15419. if (!state.code) {
  15420. codeDepth = difference;
  15421. state.code = true;
  15422. } else {
  15423. if (difference === codeDepth) { // Must be exact
  15424. state.code = false;
  15425. }
  15426. }
  15427. return null;
  15428. } else if (state.code) {
  15429. stream.next();
  15430. return null;
  15431. }
  15432. // Check if space. If so, links can be formatted later on
  15433. if (stream.eatSpace()) {
  15434. state.ateSpace = true;
  15435. return null;
  15436. }
  15437. if (stream.sol() || state.ateSpace) {
  15438. state.ateSpace = false;
  15439. if (modeConfig.gitHubSpice !== false) {
  15440. if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)) {
  15441. // User/Project@SHA
  15442. // User@SHA
  15443. // SHA
  15444. state.combineTokens = true;
  15445. return "link";
  15446. } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
  15447. // User/Project#Num
  15448. // User#Num
  15449. // #Num
  15450. state.combineTokens = true;
  15451. return "link";
  15452. }
  15453. }
  15454. }
  15455. if (stream.match(urlRE) &&
  15456. stream.string.slice(stream.start - 2, stream.start) != "](" &&
  15457. (stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) {
  15458. // URLs
  15459. // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
  15460. // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
  15461. // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL
  15462. state.combineTokens = true;
  15463. return "link";
  15464. }
  15465. stream.next();
  15466. return null;
  15467. },
  15468. blankLine: blankLine
  15469. };
  15470. var markdownConfig = {
  15471. taskLists: true,
  15472. strikethrough: true,
  15473. emoji: true
  15474. };
  15475. for (var attr in modeConfig) {
  15476. markdownConfig[attr] = modeConfig[attr];
  15477. }
  15478. markdownConfig.name = "markdown";
  15479. return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);
  15480. }, "markdown");
  15481. CodeMirror.defineMIME("text/x-gfm", "gfm");
  15482. });
  15483. /***/ }),
  15484. /***/ 16531:
  15485. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15486. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  15487. // Distributed under an MIT license: https://codemirror.net/LICENSE
  15488. (function(mod) {
  15489. if (true) // CommonJS
  15490. mod(__webpack_require__(4631), __webpack_require__(29589), __webpack_require__(96876), __webpack_require__(36629));
  15491. else {}
  15492. })(function(CodeMirror) {
  15493. "use strict";
  15494. var defaultTags = {
  15495. script: [
  15496. ["lang", /(javascript|babel)/i, "javascript"],
  15497. ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
  15498. ["type", /./, "text/plain"],
  15499. [null, null, "javascript"]
  15500. ],
  15501. style: [
  15502. ["lang", /^css$/i, "css"],
  15503. ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
  15504. ["type", /./, "text/plain"],
  15505. [null, null, "css"]
  15506. ]
  15507. };
  15508. function maybeBackup(stream, pat, style) {
  15509. var cur = stream.current(), close = cur.search(pat);
  15510. if (close > -1) {
  15511. stream.backUp(cur.length - close);
  15512. } else if (cur.match(/<\/?$/)) {
  15513. stream.backUp(cur.length);
  15514. if (!stream.match(pat, false)) stream.match(cur);
  15515. }
  15516. return style;
  15517. }
  15518. var attrRegexpCache = {};
  15519. function getAttrRegexp(attr) {
  15520. var regexp = attrRegexpCache[attr];
  15521. if (regexp) return regexp;
  15522. return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
  15523. }
  15524. function getAttrValue(text, attr) {
  15525. var match = text.match(getAttrRegexp(attr))
  15526. return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
  15527. }
  15528. function getTagRegexp(tagName, anchored) {
  15529. return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
  15530. }
  15531. function addTags(from, to) {
  15532. for (var tag in from) {
  15533. var dest = to[tag] || (to[tag] = []);
  15534. var source = from[tag];
  15535. for (var i = source.length - 1; i >= 0; i--)
  15536. dest.unshift(source[i])
  15537. }
  15538. }
  15539. function findMatchingMode(tagInfo, tagText) {
  15540. for (var i = 0; i < tagInfo.length; i++) {
  15541. var spec = tagInfo[i];
  15542. if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
  15543. }
  15544. }
  15545. CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
  15546. var htmlMode = CodeMirror.getMode(config, {
  15547. name: "xml",
  15548. htmlMode: true,
  15549. multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
  15550. multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
  15551. allowMissingTagName: parserConfig.allowMissingTagName,
  15552. });
  15553. var tags = {};
  15554. var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
  15555. addTags(defaultTags, tags);
  15556. if (configTags) addTags(configTags, tags);
  15557. if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
  15558. tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])
  15559. function html(stream, state) {
  15560. var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
  15561. if (tag && !/[<>\s\/]/.test(stream.current()) &&
  15562. (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
  15563. tags.hasOwnProperty(tagName)) {
  15564. state.inTag = tagName + " "
  15565. } else if (state.inTag && tag && />$/.test(stream.current())) {
  15566. var inTag = /^([\S]+) (.*)/.exec(state.inTag)
  15567. state.inTag = null
  15568. var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
  15569. var mode = CodeMirror.getMode(config, modeSpec)
  15570. var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
  15571. state.token = function (stream, state) {
  15572. if (stream.match(endTagA, false)) {
  15573. state.token = html;
  15574. state.localState = state.localMode = null;
  15575. return null;
  15576. }
  15577. return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
  15578. };
  15579. state.localMode = mode;
  15580. state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
  15581. } else if (state.inTag) {
  15582. state.inTag += stream.current()
  15583. if (stream.eol()) state.inTag += " "
  15584. }
  15585. return style;
  15586. };
  15587. return {
  15588. startState: function () {
  15589. var state = CodeMirror.startState(htmlMode);
  15590. return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
  15591. },
  15592. copyState: function (state) {
  15593. var local;
  15594. if (state.localState) {
  15595. local = CodeMirror.copyState(state.localMode, state.localState);
  15596. }
  15597. return {token: state.token, inTag: state.inTag,
  15598. localMode: state.localMode, localState: local,
  15599. htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
  15600. },
  15601. token: function (stream, state) {
  15602. return state.token(stream, state);
  15603. },
  15604. indent: function (state, textAfter, line) {
  15605. if (!state.localMode || /^\s*<\//.test(textAfter))
  15606. return htmlMode.indent(state.htmlState, textAfter, line);
  15607. else if (state.localMode.indent)
  15608. return state.localMode.indent(state.localState, textAfter, line);
  15609. else
  15610. return CodeMirror.Pass;
  15611. },
  15612. innerMode: function (state) {
  15613. return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
  15614. }
  15615. };
  15616. }, "xml", "javascript", "css");
  15617. CodeMirror.defineMIME("text/html", "htmlmixed");
  15618. });
  15619. /***/ }),
  15620. /***/ 96876:
  15621. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15622. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  15623. // Distributed under an MIT license: https://codemirror.net/LICENSE
  15624. (function(mod) {
  15625. if (true) // CommonJS
  15626. mod(__webpack_require__(4631));
  15627. else {}
  15628. })(function(CodeMirror) {
  15629. "use strict";
  15630. CodeMirror.defineMode("javascript", function(config, parserConfig) {
  15631. var indentUnit = config.indentUnit;
  15632. var statementIndent = parserConfig.statementIndent;
  15633. var jsonldMode = parserConfig.jsonld;
  15634. var jsonMode = parserConfig.json || jsonldMode;
  15635. var trackScope = parserConfig.trackScope !== false
  15636. var isTS = parserConfig.typescript;
  15637. var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
  15638. // Tokenizer
  15639. var keywords = function(){
  15640. function kw(type) {return {type: type, style: "keyword"};}
  15641. var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
  15642. var operator = kw("operator"), atom = {type: "atom", style: "atom"};
  15643. return {
  15644. "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
  15645. "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
  15646. "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
  15647. "function": kw("function"), "catch": kw("catch"),
  15648. "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
  15649. "in": operator, "typeof": operator, "instanceof": operator,
  15650. "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
  15651. "this": kw("this"), "class": kw("class"), "super": kw("atom"),
  15652. "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
  15653. "await": C
  15654. };
  15655. }();
  15656. var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
  15657. var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
  15658. function readRegexp(stream) {
  15659. var escaped = false, next, inSet = false;
  15660. while ((next = stream.next()) != null) {
  15661. if (!escaped) {
  15662. if (next == "/" && !inSet) return;
  15663. if (next == "[") inSet = true;
  15664. else if (inSet && next == "]") inSet = false;
  15665. }
  15666. escaped = !escaped && next == "\\";
  15667. }
  15668. }
  15669. // Used as scratch variables to communicate multiple values without
  15670. // consing up tons of objects.
  15671. var type, content;
  15672. function ret(tp, style, cont) {
  15673. type = tp; content = cont;
  15674. return style;
  15675. }
  15676. function tokenBase(stream, state) {
  15677. var ch = stream.next();
  15678. if (ch == '"' || ch == "'") {
  15679. state.tokenize = tokenString(ch);
  15680. return state.tokenize(stream, state);
  15681. } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
  15682. return ret("number", "number");
  15683. } else if (ch == "." && stream.match("..")) {
  15684. return ret("spread", "meta");
  15685. } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
  15686. return ret(ch);
  15687. } else if (ch == "=" && stream.eat(">")) {
  15688. return ret("=>", "operator");
  15689. } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
  15690. return ret("number", "number");
  15691. } else if (/\d/.test(ch)) {
  15692. stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
  15693. return ret("number", "number");
  15694. } else if (ch == "/") {
  15695. if (stream.eat("*")) {
  15696. state.tokenize = tokenComment;
  15697. return tokenComment(stream, state);
  15698. } else if (stream.eat("/")) {
  15699. stream.skipToEnd();
  15700. return ret("comment", "comment");
  15701. } else if (expressionAllowed(stream, state, 1)) {
  15702. readRegexp(stream);
  15703. stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
  15704. return ret("regexp", "string-2");
  15705. } else {
  15706. stream.eat("=");
  15707. return ret("operator", "operator", stream.current());
  15708. }
  15709. } else if (ch == "`") {
  15710. state.tokenize = tokenQuasi;
  15711. return tokenQuasi(stream, state);
  15712. } else if (ch == "#" && stream.peek() == "!") {
  15713. stream.skipToEnd();
  15714. return ret("meta", "meta");
  15715. } else if (ch == "#" && stream.eatWhile(wordRE)) {
  15716. return ret("variable", "property")
  15717. } else if (ch == "<" && stream.match("!--") ||
  15718. (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
  15719. stream.skipToEnd()
  15720. return ret("comment", "comment")
  15721. } else if (isOperatorChar.test(ch)) {
  15722. if (ch != ">" || !state.lexical || state.lexical.type != ">") {
  15723. if (stream.eat("=")) {
  15724. if (ch == "!" || ch == "=") stream.eat("=")
  15725. } else if (/[<>*+\-|&?]/.test(ch)) {
  15726. stream.eat(ch)
  15727. if (ch == ">") stream.eat(ch)
  15728. }
  15729. }
  15730. if (ch == "?" && stream.eat(".")) return ret(".")
  15731. return ret("operator", "operator", stream.current());
  15732. } else if (wordRE.test(ch)) {
  15733. stream.eatWhile(wordRE);
  15734. var word = stream.current()
  15735. if (state.lastType != ".") {
  15736. if (keywords.propertyIsEnumerable(word)) {
  15737. var kw = keywords[word]
  15738. return ret(kw.type, kw.style, word)
  15739. }
  15740. if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
  15741. return ret("async", "keyword", word)
  15742. }
  15743. return ret("variable", "variable", word)
  15744. }
  15745. }
  15746. function tokenString(quote) {
  15747. return function(stream, state) {
  15748. var escaped = false, next;
  15749. if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
  15750. state.tokenize = tokenBase;
  15751. return ret("jsonld-keyword", "meta");
  15752. }
  15753. while ((next = stream.next()) != null) {
  15754. if (next == quote && !escaped) break;
  15755. escaped = !escaped && next == "\\";
  15756. }
  15757. if (!escaped) state.tokenize = tokenBase;
  15758. return ret("string", "string");
  15759. };
  15760. }
  15761. function tokenComment(stream, state) {
  15762. var maybeEnd = false, ch;
  15763. while (ch = stream.next()) {
  15764. if (ch == "/" && maybeEnd) {
  15765. state.tokenize = tokenBase;
  15766. break;
  15767. }
  15768. maybeEnd = (ch == "*");
  15769. }
  15770. return ret("comment", "comment");
  15771. }
  15772. function tokenQuasi(stream, state) {
  15773. var escaped = false, next;
  15774. while ((next = stream.next()) != null) {
  15775. if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
  15776. state.tokenize = tokenBase;
  15777. break;
  15778. }
  15779. escaped = !escaped && next == "\\";
  15780. }
  15781. return ret("quasi", "string-2", stream.current());
  15782. }
  15783. var brackets = "([{}])";
  15784. // This is a crude lookahead trick to try and notice that we're
  15785. // parsing the argument patterns for a fat-arrow function before we
  15786. // actually hit the arrow token. It only works if the arrow is on
  15787. // the same line as the arguments and there's no strange noise
  15788. // (comments) in between. Fallback is to only notice when we hit the
  15789. // arrow, and not declare the arguments as locals for the arrow
  15790. // body.
  15791. function findFatArrow(stream, state) {
  15792. if (state.fatArrowAt) state.fatArrowAt = null;
  15793. var arrow = stream.string.indexOf("=>", stream.start);
  15794. if (arrow < 0) return;
  15795. if (isTS) { // Try to skip TypeScript return type declarations after the arguments
  15796. var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
  15797. if (m) arrow = m.index
  15798. }
  15799. var depth = 0, sawSomething = false;
  15800. for (var pos = arrow - 1; pos >= 0; --pos) {
  15801. var ch = stream.string.charAt(pos);
  15802. var bracket = brackets.indexOf(ch);
  15803. if (bracket >= 0 && bracket < 3) {
  15804. if (!depth) { ++pos; break; }
  15805. if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
  15806. } else if (bracket >= 3 && bracket < 6) {
  15807. ++depth;
  15808. } else if (wordRE.test(ch)) {
  15809. sawSomething = true;
  15810. } else if (/["'\/`]/.test(ch)) {
  15811. for (;; --pos) {
  15812. if (pos == 0) return
  15813. var next = stream.string.charAt(pos - 1)
  15814. if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break }
  15815. }
  15816. } else if (sawSomething && !depth) {
  15817. ++pos;
  15818. break;
  15819. }
  15820. }
  15821. if (sawSomething && !depth) state.fatArrowAt = pos;
  15822. }
  15823. // Parser
  15824. var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,
  15825. "regexp": true, "this": true, "import": true, "jsonld-keyword": true};
  15826. function JSLexical(indented, column, type, align, prev, info) {
  15827. this.indented = indented;
  15828. this.column = column;
  15829. this.type = type;
  15830. this.prev = prev;
  15831. this.info = info;
  15832. if (align != null) this.align = align;
  15833. }
  15834. function inScope(state, varname) {
  15835. if (!trackScope) return false
  15836. for (var v = state.localVars; v; v = v.next)
  15837. if (v.name == varname) return true;
  15838. for (var cx = state.context; cx; cx = cx.prev) {
  15839. for (var v = cx.vars; v; v = v.next)
  15840. if (v.name == varname) return true;
  15841. }
  15842. }
  15843. function parseJS(state, style, type, content, stream) {
  15844. var cc = state.cc;
  15845. // Communicate our context to the combinators.
  15846. // (Less wasteful than consing up a hundred closures on every call.)
  15847. cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
  15848. if (!state.lexical.hasOwnProperty("align"))
  15849. state.lexical.align = true;
  15850. while(true) {
  15851. var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
  15852. if (combinator(type, content)) {
  15853. while(cc.length && cc[cc.length - 1].lex)
  15854. cc.pop()();
  15855. if (cx.marked) return cx.marked;
  15856. if (type == "variable" && inScope(state, content)) return "variable-2";
  15857. return style;
  15858. }
  15859. }
  15860. }
  15861. // Combinator utils
  15862. var cx = {state: null, column: null, marked: null, cc: null};
  15863. function pass() {
  15864. for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
  15865. }
  15866. function cont() {
  15867. pass.apply(null, arguments);
  15868. return true;
  15869. }
  15870. function inList(name, list) {
  15871. for (var v = list; v; v = v.next) if (v.name == name) return true
  15872. return false;
  15873. }
  15874. function register(varname) {
  15875. var state = cx.state;
  15876. cx.marked = "def";
  15877. if (!trackScope) return
  15878. if (state.context) {
  15879. if (state.lexical.info == "var" && state.context && state.context.block) {
  15880. // FIXME function decls are also not block scoped
  15881. var newContext = registerVarScoped(varname, state.context)
  15882. if (newContext != null) {
  15883. state.context = newContext
  15884. return
  15885. }
  15886. } else if (!inList(varname, state.localVars)) {
  15887. state.localVars = new Var(varname, state.localVars)
  15888. return
  15889. }
  15890. }
  15891. // Fall through means this is global
  15892. if (parserConfig.globalVars && !inList(varname, state.globalVars))
  15893. state.globalVars = new Var(varname, state.globalVars)
  15894. }
  15895. function registerVarScoped(varname, context) {
  15896. if (!context) {
  15897. return null
  15898. } else if (context.block) {
  15899. var inner = registerVarScoped(varname, context.prev)
  15900. if (!inner) return null
  15901. if (inner == context.prev) return context
  15902. return new Context(inner, context.vars, true)
  15903. } else if (inList(varname, context.vars)) {
  15904. return context
  15905. } else {
  15906. return new Context(context.prev, new Var(varname, context.vars), false)
  15907. }
  15908. }
  15909. function isModifier(name) {
  15910. return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
  15911. }
  15912. // Combinators
  15913. function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
  15914. function Var(name, next) { this.name = name; this.next = next }
  15915. var defaultVars = new Var("this", new Var("arguments", null))
  15916. function pushcontext() {
  15917. cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
  15918. cx.state.localVars = defaultVars
  15919. }
  15920. function pushblockcontext() {
  15921. cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
  15922. cx.state.localVars = null
  15923. }
  15924. function popcontext() {
  15925. cx.state.localVars = cx.state.context.vars
  15926. cx.state.context = cx.state.context.prev
  15927. }
  15928. popcontext.lex = true
  15929. function pushlex(type, info) {
  15930. var result = function() {
  15931. var state = cx.state, indent = state.indented;
  15932. if (state.lexical.type == "stat") indent = state.lexical.indented;
  15933. else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
  15934. indent = outer.indented;
  15935. state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
  15936. };
  15937. result.lex = true;
  15938. return result;
  15939. }
  15940. function poplex() {
  15941. var state = cx.state;
  15942. if (state.lexical.prev) {
  15943. if (state.lexical.type == ")")
  15944. state.indented = state.lexical.indented;
  15945. state.lexical = state.lexical.prev;
  15946. }
  15947. }
  15948. poplex.lex = true;
  15949. function expect(wanted) {
  15950. function exp(type) {
  15951. if (type == wanted) return cont();
  15952. else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
  15953. else return cont(exp);
  15954. };
  15955. return exp;
  15956. }
  15957. function statement(type, value) {
  15958. if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
  15959. if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
  15960. if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
  15961. if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
  15962. if (type == "debugger") return cont(expect(";"));
  15963. if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
  15964. if (type == ";") return cont();
  15965. if (type == "if") {
  15966. if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
  15967. cx.state.cc.pop()();
  15968. return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
  15969. }
  15970. if (type == "function") return cont(functiondef);
  15971. if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
  15972. if (type == "class" || (isTS && value == "interface")) {
  15973. cx.marked = "keyword"
  15974. return cont(pushlex("form", type == "class" ? type : value), className, poplex)
  15975. }
  15976. if (type == "variable") {
  15977. if (isTS && value == "declare") {
  15978. cx.marked = "keyword"
  15979. return cont(statement)
  15980. } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
  15981. cx.marked = "keyword"
  15982. if (value == "enum") return cont(enumdef);
  15983. else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));
  15984. else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
  15985. } else if (isTS && value == "namespace") {
  15986. cx.marked = "keyword"
  15987. return cont(pushlex("form"), expression, statement, poplex)
  15988. } else if (isTS && value == "abstract") {
  15989. cx.marked = "keyword"
  15990. return cont(statement)
  15991. } else {
  15992. return cont(pushlex("stat"), maybelabel);
  15993. }
  15994. }
  15995. if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
  15996. block, poplex, poplex, popcontext);
  15997. if (type == "case") return cont(expression, expect(":"));
  15998. if (type == "default") return cont(expect(":"));
  15999. if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
  16000. if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
  16001. if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
  16002. if (type == "async") return cont(statement)
  16003. if (value == "@") return cont(expression, statement)
  16004. return pass(pushlex("stat"), expression, expect(";"), poplex);
  16005. }
  16006. function maybeCatchBinding(type) {
  16007. if (type == "(") return cont(funarg, expect(")"))
  16008. }
  16009. function expression(type, value) {
  16010. return expressionInner(type, value, false);
  16011. }
  16012. function expressionNoComma(type, value) {
  16013. return expressionInner(type, value, true);
  16014. }
  16015. function parenExpr(type) {
  16016. if (type != "(") return pass()
  16017. return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
  16018. }
  16019. function expressionInner(type, value, noComma) {
  16020. if (cx.state.fatArrowAt == cx.stream.start) {
  16021. var body = noComma ? arrowBodyNoComma : arrowBody;
  16022. if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
  16023. else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
  16024. }
  16025. var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
  16026. if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
  16027. if (type == "function") return cont(functiondef, maybeop);
  16028. if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
  16029. if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
  16030. if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
  16031. if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
  16032. if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
  16033. if (type == "{") return contCommasep(objprop, "}", null, maybeop);
  16034. if (type == "quasi") return pass(quasi, maybeop);
  16035. if (type == "new") return cont(maybeTarget(noComma));
  16036. return cont();
  16037. }
  16038. function maybeexpression(type) {
  16039. if (type.match(/[;\}\)\],]/)) return pass();
  16040. return pass(expression);
  16041. }
  16042. function maybeoperatorComma(type, value) {
  16043. if (type == ",") return cont(maybeexpression);
  16044. return maybeoperatorNoComma(type, value, false);
  16045. }
  16046. function maybeoperatorNoComma(type, value, noComma) {
  16047. var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
  16048. var expr = noComma == false ? expression : expressionNoComma;
  16049. if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
  16050. if (type == "operator") {
  16051. if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
  16052. if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
  16053. return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
  16054. if (value == "?") return cont(expression, expect(":"), expr);
  16055. return cont(expr);
  16056. }
  16057. if (type == "quasi") { return pass(quasi, me); }
  16058. if (type == ";") return;
  16059. if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
  16060. if (type == ".") return cont(property, me);
  16061. if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
  16062. if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
  16063. if (type == "regexp") {
  16064. cx.state.lastType = cx.marked = "operator"
  16065. cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
  16066. return cont(expr)
  16067. }
  16068. }
  16069. function quasi(type, value) {
  16070. if (type != "quasi") return pass();
  16071. if (value.slice(value.length - 2) != "${") return cont(quasi);
  16072. return cont(expression, continueQuasi);
  16073. }
  16074. function continueQuasi(type) {
  16075. if (type == "}") {
  16076. cx.marked = "string-2";
  16077. cx.state.tokenize = tokenQuasi;
  16078. return cont(quasi);
  16079. }
  16080. }
  16081. function arrowBody(type) {
  16082. findFatArrow(cx.stream, cx.state);
  16083. return pass(type == "{" ? statement : expression);
  16084. }
  16085. function arrowBodyNoComma(type) {
  16086. findFatArrow(cx.stream, cx.state);
  16087. return pass(type == "{" ? statement : expressionNoComma);
  16088. }
  16089. function maybeTarget(noComma) {
  16090. return function(type) {
  16091. if (type == ".") return cont(noComma ? targetNoComma : target);
  16092. else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
  16093. else return pass(noComma ? expressionNoComma : expression);
  16094. };
  16095. }
  16096. function target(_, value) {
  16097. if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
  16098. }
  16099. function targetNoComma(_, value) {
  16100. if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
  16101. }
  16102. function maybelabel(type) {
  16103. if (type == ":") return cont(poplex, statement);
  16104. return pass(maybeoperatorComma, expect(";"), poplex);
  16105. }
  16106. function property(type) {
  16107. if (type == "variable") {cx.marked = "property"; return cont();}
  16108. }
  16109. function objprop(type, value) {
  16110. if (type == "async") {
  16111. cx.marked = "property";
  16112. return cont(objprop);
  16113. } else if (type == "variable" || cx.style == "keyword") {
  16114. cx.marked = "property";
  16115. if (value == "get" || value == "set") return cont(getterSetter);
  16116. var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
  16117. if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
  16118. cx.state.fatArrowAt = cx.stream.pos + m[0].length
  16119. return cont(afterprop);
  16120. } else if (type == "number" || type == "string") {
  16121. cx.marked = jsonldMode ? "property" : (cx.style + " property");
  16122. return cont(afterprop);
  16123. } else if (type == "jsonld-keyword") {
  16124. return cont(afterprop);
  16125. } else if (isTS && isModifier(value)) {
  16126. cx.marked = "keyword"
  16127. return cont(objprop)
  16128. } else if (type == "[") {
  16129. return cont(expression, maybetype, expect("]"), afterprop);
  16130. } else if (type == "spread") {
  16131. return cont(expressionNoComma, afterprop);
  16132. } else if (value == "*") {
  16133. cx.marked = "keyword";
  16134. return cont(objprop);
  16135. } else if (type == ":") {
  16136. return pass(afterprop)
  16137. }
  16138. }
  16139. function getterSetter(type) {
  16140. if (type != "variable") return pass(afterprop);
  16141. cx.marked = "property";
  16142. return cont(functiondef);
  16143. }
  16144. function afterprop(type) {
  16145. if (type == ":") return cont(expressionNoComma);
  16146. if (type == "(") return pass(functiondef);
  16147. }
  16148. function commasep(what, end, sep) {
  16149. function proceed(type, value) {
  16150. if (sep ? sep.indexOf(type) > -1 : type == ",") {
  16151. var lex = cx.state.lexical;
  16152. if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
  16153. return cont(function(type, value) {
  16154. if (type == end || value == end) return pass()
  16155. return pass(what)
  16156. }, proceed);
  16157. }
  16158. if (type == end || value == end) return cont();
  16159. if (sep && sep.indexOf(";") > -1) return pass(what)
  16160. return cont(expect(end));
  16161. }
  16162. return function(type, value) {
  16163. if (type == end || value == end) return cont();
  16164. return pass(what, proceed);
  16165. };
  16166. }
  16167. function contCommasep(what, end, info) {
  16168. for (var i = 3; i < arguments.length; i++)
  16169. cx.cc.push(arguments[i]);
  16170. return cont(pushlex(end, info), commasep(what, end), poplex);
  16171. }
  16172. function block(type) {
  16173. if (type == "}") return cont();
  16174. return pass(statement, block);
  16175. }
  16176. function maybetype(type, value) {
  16177. if (isTS) {
  16178. if (type == ":") return cont(typeexpr);
  16179. if (value == "?") return cont(maybetype);
  16180. }
  16181. }
  16182. function maybetypeOrIn(type, value) {
  16183. if (isTS && (type == ":" || value == "in")) return cont(typeexpr)
  16184. }
  16185. function mayberettype(type) {
  16186. if (isTS && type == ":") {
  16187. if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
  16188. else return cont(typeexpr)
  16189. }
  16190. }
  16191. function isKW(_, value) {
  16192. if (value == "is") {
  16193. cx.marked = "keyword"
  16194. return cont()
  16195. }
  16196. }
  16197. function typeexpr(type, value) {
  16198. if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
  16199. cx.marked = "keyword"
  16200. return cont(value == "typeof" ? expressionNoComma : typeexpr)
  16201. }
  16202. if (type == "variable" || value == "void") {
  16203. cx.marked = "type"
  16204. return cont(afterType)
  16205. }
  16206. if (value == "|" || value == "&") return cont(typeexpr)
  16207. if (type == "string" || type == "number" || type == "atom") return cont(afterType);
  16208. if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
  16209. if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)
  16210. if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
  16211. if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
  16212. }
  16213. function maybeReturnType(type) {
  16214. if (type == "=>") return cont(typeexpr)
  16215. }
  16216. function typeprops(type) {
  16217. if (type.match(/[\}\)\]]/)) return cont()
  16218. if (type == "," || type == ";") return cont(typeprops)
  16219. return pass(typeprop, typeprops)
  16220. }
  16221. function typeprop(type, value) {
  16222. if (type == "variable" || cx.style == "keyword") {
  16223. cx.marked = "property"
  16224. return cont(typeprop)
  16225. } else if (value == "?" || type == "number" || type == "string") {
  16226. return cont(typeprop)
  16227. } else if (type == ":") {
  16228. return cont(typeexpr)
  16229. } else if (type == "[") {
  16230. return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
  16231. } else if (type == "(") {
  16232. return pass(functiondecl, typeprop)
  16233. } else if (!type.match(/[;\}\)\],]/)) {
  16234. return cont()
  16235. }
  16236. }
  16237. function typearg(type, value) {
  16238. if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
  16239. if (type == ":") return cont(typeexpr)
  16240. if (type == "spread") return cont(typearg)
  16241. return pass(typeexpr)
  16242. }
  16243. function afterType(type, value) {
  16244. if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
  16245. if (value == "|" || type == "." || value == "&") return cont(typeexpr)
  16246. if (type == "[") return cont(typeexpr, expect("]"), afterType)
  16247. if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
  16248. if (value == "?") return cont(typeexpr, expect(":"), typeexpr)
  16249. }
  16250. function maybeTypeArgs(_, value) {
  16251. if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
  16252. }
  16253. function typeparam() {
  16254. return pass(typeexpr, maybeTypeDefault)
  16255. }
  16256. function maybeTypeDefault(_, value) {
  16257. if (value == "=") return cont(typeexpr)
  16258. }
  16259. function vardef(_, value) {
  16260. if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
  16261. return pass(pattern, maybetype, maybeAssign, vardefCont);
  16262. }
  16263. function pattern(type, value) {
  16264. if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
  16265. if (type == "variable") { register(value); return cont(); }
  16266. if (type == "spread") return cont(pattern);
  16267. if (type == "[") return contCommasep(eltpattern, "]");
  16268. if (type == "{") return contCommasep(proppattern, "}");
  16269. }
  16270. function proppattern(type, value) {
  16271. if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
  16272. register(value);
  16273. return cont(maybeAssign);
  16274. }
  16275. if (type == "variable") cx.marked = "property";
  16276. if (type == "spread") return cont(pattern);
  16277. if (type == "}") return pass();
  16278. if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
  16279. return cont(expect(":"), pattern, maybeAssign);
  16280. }
  16281. function eltpattern() {
  16282. return pass(pattern, maybeAssign)
  16283. }
  16284. function maybeAssign(_type, value) {
  16285. if (value == "=") return cont(expressionNoComma);
  16286. }
  16287. function vardefCont(type) {
  16288. if (type == ",") return cont(vardef);
  16289. }
  16290. function maybeelse(type, value) {
  16291. if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
  16292. }
  16293. function forspec(type, value) {
  16294. if (value == "await") return cont(forspec);
  16295. if (type == "(") return cont(pushlex(")"), forspec1, poplex);
  16296. }
  16297. function forspec1(type) {
  16298. if (type == "var") return cont(vardef, forspec2);
  16299. if (type == "variable") return cont(forspec2);
  16300. return pass(forspec2)
  16301. }
  16302. function forspec2(type, value) {
  16303. if (type == ")") return cont()
  16304. if (type == ";") return cont(forspec2)
  16305. if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) }
  16306. return pass(expression, forspec2)
  16307. }
  16308. function functiondef(type, value) {
  16309. if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
  16310. if (type == "variable") {register(value); return cont(functiondef);}
  16311. if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
  16312. if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
  16313. }
  16314. function functiondecl(type, value) {
  16315. if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);}
  16316. if (type == "variable") {register(value); return cont(functiondecl);}
  16317. if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
  16318. if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl)
  16319. }
  16320. function typename(type, value) {
  16321. if (type == "keyword" || type == "variable") {
  16322. cx.marked = "type"
  16323. return cont(typename)
  16324. } else if (value == "<") {
  16325. return cont(pushlex(">"), commasep(typeparam, ">"), poplex)
  16326. }
  16327. }
  16328. function funarg(type, value) {
  16329. if (value == "@") cont(expression, funarg)
  16330. if (type == "spread") return cont(funarg);
  16331. if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
  16332. if (isTS && type == "this") return cont(maybetype, maybeAssign)
  16333. return pass(pattern, maybetype, maybeAssign);
  16334. }
  16335. function classExpression(type, value) {
  16336. // Class expressions may have an optional name.
  16337. if (type == "variable") return className(type, value);
  16338. return classNameAfter(type, value);
  16339. }
  16340. function className(type, value) {
  16341. if (type == "variable") {register(value); return cont(classNameAfter);}
  16342. }
  16343. function classNameAfter(type, value) {
  16344. if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
  16345. if (value == "extends" || value == "implements" || (isTS && type == ",")) {
  16346. if (value == "implements") cx.marked = "keyword";
  16347. return cont(isTS ? typeexpr : expression, classNameAfter);
  16348. }
  16349. if (type == "{") return cont(pushlex("}"), classBody, poplex);
  16350. }
  16351. function classBody(type, value) {
  16352. if (type == "async" ||
  16353. (type == "variable" &&
  16354. (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
  16355. cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
  16356. cx.marked = "keyword";
  16357. return cont(classBody);
  16358. }
  16359. if (type == "variable" || cx.style == "keyword") {
  16360. cx.marked = "property";
  16361. return cont(classfield, classBody);
  16362. }
  16363. if (type == "number" || type == "string") return cont(classfield, classBody);
  16364. if (type == "[")
  16365. return cont(expression, maybetype, expect("]"), classfield, classBody)
  16366. if (value == "*") {
  16367. cx.marked = "keyword";
  16368. return cont(classBody);
  16369. }
  16370. if (isTS && type == "(") return pass(functiondecl, classBody)
  16371. if (type == ";" || type == ",") return cont(classBody);
  16372. if (type == "}") return cont();
  16373. if (value == "@") return cont(expression, classBody)
  16374. }
  16375. function classfield(type, value) {
  16376. if (value == "?") return cont(classfield)
  16377. if (type == ":") return cont(typeexpr, maybeAssign)
  16378. if (value == "=") return cont(expressionNoComma)
  16379. var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"
  16380. return pass(isInterface ? functiondecl : functiondef)
  16381. }
  16382. function afterExport(type, value) {
  16383. if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
  16384. if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
  16385. if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
  16386. return pass(statement);
  16387. }
  16388. function exportField(type, value) {
  16389. if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
  16390. if (type == "variable") return pass(expressionNoComma, exportField);
  16391. }
  16392. function afterImport(type) {
  16393. if (type == "string") return cont();
  16394. if (type == "(") return pass(expression);
  16395. if (type == ".") return pass(maybeoperatorComma);
  16396. return pass(importSpec, maybeMoreImports, maybeFrom);
  16397. }
  16398. function importSpec(type, value) {
  16399. if (type == "{") return contCommasep(importSpec, "}");
  16400. if (type == "variable") register(value);
  16401. if (value == "*") cx.marked = "keyword";
  16402. return cont(maybeAs);
  16403. }
  16404. function maybeMoreImports(type) {
  16405. if (type == ",") return cont(importSpec, maybeMoreImports)
  16406. }
  16407. function maybeAs(_type, value) {
  16408. if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
  16409. }
  16410. function maybeFrom(_type, value) {
  16411. if (value == "from") { cx.marked = "keyword"; return cont(expression); }
  16412. }
  16413. function arrayLiteral(type) {
  16414. if (type == "]") return cont();
  16415. return pass(commasep(expressionNoComma, "]"));
  16416. }
  16417. function enumdef() {
  16418. return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
  16419. }
  16420. function enummember() {
  16421. return pass(pattern, maybeAssign);
  16422. }
  16423. function isContinuedStatement(state, textAfter) {
  16424. return state.lastType == "operator" || state.lastType == "," ||
  16425. isOperatorChar.test(textAfter.charAt(0)) ||
  16426. /[,.]/.test(textAfter.charAt(0));
  16427. }
  16428. function expressionAllowed(stream, state, backUp) {
  16429. return state.tokenize == tokenBase &&
  16430. /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
  16431. (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
  16432. }
  16433. // Interface
  16434. return {
  16435. startState: function(basecolumn) {
  16436. var state = {
  16437. tokenize: tokenBase,
  16438. lastType: "sof",
  16439. cc: [],
  16440. lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
  16441. localVars: parserConfig.localVars,
  16442. context: parserConfig.localVars && new Context(null, null, false),
  16443. indented: basecolumn || 0
  16444. };
  16445. if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
  16446. state.globalVars = parserConfig.globalVars;
  16447. return state;
  16448. },
  16449. token: function(stream, state) {
  16450. if (stream.sol()) {
  16451. if (!state.lexical.hasOwnProperty("align"))
  16452. state.lexical.align = false;
  16453. state.indented = stream.indentation();
  16454. findFatArrow(stream, state);
  16455. }
  16456. if (state.tokenize != tokenComment && stream.eatSpace()) return null;
  16457. var style = state.tokenize(stream, state);
  16458. if (type == "comment") return style;
  16459. state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
  16460. return parseJS(state, style, type, content, stream);
  16461. },
  16462. indent: function(state, textAfter) {
  16463. if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
  16464. if (state.tokenize != tokenBase) return 0;
  16465. var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
  16466. // Kludge to prevent 'maybelse' from blocking lexical scope pops
  16467. if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
  16468. var c = state.cc[i];
  16469. if (c == poplex) lexical = lexical.prev;
  16470. else if (c != maybeelse && c != popcontext) break;
  16471. }
  16472. while ((lexical.type == "stat" || lexical.type == "form") &&
  16473. (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
  16474. (top == maybeoperatorComma || top == maybeoperatorNoComma) &&
  16475. !/^[,\.=+\-*:?[\(]/.test(textAfter))))
  16476. lexical = lexical.prev;
  16477. if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
  16478. lexical = lexical.prev;
  16479. var type = lexical.type, closing = firstChar == type;
  16480. if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
  16481. else if (type == "form" && firstChar == "{") return lexical.indented;
  16482. else if (type == "form") return lexical.indented + indentUnit;
  16483. else if (type == "stat")
  16484. return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
  16485. else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
  16486. return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
  16487. else if (lexical.align) return lexical.column + (closing ? 0 : 1);
  16488. else return lexical.indented + (closing ? 0 : indentUnit);
  16489. },
  16490. electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
  16491. blockCommentStart: jsonMode ? null : "/*",
  16492. blockCommentEnd: jsonMode ? null : "*/",
  16493. blockCommentContinue: jsonMode ? null : " * ",
  16494. lineComment: jsonMode ? null : "//",
  16495. fold: "brace",
  16496. closeBrackets: "()[]{}''\"\"``",
  16497. helperType: jsonMode ? "json" : "javascript",
  16498. jsonldMode: jsonldMode,
  16499. jsonMode: jsonMode,
  16500. expressionAllowed: expressionAllowed,
  16501. skipExpression: function(state) {
  16502. var top = state.cc[state.cc.length - 1]
  16503. if (top == expression || top == expressionNoComma) state.cc.pop()
  16504. }
  16505. };
  16506. });
  16507. CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
  16508. CodeMirror.defineMIME("text/javascript", "javascript");
  16509. CodeMirror.defineMIME("text/ecmascript", "javascript");
  16510. CodeMirror.defineMIME("application/javascript", "javascript");
  16511. CodeMirror.defineMIME("application/x-javascript", "javascript");
  16512. CodeMirror.defineMIME("application/ecmascript", "javascript");
  16513. CodeMirror.defineMIME("application/json", { name: "javascript", json: true });
  16514. CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true });
  16515. CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true })
  16516. CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true });
  16517. CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
  16518. CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
  16519. });
  16520. /***/ }),
  16521. /***/ 49047:
  16522. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  16523. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  16524. // Distributed under an MIT license: https://codemirror.net/LICENSE
  16525. (function(mod) {
  16526. if (true) // CommonJS
  16527. mod(__webpack_require__(4631), __webpack_require__(29589), __webpack_require__(52539));
  16528. else {}
  16529. })(function(CodeMirror) {
  16530. "use strict";
  16531. CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
  16532. var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
  16533. var htmlModeMissing = htmlMode.name == "null"
  16534. function getMode(name) {
  16535. if (CodeMirror.findModeByName) {
  16536. var found = CodeMirror.findModeByName(name);
  16537. if (found) name = found.mime || found.mimes[0];
  16538. }
  16539. var mode = CodeMirror.getMode(cmCfg, name);
  16540. return mode.name == "null" ? null : mode;
  16541. }
  16542. // Should characters that affect highlighting be highlighted separate?
  16543. // Does not include characters that will be output (such as `1.` and `-` for lists)
  16544. if (modeCfg.highlightFormatting === undefined)
  16545. modeCfg.highlightFormatting = false;
  16546. // Maximum number of nested blockquotes. Set to 0 for infinite nesting.
  16547. // Excess `>` will emit `error` token.
  16548. if (modeCfg.maxBlockquoteDepth === undefined)
  16549. modeCfg.maxBlockquoteDepth = 0;
  16550. // Turn on task lists? ("- [ ] " and "- [x] ")
  16551. if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
  16552. // Turn on strikethrough syntax
  16553. if (modeCfg.strikethrough === undefined)
  16554. modeCfg.strikethrough = false;
  16555. if (modeCfg.emoji === undefined)
  16556. modeCfg.emoji = false;
  16557. if (modeCfg.fencedCodeBlockHighlighting === undefined)
  16558. modeCfg.fencedCodeBlockHighlighting = true;
  16559. if (modeCfg.fencedCodeBlockDefaultMode === undefined)
  16560. modeCfg.fencedCodeBlockDefaultMode = 'text/plain';
  16561. if (modeCfg.xml === undefined)
  16562. modeCfg.xml = true;
  16563. // Allow token types to be overridden by user-provided token types.
  16564. if (modeCfg.tokenTypeOverrides === undefined)
  16565. modeCfg.tokenTypeOverrides = {};
  16566. var tokenTypes = {
  16567. header: "header",
  16568. code: "comment",
  16569. quote: "quote",
  16570. list1: "variable-2",
  16571. list2: "variable-3",
  16572. list3: "keyword",
  16573. hr: "hr",
  16574. image: "image",
  16575. imageAltText: "image-alt-text",
  16576. imageMarker: "image-marker",
  16577. formatting: "formatting",
  16578. linkInline: "link",
  16579. linkEmail: "link",
  16580. linkText: "link",
  16581. linkHref: "string",
  16582. em: "em",
  16583. strong: "strong",
  16584. strikethrough: "strikethrough",
  16585. emoji: "builtin"
  16586. };
  16587. for (var tokenType in tokenTypes) {
  16588. if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
  16589. tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
  16590. }
  16591. }
  16592. var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
  16593. , listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
  16594. , taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
  16595. , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
  16596. , setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/
  16597. , textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
  16598. , fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/
  16599. , linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
  16600. , punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
  16601. , expandedTab = " " // CommonMark specifies tab as 4 spaces
  16602. function switchInline(stream, state, f) {
  16603. state.f = state.inline = f;
  16604. return f(stream, state);
  16605. }
  16606. function switchBlock(stream, state, f) {
  16607. state.f = state.block = f;
  16608. return f(stream, state);
  16609. }
  16610. function lineIsEmpty(line) {
  16611. return !line || !/\S/.test(line.string)
  16612. }
  16613. // Blocks
  16614. function blankLine(state) {
  16615. // Reset linkTitle state
  16616. state.linkTitle = false;
  16617. state.linkHref = false;
  16618. state.linkText = false;
  16619. // Reset EM state
  16620. state.em = false;
  16621. // Reset STRONG state
  16622. state.strong = false;
  16623. // Reset strikethrough state
  16624. state.strikethrough = false;
  16625. // Reset state.quote
  16626. state.quote = 0;
  16627. // Reset state.indentedCode
  16628. state.indentedCode = false;
  16629. if (state.f == htmlBlock) {
  16630. var exit = htmlModeMissing
  16631. if (!exit) {
  16632. var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
  16633. exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
  16634. (!inner.state.context && inner.state.tokenize.isInText)
  16635. }
  16636. if (exit) {
  16637. state.f = inlineNormal;
  16638. state.block = blockNormal;
  16639. state.htmlState = null;
  16640. }
  16641. }
  16642. // Reset state.trailingSpace
  16643. state.trailingSpace = 0;
  16644. state.trailingSpaceNewLine = false;
  16645. // Mark this line as blank
  16646. state.prevLine = state.thisLine
  16647. state.thisLine = {stream: null}
  16648. return null;
  16649. }
  16650. function blockNormal(stream, state) {
  16651. var firstTokenOnLine = stream.column() === state.indentation;
  16652. var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
  16653. var prevLineIsIndentedCode = state.indentedCode;
  16654. var prevLineIsHr = state.prevLine.hr;
  16655. var prevLineIsList = state.list !== false;
  16656. var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
  16657. state.indentedCode = false;
  16658. var lineIndentation = state.indentation;
  16659. // compute once per line (on first token)
  16660. if (state.indentationDiff === null) {
  16661. state.indentationDiff = state.indentation;
  16662. if (prevLineIsList) {
  16663. state.list = null;
  16664. // While this list item's marker's indentation is less than the deepest
  16665. // list item's content's indentation,pop the deepest list item
  16666. // indentation off the stack, and update block indentation state
  16667. while (lineIndentation < state.listStack[state.listStack.length - 1]) {
  16668. state.listStack.pop();
  16669. if (state.listStack.length) {
  16670. state.indentation = state.listStack[state.listStack.length - 1];
  16671. // less than the first list's indent -> the line is no longer a list
  16672. } else {
  16673. state.list = false;
  16674. }
  16675. }
  16676. if (state.list !== false) {
  16677. state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
  16678. }
  16679. }
  16680. }
  16681. // not comprehensive (currently only for setext detection purposes)
  16682. var allowsInlineContinuation = (
  16683. !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
  16684. (!prevLineIsList || !prevLineIsIndentedCode) &&
  16685. !state.prevLine.fencedCodeEnd
  16686. );
  16687. var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
  16688. state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
  16689. var match = null;
  16690. if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
  16691. state.prevLine.header || prevLineLineIsEmpty)) {
  16692. stream.skipToEnd();
  16693. state.indentedCode = true;
  16694. return tokenTypes.code;
  16695. } else if (stream.eatSpace()) {
  16696. return null;
  16697. } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
  16698. state.quote = 0;
  16699. state.header = match[1].length;
  16700. state.thisLine.header = true;
  16701. if (modeCfg.highlightFormatting) state.formatting = "header";
  16702. state.f = state.inline;
  16703. return getType(state);
  16704. } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
  16705. state.quote = firstTokenOnLine ? 1 : state.quote + 1;
  16706. if (modeCfg.highlightFormatting) state.formatting = "quote";
  16707. stream.eatSpace();
  16708. return getType(state);
  16709. } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
  16710. var listType = match[1] ? "ol" : "ul";
  16711. state.indentation = lineIndentation + stream.current().length;
  16712. state.list = true;
  16713. state.quote = 0;
  16714. // Add this list item's content's indentation to the stack
  16715. state.listStack.push(state.indentation);
  16716. // Reset inline styles which shouldn't propagate across list items
  16717. state.em = false;
  16718. state.strong = false;
  16719. state.code = false;
  16720. state.strikethrough = false;
  16721. if (modeCfg.taskLists && stream.match(taskListRE, false)) {
  16722. state.taskList = true;
  16723. }
  16724. state.f = state.inline;
  16725. if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
  16726. return getType(state);
  16727. } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
  16728. state.quote = 0;
  16729. state.fencedEndRE = new RegExp(match[1] + "+ *$");
  16730. // try switching mode
  16731. state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );
  16732. if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
  16733. state.f = state.block = local;
  16734. if (modeCfg.highlightFormatting) state.formatting = "code-block";
  16735. state.code = -1
  16736. return getType(state);
  16737. // SETEXT has lowest block-scope precedence after HR, so check it after
  16738. // the others (code, blockquote, list...)
  16739. } else if (
  16740. // if setext set, indicates line after ---/===
  16741. state.setext || (
  16742. // line before ---/===
  16743. (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
  16744. !state.code && !isHr && !linkDefRE.test(stream.string) &&
  16745. (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
  16746. )
  16747. ) {
  16748. if ( !state.setext ) {
  16749. state.header = match[0].charAt(0) == '=' ? 1 : 2;
  16750. state.setext = state.header;
  16751. } else {
  16752. state.header = state.setext;
  16753. // has no effect on type so we can reset it now
  16754. state.setext = 0;
  16755. stream.skipToEnd();
  16756. if (modeCfg.highlightFormatting) state.formatting = "header";
  16757. }
  16758. state.thisLine.header = true;
  16759. state.f = state.inline;
  16760. return getType(state);
  16761. } else if (isHr) {
  16762. stream.skipToEnd();
  16763. state.hr = true;
  16764. state.thisLine.hr = true;
  16765. return tokenTypes.hr;
  16766. } else if (stream.peek() === '[') {
  16767. return switchInline(stream, state, footnoteLink);
  16768. }
  16769. return switchInline(stream, state, state.inline);
  16770. }
  16771. function htmlBlock(stream, state) {
  16772. var style = htmlMode.token(stream, state.htmlState);
  16773. if (!htmlModeMissing) {
  16774. var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
  16775. if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
  16776. (!inner.state.context && inner.state.tokenize.isInText)) ||
  16777. (state.md_inside && stream.current().indexOf(">") > -1)) {
  16778. state.f = inlineNormal;
  16779. state.block = blockNormal;
  16780. state.htmlState = null;
  16781. }
  16782. }
  16783. return style;
  16784. }
  16785. function local(stream, state) {
  16786. var currListInd = state.listStack[state.listStack.length - 1] || 0;
  16787. var hasExitedList = state.indentation < currListInd;
  16788. var maxFencedEndInd = currListInd + 3;
  16789. if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
  16790. if (modeCfg.highlightFormatting) state.formatting = "code-block";
  16791. var returnType;
  16792. if (!hasExitedList) returnType = getType(state)
  16793. state.localMode = state.localState = null;
  16794. state.block = blockNormal;
  16795. state.f = inlineNormal;
  16796. state.fencedEndRE = null;
  16797. state.code = 0
  16798. state.thisLine.fencedCodeEnd = true;
  16799. if (hasExitedList) return switchBlock(stream, state, state.block);
  16800. return returnType;
  16801. } else if (state.localMode) {
  16802. return state.localMode.token(stream, state.localState);
  16803. } else {
  16804. stream.skipToEnd();
  16805. return tokenTypes.code;
  16806. }
  16807. }
  16808. // Inline
  16809. function getType(state) {
  16810. var styles = [];
  16811. if (state.formatting) {
  16812. styles.push(tokenTypes.formatting);
  16813. if (typeof state.formatting === "string") state.formatting = [state.formatting];
  16814. for (var i = 0; i < state.formatting.length; i++) {
  16815. styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
  16816. if (state.formatting[i] === "header") {
  16817. styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
  16818. }
  16819. // Add `formatting-quote` and `formatting-quote-#` for blockquotes
  16820. // Add `error` instead if the maximum blockquote nesting depth is passed
  16821. if (state.formatting[i] === "quote") {
  16822. if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
  16823. styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
  16824. } else {
  16825. styles.push("error");
  16826. }
  16827. }
  16828. }
  16829. }
  16830. if (state.taskOpen) {
  16831. styles.push("meta");
  16832. return styles.length ? styles.join(' ') : null;
  16833. }
  16834. if (state.taskClosed) {
  16835. styles.push("property");
  16836. return styles.length ? styles.join(' ') : null;
  16837. }
  16838. if (state.linkHref) {
  16839. styles.push(tokenTypes.linkHref, "url");
  16840. } else { // Only apply inline styles to non-url text
  16841. if (state.strong) { styles.push(tokenTypes.strong); }
  16842. if (state.em) { styles.push(tokenTypes.em); }
  16843. if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
  16844. if (state.emoji) { styles.push(tokenTypes.emoji); }
  16845. if (state.linkText) { styles.push(tokenTypes.linkText); }
  16846. if (state.code) { styles.push(tokenTypes.code); }
  16847. if (state.image) { styles.push(tokenTypes.image); }
  16848. if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
  16849. if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
  16850. }
  16851. if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
  16852. if (state.quote) {
  16853. styles.push(tokenTypes.quote);
  16854. // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
  16855. if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
  16856. styles.push(tokenTypes.quote + "-" + state.quote);
  16857. } else {
  16858. styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
  16859. }
  16860. }
  16861. if (state.list !== false) {
  16862. var listMod = (state.listStack.length - 1) % 3;
  16863. if (!listMod) {
  16864. styles.push(tokenTypes.list1);
  16865. } else if (listMod === 1) {
  16866. styles.push(tokenTypes.list2);
  16867. } else {
  16868. styles.push(tokenTypes.list3);
  16869. }
  16870. }
  16871. if (state.trailingSpaceNewLine) {
  16872. styles.push("trailing-space-new-line");
  16873. } else if (state.trailingSpace) {
  16874. styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
  16875. }
  16876. return styles.length ? styles.join(' ') : null;
  16877. }
  16878. function handleText(stream, state) {
  16879. if (stream.match(textRE, true)) {
  16880. return getType(state);
  16881. }
  16882. return undefined;
  16883. }
  16884. function inlineNormal(stream, state) {
  16885. var style = state.text(stream, state);
  16886. if (typeof style !== 'undefined')
  16887. return style;
  16888. if (state.list) { // List marker (*, +, -, 1., etc)
  16889. state.list = null;
  16890. return getType(state);
  16891. }
  16892. if (state.taskList) {
  16893. var taskOpen = stream.match(taskListRE, true)[1] === " ";
  16894. if (taskOpen) state.taskOpen = true;
  16895. else state.taskClosed = true;
  16896. if (modeCfg.highlightFormatting) state.formatting = "task";
  16897. state.taskList = false;
  16898. return getType(state);
  16899. }
  16900. state.taskOpen = false;
  16901. state.taskClosed = false;
  16902. if (state.header && stream.match(/^#+$/, true)) {
  16903. if (modeCfg.highlightFormatting) state.formatting = "header";
  16904. return getType(state);
  16905. }
  16906. var ch = stream.next();
  16907. // Matches link titles present on next line
  16908. if (state.linkTitle) {
  16909. state.linkTitle = false;
  16910. var matchCh = ch;
  16911. if (ch === '(') {
  16912. matchCh = ')';
  16913. }
  16914. matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
  16915. var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
  16916. if (stream.match(new RegExp(regex), true)) {
  16917. return tokenTypes.linkHref;
  16918. }
  16919. }
  16920. // If this block is changed, it may need to be updated in GFM mode
  16921. if (ch === '`') {
  16922. var previousFormatting = state.formatting;
  16923. if (modeCfg.highlightFormatting) state.formatting = "code";
  16924. stream.eatWhile('`');
  16925. var count = stream.current().length
  16926. if (state.code == 0 && (!state.quote || count == 1)) {
  16927. state.code = count
  16928. return getType(state)
  16929. } else if (count == state.code) { // Must be exact
  16930. var t = getType(state)
  16931. state.code = 0
  16932. return t
  16933. } else {
  16934. state.formatting = previousFormatting
  16935. return getType(state)
  16936. }
  16937. } else if (state.code) {
  16938. return getType(state);
  16939. }
  16940. if (ch === '\\') {
  16941. stream.next();
  16942. if (modeCfg.highlightFormatting) {
  16943. var type = getType(state);
  16944. var formattingEscape = tokenTypes.formatting + "-escape";
  16945. return type ? type + " " + formattingEscape : formattingEscape;
  16946. }
  16947. }
  16948. if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
  16949. state.imageMarker = true;
  16950. state.image = true;
  16951. if (modeCfg.highlightFormatting) state.formatting = "image";
  16952. return getType(state);
  16953. }
  16954. if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
  16955. state.imageMarker = false;
  16956. state.imageAltText = true
  16957. if (modeCfg.highlightFormatting) state.formatting = "image";
  16958. return getType(state);
  16959. }
  16960. if (ch === ']' && state.imageAltText) {
  16961. if (modeCfg.highlightFormatting) state.formatting = "image";
  16962. var type = getType(state);
  16963. state.imageAltText = false;
  16964. state.image = false;
  16965. state.inline = state.f = linkHref;
  16966. return type;
  16967. }
  16968. if (ch === '[' && !state.image) {
  16969. if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
  16970. state.linkText = true;
  16971. if (modeCfg.highlightFormatting) state.formatting = "link";
  16972. return getType(state);
  16973. }
  16974. if (ch === ']' && state.linkText) {
  16975. if (modeCfg.highlightFormatting) state.formatting = "link";
  16976. var type = getType(state);
  16977. state.linkText = false;
  16978. state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
  16979. return type;
  16980. }
  16981. if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
  16982. state.f = state.inline = linkInline;
  16983. if (modeCfg.highlightFormatting) state.formatting = "link";
  16984. var type = getType(state);
  16985. if (type){
  16986. type += " ";
  16987. } else {
  16988. type = "";
  16989. }
  16990. return type + tokenTypes.linkInline;
  16991. }
  16992. if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
  16993. state.f = state.inline = linkInline;
  16994. if (modeCfg.highlightFormatting) state.formatting = "link";
  16995. var type = getType(state);
  16996. if (type){
  16997. type += " ";
  16998. } else {
  16999. type = "";
  17000. }
  17001. return type + tokenTypes.linkEmail;
  17002. }
  17003. if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
  17004. var end = stream.string.indexOf(">", stream.pos);
  17005. if (end != -1) {
  17006. var atts = stream.string.substring(stream.start, end);
  17007. if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
  17008. }
  17009. stream.backUp(1);
  17010. state.htmlState = CodeMirror.startState(htmlMode);
  17011. return switchBlock(stream, state, htmlBlock);
  17012. }
  17013. if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
  17014. state.md_inside = false;
  17015. return "tag";
  17016. } else if (ch === "*" || ch === "_") {
  17017. var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
  17018. while (len < 3 && stream.eat(ch)) len++
  17019. var after = stream.peek() || " "
  17020. // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
  17021. var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
  17022. var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
  17023. var setEm = null, setStrong = null
  17024. if (len % 2) { // Em
  17025. if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
  17026. setEm = true
  17027. else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
  17028. setEm = false
  17029. }
  17030. if (len > 1) { // Strong
  17031. if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
  17032. setStrong = true
  17033. else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
  17034. setStrong = false
  17035. }
  17036. if (setStrong != null || setEm != null) {
  17037. if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
  17038. if (setEm === true) state.em = ch
  17039. if (setStrong === true) state.strong = ch
  17040. var t = getType(state)
  17041. if (setEm === false) state.em = false
  17042. if (setStrong === false) state.strong = false
  17043. return t
  17044. }
  17045. } else if (ch === ' ') {
  17046. if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
  17047. if (stream.peek() === ' ') { // Surrounded by spaces, ignore
  17048. return getType(state);
  17049. } else { // Not surrounded by spaces, back up pointer
  17050. stream.backUp(1);
  17051. }
  17052. }
  17053. }
  17054. if (modeCfg.strikethrough) {
  17055. if (ch === '~' && stream.eatWhile(ch)) {
  17056. if (state.strikethrough) {// Remove strikethrough
  17057. if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
  17058. var t = getType(state);
  17059. state.strikethrough = false;
  17060. return t;
  17061. } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
  17062. state.strikethrough = true;
  17063. if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
  17064. return getType(state);
  17065. }
  17066. } else if (ch === ' ') {
  17067. if (stream.match('~~', true)) { // Probably surrounded by space
  17068. if (stream.peek() === ' ') { // Surrounded by spaces, ignore
  17069. return getType(state);
  17070. } else { // Not surrounded by spaces, back up pointer
  17071. stream.backUp(2);
  17072. }
  17073. }
  17074. }
  17075. }
  17076. if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
  17077. state.emoji = true;
  17078. if (modeCfg.highlightFormatting) state.formatting = "emoji";
  17079. var retType = getType(state);
  17080. state.emoji = false;
  17081. return retType;
  17082. }
  17083. if (ch === ' ') {
  17084. if (stream.match(/^ +$/, false)) {
  17085. state.trailingSpace++;
  17086. } else if (state.trailingSpace) {
  17087. state.trailingSpaceNewLine = true;
  17088. }
  17089. }
  17090. return getType(state);
  17091. }
  17092. function linkInline(stream, state) {
  17093. var ch = stream.next();
  17094. if (ch === ">") {
  17095. state.f = state.inline = inlineNormal;
  17096. if (modeCfg.highlightFormatting) state.formatting = "link";
  17097. var type = getType(state);
  17098. if (type){
  17099. type += " ";
  17100. } else {
  17101. type = "";
  17102. }
  17103. return type + tokenTypes.linkInline;
  17104. }
  17105. stream.match(/^[^>]+/, true);
  17106. return tokenTypes.linkInline;
  17107. }
  17108. function linkHref(stream, state) {
  17109. // Check if space, and return NULL if so (to avoid marking the space)
  17110. if(stream.eatSpace()){
  17111. return null;
  17112. }
  17113. var ch = stream.next();
  17114. if (ch === '(' || ch === '[') {
  17115. state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
  17116. if (modeCfg.highlightFormatting) state.formatting = "link-string";
  17117. state.linkHref = true;
  17118. return getType(state);
  17119. }
  17120. return 'error';
  17121. }
  17122. var linkRE = {
  17123. ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
  17124. "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
  17125. }
  17126. function getLinkHrefInside(endChar) {
  17127. return function(stream, state) {
  17128. var ch = stream.next();
  17129. if (ch === endChar) {
  17130. state.f = state.inline = inlineNormal;
  17131. if (modeCfg.highlightFormatting) state.formatting = "link-string";
  17132. var returnState = getType(state);
  17133. state.linkHref = false;
  17134. return returnState;
  17135. }
  17136. stream.match(linkRE[endChar])
  17137. state.linkHref = true;
  17138. return getType(state);
  17139. };
  17140. }
  17141. function footnoteLink(stream, state) {
  17142. if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
  17143. state.f = footnoteLinkInside;
  17144. stream.next(); // Consume [
  17145. if (modeCfg.highlightFormatting) state.formatting = "link";
  17146. state.linkText = true;
  17147. return getType(state);
  17148. }
  17149. return switchInline(stream, state, inlineNormal);
  17150. }
  17151. function footnoteLinkInside(stream, state) {
  17152. if (stream.match(']:', true)) {
  17153. state.f = state.inline = footnoteUrl;
  17154. if (modeCfg.highlightFormatting) state.formatting = "link";
  17155. var returnType = getType(state);
  17156. state.linkText = false;
  17157. return returnType;
  17158. }
  17159. stream.match(/^([^\]\\]|\\.)+/, true);
  17160. return tokenTypes.linkText;
  17161. }
  17162. function footnoteUrl(stream, state) {
  17163. // Check if space, and return NULL if so (to avoid marking the space)
  17164. if(stream.eatSpace()){
  17165. return null;
  17166. }
  17167. // Match URL
  17168. stream.match(/^[^\s]+/, true);
  17169. // Check for link title
  17170. if (stream.peek() === undefined) { // End of line, set flag to check next line
  17171. state.linkTitle = true;
  17172. } else { // More content on line, check if link title
  17173. stream.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, true);
  17174. }
  17175. state.f = state.inline = inlineNormal;
  17176. return tokenTypes.linkHref + " url";
  17177. }
  17178. var mode = {
  17179. startState: function() {
  17180. return {
  17181. f: blockNormal,
  17182. prevLine: {stream: null},
  17183. thisLine: {stream: null},
  17184. block: blockNormal,
  17185. htmlState: null,
  17186. indentation: 0,
  17187. inline: inlineNormal,
  17188. text: handleText,
  17189. formatting: false,
  17190. linkText: false,
  17191. linkHref: false,
  17192. linkTitle: false,
  17193. code: 0,
  17194. em: false,
  17195. strong: false,
  17196. header: 0,
  17197. setext: 0,
  17198. hr: false,
  17199. taskList: false,
  17200. list: false,
  17201. listStack: [],
  17202. quote: 0,
  17203. trailingSpace: 0,
  17204. trailingSpaceNewLine: false,
  17205. strikethrough: false,
  17206. emoji: false,
  17207. fencedEndRE: null
  17208. };
  17209. },
  17210. copyState: function(s) {
  17211. return {
  17212. f: s.f,
  17213. prevLine: s.prevLine,
  17214. thisLine: s.thisLine,
  17215. block: s.block,
  17216. htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
  17217. indentation: s.indentation,
  17218. localMode: s.localMode,
  17219. localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
  17220. inline: s.inline,
  17221. text: s.text,
  17222. formatting: false,
  17223. linkText: s.linkText,
  17224. linkTitle: s.linkTitle,
  17225. linkHref: s.linkHref,
  17226. code: s.code,
  17227. em: s.em,
  17228. strong: s.strong,
  17229. strikethrough: s.strikethrough,
  17230. emoji: s.emoji,
  17231. header: s.header,
  17232. setext: s.setext,
  17233. hr: s.hr,
  17234. taskList: s.taskList,
  17235. list: s.list,
  17236. listStack: s.listStack.slice(0),
  17237. quote: s.quote,
  17238. indentedCode: s.indentedCode,
  17239. trailingSpace: s.trailingSpace,
  17240. trailingSpaceNewLine: s.trailingSpaceNewLine,
  17241. md_inside: s.md_inside,
  17242. fencedEndRE: s.fencedEndRE
  17243. };
  17244. },
  17245. token: function(stream, state) {
  17246. // Reset state.formatting
  17247. state.formatting = false;
  17248. if (stream != state.thisLine.stream) {
  17249. state.header = 0;
  17250. state.hr = false;
  17251. if (stream.match(/^\s*$/, true)) {
  17252. blankLine(state);
  17253. return null;
  17254. }
  17255. state.prevLine = state.thisLine
  17256. state.thisLine = {stream: stream}
  17257. // Reset state.taskList
  17258. state.taskList = false;
  17259. // Reset state.trailingSpace
  17260. state.trailingSpace = 0;
  17261. state.trailingSpaceNewLine = false;
  17262. if (!state.localState) {
  17263. state.f = state.block;
  17264. if (state.f != htmlBlock) {
  17265. var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
  17266. state.indentation = indentation;
  17267. state.indentationDiff = null;
  17268. if (indentation > 0) return null;
  17269. }
  17270. }
  17271. }
  17272. return state.f(stream, state);
  17273. },
  17274. innerMode: function(state) {
  17275. if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
  17276. if (state.localState) return {state: state.localState, mode: state.localMode};
  17277. return {state: state, mode: mode};
  17278. },
  17279. indent: function(state, textAfter, line) {
  17280. if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
  17281. if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
  17282. return CodeMirror.Pass
  17283. },
  17284. blankLine: blankLine,
  17285. getType: getType,
  17286. blockCommentStart: "<!--",
  17287. blockCommentEnd: "-->",
  17288. closeBrackets: "()[]{}''\"\"``",
  17289. fold: "markdown"
  17290. };
  17291. return mode;
  17292. }, "xml");
  17293. CodeMirror.defineMIME("text/markdown", "markdown");
  17294. CodeMirror.defineMIME("text/x-markdown", "markdown");
  17295. });
  17296. /***/ }),
  17297. /***/ 52539:
  17298. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  17299. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  17300. // Distributed under an MIT license: https://codemirror.net/LICENSE
  17301. (function(mod) {
  17302. if (true) // CommonJS
  17303. mod(__webpack_require__(4631));
  17304. else {}
  17305. })(function(CodeMirror) {
  17306. "use strict";
  17307. CodeMirror.modeInfo = [
  17308. {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
  17309. {name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]},
  17310. {name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
  17311. {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
  17312. {name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
  17313. {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
  17314. {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
  17315. {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
  17316. {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},
  17317. {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
  17318. {name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
  17319. {name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
  17320. {name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/},
  17321. {name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
  17322. {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
  17323. {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
  17324. {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
  17325. {name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},
  17326. {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
  17327. {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
  17328. {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
  17329. {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
  17330. {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
  17331. {name: "Django", mime: "text/x-django", mode: "django"},
  17332. {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},
  17333. {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
  17334. {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
  17335. {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
  17336. {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
  17337. {name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
  17338. {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
  17339. {name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
  17340. {name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
  17341. {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
  17342. {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
  17343. {name: "Esper", mime: "text/x-esper", mode: "sql"},
  17344. {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
  17345. {name: "FCL", mime: "text/x-fcl", mode: "fcl"},
  17346. {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
  17347. {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]},
  17348. {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
  17349. {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
  17350. {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
  17351. {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i},
  17352. {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
  17353. {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/},
  17354. {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
  17355. {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
  17356. {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
  17357. {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
  17358. {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
  17359. {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
  17360. {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]},
  17361. {name: "HTTP", mime: "message/http", mode: "http"},
  17362. {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
  17363. {name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]},
  17364. {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
  17365. {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
  17366. {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
  17367. mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
  17368. {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
  17369. {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
  17370. {name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
  17371. {name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},
  17372. {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"]},
  17373. {name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
  17374. {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
  17375. {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
  17376. {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
  17377. {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
  17378. {name: "mIRC", mime: "text/mirc", mode: "mirc"},
  17379. {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
  17380. {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]},
  17381. {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
  17382. {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},
  17383. {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
  17384. {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},
  17385. {name: "MySQL", mime: "text/x-mysql", mode: "sql"},
  17386. {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
  17387. {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},
  17388. {name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],
  17389. mode: "ntriples", ext: ["nt", "nq"]},
  17390. {name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]},
  17391. {name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]},
  17392. {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
  17393. {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
  17394. {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},
  17395. {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
  17396. {name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},
  17397. {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
  17398. {name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]},
  17399. {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
  17400. {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
  17401. {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
  17402. {name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"},
  17403. {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
  17404. {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
  17405. {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
  17406. {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},
  17407. {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
  17408. {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
  17409. {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]},
  17410. {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
  17411. {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
  17412. {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
  17413. {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
  17414. {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
  17415. {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},
  17416. {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
  17417. {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
  17418. {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
  17419. {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
  17420. {name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},
  17421. {name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},
  17422. {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},
  17423. {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
  17424. {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
  17425. {name: "Solr", mime: "text/x-solr", mode: "solr"},
  17426. {name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]},
  17427. {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
  17428. {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
  17429. {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
  17430. {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
  17431. {name: "SQLite", mime: "text/x-sqlite", mode: "sql"},
  17432. {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
  17433. {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]},
  17434. {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
  17435. {name: "sTeX", mime: "text/x-stex", mode: "stex"},
  17436. {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]},
  17437. {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]},
  17438. {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
  17439. {name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
  17440. {name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
  17441. {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
  17442. {name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
  17443. {name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
  17444. {name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},
  17445. {name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},
  17446. {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},
  17447. {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
  17448. {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
  17449. {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]},
  17450. {name: "Twig", mime: "text/x-twig", mode: "twig"},
  17451. {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},
  17452. {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
  17453. {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},
  17454. {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
  17455. {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
  17456. {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},
  17457. {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]},
  17458. {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]},
  17459. {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
  17460. {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},
  17461. {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},
  17462. {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
  17463. {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
  17464. {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
  17465. {name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]},
  17466. {name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]},
  17467. ];
  17468. // Ensure all modes have a mime property for backwards compatibility
  17469. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17470. var info = CodeMirror.modeInfo[i];
  17471. if (info.mimes) info.mime = info.mimes[0];
  17472. }
  17473. CodeMirror.findModeByMIME = function(mime) {
  17474. mime = mime.toLowerCase();
  17475. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17476. var info = CodeMirror.modeInfo[i];
  17477. if (info.mime == mime) return info;
  17478. if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
  17479. if (info.mimes[j] == mime) return info;
  17480. }
  17481. if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml")
  17482. if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json")
  17483. };
  17484. CodeMirror.findModeByExtension = function(ext) {
  17485. ext = ext.toLowerCase();
  17486. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17487. var info = CodeMirror.modeInfo[i];
  17488. if (info.ext) for (var j = 0; j < info.ext.length; j++)
  17489. if (info.ext[j] == ext) return info;
  17490. }
  17491. };
  17492. CodeMirror.findModeByFileName = function(filename) {
  17493. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17494. var info = CodeMirror.modeInfo[i];
  17495. if (info.file && info.file.test(filename)) return info;
  17496. }
  17497. var dot = filename.lastIndexOf(".");
  17498. var ext = dot > -1 && filename.substring(dot + 1, filename.length);
  17499. if (ext) return CodeMirror.findModeByExtension(ext);
  17500. };
  17501. CodeMirror.findModeByName = function(name) {
  17502. name = name.toLowerCase();
  17503. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17504. var info = CodeMirror.modeInfo[i];
  17505. if (info.name.toLowerCase() == name) return info;
  17506. if (info.alias) for (var j = 0; j < info.alias.length; j++)
  17507. if (info.alias[j].toLowerCase() == name) return info;
  17508. }
  17509. };
  17510. });
  17511. /***/ }),
  17512. /***/ 36702:
  17513. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  17514. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  17515. // Distributed under an MIT license: https://codemirror.net/LICENSE
  17516. (function(mod) {
  17517. if (true) // CommonJS
  17518. mod(__webpack_require__(4631), __webpack_require__(16531), __webpack_require__(99762));
  17519. else {}
  17520. })(function(CodeMirror) {
  17521. "use strict";
  17522. function keywords(str) {
  17523. var obj = {}, words = str.split(" ");
  17524. for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
  17525. return obj;
  17526. }
  17527. // Helper for phpString
  17528. function matchSequence(list, end, escapes) {
  17529. if (list.length == 0) return phpString(end);
  17530. return function (stream, state) {
  17531. var patterns = list[0];
  17532. for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {
  17533. state.tokenize = matchSequence(list.slice(1), end);
  17534. return patterns[i][1];
  17535. }
  17536. state.tokenize = phpString(end, escapes);
  17537. return "string";
  17538. };
  17539. }
  17540. function phpString(closing, escapes) {
  17541. return function(stream, state) { return phpString_(stream, state, closing, escapes); };
  17542. }
  17543. function phpString_(stream, state, closing, escapes) {
  17544. // "Complex" syntax
  17545. if (escapes !== false && stream.match("${", false) || stream.match("{$", false)) {
  17546. state.tokenize = null;
  17547. return "string";
  17548. }
  17549. // Simple syntax
  17550. if (escapes !== false && stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) {
  17551. // After the variable name there may appear array or object operator.
  17552. if (stream.match("[", false)) {
  17553. // Match array operator
  17554. state.tokenize = matchSequence([
  17555. [["[", null]],
  17556. [[/\d[\w\.]*/, "number"],
  17557. [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],
  17558. [/[\w\$]+/, "variable"]],
  17559. [["]", null]]
  17560. ], closing, escapes);
  17561. }
  17562. if (stream.match(/^->\w/, false)) {
  17563. // Match object operator
  17564. state.tokenize = matchSequence([
  17565. [["->", null]],
  17566. [[/[\w]+/, "variable"]]
  17567. ], closing, escapes);
  17568. }
  17569. return "variable-2";
  17570. }
  17571. var escaped = false;
  17572. // Normal string
  17573. while (!stream.eol() &&
  17574. (escaped || escapes === false ||
  17575. (!stream.match("{$", false) &&
  17576. !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) {
  17577. if (!escaped && stream.match(closing)) {
  17578. state.tokenize = null;
  17579. state.tokStack.pop(); state.tokStack.pop();
  17580. break;
  17581. }
  17582. escaped = stream.next() == "\\" && !escaped;
  17583. }
  17584. return "string";
  17585. }
  17586. var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +
  17587. "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " +
  17588. "for foreach function global goto if implements interface instanceof namespace " +
  17589. "new or private protected public static switch throw trait try use var while xor " +
  17590. "die echo empty exit eval include include_once isset list require require_once return " +
  17591. "print unset __halt_compiler self static parent yield insteadof finally";
  17592. var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
  17593. var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";
  17594. CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));
  17595. CodeMirror.registerHelper("wordChars", "php", /[\w$]/);
  17596. var phpConfig = {
  17597. name: "clike",
  17598. helperType: "php",
  17599. keywords: keywords(phpKeywords),
  17600. blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),
  17601. defKeywords: keywords("class function interface namespace trait"),
  17602. atoms: keywords(phpAtoms),
  17603. builtin: keywords(phpBuiltin),
  17604. multiLineStrings: true,
  17605. hooks: {
  17606. "$": function(stream) {
  17607. stream.eatWhile(/[\w\$_]/);
  17608. return "variable-2";
  17609. },
  17610. "<": function(stream, state) {
  17611. var before;
  17612. if (before = stream.match(/^<<\s*/)) {
  17613. var quoted = stream.eat(/['"]/);
  17614. stream.eatWhile(/[\w\.]/);
  17615. var delim = stream.current().slice(before[0].length + (quoted ? 2 : 1));
  17616. if (quoted) stream.eat(quoted);
  17617. if (delim) {
  17618. (state.tokStack || (state.tokStack = [])).push(delim, 0);
  17619. state.tokenize = phpString(delim, quoted != "'");
  17620. return "string";
  17621. }
  17622. }
  17623. return false;
  17624. },
  17625. "#": function(stream) {
  17626. while (!stream.eol() && !stream.match("?>", false)) stream.next();
  17627. return "comment";
  17628. },
  17629. "/": function(stream) {
  17630. if (stream.eat("/")) {
  17631. while (!stream.eol() && !stream.match("?>", false)) stream.next();
  17632. return "comment";
  17633. }
  17634. return false;
  17635. },
  17636. '"': function(_stream, state) {
  17637. (state.tokStack || (state.tokStack = [])).push('"', 0);
  17638. state.tokenize = phpString('"');
  17639. return "string";
  17640. },
  17641. "{": function(_stream, state) {
  17642. if (state.tokStack && state.tokStack.length)
  17643. state.tokStack[state.tokStack.length - 1]++;
  17644. return false;
  17645. },
  17646. "}": function(_stream, state) {
  17647. if (state.tokStack && state.tokStack.length > 0 &&
  17648. !--state.tokStack[state.tokStack.length - 1]) {
  17649. state.tokenize = phpString(state.tokStack[state.tokStack.length - 2]);
  17650. }
  17651. return false;
  17652. }
  17653. }
  17654. };
  17655. CodeMirror.defineMode("php", function(config, parserConfig) {
  17656. var htmlMode = CodeMirror.getMode(config, (parserConfig && parserConfig.htmlMode) || "text/html");
  17657. var phpMode = CodeMirror.getMode(config, phpConfig);
  17658. function dispatch(stream, state) {
  17659. var isPHP = state.curMode == phpMode;
  17660. if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null;
  17661. if (!isPHP) {
  17662. if (stream.match(/^<\?\w*/)) {
  17663. state.curMode = phpMode;
  17664. if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, "", ""))
  17665. state.curState = state.php;
  17666. return "meta";
  17667. }
  17668. if (state.pending == '"' || state.pending == "'") {
  17669. while (!stream.eol() && stream.next() != state.pending) {}
  17670. var style = "string";
  17671. } else if (state.pending && stream.pos < state.pending.end) {
  17672. stream.pos = state.pending.end;
  17673. var style = state.pending.style;
  17674. } else {
  17675. var style = htmlMode.token(stream, state.curState);
  17676. }
  17677. if (state.pending) state.pending = null;
  17678. var cur = stream.current(), openPHP = cur.search(/<\?/), m;
  17679. if (openPHP != -1) {
  17680. if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0];
  17681. else state.pending = {end: stream.pos, style: style};
  17682. stream.backUp(cur.length - openPHP);
  17683. }
  17684. return style;
  17685. } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
  17686. state.curMode = htmlMode;
  17687. state.curState = state.html;
  17688. if (!state.php.context.prev) state.php = null;
  17689. return "meta";
  17690. } else {
  17691. return phpMode.token(stream, state.curState);
  17692. }
  17693. }
  17694. return {
  17695. startState: function() {
  17696. var html = CodeMirror.startState(htmlMode)
  17697. var php = parserConfig.startOpen ? CodeMirror.startState(phpMode) : null
  17698. return {html: html,
  17699. php: php,
  17700. curMode: parserConfig.startOpen ? phpMode : htmlMode,
  17701. curState: parserConfig.startOpen ? php : html,
  17702. pending: null};
  17703. },
  17704. copyState: function(state) {
  17705. var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
  17706. php = state.php, phpNew = php && CodeMirror.copyState(phpMode, php), cur;
  17707. if (state.curMode == htmlMode) cur = htmlNew;
  17708. else cur = phpNew;
  17709. return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,
  17710. pending: state.pending};
  17711. },
  17712. token: dispatch,
  17713. indent: function(state, textAfter, line) {
  17714. if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
  17715. (state.curMode == phpMode && /^\?>/.test(textAfter)))
  17716. return htmlMode.indent(state.html, textAfter, line);
  17717. return state.curMode.indent(state.curState, textAfter, line);
  17718. },
  17719. blockCommentStart: "/*",
  17720. blockCommentEnd: "*/",
  17721. lineComment: "//",
  17722. innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
  17723. };
  17724. }, "htmlmixed", "clike");
  17725. CodeMirror.defineMIME("application/x-httpd-php", "php");
  17726. CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
  17727. CodeMirror.defineMIME("text/x-php", phpConfig);
  17728. });
  17729. /***/ }),
  17730. /***/ 81201:
  17731. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  17732. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  17733. // Distributed under an MIT license: https://codemirror.net/LICENSE
  17734. (function(mod) {
  17735. if (true) // CommonJS
  17736. mod(__webpack_require__(4631), __webpack_require__(36629));
  17737. else {}
  17738. })(function(CodeMirror) {
  17739. "use strict";
  17740. CodeMirror.defineMode("sass", function(config) {
  17741. var cssMode = CodeMirror.mimeModes["text/css"];
  17742. var propertyKeywords = cssMode.propertyKeywords || {},
  17743. colorKeywords = cssMode.colorKeywords || {},
  17744. valueKeywords = cssMode.valueKeywords || {},
  17745. fontProperties = cssMode.fontProperties || {};
  17746. function tokenRegexp(words) {
  17747. return new RegExp("^" + words.join("|"));
  17748. }
  17749. var keywords = ["true", "false", "null", "auto"];
  17750. var keywordsRegexp = new RegExp("^" + keywords.join("|"));
  17751. var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-",
  17752. "\\!=", "/", "\\*", "%", "and", "or", "not", ";","\\{","\\}",":"];
  17753. var opRegexp = tokenRegexp(operators);
  17754. var pseudoElementsRegexp = /^::?[a-zA-Z_][\w\-]*/;
  17755. var word;
  17756. function isEndLine(stream) {
  17757. return !stream.peek() || stream.match(/\s+$/, false);
  17758. }
  17759. function urlTokens(stream, state) {
  17760. var ch = stream.peek();
  17761. if (ch === ")") {
  17762. stream.next();
  17763. state.tokenizer = tokenBase;
  17764. return "operator";
  17765. } else if (ch === "(") {
  17766. stream.next();
  17767. stream.eatSpace();
  17768. return "operator";
  17769. } else if (ch === "'" || ch === '"') {
  17770. state.tokenizer = buildStringTokenizer(stream.next());
  17771. return "string";
  17772. } else {
  17773. state.tokenizer = buildStringTokenizer(")", false);
  17774. return "string";
  17775. }
  17776. }
  17777. function comment(indentation, multiLine) {
  17778. return function(stream, state) {
  17779. if (stream.sol() && stream.indentation() <= indentation) {
  17780. state.tokenizer = tokenBase;
  17781. return tokenBase(stream, state);
  17782. }
  17783. if (multiLine && stream.skipTo("*/")) {
  17784. stream.next();
  17785. stream.next();
  17786. state.tokenizer = tokenBase;
  17787. } else {
  17788. stream.skipToEnd();
  17789. }
  17790. return "comment";
  17791. };
  17792. }
  17793. function buildStringTokenizer(quote, greedy) {
  17794. if (greedy == null) { greedy = true; }
  17795. function stringTokenizer(stream, state) {
  17796. var nextChar = stream.next();
  17797. var peekChar = stream.peek();
  17798. var previousChar = stream.string.charAt(stream.pos-2);
  17799. var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\"));
  17800. if (endingString) {
  17801. if (nextChar !== quote && greedy) { stream.next(); }
  17802. if (isEndLine(stream)) {
  17803. state.cursorHalf = 0;
  17804. }
  17805. state.tokenizer = tokenBase;
  17806. return "string";
  17807. } else if (nextChar === "#" && peekChar === "{") {
  17808. state.tokenizer = buildInterpolationTokenizer(stringTokenizer);
  17809. stream.next();
  17810. return "operator";
  17811. } else {
  17812. return "string";
  17813. }
  17814. }
  17815. return stringTokenizer;
  17816. }
  17817. function buildInterpolationTokenizer(currentTokenizer) {
  17818. return function(stream, state) {
  17819. if (stream.peek() === "}") {
  17820. stream.next();
  17821. state.tokenizer = currentTokenizer;
  17822. return "operator";
  17823. } else {
  17824. return tokenBase(stream, state);
  17825. }
  17826. };
  17827. }
  17828. function indent(state) {
  17829. if (state.indentCount == 0) {
  17830. state.indentCount++;
  17831. var lastScopeOffset = state.scopes[0].offset;
  17832. var currentOffset = lastScopeOffset + config.indentUnit;
  17833. state.scopes.unshift({ offset:currentOffset });
  17834. }
  17835. }
  17836. function dedent(state) {
  17837. if (state.scopes.length == 1) return;
  17838. state.scopes.shift();
  17839. }
  17840. function tokenBase(stream, state) {
  17841. var ch = stream.peek();
  17842. // Comment
  17843. if (stream.match("/*")) {
  17844. state.tokenizer = comment(stream.indentation(), true);
  17845. return state.tokenizer(stream, state);
  17846. }
  17847. if (stream.match("//")) {
  17848. state.tokenizer = comment(stream.indentation(), false);
  17849. return state.tokenizer(stream, state);
  17850. }
  17851. // Interpolation
  17852. if (stream.match("#{")) {
  17853. state.tokenizer = buildInterpolationTokenizer(tokenBase);
  17854. return "operator";
  17855. }
  17856. // Strings
  17857. if (ch === '"' || ch === "'") {
  17858. stream.next();
  17859. state.tokenizer = buildStringTokenizer(ch);
  17860. return "string";
  17861. }
  17862. if(!state.cursorHalf){// state.cursorHalf === 0
  17863. // first half i.e. before : for key-value pairs
  17864. // including selectors
  17865. if (ch === "-") {
  17866. if (stream.match(/^-\w+-/)) {
  17867. return "meta";
  17868. }
  17869. }
  17870. if (ch === ".") {
  17871. stream.next();
  17872. if (stream.match(/^[\w-]+/)) {
  17873. indent(state);
  17874. return "qualifier";
  17875. } else if (stream.peek() === "#") {
  17876. indent(state);
  17877. return "tag";
  17878. }
  17879. }
  17880. if (ch === "#") {
  17881. stream.next();
  17882. // ID selectors
  17883. if (stream.match(/^[\w-]+/)) {
  17884. indent(state);
  17885. return "builtin";
  17886. }
  17887. if (stream.peek() === "#") {
  17888. indent(state);
  17889. return "tag";
  17890. }
  17891. }
  17892. // Variables
  17893. if (ch === "$") {
  17894. stream.next();
  17895. stream.eatWhile(/[\w-]/);
  17896. return "variable-2";
  17897. }
  17898. // Numbers
  17899. if (stream.match(/^-?[0-9\.]+/))
  17900. return "number";
  17901. // Units
  17902. if (stream.match(/^(px|em|in)\b/))
  17903. return "unit";
  17904. if (stream.match(keywordsRegexp))
  17905. return "keyword";
  17906. if (stream.match(/^url/) && stream.peek() === "(") {
  17907. state.tokenizer = urlTokens;
  17908. return "atom";
  17909. }
  17910. if (ch === "=") {
  17911. // Match shortcut mixin definition
  17912. if (stream.match(/^=[\w-]+/)) {
  17913. indent(state);
  17914. return "meta";
  17915. }
  17916. }
  17917. if (ch === "+") {
  17918. // Match shortcut mixin definition
  17919. if (stream.match(/^\+[\w-]+/)){
  17920. return "variable-3";
  17921. }
  17922. }
  17923. if(ch === "@"){
  17924. if(stream.match('@extend')){
  17925. if(!stream.match(/\s*[\w]/))
  17926. dedent(state);
  17927. }
  17928. }
  17929. // Indent Directives
  17930. if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {
  17931. indent(state);
  17932. return "def";
  17933. }
  17934. // Other Directives
  17935. if (ch === "@") {
  17936. stream.next();
  17937. stream.eatWhile(/[\w-]/);
  17938. return "def";
  17939. }
  17940. if (stream.eatWhile(/[\w-]/)){
  17941. if(stream.match(/ *: *[\w-\+\$#!\("']/,false)){
  17942. word = stream.current().toLowerCase();
  17943. var prop = state.prevProp + "-" + word;
  17944. if (propertyKeywords.hasOwnProperty(prop)) {
  17945. return "property";
  17946. } else if (propertyKeywords.hasOwnProperty(word)) {
  17947. state.prevProp = word;
  17948. return "property";
  17949. } else if (fontProperties.hasOwnProperty(word)) {
  17950. return "property";
  17951. }
  17952. return "tag";
  17953. }
  17954. else if(stream.match(/ *:/,false)){
  17955. indent(state);
  17956. state.cursorHalf = 1;
  17957. state.prevProp = stream.current().toLowerCase();
  17958. return "property";
  17959. }
  17960. else if(stream.match(/ *,/,false)){
  17961. return "tag";
  17962. }
  17963. else{
  17964. indent(state);
  17965. return "tag";
  17966. }
  17967. }
  17968. if(ch === ":"){
  17969. if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element
  17970. return "variable-3";
  17971. }
  17972. stream.next();
  17973. state.cursorHalf=1;
  17974. return "operator";
  17975. }
  17976. } // cursorHalf===0 ends here
  17977. else{
  17978. if (ch === "#") {
  17979. stream.next();
  17980. // Hex numbers
  17981. if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){
  17982. if (isEndLine(stream)) {
  17983. state.cursorHalf = 0;
  17984. }
  17985. return "number";
  17986. }
  17987. }
  17988. // Numbers
  17989. if (stream.match(/^-?[0-9\.]+/)){
  17990. if (isEndLine(stream)) {
  17991. state.cursorHalf = 0;
  17992. }
  17993. return "number";
  17994. }
  17995. // Units
  17996. if (stream.match(/^(px|em|in)\b/)){
  17997. if (isEndLine(stream)) {
  17998. state.cursorHalf = 0;
  17999. }
  18000. return "unit";
  18001. }
  18002. if (stream.match(keywordsRegexp)){
  18003. if (isEndLine(stream)) {
  18004. state.cursorHalf = 0;
  18005. }
  18006. return "keyword";
  18007. }
  18008. if (stream.match(/^url/) && stream.peek() === "(") {
  18009. state.tokenizer = urlTokens;
  18010. if (isEndLine(stream)) {
  18011. state.cursorHalf = 0;
  18012. }
  18013. return "atom";
  18014. }
  18015. // Variables
  18016. if (ch === "$") {
  18017. stream.next();
  18018. stream.eatWhile(/[\w-]/);
  18019. if (isEndLine(stream)) {
  18020. state.cursorHalf = 0;
  18021. }
  18022. return "variable-2";
  18023. }
  18024. // bang character for !important, !default, etc.
  18025. if (ch === "!") {
  18026. stream.next();
  18027. state.cursorHalf = 0;
  18028. return stream.match(/^[\w]+/) ? "keyword": "operator";
  18029. }
  18030. if (stream.match(opRegexp)){
  18031. if (isEndLine(stream)) {
  18032. state.cursorHalf = 0;
  18033. }
  18034. return "operator";
  18035. }
  18036. // attributes
  18037. if (stream.eatWhile(/[\w-]/)) {
  18038. if (isEndLine(stream)) {
  18039. state.cursorHalf = 0;
  18040. }
  18041. word = stream.current().toLowerCase();
  18042. if (valueKeywords.hasOwnProperty(word)) {
  18043. return "atom";
  18044. } else if (colorKeywords.hasOwnProperty(word)) {
  18045. return "keyword";
  18046. } else if (propertyKeywords.hasOwnProperty(word)) {
  18047. state.prevProp = stream.current().toLowerCase();
  18048. return "property";
  18049. } else {
  18050. return "tag";
  18051. }
  18052. }
  18053. //stream.eatSpace();
  18054. if (isEndLine(stream)) {
  18055. state.cursorHalf = 0;
  18056. return null;
  18057. }
  18058. } // else ends here
  18059. if (stream.match(opRegexp))
  18060. return "operator";
  18061. // If we haven't returned by now, we move 1 character
  18062. // and return an error
  18063. stream.next();
  18064. return null;
  18065. }
  18066. function tokenLexer(stream, state) {
  18067. if (stream.sol()) state.indentCount = 0;
  18068. var style = state.tokenizer(stream, state);
  18069. var current = stream.current();
  18070. if (current === "@return" || current === "}"){
  18071. dedent(state);
  18072. }
  18073. if (style !== null) {
  18074. var startOfToken = stream.pos - current.length;
  18075. var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);
  18076. var newScopes = [];
  18077. for (var i = 0; i < state.scopes.length; i++) {
  18078. var scope = state.scopes[i];
  18079. if (scope.offset <= withCurrentIndent)
  18080. newScopes.push(scope);
  18081. }
  18082. state.scopes = newScopes;
  18083. }
  18084. return style;
  18085. }
  18086. return {
  18087. startState: function() {
  18088. return {
  18089. tokenizer: tokenBase,
  18090. scopes: [{offset: 0, type: "sass"}],
  18091. indentCount: 0,
  18092. cursorHalf: 0, // cursor half tells us if cursor lies after (1)
  18093. // or before (0) colon (well... more or less)
  18094. definedVars: [],
  18095. definedMixins: []
  18096. };
  18097. },
  18098. token: function(stream, state) {
  18099. var style = tokenLexer(stream, state);
  18100. state.lastToken = { style: style, content: stream.current() };
  18101. return style;
  18102. },
  18103. indent: function(state) {
  18104. return state.scopes[0].offset;
  18105. },
  18106. blockCommentStart: "/*",
  18107. blockCommentEnd: "*/",
  18108. lineComment: "//",
  18109. fold: "indent"
  18110. };
  18111. }, "css");
  18112. CodeMirror.defineMIME("text/x-sass", "sass");
  18113. });
  18114. /***/ }),
  18115. /***/ 54702:
  18116. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18117. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  18118. // Distributed under an MIT license: https://codemirror.net/LICENSE
  18119. (function(mod) {
  18120. if (true) // CommonJS
  18121. mod(__webpack_require__(4631), __webpack_require__(87093));
  18122. else {}
  18123. })(function(CodeMirror) {
  18124. "use strict";
  18125. CodeMirror.defineMode("twig:inner", function() {
  18126. var keywords = ["and", "as", "autoescape", "endautoescape", "block", "do", "endblock", "else", "elseif", "extends", "for", "endfor", "embed", "endembed", "filter", "endfilter", "flush", "from", "if", "endif", "in", "is", "include", "import", "not", "or", "set", "spaceless", "endspaceless", "with", "endwith", "trans", "endtrans", "blocktrans", "endblocktrans", "macro", "endmacro", "use", "verbatim", "endverbatim"],
  18127. operator = /^[+\-*&%=<>!?|~^]/,
  18128. sign = /^[:\[\(\{]/,
  18129. atom = ["true", "false", "null", "empty", "defined", "divisibleby", "divisible by", "even", "odd", "iterable", "sameas", "same as"],
  18130. number = /^(\d[+\-\*\/])?\d+(\.\d+)?/;
  18131. keywords = new RegExp("((" + keywords.join(")|(") + "))\\b");
  18132. atom = new RegExp("((" + atom.join(")|(") + "))\\b");
  18133. function tokenBase (stream, state) {
  18134. var ch = stream.peek();
  18135. //Comment
  18136. if (state.incomment) {
  18137. if (!stream.skipTo("#}")) {
  18138. stream.skipToEnd();
  18139. } else {
  18140. stream.eatWhile(/\#|}/);
  18141. state.incomment = false;
  18142. }
  18143. return "comment";
  18144. //Tag
  18145. } else if (state.intag) {
  18146. //After operator
  18147. if (state.operator) {
  18148. state.operator = false;
  18149. if (stream.match(atom)) {
  18150. return "atom";
  18151. }
  18152. if (stream.match(number)) {
  18153. return "number";
  18154. }
  18155. }
  18156. //After sign
  18157. if (state.sign) {
  18158. state.sign = false;
  18159. if (stream.match(atom)) {
  18160. return "atom";
  18161. }
  18162. if (stream.match(number)) {
  18163. return "number";
  18164. }
  18165. }
  18166. if (state.instring) {
  18167. if (ch == state.instring) {
  18168. state.instring = false;
  18169. }
  18170. stream.next();
  18171. return "string";
  18172. } else if (ch == "'" || ch == '"') {
  18173. state.instring = ch;
  18174. stream.next();
  18175. return "string";
  18176. } else if (stream.match(state.intag + "}") || stream.eat("-") && stream.match(state.intag + "}")) {
  18177. state.intag = false;
  18178. return "tag";
  18179. } else if (stream.match(operator)) {
  18180. state.operator = true;
  18181. return "operator";
  18182. } else if (stream.match(sign)) {
  18183. state.sign = true;
  18184. } else {
  18185. if (stream.eat(" ") || stream.sol()) {
  18186. if (stream.match(keywords)) {
  18187. return "keyword";
  18188. }
  18189. if (stream.match(atom)) {
  18190. return "atom";
  18191. }
  18192. if (stream.match(number)) {
  18193. return "number";
  18194. }
  18195. if (stream.sol()) {
  18196. stream.next();
  18197. }
  18198. } else {
  18199. stream.next();
  18200. }
  18201. }
  18202. return "variable";
  18203. } else if (stream.eat("{")) {
  18204. if (stream.eat("#")) {
  18205. state.incomment = true;
  18206. if (!stream.skipTo("#}")) {
  18207. stream.skipToEnd();
  18208. } else {
  18209. stream.eatWhile(/\#|}/);
  18210. state.incomment = false;
  18211. }
  18212. return "comment";
  18213. //Open tag
  18214. } else if (ch = stream.eat(/\{|%/)) {
  18215. //Cache close tag
  18216. state.intag = ch;
  18217. if (ch == "{") {
  18218. state.intag = "}";
  18219. }
  18220. stream.eat("-");
  18221. return "tag";
  18222. }
  18223. }
  18224. stream.next();
  18225. };
  18226. return {
  18227. startState: function () {
  18228. return {};
  18229. },
  18230. token: function (stream, state) {
  18231. return tokenBase(stream, state);
  18232. }
  18233. };
  18234. });
  18235. CodeMirror.defineMode("twig", function(config, parserConfig) {
  18236. var twigInner = CodeMirror.getMode(config, "twig:inner");
  18237. if (!parserConfig || !parserConfig.base) return twigInner;
  18238. return CodeMirror.multiplexingMode(
  18239. CodeMirror.getMode(config, parserConfig.base), {
  18240. open: /\{[{#%]/, close: /[}#%]\}/, mode: twigInner, parseDelimiters: true
  18241. }
  18242. );
  18243. });
  18244. CodeMirror.defineMIME("text/x-twig", "twig");
  18245. });
  18246. /***/ }),
  18247. /***/ 29589:
  18248. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18249. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  18250. // Distributed under an MIT license: https://codemirror.net/LICENSE
  18251. (function(mod) {
  18252. if (true) // CommonJS
  18253. mod(__webpack_require__(4631));
  18254. else {}
  18255. })(function(CodeMirror) {
  18256. "use strict";
  18257. var htmlConfig = {
  18258. autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
  18259. 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
  18260. 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
  18261. 'track': true, 'wbr': true, 'menuitem': true},
  18262. implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
  18263. 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
  18264. 'th': true, 'tr': true},
  18265. contextGrabbers: {
  18266. 'dd': {'dd': true, 'dt': true},
  18267. 'dt': {'dd': true, 'dt': true},
  18268. 'li': {'li': true},
  18269. 'option': {'option': true, 'optgroup': true},
  18270. 'optgroup': {'optgroup': true},
  18271. 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
  18272. 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
  18273. 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
  18274. 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
  18275. 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
  18276. 'rp': {'rp': true, 'rt': true},
  18277. 'rt': {'rp': true, 'rt': true},
  18278. 'tbody': {'tbody': true, 'tfoot': true},
  18279. 'td': {'td': true, 'th': true},
  18280. 'tfoot': {'tbody': true},
  18281. 'th': {'td': true, 'th': true},
  18282. 'thead': {'tbody': true, 'tfoot': true},
  18283. 'tr': {'tr': true}
  18284. },
  18285. doNotIndent: {"pre": true},
  18286. allowUnquoted: true,
  18287. allowMissing: true,
  18288. caseFold: true
  18289. }
  18290. var xmlConfig = {
  18291. autoSelfClosers: {},
  18292. implicitlyClosed: {},
  18293. contextGrabbers: {},
  18294. doNotIndent: {},
  18295. allowUnquoted: false,
  18296. allowMissing: false,
  18297. allowMissingTagName: false,
  18298. caseFold: false
  18299. }
  18300. CodeMirror.defineMode("xml", function(editorConf, config_) {
  18301. var indentUnit = editorConf.indentUnit
  18302. var config = {}
  18303. var defaults = config_.htmlMode ? htmlConfig : xmlConfig
  18304. for (var prop in defaults) config[prop] = defaults[prop]
  18305. for (var prop in config_) config[prop] = config_[prop]
  18306. // Return variables for tokenizers
  18307. var type, setStyle;
  18308. function inText(stream, state) {
  18309. function chain(parser) {
  18310. state.tokenize = parser;
  18311. return parser(stream, state);
  18312. }
  18313. var ch = stream.next();
  18314. if (ch == "<") {
  18315. if (stream.eat("!")) {
  18316. if (stream.eat("[")) {
  18317. if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
  18318. else return null;
  18319. } else if (stream.match("--")) {
  18320. return chain(inBlock("comment", "-->"));
  18321. } else if (stream.match("DOCTYPE", true, true)) {
  18322. stream.eatWhile(/[\w\._\-]/);
  18323. return chain(doctype(1));
  18324. } else {
  18325. return null;
  18326. }
  18327. } else if (stream.eat("?")) {
  18328. stream.eatWhile(/[\w\._\-]/);
  18329. state.tokenize = inBlock("meta", "?>");
  18330. return "meta";
  18331. } else {
  18332. type = stream.eat("/") ? "closeTag" : "openTag";
  18333. state.tokenize = inTag;
  18334. return "tag bracket";
  18335. }
  18336. } else if (ch == "&") {
  18337. var ok;
  18338. if (stream.eat("#")) {
  18339. if (stream.eat("x")) {
  18340. ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
  18341. } else {
  18342. ok = stream.eatWhile(/[\d]/) && stream.eat(";");
  18343. }
  18344. } else {
  18345. ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
  18346. }
  18347. return ok ? "atom" : "error";
  18348. } else {
  18349. stream.eatWhile(/[^&<]/);
  18350. return null;
  18351. }
  18352. }
  18353. inText.isInText = true;
  18354. function inTag(stream, state) {
  18355. var ch = stream.next();
  18356. if (ch == ">" || (ch == "/" && stream.eat(">"))) {
  18357. state.tokenize = inText;
  18358. type = ch == ">" ? "endTag" : "selfcloseTag";
  18359. return "tag bracket";
  18360. } else if (ch == "=") {
  18361. type = "equals";
  18362. return null;
  18363. } else if (ch == "<") {
  18364. state.tokenize = inText;
  18365. state.state = baseState;
  18366. state.tagName = state.tagStart = null;
  18367. var next = state.tokenize(stream, state);
  18368. return next ? next + " tag error" : "tag error";
  18369. } else if (/[\'\"]/.test(ch)) {
  18370. state.tokenize = inAttribute(ch);
  18371. state.stringStartCol = stream.column();
  18372. return state.tokenize(stream, state);
  18373. } else {
  18374. stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
  18375. return "word";
  18376. }
  18377. }
  18378. function inAttribute(quote) {
  18379. var closure = function(stream, state) {
  18380. while (!stream.eol()) {
  18381. if (stream.next() == quote) {
  18382. state.tokenize = inTag;
  18383. break;
  18384. }
  18385. }
  18386. return "string";
  18387. };
  18388. closure.isInAttribute = true;
  18389. return closure;
  18390. }
  18391. function inBlock(style, terminator) {
  18392. return function(stream, state) {
  18393. while (!stream.eol()) {
  18394. if (stream.match(terminator)) {
  18395. state.tokenize = inText;
  18396. break;
  18397. }
  18398. stream.next();
  18399. }
  18400. return style;
  18401. }
  18402. }
  18403. function doctype(depth) {
  18404. return function(stream, state) {
  18405. var ch;
  18406. while ((ch = stream.next()) != null) {
  18407. if (ch == "<") {
  18408. state.tokenize = doctype(depth + 1);
  18409. return state.tokenize(stream, state);
  18410. } else if (ch == ">") {
  18411. if (depth == 1) {
  18412. state.tokenize = inText;
  18413. break;
  18414. } else {
  18415. state.tokenize = doctype(depth - 1);
  18416. return state.tokenize(stream, state);
  18417. }
  18418. }
  18419. }
  18420. return "meta";
  18421. };
  18422. }
  18423. function Context(state, tagName, startOfLine) {
  18424. this.prev = state.context;
  18425. this.tagName = tagName || "";
  18426. this.indent = state.indented;
  18427. this.startOfLine = startOfLine;
  18428. if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
  18429. this.noIndent = true;
  18430. }
  18431. function popContext(state) {
  18432. if (state.context) state.context = state.context.prev;
  18433. }
  18434. function maybePopContext(state, nextTagName) {
  18435. var parentTagName;
  18436. while (true) {
  18437. if (!state.context) {
  18438. return;
  18439. }
  18440. parentTagName = state.context.tagName;
  18441. if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
  18442. !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
  18443. return;
  18444. }
  18445. popContext(state);
  18446. }
  18447. }
  18448. function baseState(type, stream, state) {
  18449. if (type == "openTag") {
  18450. state.tagStart = stream.column();
  18451. return tagNameState;
  18452. } else if (type == "closeTag") {
  18453. return closeTagNameState;
  18454. } else {
  18455. return baseState;
  18456. }
  18457. }
  18458. function tagNameState(type, stream, state) {
  18459. if (type == "word") {
  18460. state.tagName = stream.current();
  18461. setStyle = "tag";
  18462. return attrState;
  18463. } else if (config.allowMissingTagName && type == "endTag") {
  18464. setStyle = "tag bracket";
  18465. return attrState(type, stream, state);
  18466. } else {
  18467. setStyle = "error";
  18468. return tagNameState;
  18469. }
  18470. }
  18471. function closeTagNameState(type, stream, state) {
  18472. if (type == "word") {
  18473. var tagName = stream.current();
  18474. if (state.context && state.context.tagName != tagName &&
  18475. config.implicitlyClosed.hasOwnProperty(state.context.tagName))
  18476. popContext(state);
  18477. if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
  18478. setStyle = "tag";
  18479. return closeState;
  18480. } else {
  18481. setStyle = "tag error";
  18482. return closeStateErr;
  18483. }
  18484. } else if (config.allowMissingTagName && type == "endTag") {
  18485. setStyle = "tag bracket";
  18486. return closeState(type, stream, state);
  18487. } else {
  18488. setStyle = "error";
  18489. return closeStateErr;
  18490. }
  18491. }
  18492. function closeState(type, _stream, state) {
  18493. if (type != "endTag") {
  18494. setStyle = "error";
  18495. return closeState;
  18496. }
  18497. popContext(state);
  18498. return baseState;
  18499. }
  18500. function closeStateErr(type, stream, state) {
  18501. setStyle = "error";
  18502. return closeState(type, stream, state);
  18503. }
  18504. function attrState(type, _stream, state) {
  18505. if (type == "word") {
  18506. setStyle = "attribute";
  18507. return attrEqState;
  18508. } else if (type == "endTag" || type == "selfcloseTag") {
  18509. var tagName = state.tagName, tagStart = state.tagStart;
  18510. state.tagName = state.tagStart = null;
  18511. if (type == "selfcloseTag" ||
  18512. config.autoSelfClosers.hasOwnProperty(tagName)) {
  18513. maybePopContext(state, tagName);
  18514. } else {
  18515. maybePopContext(state, tagName);
  18516. state.context = new Context(state, tagName, tagStart == state.indented);
  18517. }
  18518. return baseState;
  18519. }
  18520. setStyle = "error";
  18521. return attrState;
  18522. }
  18523. function attrEqState(type, stream, state) {
  18524. if (type == "equals") return attrValueState;
  18525. if (!config.allowMissing) setStyle = "error";
  18526. return attrState(type, stream, state);
  18527. }
  18528. function attrValueState(type, stream, state) {
  18529. if (type == "string") return attrContinuedState;
  18530. if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
  18531. setStyle = "error";
  18532. return attrState(type, stream, state);
  18533. }
  18534. function attrContinuedState(type, stream, state) {
  18535. if (type == "string") return attrContinuedState;
  18536. return attrState(type, stream, state);
  18537. }
  18538. return {
  18539. startState: function(baseIndent) {
  18540. var state = {tokenize: inText,
  18541. state: baseState,
  18542. indented: baseIndent || 0,
  18543. tagName: null, tagStart: null,
  18544. context: null}
  18545. if (baseIndent != null) state.baseIndent = baseIndent
  18546. return state
  18547. },
  18548. token: function(stream, state) {
  18549. if (!state.tagName && stream.sol())
  18550. state.indented = stream.indentation();
  18551. if (stream.eatSpace()) return null;
  18552. type = null;
  18553. var style = state.tokenize(stream, state);
  18554. if ((style || type) && style != "comment") {
  18555. setStyle = null;
  18556. state.state = state.state(type || style, stream, state);
  18557. if (setStyle)
  18558. style = setStyle == "error" ? style + " error" : setStyle;
  18559. }
  18560. return style;
  18561. },
  18562. indent: function(state, textAfter, fullLine) {
  18563. var context = state.context;
  18564. // Indent multi-line strings (e.g. css).
  18565. if (state.tokenize.isInAttribute) {
  18566. if (state.tagStart == state.indented)
  18567. return state.stringStartCol + 1;
  18568. else
  18569. return state.indented + indentUnit;
  18570. }
  18571. if (context && context.noIndent) return CodeMirror.Pass;
  18572. if (state.tokenize != inTag && state.tokenize != inText)
  18573. return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
  18574. // Indent the starts of attribute names.
  18575. if (state.tagName) {
  18576. if (config.multilineTagIndentPastTag !== false)
  18577. return state.tagStart + state.tagName.length + 2;
  18578. else
  18579. return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
  18580. }
  18581. if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
  18582. var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
  18583. if (tagAfter && tagAfter[1]) { // Closing tag spotted
  18584. while (context) {
  18585. if (context.tagName == tagAfter[2]) {
  18586. context = context.prev;
  18587. break;
  18588. } else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
  18589. context = context.prev;
  18590. } else {
  18591. break;
  18592. }
  18593. }
  18594. } else if (tagAfter) { // Opening tag spotted
  18595. while (context) {
  18596. var grabbers = config.contextGrabbers[context.tagName];
  18597. if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
  18598. context = context.prev;
  18599. else
  18600. break;
  18601. }
  18602. }
  18603. while (context && context.prev && !context.startOfLine)
  18604. context = context.prev;
  18605. if (context) return context.indent + indentUnit;
  18606. else return state.baseIndent || 0;
  18607. },
  18608. electricInput: /<\/[\s\w:]+>$/,
  18609. blockCommentStart: "<!--",
  18610. blockCommentEnd: "-->",
  18611. configuration: config.htmlMode ? "html" : "xml",
  18612. helperType: config.htmlMode ? "html" : "xml",
  18613. skipAttribute: function(state) {
  18614. if (state.state == attrValueState)
  18615. state.state = attrState
  18616. },
  18617. xmlCurrentTag: function(state) {
  18618. return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null
  18619. },
  18620. xmlCurrentContext: function(state) {
  18621. var context = []
  18622. for (var cx = state.context; cx; cx = cx.prev)
  18623. context.push(cx.tagName)
  18624. return context.reverse()
  18625. }
  18626. };
  18627. });
  18628. CodeMirror.defineMIME("text/xml", "xml");
  18629. CodeMirror.defineMIME("application/xml", "xml");
  18630. if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
  18631. CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
  18632. });
  18633. /***/ }),
  18634. /***/ 53631:
  18635. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18636. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  18637. // Distributed under an MIT license: https://codemirror.net/LICENSE
  18638. (function(mod) {
  18639. if (true) // CommonJS
  18640. mod(__webpack_require__(4631));
  18641. else {}
  18642. })(function(CodeMirror) {
  18643. "use strict";
  18644. CodeMirror.defineMode("yaml", function() {
  18645. var cons = ['true', 'false', 'on', 'off', 'yes', 'no'];
  18646. var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i');
  18647. return {
  18648. token: function(stream, state) {
  18649. var ch = stream.peek();
  18650. var esc = state.escaped;
  18651. state.escaped = false;
  18652. /* comments */
  18653. if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) {
  18654. stream.skipToEnd();
  18655. return "comment";
  18656. }
  18657. if (stream.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))
  18658. return "string";
  18659. if (state.literal && stream.indentation() > state.keyCol) {
  18660. stream.skipToEnd(); return "string";
  18661. } else if (state.literal) { state.literal = false; }
  18662. if (stream.sol()) {
  18663. state.keyCol = 0;
  18664. state.pair = false;
  18665. state.pairStart = false;
  18666. /* document start */
  18667. if(stream.match('---')) { return "def"; }
  18668. /* document end */
  18669. if (stream.match('...')) { return "def"; }
  18670. /* array list item */
  18671. if (stream.match(/\s*-\s+/)) { return 'meta'; }
  18672. }
  18673. /* inline pairs/lists */
  18674. if (stream.match(/^(\{|\}|\[|\])/)) {
  18675. if (ch == '{')
  18676. state.inlinePairs++;
  18677. else if (ch == '}')
  18678. state.inlinePairs--;
  18679. else if (ch == '[')
  18680. state.inlineList++;
  18681. else
  18682. state.inlineList--;
  18683. return 'meta';
  18684. }
  18685. /* list separator */
  18686. if (state.inlineList > 0 && !esc && ch == ',') {
  18687. stream.next();
  18688. return 'meta';
  18689. }
  18690. /* pairs separator */
  18691. if (state.inlinePairs > 0 && !esc && ch == ',') {
  18692. state.keyCol = 0;
  18693. state.pair = false;
  18694. state.pairStart = false;
  18695. stream.next();
  18696. return 'meta';
  18697. }
  18698. /* start of value of a pair */
  18699. if (state.pairStart) {
  18700. /* block literals */
  18701. if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; };
  18702. /* references */
  18703. if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; }
  18704. /* numbers */
  18705. if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; }
  18706. if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; }
  18707. /* keywords */
  18708. if (stream.match(keywordRegex)) { return 'keyword'; }
  18709. }
  18710. /* pairs (associative arrays) -> key */
  18711. if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)) {
  18712. state.pair = true;
  18713. state.keyCol = stream.indentation();
  18714. return "atom";
  18715. }
  18716. if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; }
  18717. /* nothing found, continue */
  18718. state.pairStart = false;
  18719. state.escaped = (ch == '\\');
  18720. stream.next();
  18721. return null;
  18722. },
  18723. startState: function() {
  18724. return {
  18725. pair: false,
  18726. pairStart: false,
  18727. keyCol: 0,
  18728. inlinePairs: 0,
  18729. inlineList: 0,
  18730. literal: false,
  18731. escaped: false
  18732. };
  18733. },
  18734. lineComment: "#",
  18735. fold: "indent"
  18736. };
  18737. });
  18738. CodeMirror.defineMIME("text/x-yaml", "yaml");
  18739. CodeMirror.defineMIME("text/yaml", "yaml");
  18740. });
  18741. /***/ }),
  18742. /***/ 16266:
  18743. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18744. __webpack_require__(95767);
  18745. __webpack_require__(68132);
  18746. __webpack_require__(48388);
  18747. __webpack_require__(37470);
  18748. __webpack_require__(94882);
  18749. __webpack_require__(41520);
  18750. __webpack_require__(27476);
  18751. __webpack_require__(79622);
  18752. __webpack_require__(89375);
  18753. __webpack_require__(43533);
  18754. __webpack_require__(84672);
  18755. __webpack_require__(64157);
  18756. __webpack_require__(35095);
  18757. __webpack_require__(49892);
  18758. __webpack_require__(75115);
  18759. __webpack_require__(99176);
  18760. __webpack_require__(68838);
  18761. __webpack_require__(96253);
  18762. __webpack_require__(39730);
  18763. __webpack_require__(6059);
  18764. __webpack_require__(48377);
  18765. __webpack_require__(71084);
  18766. __webpack_require__(64299);
  18767. __webpack_require__(11246);
  18768. __webpack_require__(30726);
  18769. __webpack_require__(1901);
  18770. __webpack_require__(75972);
  18771. __webpack_require__(53403);
  18772. __webpack_require__(92516);
  18773. __webpack_require__(49371);
  18774. __webpack_require__(86479);
  18775. __webpack_require__(91736);
  18776. __webpack_require__(51889);
  18777. __webpack_require__(65177);
  18778. __webpack_require__(81246);
  18779. __webpack_require__(76503);
  18780. __webpack_require__(66786);
  18781. __webpack_require__(50932);
  18782. __webpack_require__(57526);
  18783. __webpack_require__(21591);
  18784. __webpack_require__(9073);
  18785. __webpack_require__(80347);
  18786. __webpack_require__(30579);
  18787. __webpack_require__(4669);
  18788. __webpack_require__(67710);
  18789. __webpack_require__(45789);
  18790. __webpack_require__(33514);
  18791. __webpack_require__(99978);
  18792. __webpack_require__(58472);
  18793. __webpack_require__(86946);
  18794. __webpack_require__(35068);
  18795. __webpack_require__(413);
  18796. __webpack_require__(50191);
  18797. __webpack_require__(98306);
  18798. __webpack_require__(64564);
  18799. __webpack_require__(39115);
  18800. __webpack_require__(29539);
  18801. __webpack_require__(96620);
  18802. __webpack_require__(62850);
  18803. __webpack_require__(10823);
  18804. __webpack_require__(17732);
  18805. __webpack_require__(40856);
  18806. __webpack_require__(80703);
  18807. __webpack_require__(91539);
  18808. __webpack_require__(5292);
  18809. __webpack_require__(45177);
  18810. __webpack_require__(73694);
  18811. __webpack_require__(37648);
  18812. __webpack_require__(27795);
  18813. __webpack_require__(4531);
  18814. __webpack_require__(23605);
  18815. __webpack_require__(6780);
  18816. __webpack_require__(69937);
  18817. __webpack_require__(10511);
  18818. __webpack_require__(81822);
  18819. __webpack_require__(19977);
  18820. __webpack_require__(91031);
  18821. __webpack_require__(46331);
  18822. __webpack_require__(41560);
  18823. __webpack_require__(20774);
  18824. __webpack_require__(30522);
  18825. __webpack_require__(58295);
  18826. __webpack_require__(87842);
  18827. __webpack_require__(50110);
  18828. __webpack_require__(20075);
  18829. __webpack_require__(24336);
  18830. __webpack_require__(19371);
  18831. __webpack_require__(98837);
  18832. __webpack_require__(26773);
  18833. __webpack_require__(15745);
  18834. __webpack_require__(33057);
  18835. __webpack_require__(3750);
  18836. __webpack_require__(23369);
  18837. __webpack_require__(99564);
  18838. __webpack_require__(32000);
  18839. __webpack_require__(48977);
  18840. __webpack_require__(52310);
  18841. __webpack_require__(94899);
  18842. __webpack_require__(31842);
  18843. __webpack_require__(56997);
  18844. __webpack_require__(83946);
  18845. __webpack_require__(18269);
  18846. __webpack_require__(66108);
  18847. __webpack_require__(76774);
  18848. __webpack_require__(21466);
  18849. __webpack_require__(59357);
  18850. __webpack_require__(76142);
  18851. __webpack_require__(51876);
  18852. __webpack_require__(40851);
  18853. __webpack_require__(88416);
  18854. __webpack_require__(98184);
  18855. __webpack_require__(30147);
  18856. __webpack_require__(59192);
  18857. __webpack_require__(30142);
  18858. __webpack_require__(1786);
  18859. __webpack_require__(75368);
  18860. __webpack_require__(46964);
  18861. __webpack_require__(62152);
  18862. __webpack_require__(74821);
  18863. __webpack_require__(79103);
  18864. __webpack_require__(81303);
  18865. __webpack_require__(83318);
  18866. __webpack_require__(70162);
  18867. __webpack_require__(33834);
  18868. __webpack_require__(21572);
  18869. __webpack_require__(82139);
  18870. __webpack_require__(10685);
  18871. __webpack_require__(85535);
  18872. __webpack_require__(17347);
  18873. __webpack_require__(83049);
  18874. __webpack_require__(96633);
  18875. __webpack_require__(68989);
  18876. __webpack_require__(78270);
  18877. __webpack_require__(64510);
  18878. __webpack_require__(73984);
  18879. __webpack_require__(75769);
  18880. __webpack_require__(50055);
  18881. __webpack_require__(96014);
  18882. module.exports = __webpack_require__(25645);
  18883. /***/ }),
  18884. /***/ 70911:
  18885. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18886. __webpack_require__(1268);
  18887. module.exports = __webpack_require__(25645).Array.flatMap;
  18888. /***/ }),
  18889. /***/ 10990:
  18890. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18891. __webpack_require__(62773);
  18892. module.exports = __webpack_require__(25645).Array.includes;
  18893. /***/ }),
  18894. /***/ 15434:
  18895. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18896. __webpack_require__(83276);
  18897. module.exports = __webpack_require__(25645).Object.entries;
  18898. /***/ }),
  18899. /***/ 78051:
  18900. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18901. __webpack_require__(98351);
  18902. module.exports = __webpack_require__(25645).Object.getOwnPropertyDescriptors;
  18903. /***/ }),
  18904. /***/ 38250:
  18905. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18906. __webpack_require__(96409);
  18907. module.exports = __webpack_require__(25645).Object.values;
  18908. /***/ }),
  18909. /***/ 54952:
  18910. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18911. "use strict";
  18912. __webpack_require__(40851);
  18913. __webpack_require__(9865);
  18914. module.exports = __webpack_require__(25645).Promise.finally;
  18915. /***/ }),
  18916. /***/ 6197:
  18917. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18918. __webpack_require__(92770);
  18919. module.exports = __webpack_require__(25645).String.padEnd;
  18920. /***/ }),
  18921. /***/ 14160:
  18922. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18923. __webpack_require__(41784);
  18924. module.exports = __webpack_require__(25645).String.padStart;
  18925. /***/ }),
  18926. /***/ 54039:
  18927. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18928. __webpack_require__(94325);
  18929. module.exports = __webpack_require__(25645).String.trimRight;
  18930. /***/ }),
  18931. /***/ 96728:
  18932. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18933. __webpack_require__(65869);
  18934. module.exports = __webpack_require__(25645).String.trimLeft;
  18935. /***/ }),
  18936. /***/ 93568:
  18937. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18938. __webpack_require__(79665);
  18939. module.exports = __webpack_require__(28787).f('asyncIterator');
  18940. /***/ }),
  18941. /***/ 40115:
  18942. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18943. __webpack_require__(34579);
  18944. module.exports = __webpack_require__(11327).global;
  18945. /***/ }),
  18946. /***/ 85663:
  18947. /***/ ((module) => {
  18948. module.exports = function (it) {
  18949. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  18950. return it;
  18951. };
  18952. /***/ }),
  18953. /***/ 12159:
  18954. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18955. var isObject = __webpack_require__(36727);
  18956. module.exports = function (it) {
  18957. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  18958. return it;
  18959. };
  18960. /***/ }),
  18961. /***/ 11327:
  18962. /***/ ((module) => {
  18963. var core = module.exports = { version: '2.6.12' };
  18964. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  18965. /***/ }),
  18966. /***/ 19216:
  18967. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18968. // optional / simple context binding
  18969. var aFunction = __webpack_require__(85663);
  18970. module.exports = function (fn, that, length) {
  18971. aFunction(fn);
  18972. if (that === undefined) return fn;
  18973. switch (length) {
  18974. case 1: return function (a) {
  18975. return fn.call(that, a);
  18976. };
  18977. case 2: return function (a, b) {
  18978. return fn.call(that, a, b);
  18979. };
  18980. case 3: return function (a, b, c) {
  18981. return fn.call(that, a, b, c);
  18982. };
  18983. }
  18984. return function (/* ...args */) {
  18985. return fn.apply(that, arguments);
  18986. };
  18987. };
  18988. /***/ }),
  18989. /***/ 89666:
  18990. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18991. // Thank's IE8 for his funny defineProperty
  18992. module.exports = !__webpack_require__(7929)(function () {
  18993. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  18994. });
  18995. /***/ }),
  18996. /***/ 97467:
  18997. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18998. var isObject = __webpack_require__(36727);
  18999. var document = __webpack_require__(33938).document;
  19000. // typeof document.createElement is 'object' in old IE
  19001. var is = isObject(document) && isObject(document.createElement);
  19002. module.exports = function (it) {
  19003. return is ? document.createElement(it) : {};
  19004. };
  19005. /***/ }),
  19006. /***/ 83856:
  19007. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19008. var global = __webpack_require__(33938);
  19009. var core = __webpack_require__(11327);
  19010. var ctx = __webpack_require__(19216);
  19011. var hide = __webpack_require__(41818);
  19012. var has = __webpack_require__(27069);
  19013. var PROTOTYPE = 'prototype';
  19014. var $export = function (type, name, source) {
  19015. var IS_FORCED = type & $export.F;
  19016. var IS_GLOBAL = type & $export.G;
  19017. var IS_STATIC = type & $export.S;
  19018. var IS_PROTO = type & $export.P;
  19019. var IS_BIND = type & $export.B;
  19020. var IS_WRAP = type & $export.W;
  19021. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  19022. var expProto = exports[PROTOTYPE];
  19023. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  19024. var key, own, out;
  19025. if (IS_GLOBAL) source = name;
  19026. for (key in source) {
  19027. // contains in native
  19028. own = !IS_FORCED && target && target[key] !== undefined;
  19029. if (own && has(exports, key)) continue;
  19030. // export native or passed
  19031. out = own ? target[key] : source[key];
  19032. // prevent global pollution for namespaces
  19033. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  19034. // bind timers to global for call from export context
  19035. : IS_BIND && own ? ctx(out, global)
  19036. // wrap global constructors for prevent change them in library
  19037. : IS_WRAP && target[key] == out ? (function (C) {
  19038. var F = function (a, b, c) {
  19039. if (this instanceof C) {
  19040. switch (arguments.length) {
  19041. case 0: return new C();
  19042. case 1: return new C(a);
  19043. case 2: return new C(a, b);
  19044. } return new C(a, b, c);
  19045. } return C.apply(this, arguments);
  19046. };
  19047. F[PROTOTYPE] = C[PROTOTYPE];
  19048. return F;
  19049. // make static versions for prototype methods
  19050. })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  19051. // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
  19052. if (IS_PROTO) {
  19053. (exports.virtual || (exports.virtual = {}))[key] = out;
  19054. // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
  19055. if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
  19056. }
  19057. }
  19058. };
  19059. // type bitmap
  19060. $export.F = 1; // forced
  19061. $export.G = 2; // global
  19062. $export.S = 4; // static
  19063. $export.P = 8; // proto
  19064. $export.B = 16; // bind
  19065. $export.W = 32; // wrap
  19066. $export.U = 64; // safe
  19067. $export.R = 128; // real proto method for `library`
  19068. module.exports = $export;
  19069. /***/ }),
  19070. /***/ 7929:
  19071. /***/ ((module) => {
  19072. module.exports = function (exec) {
  19073. try {
  19074. return !!exec();
  19075. } catch (e) {
  19076. return true;
  19077. }
  19078. };
  19079. /***/ }),
  19080. /***/ 33938:
  19081. /***/ ((module) => {
  19082. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  19083. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  19084. ? window : typeof self != 'undefined' && self.Math == Math ? self
  19085. // eslint-disable-next-line no-new-func
  19086. : Function('return this')();
  19087. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  19088. /***/ }),
  19089. /***/ 27069:
  19090. /***/ ((module) => {
  19091. var hasOwnProperty = {}.hasOwnProperty;
  19092. module.exports = function (it, key) {
  19093. return hasOwnProperty.call(it, key);
  19094. };
  19095. /***/ }),
  19096. /***/ 41818:
  19097. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19098. var dP = __webpack_require__(4743);
  19099. var createDesc = __webpack_require__(83101);
  19100. module.exports = __webpack_require__(89666) ? function (object, key, value) {
  19101. return dP.f(object, key, createDesc(1, value));
  19102. } : function (object, key, value) {
  19103. object[key] = value;
  19104. return object;
  19105. };
  19106. /***/ }),
  19107. /***/ 33758:
  19108. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19109. module.exports = !__webpack_require__(89666) && !__webpack_require__(7929)(function () {
  19110. return Object.defineProperty(__webpack_require__(97467)('div'), 'a', { get: function () { return 7; } }).a != 7;
  19111. });
  19112. /***/ }),
  19113. /***/ 36727:
  19114. /***/ ((module) => {
  19115. module.exports = function (it) {
  19116. return typeof it === 'object' ? it !== null : typeof it === 'function';
  19117. };
  19118. /***/ }),
  19119. /***/ 4743:
  19120. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  19121. var anObject = __webpack_require__(12159);
  19122. var IE8_DOM_DEFINE = __webpack_require__(33758);
  19123. var toPrimitive = __webpack_require__(33206);
  19124. var dP = Object.defineProperty;
  19125. exports.f = __webpack_require__(89666) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  19126. anObject(O);
  19127. P = toPrimitive(P, true);
  19128. anObject(Attributes);
  19129. if (IE8_DOM_DEFINE) try {
  19130. return dP(O, P, Attributes);
  19131. } catch (e) { /* empty */ }
  19132. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  19133. if ('value' in Attributes) O[P] = Attributes.value;
  19134. return O;
  19135. };
  19136. /***/ }),
  19137. /***/ 83101:
  19138. /***/ ((module) => {
  19139. module.exports = function (bitmap, value) {
  19140. return {
  19141. enumerable: !(bitmap & 1),
  19142. configurable: !(bitmap & 2),
  19143. writable: !(bitmap & 4),
  19144. value: value
  19145. };
  19146. };
  19147. /***/ }),
  19148. /***/ 33206:
  19149. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19150. // 7.1.1 ToPrimitive(input [, PreferredType])
  19151. var isObject = __webpack_require__(36727);
  19152. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  19153. // and the second argument - flag - preferred type is a string
  19154. module.exports = function (it, S) {
  19155. if (!isObject(it)) return it;
  19156. var fn, val;
  19157. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  19158. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  19159. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  19160. throw TypeError("Can't convert object to primitive value");
  19161. };
  19162. /***/ }),
  19163. /***/ 34579:
  19164. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  19165. // https://github.com/tc39/proposal-global
  19166. var $export = __webpack_require__(83856);
  19167. $export($export.G, { global: __webpack_require__(33938) });
  19168. /***/ }),
  19169. /***/ 24963:
  19170. /***/ ((module) => {
  19171. module.exports = function (it) {
  19172. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  19173. return it;
  19174. };
  19175. /***/ }),
  19176. /***/ 83365:
  19177. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19178. var cof = __webpack_require__(92032);
  19179. module.exports = function (it, msg) {
  19180. if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
  19181. return +it;
  19182. };
  19183. /***/ }),
  19184. /***/ 17722:
  19185. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19186. // 22.1.3.31 Array.prototype[@@unscopables]
  19187. var UNSCOPABLES = __webpack_require__(86314)('unscopables');
  19188. var ArrayProto = Array.prototype;
  19189. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(87728)(ArrayProto, UNSCOPABLES, {});
  19190. module.exports = function (key) {
  19191. ArrayProto[UNSCOPABLES][key] = true;
  19192. };
  19193. /***/ }),
  19194. /***/ 76793:
  19195. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19196. "use strict";
  19197. var at = __webpack_require__(24496)(true);
  19198. // `AdvanceStringIndex` abstract operation
  19199. // https://tc39.github.io/ecma262/#sec-advancestringindex
  19200. module.exports = function (S, index, unicode) {
  19201. return index + (unicode ? at(S, index).length : 1);
  19202. };
  19203. /***/ }),
  19204. /***/ 83328:
  19205. /***/ ((module) => {
  19206. module.exports = function (it, Constructor, name, forbiddenField) {
  19207. if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
  19208. throw TypeError(name + ': incorrect invocation!');
  19209. } return it;
  19210. };
  19211. /***/ }),
  19212. /***/ 27007:
  19213. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19214. var isObject = __webpack_require__(55286);
  19215. module.exports = function (it) {
  19216. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  19217. return it;
  19218. };
  19219. /***/ }),
  19220. /***/ 5216:
  19221. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19222. "use strict";
  19223. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  19224. var toObject = __webpack_require__(20508);
  19225. var toAbsoluteIndex = __webpack_require__(92337);
  19226. var toLength = __webpack_require__(10875);
  19227. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  19228. var O = toObject(this);
  19229. var len = toLength(O.length);
  19230. var to = toAbsoluteIndex(target, len);
  19231. var from = toAbsoluteIndex(start, len);
  19232. var end = arguments.length > 2 ? arguments[2] : undefined;
  19233. var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  19234. var inc = 1;
  19235. if (from < to && to < from + count) {
  19236. inc = -1;
  19237. from += count - 1;
  19238. to += count - 1;
  19239. }
  19240. while (count-- > 0) {
  19241. if (from in O) O[to] = O[from];
  19242. else delete O[to];
  19243. to += inc;
  19244. from += inc;
  19245. } return O;
  19246. };
  19247. /***/ }),
  19248. /***/ 46852:
  19249. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19250. "use strict";
  19251. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  19252. var toObject = __webpack_require__(20508);
  19253. var toAbsoluteIndex = __webpack_require__(92337);
  19254. var toLength = __webpack_require__(10875);
  19255. module.exports = function fill(value /* , start = 0, end = @length */) {
  19256. var O = toObject(this);
  19257. var length = toLength(O.length);
  19258. var aLen = arguments.length;
  19259. var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
  19260. var end = aLen > 2 ? arguments[2] : undefined;
  19261. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  19262. while (endPos > index) O[index++] = value;
  19263. return O;
  19264. };
  19265. /***/ }),
  19266. /***/ 79315:
  19267. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19268. // false -> Array#indexOf
  19269. // true -> Array#includes
  19270. var toIObject = __webpack_require__(22110);
  19271. var toLength = __webpack_require__(10875);
  19272. var toAbsoluteIndex = __webpack_require__(92337);
  19273. module.exports = function (IS_INCLUDES) {
  19274. return function ($this, el, fromIndex) {
  19275. var O = toIObject($this);
  19276. var length = toLength(O.length);
  19277. var index = toAbsoluteIndex(fromIndex, length);
  19278. var value;
  19279. // Array#includes uses SameValueZero equality algorithm
  19280. // eslint-disable-next-line no-self-compare
  19281. if (IS_INCLUDES && el != el) while (length > index) {
  19282. value = O[index++];
  19283. // eslint-disable-next-line no-self-compare
  19284. if (value != value) return true;
  19285. // Array#indexOf ignores holes, Array#includes - not
  19286. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  19287. if (O[index] === el) return IS_INCLUDES || index || 0;
  19288. } return !IS_INCLUDES && -1;
  19289. };
  19290. };
  19291. /***/ }),
  19292. /***/ 10050:
  19293. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19294. // 0 -> Array#forEach
  19295. // 1 -> Array#map
  19296. // 2 -> Array#filter
  19297. // 3 -> Array#some
  19298. // 4 -> Array#every
  19299. // 5 -> Array#find
  19300. // 6 -> Array#findIndex
  19301. var ctx = __webpack_require__(741);
  19302. var IObject = __webpack_require__(49797);
  19303. var toObject = __webpack_require__(20508);
  19304. var toLength = __webpack_require__(10875);
  19305. var asc = __webpack_require__(16886);
  19306. module.exports = function (TYPE, $create) {
  19307. var IS_MAP = TYPE == 1;
  19308. var IS_FILTER = TYPE == 2;
  19309. var IS_SOME = TYPE == 3;
  19310. var IS_EVERY = TYPE == 4;
  19311. var IS_FIND_INDEX = TYPE == 6;
  19312. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  19313. var create = $create || asc;
  19314. return function ($this, callbackfn, that) {
  19315. var O = toObject($this);
  19316. var self = IObject(O);
  19317. var f = ctx(callbackfn, that, 3);
  19318. var length = toLength(self.length);
  19319. var index = 0;
  19320. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  19321. var val, res;
  19322. for (;length > index; index++) if (NO_HOLES || index in self) {
  19323. val = self[index];
  19324. res = f(val, index, O);
  19325. if (TYPE) {
  19326. if (IS_MAP) result[index] = res; // map
  19327. else if (res) switch (TYPE) {
  19328. case 3: return true; // some
  19329. case 5: return val; // find
  19330. case 6: return index; // findIndex
  19331. case 2: result.push(val); // filter
  19332. } else if (IS_EVERY) return false; // every
  19333. }
  19334. }
  19335. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  19336. };
  19337. };
  19338. /***/ }),
  19339. /***/ 37628:
  19340. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19341. var aFunction = __webpack_require__(24963);
  19342. var toObject = __webpack_require__(20508);
  19343. var IObject = __webpack_require__(49797);
  19344. var toLength = __webpack_require__(10875);
  19345. module.exports = function (that, callbackfn, aLen, memo, isRight) {
  19346. aFunction(callbackfn);
  19347. var O = toObject(that);
  19348. var self = IObject(O);
  19349. var length = toLength(O.length);
  19350. var index = isRight ? length - 1 : 0;
  19351. var i = isRight ? -1 : 1;
  19352. if (aLen < 2) for (;;) {
  19353. if (index in self) {
  19354. memo = self[index];
  19355. index += i;
  19356. break;
  19357. }
  19358. index += i;
  19359. if (isRight ? index < 0 : length <= index) {
  19360. throw TypeError('Reduce of empty array with no initial value');
  19361. }
  19362. }
  19363. for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
  19364. memo = callbackfn(memo, self[index], index, O);
  19365. }
  19366. return memo;
  19367. };
  19368. /***/ }),
  19369. /***/ 42736:
  19370. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19371. var isObject = __webpack_require__(55286);
  19372. var isArray = __webpack_require__(4302);
  19373. var SPECIES = __webpack_require__(86314)('species');
  19374. module.exports = function (original) {
  19375. var C;
  19376. if (isArray(original)) {
  19377. C = original.constructor;
  19378. // cross-realm fallback
  19379. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  19380. if (isObject(C)) {
  19381. C = C[SPECIES];
  19382. if (C === null) C = undefined;
  19383. }
  19384. } return C === undefined ? Array : C;
  19385. };
  19386. /***/ }),
  19387. /***/ 16886:
  19388. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19389. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  19390. var speciesConstructor = __webpack_require__(42736);
  19391. module.exports = function (original, length) {
  19392. return new (speciesConstructor(original))(length);
  19393. };
  19394. /***/ }),
  19395. /***/ 34398:
  19396. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19397. "use strict";
  19398. var aFunction = __webpack_require__(24963);
  19399. var isObject = __webpack_require__(55286);
  19400. var invoke = __webpack_require__(97242);
  19401. var arraySlice = [].slice;
  19402. var factories = {};
  19403. var construct = function (F, len, args) {
  19404. if (!(len in factories)) {
  19405. for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
  19406. // eslint-disable-next-line no-new-func
  19407. factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
  19408. } return factories[len](F, args);
  19409. };
  19410. module.exports = Function.bind || function bind(that /* , ...args */) {
  19411. var fn = aFunction(this);
  19412. var partArgs = arraySlice.call(arguments, 1);
  19413. var bound = function (/* args... */) {
  19414. var args = partArgs.concat(arraySlice.call(arguments));
  19415. return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
  19416. };
  19417. if (isObject(fn.prototype)) bound.prototype = fn.prototype;
  19418. return bound;
  19419. };
  19420. /***/ }),
  19421. /***/ 41488:
  19422. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19423. // getting tag from 19.1.3.6 Object.prototype.toString()
  19424. var cof = __webpack_require__(92032);
  19425. var TAG = __webpack_require__(86314)('toStringTag');
  19426. // ES3 wrong here
  19427. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  19428. // fallback for IE11 Script Access Denied error
  19429. var tryGet = function (it, key) {
  19430. try {
  19431. return it[key];
  19432. } catch (e) { /* empty */ }
  19433. };
  19434. module.exports = function (it) {
  19435. var O, T, B;
  19436. return it === undefined ? 'Undefined' : it === null ? 'Null'
  19437. // @@toStringTag case
  19438. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  19439. // builtinTag case
  19440. : ARG ? cof(O)
  19441. // ES3 arguments fallback
  19442. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  19443. };
  19444. /***/ }),
  19445. /***/ 92032:
  19446. /***/ ((module) => {
  19447. var toString = {}.toString;
  19448. module.exports = function (it) {
  19449. return toString.call(it).slice(8, -1);
  19450. };
  19451. /***/ }),
  19452. /***/ 9824:
  19453. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19454. "use strict";
  19455. var dP = __webpack_require__(99275).f;
  19456. var create = __webpack_require__(42503);
  19457. var redefineAll = __webpack_require__(24408);
  19458. var ctx = __webpack_require__(741);
  19459. var anInstance = __webpack_require__(83328);
  19460. var forOf = __webpack_require__(3531);
  19461. var $iterDefine = __webpack_require__(42923);
  19462. var step = __webpack_require__(15436);
  19463. var setSpecies = __webpack_require__(2974);
  19464. var DESCRIPTORS = __webpack_require__(67057);
  19465. var fastKey = __webpack_require__(84728).fastKey;
  19466. var validate = __webpack_require__(1616);
  19467. var SIZE = DESCRIPTORS ? '_s' : 'size';
  19468. var getEntry = function (that, key) {
  19469. // fast case
  19470. var index = fastKey(key);
  19471. var entry;
  19472. if (index !== 'F') return that._i[index];
  19473. // frozen object case
  19474. for (entry = that._f; entry; entry = entry.n) {
  19475. if (entry.k == key) return entry;
  19476. }
  19477. };
  19478. module.exports = {
  19479. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  19480. var C = wrapper(function (that, iterable) {
  19481. anInstance(that, C, NAME, '_i');
  19482. that._t = NAME; // collection type
  19483. that._i = create(null); // index
  19484. that._f = undefined; // first entry
  19485. that._l = undefined; // last entry
  19486. that[SIZE] = 0; // size
  19487. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19488. });
  19489. redefineAll(C.prototype, {
  19490. // 23.1.3.1 Map.prototype.clear()
  19491. // 23.2.3.2 Set.prototype.clear()
  19492. clear: function clear() {
  19493. for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  19494. entry.r = true;
  19495. if (entry.p) entry.p = entry.p.n = undefined;
  19496. delete data[entry.i];
  19497. }
  19498. that._f = that._l = undefined;
  19499. that[SIZE] = 0;
  19500. },
  19501. // 23.1.3.3 Map.prototype.delete(key)
  19502. // 23.2.3.4 Set.prototype.delete(value)
  19503. 'delete': function (key) {
  19504. var that = validate(this, NAME);
  19505. var entry = getEntry(that, key);
  19506. if (entry) {
  19507. var next = entry.n;
  19508. var prev = entry.p;
  19509. delete that._i[entry.i];
  19510. entry.r = true;
  19511. if (prev) prev.n = next;
  19512. if (next) next.p = prev;
  19513. if (that._f == entry) that._f = next;
  19514. if (that._l == entry) that._l = prev;
  19515. that[SIZE]--;
  19516. } return !!entry;
  19517. },
  19518. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  19519. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  19520. forEach: function forEach(callbackfn /* , that = undefined */) {
  19521. validate(this, NAME);
  19522. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  19523. var entry;
  19524. while (entry = entry ? entry.n : this._f) {
  19525. f(entry.v, entry.k, this);
  19526. // revert to the last existing entry
  19527. while (entry && entry.r) entry = entry.p;
  19528. }
  19529. },
  19530. // 23.1.3.7 Map.prototype.has(key)
  19531. // 23.2.3.7 Set.prototype.has(value)
  19532. has: function has(key) {
  19533. return !!getEntry(validate(this, NAME), key);
  19534. }
  19535. });
  19536. if (DESCRIPTORS) dP(C.prototype, 'size', {
  19537. get: function () {
  19538. return validate(this, NAME)[SIZE];
  19539. }
  19540. });
  19541. return C;
  19542. },
  19543. def: function (that, key, value) {
  19544. var entry = getEntry(that, key);
  19545. var prev, index;
  19546. // change existing entry
  19547. if (entry) {
  19548. entry.v = value;
  19549. // create new entry
  19550. } else {
  19551. that._l = entry = {
  19552. i: index = fastKey(key, true), // <- index
  19553. k: key, // <- key
  19554. v: value, // <- value
  19555. p: prev = that._l, // <- previous entry
  19556. n: undefined, // <- next entry
  19557. r: false // <- removed
  19558. };
  19559. if (!that._f) that._f = entry;
  19560. if (prev) prev.n = entry;
  19561. that[SIZE]++;
  19562. // add to index
  19563. if (index !== 'F') that._i[index] = entry;
  19564. } return that;
  19565. },
  19566. getEntry: getEntry,
  19567. setStrong: function (C, NAME, IS_MAP) {
  19568. // add .keys, .values, .entries, [@@iterator]
  19569. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  19570. $iterDefine(C, NAME, function (iterated, kind) {
  19571. this._t = validate(iterated, NAME); // target
  19572. this._k = kind; // kind
  19573. this._l = undefined; // previous
  19574. }, function () {
  19575. var that = this;
  19576. var kind = that._k;
  19577. var entry = that._l;
  19578. // revert to the last existing entry
  19579. while (entry && entry.r) entry = entry.p;
  19580. // get next entry
  19581. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  19582. // or finish the iteration
  19583. that._t = undefined;
  19584. return step(1);
  19585. }
  19586. // return step by kind
  19587. if (kind == 'keys') return step(0, entry.k);
  19588. if (kind == 'values') return step(0, entry.v);
  19589. return step(0, [entry.k, entry.v]);
  19590. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  19591. // add [@@species], 23.1.2.2, 23.2.2.2
  19592. setSpecies(NAME);
  19593. }
  19594. };
  19595. /***/ }),
  19596. /***/ 23657:
  19597. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19598. "use strict";
  19599. var redefineAll = __webpack_require__(24408);
  19600. var getWeak = __webpack_require__(84728).getWeak;
  19601. var anObject = __webpack_require__(27007);
  19602. var isObject = __webpack_require__(55286);
  19603. var anInstance = __webpack_require__(83328);
  19604. var forOf = __webpack_require__(3531);
  19605. var createArrayMethod = __webpack_require__(10050);
  19606. var $has = __webpack_require__(79181);
  19607. var validate = __webpack_require__(1616);
  19608. var arrayFind = createArrayMethod(5);
  19609. var arrayFindIndex = createArrayMethod(6);
  19610. var id = 0;
  19611. // fallback for uncaught frozen keys
  19612. var uncaughtFrozenStore = function (that) {
  19613. return that._l || (that._l = new UncaughtFrozenStore());
  19614. };
  19615. var UncaughtFrozenStore = function () {
  19616. this.a = [];
  19617. };
  19618. var findUncaughtFrozen = function (store, key) {
  19619. return arrayFind(store.a, function (it) {
  19620. return it[0] === key;
  19621. });
  19622. };
  19623. UncaughtFrozenStore.prototype = {
  19624. get: function (key) {
  19625. var entry = findUncaughtFrozen(this, key);
  19626. if (entry) return entry[1];
  19627. },
  19628. has: function (key) {
  19629. return !!findUncaughtFrozen(this, key);
  19630. },
  19631. set: function (key, value) {
  19632. var entry = findUncaughtFrozen(this, key);
  19633. if (entry) entry[1] = value;
  19634. else this.a.push([key, value]);
  19635. },
  19636. 'delete': function (key) {
  19637. var index = arrayFindIndex(this.a, function (it) {
  19638. return it[0] === key;
  19639. });
  19640. if (~index) this.a.splice(index, 1);
  19641. return !!~index;
  19642. }
  19643. };
  19644. module.exports = {
  19645. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  19646. var C = wrapper(function (that, iterable) {
  19647. anInstance(that, C, NAME, '_i');
  19648. that._t = NAME; // collection type
  19649. that._i = id++; // collection id
  19650. that._l = undefined; // leak store for uncaught frozen objects
  19651. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19652. });
  19653. redefineAll(C.prototype, {
  19654. // 23.3.3.2 WeakMap.prototype.delete(key)
  19655. // 23.4.3.3 WeakSet.prototype.delete(value)
  19656. 'delete': function (key) {
  19657. if (!isObject(key)) return false;
  19658. var data = getWeak(key);
  19659. if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
  19660. return data && $has(data, this._i) && delete data[this._i];
  19661. },
  19662. // 23.3.3.4 WeakMap.prototype.has(key)
  19663. // 23.4.3.4 WeakSet.prototype.has(value)
  19664. has: function has(key) {
  19665. if (!isObject(key)) return false;
  19666. var data = getWeak(key);
  19667. if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
  19668. return data && $has(data, this._i);
  19669. }
  19670. });
  19671. return C;
  19672. },
  19673. def: function (that, key, value) {
  19674. var data = getWeak(anObject(key), true);
  19675. if (data === true) uncaughtFrozenStore(that).set(key, value);
  19676. else data[that._i] = value;
  19677. return that;
  19678. },
  19679. ufstore: uncaughtFrozenStore
  19680. };
  19681. /***/ }),
  19682. /***/ 45795:
  19683. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19684. "use strict";
  19685. var global = __webpack_require__(3816);
  19686. var $export = __webpack_require__(42985);
  19687. var redefine = __webpack_require__(77234);
  19688. var redefineAll = __webpack_require__(24408);
  19689. var meta = __webpack_require__(84728);
  19690. var forOf = __webpack_require__(3531);
  19691. var anInstance = __webpack_require__(83328);
  19692. var isObject = __webpack_require__(55286);
  19693. var fails = __webpack_require__(74253);
  19694. var $iterDetect = __webpack_require__(7462);
  19695. var setToStringTag = __webpack_require__(22943);
  19696. var inheritIfRequired = __webpack_require__(40266);
  19697. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  19698. var Base = global[NAME];
  19699. var C = Base;
  19700. var ADDER = IS_MAP ? 'set' : 'add';
  19701. var proto = C && C.prototype;
  19702. var O = {};
  19703. var fixMethod = function (KEY) {
  19704. var fn = proto[KEY];
  19705. redefine(proto, KEY,
  19706. KEY == 'delete' ? function (a) {
  19707. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  19708. } : KEY == 'has' ? function has(a) {
  19709. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  19710. } : KEY == 'get' ? function get(a) {
  19711. return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  19712. } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
  19713. : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
  19714. );
  19715. };
  19716. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  19717. new C().entries().next();
  19718. }))) {
  19719. // create collection constructor
  19720. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  19721. redefineAll(C.prototype, methods);
  19722. meta.NEED = true;
  19723. } else {
  19724. var instance = new C();
  19725. // early implementations not supports chaining
  19726. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  19727. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  19728. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  19729. // most early implementations doesn't supports iterables, most modern - not close it correctly
  19730. var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
  19731. // for early implementations -0 and +0 not the same
  19732. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  19733. // V8 ~ Chromium 42- fails only with 5+ elements
  19734. var $instance = new C();
  19735. var index = 5;
  19736. while (index--) $instance[ADDER](index, index);
  19737. return !$instance.has(-0);
  19738. });
  19739. if (!ACCEPT_ITERABLES) {
  19740. C = wrapper(function (target, iterable) {
  19741. anInstance(target, C, NAME);
  19742. var that = inheritIfRequired(new Base(), target, C);
  19743. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19744. return that;
  19745. });
  19746. C.prototype = proto;
  19747. proto.constructor = C;
  19748. }
  19749. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  19750. fixMethod('delete');
  19751. fixMethod('has');
  19752. IS_MAP && fixMethod('get');
  19753. }
  19754. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  19755. // weak collections should not contains .clear method
  19756. if (IS_WEAK && proto.clear) delete proto.clear;
  19757. }
  19758. setToStringTag(C, NAME);
  19759. O[NAME] = C;
  19760. $export($export.G + $export.W + $export.F * (C != Base), O);
  19761. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  19762. return C;
  19763. };
  19764. /***/ }),
  19765. /***/ 25645:
  19766. /***/ ((module) => {
  19767. var core = module.exports = { version: '2.6.12' };
  19768. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  19769. /***/ }),
  19770. /***/ 92811:
  19771. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19772. "use strict";
  19773. var $defineProperty = __webpack_require__(99275);
  19774. var createDesc = __webpack_require__(90681);
  19775. module.exports = function (object, index, value) {
  19776. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  19777. else object[index] = value;
  19778. };
  19779. /***/ }),
  19780. /***/ 741:
  19781. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19782. // optional / simple context binding
  19783. var aFunction = __webpack_require__(24963);
  19784. module.exports = function (fn, that, length) {
  19785. aFunction(fn);
  19786. if (that === undefined) return fn;
  19787. switch (length) {
  19788. case 1: return function (a) {
  19789. return fn.call(that, a);
  19790. };
  19791. case 2: return function (a, b) {
  19792. return fn.call(that, a, b);
  19793. };
  19794. case 3: return function (a, b, c) {
  19795. return fn.call(that, a, b, c);
  19796. };
  19797. }
  19798. return function (/* ...args */) {
  19799. return fn.apply(that, arguments);
  19800. };
  19801. };
  19802. /***/ }),
  19803. /***/ 53537:
  19804. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19805. "use strict";
  19806. // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
  19807. var fails = __webpack_require__(74253);
  19808. var getTime = Date.prototype.getTime;
  19809. var $toISOString = Date.prototype.toISOString;
  19810. var lz = function (num) {
  19811. return num > 9 ? num : '0' + num;
  19812. };
  19813. // PhantomJS / old WebKit has a broken implementations
  19814. module.exports = (fails(function () {
  19815. return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
  19816. }) || !fails(function () {
  19817. $toISOString.call(new Date(NaN));
  19818. })) ? function toISOString() {
  19819. if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
  19820. var d = this;
  19821. var y = d.getUTCFullYear();
  19822. var m = d.getUTCMilliseconds();
  19823. var s = y < 0 ? '-' : y > 9999 ? '+' : '';
  19824. return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
  19825. '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
  19826. 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
  19827. ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
  19828. } : $toISOString;
  19829. /***/ }),
  19830. /***/ 870:
  19831. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19832. "use strict";
  19833. var anObject = __webpack_require__(27007);
  19834. var toPrimitive = __webpack_require__(21689);
  19835. var NUMBER = 'number';
  19836. module.exports = function (hint) {
  19837. if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
  19838. return toPrimitive(anObject(this), hint != NUMBER);
  19839. };
  19840. /***/ }),
  19841. /***/ 91355:
  19842. /***/ ((module) => {
  19843. // 7.2.1 RequireObjectCoercible(argument)
  19844. module.exports = function (it) {
  19845. if (it == undefined) throw TypeError("Can't call method on " + it);
  19846. return it;
  19847. };
  19848. /***/ }),
  19849. /***/ 67057:
  19850. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19851. // Thank's IE8 for his funny defineProperty
  19852. module.exports = !__webpack_require__(74253)(function () {
  19853. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  19854. });
  19855. /***/ }),
  19856. /***/ 62457:
  19857. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19858. var isObject = __webpack_require__(55286);
  19859. var document = __webpack_require__(3816).document;
  19860. // typeof document.createElement is 'object' in old IE
  19861. var is = isObject(document) && isObject(document.createElement);
  19862. module.exports = function (it) {
  19863. return is ? document.createElement(it) : {};
  19864. };
  19865. /***/ }),
  19866. /***/ 74430:
  19867. /***/ ((module) => {
  19868. // IE 8- don't enum bug keys
  19869. module.exports = (
  19870. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  19871. ).split(',');
  19872. /***/ }),
  19873. /***/ 5541:
  19874. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19875. // all enumerable object keys, includes symbols
  19876. var getKeys = __webpack_require__(47184);
  19877. var gOPS = __webpack_require__(64548);
  19878. var pIE = __webpack_require__(14682);
  19879. module.exports = function (it) {
  19880. var result = getKeys(it);
  19881. var getSymbols = gOPS.f;
  19882. if (getSymbols) {
  19883. var symbols = getSymbols(it);
  19884. var isEnum = pIE.f;
  19885. var i = 0;
  19886. var key;
  19887. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  19888. } return result;
  19889. };
  19890. /***/ }),
  19891. /***/ 42985:
  19892. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19893. var global = __webpack_require__(3816);
  19894. var core = __webpack_require__(25645);
  19895. var hide = __webpack_require__(87728);
  19896. var redefine = __webpack_require__(77234);
  19897. var ctx = __webpack_require__(741);
  19898. var PROTOTYPE = 'prototype';
  19899. var $export = function (type, name, source) {
  19900. var IS_FORCED = type & $export.F;
  19901. var IS_GLOBAL = type & $export.G;
  19902. var IS_STATIC = type & $export.S;
  19903. var IS_PROTO = type & $export.P;
  19904. var IS_BIND = type & $export.B;
  19905. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  19906. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  19907. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  19908. var key, own, out, exp;
  19909. if (IS_GLOBAL) source = name;
  19910. for (key in source) {
  19911. // contains in native
  19912. own = !IS_FORCED && target && target[key] !== undefined;
  19913. // export native or passed
  19914. out = (own ? target : source)[key];
  19915. // bind timers to global for call from export context
  19916. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  19917. // extend global
  19918. if (target) redefine(target, key, out, type & $export.U);
  19919. // export
  19920. if (exports[key] != out) hide(exports, key, exp);
  19921. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  19922. }
  19923. };
  19924. global.core = core;
  19925. // type bitmap
  19926. $export.F = 1; // forced
  19927. $export.G = 2; // global
  19928. $export.S = 4; // static
  19929. $export.P = 8; // proto
  19930. $export.B = 16; // bind
  19931. $export.W = 32; // wrap
  19932. $export.U = 64; // safe
  19933. $export.R = 128; // real proto method for `library`
  19934. module.exports = $export;
  19935. /***/ }),
  19936. /***/ 8852:
  19937. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19938. var MATCH = __webpack_require__(86314)('match');
  19939. module.exports = function (KEY) {
  19940. var re = /./;
  19941. try {
  19942. '/./'[KEY](re);
  19943. } catch (e) {
  19944. try {
  19945. re[MATCH] = false;
  19946. return !'/./'[KEY](re);
  19947. } catch (f) { /* empty */ }
  19948. } return true;
  19949. };
  19950. /***/ }),
  19951. /***/ 74253:
  19952. /***/ ((module) => {
  19953. module.exports = function (exec) {
  19954. try {
  19955. return !!exec();
  19956. } catch (e) {
  19957. return true;
  19958. }
  19959. };
  19960. /***/ }),
  19961. /***/ 28082:
  19962. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19963. "use strict";
  19964. __webpack_require__(18269);
  19965. var redefine = __webpack_require__(77234);
  19966. var hide = __webpack_require__(87728);
  19967. var fails = __webpack_require__(74253);
  19968. var defined = __webpack_require__(91355);
  19969. var wks = __webpack_require__(86314);
  19970. var regexpExec = __webpack_require__(21165);
  19971. var SPECIES = wks('species');
  19972. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  19973. // #replace needs built-in support for named groups.
  19974. // #match works fine because it just return the exec results, even if it has
  19975. // a "grops" property.
  19976. var re = /./;
  19977. re.exec = function () {
  19978. var result = [];
  19979. result.groups = { a: '7' };
  19980. return result;
  19981. };
  19982. return ''.replace(re, '$<a>') !== '7';
  19983. });
  19984. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
  19985. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  19986. var re = /(?:)/;
  19987. var originalExec = re.exec;
  19988. re.exec = function () { return originalExec.apply(this, arguments); };
  19989. var result = 'ab'.split(re);
  19990. return result.length === 2 && result[0] === 'a' && result[1] === 'b';
  19991. })();
  19992. module.exports = function (KEY, length, exec) {
  19993. var SYMBOL = wks(KEY);
  19994. var DELEGATES_TO_SYMBOL = !fails(function () {
  19995. // String methods call symbol-named RegEp methods
  19996. var O = {};
  19997. O[SYMBOL] = function () { return 7; };
  19998. return ''[KEY](O) != 7;
  19999. });
  20000. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
  20001. // Symbol-named RegExp methods call .exec
  20002. var execCalled = false;
  20003. var re = /a/;
  20004. re.exec = function () { execCalled = true; return null; };
  20005. if (KEY === 'split') {
  20006. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  20007. // a new one. We need to return the patched regex when creating the new one.
  20008. re.constructor = {};
  20009. re.constructor[SPECIES] = function () { return re; };
  20010. }
  20011. re[SYMBOL]('');
  20012. return !execCalled;
  20013. }) : undefined;
  20014. if (
  20015. !DELEGATES_TO_SYMBOL ||
  20016. !DELEGATES_TO_EXEC ||
  20017. (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
  20018. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  20019. ) {
  20020. var nativeRegExpMethod = /./[SYMBOL];
  20021. var fns = exec(
  20022. defined,
  20023. SYMBOL,
  20024. ''[KEY],
  20025. function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
  20026. if (regexp.exec === regexpExec) {
  20027. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  20028. // The native String method already delegates to @@method (this
  20029. // polyfilled function), leasing to infinite recursion.
  20030. // We avoid it by directly calling the native @@method method.
  20031. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  20032. }
  20033. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  20034. }
  20035. return { done: false };
  20036. }
  20037. );
  20038. var strfn = fns[0];
  20039. var rxfn = fns[1];
  20040. redefine(String.prototype, KEY, strfn);
  20041. hide(RegExp.prototype, SYMBOL, length == 2
  20042. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  20043. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  20044. ? function (string, arg) { return rxfn.call(string, this, arg); }
  20045. // 21.2.5.6 RegExp.prototype[@@match](string)
  20046. // 21.2.5.9 RegExp.prototype[@@search](string)
  20047. : function (string) { return rxfn.call(string, this); }
  20048. );
  20049. }
  20050. };
  20051. /***/ }),
  20052. /***/ 53218:
  20053. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20054. "use strict";
  20055. // 21.2.5.3 get RegExp.prototype.flags
  20056. var anObject = __webpack_require__(27007);
  20057. module.exports = function () {
  20058. var that = anObject(this);
  20059. var result = '';
  20060. if (that.global) result += 'g';
  20061. if (that.ignoreCase) result += 'i';
  20062. if (that.multiline) result += 'm';
  20063. if (that.unicode) result += 'u';
  20064. if (that.sticky) result += 'y';
  20065. return result;
  20066. };
  20067. /***/ }),
  20068. /***/ 13325:
  20069. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20070. "use strict";
  20071. // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
  20072. var isArray = __webpack_require__(4302);
  20073. var isObject = __webpack_require__(55286);
  20074. var toLength = __webpack_require__(10875);
  20075. var ctx = __webpack_require__(741);
  20076. var IS_CONCAT_SPREADABLE = __webpack_require__(86314)('isConcatSpreadable');
  20077. function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
  20078. var targetIndex = start;
  20079. var sourceIndex = 0;
  20080. var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
  20081. var element, spreadable;
  20082. while (sourceIndex < sourceLen) {
  20083. if (sourceIndex in source) {
  20084. element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
  20085. spreadable = false;
  20086. if (isObject(element)) {
  20087. spreadable = element[IS_CONCAT_SPREADABLE];
  20088. spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
  20089. }
  20090. if (spreadable && depth > 0) {
  20091. targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
  20092. } else {
  20093. if (targetIndex >= 0x1fffffffffffff) throw TypeError();
  20094. target[targetIndex] = element;
  20095. }
  20096. targetIndex++;
  20097. }
  20098. sourceIndex++;
  20099. }
  20100. return targetIndex;
  20101. }
  20102. module.exports = flattenIntoArray;
  20103. /***/ }),
  20104. /***/ 3531:
  20105. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20106. var ctx = __webpack_require__(741);
  20107. var call = __webpack_require__(28851);
  20108. var isArrayIter = __webpack_require__(86555);
  20109. var anObject = __webpack_require__(27007);
  20110. var toLength = __webpack_require__(10875);
  20111. var getIterFn = __webpack_require__(69002);
  20112. var BREAK = {};
  20113. var RETURN = {};
  20114. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  20115. var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  20116. var f = ctx(fn, that, entries ? 2 : 1);
  20117. var index = 0;
  20118. var length, step, iterator, result;
  20119. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  20120. // fast case for arrays with default iterator
  20121. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  20122. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  20123. if (result === BREAK || result === RETURN) return result;
  20124. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  20125. result = call(iterator, f, step.value, entries);
  20126. if (result === BREAK || result === RETURN) return result;
  20127. }
  20128. };
  20129. exports.BREAK = BREAK;
  20130. exports.RETURN = RETURN;
  20131. /***/ }),
  20132. /***/ 40018:
  20133. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20134. module.exports = __webpack_require__(3825)('native-function-to-string', Function.toString);
  20135. /***/ }),
  20136. /***/ 3816:
  20137. /***/ ((module) => {
  20138. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  20139. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  20140. ? window : typeof self != 'undefined' && self.Math == Math ? self
  20141. // eslint-disable-next-line no-new-func
  20142. : Function('return this')();
  20143. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  20144. /***/ }),
  20145. /***/ 79181:
  20146. /***/ ((module) => {
  20147. var hasOwnProperty = {}.hasOwnProperty;
  20148. module.exports = function (it, key) {
  20149. return hasOwnProperty.call(it, key);
  20150. };
  20151. /***/ }),
  20152. /***/ 87728:
  20153. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20154. var dP = __webpack_require__(99275);
  20155. var createDesc = __webpack_require__(90681);
  20156. module.exports = __webpack_require__(67057) ? function (object, key, value) {
  20157. return dP.f(object, key, createDesc(1, value));
  20158. } : function (object, key, value) {
  20159. object[key] = value;
  20160. return object;
  20161. };
  20162. /***/ }),
  20163. /***/ 40639:
  20164. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20165. var document = __webpack_require__(3816).document;
  20166. module.exports = document && document.documentElement;
  20167. /***/ }),
  20168. /***/ 1734:
  20169. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20170. module.exports = !__webpack_require__(67057) && !__webpack_require__(74253)(function () {
  20171. return Object.defineProperty(__webpack_require__(62457)('div'), 'a', { get: function () { return 7; } }).a != 7;
  20172. });
  20173. /***/ }),
  20174. /***/ 40266:
  20175. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20176. var isObject = __webpack_require__(55286);
  20177. var setPrototypeOf = __webpack_require__(27375).set;
  20178. module.exports = function (that, target, C) {
  20179. var S = target.constructor;
  20180. var P;
  20181. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  20182. setPrototypeOf(that, P);
  20183. } return that;
  20184. };
  20185. /***/ }),
  20186. /***/ 97242:
  20187. /***/ ((module) => {
  20188. // fast apply, http://jsperf.lnkit.com/fast-apply/5
  20189. module.exports = function (fn, args, that) {
  20190. var un = that === undefined;
  20191. switch (args.length) {
  20192. case 0: return un ? fn()
  20193. : fn.call(that);
  20194. case 1: return un ? fn(args[0])
  20195. : fn.call(that, args[0]);
  20196. case 2: return un ? fn(args[0], args[1])
  20197. : fn.call(that, args[0], args[1]);
  20198. case 3: return un ? fn(args[0], args[1], args[2])
  20199. : fn.call(that, args[0], args[1], args[2]);
  20200. case 4: return un ? fn(args[0], args[1], args[2], args[3])
  20201. : fn.call(that, args[0], args[1], args[2], args[3]);
  20202. } return fn.apply(that, args);
  20203. };
  20204. /***/ }),
  20205. /***/ 49797:
  20206. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20207. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  20208. var cof = __webpack_require__(92032);
  20209. // eslint-disable-next-line no-prototype-builtins
  20210. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  20211. return cof(it) == 'String' ? it.split('') : Object(it);
  20212. };
  20213. /***/ }),
  20214. /***/ 86555:
  20215. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20216. // check on default Array iterator
  20217. var Iterators = __webpack_require__(87234);
  20218. var ITERATOR = __webpack_require__(86314)('iterator');
  20219. var ArrayProto = Array.prototype;
  20220. module.exports = function (it) {
  20221. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  20222. };
  20223. /***/ }),
  20224. /***/ 4302:
  20225. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20226. // 7.2.2 IsArray(argument)
  20227. var cof = __webpack_require__(92032);
  20228. module.exports = Array.isArray || function isArray(arg) {
  20229. return cof(arg) == 'Array';
  20230. };
  20231. /***/ }),
  20232. /***/ 18367:
  20233. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20234. // 20.1.2.3 Number.isInteger(number)
  20235. var isObject = __webpack_require__(55286);
  20236. var floor = Math.floor;
  20237. module.exports = function isInteger(it) {
  20238. return !isObject(it) && isFinite(it) && floor(it) === it;
  20239. };
  20240. /***/ }),
  20241. /***/ 55286:
  20242. /***/ ((module) => {
  20243. module.exports = function (it) {
  20244. return typeof it === 'object' ? it !== null : typeof it === 'function';
  20245. };
  20246. /***/ }),
  20247. /***/ 55364:
  20248. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20249. // 7.2.8 IsRegExp(argument)
  20250. var isObject = __webpack_require__(55286);
  20251. var cof = __webpack_require__(92032);
  20252. var MATCH = __webpack_require__(86314)('match');
  20253. module.exports = function (it) {
  20254. var isRegExp;
  20255. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
  20256. };
  20257. /***/ }),
  20258. /***/ 28851:
  20259. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20260. // call something on iterator step with safe closing on error
  20261. var anObject = __webpack_require__(27007);
  20262. module.exports = function (iterator, fn, value, entries) {
  20263. try {
  20264. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  20265. // 7.4.6 IteratorClose(iterator, completion)
  20266. } catch (e) {
  20267. var ret = iterator['return'];
  20268. if (ret !== undefined) anObject(ret.call(iterator));
  20269. throw e;
  20270. }
  20271. };
  20272. /***/ }),
  20273. /***/ 49988:
  20274. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20275. "use strict";
  20276. var create = __webpack_require__(42503);
  20277. var descriptor = __webpack_require__(90681);
  20278. var setToStringTag = __webpack_require__(22943);
  20279. var IteratorPrototype = {};
  20280. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  20281. __webpack_require__(87728)(IteratorPrototype, __webpack_require__(86314)('iterator'), function () { return this; });
  20282. module.exports = function (Constructor, NAME, next) {
  20283. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  20284. setToStringTag(Constructor, NAME + ' Iterator');
  20285. };
  20286. /***/ }),
  20287. /***/ 42923:
  20288. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20289. "use strict";
  20290. var LIBRARY = __webpack_require__(4461);
  20291. var $export = __webpack_require__(42985);
  20292. var redefine = __webpack_require__(77234);
  20293. var hide = __webpack_require__(87728);
  20294. var Iterators = __webpack_require__(87234);
  20295. var $iterCreate = __webpack_require__(49988);
  20296. var setToStringTag = __webpack_require__(22943);
  20297. var getPrototypeOf = __webpack_require__(468);
  20298. var ITERATOR = __webpack_require__(86314)('iterator');
  20299. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  20300. var FF_ITERATOR = '@@iterator';
  20301. var KEYS = 'keys';
  20302. var VALUES = 'values';
  20303. var returnThis = function () { return this; };
  20304. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  20305. $iterCreate(Constructor, NAME, next);
  20306. var getMethod = function (kind) {
  20307. if (!BUGGY && kind in proto) return proto[kind];
  20308. switch (kind) {
  20309. case KEYS: return function keys() { return new Constructor(this, kind); };
  20310. case VALUES: return function values() { return new Constructor(this, kind); };
  20311. } return function entries() { return new Constructor(this, kind); };
  20312. };
  20313. var TAG = NAME + ' Iterator';
  20314. var DEF_VALUES = DEFAULT == VALUES;
  20315. var VALUES_BUG = false;
  20316. var proto = Base.prototype;
  20317. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  20318. var $default = $native || getMethod(DEFAULT);
  20319. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  20320. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  20321. var methods, key, IteratorPrototype;
  20322. // Fix native
  20323. if ($anyNative) {
  20324. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  20325. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  20326. // Set @@toStringTag to native iterators
  20327. setToStringTag(IteratorPrototype, TAG, true);
  20328. // fix for some old engines
  20329. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  20330. }
  20331. }
  20332. // fix Array#{values, @@iterator}.name in V8 / FF
  20333. if (DEF_VALUES && $native && $native.name !== VALUES) {
  20334. VALUES_BUG = true;
  20335. $default = function values() { return $native.call(this); };
  20336. }
  20337. // Define iterator
  20338. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  20339. hide(proto, ITERATOR, $default);
  20340. }
  20341. // Plug for library
  20342. Iterators[NAME] = $default;
  20343. Iterators[TAG] = returnThis;
  20344. if (DEFAULT) {
  20345. methods = {
  20346. values: DEF_VALUES ? $default : getMethod(VALUES),
  20347. keys: IS_SET ? $default : getMethod(KEYS),
  20348. entries: $entries
  20349. };
  20350. if (FORCED) for (key in methods) {
  20351. if (!(key in proto)) redefine(proto, key, methods[key]);
  20352. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  20353. }
  20354. return methods;
  20355. };
  20356. /***/ }),
  20357. /***/ 7462:
  20358. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20359. var ITERATOR = __webpack_require__(86314)('iterator');
  20360. var SAFE_CLOSING = false;
  20361. try {
  20362. var riter = [7][ITERATOR]();
  20363. riter['return'] = function () { SAFE_CLOSING = true; };
  20364. // eslint-disable-next-line no-throw-literal
  20365. Array.from(riter, function () { throw 2; });
  20366. } catch (e) { /* empty */ }
  20367. module.exports = function (exec, skipClosing) {
  20368. if (!skipClosing && !SAFE_CLOSING) return false;
  20369. var safe = false;
  20370. try {
  20371. var arr = [7];
  20372. var iter = arr[ITERATOR]();
  20373. iter.next = function () { return { done: safe = true }; };
  20374. arr[ITERATOR] = function () { return iter; };
  20375. exec(arr);
  20376. } catch (e) { /* empty */ }
  20377. return safe;
  20378. };
  20379. /***/ }),
  20380. /***/ 15436:
  20381. /***/ ((module) => {
  20382. module.exports = function (done, value) {
  20383. return { value: value, done: !!done };
  20384. };
  20385. /***/ }),
  20386. /***/ 87234:
  20387. /***/ ((module) => {
  20388. module.exports = {};
  20389. /***/ }),
  20390. /***/ 4461:
  20391. /***/ ((module) => {
  20392. module.exports = false;
  20393. /***/ }),
  20394. /***/ 13086:
  20395. /***/ ((module) => {
  20396. // 20.2.2.14 Math.expm1(x)
  20397. var $expm1 = Math.expm1;
  20398. module.exports = (!$expm1
  20399. // Old FF bug
  20400. || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
  20401. // Tor Browser bug
  20402. || $expm1(-2e-17) != -2e-17
  20403. ) ? function expm1(x) {
  20404. return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
  20405. } : $expm1;
  20406. /***/ }),
  20407. /***/ 34934:
  20408. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20409. // 20.2.2.16 Math.fround(x)
  20410. var sign = __webpack_require__(61801);
  20411. var pow = Math.pow;
  20412. var EPSILON = pow(2, -52);
  20413. var EPSILON32 = pow(2, -23);
  20414. var MAX32 = pow(2, 127) * (2 - EPSILON32);
  20415. var MIN32 = pow(2, -126);
  20416. var roundTiesToEven = function (n) {
  20417. return n + 1 / EPSILON - 1 / EPSILON;
  20418. };
  20419. module.exports = Math.fround || function fround(x) {
  20420. var $abs = Math.abs(x);
  20421. var $sign = sign(x);
  20422. var a, result;
  20423. if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
  20424. a = (1 + EPSILON32 / EPSILON) * $abs;
  20425. result = a - (a - $abs);
  20426. // eslint-disable-next-line no-self-compare
  20427. if (result > MAX32 || result != result) return $sign * Infinity;
  20428. return $sign * result;
  20429. };
  20430. /***/ }),
  20431. /***/ 46206:
  20432. /***/ ((module) => {
  20433. // 20.2.2.20 Math.log1p(x)
  20434. module.exports = Math.log1p || function log1p(x) {
  20435. return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
  20436. };
  20437. /***/ }),
  20438. /***/ 61801:
  20439. /***/ ((module) => {
  20440. // 20.2.2.28 Math.sign(x)
  20441. module.exports = Math.sign || function sign(x) {
  20442. // eslint-disable-next-line no-self-compare
  20443. return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
  20444. };
  20445. /***/ }),
  20446. /***/ 84728:
  20447. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20448. var META = __webpack_require__(93953)('meta');
  20449. var isObject = __webpack_require__(55286);
  20450. var has = __webpack_require__(79181);
  20451. var setDesc = __webpack_require__(99275).f;
  20452. var id = 0;
  20453. var isExtensible = Object.isExtensible || function () {
  20454. return true;
  20455. };
  20456. var FREEZE = !__webpack_require__(74253)(function () {
  20457. return isExtensible(Object.preventExtensions({}));
  20458. });
  20459. var setMeta = function (it) {
  20460. setDesc(it, META, { value: {
  20461. i: 'O' + ++id, // object ID
  20462. w: {} // weak collections IDs
  20463. } });
  20464. };
  20465. var fastKey = function (it, create) {
  20466. // return primitive with prefix
  20467. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  20468. if (!has(it, META)) {
  20469. // can't set metadata to uncaught frozen object
  20470. if (!isExtensible(it)) return 'F';
  20471. // not necessary to add metadata
  20472. if (!create) return 'E';
  20473. // add missing metadata
  20474. setMeta(it);
  20475. // return object ID
  20476. } return it[META].i;
  20477. };
  20478. var getWeak = function (it, create) {
  20479. if (!has(it, META)) {
  20480. // can't set metadata to uncaught frozen object
  20481. if (!isExtensible(it)) return true;
  20482. // not necessary to add metadata
  20483. if (!create) return false;
  20484. // add missing metadata
  20485. setMeta(it);
  20486. // return hash weak collections IDs
  20487. } return it[META].w;
  20488. };
  20489. // add metadata on freeze-family methods calling
  20490. var onFreeze = function (it) {
  20491. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  20492. return it;
  20493. };
  20494. var meta = module.exports = {
  20495. KEY: META,
  20496. NEED: false,
  20497. fastKey: fastKey,
  20498. getWeak: getWeak,
  20499. onFreeze: onFreeze
  20500. };
  20501. /***/ }),
  20502. /***/ 14351:
  20503. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20504. var global = __webpack_require__(3816);
  20505. var macrotask = __webpack_require__(74193).set;
  20506. var Observer = global.MutationObserver || global.WebKitMutationObserver;
  20507. var process = global.process;
  20508. var Promise = global.Promise;
  20509. var isNode = __webpack_require__(92032)(process) == 'process';
  20510. module.exports = function () {
  20511. var head, last, notify;
  20512. var flush = function () {
  20513. var parent, fn;
  20514. if (isNode && (parent = process.domain)) parent.exit();
  20515. while (head) {
  20516. fn = head.fn;
  20517. head = head.next;
  20518. try {
  20519. fn();
  20520. } catch (e) {
  20521. if (head) notify();
  20522. else last = undefined;
  20523. throw e;
  20524. }
  20525. } last = undefined;
  20526. if (parent) parent.enter();
  20527. };
  20528. // Node.js
  20529. if (isNode) {
  20530. notify = function () {
  20531. process.nextTick(flush);
  20532. };
  20533. // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  20534. } else if (Observer && !(global.navigator && global.navigator.standalone)) {
  20535. var toggle = true;
  20536. var node = document.createTextNode('');
  20537. new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
  20538. notify = function () {
  20539. node.data = toggle = !toggle;
  20540. };
  20541. // environments with maybe non-completely correct, but existent Promise
  20542. } else if (Promise && Promise.resolve) {
  20543. // Promise.resolve without an argument throws an error in LG WebOS 2
  20544. var promise = Promise.resolve(undefined);
  20545. notify = function () {
  20546. promise.then(flush);
  20547. };
  20548. // for other environments - macrotask based on:
  20549. // - setImmediate
  20550. // - MessageChannel
  20551. // - window.postMessag
  20552. // - onreadystatechange
  20553. // - setTimeout
  20554. } else {
  20555. notify = function () {
  20556. // strange IE + webpack dev server bug - use .call(global)
  20557. macrotask.call(global, flush);
  20558. };
  20559. }
  20560. return function (fn) {
  20561. var task = { fn: fn, next: undefined };
  20562. if (last) last.next = task;
  20563. if (!head) {
  20564. head = task;
  20565. notify();
  20566. } last = task;
  20567. };
  20568. };
  20569. /***/ }),
  20570. /***/ 43499:
  20571. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20572. "use strict";
  20573. // 25.4.1.5 NewPromiseCapability(C)
  20574. var aFunction = __webpack_require__(24963);
  20575. function PromiseCapability(C) {
  20576. var resolve, reject;
  20577. this.promise = new C(function ($$resolve, $$reject) {
  20578. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  20579. resolve = $$resolve;
  20580. reject = $$reject;
  20581. });
  20582. this.resolve = aFunction(resolve);
  20583. this.reject = aFunction(reject);
  20584. }
  20585. module.exports.f = function (C) {
  20586. return new PromiseCapability(C);
  20587. };
  20588. /***/ }),
  20589. /***/ 35345:
  20590. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20591. "use strict";
  20592. // 19.1.2.1 Object.assign(target, source, ...)
  20593. var DESCRIPTORS = __webpack_require__(67057);
  20594. var getKeys = __webpack_require__(47184);
  20595. var gOPS = __webpack_require__(64548);
  20596. var pIE = __webpack_require__(14682);
  20597. var toObject = __webpack_require__(20508);
  20598. var IObject = __webpack_require__(49797);
  20599. var $assign = Object.assign;
  20600. // should work with symbols and should have deterministic property order (V8 bug)
  20601. module.exports = !$assign || __webpack_require__(74253)(function () {
  20602. var A = {};
  20603. var B = {};
  20604. // eslint-disable-next-line no-undef
  20605. var S = Symbol();
  20606. var K = 'abcdefghijklmnopqrst';
  20607. A[S] = 7;
  20608. K.split('').forEach(function (k) { B[k] = k; });
  20609. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  20610. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  20611. var T = toObject(target);
  20612. var aLen = arguments.length;
  20613. var index = 1;
  20614. var getSymbols = gOPS.f;
  20615. var isEnum = pIE.f;
  20616. while (aLen > index) {
  20617. var S = IObject(arguments[index++]);
  20618. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  20619. var length = keys.length;
  20620. var j = 0;
  20621. var key;
  20622. while (length > j) {
  20623. key = keys[j++];
  20624. if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
  20625. }
  20626. } return T;
  20627. } : $assign;
  20628. /***/ }),
  20629. /***/ 42503:
  20630. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20631. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  20632. var anObject = __webpack_require__(27007);
  20633. var dPs = __webpack_require__(35588);
  20634. var enumBugKeys = __webpack_require__(74430);
  20635. var IE_PROTO = __webpack_require__(69335)('IE_PROTO');
  20636. var Empty = function () { /* empty */ };
  20637. var PROTOTYPE = 'prototype';
  20638. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  20639. var createDict = function () {
  20640. // Thrash, waste and sodomy: IE GC bug
  20641. var iframe = __webpack_require__(62457)('iframe');
  20642. var i = enumBugKeys.length;
  20643. var lt = '<';
  20644. var gt = '>';
  20645. var iframeDocument;
  20646. iframe.style.display = 'none';
  20647. __webpack_require__(40639).appendChild(iframe);
  20648. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  20649. // createDict = iframe.contentWindow.Object;
  20650. // html.removeChild(iframe);
  20651. iframeDocument = iframe.contentWindow.document;
  20652. iframeDocument.open();
  20653. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  20654. iframeDocument.close();
  20655. createDict = iframeDocument.F;
  20656. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  20657. return createDict();
  20658. };
  20659. module.exports = Object.create || function create(O, Properties) {
  20660. var result;
  20661. if (O !== null) {
  20662. Empty[PROTOTYPE] = anObject(O);
  20663. result = new Empty();
  20664. Empty[PROTOTYPE] = null;
  20665. // add "__proto__" for Object.getPrototypeOf polyfill
  20666. result[IE_PROTO] = O;
  20667. } else result = createDict();
  20668. return Properties === undefined ? result : dPs(result, Properties);
  20669. };
  20670. /***/ }),
  20671. /***/ 99275:
  20672. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  20673. var anObject = __webpack_require__(27007);
  20674. var IE8_DOM_DEFINE = __webpack_require__(1734);
  20675. var toPrimitive = __webpack_require__(21689);
  20676. var dP = Object.defineProperty;
  20677. exports.f = __webpack_require__(67057) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  20678. anObject(O);
  20679. P = toPrimitive(P, true);
  20680. anObject(Attributes);
  20681. if (IE8_DOM_DEFINE) try {
  20682. return dP(O, P, Attributes);
  20683. } catch (e) { /* empty */ }
  20684. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  20685. if ('value' in Attributes) O[P] = Attributes.value;
  20686. return O;
  20687. };
  20688. /***/ }),
  20689. /***/ 35588:
  20690. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20691. var dP = __webpack_require__(99275);
  20692. var anObject = __webpack_require__(27007);
  20693. var getKeys = __webpack_require__(47184);
  20694. module.exports = __webpack_require__(67057) ? Object.defineProperties : function defineProperties(O, Properties) {
  20695. anObject(O);
  20696. var keys = getKeys(Properties);
  20697. var length = keys.length;
  20698. var i = 0;
  20699. var P;
  20700. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  20701. return O;
  20702. };
  20703. /***/ }),
  20704. /***/ 18693:
  20705. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  20706. var pIE = __webpack_require__(14682);
  20707. var createDesc = __webpack_require__(90681);
  20708. var toIObject = __webpack_require__(22110);
  20709. var toPrimitive = __webpack_require__(21689);
  20710. var has = __webpack_require__(79181);
  20711. var IE8_DOM_DEFINE = __webpack_require__(1734);
  20712. var gOPD = Object.getOwnPropertyDescriptor;
  20713. exports.f = __webpack_require__(67057) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  20714. O = toIObject(O);
  20715. P = toPrimitive(P, true);
  20716. if (IE8_DOM_DEFINE) try {
  20717. return gOPD(O, P);
  20718. } catch (e) { /* empty */ }
  20719. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  20720. };
  20721. /***/ }),
  20722. /***/ 39327:
  20723. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20724. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  20725. var toIObject = __webpack_require__(22110);
  20726. var gOPN = __webpack_require__(20616).f;
  20727. var toString = {}.toString;
  20728. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  20729. ? Object.getOwnPropertyNames(window) : [];
  20730. var getWindowNames = function (it) {
  20731. try {
  20732. return gOPN(it);
  20733. } catch (e) {
  20734. return windowNames.slice();
  20735. }
  20736. };
  20737. module.exports.f = function getOwnPropertyNames(it) {
  20738. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  20739. };
  20740. /***/ }),
  20741. /***/ 20616:
  20742. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  20743. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  20744. var $keys = __webpack_require__(60189);
  20745. var hiddenKeys = __webpack_require__(74430).concat('length', 'prototype');
  20746. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  20747. return $keys(O, hiddenKeys);
  20748. };
  20749. /***/ }),
  20750. /***/ 64548:
  20751. /***/ ((__unused_webpack_module, exports) => {
  20752. exports.f = Object.getOwnPropertySymbols;
  20753. /***/ }),
  20754. /***/ 468:
  20755. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20756. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  20757. var has = __webpack_require__(79181);
  20758. var toObject = __webpack_require__(20508);
  20759. var IE_PROTO = __webpack_require__(69335)('IE_PROTO');
  20760. var ObjectProto = Object.prototype;
  20761. module.exports = Object.getPrototypeOf || function (O) {
  20762. O = toObject(O);
  20763. if (has(O, IE_PROTO)) return O[IE_PROTO];
  20764. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  20765. return O.constructor.prototype;
  20766. } return O instanceof Object ? ObjectProto : null;
  20767. };
  20768. /***/ }),
  20769. /***/ 60189:
  20770. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20771. var has = __webpack_require__(79181);
  20772. var toIObject = __webpack_require__(22110);
  20773. var arrayIndexOf = __webpack_require__(79315)(false);
  20774. var IE_PROTO = __webpack_require__(69335)('IE_PROTO');
  20775. module.exports = function (object, names) {
  20776. var O = toIObject(object);
  20777. var i = 0;
  20778. var result = [];
  20779. var key;
  20780. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  20781. // Don't enum bug & hidden keys
  20782. while (names.length > i) if (has(O, key = names[i++])) {
  20783. ~arrayIndexOf(result, key) || result.push(key);
  20784. }
  20785. return result;
  20786. };
  20787. /***/ }),
  20788. /***/ 47184:
  20789. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20790. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  20791. var $keys = __webpack_require__(60189);
  20792. var enumBugKeys = __webpack_require__(74430);
  20793. module.exports = Object.keys || function keys(O) {
  20794. return $keys(O, enumBugKeys);
  20795. };
  20796. /***/ }),
  20797. /***/ 14682:
  20798. /***/ ((__unused_webpack_module, exports) => {
  20799. exports.f = {}.propertyIsEnumerable;
  20800. /***/ }),
  20801. /***/ 33160:
  20802. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20803. // most Object methods by ES6 should accept primitives
  20804. var $export = __webpack_require__(42985);
  20805. var core = __webpack_require__(25645);
  20806. var fails = __webpack_require__(74253);
  20807. module.exports = function (KEY, exec) {
  20808. var fn = (core.Object || {})[KEY] || Object[KEY];
  20809. var exp = {};
  20810. exp[KEY] = exec(fn);
  20811. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  20812. };
  20813. /***/ }),
  20814. /***/ 51131:
  20815. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20816. var DESCRIPTORS = __webpack_require__(67057);
  20817. var getKeys = __webpack_require__(47184);
  20818. var toIObject = __webpack_require__(22110);
  20819. var isEnum = __webpack_require__(14682).f;
  20820. module.exports = function (isEntries) {
  20821. return function (it) {
  20822. var O = toIObject(it);
  20823. var keys = getKeys(O);
  20824. var length = keys.length;
  20825. var i = 0;
  20826. var result = [];
  20827. var key;
  20828. while (length > i) {
  20829. key = keys[i++];
  20830. if (!DESCRIPTORS || isEnum.call(O, key)) {
  20831. result.push(isEntries ? [key, O[key]] : O[key]);
  20832. }
  20833. }
  20834. return result;
  20835. };
  20836. };
  20837. /***/ }),
  20838. /***/ 57643:
  20839. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20840. // all object keys, includes non-enumerable and symbols
  20841. var gOPN = __webpack_require__(20616);
  20842. var gOPS = __webpack_require__(64548);
  20843. var anObject = __webpack_require__(27007);
  20844. var Reflect = __webpack_require__(3816).Reflect;
  20845. module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  20846. var keys = gOPN.f(anObject(it));
  20847. var getSymbols = gOPS.f;
  20848. return getSymbols ? keys.concat(getSymbols(it)) : keys;
  20849. };
  20850. /***/ }),
  20851. /***/ 47743:
  20852. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20853. var $parseFloat = __webpack_require__(3816).parseFloat;
  20854. var $trim = __webpack_require__(29599).trim;
  20855. module.exports = 1 / $parseFloat(__webpack_require__(84644) + '-0') !== -Infinity ? function parseFloat(str) {
  20856. var string = $trim(String(str), 3);
  20857. var result = $parseFloat(string);
  20858. return result === 0 && string.charAt(0) == '-' ? -0 : result;
  20859. } : $parseFloat;
  20860. /***/ }),
  20861. /***/ 55960:
  20862. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20863. var $parseInt = __webpack_require__(3816).parseInt;
  20864. var $trim = __webpack_require__(29599).trim;
  20865. var ws = __webpack_require__(84644);
  20866. var hex = /^[-+]?0[xX]/;
  20867. module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
  20868. var string = $trim(String(str), 3);
  20869. return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
  20870. } : $parseInt;
  20871. /***/ }),
  20872. /***/ 10188:
  20873. /***/ ((module) => {
  20874. module.exports = function (exec) {
  20875. try {
  20876. return { e: false, v: exec() };
  20877. } catch (e) {
  20878. return { e: true, v: e };
  20879. }
  20880. };
  20881. /***/ }),
  20882. /***/ 50094:
  20883. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20884. var anObject = __webpack_require__(27007);
  20885. var isObject = __webpack_require__(55286);
  20886. var newPromiseCapability = __webpack_require__(43499);
  20887. module.exports = function (C, x) {
  20888. anObject(C);
  20889. if (isObject(x) && x.constructor === C) return x;
  20890. var promiseCapability = newPromiseCapability.f(C);
  20891. var resolve = promiseCapability.resolve;
  20892. resolve(x);
  20893. return promiseCapability.promise;
  20894. };
  20895. /***/ }),
  20896. /***/ 90681:
  20897. /***/ ((module) => {
  20898. module.exports = function (bitmap, value) {
  20899. return {
  20900. enumerable: !(bitmap & 1),
  20901. configurable: !(bitmap & 2),
  20902. writable: !(bitmap & 4),
  20903. value: value
  20904. };
  20905. };
  20906. /***/ }),
  20907. /***/ 24408:
  20908. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20909. var redefine = __webpack_require__(77234);
  20910. module.exports = function (target, src, safe) {
  20911. for (var key in src) redefine(target, key, src[key], safe);
  20912. return target;
  20913. };
  20914. /***/ }),
  20915. /***/ 77234:
  20916. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20917. var global = __webpack_require__(3816);
  20918. var hide = __webpack_require__(87728);
  20919. var has = __webpack_require__(79181);
  20920. var SRC = __webpack_require__(93953)('src');
  20921. var $toString = __webpack_require__(40018);
  20922. var TO_STRING = 'toString';
  20923. var TPL = ('' + $toString).split(TO_STRING);
  20924. __webpack_require__(25645).inspectSource = function (it) {
  20925. return $toString.call(it);
  20926. };
  20927. (module.exports = function (O, key, val, safe) {
  20928. var isFunction = typeof val == 'function';
  20929. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  20930. if (O[key] === val) return;
  20931. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  20932. if (O === global) {
  20933. O[key] = val;
  20934. } else if (!safe) {
  20935. delete O[key];
  20936. hide(O, key, val);
  20937. } else if (O[key]) {
  20938. O[key] = val;
  20939. } else {
  20940. hide(O, key, val);
  20941. }
  20942. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  20943. })(Function.prototype, TO_STRING, function toString() {
  20944. return typeof this == 'function' && this[SRC] || $toString.call(this);
  20945. });
  20946. /***/ }),
  20947. /***/ 27787:
  20948. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20949. "use strict";
  20950. var classof = __webpack_require__(41488);
  20951. var builtinExec = RegExp.prototype.exec;
  20952. // `RegExpExec` abstract operation
  20953. // https://tc39.github.io/ecma262/#sec-regexpexec
  20954. module.exports = function (R, S) {
  20955. var exec = R.exec;
  20956. if (typeof exec === 'function') {
  20957. var result = exec.call(R, S);
  20958. if (typeof result !== 'object') {
  20959. throw new TypeError('RegExp exec method returned something other than an Object or null');
  20960. }
  20961. return result;
  20962. }
  20963. if (classof(R) !== 'RegExp') {
  20964. throw new TypeError('RegExp#exec called on incompatible receiver');
  20965. }
  20966. return builtinExec.call(R, S);
  20967. };
  20968. /***/ }),
  20969. /***/ 21165:
  20970. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20971. "use strict";
  20972. var regexpFlags = __webpack_require__(53218);
  20973. var nativeExec = RegExp.prototype.exec;
  20974. // This always refers to the native implementation, because the
  20975. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  20976. // which loads this file before patching the method.
  20977. var nativeReplace = String.prototype.replace;
  20978. var patchedExec = nativeExec;
  20979. var LAST_INDEX = 'lastIndex';
  20980. var UPDATES_LAST_INDEX_WRONG = (function () {
  20981. var re1 = /a/,
  20982. re2 = /b*/g;
  20983. nativeExec.call(re1, 'a');
  20984. nativeExec.call(re2, 'a');
  20985. return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
  20986. })();
  20987. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  20988. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  20989. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  20990. if (PATCH) {
  20991. patchedExec = function exec(str) {
  20992. var re = this;
  20993. var lastIndex, reCopy, match, i;
  20994. if (NPCG_INCLUDED) {
  20995. reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
  20996. }
  20997. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
  20998. match = nativeExec.call(re, str);
  20999. if (UPDATES_LAST_INDEX_WRONG && match) {
  21000. re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
  21001. }
  21002. if (NPCG_INCLUDED && match && match.length > 1) {
  21003. // Fix browsers whose `exec` methods don't consistently return `undefined`
  21004. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  21005. // eslint-disable-next-line no-loop-func
  21006. nativeReplace.call(match[0], reCopy, function () {
  21007. for (i = 1; i < arguments.length - 2; i++) {
  21008. if (arguments[i] === undefined) match[i] = undefined;
  21009. }
  21010. });
  21011. }
  21012. return match;
  21013. };
  21014. }
  21015. module.exports = patchedExec;
  21016. /***/ }),
  21017. /***/ 27195:
  21018. /***/ ((module) => {
  21019. // 7.2.9 SameValue(x, y)
  21020. module.exports = Object.is || function is(x, y) {
  21021. // eslint-disable-next-line no-self-compare
  21022. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  21023. };
  21024. /***/ }),
  21025. /***/ 27375:
  21026. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21027. // Works with __proto__ only. Old v8 can't work with null proto objects.
  21028. /* eslint-disable no-proto */
  21029. var isObject = __webpack_require__(55286);
  21030. var anObject = __webpack_require__(27007);
  21031. var check = function (O, proto) {
  21032. anObject(O);
  21033. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  21034. };
  21035. module.exports = {
  21036. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  21037. function (test, buggy, set) {
  21038. try {
  21039. set = __webpack_require__(741)(Function.call, __webpack_require__(18693).f(Object.prototype, '__proto__').set, 2);
  21040. set(test, []);
  21041. buggy = !(test instanceof Array);
  21042. } catch (e) { buggy = true; }
  21043. return function setPrototypeOf(O, proto) {
  21044. check(O, proto);
  21045. if (buggy) O.__proto__ = proto;
  21046. else set(O, proto);
  21047. return O;
  21048. };
  21049. }({}, false) : undefined),
  21050. check: check
  21051. };
  21052. /***/ }),
  21053. /***/ 2974:
  21054. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21055. "use strict";
  21056. var global = __webpack_require__(3816);
  21057. var dP = __webpack_require__(99275);
  21058. var DESCRIPTORS = __webpack_require__(67057);
  21059. var SPECIES = __webpack_require__(86314)('species');
  21060. module.exports = function (KEY) {
  21061. var C = global[KEY];
  21062. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  21063. configurable: true,
  21064. get: function () { return this; }
  21065. });
  21066. };
  21067. /***/ }),
  21068. /***/ 22943:
  21069. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21070. var def = __webpack_require__(99275).f;
  21071. var has = __webpack_require__(79181);
  21072. var TAG = __webpack_require__(86314)('toStringTag');
  21073. module.exports = function (it, tag, stat) {
  21074. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  21075. };
  21076. /***/ }),
  21077. /***/ 69335:
  21078. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21079. var shared = __webpack_require__(3825)('keys');
  21080. var uid = __webpack_require__(93953);
  21081. module.exports = function (key) {
  21082. return shared[key] || (shared[key] = uid(key));
  21083. };
  21084. /***/ }),
  21085. /***/ 3825:
  21086. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21087. var core = __webpack_require__(25645);
  21088. var global = __webpack_require__(3816);
  21089. var SHARED = '__core-js_shared__';
  21090. var store = global[SHARED] || (global[SHARED] = {});
  21091. (module.exports = function (key, value) {
  21092. return store[key] || (store[key] = value !== undefined ? value : {});
  21093. })('versions', []).push({
  21094. version: core.version,
  21095. mode: __webpack_require__(4461) ? 'pure' : 'global',
  21096. copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
  21097. });
  21098. /***/ }),
  21099. /***/ 58364:
  21100. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21101. // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  21102. var anObject = __webpack_require__(27007);
  21103. var aFunction = __webpack_require__(24963);
  21104. var SPECIES = __webpack_require__(86314)('species');
  21105. module.exports = function (O, D) {
  21106. var C = anObject(O).constructor;
  21107. var S;
  21108. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  21109. };
  21110. /***/ }),
  21111. /***/ 77717:
  21112. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21113. "use strict";
  21114. var fails = __webpack_require__(74253);
  21115. module.exports = function (method, arg) {
  21116. return !!method && fails(function () {
  21117. // eslint-disable-next-line no-useless-call
  21118. arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  21119. });
  21120. };
  21121. /***/ }),
  21122. /***/ 24496:
  21123. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21124. var toInteger = __webpack_require__(81467);
  21125. var defined = __webpack_require__(91355);
  21126. // true -> String#at
  21127. // false -> String#codePointAt
  21128. module.exports = function (TO_STRING) {
  21129. return function (that, pos) {
  21130. var s = String(defined(that));
  21131. var i = toInteger(pos);
  21132. var l = s.length;
  21133. var a, b;
  21134. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  21135. a = s.charCodeAt(i);
  21136. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  21137. ? TO_STRING ? s.charAt(i) : a
  21138. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  21139. };
  21140. };
  21141. /***/ }),
  21142. /***/ 42094:
  21143. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21144. // helper for String#{startsWith, endsWith, includes}
  21145. var isRegExp = __webpack_require__(55364);
  21146. var defined = __webpack_require__(91355);
  21147. module.exports = function (that, searchString, NAME) {
  21148. if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  21149. return String(defined(that));
  21150. };
  21151. /***/ }),
  21152. /***/ 29395:
  21153. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21154. var $export = __webpack_require__(42985);
  21155. var fails = __webpack_require__(74253);
  21156. var defined = __webpack_require__(91355);
  21157. var quot = /"/g;
  21158. // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
  21159. var createHTML = function (string, tag, attribute, value) {
  21160. var S = String(defined(string));
  21161. var p1 = '<' + tag;
  21162. if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  21163. return p1 + '>' + S + '</' + tag + '>';
  21164. };
  21165. module.exports = function (NAME, exec) {
  21166. var O = {};
  21167. O[NAME] = exec(createHTML);
  21168. $export($export.P + $export.F * fails(function () {
  21169. var test = ''[NAME]('"');
  21170. return test !== test.toLowerCase() || test.split('"').length > 3;
  21171. }), 'String', O);
  21172. };
  21173. /***/ }),
  21174. /***/ 75442:
  21175. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21176. // https://github.com/tc39/proposal-string-pad-start-end
  21177. var toLength = __webpack_require__(10875);
  21178. var repeat = __webpack_require__(68595);
  21179. var defined = __webpack_require__(91355);
  21180. module.exports = function (that, maxLength, fillString, left) {
  21181. var S = String(defined(that));
  21182. var stringLength = S.length;
  21183. var fillStr = fillString === undefined ? ' ' : String(fillString);
  21184. var intMaxLength = toLength(maxLength);
  21185. if (intMaxLength <= stringLength || fillStr == '') return S;
  21186. var fillLen = intMaxLength - stringLength;
  21187. var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
  21188. if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
  21189. return left ? stringFiller + S : S + stringFiller;
  21190. };
  21191. /***/ }),
  21192. /***/ 68595:
  21193. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21194. "use strict";
  21195. var toInteger = __webpack_require__(81467);
  21196. var defined = __webpack_require__(91355);
  21197. module.exports = function repeat(count) {
  21198. var str = String(defined(this));
  21199. var res = '';
  21200. var n = toInteger(count);
  21201. if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
  21202. for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
  21203. return res;
  21204. };
  21205. /***/ }),
  21206. /***/ 29599:
  21207. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21208. var $export = __webpack_require__(42985);
  21209. var defined = __webpack_require__(91355);
  21210. var fails = __webpack_require__(74253);
  21211. var spaces = __webpack_require__(84644);
  21212. var space = '[' + spaces + ']';
  21213. var non = '\u200b\u0085';
  21214. var ltrim = RegExp('^' + space + space + '*');
  21215. var rtrim = RegExp(space + space + '*$');
  21216. var exporter = function (KEY, exec, ALIAS) {
  21217. var exp = {};
  21218. var FORCE = fails(function () {
  21219. return !!spaces[KEY]() || non[KEY]() != non;
  21220. });
  21221. var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  21222. if (ALIAS) exp[ALIAS] = fn;
  21223. $export($export.P + $export.F * FORCE, 'String', exp);
  21224. };
  21225. // 1 -> String#trimLeft
  21226. // 2 -> String#trimRight
  21227. // 3 -> String#trim
  21228. var trim = exporter.trim = function (string, TYPE) {
  21229. string = String(defined(string));
  21230. if (TYPE & 1) string = string.replace(ltrim, '');
  21231. if (TYPE & 2) string = string.replace(rtrim, '');
  21232. return string;
  21233. };
  21234. module.exports = exporter;
  21235. /***/ }),
  21236. /***/ 84644:
  21237. /***/ ((module) => {
  21238. module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  21239. '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  21240. /***/ }),
  21241. /***/ 74193:
  21242. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21243. var ctx = __webpack_require__(741);
  21244. var invoke = __webpack_require__(97242);
  21245. var html = __webpack_require__(40639);
  21246. var cel = __webpack_require__(62457);
  21247. var global = __webpack_require__(3816);
  21248. var process = global.process;
  21249. var setTask = global.setImmediate;
  21250. var clearTask = global.clearImmediate;
  21251. var MessageChannel = global.MessageChannel;
  21252. var Dispatch = global.Dispatch;
  21253. var counter = 0;
  21254. var queue = {};
  21255. var ONREADYSTATECHANGE = 'onreadystatechange';
  21256. var defer, channel, port;
  21257. var run = function () {
  21258. var id = +this;
  21259. // eslint-disable-next-line no-prototype-builtins
  21260. if (queue.hasOwnProperty(id)) {
  21261. var fn = queue[id];
  21262. delete queue[id];
  21263. fn();
  21264. }
  21265. };
  21266. var listener = function (event) {
  21267. run.call(event.data);
  21268. };
  21269. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  21270. if (!setTask || !clearTask) {
  21271. setTask = function setImmediate(fn) {
  21272. var args = [];
  21273. var i = 1;
  21274. while (arguments.length > i) args.push(arguments[i++]);
  21275. queue[++counter] = function () {
  21276. // eslint-disable-next-line no-new-func
  21277. invoke(typeof fn == 'function' ? fn : Function(fn), args);
  21278. };
  21279. defer(counter);
  21280. return counter;
  21281. };
  21282. clearTask = function clearImmediate(id) {
  21283. delete queue[id];
  21284. };
  21285. // Node.js 0.8-
  21286. if (__webpack_require__(92032)(process) == 'process') {
  21287. defer = function (id) {
  21288. process.nextTick(ctx(run, id, 1));
  21289. };
  21290. // Sphere (JS game engine) Dispatch API
  21291. } else if (Dispatch && Dispatch.now) {
  21292. defer = function (id) {
  21293. Dispatch.now(ctx(run, id, 1));
  21294. };
  21295. // Browsers with MessageChannel, includes WebWorkers
  21296. } else if (MessageChannel) {
  21297. channel = new MessageChannel();
  21298. port = channel.port2;
  21299. channel.port1.onmessage = listener;
  21300. defer = ctx(port.postMessage, port, 1);
  21301. // Browsers with postMessage, skip WebWorkers
  21302. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  21303. } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
  21304. defer = function (id) {
  21305. global.postMessage(id + '', '*');
  21306. };
  21307. global.addEventListener('message', listener, false);
  21308. // IE8-
  21309. } else if (ONREADYSTATECHANGE in cel('script')) {
  21310. defer = function (id) {
  21311. html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
  21312. html.removeChild(this);
  21313. run.call(id);
  21314. };
  21315. };
  21316. // Rest old browsers
  21317. } else {
  21318. defer = function (id) {
  21319. setTimeout(ctx(run, id, 1), 0);
  21320. };
  21321. }
  21322. }
  21323. module.exports = {
  21324. set: setTask,
  21325. clear: clearTask
  21326. };
  21327. /***/ }),
  21328. /***/ 92337:
  21329. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21330. var toInteger = __webpack_require__(81467);
  21331. var max = Math.max;
  21332. var min = Math.min;
  21333. module.exports = function (index, length) {
  21334. index = toInteger(index);
  21335. return index < 0 ? max(index + length, 0) : min(index, length);
  21336. };
  21337. /***/ }),
  21338. /***/ 94843:
  21339. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21340. // https://tc39.github.io/ecma262/#sec-toindex
  21341. var toInteger = __webpack_require__(81467);
  21342. var toLength = __webpack_require__(10875);
  21343. module.exports = function (it) {
  21344. if (it === undefined) return 0;
  21345. var number = toInteger(it);
  21346. var length = toLength(number);
  21347. if (number !== length) throw RangeError('Wrong length!');
  21348. return length;
  21349. };
  21350. /***/ }),
  21351. /***/ 81467:
  21352. /***/ ((module) => {
  21353. // 7.1.4 ToInteger
  21354. var ceil = Math.ceil;
  21355. var floor = Math.floor;
  21356. module.exports = function (it) {
  21357. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  21358. };
  21359. /***/ }),
  21360. /***/ 22110:
  21361. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21362. // to indexed object, toObject with fallback for non-array-like ES3 strings
  21363. var IObject = __webpack_require__(49797);
  21364. var defined = __webpack_require__(91355);
  21365. module.exports = function (it) {
  21366. return IObject(defined(it));
  21367. };
  21368. /***/ }),
  21369. /***/ 10875:
  21370. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21371. // 7.1.15 ToLength
  21372. var toInteger = __webpack_require__(81467);
  21373. var min = Math.min;
  21374. module.exports = function (it) {
  21375. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  21376. };
  21377. /***/ }),
  21378. /***/ 20508:
  21379. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21380. // 7.1.13 ToObject(argument)
  21381. var defined = __webpack_require__(91355);
  21382. module.exports = function (it) {
  21383. return Object(defined(it));
  21384. };
  21385. /***/ }),
  21386. /***/ 21689:
  21387. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21388. // 7.1.1 ToPrimitive(input [, PreferredType])
  21389. var isObject = __webpack_require__(55286);
  21390. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  21391. // and the second argument - flag - preferred type is a string
  21392. module.exports = function (it, S) {
  21393. if (!isObject(it)) return it;
  21394. var fn, val;
  21395. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  21396. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  21397. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  21398. throw TypeError("Can't convert object to primitive value");
  21399. };
  21400. /***/ }),
  21401. /***/ 78440:
  21402. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21403. "use strict";
  21404. if (__webpack_require__(67057)) {
  21405. var LIBRARY = __webpack_require__(4461);
  21406. var global = __webpack_require__(3816);
  21407. var fails = __webpack_require__(74253);
  21408. var $export = __webpack_require__(42985);
  21409. var $typed = __webpack_require__(89383);
  21410. var $buffer = __webpack_require__(91125);
  21411. var ctx = __webpack_require__(741);
  21412. var anInstance = __webpack_require__(83328);
  21413. var propertyDesc = __webpack_require__(90681);
  21414. var hide = __webpack_require__(87728);
  21415. var redefineAll = __webpack_require__(24408);
  21416. var toInteger = __webpack_require__(81467);
  21417. var toLength = __webpack_require__(10875);
  21418. var toIndex = __webpack_require__(94843);
  21419. var toAbsoluteIndex = __webpack_require__(92337);
  21420. var toPrimitive = __webpack_require__(21689);
  21421. var has = __webpack_require__(79181);
  21422. var classof = __webpack_require__(41488);
  21423. var isObject = __webpack_require__(55286);
  21424. var toObject = __webpack_require__(20508);
  21425. var isArrayIter = __webpack_require__(86555);
  21426. var create = __webpack_require__(42503);
  21427. var getPrototypeOf = __webpack_require__(468);
  21428. var gOPN = __webpack_require__(20616).f;
  21429. var getIterFn = __webpack_require__(69002);
  21430. var uid = __webpack_require__(93953);
  21431. var wks = __webpack_require__(86314);
  21432. var createArrayMethod = __webpack_require__(10050);
  21433. var createArrayIncludes = __webpack_require__(79315);
  21434. var speciesConstructor = __webpack_require__(58364);
  21435. var ArrayIterators = __webpack_require__(56997);
  21436. var Iterators = __webpack_require__(87234);
  21437. var $iterDetect = __webpack_require__(7462);
  21438. var setSpecies = __webpack_require__(2974);
  21439. var arrayFill = __webpack_require__(46852);
  21440. var arrayCopyWithin = __webpack_require__(5216);
  21441. var $DP = __webpack_require__(99275);
  21442. var $GOPD = __webpack_require__(18693);
  21443. var dP = $DP.f;
  21444. var gOPD = $GOPD.f;
  21445. var RangeError = global.RangeError;
  21446. var TypeError = global.TypeError;
  21447. var Uint8Array = global.Uint8Array;
  21448. var ARRAY_BUFFER = 'ArrayBuffer';
  21449. var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
  21450. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  21451. var PROTOTYPE = 'prototype';
  21452. var ArrayProto = Array[PROTOTYPE];
  21453. var $ArrayBuffer = $buffer.ArrayBuffer;
  21454. var $DataView = $buffer.DataView;
  21455. var arrayForEach = createArrayMethod(0);
  21456. var arrayFilter = createArrayMethod(2);
  21457. var arraySome = createArrayMethod(3);
  21458. var arrayEvery = createArrayMethod(4);
  21459. var arrayFind = createArrayMethod(5);
  21460. var arrayFindIndex = createArrayMethod(6);
  21461. var arrayIncludes = createArrayIncludes(true);
  21462. var arrayIndexOf = createArrayIncludes(false);
  21463. var arrayValues = ArrayIterators.values;
  21464. var arrayKeys = ArrayIterators.keys;
  21465. var arrayEntries = ArrayIterators.entries;
  21466. var arrayLastIndexOf = ArrayProto.lastIndexOf;
  21467. var arrayReduce = ArrayProto.reduce;
  21468. var arrayReduceRight = ArrayProto.reduceRight;
  21469. var arrayJoin = ArrayProto.join;
  21470. var arraySort = ArrayProto.sort;
  21471. var arraySlice = ArrayProto.slice;
  21472. var arrayToString = ArrayProto.toString;
  21473. var arrayToLocaleString = ArrayProto.toLocaleString;
  21474. var ITERATOR = wks('iterator');
  21475. var TAG = wks('toStringTag');
  21476. var TYPED_CONSTRUCTOR = uid('typed_constructor');
  21477. var DEF_CONSTRUCTOR = uid('def_constructor');
  21478. var ALL_CONSTRUCTORS = $typed.CONSTR;
  21479. var TYPED_ARRAY = $typed.TYPED;
  21480. var VIEW = $typed.VIEW;
  21481. var WRONG_LENGTH = 'Wrong length!';
  21482. var $map = createArrayMethod(1, function (O, length) {
  21483. return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
  21484. });
  21485. var LITTLE_ENDIAN = fails(function () {
  21486. // eslint-disable-next-line no-undef
  21487. return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
  21488. });
  21489. var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
  21490. new Uint8Array(1).set({});
  21491. });
  21492. var toOffset = function (it, BYTES) {
  21493. var offset = toInteger(it);
  21494. if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
  21495. return offset;
  21496. };
  21497. var validate = function (it) {
  21498. if (isObject(it) && TYPED_ARRAY in it) return it;
  21499. throw TypeError(it + ' is not a typed array!');
  21500. };
  21501. var allocate = function (C, length) {
  21502. if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
  21503. throw TypeError('It is not a typed array constructor!');
  21504. } return new C(length);
  21505. };
  21506. var speciesFromList = function (O, list) {
  21507. return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
  21508. };
  21509. var fromList = function (C, list) {
  21510. var index = 0;
  21511. var length = list.length;
  21512. var result = allocate(C, length);
  21513. while (length > index) result[index] = list[index++];
  21514. return result;
  21515. };
  21516. var addGetter = function (it, key, internal) {
  21517. dP(it, key, { get: function () { return this._d[internal]; } });
  21518. };
  21519. var $from = function from(source /* , mapfn, thisArg */) {
  21520. var O = toObject(source);
  21521. var aLen = arguments.length;
  21522. var mapfn = aLen > 1 ? arguments[1] : undefined;
  21523. var mapping = mapfn !== undefined;
  21524. var iterFn = getIterFn(O);
  21525. var i, length, values, result, step, iterator;
  21526. if (iterFn != undefined && !isArrayIter(iterFn)) {
  21527. for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
  21528. values.push(step.value);
  21529. } O = values;
  21530. }
  21531. if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
  21532. for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
  21533. result[i] = mapping ? mapfn(O[i], i) : O[i];
  21534. }
  21535. return result;
  21536. };
  21537. var $of = function of(/* ...items */) {
  21538. var index = 0;
  21539. var length = arguments.length;
  21540. var result = allocate(this, length);
  21541. while (length > index) result[index] = arguments[index++];
  21542. return result;
  21543. };
  21544. // iOS Safari 6.x fails here
  21545. var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
  21546. var $toLocaleString = function toLocaleString() {
  21547. return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
  21548. };
  21549. var proto = {
  21550. copyWithin: function copyWithin(target, start /* , end */) {
  21551. return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  21552. },
  21553. every: function every(callbackfn /* , thisArg */) {
  21554. return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21555. },
  21556. fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
  21557. return arrayFill.apply(validate(this), arguments);
  21558. },
  21559. filter: function filter(callbackfn /* , thisArg */) {
  21560. return speciesFromList(this, arrayFilter(validate(this), callbackfn,
  21561. arguments.length > 1 ? arguments[1] : undefined));
  21562. },
  21563. find: function find(predicate /* , thisArg */) {
  21564. return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  21565. },
  21566. findIndex: function findIndex(predicate /* , thisArg */) {
  21567. return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  21568. },
  21569. forEach: function forEach(callbackfn /* , thisArg */) {
  21570. arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21571. },
  21572. indexOf: function indexOf(searchElement /* , fromIndex */) {
  21573. return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  21574. },
  21575. includes: function includes(searchElement /* , fromIndex */) {
  21576. return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  21577. },
  21578. join: function join(separator) { // eslint-disable-line no-unused-vars
  21579. return arrayJoin.apply(validate(this), arguments);
  21580. },
  21581. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
  21582. return arrayLastIndexOf.apply(validate(this), arguments);
  21583. },
  21584. map: function map(mapfn /* , thisArg */) {
  21585. return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
  21586. },
  21587. reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  21588. return arrayReduce.apply(validate(this), arguments);
  21589. },
  21590. reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  21591. return arrayReduceRight.apply(validate(this), arguments);
  21592. },
  21593. reverse: function reverse() {
  21594. var that = this;
  21595. var length = validate(that).length;
  21596. var middle = Math.floor(length / 2);
  21597. var index = 0;
  21598. var value;
  21599. while (index < middle) {
  21600. value = that[index];
  21601. that[index++] = that[--length];
  21602. that[length] = value;
  21603. } return that;
  21604. },
  21605. some: function some(callbackfn /* , thisArg */) {
  21606. return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21607. },
  21608. sort: function sort(comparefn) {
  21609. return arraySort.call(validate(this), comparefn);
  21610. },
  21611. subarray: function subarray(begin, end) {
  21612. var O = validate(this);
  21613. var length = O.length;
  21614. var $begin = toAbsoluteIndex(begin, length);
  21615. return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
  21616. O.buffer,
  21617. O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
  21618. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
  21619. );
  21620. }
  21621. };
  21622. var $slice = function slice(start, end) {
  21623. return speciesFromList(this, arraySlice.call(validate(this), start, end));
  21624. };
  21625. var $set = function set(arrayLike /* , offset */) {
  21626. validate(this);
  21627. var offset = toOffset(arguments[1], 1);
  21628. var length = this.length;
  21629. var src = toObject(arrayLike);
  21630. var len = toLength(src.length);
  21631. var index = 0;
  21632. if (len + offset > length) throw RangeError(WRONG_LENGTH);
  21633. while (index < len) this[offset + index] = src[index++];
  21634. };
  21635. var $iterators = {
  21636. entries: function entries() {
  21637. return arrayEntries.call(validate(this));
  21638. },
  21639. keys: function keys() {
  21640. return arrayKeys.call(validate(this));
  21641. },
  21642. values: function values() {
  21643. return arrayValues.call(validate(this));
  21644. }
  21645. };
  21646. var isTAIndex = function (target, key) {
  21647. return isObject(target)
  21648. && target[TYPED_ARRAY]
  21649. && typeof key != 'symbol'
  21650. && key in target
  21651. && String(+key) == String(key);
  21652. };
  21653. var $getDesc = function getOwnPropertyDescriptor(target, key) {
  21654. return isTAIndex(target, key = toPrimitive(key, true))
  21655. ? propertyDesc(2, target[key])
  21656. : gOPD(target, key);
  21657. };
  21658. var $setDesc = function defineProperty(target, key, desc) {
  21659. if (isTAIndex(target, key = toPrimitive(key, true))
  21660. && isObject(desc)
  21661. && has(desc, 'value')
  21662. && !has(desc, 'get')
  21663. && !has(desc, 'set')
  21664. // TODO: add validation descriptor w/o calling accessors
  21665. && !desc.configurable
  21666. && (!has(desc, 'writable') || desc.writable)
  21667. && (!has(desc, 'enumerable') || desc.enumerable)
  21668. ) {
  21669. target[key] = desc.value;
  21670. return target;
  21671. } return dP(target, key, desc);
  21672. };
  21673. if (!ALL_CONSTRUCTORS) {
  21674. $GOPD.f = $getDesc;
  21675. $DP.f = $setDesc;
  21676. }
  21677. $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
  21678. getOwnPropertyDescriptor: $getDesc,
  21679. defineProperty: $setDesc
  21680. });
  21681. if (fails(function () { arrayToString.call({}); })) {
  21682. arrayToString = arrayToLocaleString = function toString() {
  21683. return arrayJoin.call(this);
  21684. };
  21685. }
  21686. var $TypedArrayPrototype$ = redefineAll({}, proto);
  21687. redefineAll($TypedArrayPrototype$, $iterators);
  21688. hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
  21689. redefineAll($TypedArrayPrototype$, {
  21690. slice: $slice,
  21691. set: $set,
  21692. constructor: function () { /* noop */ },
  21693. toString: arrayToString,
  21694. toLocaleString: $toLocaleString
  21695. });
  21696. addGetter($TypedArrayPrototype$, 'buffer', 'b');
  21697. addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
  21698. addGetter($TypedArrayPrototype$, 'byteLength', 'l');
  21699. addGetter($TypedArrayPrototype$, 'length', 'e');
  21700. dP($TypedArrayPrototype$, TAG, {
  21701. get: function () { return this[TYPED_ARRAY]; }
  21702. });
  21703. // eslint-disable-next-line max-statements
  21704. module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
  21705. CLAMPED = !!CLAMPED;
  21706. var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
  21707. var GETTER = 'get' + KEY;
  21708. var SETTER = 'set' + KEY;
  21709. var TypedArray = global[NAME];
  21710. var Base = TypedArray || {};
  21711. var TAC = TypedArray && getPrototypeOf(TypedArray);
  21712. var FORCED = !TypedArray || !$typed.ABV;
  21713. var O = {};
  21714. var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
  21715. var getter = function (that, index) {
  21716. var data = that._d;
  21717. return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
  21718. };
  21719. var setter = function (that, index, value) {
  21720. var data = that._d;
  21721. if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
  21722. data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
  21723. };
  21724. var addElement = function (that, index) {
  21725. dP(that, index, {
  21726. get: function () {
  21727. return getter(this, index);
  21728. },
  21729. set: function (value) {
  21730. return setter(this, index, value);
  21731. },
  21732. enumerable: true
  21733. });
  21734. };
  21735. if (FORCED) {
  21736. TypedArray = wrapper(function (that, data, $offset, $length) {
  21737. anInstance(that, TypedArray, NAME, '_d');
  21738. var index = 0;
  21739. var offset = 0;
  21740. var buffer, byteLength, length, klass;
  21741. if (!isObject(data)) {
  21742. length = toIndex(data);
  21743. byteLength = length * BYTES;
  21744. buffer = new $ArrayBuffer(byteLength);
  21745. } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  21746. buffer = data;
  21747. offset = toOffset($offset, BYTES);
  21748. var $len = data.byteLength;
  21749. if ($length === undefined) {
  21750. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  21751. byteLength = $len - offset;
  21752. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  21753. } else {
  21754. byteLength = toLength($length) * BYTES;
  21755. if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
  21756. }
  21757. length = byteLength / BYTES;
  21758. } else if (TYPED_ARRAY in data) {
  21759. return fromList(TypedArray, data);
  21760. } else {
  21761. return $from.call(TypedArray, data);
  21762. }
  21763. hide(that, '_d', {
  21764. b: buffer,
  21765. o: offset,
  21766. l: byteLength,
  21767. e: length,
  21768. v: new $DataView(buffer)
  21769. });
  21770. while (index < length) addElement(that, index++);
  21771. });
  21772. TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
  21773. hide(TypedArrayPrototype, 'constructor', TypedArray);
  21774. } else if (!fails(function () {
  21775. TypedArray(1);
  21776. }) || !fails(function () {
  21777. new TypedArray(-1); // eslint-disable-line no-new
  21778. }) || !$iterDetect(function (iter) {
  21779. new TypedArray(); // eslint-disable-line no-new
  21780. new TypedArray(null); // eslint-disable-line no-new
  21781. new TypedArray(1.5); // eslint-disable-line no-new
  21782. new TypedArray(iter); // eslint-disable-line no-new
  21783. }, true)) {
  21784. TypedArray = wrapper(function (that, data, $offset, $length) {
  21785. anInstance(that, TypedArray, NAME);
  21786. var klass;
  21787. // `ws` module bug, temporarily remove validation length for Uint8Array
  21788. // https://github.com/websockets/ws/pull/645
  21789. if (!isObject(data)) return new Base(toIndex(data));
  21790. if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  21791. return $length !== undefined
  21792. ? new Base(data, toOffset($offset, BYTES), $length)
  21793. : $offset !== undefined
  21794. ? new Base(data, toOffset($offset, BYTES))
  21795. : new Base(data);
  21796. }
  21797. if (TYPED_ARRAY in data) return fromList(TypedArray, data);
  21798. return $from.call(TypedArray, data);
  21799. });
  21800. arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
  21801. if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
  21802. });
  21803. TypedArray[PROTOTYPE] = TypedArrayPrototype;
  21804. if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
  21805. }
  21806. var $nativeIterator = TypedArrayPrototype[ITERATOR];
  21807. var CORRECT_ITER_NAME = !!$nativeIterator
  21808. && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
  21809. var $iterator = $iterators.values;
  21810. hide(TypedArray, TYPED_CONSTRUCTOR, true);
  21811. hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
  21812. hide(TypedArrayPrototype, VIEW, true);
  21813. hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
  21814. if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
  21815. dP(TypedArrayPrototype, TAG, {
  21816. get: function () { return NAME; }
  21817. });
  21818. }
  21819. O[NAME] = TypedArray;
  21820. $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
  21821. $export($export.S, NAME, {
  21822. BYTES_PER_ELEMENT: BYTES
  21823. });
  21824. $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
  21825. from: $from,
  21826. of: $of
  21827. });
  21828. if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
  21829. $export($export.P, NAME, proto);
  21830. setSpecies(NAME);
  21831. $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
  21832. $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
  21833. if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
  21834. $export($export.P + $export.F * fails(function () {
  21835. new TypedArray(1).slice();
  21836. }), NAME, { slice: $slice });
  21837. $export($export.P + $export.F * (fails(function () {
  21838. return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
  21839. }) || !fails(function () {
  21840. TypedArrayPrototype.toLocaleString.call([1, 2]);
  21841. })), NAME, { toLocaleString: $toLocaleString });
  21842. Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
  21843. if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
  21844. };
  21845. } else module.exports = function () { /* empty */ };
  21846. /***/ }),
  21847. /***/ 91125:
  21848. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  21849. "use strict";
  21850. var global = __webpack_require__(3816);
  21851. var DESCRIPTORS = __webpack_require__(67057);
  21852. var LIBRARY = __webpack_require__(4461);
  21853. var $typed = __webpack_require__(89383);
  21854. var hide = __webpack_require__(87728);
  21855. var redefineAll = __webpack_require__(24408);
  21856. var fails = __webpack_require__(74253);
  21857. var anInstance = __webpack_require__(83328);
  21858. var toInteger = __webpack_require__(81467);
  21859. var toLength = __webpack_require__(10875);
  21860. var toIndex = __webpack_require__(94843);
  21861. var gOPN = __webpack_require__(20616).f;
  21862. var dP = __webpack_require__(99275).f;
  21863. var arrayFill = __webpack_require__(46852);
  21864. var setToStringTag = __webpack_require__(22943);
  21865. var ARRAY_BUFFER = 'ArrayBuffer';
  21866. var DATA_VIEW = 'DataView';
  21867. var PROTOTYPE = 'prototype';
  21868. var WRONG_LENGTH = 'Wrong length!';
  21869. var WRONG_INDEX = 'Wrong index!';
  21870. var $ArrayBuffer = global[ARRAY_BUFFER];
  21871. var $DataView = global[DATA_VIEW];
  21872. var Math = global.Math;
  21873. var RangeError = global.RangeError;
  21874. // eslint-disable-next-line no-shadow-restricted-names
  21875. var Infinity = global.Infinity;
  21876. var BaseBuffer = $ArrayBuffer;
  21877. var abs = Math.abs;
  21878. var pow = Math.pow;
  21879. var floor = Math.floor;
  21880. var log = Math.log;
  21881. var LN2 = Math.LN2;
  21882. var BUFFER = 'buffer';
  21883. var BYTE_LENGTH = 'byteLength';
  21884. var BYTE_OFFSET = 'byteOffset';
  21885. var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
  21886. var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
  21887. var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
  21888. // IEEE754 conversions based on https://github.com/feross/ieee754
  21889. function packIEEE754(value, mLen, nBytes) {
  21890. var buffer = new Array(nBytes);
  21891. var eLen = nBytes * 8 - mLen - 1;
  21892. var eMax = (1 << eLen) - 1;
  21893. var eBias = eMax >> 1;
  21894. var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
  21895. var i = 0;
  21896. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  21897. var e, m, c;
  21898. value = abs(value);
  21899. // eslint-disable-next-line no-self-compare
  21900. if (value != value || value === Infinity) {
  21901. // eslint-disable-next-line no-self-compare
  21902. m = value != value ? 1 : 0;
  21903. e = eMax;
  21904. } else {
  21905. e = floor(log(value) / LN2);
  21906. if (value * (c = pow(2, -e)) < 1) {
  21907. e--;
  21908. c *= 2;
  21909. }
  21910. if (e + eBias >= 1) {
  21911. value += rt / c;
  21912. } else {
  21913. value += rt * pow(2, 1 - eBias);
  21914. }
  21915. if (value * c >= 2) {
  21916. e++;
  21917. c /= 2;
  21918. }
  21919. if (e + eBias >= eMax) {
  21920. m = 0;
  21921. e = eMax;
  21922. } else if (e + eBias >= 1) {
  21923. m = (value * c - 1) * pow(2, mLen);
  21924. e = e + eBias;
  21925. } else {
  21926. m = value * pow(2, eBias - 1) * pow(2, mLen);
  21927. e = 0;
  21928. }
  21929. }
  21930. for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
  21931. e = e << mLen | m;
  21932. eLen += mLen;
  21933. for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
  21934. buffer[--i] |= s * 128;
  21935. return buffer;
  21936. }
  21937. function unpackIEEE754(buffer, mLen, nBytes) {
  21938. var eLen = nBytes * 8 - mLen - 1;
  21939. var eMax = (1 << eLen) - 1;
  21940. var eBias = eMax >> 1;
  21941. var nBits = eLen - 7;
  21942. var i = nBytes - 1;
  21943. var s = buffer[i--];
  21944. var e = s & 127;
  21945. var m;
  21946. s >>= 7;
  21947. for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
  21948. m = e & (1 << -nBits) - 1;
  21949. e >>= -nBits;
  21950. nBits += mLen;
  21951. for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
  21952. if (e === 0) {
  21953. e = 1 - eBias;
  21954. } else if (e === eMax) {
  21955. return m ? NaN : s ? -Infinity : Infinity;
  21956. } else {
  21957. m = m + pow(2, mLen);
  21958. e = e - eBias;
  21959. } return (s ? -1 : 1) * m * pow(2, e - mLen);
  21960. }
  21961. function unpackI32(bytes) {
  21962. return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
  21963. }
  21964. function packI8(it) {
  21965. return [it & 0xff];
  21966. }
  21967. function packI16(it) {
  21968. return [it & 0xff, it >> 8 & 0xff];
  21969. }
  21970. function packI32(it) {
  21971. return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
  21972. }
  21973. function packF64(it) {
  21974. return packIEEE754(it, 52, 8);
  21975. }
  21976. function packF32(it) {
  21977. return packIEEE754(it, 23, 4);
  21978. }
  21979. function addGetter(C, key, internal) {
  21980. dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
  21981. }
  21982. function get(view, bytes, index, isLittleEndian) {
  21983. var numIndex = +index;
  21984. var intIndex = toIndex(numIndex);
  21985. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  21986. var store = view[$BUFFER]._b;
  21987. var start = intIndex + view[$OFFSET];
  21988. var pack = store.slice(start, start + bytes);
  21989. return isLittleEndian ? pack : pack.reverse();
  21990. }
  21991. function set(view, bytes, index, conversion, value, isLittleEndian) {
  21992. var numIndex = +index;
  21993. var intIndex = toIndex(numIndex);
  21994. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  21995. var store = view[$BUFFER]._b;
  21996. var start = intIndex + view[$OFFSET];
  21997. var pack = conversion(+value);
  21998. for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
  21999. }
  22000. if (!$typed.ABV) {
  22001. $ArrayBuffer = function ArrayBuffer(length) {
  22002. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  22003. var byteLength = toIndex(length);
  22004. this._b = arrayFill.call(new Array(byteLength), 0);
  22005. this[$LENGTH] = byteLength;
  22006. };
  22007. $DataView = function DataView(buffer, byteOffset, byteLength) {
  22008. anInstance(this, $DataView, DATA_VIEW);
  22009. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  22010. var bufferLength = buffer[$LENGTH];
  22011. var offset = toInteger(byteOffset);
  22012. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
  22013. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  22014. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  22015. this[$BUFFER] = buffer;
  22016. this[$OFFSET] = offset;
  22017. this[$LENGTH] = byteLength;
  22018. };
  22019. if (DESCRIPTORS) {
  22020. addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
  22021. addGetter($DataView, BUFFER, '_b');
  22022. addGetter($DataView, BYTE_LENGTH, '_l');
  22023. addGetter($DataView, BYTE_OFFSET, '_o');
  22024. }
  22025. redefineAll($DataView[PROTOTYPE], {
  22026. getInt8: function getInt8(byteOffset) {
  22027. return get(this, 1, byteOffset)[0] << 24 >> 24;
  22028. },
  22029. getUint8: function getUint8(byteOffset) {
  22030. return get(this, 1, byteOffset)[0];
  22031. },
  22032. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  22033. var bytes = get(this, 2, byteOffset, arguments[1]);
  22034. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  22035. },
  22036. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  22037. var bytes = get(this, 2, byteOffset, arguments[1]);
  22038. return bytes[1] << 8 | bytes[0];
  22039. },
  22040. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  22041. return unpackI32(get(this, 4, byteOffset, arguments[1]));
  22042. },
  22043. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  22044. return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
  22045. },
  22046. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  22047. return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
  22048. },
  22049. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  22050. return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
  22051. },
  22052. setInt8: function setInt8(byteOffset, value) {
  22053. set(this, 1, byteOffset, packI8, value);
  22054. },
  22055. setUint8: function setUint8(byteOffset, value) {
  22056. set(this, 1, byteOffset, packI8, value);
  22057. },
  22058. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  22059. set(this, 2, byteOffset, packI16, value, arguments[2]);
  22060. },
  22061. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  22062. set(this, 2, byteOffset, packI16, value, arguments[2]);
  22063. },
  22064. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  22065. set(this, 4, byteOffset, packI32, value, arguments[2]);
  22066. },
  22067. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  22068. set(this, 4, byteOffset, packI32, value, arguments[2]);
  22069. },
  22070. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  22071. set(this, 4, byteOffset, packF32, value, arguments[2]);
  22072. },
  22073. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  22074. set(this, 8, byteOffset, packF64, value, arguments[2]);
  22075. }
  22076. });
  22077. } else {
  22078. if (!fails(function () {
  22079. $ArrayBuffer(1);
  22080. }) || !fails(function () {
  22081. new $ArrayBuffer(-1); // eslint-disable-line no-new
  22082. }) || fails(function () {
  22083. new $ArrayBuffer(); // eslint-disable-line no-new
  22084. new $ArrayBuffer(1.5); // eslint-disable-line no-new
  22085. new $ArrayBuffer(NaN); // eslint-disable-line no-new
  22086. return $ArrayBuffer.name != ARRAY_BUFFER;
  22087. })) {
  22088. $ArrayBuffer = function ArrayBuffer(length) {
  22089. anInstance(this, $ArrayBuffer);
  22090. return new BaseBuffer(toIndex(length));
  22091. };
  22092. var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
  22093. for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
  22094. if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
  22095. }
  22096. if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
  22097. }
  22098. // iOS Safari 7.x bug
  22099. var view = new $DataView(new $ArrayBuffer(2));
  22100. var $setInt8 = $DataView[PROTOTYPE].setInt8;
  22101. view.setInt8(0, 2147483648);
  22102. view.setInt8(1, 2147483649);
  22103. if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
  22104. setInt8: function setInt8(byteOffset, value) {
  22105. $setInt8.call(this, byteOffset, value << 24 >> 24);
  22106. },
  22107. setUint8: function setUint8(byteOffset, value) {
  22108. $setInt8.call(this, byteOffset, value << 24 >> 24);
  22109. }
  22110. }, true);
  22111. }
  22112. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  22113. setToStringTag($DataView, DATA_VIEW);
  22114. hide($DataView[PROTOTYPE], $typed.VIEW, true);
  22115. exports[ARRAY_BUFFER] = $ArrayBuffer;
  22116. exports[DATA_VIEW] = $DataView;
  22117. /***/ }),
  22118. /***/ 89383:
  22119. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22120. var global = __webpack_require__(3816);
  22121. var hide = __webpack_require__(87728);
  22122. var uid = __webpack_require__(93953);
  22123. var TYPED = uid('typed_array');
  22124. var VIEW = uid('view');
  22125. var ABV = !!(global.ArrayBuffer && global.DataView);
  22126. var CONSTR = ABV;
  22127. var i = 0;
  22128. var l = 9;
  22129. var Typed;
  22130. var TypedArrayConstructors = (
  22131. 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
  22132. ).split(',');
  22133. while (i < l) {
  22134. if (Typed = global[TypedArrayConstructors[i++]]) {
  22135. hide(Typed.prototype, TYPED, true);
  22136. hide(Typed.prototype, VIEW, true);
  22137. } else CONSTR = false;
  22138. }
  22139. module.exports = {
  22140. ABV: ABV,
  22141. CONSTR: CONSTR,
  22142. TYPED: TYPED,
  22143. VIEW: VIEW
  22144. };
  22145. /***/ }),
  22146. /***/ 93953:
  22147. /***/ ((module) => {
  22148. var id = 0;
  22149. var px = Math.random();
  22150. module.exports = function (key) {
  22151. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  22152. };
  22153. /***/ }),
  22154. /***/ 30575:
  22155. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22156. var global = __webpack_require__(3816);
  22157. var navigator = global.navigator;
  22158. module.exports = navigator && navigator.userAgent || '';
  22159. /***/ }),
  22160. /***/ 1616:
  22161. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22162. var isObject = __webpack_require__(55286);
  22163. module.exports = function (it, TYPE) {
  22164. if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  22165. return it;
  22166. };
  22167. /***/ }),
  22168. /***/ 36074:
  22169. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22170. var global = __webpack_require__(3816);
  22171. var core = __webpack_require__(25645);
  22172. var LIBRARY = __webpack_require__(4461);
  22173. var wksExt = __webpack_require__(28787);
  22174. var defineProperty = __webpack_require__(99275).f;
  22175. module.exports = function (name) {
  22176. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  22177. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  22178. };
  22179. /***/ }),
  22180. /***/ 28787:
  22181. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  22182. exports.f = __webpack_require__(86314);
  22183. /***/ }),
  22184. /***/ 86314:
  22185. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22186. var store = __webpack_require__(3825)('wks');
  22187. var uid = __webpack_require__(93953);
  22188. var Symbol = __webpack_require__(3816).Symbol;
  22189. var USE_SYMBOL = typeof Symbol == 'function';
  22190. var $exports = module.exports = function (name) {
  22191. return store[name] || (store[name] =
  22192. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  22193. };
  22194. $exports.store = store;
  22195. /***/ }),
  22196. /***/ 69002:
  22197. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22198. var classof = __webpack_require__(41488);
  22199. var ITERATOR = __webpack_require__(86314)('iterator');
  22200. var Iterators = __webpack_require__(87234);
  22201. module.exports = __webpack_require__(25645).getIteratorMethod = function (it) {
  22202. if (it != undefined) return it[ITERATOR]
  22203. || it['@@iterator']
  22204. || Iterators[classof(it)];
  22205. };
  22206. /***/ }),
  22207. /***/ 32000:
  22208. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22209. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  22210. var $export = __webpack_require__(42985);
  22211. $export($export.P, 'Array', { copyWithin: __webpack_require__(5216) });
  22212. __webpack_require__(17722)('copyWithin');
  22213. /***/ }),
  22214. /***/ 15745:
  22215. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22216. "use strict";
  22217. var $export = __webpack_require__(42985);
  22218. var $every = __webpack_require__(10050)(4);
  22219. $export($export.P + $export.F * !__webpack_require__(77717)([].every, true), 'Array', {
  22220. // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
  22221. every: function every(callbackfn /* , thisArg */) {
  22222. return $every(this, callbackfn, arguments[1]);
  22223. }
  22224. });
  22225. /***/ }),
  22226. /***/ 48977:
  22227. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22228. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  22229. var $export = __webpack_require__(42985);
  22230. $export($export.P, 'Array', { fill: __webpack_require__(46852) });
  22231. __webpack_require__(17722)('fill');
  22232. /***/ }),
  22233. /***/ 98837:
  22234. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22235. "use strict";
  22236. var $export = __webpack_require__(42985);
  22237. var $filter = __webpack_require__(10050)(2);
  22238. $export($export.P + $export.F * !__webpack_require__(77717)([].filter, true), 'Array', {
  22239. // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
  22240. filter: function filter(callbackfn /* , thisArg */) {
  22241. return $filter(this, callbackfn, arguments[1]);
  22242. }
  22243. });
  22244. /***/ }),
  22245. /***/ 94899:
  22246. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22247. "use strict";
  22248. // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
  22249. var $export = __webpack_require__(42985);
  22250. var $find = __webpack_require__(10050)(6);
  22251. var KEY = 'findIndex';
  22252. var forced = true;
  22253. // Shouldn't skip holes
  22254. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  22255. $export($export.P + $export.F * forced, 'Array', {
  22256. findIndex: function findIndex(callbackfn /* , that = undefined */) {
  22257. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  22258. }
  22259. });
  22260. __webpack_require__(17722)(KEY);
  22261. /***/ }),
  22262. /***/ 52310:
  22263. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22264. "use strict";
  22265. // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
  22266. var $export = __webpack_require__(42985);
  22267. var $find = __webpack_require__(10050)(5);
  22268. var KEY = 'find';
  22269. var forced = true;
  22270. // Shouldn't skip holes
  22271. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  22272. $export($export.P + $export.F * forced, 'Array', {
  22273. find: function find(callbackfn /* , that = undefined */) {
  22274. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  22275. }
  22276. });
  22277. __webpack_require__(17722)(KEY);
  22278. /***/ }),
  22279. /***/ 24336:
  22280. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22281. "use strict";
  22282. var $export = __webpack_require__(42985);
  22283. var $forEach = __webpack_require__(10050)(0);
  22284. var STRICT = __webpack_require__(77717)([].forEach, true);
  22285. $export($export.P + $export.F * !STRICT, 'Array', {
  22286. // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
  22287. forEach: function forEach(callbackfn /* , thisArg */) {
  22288. return $forEach(this, callbackfn, arguments[1]);
  22289. }
  22290. });
  22291. /***/ }),
  22292. /***/ 30522:
  22293. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22294. "use strict";
  22295. var ctx = __webpack_require__(741);
  22296. var $export = __webpack_require__(42985);
  22297. var toObject = __webpack_require__(20508);
  22298. var call = __webpack_require__(28851);
  22299. var isArrayIter = __webpack_require__(86555);
  22300. var toLength = __webpack_require__(10875);
  22301. var createProperty = __webpack_require__(92811);
  22302. var getIterFn = __webpack_require__(69002);
  22303. $export($export.S + $export.F * !__webpack_require__(7462)(function (iter) { Array.from(iter); }), 'Array', {
  22304. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  22305. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  22306. var O = toObject(arrayLike);
  22307. var C = typeof this == 'function' ? this : Array;
  22308. var aLen = arguments.length;
  22309. var mapfn = aLen > 1 ? arguments[1] : undefined;
  22310. var mapping = mapfn !== undefined;
  22311. var index = 0;
  22312. var iterFn = getIterFn(O);
  22313. var length, result, step, iterator;
  22314. if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  22315. // if object isn't iterable or it's array with default iterator - use simple case
  22316. if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
  22317. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  22318. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  22319. }
  22320. } else {
  22321. length = toLength(O.length);
  22322. for (result = new C(length); length > index; index++) {
  22323. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  22324. }
  22325. }
  22326. result.length = index;
  22327. return result;
  22328. }
  22329. });
  22330. /***/ }),
  22331. /***/ 23369:
  22332. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22333. "use strict";
  22334. var $export = __webpack_require__(42985);
  22335. var $indexOf = __webpack_require__(79315)(false);
  22336. var $native = [].indexOf;
  22337. var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
  22338. $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(77717)($native)), 'Array', {
  22339. // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
  22340. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  22341. return NEGATIVE_ZERO
  22342. // convert -0 to +0
  22343. ? $native.apply(this, arguments) || 0
  22344. : $indexOf(this, searchElement, arguments[1]);
  22345. }
  22346. });
  22347. /***/ }),
  22348. /***/ 20774:
  22349. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22350. // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
  22351. var $export = __webpack_require__(42985);
  22352. $export($export.S, 'Array', { isArray: __webpack_require__(4302) });
  22353. /***/ }),
  22354. /***/ 56997:
  22355. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22356. "use strict";
  22357. var addToUnscopables = __webpack_require__(17722);
  22358. var step = __webpack_require__(15436);
  22359. var Iterators = __webpack_require__(87234);
  22360. var toIObject = __webpack_require__(22110);
  22361. // 22.1.3.4 Array.prototype.entries()
  22362. // 22.1.3.13 Array.prototype.keys()
  22363. // 22.1.3.29 Array.prototype.values()
  22364. // 22.1.3.30 Array.prototype[@@iterator]()
  22365. module.exports = __webpack_require__(42923)(Array, 'Array', function (iterated, kind) {
  22366. this._t = toIObject(iterated); // target
  22367. this._i = 0; // next index
  22368. this._k = kind; // kind
  22369. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  22370. }, function () {
  22371. var O = this._t;
  22372. var kind = this._k;
  22373. var index = this._i++;
  22374. if (!O || index >= O.length) {
  22375. this._t = undefined;
  22376. return step(1);
  22377. }
  22378. if (kind == 'keys') return step(0, index);
  22379. if (kind == 'values') return step(0, O[index]);
  22380. return step(0, [index, O[index]]);
  22381. }, 'values');
  22382. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  22383. Iterators.Arguments = Iterators.Array;
  22384. addToUnscopables('keys');
  22385. addToUnscopables('values');
  22386. addToUnscopables('entries');
  22387. /***/ }),
  22388. /***/ 87842:
  22389. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22390. "use strict";
  22391. // 22.1.3.13 Array.prototype.join(separator)
  22392. var $export = __webpack_require__(42985);
  22393. var toIObject = __webpack_require__(22110);
  22394. var arrayJoin = [].join;
  22395. // fallback for not array-like strings
  22396. $export($export.P + $export.F * (__webpack_require__(49797) != Object || !__webpack_require__(77717)(arrayJoin)), 'Array', {
  22397. join: function join(separator) {
  22398. return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
  22399. }
  22400. });
  22401. /***/ }),
  22402. /***/ 99564:
  22403. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22404. "use strict";
  22405. var $export = __webpack_require__(42985);
  22406. var toIObject = __webpack_require__(22110);
  22407. var toInteger = __webpack_require__(81467);
  22408. var toLength = __webpack_require__(10875);
  22409. var $native = [].lastIndexOf;
  22410. var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
  22411. $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(77717)($native)), 'Array', {
  22412. // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
  22413. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  22414. // convert -0 to +0
  22415. if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
  22416. var O = toIObject(this);
  22417. var length = toLength(O.length);
  22418. var index = length - 1;
  22419. if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
  22420. if (index < 0) index = length + index;
  22421. for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
  22422. return -1;
  22423. }
  22424. });
  22425. /***/ }),
  22426. /***/ 19371:
  22427. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22428. "use strict";
  22429. var $export = __webpack_require__(42985);
  22430. var $map = __webpack_require__(10050)(1);
  22431. $export($export.P + $export.F * !__webpack_require__(77717)([].map, true), 'Array', {
  22432. // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
  22433. map: function map(callbackfn /* , thisArg */) {
  22434. return $map(this, callbackfn, arguments[1]);
  22435. }
  22436. });
  22437. /***/ }),
  22438. /***/ 58295:
  22439. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22440. "use strict";
  22441. var $export = __webpack_require__(42985);
  22442. var createProperty = __webpack_require__(92811);
  22443. // WebKit Array.of isn't generic
  22444. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  22445. function F() { /* empty */ }
  22446. return !(Array.of.call(F) instanceof F);
  22447. }), 'Array', {
  22448. // 22.1.2.3 Array.of( ...items)
  22449. of: function of(/* ...args */) {
  22450. var index = 0;
  22451. var aLen = arguments.length;
  22452. var result = new (typeof this == 'function' ? this : Array)(aLen);
  22453. while (aLen > index) createProperty(result, index, arguments[index++]);
  22454. result.length = aLen;
  22455. return result;
  22456. }
  22457. });
  22458. /***/ }),
  22459. /***/ 3750:
  22460. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22461. "use strict";
  22462. var $export = __webpack_require__(42985);
  22463. var $reduce = __webpack_require__(37628);
  22464. $export($export.P + $export.F * !__webpack_require__(77717)([].reduceRight, true), 'Array', {
  22465. // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
  22466. reduceRight: function reduceRight(callbackfn /* , initialValue */) {
  22467. return $reduce(this, callbackfn, arguments.length, arguments[1], true);
  22468. }
  22469. });
  22470. /***/ }),
  22471. /***/ 33057:
  22472. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22473. "use strict";
  22474. var $export = __webpack_require__(42985);
  22475. var $reduce = __webpack_require__(37628);
  22476. $export($export.P + $export.F * !__webpack_require__(77717)([].reduce, true), 'Array', {
  22477. // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
  22478. reduce: function reduce(callbackfn /* , initialValue */) {
  22479. return $reduce(this, callbackfn, arguments.length, arguments[1], false);
  22480. }
  22481. });
  22482. /***/ }),
  22483. /***/ 50110:
  22484. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22485. "use strict";
  22486. var $export = __webpack_require__(42985);
  22487. var html = __webpack_require__(40639);
  22488. var cof = __webpack_require__(92032);
  22489. var toAbsoluteIndex = __webpack_require__(92337);
  22490. var toLength = __webpack_require__(10875);
  22491. var arraySlice = [].slice;
  22492. // fallback for not array-like ES3 strings and DOM objects
  22493. $export($export.P + $export.F * __webpack_require__(74253)(function () {
  22494. if (html) arraySlice.call(html);
  22495. }), 'Array', {
  22496. slice: function slice(begin, end) {
  22497. var len = toLength(this.length);
  22498. var klass = cof(this);
  22499. end = end === undefined ? len : end;
  22500. if (klass == 'Array') return arraySlice.call(this, begin, end);
  22501. var start = toAbsoluteIndex(begin, len);
  22502. var upTo = toAbsoluteIndex(end, len);
  22503. var size = toLength(upTo - start);
  22504. var cloned = new Array(size);
  22505. var i = 0;
  22506. for (; i < size; i++) cloned[i] = klass == 'String'
  22507. ? this.charAt(start + i)
  22508. : this[start + i];
  22509. return cloned;
  22510. }
  22511. });
  22512. /***/ }),
  22513. /***/ 26773:
  22514. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22515. "use strict";
  22516. var $export = __webpack_require__(42985);
  22517. var $some = __webpack_require__(10050)(3);
  22518. $export($export.P + $export.F * !__webpack_require__(77717)([].some, true), 'Array', {
  22519. // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
  22520. some: function some(callbackfn /* , thisArg */) {
  22521. return $some(this, callbackfn, arguments[1]);
  22522. }
  22523. });
  22524. /***/ }),
  22525. /***/ 20075:
  22526. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22527. "use strict";
  22528. var $export = __webpack_require__(42985);
  22529. var aFunction = __webpack_require__(24963);
  22530. var toObject = __webpack_require__(20508);
  22531. var fails = __webpack_require__(74253);
  22532. var $sort = [].sort;
  22533. var test = [1, 2, 3];
  22534. $export($export.P + $export.F * (fails(function () {
  22535. // IE8-
  22536. test.sort(undefined);
  22537. }) || !fails(function () {
  22538. // V8 bug
  22539. test.sort(null);
  22540. // Old WebKit
  22541. }) || !__webpack_require__(77717)($sort)), 'Array', {
  22542. // 22.1.3.25 Array.prototype.sort(comparefn)
  22543. sort: function sort(comparefn) {
  22544. return comparefn === undefined
  22545. ? $sort.call(toObject(this))
  22546. : $sort.call(toObject(this), aFunction(comparefn));
  22547. }
  22548. });
  22549. /***/ }),
  22550. /***/ 31842:
  22551. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22552. __webpack_require__(2974)('Array');
  22553. /***/ }),
  22554. /***/ 81822:
  22555. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22556. // 20.3.3.1 / 15.9.4.4 Date.now()
  22557. var $export = __webpack_require__(42985);
  22558. $export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
  22559. /***/ }),
  22560. /***/ 91031:
  22561. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22562. // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
  22563. var $export = __webpack_require__(42985);
  22564. var toISOString = __webpack_require__(53537);
  22565. // PhantomJS / old WebKit has a broken implementations
  22566. $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
  22567. toISOString: toISOString
  22568. });
  22569. /***/ }),
  22570. /***/ 19977:
  22571. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22572. "use strict";
  22573. var $export = __webpack_require__(42985);
  22574. var toObject = __webpack_require__(20508);
  22575. var toPrimitive = __webpack_require__(21689);
  22576. $export($export.P + $export.F * __webpack_require__(74253)(function () {
  22577. return new Date(NaN).toJSON() !== null
  22578. || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
  22579. }), 'Date', {
  22580. // eslint-disable-next-line no-unused-vars
  22581. toJSON: function toJSON(key) {
  22582. var O = toObject(this);
  22583. var pv = toPrimitive(O);
  22584. return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  22585. }
  22586. });
  22587. /***/ }),
  22588. /***/ 41560:
  22589. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22590. var TO_PRIMITIVE = __webpack_require__(86314)('toPrimitive');
  22591. var proto = Date.prototype;
  22592. if (!(TO_PRIMITIVE in proto)) __webpack_require__(87728)(proto, TO_PRIMITIVE, __webpack_require__(870));
  22593. /***/ }),
  22594. /***/ 46331:
  22595. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22596. var DateProto = Date.prototype;
  22597. var INVALID_DATE = 'Invalid Date';
  22598. var TO_STRING = 'toString';
  22599. var $toString = DateProto[TO_STRING];
  22600. var getTime = DateProto.getTime;
  22601. if (new Date(NaN) + '' != INVALID_DATE) {
  22602. __webpack_require__(77234)(DateProto, TO_STRING, function toString() {
  22603. var value = getTime.call(this);
  22604. // eslint-disable-next-line no-self-compare
  22605. return value === value ? $toString.call(this) : INVALID_DATE;
  22606. });
  22607. }
  22608. /***/ }),
  22609. /***/ 39730:
  22610. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22611. // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
  22612. var $export = __webpack_require__(42985);
  22613. $export($export.P, 'Function', { bind: __webpack_require__(34398) });
  22614. /***/ }),
  22615. /***/ 48377:
  22616. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22617. "use strict";
  22618. var isObject = __webpack_require__(55286);
  22619. var getPrototypeOf = __webpack_require__(468);
  22620. var HAS_INSTANCE = __webpack_require__(86314)('hasInstance');
  22621. var FunctionProto = Function.prototype;
  22622. // 19.2.3.6 Function.prototype[@@hasInstance](V)
  22623. if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(99275).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
  22624. if (typeof this != 'function' || !isObject(O)) return false;
  22625. if (!isObject(this.prototype)) return O instanceof this;
  22626. // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
  22627. while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
  22628. return false;
  22629. } });
  22630. /***/ }),
  22631. /***/ 6059:
  22632. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22633. var dP = __webpack_require__(99275).f;
  22634. var FProto = Function.prototype;
  22635. var nameRE = /^\s*function ([^ (]*)/;
  22636. var NAME = 'name';
  22637. // 19.2.4.2 name
  22638. NAME in FProto || __webpack_require__(67057) && dP(FProto, NAME, {
  22639. configurable: true,
  22640. get: function () {
  22641. try {
  22642. return ('' + this).match(nameRE)[1];
  22643. } catch (e) {
  22644. return '';
  22645. }
  22646. }
  22647. });
  22648. /***/ }),
  22649. /***/ 88416:
  22650. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22651. "use strict";
  22652. var strong = __webpack_require__(9824);
  22653. var validate = __webpack_require__(1616);
  22654. var MAP = 'Map';
  22655. // 23.1 Map Objects
  22656. module.exports = __webpack_require__(45795)(MAP, function (get) {
  22657. return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  22658. }, {
  22659. // 23.1.3.6 Map.prototype.get(key)
  22660. get: function get(key) {
  22661. var entry = strong.getEntry(validate(this, MAP), key);
  22662. return entry && entry.v;
  22663. },
  22664. // 23.1.3.9 Map.prototype.set(key, value)
  22665. set: function set(key, value) {
  22666. return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  22667. }
  22668. }, strong, true);
  22669. /***/ }),
  22670. /***/ 76503:
  22671. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22672. // 20.2.2.3 Math.acosh(x)
  22673. var $export = __webpack_require__(42985);
  22674. var log1p = __webpack_require__(46206);
  22675. var sqrt = Math.sqrt;
  22676. var $acosh = Math.acosh;
  22677. $export($export.S + $export.F * !($acosh
  22678. // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
  22679. && Math.floor($acosh(Number.MAX_VALUE)) == 710
  22680. // Tor Browser bug: Math.acosh(Infinity) -> NaN
  22681. && $acosh(Infinity) == Infinity
  22682. ), 'Math', {
  22683. acosh: function acosh(x) {
  22684. return (x = +x) < 1 ? NaN : x > 94906265.62425156
  22685. ? Math.log(x) + Math.LN2
  22686. : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
  22687. }
  22688. });
  22689. /***/ }),
  22690. /***/ 66786:
  22691. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22692. // 20.2.2.5 Math.asinh(x)
  22693. var $export = __webpack_require__(42985);
  22694. var $asinh = Math.asinh;
  22695. function asinh(x) {
  22696. return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
  22697. }
  22698. // Tor Browser bug: Math.asinh(0) -> -0
  22699. $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
  22700. /***/ }),
  22701. /***/ 50932:
  22702. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22703. // 20.2.2.7 Math.atanh(x)
  22704. var $export = __webpack_require__(42985);
  22705. var $atanh = Math.atanh;
  22706. // Tor Browser bug: Math.atanh(-0) -> 0
  22707. $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  22708. atanh: function atanh(x) {
  22709. return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  22710. }
  22711. });
  22712. /***/ }),
  22713. /***/ 57526:
  22714. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22715. // 20.2.2.9 Math.cbrt(x)
  22716. var $export = __webpack_require__(42985);
  22717. var sign = __webpack_require__(61801);
  22718. $export($export.S, 'Math', {
  22719. cbrt: function cbrt(x) {
  22720. return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
  22721. }
  22722. });
  22723. /***/ }),
  22724. /***/ 21591:
  22725. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22726. // 20.2.2.11 Math.clz32(x)
  22727. var $export = __webpack_require__(42985);
  22728. $export($export.S, 'Math', {
  22729. clz32: function clz32(x) {
  22730. return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
  22731. }
  22732. });
  22733. /***/ }),
  22734. /***/ 9073:
  22735. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22736. // 20.2.2.12 Math.cosh(x)
  22737. var $export = __webpack_require__(42985);
  22738. var exp = Math.exp;
  22739. $export($export.S, 'Math', {
  22740. cosh: function cosh(x) {
  22741. return (exp(x = +x) + exp(-x)) / 2;
  22742. }
  22743. });
  22744. /***/ }),
  22745. /***/ 80347:
  22746. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22747. // 20.2.2.14 Math.expm1(x)
  22748. var $export = __webpack_require__(42985);
  22749. var $expm1 = __webpack_require__(13086);
  22750. $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
  22751. /***/ }),
  22752. /***/ 30579:
  22753. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22754. // 20.2.2.16 Math.fround(x)
  22755. var $export = __webpack_require__(42985);
  22756. $export($export.S, 'Math', { fround: __webpack_require__(34934) });
  22757. /***/ }),
  22758. /***/ 4669:
  22759. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22760. // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
  22761. var $export = __webpack_require__(42985);
  22762. var abs = Math.abs;
  22763. $export($export.S, 'Math', {
  22764. hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
  22765. var sum = 0;
  22766. var i = 0;
  22767. var aLen = arguments.length;
  22768. var larg = 0;
  22769. var arg, div;
  22770. while (i < aLen) {
  22771. arg = abs(arguments[i++]);
  22772. if (larg < arg) {
  22773. div = larg / arg;
  22774. sum = sum * div * div + 1;
  22775. larg = arg;
  22776. } else if (arg > 0) {
  22777. div = arg / larg;
  22778. sum += div * div;
  22779. } else sum += arg;
  22780. }
  22781. return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
  22782. }
  22783. });
  22784. /***/ }),
  22785. /***/ 67710:
  22786. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22787. // 20.2.2.18 Math.imul(x, y)
  22788. var $export = __webpack_require__(42985);
  22789. var $imul = Math.imul;
  22790. // some WebKit versions fails with big numbers, some has wrong arity
  22791. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  22792. return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
  22793. }), 'Math', {
  22794. imul: function imul(x, y) {
  22795. var UINT16 = 0xffff;
  22796. var xn = +x;
  22797. var yn = +y;
  22798. var xl = UINT16 & xn;
  22799. var yl = UINT16 & yn;
  22800. return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
  22801. }
  22802. });
  22803. /***/ }),
  22804. /***/ 45789:
  22805. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22806. // 20.2.2.21 Math.log10(x)
  22807. var $export = __webpack_require__(42985);
  22808. $export($export.S, 'Math', {
  22809. log10: function log10(x) {
  22810. return Math.log(x) * Math.LOG10E;
  22811. }
  22812. });
  22813. /***/ }),
  22814. /***/ 33514:
  22815. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22816. // 20.2.2.20 Math.log1p(x)
  22817. var $export = __webpack_require__(42985);
  22818. $export($export.S, 'Math', { log1p: __webpack_require__(46206) });
  22819. /***/ }),
  22820. /***/ 99978:
  22821. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22822. // 20.2.2.22 Math.log2(x)
  22823. var $export = __webpack_require__(42985);
  22824. $export($export.S, 'Math', {
  22825. log2: function log2(x) {
  22826. return Math.log(x) / Math.LN2;
  22827. }
  22828. });
  22829. /***/ }),
  22830. /***/ 58472:
  22831. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22832. // 20.2.2.28 Math.sign(x)
  22833. var $export = __webpack_require__(42985);
  22834. $export($export.S, 'Math', { sign: __webpack_require__(61801) });
  22835. /***/ }),
  22836. /***/ 86946:
  22837. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22838. // 20.2.2.30 Math.sinh(x)
  22839. var $export = __webpack_require__(42985);
  22840. var expm1 = __webpack_require__(13086);
  22841. var exp = Math.exp;
  22842. // V8 near Chromium 38 has a problem with very small numbers
  22843. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  22844. return !Math.sinh(-2e-17) != -2e-17;
  22845. }), 'Math', {
  22846. sinh: function sinh(x) {
  22847. return Math.abs(x = +x) < 1
  22848. ? (expm1(x) - expm1(-x)) / 2
  22849. : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
  22850. }
  22851. });
  22852. /***/ }),
  22853. /***/ 35068:
  22854. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22855. // 20.2.2.33 Math.tanh(x)
  22856. var $export = __webpack_require__(42985);
  22857. var expm1 = __webpack_require__(13086);
  22858. var exp = Math.exp;
  22859. $export($export.S, 'Math', {
  22860. tanh: function tanh(x) {
  22861. var a = expm1(x = +x);
  22862. var b = expm1(-x);
  22863. return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  22864. }
  22865. });
  22866. /***/ }),
  22867. /***/ 413:
  22868. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22869. // 20.2.2.34 Math.trunc(x)
  22870. var $export = __webpack_require__(42985);
  22871. $export($export.S, 'Math', {
  22872. trunc: function trunc(it) {
  22873. return (it > 0 ? Math.floor : Math.ceil)(it);
  22874. }
  22875. });
  22876. /***/ }),
  22877. /***/ 11246:
  22878. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22879. "use strict";
  22880. var global = __webpack_require__(3816);
  22881. var has = __webpack_require__(79181);
  22882. var cof = __webpack_require__(92032);
  22883. var inheritIfRequired = __webpack_require__(40266);
  22884. var toPrimitive = __webpack_require__(21689);
  22885. var fails = __webpack_require__(74253);
  22886. var gOPN = __webpack_require__(20616).f;
  22887. var gOPD = __webpack_require__(18693).f;
  22888. var dP = __webpack_require__(99275).f;
  22889. var $trim = __webpack_require__(29599).trim;
  22890. var NUMBER = 'Number';
  22891. var $Number = global[NUMBER];
  22892. var Base = $Number;
  22893. var proto = $Number.prototype;
  22894. // Opera ~12 has broken Object#toString
  22895. var BROKEN_COF = cof(__webpack_require__(42503)(proto)) == NUMBER;
  22896. var TRIM = 'trim' in String.prototype;
  22897. // 7.1.3 ToNumber(argument)
  22898. var toNumber = function (argument) {
  22899. var it = toPrimitive(argument, false);
  22900. if (typeof it == 'string' && it.length > 2) {
  22901. it = TRIM ? it.trim() : $trim(it, 3);
  22902. var first = it.charCodeAt(0);
  22903. var third, radix, maxCode;
  22904. if (first === 43 || first === 45) {
  22905. third = it.charCodeAt(2);
  22906. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  22907. } else if (first === 48) {
  22908. switch (it.charCodeAt(1)) {
  22909. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
  22910. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
  22911. default: return +it;
  22912. }
  22913. for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
  22914. code = digits.charCodeAt(i);
  22915. // parseInt parses a string to a first unavailable symbol
  22916. // but ToNumber should return NaN if a string contains unavailable symbols
  22917. if (code < 48 || code > maxCode) return NaN;
  22918. } return parseInt(digits, radix);
  22919. }
  22920. } return +it;
  22921. };
  22922. if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  22923. $Number = function Number(value) {
  22924. var it = arguments.length < 1 ? 0 : value;
  22925. var that = this;
  22926. return that instanceof $Number
  22927. // check on 1..constructor(foo) case
  22928. && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
  22929. ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  22930. };
  22931. for (var keys = __webpack_require__(67057) ? gOPN(Base) : (
  22932. // ES3:
  22933. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  22934. // ES6 (in case, if modules with ES6 Number statics required before):
  22935. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  22936. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  22937. ).split(','), j = 0, key; keys.length > j; j++) {
  22938. if (has(Base, key = keys[j]) && !has($Number, key)) {
  22939. dP($Number, key, gOPD(Base, key));
  22940. }
  22941. }
  22942. $Number.prototype = proto;
  22943. proto.constructor = $Number;
  22944. __webpack_require__(77234)(global, NUMBER, $Number);
  22945. }
  22946. /***/ }),
  22947. /***/ 75972:
  22948. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22949. // 20.1.2.1 Number.EPSILON
  22950. var $export = __webpack_require__(42985);
  22951. $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
  22952. /***/ }),
  22953. /***/ 53403:
  22954. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22955. // 20.1.2.2 Number.isFinite(number)
  22956. var $export = __webpack_require__(42985);
  22957. var _isFinite = __webpack_require__(3816).isFinite;
  22958. $export($export.S, 'Number', {
  22959. isFinite: function isFinite(it) {
  22960. return typeof it == 'number' && _isFinite(it);
  22961. }
  22962. });
  22963. /***/ }),
  22964. /***/ 92516:
  22965. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22966. // 20.1.2.3 Number.isInteger(number)
  22967. var $export = __webpack_require__(42985);
  22968. $export($export.S, 'Number', { isInteger: __webpack_require__(18367) });
  22969. /***/ }),
  22970. /***/ 49371:
  22971. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22972. // 20.1.2.4 Number.isNaN(number)
  22973. var $export = __webpack_require__(42985);
  22974. $export($export.S, 'Number', {
  22975. isNaN: function isNaN(number) {
  22976. // eslint-disable-next-line no-self-compare
  22977. return number != number;
  22978. }
  22979. });
  22980. /***/ }),
  22981. /***/ 86479:
  22982. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22983. // 20.1.2.5 Number.isSafeInteger(number)
  22984. var $export = __webpack_require__(42985);
  22985. var isInteger = __webpack_require__(18367);
  22986. var abs = Math.abs;
  22987. $export($export.S, 'Number', {
  22988. isSafeInteger: function isSafeInteger(number) {
  22989. return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  22990. }
  22991. });
  22992. /***/ }),
  22993. /***/ 91736:
  22994. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22995. // 20.1.2.6 Number.MAX_SAFE_INTEGER
  22996. var $export = __webpack_require__(42985);
  22997. $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
  22998. /***/ }),
  22999. /***/ 51889:
  23000. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23001. // 20.1.2.10 Number.MIN_SAFE_INTEGER
  23002. var $export = __webpack_require__(42985);
  23003. $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
  23004. /***/ }),
  23005. /***/ 65177:
  23006. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23007. var $export = __webpack_require__(42985);
  23008. var $parseFloat = __webpack_require__(47743);
  23009. // 20.1.2.12 Number.parseFloat(string)
  23010. $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
  23011. /***/ }),
  23012. /***/ 81246:
  23013. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23014. var $export = __webpack_require__(42985);
  23015. var $parseInt = __webpack_require__(55960);
  23016. // 20.1.2.13 Number.parseInt(string, radix)
  23017. $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
  23018. /***/ }),
  23019. /***/ 30726:
  23020. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23021. "use strict";
  23022. var $export = __webpack_require__(42985);
  23023. var toInteger = __webpack_require__(81467);
  23024. var aNumberValue = __webpack_require__(83365);
  23025. var repeat = __webpack_require__(68595);
  23026. var $toFixed = 1.0.toFixed;
  23027. var floor = Math.floor;
  23028. var data = [0, 0, 0, 0, 0, 0];
  23029. var ERROR = 'Number.toFixed: incorrect invocation!';
  23030. var ZERO = '0';
  23031. var multiply = function (n, c) {
  23032. var i = -1;
  23033. var c2 = c;
  23034. while (++i < 6) {
  23035. c2 += n * data[i];
  23036. data[i] = c2 % 1e7;
  23037. c2 = floor(c2 / 1e7);
  23038. }
  23039. };
  23040. var divide = function (n) {
  23041. var i = 6;
  23042. var c = 0;
  23043. while (--i >= 0) {
  23044. c += data[i];
  23045. data[i] = floor(c / n);
  23046. c = (c % n) * 1e7;
  23047. }
  23048. };
  23049. var numToString = function () {
  23050. var i = 6;
  23051. var s = '';
  23052. while (--i >= 0) {
  23053. if (s !== '' || i === 0 || data[i] !== 0) {
  23054. var t = String(data[i]);
  23055. s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
  23056. }
  23057. } return s;
  23058. };
  23059. var pow = function (x, n, acc) {
  23060. return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
  23061. };
  23062. var log = function (x) {
  23063. var n = 0;
  23064. var x2 = x;
  23065. while (x2 >= 4096) {
  23066. n += 12;
  23067. x2 /= 4096;
  23068. }
  23069. while (x2 >= 2) {
  23070. n += 1;
  23071. x2 /= 2;
  23072. } return n;
  23073. };
  23074. $export($export.P + $export.F * (!!$toFixed && (
  23075. 0.00008.toFixed(3) !== '0.000' ||
  23076. 0.9.toFixed(0) !== '1' ||
  23077. 1.255.toFixed(2) !== '1.25' ||
  23078. 1000000000000000128.0.toFixed(0) !== '1000000000000000128'
  23079. ) || !__webpack_require__(74253)(function () {
  23080. // V8 ~ Android 4.3-
  23081. $toFixed.call({});
  23082. })), 'Number', {
  23083. toFixed: function toFixed(fractionDigits) {
  23084. var x = aNumberValue(this, ERROR);
  23085. var f = toInteger(fractionDigits);
  23086. var s = '';
  23087. var m = ZERO;
  23088. var e, z, j, k;
  23089. if (f < 0 || f > 20) throw RangeError(ERROR);
  23090. // eslint-disable-next-line no-self-compare
  23091. if (x != x) return 'NaN';
  23092. if (x <= -1e21 || x >= 1e21) return String(x);
  23093. if (x < 0) {
  23094. s = '-';
  23095. x = -x;
  23096. }
  23097. if (x > 1e-21) {
  23098. e = log(x * pow(2, 69, 1)) - 69;
  23099. z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
  23100. z *= 0x10000000000000;
  23101. e = 52 - e;
  23102. if (e > 0) {
  23103. multiply(0, z);
  23104. j = f;
  23105. while (j >= 7) {
  23106. multiply(1e7, 0);
  23107. j -= 7;
  23108. }
  23109. multiply(pow(10, j, 1), 0);
  23110. j = e - 1;
  23111. while (j >= 23) {
  23112. divide(1 << 23);
  23113. j -= 23;
  23114. }
  23115. divide(1 << j);
  23116. multiply(1, 1);
  23117. divide(2);
  23118. m = numToString();
  23119. } else {
  23120. multiply(0, z);
  23121. multiply(1 << -e, 0);
  23122. m = numToString() + repeat.call(ZERO, f);
  23123. }
  23124. }
  23125. if (f > 0) {
  23126. k = m.length;
  23127. m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
  23128. } else {
  23129. m = s + m;
  23130. } return m;
  23131. }
  23132. });
  23133. /***/ }),
  23134. /***/ 1901:
  23135. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23136. "use strict";
  23137. var $export = __webpack_require__(42985);
  23138. var $fails = __webpack_require__(74253);
  23139. var aNumberValue = __webpack_require__(83365);
  23140. var $toPrecision = 1.0.toPrecision;
  23141. $export($export.P + $export.F * ($fails(function () {
  23142. // IE7-
  23143. return $toPrecision.call(1, undefined) !== '1';
  23144. }) || !$fails(function () {
  23145. // V8 ~ Android 4.3-
  23146. $toPrecision.call({});
  23147. })), 'Number', {
  23148. toPrecision: function toPrecision(precision) {
  23149. var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
  23150. return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
  23151. }
  23152. });
  23153. /***/ }),
  23154. /***/ 75115:
  23155. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23156. // 19.1.3.1 Object.assign(target, source)
  23157. var $export = __webpack_require__(42985);
  23158. $export($export.S + $export.F, 'Object', { assign: __webpack_require__(35345) });
  23159. /***/ }),
  23160. /***/ 68132:
  23161. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23162. var $export = __webpack_require__(42985);
  23163. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  23164. $export($export.S, 'Object', { create: __webpack_require__(42503) });
  23165. /***/ }),
  23166. /***/ 37470:
  23167. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23168. var $export = __webpack_require__(42985);
  23169. // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
  23170. $export($export.S + $export.F * !__webpack_require__(67057), 'Object', { defineProperties: __webpack_require__(35588) });
  23171. /***/ }),
  23172. /***/ 48388:
  23173. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23174. var $export = __webpack_require__(42985);
  23175. // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
  23176. $export($export.S + $export.F * !__webpack_require__(67057), 'Object', { defineProperty: __webpack_require__(99275).f });
  23177. /***/ }),
  23178. /***/ 89375:
  23179. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23180. // 19.1.2.5 Object.freeze(O)
  23181. var isObject = __webpack_require__(55286);
  23182. var meta = __webpack_require__(84728).onFreeze;
  23183. __webpack_require__(33160)('freeze', function ($freeze) {
  23184. return function freeze(it) {
  23185. return $freeze && isObject(it) ? $freeze(meta(it)) : it;
  23186. };
  23187. });
  23188. /***/ }),
  23189. /***/ 94882:
  23190. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23191. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  23192. var toIObject = __webpack_require__(22110);
  23193. var $getOwnPropertyDescriptor = __webpack_require__(18693).f;
  23194. __webpack_require__(33160)('getOwnPropertyDescriptor', function () {
  23195. return function getOwnPropertyDescriptor(it, key) {
  23196. return $getOwnPropertyDescriptor(toIObject(it), key);
  23197. };
  23198. });
  23199. /***/ }),
  23200. /***/ 79622:
  23201. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23202. // 19.1.2.7 Object.getOwnPropertyNames(O)
  23203. __webpack_require__(33160)('getOwnPropertyNames', function () {
  23204. return __webpack_require__(39327).f;
  23205. });
  23206. /***/ }),
  23207. /***/ 41520:
  23208. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23209. // 19.1.2.9 Object.getPrototypeOf(O)
  23210. var toObject = __webpack_require__(20508);
  23211. var $getPrototypeOf = __webpack_require__(468);
  23212. __webpack_require__(33160)('getPrototypeOf', function () {
  23213. return function getPrototypeOf(it) {
  23214. return $getPrototypeOf(toObject(it));
  23215. };
  23216. });
  23217. /***/ }),
  23218. /***/ 49892:
  23219. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23220. // 19.1.2.11 Object.isExtensible(O)
  23221. var isObject = __webpack_require__(55286);
  23222. __webpack_require__(33160)('isExtensible', function ($isExtensible) {
  23223. return function isExtensible(it) {
  23224. return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
  23225. };
  23226. });
  23227. /***/ }),
  23228. /***/ 64157:
  23229. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23230. // 19.1.2.12 Object.isFrozen(O)
  23231. var isObject = __webpack_require__(55286);
  23232. __webpack_require__(33160)('isFrozen', function ($isFrozen) {
  23233. return function isFrozen(it) {
  23234. return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
  23235. };
  23236. });
  23237. /***/ }),
  23238. /***/ 35095:
  23239. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23240. // 19.1.2.13 Object.isSealed(O)
  23241. var isObject = __webpack_require__(55286);
  23242. __webpack_require__(33160)('isSealed', function ($isSealed) {
  23243. return function isSealed(it) {
  23244. return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
  23245. };
  23246. });
  23247. /***/ }),
  23248. /***/ 99176:
  23249. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23250. // 19.1.3.10 Object.is(value1, value2)
  23251. var $export = __webpack_require__(42985);
  23252. $export($export.S, 'Object', { is: __webpack_require__(27195) });
  23253. /***/ }),
  23254. /***/ 27476:
  23255. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23256. // 19.1.2.14 Object.keys(O)
  23257. var toObject = __webpack_require__(20508);
  23258. var $keys = __webpack_require__(47184);
  23259. __webpack_require__(33160)('keys', function () {
  23260. return function keys(it) {
  23261. return $keys(toObject(it));
  23262. };
  23263. });
  23264. /***/ }),
  23265. /***/ 84672:
  23266. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23267. // 19.1.2.15 Object.preventExtensions(O)
  23268. var isObject = __webpack_require__(55286);
  23269. var meta = __webpack_require__(84728).onFreeze;
  23270. __webpack_require__(33160)('preventExtensions', function ($preventExtensions) {
  23271. return function preventExtensions(it) {
  23272. return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
  23273. };
  23274. });
  23275. /***/ }),
  23276. /***/ 43533:
  23277. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23278. // 19.1.2.17 Object.seal(O)
  23279. var isObject = __webpack_require__(55286);
  23280. var meta = __webpack_require__(84728).onFreeze;
  23281. __webpack_require__(33160)('seal', function ($seal) {
  23282. return function seal(it) {
  23283. return $seal && isObject(it) ? $seal(meta(it)) : it;
  23284. };
  23285. });
  23286. /***/ }),
  23287. /***/ 68838:
  23288. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23289. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  23290. var $export = __webpack_require__(42985);
  23291. $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(27375).set });
  23292. /***/ }),
  23293. /***/ 96253:
  23294. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23295. "use strict";
  23296. // 19.1.3.6 Object.prototype.toString()
  23297. var classof = __webpack_require__(41488);
  23298. var test = {};
  23299. test[__webpack_require__(86314)('toStringTag')] = 'z';
  23300. if (test + '' != '[object z]') {
  23301. __webpack_require__(77234)(Object.prototype, 'toString', function toString() {
  23302. return '[object ' + classof(this) + ']';
  23303. }, true);
  23304. }
  23305. /***/ }),
  23306. /***/ 64299:
  23307. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23308. var $export = __webpack_require__(42985);
  23309. var $parseFloat = __webpack_require__(47743);
  23310. // 18.2.4 parseFloat(string)
  23311. $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
  23312. /***/ }),
  23313. /***/ 71084:
  23314. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23315. var $export = __webpack_require__(42985);
  23316. var $parseInt = __webpack_require__(55960);
  23317. // 18.2.5 parseInt(string, radix)
  23318. $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
  23319. /***/ }),
  23320. /***/ 40851:
  23321. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23322. "use strict";
  23323. var LIBRARY = __webpack_require__(4461);
  23324. var global = __webpack_require__(3816);
  23325. var ctx = __webpack_require__(741);
  23326. var classof = __webpack_require__(41488);
  23327. var $export = __webpack_require__(42985);
  23328. var isObject = __webpack_require__(55286);
  23329. var aFunction = __webpack_require__(24963);
  23330. var anInstance = __webpack_require__(83328);
  23331. var forOf = __webpack_require__(3531);
  23332. var speciesConstructor = __webpack_require__(58364);
  23333. var task = __webpack_require__(74193).set;
  23334. var microtask = __webpack_require__(14351)();
  23335. var newPromiseCapabilityModule = __webpack_require__(43499);
  23336. var perform = __webpack_require__(10188);
  23337. var userAgent = __webpack_require__(30575);
  23338. var promiseResolve = __webpack_require__(50094);
  23339. var PROMISE = 'Promise';
  23340. var TypeError = global.TypeError;
  23341. var process = global.process;
  23342. var versions = process && process.versions;
  23343. var v8 = versions && versions.v8 || '';
  23344. var $Promise = global[PROMISE];
  23345. var isNode = classof(process) == 'process';
  23346. var empty = function () { /* empty */ };
  23347. var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
  23348. var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
  23349. var USE_NATIVE = !!function () {
  23350. try {
  23351. // correct subclassing with @@species support
  23352. var promise = $Promise.resolve(1);
  23353. var FakePromise = (promise.constructor = {})[__webpack_require__(86314)('species')] = function (exec) {
  23354. exec(empty, empty);
  23355. };
  23356. // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  23357. return (isNode || typeof PromiseRejectionEvent == 'function')
  23358. && promise.then(empty) instanceof FakePromise
  23359. // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  23360. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  23361. // we can't detect it synchronously, so just check versions
  23362. && v8.indexOf('6.6') !== 0
  23363. && userAgent.indexOf('Chrome/66') === -1;
  23364. } catch (e) { /* empty */ }
  23365. }();
  23366. // helpers
  23367. var isThenable = function (it) {
  23368. var then;
  23369. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  23370. };
  23371. var notify = function (promise, isReject) {
  23372. if (promise._n) return;
  23373. promise._n = true;
  23374. var chain = promise._c;
  23375. microtask(function () {
  23376. var value = promise._v;
  23377. var ok = promise._s == 1;
  23378. var i = 0;
  23379. var run = function (reaction) {
  23380. var handler = ok ? reaction.ok : reaction.fail;
  23381. var resolve = reaction.resolve;
  23382. var reject = reaction.reject;
  23383. var domain = reaction.domain;
  23384. var result, then, exited;
  23385. try {
  23386. if (handler) {
  23387. if (!ok) {
  23388. if (promise._h == 2) onHandleUnhandled(promise);
  23389. promise._h = 1;
  23390. }
  23391. if (handler === true) result = value;
  23392. else {
  23393. if (domain) domain.enter();
  23394. result = handler(value); // may throw
  23395. if (domain) {
  23396. domain.exit();
  23397. exited = true;
  23398. }
  23399. }
  23400. if (result === reaction.promise) {
  23401. reject(TypeError('Promise-chain cycle'));
  23402. } else if (then = isThenable(result)) {
  23403. then.call(result, resolve, reject);
  23404. } else resolve(result);
  23405. } else reject(value);
  23406. } catch (e) {
  23407. if (domain && !exited) domain.exit();
  23408. reject(e);
  23409. }
  23410. };
  23411. while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
  23412. promise._c = [];
  23413. promise._n = false;
  23414. if (isReject && !promise._h) onUnhandled(promise);
  23415. });
  23416. };
  23417. var onUnhandled = function (promise) {
  23418. task.call(global, function () {
  23419. var value = promise._v;
  23420. var unhandled = isUnhandled(promise);
  23421. var result, handler, console;
  23422. if (unhandled) {
  23423. result = perform(function () {
  23424. if (isNode) {
  23425. process.emit('unhandledRejection', value, promise);
  23426. } else if (handler = global.onunhandledrejection) {
  23427. handler({ promise: promise, reason: value });
  23428. } else if ((console = global.console) && console.error) {
  23429. console.error('Unhandled promise rejection', value);
  23430. }
  23431. });
  23432. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  23433. promise._h = isNode || isUnhandled(promise) ? 2 : 1;
  23434. } promise._a = undefined;
  23435. if (unhandled && result.e) throw result.v;
  23436. });
  23437. };
  23438. var isUnhandled = function (promise) {
  23439. return promise._h !== 1 && (promise._a || promise._c).length === 0;
  23440. };
  23441. var onHandleUnhandled = function (promise) {
  23442. task.call(global, function () {
  23443. var handler;
  23444. if (isNode) {
  23445. process.emit('rejectionHandled', promise);
  23446. } else if (handler = global.onrejectionhandled) {
  23447. handler({ promise: promise, reason: promise._v });
  23448. }
  23449. });
  23450. };
  23451. var $reject = function (value) {
  23452. var promise = this;
  23453. if (promise._d) return;
  23454. promise._d = true;
  23455. promise = promise._w || promise; // unwrap
  23456. promise._v = value;
  23457. promise._s = 2;
  23458. if (!promise._a) promise._a = promise._c.slice();
  23459. notify(promise, true);
  23460. };
  23461. var $resolve = function (value) {
  23462. var promise = this;
  23463. var then;
  23464. if (promise._d) return;
  23465. promise._d = true;
  23466. promise = promise._w || promise; // unwrap
  23467. try {
  23468. if (promise === value) throw TypeError("Promise can't be resolved itself");
  23469. if (then = isThenable(value)) {
  23470. microtask(function () {
  23471. var wrapper = { _w: promise, _d: false }; // wrap
  23472. try {
  23473. then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
  23474. } catch (e) {
  23475. $reject.call(wrapper, e);
  23476. }
  23477. });
  23478. } else {
  23479. promise._v = value;
  23480. promise._s = 1;
  23481. notify(promise, false);
  23482. }
  23483. } catch (e) {
  23484. $reject.call({ _w: promise, _d: false }, e); // wrap
  23485. }
  23486. };
  23487. // constructor polyfill
  23488. if (!USE_NATIVE) {
  23489. // 25.4.3.1 Promise(executor)
  23490. $Promise = function Promise(executor) {
  23491. anInstance(this, $Promise, PROMISE, '_h');
  23492. aFunction(executor);
  23493. Internal.call(this);
  23494. try {
  23495. executor(ctx($resolve, this, 1), ctx($reject, this, 1));
  23496. } catch (err) {
  23497. $reject.call(this, err);
  23498. }
  23499. };
  23500. // eslint-disable-next-line no-unused-vars
  23501. Internal = function Promise(executor) {
  23502. this._c = []; // <- awaiting reactions
  23503. this._a = undefined; // <- checked in isUnhandled reactions
  23504. this._s = 0; // <- state
  23505. this._d = false; // <- done
  23506. this._v = undefined; // <- value
  23507. this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
  23508. this._n = false; // <- notify
  23509. };
  23510. Internal.prototype = __webpack_require__(24408)($Promise.prototype, {
  23511. // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
  23512. then: function then(onFulfilled, onRejected) {
  23513. var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
  23514. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  23515. reaction.fail = typeof onRejected == 'function' && onRejected;
  23516. reaction.domain = isNode ? process.domain : undefined;
  23517. this._c.push(reaction);
  23518. if (this._a) this._a.push(reaction);
  23519. if (this._s) notify(this, false);
  23520. return reaction.promise;
  23521. },
  23522. // 25.4.5.1 Promise.prototype.catch(onRejected)
  23523. 'catch': function (onRejected) {
  23524. return this.then(undefined, onRejected);
  23525. }
  23526. });
  23527. OwnPromiseCapability = function () {
  23528. var promise = new Internal();
  23529. this.promise = promise;
  23530. this.resolve = ctx($resolve, promise, 1);
  23531. this.reject = ctx($reject, promise, 1);
  23532. };
  23533. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  23534. return C === $Promise || C === Wrapper
  23535. ? new OwnPromiseCapability(C)
  23536. : newGenericPromiseCapability(C);
  23537. };
  23538. }
  23539. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
  23540. __webpack_require__(22943)($Promise, PROMISE);
  23541. __webpack_require__(2974)(PROMISE);
  23542. Wrapper = __webpack_require__(25645)[PROMISE];
  23543. // statics
  23544. $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  23545. // 25.4.4.5 Promise.reject(r)
  23546. reject: function reject(r) {
  23547. var capability = newPromiseCapability(this);
  23548. var $$reject = capability.reject;
  23549. $$reject(r);
  23550. return capability.promise;
  23551. }
  23552. });
  23553. $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  23554. // 25.4.4.6 Promise.resolve(x)
  23555. resolve: function resolve(x) {
  23556. return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  23557. }
  23558. });
  23559. $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(7462)(function (iter) {
  23560. $Promise.all(iter)['catch'](empty);
  23561. })), PROMISE, {
  23562. // 25.4.4.1 Promise.all(iterable)
  23563. all: function all(iterable) {
  23564. var C = this;
  23565. var capability = newPromiseCapability(C);
  23566. var resolve = capability.resolve;
  23567. var reject = capability.reject;
  23568. var result = perform(function () {
  23569. var values = [];
  23570. var index = 0;
  23571. var remaining = 1;
  23572. forOf(iterable, false, function (promise) {
  23573. var $index = index++;
  23574. var alreadyCalled = false;
  23575. values.push(undefined);
  23576. remaining++;
  23577. C.resolve(promise).then(function (value) {
  23578. if (alreadyCalled) return;
  23579. alreadyCalled = true;
  23580. values[$index] = value;
  23581. --remaining || resolve(values);
  23582. }, reject);
  23583. });
  23584. --remaining || resolve(values);
  23585. });
  23586. if (result.e) reject(result.v);
  23587. return capability.promise;
  23588. },
  23589. // 25.4.4.4 Promise.race(iterable)
  23590. race: function race(iterable) {
  23591. var C = this;
  23592. var capability = newPromiseCapability(C);
  23593. var reject = capability.reject;
  23594. var result = perform(function () {
  23595. forOf(iterable, false, function (promise) {
  23596. C.resolve(promise).then(capability.resolve, reject);
  23597. });
  23598. });
  23599. if (result.e) reject(result.v);
  23600. return capability.promise;
  23601. }
  23602. });
  23603. /***/ }),
  23604. /***/ 21572:
  23605. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23606. // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
  23607. var $export = __webpack_require__(42985);
  23608. var aFunction = __webpack_require__(24963);
  23609. var anObject = __webpack_require__(27007);
  23610. var rApply = (__webpack_require__(3816).Reflect || {}).apply;
  23611. var fApply = Function.apply;
  23612. // MS Edge argumentsList argument is optional
  23613. $export($export.S + $export.F * !__webpack_require__(74253)(function () {
  23614. rApply(function () { /* empty */ });
  23615. }), 'Reflect', {
  23616. apply: function apply(target, thisArgument, argumentsList) {
  23617. var T = aFunction(target);
  23618. var L = anObject(argumentsList);
  23619. return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  23620. }
  23621. });
  23622. /***/ }),
  23623. /***/ 82139:
  23624. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23625. // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
  23626. var $export = __webpack_require__(42985);
  23627. var create = __webpack_require__(42503);
  23628. var aFunction = __webpack_require__(24963);
  23629. var anObject = __webpack_require__(27007);
  23630. var isObject = __webpack_require__(55286);
  23631. var fails = __webpack_require__(74253);
  23632. var bind = __webpack_require__(34398);
  23633. var rConstruct = (__webpack_require__(3816).Reflect || {}).construct;
  23634. // MS Edge supports only 2 arguments and argumentsList argument is optional
  23635. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  23636. var NEW_TARGET_BUG = fails(function () {
  23637. function F() { /* empty */ }
  23638. return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
  23639. });
  23640. var ARGS_BUG = !fails(function () {
  23641. rConstruct(function () { /* empty */ });
  23642. });
  23643. $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
  23644. construct: function construct(Target, args /* , newTarget */) {
  23645. aFunction(Target);
  23646. anObject(args);
  23647. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  23648. if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
  23649. if (Target == newTarget) {
  23650. // w/o altered newTarget, optimization for 0-4 arguments
  23651. switch (args.length) {
  23652. case 0: return new Target();
  23653. case 1: return new Target(args[0]);
  23654. case 2: return new Target(args[0], args[1]);
  23655. case 3: return new Target(args[0], args[1], args[2]);
  23656. case 4: return new Target(args[0], args[1], args[2], args[3]);
  23657. }
  23658. // w/o altered newTarget, lot of arguments case
  23659. var $args = [null];
  23660. $args.push.apply($args, args);
  23661. return new (bind.apply(Target, $args))();
  23662. }
  23663. // with altered newTarget, not support built-in constructors
  23664. var proto = newTarget.prototype;
  23665. var instance = create(isObject(proto) ? proto : Object.prototype);
  23666. var result = Function.apply.call(Target, instance, args);
  23667. return isObject(result) ? result : instance;
  23668. }
  23669. });
  23670. /***/ }),
  23671. /***/ 10685:
  23672. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23673. // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
  23674. var dP = __webpack_require__(99275);
  23675. var $export = __webpack_require__(42985);
  23676. var anObject = __webpack_require__(27007);
  23677. var toPrimitive = __webpack_require__(21689);
  23678. // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
  23679. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  23680. // eslint-disable-next-line no-undef
  23681. Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
  23682. }), 'Reflect', {
  23683. defineProperty: function defineProperty(target, propertyKey, attributes) {
  23684. anObject(target);
  23685. propertyKey = toPrimitive(propertyKey, true);
  23686. anObject(attributes);
  23687. try {
  23688. dP.f(target, propertyKey, attributes);
  23689. return true;
  23690. } catch (e) {
  23691. return false;
  23692. }
  23693. }
  23694. });
  23695. /***/ }),
  23696. /***/ 85535:
  23697. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23698. // 26.1.4 Reflect.deleteProperty(target, propertyKey)
  23699. var $export = __webpack_require__(42985);
  23700. var gOPD = __webpack_require__(18693).f;
  23701. var anObject = __webpack_require__(27007);
  23702. $export($export.S, 'Reflect', {
  23703. deleteProperty: function deleteProperty(target, propertyKey) {
  23704. var desc = gOPD(anObject(target), propertyKey);
  23705. return desc && !desc.configurable ? false : delete target[propertyKey];
  23706. }
  23707. });
  23708. /***/ }),
  23709. /***/ 17347:
  23710. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23711. "use strict";
  23712. // 26.1.5 Reflect.enumerate(target)
  23713. var $export = __webpack_require__(42985);
  23714. var anObject = __webpack_require__(27007);
  23715. var Enumerate = function (iterated) {
  23716. this._t = anObject(iterated); // target
  23717. this._i = 0; // next index
  23718. var keys = this._k = []; // keys
  23719. var key;
  23720. for (key in iterated) keys.push(key);
  23721. };
  23722. __webpack_require__(49988)(Enumerate, 'Object', function () {
  23723. var that = this;
  23724. var keys = that._k;
  23725. var key;
  23726. do {
  23727. if (that._i >= keys.length) return { value: undefined, done: true };
  23728. } while (!((key = keys[that._i++]) in that._t));
  23729. return { value: key, done: false };
  23730. });
  23731. $export($export.S, 'Reflect', {
  23732. enumerate: function enumerate(target) {
  23733. return new Enumerate(target);
  23734. }
  23735. });
  23736. /***/ }),
  23737. /***/ 96633:
  23738. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23739. // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
  23740. var gOPD = __webpack_require__(18693);
  23741. var $export = __webpack_require__(42985);
  23742. var anObject = __webpack_require__(27007);
  23743. $export($export.S, 'Reflect', {
  23744. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
  23745. return gOPD.f(anObject(target), propertyKey);
  23746. }
  23747. });
  23748. /***/ }),
  23749. /***/ 68989:
  23750. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23751. // 26.1.8 Reflect.getPrototypeOf(target)
  23752. var $export = __webpack_require__(42985);
  23753. var getProto = __webpack_require__(468);
  23754. var anObject = __webpack_require__(27007);
  23755. $export($export.S, 'Reflect', {
  23756. getPrototypeOf: function getPrototypeOf(target) {
  23757. return getProto(anObject(target));
  23758. }
  23759. });
  23760. /***/ }),
  23761. /***/ 83049:
  23762. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23763. // 26.1.6 Reflect.get(target, propertyKey [, receiver])
  23764. var gOPD = __webpack_require__(18693);
  23765. var getPrototypeOf = __webpack_require__(468);
  23766. var has = __webpack_require__(79181);
  23767. var $export = __webpack_require__(42985);
  23768. var isObject = __webpack_require__(55286);
  23769. var anObject = __webpack_require__(27007);
  23770. function get(target, propertyKey /* , receiver */) {
  23771. var receiver = arguments.length < 3 ? target : arguments[2];
  23772. var desc, proto;
  23773. if (anObject(target) === receiver) return target[propertyKey];
  23774. if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
  23775. ? desc.value
  23776. : desc.get !== undefined
  23777. ? desc.get.call(receiver)
  23778. : undefined;
  23779. if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
  23780. }
  23781. $export($export.S, 'Reflect', { get: get });
  23782. /***/ }),
  23783. /***/ 78270:
  23784. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23785. // 26.1.9 Reflect.has(target, propertyKey)
  23786. var $export = __webpack_require__(42985);
  23787. $export($export.S, 'Reflect', {
  23788. has: function has(target, propertyKey) {
  23789. return propertyKey in target;
  23790. }
  23791. });
  23792. /***/ }),
  23793. /***/ 64510:
  23794. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23795. // 26.1.10 Reflect.isExtensible(target)
  23796. var $export = __webpack_require__(42985);
  23797. var anObject = __webpack_require__(27007);
  23798. var $isExtensible = Object.isExtensible;
  23799. $export($export.S, 'Reflect', {
  23800. isExtensible: function isExtensible(target) {
  23801. anObject(target);
  23802. return $isExtensible ? $isExtensible(target) : true;
  23803. }
  23804. });
  23805. /***/ }),
  23806. /***/ 73984:
  23807. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23808. // 26.1.11 Reflect.ownKeys(target)
  23809. var $export = __webpack_require__(42985);
  23810. $export($export.S, 'Reflect', { ownKeys: __webpack_require__(57643) });
  23811. /***/ }),
  23812. /***/ 75769:
  23813. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23814. // 26.1.12 Reflect.preventExtensions(target)
  23815. var $export = __webpack_require__(42985);
  23816. var anObject = __webpack_require__(27007);
  23817. var $preventExtensions = Object.preventExtensions;
  23818. $export($export.S, 'Reflect', {
  23819. preventExtensions: function preventExtensions(target) {
  23820. anObject(target);
  23821. try {
  23822. if ($preventExtensions) $preventExtensions(target);
  23823. return true;
  23824. } catch (e) {
  23825. return false;
  23826. }
  23827. }
  23828. });
  23829. /***/ }),
  23830. /***/ 96014:
  23831. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23832. // 26.1.14 Reflect.setPrototypeOf(target, proto)
  23833. var $export = __webpack_require__(42985);
  23834. var setProto = __webpack_require__(27375);
  23835. if (setProto) $export($export.S, 'Reflect', {
  23836. setPrototypeOf: function setPrototypeOf(target, proto) {
  23837. setProto.check(target, proto);
  23838. try {
  23839. setProto.set(target, proto);
  23840. return true;
  23841. } catch (e) {
  23842. return false;
  23843. }
  23844. }
  23845. });
  23846. /***/ }),
  23847. /***/ 50055:
  23848. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23849. // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
  23850. var dP = __webpack_require__(99275);
  23851. var gOPD = __webpack_require__(18693);
  23852. var getPrototypeOf = __webpack_require__(468);
  23853. var has = __webpack_require__(79181);
  23854. var $export = __webpack_require__(42985);
  23855. var createDesc = __webpack_require__(90681);
  23856. var anObject = __webpack_require__(27007);
  23857. var isObject = __webpack_require__(55286);
  23858. function set(target, propertyKey, V /* , receiver */) {
  23859. var receiver = arguments.length < 4 ? target : arguments[3];
  23860. var ownDesc = gOPD.f(anObject(target), propertyKey);
  23861. var existingDescriptor, proto;
  23862. if (!ownDesc) {
  23863. if (isObject(proto = getPrototypeOf(target))) {
  23864. return set(proto, propertyKey, V, receiver);
  23865. }
  23866. ownDesc = createDesc(0);
  23867. }
  23868. if (has(ownDesc, 'value')) {
  23869. if (ownDesc.writable === false || !isObject(receiver)) return false;
  23870. if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
  23871. if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
  23872. existingDescriptor.value = V;
  23873. dP.f(receiver, propertyKey, existingDescriptor);
  23874. } else dP.f(receiver, propertyKey, createDesc(0, V));
  23875. return true;
  23876. }
  23877. return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
  23878. }
  23879. $export($export.S, 'Reflect', { set: set });
  23880. /***/ }),
  23881. /***/ 83946:
  23882. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23883. var global = __webpack_require__(3816);
  23884. var inheritIfRequired = __webpack_require__(40266);
  23885. var dP = __webpack_require__(99275).f;
  23886. var gOPN = __webpack_require__(20616).f;
  23887. var isRegExp = __webpack_require__(55364);
  23888. var $flags = __webpack_require__(53218);
  23889. var $RegExp = global.RegExp;
  23890. var Base = $RegExp;
  23891. var proto = $RegExp.prototype;
  23892. var re1 = /a/g;
  23893. var re2 = /a/g;
  23894. // "new" creates a new object, old webkit buggy here
  23895. var CORRECT_NEW = new $RegExp(re1) !== re1;
  23896. if (__webpack_require__(67057) && (!CORRECT_NEW || __webpack_require__(74253)(function () {
  23897. re2[__webpack_require__(86314)('match')] = false;
  23898. // RegExp constructor can alter flags and IsRegExp works correct with @@match
  23899. return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
  23900. }))) {
  23901. $RegExp = function RegExp(p, f) {
  23902. var tiRE = this instanceof $RegExp;
  23903. var piRE = isRegExp(p);
  23904. var fiU = f === undefined;
  23905. return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
  23906. : inheritIfRequired(CORRECT_NEW
  23907. ? new Base(piRE && !fiU ? p.source : p, f)
  23908. : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
  23909. , tiRE ? this : proto, $RegExp);
  23910. };
  23911. var proxy = function (key) {
  23912. key in $RegExp || dP($RegExp, key, {
  23913. configurable: true,
  23914. get: function () { return Base[key]; },
  23915. set: function (it) { Base[key] = it; }
  23916. });
  23917. };
  23918. for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
  23919. proto.constructor = $RegExp;
  23920. $RegExp.prototype = proto;
  23921. __webpack_require__(77234)(global, 'RegExp', $RegExp);
  23922. }
  23923. __webpack_require__(2974)('RegExp');
  23924. /***/ }),
  23925. /***/ 18269:
  23926. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23927. "use strict";
  23928. var regexpExec = __webpack_require__(21165);
  23929. __webpack_require__(42985)({
  23930. target: 'RegExp',
  23931. proto: true,
  23932. forced: regexpExec !== /./.exec
  23933. }, {
  23934. exec: regexpExec
  23935. });
  23936. /***/ }),
  23937. /***/ 76774:
  23938. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23939. // 21.2.5.3 get RegExp.prototype.flags()
  23940. if (__webpack_require__(67057) && /./g.flags != 'g') __webpack_require__(99275).f(RegExp.prototype, 'flags', {
  23941. configurable: true,
  23942. get: __webpack_require__(53218)
  23943. });
  23944. /***/ }),
  23945. /***/ 21466:
  23946. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23947. "use strict";
  23948. var anObject = __webpack_require__(27007);
  23949. var toLength = __webpack_require__(10875);
  23950. var advanceStringIndex = __webpack_require__(76793);
  23951. var regExpExec = __webpack_require__(27787);
  23952. // @@match logic
  23953. __webpack_require__(28082)('match', 1, function (defined, MATCH, $match, maybeCallNative) {
  23954. return [
  23955. // `String.prototype.match` method
  23956. // https://tc39.github.io/ecma262/#sec-string.prototype.match
  23957. function match(regexp) {
  23958. var O = defined(this);
  23959. var fn = regexp == undefined ? undefined : regexp[MATCH];
  23960. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  23961. },
  23962. // `RegExp.prototype[@@match]` method
  23963. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
  23964. function (regexp) {
  23965. var res = maybeCallNative($match, regexp, this);
  23966. if (res.done) return res.value;
  23967. var rx = anObject(regexp);
  23968. var S = String(this);
  23969. if (!rx.global) return regExpExec(rx, S);
  23970. var fullUnicode = rx.unicode;
  23971. rx.lastIndex = 0;
  23972. var A = [];
  23973. var n = 0;
  23974. var result;
  23975. while ((result = regExpExec(rx, S)) !== null) {
  23976. var matchStr = String(result[0]);
  23977. A[n] = matchStr;
  23978. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  23979. n++;
  23980. }
  23981. return n === 0 ? null : A;
  23982. }
  23983. ];
  23984. });
  23985. /***/ }),
  23986. /***/ 59357:
  23987. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23988. "use strict";
  23989. var anObject = __webpack_require__(27007);
  23990. var toObject = __webpack_require__(20508);
  23991. var toLength = __webpack_require__(10875);
  23992. var toInteger = __webpack_require__(81467);
  23993. var advanceStringIndex = __webpack_require__(76793);
  23994. var regExpExec = __webpack_require__(27787);
  23995. var max = Math.max;
  23996. var min = Math.min;
  23997. var floor = Math.floor;
  23998. var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  23999. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  24000. var maybeToString = function (it) {
  24001. return it === undefined ? it : String(it);
  24002. };
  24003. // @@replace logic
  24004. __webpack_require__(28082)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
  24005. return [
  24006. // `String.prototype.replace` method
  24007. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  24008. function replace(searchValue, replaceValue) {
  24009. var O = defined(this);
  24010. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  24011. return fn !== undefined
  24012. ? fn.call(searchValue, O, replaceValue)
  24013. : $replace.call(String(O), searchValue, replaceValue);
  24014. },
  24015. // `RegExp.prototype[@@replace]` method
  24016. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  24017. function (regexp, replaceValue) {
  24018. var res = maybeCallNative($replace, regexp, this, replaceValue);
  24019. if (res.done) return res.value;
  24020. var rx = anObject(regexp);
  24021. var S = String(this);
  24022. var functionalReplace = typeof replaceValue === 'function';
  24023. if (!functionalReplace) replaceValue = String(replaceValue);
  24024. var global = rx.global;
  24025. if (global) {
  24026. var fullUnicode = rx.unicode;
  24027. rx.lastIndex = 0;
  24028. }
  24029. var results = [];
  24030. while (true) {
  24031. var result = regExpExec(rx, S);
  24032. if (result === null) break;
  24033. results.push(result);
  24034. if (!global) break;
  24035. var matchStr = String(result[0]);
  24036. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  24037. }
  24038. var accumulatedResult = '';
  24039. var nextSourcePosition = 0;
  24040. for (var i = 0; i < results.length; i++) {
  24041. result = results[i];
  24042. var matched = String(result[0]);
  24043. var position = max(min(toInteger(result.index), S.length), 0);
  24044. var captures = [];
  24045. // NOTE: This is equivalent to
  24046. // captures = result.slice(1).map(maybeToString)
  24047. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  24048. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  24049. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  24050. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  24051. var namedCaptures = result.groups;
  24052. if (functionalReplace) {
  24053. var replacerArgs = [matched].concat(captures, position, S);
  24054. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  24055. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  24056. } else {
  24057. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  24058. }
  24059. if (position >= nextSourcePosition) {
  24060. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  24061. nextSourcePosition = position + matched.length;
  24062. }
  24063. }
  24064. return accumulatedResult + S.slice(nextSourcePosition);
  24065. }
  24066. ];
  24067. // https://tc39.github.io/ecma262/#sec-getsubstitution
  24068. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  24069. var tailPos = position + matched.length;
  24070. var m = captures.length;
  24071. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  24072. if (namedCaptures !== undefined) {
  24073. namedCaptures = toObject(namedCaptures);
  24074. symbols = SUBSTITUTION_SYMBOLS;
  24075. }
  24076. return $replace.call(replacement, symbols, function (match, ch) {
  24077. var capture;
  24078. switch (ch.charAt(0)) {
  24079. case '$': return '$';
  24080. case '&': return matched;
  24081. case '`': return str.slice(0, position);
  24082. case "'": return str.slice(tailPos);
  24083. case '<':
  24084. capture = namedCaptures[ch.slice(1, -1)];
  24085. break;
  24086. default: // \d\d?
  24087. var n = +ch;
  24088. if (n === 0) return match;
  24089. if (n > m) {
  24090. var f = floor(n / 10);
  24091. if (f === 0) return match;
  24092. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  24093. return match;
  24094. }
  24095. capture = captures[n - 1];
  24096. }
  24097. return capture === undefined ? '' : capture;
  24098. });
  24099. }
  24100. });
  24101. /***/ }),
  24102. /***/ 76142:
  24103. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24104. "use strict";
  24105. var anObject = __webpack_require__(27007);
  24106. var sameValue = __webpack_require__(27195);
  24107. var regExpExec = __webpack_require__(27787);
  24108. // @@search logic
  24109. __webpack_require__(28082)('search', 1, function (defined, SEARCH, $search, maybeCallNative) {
  24110. return [
  24111. // `String.prototype.search` method
  24112. // https://tc39.github.io/ecma262/#sec-string.prototype.search
  24113. function search(regexp) {
  24114. var O = defined(this);
  24115. var fn = regexp == undefined ? undefined : regexp[SEARCH];
  24116. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
  24117. },
  24118. // `RegExp.prototype[@@search]` method
  24119. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
  24120. function (regexp) {
  24121. var res = maybeCallNative($search, regexp, this);
  24122. if (res.done) return res.value;
  24123. var rx = anObject(regexp);
  24124. var S = String(this);
  24125. var previousLastIndex = rx.lastIndex;
  24126. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  24127. var result = regExpExec(rx, S);
  24128. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  24129. return result === null ? -1 : result.index;
  24130. }
  24131. ];
  24132. });
  24133. /***/ }),
  24134. /***/ 51876:
  24135. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24136. "use strict";
  24137. var isRegExp = __webpack_require__(55364);
  24138. var anObject = __webpack_require__(27007);
  24139. var speciesConstructor = __webpack_require__(58364);
  24140. var advanceStringIndex = __webpack_require__(76793);
  24141. var toLength = __webpack_require__(10875);
  24142. var callRegExpExec = __webpack_require__(27787);
  24143. var regexpExec = __webpack_require__(21165);
  24144. var fails = __webpack_require__(74253);
  24145. var $min = Math.min;
  24146. var $push = [].push;
  24147. var $SPLIT = 'split';
  24148. var LENGTH = 'length';
  24149. var LAST_INDEX = 'lastIndex';
  24150. var MAX_UINT32 = 0xffffffff;
  24151. // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
  24152. var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
  24153. // @@split logic
  24154. __webpack_require__(28082)('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
  24155. var internalSplit;
  24156. if (
  24157. 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
  24158. 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
  24159. 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
  24160. '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
  24161. '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
  24162. ''[$SPLIT](/.?/)[LENGTH]
  24163. ) {
  24164. // based on es5-shim implementation, need to rework it
  24165. internalSplit = function (separator, limit) {
  24166. var string = String(this);
  24167. if (separator === undefined && limit === 0) return [];
  24168. // If `separator` is not a regex, use native split
  24169. if (!isRegExp(separator)) return $split.call(string, separator, limit);
  24170. var output = [];
  24171. var flags = (separator.ignoreCase ? 'i' : '') +
  24172. (separator.multiline ? 'm' : '') +
  24173. (separator.unicode ? 'u' : '') +
  24174. (separator.sticky ? 'y' : '');
  24175. var lastLastIndex = 0;
  24176. var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
  24177. // Make `global` and avoid `lastIndex` issues by working with a copy
  24178. var separatorCopy = new RegExp(separator.source, flags + 'g');
  24179. var match, lastIndex, lastLength;
  24180. while (match = regexpExec.call(separatorCopy, string)) {
  24181. lastIndex = separatorCopy[LAST_INDEX];
  24182. if (lastIndex > lastLastIndex) {
  24183. output.push(string.slice(lastLastIndex, match.index));
  24184. if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
  24185. lastLength = match[0][LENGTH];
  24186. lastLastIndex = lastIndex;
  24187. if (output[LENGTH] >= splitLimit) break;
  24188. }
  24189. if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
  24190. }
  24191. if (lastLastIndex === string[LENGTH]) {
  24192. if (lastLength || !separatorCopy.test('')) output.push('');
  24193. } else output.push(string.slice(lastLastIndex));
  24194. return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
  24195. };
  24196. // Chakra, V8
  24197. } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
  24198. internalSplit = function (separator, limit) {
  24199. return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
  24200. };
  24201. } else {
  24202. internalSplit = $split;
  24203. }
  24204. return [
  24205. // `String.prototype.split` method
  24206. // https://tc39.github.io/ecma262/#sec-string.prototype.split
  24207. function split(separator, limit) {
  24208. var O = defined(this);
  24209. var splitter = separator == undefined ? undefined : separator[SPLIT];
  24210. return splitter !== undefined
  24211. ? splitter.call(separator, O, limit)
  24212. : internalSplit.call(String(O), separator, limit);
  24213. },
  24214. // `RegExp.prototype[@@split]` method
  24215. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
  24216. //
  24217. // NOTE: This cannot be properly polyfilled in engines that don't support
  24218. // the 'y' flag.
  24219. function (regexp, limit) {
  24220. var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
  24221. if (res.done) return res.value;
  24222. var rx = anObject(regexp);
  24223. var S = String(this);
  24224. var C = speciesConstructor(rx, RegExp);
  24225. var unicodeMatching = rx.unicode;
  24226. var flags = (rx.ignoreCase ? 'i' : '') +
  24227. (rx.multiline ? 'm' : '') +
  24228. (rx.unicode ? 'u' : '') +
  24229. (SUPPORTS_Y ? 'y' : 'g');
  24230. // ^(? + rx + ) is needed, in combination with some S slicing, to
  24231. // simulate the 'y' flag.
  24232. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
  24233. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  24234. if (lim === 0) return [];
  24235. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  24236. var p = 0;
  24237. var q = 0;
  24238. var A = [];
  24239. while (q < S.length) {
  24240. splitter.lastIndex = SUPPORTS_Y ? q : 0;
  24241. var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
  24242. var e;
  24243. if (
  24244. z === null ||
  24245. (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
  24246. ) {
  24247. q = advanceStringIndex(S, q, unicodeMatching);
  24248. } else {
  24249. A.push(S.slice(p, q));
  24250. if (A.length === lim) return A;
  24251. for (var i = 1; i <= z.length - 1; i++) {
  24252. A.push(z[i]);
  24253. if (A.length === lim) return A;
  24254. }
  24255. q = p = e;
  24256. }
  24257. }
  24258. A.push(S.slice(p));
  24259. return A;
  24260. }
  24261. ];
  24262. });
  24263. /***/ }),
  24264. /***/ 66108:
  24265. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24266. "use strict";
  24267. __webpack_require__(76774);
  24268. var anObject = __webpack_require__(27007);
  24269. var $flags = __webpack_require__(53218);
  24270. var DESCRIPTORS = __webpack_require__(67057);
  24271. var TO_STRING = 'toString';
  24272. var $toString = /./[TO_STRING];
  24273. var define = function (fn) {
  24274. __webpack_require__(77234)(RegExp.prototype, TO_STRING, fn, true);
  24275. };
  24276. // 21.2.5.14 RegExp.prototype.toString()
  24277. if (__webpack_require__(74253)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
  24278. define(function toString() {
  24279. var R = anObject(this);
  24280. return '/'.concat(R.source, '/',
  24281. 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
  24282. });
  24283. // FF44- RegExp#toString has a wrong name
  24284. } else if ($toString.name != TO_STRING) {
  24285. define(function toString() {
  24286. return $toString.call(this);
  24287. });
  24288. }
  24289. /***/ }),
  24290. /***/ 98184:
  24291. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  24292. "use strict";
  24293. var strong = __webpack_require__(9824);
  24294. var validate = __webpack_require__(1616);
  24295. var SET = 'Set';
  24296. // 23.2 Set Objects
  24297. module.exports = __webpack_require__(45795)(SET, function (get) {
  24298. return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  24299. }, {
  24300. // 23.2.3.1 Set.prototype.add(value)
  24301. add: function add(value) {
  24302. return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  24303. }
  24304. }, strong);
  24305. /***/ }),
  24306. /***/ 40856:
  24307. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24308. "use strict";
  24309. // B.2.3.2 String.prototype.anchor(name)
  24310. __webpack_require__(29395)('anchor', function (createHTML) {
  24311. return function anchor(name) {
  24312. return createHTML(this, 'a', 'name', name);
  24313. };
  24314. });
  24315. /***/ }),
  24316. /***/ 80703:
  24317. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24318. "use strict";
  24319. // B.2.3.3 String.prototype.big()
  24320. __webpack_require__(29395)('big', function (createHTML) {
  24321. return function big() {
  24322. return createHTML(this, 'big', '', '');
  24323. };
  24324. });
  24325. /***/ }),
  24326. /***/ 91539:
  24327. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24328. "use strict";
  24329. // B.2.3.4 String.prototype.blink()
  24330. __webpack_require__(29395)('blink', function (createHTML) {
  24331. return function blink() {
  24332. return createHTML(this, 'blink', '', '');
  24333. };
  24334. });
  24335. /***/ }),
  24336. /***/ 5292:
  24337. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24338. "use strict";
  24339. // B.2.3.5 String.prototype.bold()
  24340. __webpack_require__(29395)('bold', function (createHTML) {
  24341. return function bold() {
  24342. return createHTML(this, 'b', '', '');
  24343. };
  24344. });
  24345. /***/ }),
  24346. /***/ 29539:
  24347. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24348. "use strict";
  24349. var $export = __webpack_require__(42985);
  24350. var $at = __webpack_require__(24496)(false);
  24351. $export($export.P, 'String', {
  24352. // 21.1.3.3 String.prototype.codePointAt(pos)
  24353. codePointAt: function codePointAt(pos) {
  24354. return $at(this, pos);
  24355. }
  24356. });
  24357. /***/ }),
  24358. /***/ 96620:
  24359. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24360. "use strict";
  24361. // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
  24362. var $export = __webpack_require__(42985);
  24363. var toLength = __webpack_require__(10875);
  24364. var context = __webpack_require__(42094);
  24365. var ENDS_WITH = 'endsWith';
  24366. var $endsWith = ''[ENDS_WITH];
  24367. $export($export.P + $export.F * __webpack_require__(8852)(ENDS_WITH), 'String', {
  24368. endsWith: function endsWith(searchString /* , endPosition = @length */) {
  24369. var that = context(this, searchString, ENDS_WITH);
  24370. var endPosition = arguments.length > 1 ? arguments[1] : undefined;
  24371. var len = toLength(that.length);
  24372. var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
  24373. var search = String(searchString);
  24374. return $endsWith
  24375. ? $endsWith.call(that, search, end)
  24376. : that.slice(end - search.length, end) === search;
  24377. }
  24378. });
  24379. /***/ }),
  24380. /***/ 45177:
  24381. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24382. "use strict";
  24383. // B.2.3.6 String.prototype.fixed()
  24384. __webpack_require__(29395)('fixed', function (createHTML) {
  24385. return function fixed() {
  24386. return createHTML(this, 'tt', '', '');
  24387. };
  24388. });
  24389. /***/ }),
  24390. /***/ 73694:
  24391. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24392. "use strict";
  24393. // B.2.3.7 String.prototype.fontcolor(color)
  24394. __webpack_require__(29395)('fontcolor', function (createHTML) {
  24395. return function fontcolor(color) {
  24396. return createHTML(this, 'font', 'color', color);
  24397. };
  24398. });
  24399. /***/ }),
  24400. /***/ 37648:
  24401. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24402. "use strict";
  24403. // B.2.3.8 String.prototype.fontsize(size)
  24404. __webpack_require__(29395)('fontsize', function (createHTML) {
  24405. return function fontsize(size) {
  24406. return createHTML(this, 'font', 'size', size);
  24407. };
  24408. });
  24409. /***/ }),
  24410. /***/ 50191:
  24411. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24412. var $export = __webpack_require__(42985);
  24413. var toAbsoluteIndex = __webpack_require__(92337);
  24414. var fromCharCode = String.fromCharCode;
  24415. var $fromCodePoint = String.fromCodePoint;
  24416. // length should be 1, old FF problem
  24417. $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
  24418. // 21.1.2.2 String.fromCodePoint(...codePoints)
  24419. fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
  24420. var res = [];
  24421. var aLen = arguments.length;
  24422. var i = 0;
  24423. var code;
  24424. while (aLen > i) {
  24425. code = +arguments[i++];
  24426. if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
  24427. res.push(code < 0x10000
  24428. ? fromCharCode(code)
  24429. : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
  24430. );
  24431. } return res.join('');
  24432. }
  24433. });
  24434. /***/ }),
  24435. /***/ 62850:
  24436. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24437. "use strict";
  24438. // 21.1.3.7 String.prototype.includes(searchString, position = 0)
  24439. var $export = __webpack_require__(42985);
  24440. var context = __webpack_require__(42094);
  24441. var INCLUDES = 'includes';
  24442. $export($export.P + $export.F * __webpack_require__(8852)(INCLUDES), 'String', {
  24443. includes: function includes(searchString /* , position = 0 */) {
  24444. return !!~context(this, searchString, INCLUDES)
  24445. .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  24446. }
  24447. });
  24448. /***/ }),
  24449. /***/ 27795:
  24450. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24451. "use strict";
  24452. // B.2.3.9 String.prototype.italics()
  24453. __webpack_require__(29395)('italics', function (createHTML) {
  24454. return function italics() {
  24455. return createHTML(this, 'i', '', '');
  24456. };
  24457. });
  24458. /***/ }),
  24459. /***/ 39115:
  24460. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24461. "use strict";
  24462. var $at = __webpack_require__(24496)(true);
  24463. // 21.1.3.27 String.prototype[@@iterator]()
  24464. __webpack_require__(42923)(String, 'String', function (iterated) {
  24465. this._t = String(iterated); // target
  24466. this._i = 0; // next index
  24467. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  24468. }, function () {
  24469. var O = this._t;
  24470. var index = this._i;
  24471. var point;
  24472. if (index >= O.length) return { value: undefined, done: true };
  24473. point = $at(O, index);
  24474. this._i += point.length;
  24475. return { value: point, done: false };
  24476. });
  24477. /***/ }),
  24478. /***/ 4531:
  24479. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24480. "use strict";
  24481. // B.2.3.10 String.prototype.link(url)
  24482. __webpack_require__(29395)('link', function (createHTML) {
  24483. return function link(url) {
  24484. return createHTML(this, 'a', 'href', url);
  24485. };
  24486. });
  24487. /***/ }),
  24488. /***/ 98306:
  24489. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24490. var $export = __webpack_require__(42985);
  24491. var toIObject = __webpack_require__(22110);
  24492. var toLength = __webpack_require__(10875);
  24493. $export($export.S, 'String', {
  24494. // 21.1.2.4 String.raw(callSite, ...substitutions)
  24495. raw: function raw(callSite) {
  24496. var tpl = toIObject(callSite.raw);
  24497. var len = toLength(tpl.length);
  24498. var aLen = arguments.length;
  24499. var res = [];
  24500. var i = 0;
  24501. while (len > i) {
  24502. res.push(String(tpl[i++]));
  24503. if (i < aLen) res.push(String(arguments[i]));
  24504. } return res.join('');
  24505. }
  24506. });
  24507. /***/ }),
  24508. /***/ 10823:
  24509. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24510. var $export = __webpack_require__(42985);
  24511. $export($export.P, 'String', {
  24512. // 21.1.3.13 String.prototype.repeat(count)
  24513. repeat: __webpack_require__(68595)
  24514. });
  24515. /***/ }),
  24516. /***/ 23605:
  24517. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24518. "use strict";
  24519. // B.2.3.11 String.prototype.small()
  24520. __webpack_require__(29395)('small', function (createHTML) {
  24521. return function small() {
  24522. return createHTML(this, 'small', '', '');
  24523. };
  24524. });
  24525. /***/ }),
  24526. /***/ 17732:
  24527. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24528. "use strict";
  24529. // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
  24530. var $export = __webpack_require__(42985);
  24531. var toLength = __webpack_require__(10875);
  24532. var context = __webpack_require__(42094);
  24533. var STARTS_WITH = 'startsWith';
  24534. var $startsWith = ''[STARTS_WITH];
  24535. $export($export.P + $export.F * __webpack_require__(8852)(STARTS_WITH), 'String', {
  24536. startsWith: function startsWith(searchString /* , position = 0 */) {
  24537. var that = context(this, searchString, STARTS_WITH);
  24538. var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  24539. var search = String(searchString);
  24540. return $startsWith
  24541. ? $startsWith.call(that, search, index)
  24542. : that.slice(index, index + search.length) === search;
  24543. }
  24544. });
  24545. /***/ }),
  24546. /***/ 6780:
  24547. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24548. "use strict";
  24549. // B.2.3.12 String.prototype.strike()
  24550. __webpack_require__(29395)('strike', function (createHTML) {
  24551. return function strike() {
  24552. return createHTML(this, 'strike', '', '');
  24553. };
  24554. });
  24555. /***/ }),
  24556. /***/ 69937:
  24557. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24558. "use strict";
  24559. // B.2.3.13 String.prototype.sub()
  24560. __webpack_require__(29395)('sub', function (createHTML) {
  24561. return function sub() {
  24562. return createHTML(this, 'sub', '', '');
  24563. };
  24564. });
  24565. /***/ }),
  24566. /***/ 10511:
  24567. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24568. "use strict";
  24569. // B.2.3.14 String.prototype.sup()
  24570. __webpack_require__(29395)('sup', function (createHTML) {
  24571. return function sup() {
  24572. return createHTML(this, 'sup', '', '');
  24573. };
  24574. });
  24575. /***/ }),
  24576. /***/ 64564:
  24577. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24578. "use strict";
  24579. // 21.1.3.25 String.prototype.trim()
  24580. __webpack_require__(29599)('trim', function ($trim) {
  24581. return function trim() {
  24582. return $trim(this, 3);
  24583. };
  24584. });
  24585. /***/ }),
  24586. /***/ 95767:
  24587. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24588. "use strict";
  24589. // ECMAScript 6 symbols shim
  24590. var global = __webpack_require__(3816);
  24591. var has = __webpack_require__(79181);
  24592. var DESCRIPTORS = __webpack_require__(67057);
  24593. var $export = __webpack_require__(42985);
  24594. var redefine = __webpack_require__(77234);
  24595. var META = __webpack_require__(84728).KEY;
  24596. var $fails = __webpack_require__(74253);
  24597. var shared = __webpack_require__(3825);
  24598. var setToStringTag = __webpack_require__(22943);
  24599. var uid = __webpack_require__(93953);
  24600. var wks = __webpack_require__(86314);
  24601. var wksExt = __webpack_require__(28787);
  24602. var wksDefine = __webpack_require__(36074);
  24603. var enumKeys = __webpack_require__(5541);
  24604. var isArray = __webpack_require__(4302);
  24605. var anObject = __webpack_require__(27007);
  24606. var isObject = __webpack_require__(55286);
  24607. var toObject = __webpack_require__(20508);
  24608. var toIObject = __webpack_require__(22110);
  24609. var toPrimitive = __webpack_require__(21689);
  24610. var createDesc = __webpack_require__(90681);
  24611. var _create = __webpack_require__(42503);
  24612. var gOPNExt = __webpack_require__(39327);
  24613. var $GOPD = __webpack_require__(18693);
  24614. var $GOPS = __webpack_require__(64548);
  24615. var $DP = __webpack_require__(99275);
  24616. var $keys = __webpack_require__(47184);
  24617. var gOPD = $GOPD.f;
  24618. var dP = $DP.f;
  24619. var gOPN = gOPNExt.f;
  24620. var $Symbol = global.Symbol;
  24621. var $JSON = global.JSON;
  24622. var _stringify = $JSON && $JSON.stringify;
  24623. var PROTOTYPE = 'prototype';
  24624. var HIDDEN = wks('_hidden');
  24625. var TO_PRIMITIVE = wks('toPrimitive');
  24626. var isEnum = {}.propertyIsEnumerable;
  24627. var SymbolRegistry = shared('symbol-registry');
  24628. var AllSymbols = shared('symbols');
  24629. var OPSymbols = shared('op-symbols');
  24630. var ObjectProto = Object[PROTOTYPE];
  24631. var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
  24632. var QObject = global.QObject;
  24633. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  24634. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  24635. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  24636. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  24637. return _create(dP({}, 'a', {
  24638. get: function () { return dP(this, 'a', { value: 7 }).a; }
  24639. })).a != 7;
  24640. }) ? function (it, key, D) {
  24641. var protoDesc = gOPD(ObjectProto, key);
  24642. if (protoDesc) delete ObjectProto[key];
  24643. dP(it, key, D);
  24644. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  24645. } : dP;
  24646. var wrap = function (tag) {
  24647. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  24648. sym._k = tag;
  24649. return sym;
  24650. };
  24651. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  24652. return typeof it == 'symbol';
  24653. } : function (it) {
  24654. return it instanceof $Symbol;
  24655. };
  24656. var $defineProperty = function defineProperty(it, key, D) {
  24657. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  24658. anObject(it);
  24659. key = toPrimitive(key, true);
  24660. anObject(D);
  24661. if (has(AllSymbols, key)) {
  24662. if (!D.enumerable) {
  24663. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  24664. it[HIDDEN][key] = true;
  24665. } else {
  24666. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  24667. D = _create(D, { enumerable: createDesc(0, false) });
  24668. } return setSymbolDesc(it, key, D);
  24669. } return dP(it, key, D);
  24670. };
  24671. var $defineProperties = function defineProperties(it, P) {
  24672. anObject(it);
  24673. var keys = enumKeys(P = toIObject(P));
  24674. var i = 0;
  24675. var l = keys.length;
  24676. var key;
  24677. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  24678. return it;
  24679. };
  24680. var $create = function create(it, P) {
  24681. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  24682. };
  24683. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  24684. var E = isEnum.call(this, key = toPrimitive(key, true));
  24685. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  24686. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  24687. };
  24688. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  24689. it = toIObject(it);
  24690. key = toPrimitive(key, true);
  24691. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  24692. var D = gOPD(it, key);
  24693. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  24694. return D;
  24695. };
  24696. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  24697. var names = gOPN(toIObject(it));
  24698. var result = [];
  24699. var i = 0;
  24700. var key;
  24701. while (names.length > i) {
  24702. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  24703. } return result;
  24704. };
  24705. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  24706. var IS_OP = it === ObjectProto;
  24707. var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  24708. var result = [];
  24709. var i = 0;
  24710. var key;
  24711. while (names.length > i) {
  24712. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  24713. } return result;
  24714. };
  24715. // 19.4.1.1 Symbol([description])
  24716. if (!USE_NATIVE) {
  24717. $Symbol = function Symbol() {
  24718. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  24719. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  24720. var $set = function (value) {
  24721. if (this === ObjectProto) $set.call(OPSymbols, value);
  24722. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  24723. setSymbolDesc(this, tag, createDesc(1, value));
  24724. };
  24725. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  24726. return wrap(tag);
  24727. };
  24728. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  24729. return this._k;
  24730. });
  24731. $GOPD.f = $getOwnPropertyDescriptor;
  24732. $DP.f = $defineProperty;
  24733. __webpack_require__(20616).f = gOPNExt.f = $getOwnPropertyNames;
  24734. __webpack_require__(14682).f = $propertyIsEnumerable;
  24735. $GOPS.f = $getOwnPropertySymbols;
  24736. if (DESCRIPTORS && !__webpack_require__(4461)) {
  24737. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  24738. }
  24739. wksExt.f = function (name) {
  24740. return wrap(wks(name));
  24741. };
  24742. }
  24743. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  24744. for (var es6Symbols = (
  24745. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  24746. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  24747. ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
  24748. for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
  24749. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  24750. // 19.4.2.1 Symbol.for(key)
  24751. 'for': function (key) {
  24752. return has(SymbolRegistry, key += '')
  24753. ? SymbolRegistry[key]
  24754. : SymbolRegistry[key] = $Symbol(key);
  24755. },
  24756. // 19.4.2.5 Symbol.keyFor(sym)
  24757. keyFor: function keyFor(sym) {
  24758. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
  24759. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  24760. },
  24761. useSetter: function () { setter = true; },
  24762. useSimple: function () { setter = false; }
  24763. });
  24764. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  24765. // 19.1.2.2 Object.create(O [, Properties])
  24766. create: $create,
  24767. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  24768. defineProperty: $defineProperty,
  24769. // 19.1.2.3 Object.defineProperties(O, Properties)
  24770. defineProperties: $defineProperties,
  24771. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  24772. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  24773. // 19.1.2.7 Object.getOwnPropertyNames(O)
  24774. getOwnPropertyNames: $getOwnPropertyNames,
  24775. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  24776. getOwnPropertySymbols: $getOwnPropertySymbols
  24777. });
  24778. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  24779. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  24780. var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
  24781. $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
  24782. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  24783. return $GOPS.f(toObject(it));
  24784. }
  24785. });
  24786. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  24787. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  24788. var S = $Symbol();
  24789. // MS Edge converts symbol values to JSON as {}
  24790. // WebKit converts symbol values to JSON as null
  24791. // V8 throws on boxed symbols
  24792. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  24793. })), 'JSON', {
  24794. stringify: function stringify(it) {
  24795. var args = [it];
  24796. var i = 1;
  24797. var replacer, $replacer;
  24798. while (arguments.length > i) args.push(arguments[i++]);
  24799. $replacer = replacer = args[1];
  24800. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  24801. if (!isArray(replacer)) replacer = function (key, value) {
  24802. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  24803. if (!isSymbol(value)) return value;
  24804. };
  24805. args[1] = replacer;
  24806. return _stringify.apply($JSON, args);
  24807. }
  24808. });
  24809. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  24810. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(87728)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  24811. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  24812. setToStringTag($Symbol, 'Symbol');
  24813. // 20.2.1.9 Math[@@toStringTag]
  24814. setToStringTag(Math, 'Math', true);
  24815. // 24.3.3 JSON[@@toStringTag]
  24816. setToStringTag(global.JSON, 'JSON', true);
  24817. /***/ }),
  24818. /***/ 30142:
  24819. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24820. "use strict";
  24821. var $export = __webpack_require__(42985);
  24822. var $typed = __webpack_require__(89383);
  24823. var buffer = __webpack_require__(91125);
  24824. var anObject = __webpack_require__(27007);
  24825. var toAbsoluteIndex = __webpack_require__(92337);
  24826. var toLength = __webpack_require__(10875);
  24827. var isObject = __webpack_require__(55286);
  24828. var ArrayBuffer = __webpack_require__(3816).ArrayBuffer;
  24829. var speciesConstructor = __webpack_require__(58364);
  24830. var $ArrayBuffer = buffer.ArrayBuffer;
  24831. var $DataView = buffer.DataView;
  24832. var $isView = $typed.ABV && ArrayBuffer.isView;
  24833. var $slice = $ArrayBuffer.prototype.slice;
  24834. var VIEW = $typed.VIEW;
  24835. var ARRAY_BUFFER = 'ArrayBuffer';
  24836. $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
  24837. $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
  24838. // 24.1.3.1 ArrayBuffer.isView(arg)
  24839. isView: function isView(it) {
  24840. return $isView && $isView(it) || isObject(it) && VIEW in it;
  24841. }
  24842. });
  24843. $export($export.P + $export.U + $export.F * __webpack_require__(74253)(function () {
  24844. return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
  24845. }), ARRAY_BUFFER, {
  24846. // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
  24847. slice: function slice(start, end) {
  24848. if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
  24849. var len = anObject(this).byteLength;
  24850. var first = toAbsoluteIndex(start, len);
  24851. var fin = toAbsoluteIndex(end === undefined ? len : end, len);
  24852. var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
  24853. var viewS = new $DataView(this);
  24854. var viewT = new $DataView(result);
  24855. var index = 0;
  24856. while (first < fin) {
  24857. viewT.setUint8(index++, viewS.getUint8(first++));
  24858. } return result;
  24859. }
  24860. });
  24861. __webpack_require__(2974)(ARRAY_BUFFER);
  24862. /***/ }),
  24863. /***/ 1786:
  24864. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24865. var $export = __webpack_require__(42985);
  24866. $export($export.G + $export.W + $export.F * !__webpack_require__(89383).ABV, {
  24867. DataView: __webpack_require__(91125).DataView
  24868. });
  24869. /***/ }),
  24870. /***/ 70162:
  24871. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24872. __webpack_require__(78440)('Float32', 4, function (init) {
  24873. return function Float32Array(data, byteOffset, length) {
  24874. return init(this, data, byteOffset, length);
  24875. };
  24876. });
  24877. /***/ }),
  24878. /***/ 33834:
  24879. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24880. __webpack_require__(78440)('Float64', 8, function (init) {
  24881. return function Float64Array(data, byteOffset, length) {
  24882. return init(this, data, byteOffset, length);
  24883. };
  24884. });
  24885. /***/ }),
  24886. /***/ 74821:
  24887. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24888. __webpack_require__(78440)('Int16', 2, function (init) {
  24889. return function Int16Array(data, byteOffset, length) {
  24890. return init(this, data, byteOffset, length);
  24891. };
  24892. });
  24893. /***/ }),
  24894. /***/ 81303:
  24895. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24896. __webpack_require__(78440)('Int32', 4, function (init) {
  24897. return function Int32Array(data, byteOffset, length) {
  24898. return init(this, data, byteOffset, length);
  24899. };
  24900. });
  24901. /***/ }),
  24902. /***/ 75368:
  24903. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24904. __webpack_require__(78440)('Int8', 1, function (init) {
  24905. return function Int8Array(data, byteOffset, length) {
  24906. return init(this, data, byteOffset, length);
  24907. };
  24908. });
  24909. /***/ }),
  24910. /***/ 79103:
  24911. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24912. __webpack_require__(78440)('Uint16', 2, function (init) {
  24913. return function Uint16Array(data, byteOffset, length) {
  24914. return init(this, data, byteOffset, length);
  24915. };
  24916. });
  24917. /***/ }),
  24918. /***/ 83318:
  24919. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24920. __webpack_require__(78440)('Uint32', 4, function (init) {
  24921. return function Uint32Array(data, byteOffset, length) {
  24922. return init(this, data, byteOffset, length);
  24923. };
  24924. });
  24925. /***/ }),
  24926. /***/ 46964:
  24927. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24928. __webpack_require__(78440)('Uint8', 1, function (init) {
  24929. return function Uint8Array(data, byteOffset, length) {
  24930. return init(this, data, byteOffset, length);
  24931. };
  24932. });
  24933. /***/ }),
  24934. /***/ 62152:
  24935. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24936. __webpack_require__(78440)('Uint8', 1, function (init) {
  24937. return function Uint8ClampedArray(data, byteOffset, length) {
  24938. return init(this, data, byteOffset, length);
  24939. };
  24940. }, true);
  24941. /***/ }),
  24942. /***/ 30147:
  24943. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  24944. "use strict";
  24945. var global = __webpack_require__(3816);
  24946. var each = __webpack_require__(10050)(0);
  24947. var redefine = __webpack_require__(77234);
  24948. var meta = __webpack_require__(84728);
  24949. var assign = __webpack_require__(35345);
  24950. var weak = __webpack_require__(23657);
  24951. var isObject = __webpack_require__(55286);
  24952. var validate = __webpack_require__(1616);
  24953. var NATIVE_WEAK_MAP = __webpack_require__(1616);
  24954. var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
  24955. var WEAK_MAP = 'WeakMap';
  24956. var getWeak = meta.getWeak;
  24957. var isExtensible = Object.isExtensible;
  24958. var uncaughtFrozenStore = weak.ufstore;
  24959. var InternalMap;
  24960. var wrapper = function (get) {
  24961. return function WeakMap() {
  24962. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  24963. };
  24964. };
  24965. var methods = {
  24966. // 23.3.3.3 WeakMap.prototype.get(key)
  24967. get: function get(key) {
  24968. if (isObject(key)) {
  24969. var data = getWeak(key);
  24970. if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
  24971. return data ? data[this._i] : undefined;
  24972. }
  24973. },
  24974. // 23.3.3.5 WeakMap.prototype.set(key, value)
  24975. set: function set(key, value) {
  24976. return weak.def(validate(this, WEAK_MAP), key, value);
  24977. }
  24978. };
  24979. // 23.3 WeakMap Objects
  24980. var $WeakMap = module.exports = __webpack_require__(45795)(WEAK_MAP, wrapper, methods, weak, true, true);
  24981. // IE11 WeakMap frozen keys fix
  24982. if (NATIVE_WEAK_MAP && IS_IE11) {
  24983. InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  24984. assign(InternalMap.prototype, methods);
  24985. meta.NEED = true;
  24986. each(['delete', 'has', 'get', 'set'], function (key) {
  24987. var proto = $WeakMap.prototype;
  24988. var method = proto[key];
  24989. redefine(proto, key, function (a, b) {
  24990. // store frozen objects on internal weakmap shim
  24991. if (isObject(a) && !isExtensible(a)) {
  24992. if (!this._f) this._f = new InternalMap();
  24993. var result = this._f[key](a, b);
  24994. return key == 'set' ? this : result;
  24995. // store all the rest on native weakmap
  24996. } return method.call(this, a, b);
  24997. });
  24998. });
  24999. }
  25000. /***/ }),
  25001. /***/ 59192:
  25002. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25003. "use strict";
  25004. var weak = __webpack_require__(23657);
  25005. var validate = __webpack_require__(1616);
  25006. var WEAK_SET = 'WeakSet';
  25007. // 23.4 WeakSet Objects
  25008. __webpack_require__(45795)(WEAK_SET, function (get) {
  25009. return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  25010. }, {
  25011. // 23.4.3.1 WeakSet.prototype.add(value)
  25012. add: function add(value) {
  25013. return weak.def(validate(this, WEAK_SET), value, true);
  25014. }
  25015. }, weak, false, true);
  25016. /***/ }),
  25017. /***/ 1268:
  25018. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25019. "use strict";
  25020. // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
  25021. var $export = __webpack_require__(42985);
  25022. var flattenIntoArray = __webpack_require__(13325);
  25023. var toObject = __webpack_require__(20508);
  25024. var toLength = __webpack_require__(10875);
  25025. var aFunction = __webpack_require__(24963);
  25026. var arraySpeciesCreate = __webpack_require__(16886);
  25027. $export($export.P, 'Array', {
  25028. flatMap: function flatMap(callbackfn /* , thisArg */) {
  25029. var O = toObject(this);
  25030. var sourceLen, A;
  25031. aFunction(callbackfn);
  25032. sourceLen = toLength(O.length);
  25033. A = arraySpeciesCreate(O, 0);
  25034. flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
  25035. return A;
  25036. }
  25037. });
  25038. __webpack_require__(17722)('flatMap');
  25039. /***/ }),
  25040. /***/ 62773:
  25041. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25042. "use strict";
  25043. // https://github.com/tc39/Array.prototype.includes
  25044. var $export = __webpack_require__(42985);
  25045. var $includes = __webpack_require__(79315)(true);
  25046. $export($export.P, 'Array', {
  25047. includes: function includes(el /* , fromIndex = 0 */) {
  25048. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  25049. }
  25050. });
  25051. __webpack_require__(17722)('includes');
  25052. /***/ }),
  25053. /***/ 83276:
  25054. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25055. // https://github.com/tc39/proposal-object-values-entries
  25056. var $export = __webpack_require__(42985);
  25057. var $entries = __webpack_require__(51131)(true);
  25058. $export($export.S, 'Object', {
  25059. entries: function entries(it) {
  25060. return $entries(it);
  25061. }
  25062. });
  25063. /***/ }),
  25064. /***/ 98351:
  25065. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25066. // https://github.com/tc39/proposal-object-getownpropertydescriptors
  25067. var $export = __webpack_require__(42985);
  25068. var ownKeys = __webpack_require__(57643);
  25069. var toIObject = __webpack_require__(22110);
  25070. var gOPD = __webpack_require__(18693);
  25071. var createProperty = __webpack_require__(92811);
  25072. $export($export.S, 'Object', {
  25073. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  25074. var O = toIObject(object);
  25075. var getDesc = gOPD.f;
  25076. var keys = ownKeys(O);
  25077. var result = {};
  25078. var i = 0;
  25079. var key, desc;
  25080. while (keys.length > i) {
  25081. desc = getDesc(O, key = keys[i++]);
  25082. if (desc !== undefined) createProperty(result, key, desc);
  25083. }
  25084. return result;
  25085. }
  25086. });
  25087. /***/ }),
  25088. /***/ 96409:
  25089. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25090. // https://github.com/tc39/proposal-object-values-entries
  25091. var $export = __webpack_require__(42985);
  25092. var $values = __webpack_require__(51131)(false);
  25093. $export($export.S, 'Object', {
  25094. values: function values(it) {
  25095. return $values(it);
  25096. }
  25097. });
  25098. /***/ }),
  25099. /***/ 9865:
  25100. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25101. "use strict";
  25102. // https://github.com/tc39/proposal-promise-finally
  25103. var $export = __webpack_require__(42985);
  25104. var core = __webpack_require__(25645);
  25105. var global = __webpack_require__(3816);
  25106. var speciesConstructor = __webpack_require__(58364);
  25107. var promiseResolve = __webpack_require__(50094);
  25108. $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
  25109. var C = speciesConstructor(this, core.Promise || global.Promise);
  25110. var isFunction = typeof onFinally == 'function';
  25111. return this.then(
  25112. isFunction ? function (x) {
  25113. return promiseResolve(C, onFinally()).then(function () { return x; });
  25114. } : onFinally,
  25115. isFunction ? function (e) {
  25116. return promiseResolve(C, onFinally()).then(function () { throw e; });
  25117. } : onFinally
  25118. );
  25119. } });
  25120. /***/ }),
  25121. /***/ 92770:
  25122. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25123. "use strict";
  25124. // https://github.com/tc39/proposal-string-pad-start-end
  25125. var $export = __webpack_require__(42985);
  25126. var $pad = __webpack_require__(75442);
  25127. var userAgent = __webpack_require__(30575);
  25128. // https://github.com/zloirock/core-js/issues/280
  25129. var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
  25130. $export($export.P + $export.F * WEBKIT_BUG, 'String', {
  25131. padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
  25132. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  25133. }
  25134. });
  25135. /***/ }),
  25136. /***/ 41784:
  25137. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25138. "use strict";
  25139. // https://github.com/tc39/proposal-string-pad-start-end
  25140. var $export = __webpack_require__(42985);
  25141. var $pad = __webpack_require__(75442);
  25142. var userAgent = __webpack_require__(30575);
  25143. // https://github.com/zloirock/core-js/issues/280
  25144. var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
  25145. $export($export.P + $export.F * WEBKIT_BUG, 'String', {
  25146. padStart: function padStart(maxLength /* , fillString = ' ' */) {
  25147. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
  25148. }
  25149. });
  25150. /***/ }),
  25151. /***/ 65869:
  25152. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25153. "use strict";
  25154. // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
  25155. __webpack_require__(29599)('trimLeft', function ($trim) {
  25156. return function trimLeft() {
  25157. return $trim(this, 1);
  25158. };
  25159. }, 'trimStart');
  25160. /***/ }),
  25161. /***/ 94325:
  25162. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25163. "use strict";
  25164. // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
  25165. __webpack_require__(29599)('trimRight', function ($trim) {
  25166. return function trimRight() {
  25167. return $trim(this, 2);
  25168. };
  25169. }, 'trimEnd');
  25170. /***/ }),
  25171. /***/ 79665:
  25172. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25173. __webpack_require__(36074)('asyncIterator');
  25174. /***/ }),
  25175. /***/ 91181:
  25176. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25177. var $iterators = __webpack_require__(56997);
  25178. var getKeys = __webpack_require__(47184);
  25179. var redefine = __webpack_require__(77234);
  25180. var global = __webpack_require__(3816);
  25181. var hide = __webpack_require__(87728);
  25182. var Iterators = __webpack_require__(87234);
  25183. var wks = __webpack_require__(86314);
  25184. var ITERATOR = wks('iterator');
  25185. var TO_STRING_TAG = wks('toStringTag');
  25186. var ArrayValues = Iterators.Array;
  25187. var DOMIterables = {
  25188. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  25189. CSSStyleDeclaration: false,
  25190. CSSValueList: false,
  25191. ClientRectList: false,
  25192. DOMRectList: false,
  25193. DOMStringList: false,
  25194. DOMTokenList: true,
  25195. DataTransferItemList: false,
  25196. FileList: false,
  25197. HTMLAllCollection: false,
  25198. HTMLCollection: false,
  25199. HTMLFormElement: false,
  25200. HTMLSelectElement: false,
  25201. MediaList: true, // TODO: Not spec compliant, should be false.
  25202. MimeTypeArray: false,
  25203. NamedNodeMap: false,
  25204. NodeList: true,
  25205. PaintRequestList: false,
  25206. Plugin: false,
  25207. PluginArray: false,
  25208. SVGLengthList: false,
  25209. SVGNumberList: false,
  25210. SVGPathSegList: false,
  25211. SVGPointList: false,
  25212. SVGStringList: false,
  25213. SVGTransformList: false,
  25214. SourceBufferList: false,
  25215. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  25216. TextTrackCueList: false,
  25217. TextTrackList: false,
  25218. TouchList: false
  25219. };
  25220. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  25221. var NAME = collections[i];
  25222. var explicit = DOMIterables[NAME];
  25223. var Collection = global[NAME];
  25224. var proto = Collection && Collection.prototype;
  25225. var key;
  25226. if (proto) {
  25227. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  25228. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  25229. Iterators[NAME] = ArrayValues;
  25230. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  25231. }
  25232. }
  25233. /***/ }),
  25234. /***/ 84633:
  25235. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25236. var $export = __webpack_require__(42985);
  25237. var $task = __webpack_require__(74193);
  25238. $export($export.G + $export.B, {
  25239. setImmediate: $task.set,
  25240. clearImmediate: $task.clear
  25241. });
  25242. /***/ }),
  25243. /***/ 32564:
  25244. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25245. // ie9- setTimeout & setInterval additional parameters fix
  25246. var global = __webpack_require__(3816);
  25247. var $export = __webpack_require__(42985);
  25248. var userAgent = __webpack_require__(30575);
  25249. var slice = [].slice;
  25250. var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
  25251. var wrap = function (set) {
  25252. return function (fn, time /* , ...args */) {
  25253. var boundArgs = arguments.length > 2;
  25254. var args = boundArgs ? slice.call(arguments, 2) : false;
  25255. return set(boundArgs ? function () {
  25256. // eslint-disable-next-line no-new-func
  25257. (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
  25258. } : fn, time);
  25259. };
  25260. };
  25261. $export($export.G + $export.B + $export.F * MSIE, {
  25262. setTimeout: wrap(global.setTimeout),
  25263. setInterval: wrap(global.setInterval)
  25264. });
  25265. /***/ }),
  25266. /***/ 96337:
  25267. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  25268. __webpack_require__(32564);
  25269. __webpack_require__(84633);
  25270. __webpack_require__(91181);
  25271. module.exports = __webpack_require__(25645);
  25272. /***/ }),
  25273. /***/ 39735:
  25274. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  25275. "use strict";
  25276. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  25277. /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
  25278. /* harmony export */ });
  25279. /* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23645);
  25280. /* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  25281. // Imports
  25282. var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  25283. // Module
  25284. ___CSS_LOADER_EXPORT___.push([module.id, "/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n background-color: #ffd;\n border: 1px solid black;\n border-radius: 4px 4px 4px 4px;\n color: black;\n font-family: monospace;\n font-size: 10pt;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n white-space: pre;\n white-space: pre-wrap;\n z-index: 100;\n max-width: 600px;\n opacity: 0;\n transition: opacity .4s;\n -moz-transition: opacity .4s;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n -ms-transition: opacity .4s;\n}\n\n.CodeMirror-lint-mark {\n background-position: left bottom;\n background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-warning {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-mark-error {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==\");\n}\n\n.CodeMirror-lint-marker {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n position: relative;\n}\n\n.CodeMirror-lint-message {\n padding-left: 18px;\n background-position: top left;\n background-repeat: no-repeat;\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC\");\n background-repeat: no-repeat;\n background-position: right bottom;\n width: 100%; height: 100%;\n}\n", ""]);
  25285. // Exports
  25286. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  25287. /***/ }),
  25288. /***/ 23645:
  25289. /***/ ((module) => {
  25290. "use strict";
  25291. /*
  25292. MIT License http://www.opensource.org/licenses/mit-license.php
  25293. Author Tobias Koppers @sokra
  25294. */
  25295. // css base code, injected by the css-loader
  25296. // eslint-disable-next-line func-names
  25297. module.exports = function (cssWithMappingToString) {
  25298. var list = []; // return the list of modules as css string
  25299. list.toString = function toString() {
  25300. return this.map(function (item) {
  25301. var content = cssWithMappingToString(item);
  25302. if (item[2]) {
  25303. return "@media ".concat(item[2], " {").concat(content, "}");
  25304. }
  25305. return content;
  25306. }).join("");
  25307. }; // import a list of modules into the list
  25308. // eslint-disable-next-line func-names
  25309. list.i = function (modules, mediaQuery, dedupe) {
  25310. if (typeof modules === "string") {
  25311. // eslint-disable-next-line no-param-reassign
  25312. modules = [[null, modules, ""]];
  25313. }
  25314. var alreadyImportedModules = {};
  25315. if (dedupe) {
  25316. for (var i = 0; i < this.length; i++) {
  25317. // eslint-disable-next-line prefer-destructuring
  25318. var id = this[i][0];
  25319. if (id != null) {
  25320. alreadyImportedModules[id] = true;
  25321. }
  25322. }
  25323. }
  25324. for (var _i = 0; _i < modules.length; _i++) {
  25325. var item = [].concat(modules[_i]);
  25326. if (dedupe && alreadyImportedModules[item[0]]) {
  25327. // eslint-disable-next-line no-continue
  25328. continue;
  25329. }
  25330. if (mediaQuery) {
  25331. if (!item[2]) {
  25332. item[2] = mediaQuery;
  25333. } else {
  25334. item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
  25335. }
  25336. }
  25337. list.push(item);
  25338. }
  25339. };
  25340. return list;
  25341. };
  25342. /***/ }),
  25343. /***/ 66577:
  25344. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  25345. "use strict";
  25346. var isValue = __webpack_require__(75618)
  25347. , ensureValue = __webpack_require__(55536)
  25348. , ensurePlainFunction = __webpack_require__(81516)
  25349. , copy = __webpack_require__(88005)
  25350. , normalizeOptions = __webpack_require__(5516)
  25351. , map = __webpack_require__(21465);
  25352. var bind = Function.prototype.bind
  25353. , defineProperty = Object.defineProperty
  25354. , hasOwnProperty = Object.prototype.hasOwnProperty
  25355. , define;
  25356. define = function (name, desc, options) {
  25357. var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
  25358. dgs = copy(desc);
  25359. delete dgs.writable;
  25360. delete dgs.value;
  25361. dgs.get = function () {
  25362. if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
  25363. desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
  25364. defineProperty(this, name, desc);
  25365. return this[name];
  25366. };
  25367. return dgs;
  25368. };
  25369. module.exports = function (props/*, options*/) {
  25370. var options = normalizeOptions(arguments[1]);
  25371. if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
  25372. return map(props, function (desc, name) { return define(name, desc, options); });
  25373. };
  25374. /***/ }),
  25375. /***/ 51804:
  25376. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  25377. "use strict";
  25378. var isValue = __webpack_require__(75618)
  25379. , isPlainFunction = __webpack_require__(17205)
  25380. , assign = __webpack_require__(67191)
  25381. , normalizeOpts = __webpack_require__(5516)
  25382. , contains = __webpack_require__(49981);
  25383. var d = (module.exports = function (dscr, value/*, options*/) {
  25384. var c, e, w, options, desc;
  25385. if (arguments.length < 2 || typeof dscr !== "string") {
  25386. options = value;
  25387. value = dscr;
  25388. dscr = null;
  25389. } else {
  25390. options = arguments[2];
  25391. }
  25392. if (isValue(dscr)) {
  25393. c = contains.call(dscr, "c");
  25394. e = contains.call(dscr, "e");
  25395. w = contains.call(dscr, "w");
  25396. } else {
  25397. c = w = true;
  25398. e = false;
  25399. }
  25400. desc = { value: value, configurable: c, enumerable: e, writable: w };
  25401. return !options ? desc : assign(normalizeOpts(options), desc);
  25402. });
  25403. d.gs = function (dscr, get, set/*, options*/) {
  25404. var c, e, options, desc;
  25405. if (typeof dscr !== "string") {
  25406. options = set;
  25407. set = get;
  25408. get = dscr;
  25409. dscr = null;
  25410. } else {
  25411. options = arguments[3];
  25412. }
  25413. if (!isValue(get)) {
  25414. get = undefined;
  25415. } else if (!isPlainFunction(get)) {
  25416. options = get;
  25417. get = set = undefined;
  25418. } else if (!isValue(set)) {
  25419. set = undefined;
  25420. } else if (!isPlainFunction(set)) {
  25421. options = set;
  25422. set = undefined;
  25423. }
  25424. if (isValue(dscr)) {
  25425. c = contains.call(dscr, "c");
  25426. e = contains.call(dscr, "e");
  25427. } else {
  25428. c = true;
  25429. e = false;
  25430. }
  25431. desc = { get: get, set: set, configurable: c, enumerable: e };
  25432. return !options ? desc : assign(normalizeOpts(options), desc);
  25433. };
  25434. /***/ }),
  25435. /***/ 20296:
  25436. /***/ ((module) => {
  25437. /**
  25438. * Returns a function, that, as long as it continues to be invoked, will not
  25439. * be triggered. The function will be called after it stops being called for
  25440. * N milliseconds. If `immediate` is passed, trigger the function on the
  25441. * leading edge, instead of the trailing. The function also has a property 'clear'
  25442. * that is a function which will clear the timer to prevent previously scheduled executions.
  25443. *
  25444. * @source underscore.js
  25445. * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
  25446. * @param {Function} function to wrap
  25447. * @param {Number} timeout in ms (`100`)
  25448. * @param {Boolean} whether to execute at the beginning (`false`)
  25449. * @api public
  25450. */
  25451. function debounce(func, wait, immediate){
  25452. var timeout, args, context, timestamp, result;
  25453. if (null == wait) wait = 100;
  25454. function later() {
  25455. var last = Date.now() - timestamp;
  25456. if (last < wait && last >= 0) {
  25457. timeout = setTimeout(later, wait - last);
  25458. } else {
  25459. timeout = null;
  25460. if (!immediate) {
  25461. result = func.apply(context, args);
  25462. context = args = null;
  25463. }
  25464. }
  25465. };
  25466. var debounced = function(){
  25467. context = this;
  25468. args = arguments;
  25469. timestamp = Date.now();
  25470. var callNow = immediate && !timeout;
  25471. if (!timeout) timeout = setTimeout(later, wait);
  25472. if (callNow) {
  25473. result = func.apply(context, args);
  25474. context = args = null;
  25475. }
  25476. return result;
  25477. };
  25478. debounced.clear = function() {
  25479. if (timeout) {
  25480. clearTimeout(timeout);
  25481. timeout = null;
  25482. }
  25483. };
  25484. debounced.flush = function() {
  25485. if (timeout) {
  25486. result = func.apply(context, args);
  25487. context = args = null;
  25488. clearTimeout(timeout);
  25489. timeout = null;
  25490. }
  25491. };
  25492. return debounced;
  25493. };
  25494. // Adds compatibility for ES modules
  25495. debounce.debounce = debounce;
  25496. module.exports = debounce;
  25497. /***/ }),
  25498. /***/ 32025:
  25499. /***/ ((module) => {
  25500. (function webpackUniversalModuleDefinition(root, factory) {
  25501. if(true)
  25502. module.exports = factory();
  25503. else { var i, a; }
  25504. })(self, function() {
  25505. return /******/ (function() { // webpackBootstrap
  25506. /******/ var __webpack_modules__ = ({
  25507. /***/ 3099:
  25508. /***/ (function(module) {
  25509. module.exports = function (it) {
  25510. if (typeof it != 'function') {
  25511. throw TypeError(String(it) + ' is not a function');
  25512. } return it;
  25513. };
  25514. /***/ }),
  25515. /***/ 6077:
  25516. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_703__) {
  25517. var isObject = __nested_webpack_require_703__(111);
  25518. module.exports = function (it) {
  25519. if (!isObject(it) && it !== null) {
  25520. throw TypeError("Can't set " + String(it) + ' as a prototype');
  25521. } return it;
  25522. };
  25523. /***/ }),
  25524. /***/ 1223:
  25525. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_1001__) {
  25526. var wellKnownSymbol = __nested_webpack_require_1001__(5112);
  25527. var create = __nested_webpack_require_1001__(30);
  25528. var definePropertyModule = __nested_webpack_require_1001__(3070);
  25529. var UNSCOPABLES = wellKnownSymbol('unscopables');
  25530. var ArrayPrototype = Array.prototype;
  25531. // Array.prototype[@@unscopables]
  25532. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  25533. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  25534. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  25535. configurable: true,
  25536. value: create(null)
  25537. });
  25538. }
  25539. // add a key to Array.prototype[@@unscopables]
  25540. module.exports = function (key) {
  25541. ArrayPrototype[UNSCOPABLES][key] = true;
  25542. };
  25543. /***/ }),
  25544. /***/ 1530:
  25545. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_1715__) {
  25546. "use strict";
  25547. var charAt = __nested_webpack_require_1715__(8710).charAt;
  25548. // `AdvanceStringIndex` abstract operation
  25549. // https://tc39.es/ecma262/#sec-advancestringindex
  25550. module.exports = function (S, index, unicode) {
  25551. return index + (unicode ? charAt(S, index).length : 1);
  25552. };
  25553. /***/ }),
  25554. /***/ 5787:
  25555. /***/ (function(module) {
  25556. module.exports = function (it, Constructor, name) {
  25557. if (!(it instanceof Constructor)) {
  25558. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  25559. } return it;
  25560. };
  25561. /***/ }),
  25562. /***/ 9670:
  25563. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_2317__) {
  25564. var isObject = __nested_webpack_require_2317__(111);
  25565. module.exports = function (it) {
  25566. if (!isObject(it)) {
  25567. throw TypeError(String(it) + ' is not an object');
  25568. } return it;
  25569. };
  25570. /***/ }),
  25571. /***/ 4019:
  25572. /***/ (function(module) {
  25573. module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
  25574. /***/ }),
  25575. /***/ 260:
  25576. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_2726__) {
  25577. "use strict";
  25578. var NATIVE_ARRAY_BUFFER = __nested_webpack_require_2726__(4019);
  25579. var DESCRIPTORS = __nested_webpack_require_2726__(9781);
  25580. var global = __nested_webpack_require_2726__(7854);
  25581. var isObject = __nested_webpack_require_2726__(111);
  25582. var has = __nested_webpack_require_2726__(6656);
  25583. var classof = __nested_webpack_require_2726__(648);
  25584. var createNonEnumerableProperty = __nested_webpack_require_2726__(8880);
  25585. var redefine = __nested_webpack_require_2726__(1320);
  25586. var defineProperty = __nested_webpack_require_2726__(3070).f;
  25587. var getPrototypeOf = __nested_webpack_require_2726__(9518);
  25588. var setPrototypeOf = __nested_webpack_require_2726__(7674);
  25589. var wellKnownSymbol = __nested_webpack_require_2726__(5112);
  25590. var uid = __nested_webpack_require_2726__(9711);
  25591. var Int8Array = global.Int8Array;
  25592. var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
  25593. var Uint8ClampedArray = global.Uint8ClampedArray;
  25594. var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
  25595. var TypedArray = Int8Array && getPrototypeOf(Int8Array);
  25596. var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
  25597. var ObjectPrototype = Object.prototype;
  25598. var isPrototypeOf = ObjectPrototype.isPrototypeOf;
  25599. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  25600. var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
  25601. // Fixing native typed arrays in Opera Presto crashes the browser, see #595
  25602. var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
  25603. var TYPED_ARRAY_TAG_REQIRED = false;
  25604. var NAME;
  25605. var TypedArrayConstructorsList = {
  25606. Int8Array: 1,
  25607. Uint8Array: 1,
  25608. Uint8ClampedArray: 1,
  25609. Int16Array: 2,
  25610. Uint16Array: 2,
  25611. Int32Array: 4,
  25612. Uint32Array: 4,
  25613. Float32Array: 4,
  25614. Float64Array: 8
  25615. };
  25616. var BigIntArrayConstructorsList = {
  25617. BigInt64Array: 8,
  25618. BigUint64Array: 8
  25619. };
  25620. var isView = function isView(it) {
  25621. if (!isObject(it)) return false;
  25622. var klass = classof(it);
  25623. return klass === 'DataView'
  25624. || has(TypedArrayConstructorsList, klass)
  25625. || has(BigIntArrayConstructorsList, klass);
  25626. };
  25627. var isTypedArray = function (it) {
  25628. if (!isObject(it)) return false;
  25629. var klass = classof(it);
  25630. return has(TypedArrayConstructorsList, klass)
  25631. || has(BigIntArrayConstructorsList, klass);
  25632. };
  25633. var aTypedArray = function (it) {
  25634. if (isTypedArray(it)) return it;
  25635. throw TypeError('Target is not a typed array');
  25636. };
  25637. var aTypedArrayConstructor = function (C) {
  25638. if (setPrototypeOf) {
  25639. if (isPrototypeOf.call(TypedArray, C)) return C;
  25640. } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
  25641. var TypedArrayConstructor = global[ARRAY];
  25642. if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
  25643. return C;
  25644. }
  25645. } throw TypeError('Target is not a typed array constructor');
  25646. };
  25647. var exportTypedArrayMethod = function (KEY, property, forced) {
  25648. if (!DESCRIPTORS) return;
  25649. if (forced) for (var ARRAY in TypedArrayConstructorsList) {
  25650. var TypedArrayConstructor = global[ARRAY];
  25651. if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
  25652. delete TypedArrayConstructor.prototype[KEY];
  25653. }
  25654. }
  25655. if (!TypedArrayPrototype[KEY] || forced) {
  25656. redefine(TypedArrayPrototype, KEY, forced ? property
  25657. : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
  25658. }
  25659. };
  25660. var exportTypedArrayStaticMethod = function (KEY, property, forced) {
  25661. var ARRAY, TypedArrayConstructor;
  25662. if (!DESCRIPTORS) return;
  25663. if (setPrototypeOf) {
  25664. if (forced) for (ARRAY in TypedArrayConstructorsList) {
  25665. TypedArrayConstructor = global[ARRAY];
  25666. if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
  25667. delete TypedArrayConstructor[KEY];
  25668. }
  25669. }
  25670. if (!TypedArray[KEY] || forced) {
  25671. // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
  25672. try {
  25673. return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
  25674. } catch (error) { /* empty */ }
  25675. } else return;
  25676. }
  25677. for (ARRAY in TypedArrayConstructorsList) {
  25678. TypedArrayConstructor = global[ARRAY];
  25679. if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
  25680. redefine(TypedArrayConstructor, KEY, property);
  25681. }
  25682. }
  25683. };
  25684. for (NAME in TypedArrayConstructorsList) {
  25685. if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
  25686. }
  25687. // WebKit bug - typed arrays constructors prototype is Object.prototype
  25688. if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
  25689. // eslint-disable-next-line no-shadow -- safe
  25690. TypedArray = function TypedArray() {
  25691. throw TypeError('Incorrect invocation');
  25692. };
  25693. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  25694. if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  25695. }
  25696. }
  25697. if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  25698. TypedArrayPrototype = TypedArray.prototype;
  25699. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  25700. if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  25701. }
  25702. }
  25703. // WebKit bug - one more object in Uint8ClampedArray prototype chain
  25704. if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  25705. setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
  25706. }
  25707. if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
  25708. TYPED_ARRAY_TAG_REQIRED = true;
  25709. defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
  25710. return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  25711. } });
  25712. for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
  25713. createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  25714. }
  25715. }
  25716. module.exports = {
  25717. NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  25718. TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
  25719. aTypedArray: aTypedArray,
  25720. aTypedArrayConstructor: aTypedArrayConstructor,
  25721. exportTypedArrayMethod: exportTypedArrayMethod,
  25722. exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  25723. isView: isView,
  25724. isTypedArray: isTypedArray,
  25725. TypedArray: TypedArray,
  25726. TypedArrayPrototype: TypedArrayPrototype
  25727. };
  25728. /***/ }),
  25729. /***/ 3331:
  25730. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_8934__) {
  25731. "use strict";
  25732. var global = __nested_webpack_require_8934__(7854);
  25733. var DESCRIPTORS = __nested_webpack_require_8934__(9781);
  25734. var NATIVE_ARRAY_BUFFER = __nested_webpack_require_8934__(4019);
  25735. var createNonEnumerableProperty = __nested_webpack_require_8934__(8880);
  25736. var redefineAll = __nested_webpack_require_8934__(2248);
  25737. var fails = __nested_webpack_require_8934__(7293);
  25738. var anInstance = __nested_webpack_require_8934__(5787);
  25739. var toInteger = __nested_webpack_require_8934__(9958);
  25740. var toLength = __nested_webpack_require_8934__(7466);
  25741. var toIndex = __nested_webpack_require_8934__(7067);
  25742. var IEEE754 = __nested_webpack_require_8934__(1179);
  25743. var getPrototypeOf = __nested_webpack_require_8934__(9518);
  25744. var setPrototypeOf = __nested_webpack_require_8934__(7674);
  25745. var getOwnPropertyNames = __nested_webpack_require_8934__(8006).f;
  25746. var defineProperty = __nested_webpack_require_8934__(3070).f;
  25747. var arrayFill = __nested_webpack_require_8934__(1285);
  25748. var setToStringTag = __nested_webpack_require_8934__(8003);
  25749. var InternalStateModule = __nested_webpack_require_8934__(9909);
  25750. var getInternalState = InternalStateModule.get;
  25751. var setInternalState = InternalStateModule.set;
  25752. var ARRAY_BUFFER = 'ArrayBuffer';
  25753. var DATA_VIEW = 'DataView';
  25754. var PROTOTYPE = 'prototype';
  25755. var WRONG_LENGTH = 'Wrong length';
  25756. var WRONG_INDEX = 'Wrong index';
  25757. var NativeArrayBuffer = global[ARRAY_BUFFER];
  25758. var $ArrayBuffer = NativeArrayBuffer;
  25759. var $DataView = global[DATA_VIEW];
  25760. var $DataViewPrototype = $DataView && $DataView[PROTOTYPE];
  25761. var ObjectPrototype = Object.prototype;
  25762. var RangeError = global.RangeError;
  25763. var packIEEE754 = IEEE754.pack;
  25764. var unpackIEEE754 = IEEE754.unpack;
  25765. var packInt8 = function (number) {
  25766. return [number & 0xFF];
  25767. };
  25768. var packInt16 = function (number) {
  25769. return [number & 0xFF, number >> 8 & 0xFF];
  25770. };
  25771. var packInt32 = function (number) {
  25772. return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
  25773. };
  25774. var unpackInt32 = function (buffer) {
  25775. return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
  25776. };
  25777. var packFloat32 = function (number) {
  25778. return packIEEE754(number, 23, 4);
  25779. };
  25780. var packFloat64 = function (number) {
  25781. return packIEEE754(number, 52, 8);
  25782. };
  25783. var addGetter = function (Constructor, key) {
  25784. defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
  25785. };
  25786. var get = function (view, count, index, isLittleEndian) {
  25787. var intIndex = toIndex(index);
  25788. var store = getInternalState(view);
  25789. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  25790. var bytes = getInternalState(store.buffer).bytes;
  25791. var start = intIndex + store.byteOffset;
  25792. var pack = bytes.slice(start, start + count);
  25793. return isLittleEndian ? pack : pack.reverse();
  25794. };
  25795. var set = function (view, count, index, conversion, value, isLittleEndian) {
  25796. var intIndex = toIndex(index);
  25797. var store = getInternalState(view);
  25798. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  25799. var bytes = getInternalState(store.buffer).bytes;
  25800. var start = intIndex + store.byteOffset;
  25801. var pack = conversion(+value);
  25802. for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
  25803. };
  25804. if (!NATIVE_ARRAY_BUFFER) {
  25805. $ArrayBuffer = function ArrayBuffer(length) {
  25806. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  25807. var byteLength = toIndex(length);
  25808. setInternalState(this, {
  25809. bytes: arrayFill.call(new Array(byteLength), 0),
  25810. byteLength: byteLength
  25811. });
  25812. if (!DESCRIPTORS) this.byteLength = byteLength;
  25813. };
  25814. $DataView = function DataView(buffer, byteOffset, byteLength) {
  25815. anInstance(this, $DataView, DATA_VIEW);
  25816. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  25817. var bufferLength = getInternalState(buffer).byteLength;
  25818. var offset = toInteger(byteOffset);
  25819. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
  25820. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  25821. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  25822. setInternalState(this, {
  25823. buffer: buffer,
  25824. byteLength: byteLength,
  25825. byteOffset: offset
  25826. });
  25827. if (!DESCRIPTORS) {
  25828. this.buffer = buffer;
  25829. this.byteLength = byteLength;
  25830. this.byteOffset = offset;
  25831. }
  25832. };
  25833. if (DESCRIPTORS) {
  25834. addGetter($ArrayBuffer, 'byteLength');
  25835. addGetter($DataView, 'buffer');
  25836. addGetter($DataView, 'byteLength');
  25837. addGetter($DataView, 'byteOffset');
  25838. }
  25839. redefineAll($DataView[PROTOTYPE], {
  25840. getInt8: function getInt8(byteOffset) {
  25841. return get(this, 1, byteOffset)[0] << 24 >> 24;
  25842. },
  25843. getUint8: function getUint8(byteOffset) {
  25844. return get(this, 1, byteOffset)[0];
  25845. },
  25846. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  25847. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  25848. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  25849. },
  25850. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  25851. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  25852. return bytes[1] << 8 | bytes[0];
  25853. },
  25854. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  25855. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
  25856. },
  25857. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  25858. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
  25859. },
  25860. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  25861. return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
  25862. },
  25863. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  25864. return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
  25865. },
  25866. setInt8: function setInt8(byteOffset, value) {
  25867. set(this, 1, byteOffset, packInt8, value);
  25868. },
  25869. setUint8: function setUint8(byteOffset, value) {
  25870. set(this, 1, byteOffset, packInt8, value);
  25871. },
  25872. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  25873. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  25874. },
  25875. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  25876. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  25877. },
  25878. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  25879. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  25880. },
  25881. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  25882. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  25883. },
  25884. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  25885. set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
  25886. },
  25887. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  25888. set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
  25889. }
  25890. });
  25891. } else {
  25892. /* eslint-disable no-new -- required for testing */
  25893. if (!fails(function () {
  25894. NativeArrayBuffer(1);
  25895. }) || !fails(function () {
  25896. new NativeArrayBuffer(-1);
  25897. }) || fails(function () {
  25898. new NativeArrayBuffer();
  25899. new NativeArrayBuffer(1.5);
  25900. new NativeArrayBuffer(NaN);
  25901. return NativeArrayBuffer.name != ARRAY_BUFFER;
  25902. })) {
  25903. /* eslint-enable no-new -- required for testing */
  25904. $ArrayBuffer = function ArrayBuffer(length) {
  25905. anInstance(this, $ArrayBuffer);
  25906. return new NativeArrayBuffer(toIndex(length));
  25907. };
  25908. var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
  25909. for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
  25910. if (!((key = keys[j++]) in $ArrayBuffer)) {
  25911. createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
  25912. }
  25913. }
  25914. ArrayBufferPrototype.constructor = $ArrayBuffer;
  25915. }
  25916. // WebKit bug - the same parent prototype for typed arrays and data view
  25917. if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {
  25918. setPrototypeOf($DataViewPrototype, ObjectPrototype);
  25919. }
  25920. // iOS Safari 7.x bug
  25921. var testView = new $DataView(new $ArrayBuffer(2));
  25922. var nativeSetInt8 = $DataViewPrototype.setInt8;
  25923. testView.setInt8(0, 2147483648);
  25924. testView.setInt8(1, 2147483649);
  25925. if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
  25926. setInt8: function setInt8(byteOffset, value) {
  25927. nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
  25928. },
  25929. setUint8: function setUint8(byteOffset, value) {
  25930. nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
  25931. }
  25932. }, { unsafe: true });
  25933. }
  25934. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  25935. setToStringTag($DataView, DATA_VIEW);
  25936. module.exports = {
  25937. ArrayBuffer: $ArrayBuffer,
  25938. DataView: $DataView
  25939. };
  25940. /***/ }),
  25941. /***/ 1048:
  25942. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_17881__) {
  25943. "use strict";
  25944. var toObject = __nested_webpack_require_17881__(7908);
  25945. var toAbsoluteIndex = __nested_webpack_require_17881__(1400);
  25946. var toLength = __nested_webpack_require_17881__(7466);
  25947. var min = Math.min;
  25948. // `Array.prototype.copyWithin` method implementation
  25949. // https://tc39.es/ecma262/#sec-array.prototype.copywithin
  25950. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  25951. var O = toObject(this);
  25952. var len = toLength(O.length);
  25953. var to = toAbsoluteIndex(target, len);
  25954. var from = toAbsoluteIndex(start, len);
  25955. var end = arguments.length > 2 ? arguments[2] : undefined;
  25956. var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  25957. var inc = 1;
  25958. if (from < to && to < from + count) {
  25959. inc = -1;
  25960. from += count - 1;
  25961. to += count - 1;
  25962. }
  25963. while (count-- > 0) {
  25964. if (from in O) O[to] = O[from];
  25965. else delete O[to];
  25966. to += inc;
  25967. from += inc;
  25968. } return O;
  25969. };
  25970. /***/ }),
  25971. /***/ 1285:
  25972. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_18911__) {
  25973. "use strict";
  25974. var toObject = __nested_webpack_require_18911__(7908);
  25975. var toAbsoluteIndex = __nested_webpack_require_18911__(1400);
  25976. var toLength = __nested_webpack_require_18911__(7466);
  25977. // `Array.prototype.fill` method implementation
  25978. // https://tc39.es/ecma262/#sec-array.prototype.fill
  25979. module.exports = function fill(value /* , start = 0, end = @length */) {
  25980. var O = toObject(this);
  25981. var length = toLength(O.length);
  25982. var argumentsLength = arguments.length;
  25983. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  25984. var end = argumentsLength > 2 ? arguments[2] : undefined;
  25985. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  25986. while (endPos > index) O[index++] = value;
  25987. return O;
  25988. };
  25989. /***/ }),
  25990. /***/ 8533:
  25991. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_19717__) {
  25992. "use strict";
  25993. var $forEach = __nested_webpack_require_19717__(2092).forEach;
  25994. var arrayMethodIsStrict = __nested_webpack_require_19717__(9341);
  25995. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  25996. // `Array.prototype.forEach` method implementation
  25997. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  25998. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  25999. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  26000. } : [].forEach;
  26001. /***/ }),
  26002. /***/ 8457:
  26003. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_20278__) {
  26004. "use strict";
  26005. var bind = __nested_webpack_require_20278__(9974);
  26006. var toObject = __nested_webpack_require_20278__(7908);
  26007. var callWithSafeIterationClosing = __nested_webpack_require_20278__(3411);
  26008. var isArrayIteratorMethod = __nested_webpack_require_20278__(7659);
  26009. var toLength = __nested_webpack_require_20278__(7466);
  26010. var createProperty = __nested_webpack_require_20278__(6135);
  26011. var getIteratorMethod = __nested_webpack_require_20278__(1246);
  26012. // `Array.from` method implementation
  26013. // https://tc39.es/ecma262/#sec-array.from
  26014. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  26015. var O = toObject(arrayLike);
  26016. var C = typeof this == 'function' ? this : Array;
  26017. var argumentsLength = arguments.length;
  26018. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  26019. var mapping = mapfn !== undefined;
  26020. var iteratorMethod = getIteratorMethod(O);
  26021. var index = 0;
  26022. var length, result, step, iterator, next, value;
  26023. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  26024. // if the target is not iterable or it's an array with the default iterator - use a simple case
  26025. if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
  26026. iterator = iteratorMethod.call(O);
  26027. next = iterator.next;
  26028. result = new C();
  26029. for (;!(step = next.call(iterator)).done; index++) {
  26030. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  26031. createProperty(result, index, value);
  26032. }
  26033. } else {
  26034. length = toLength(O.length);
  26035. result = new C(length);
  26036. for (;length > index; index++) {
  26037. value = mapping ? mapfn(O[index], index) : O[index];
  26038. createProperty(result, index, value);
  26039. }
  26040. }
  26041. result.length = index;
  26042. return result;
  26043. };
  26044. /***/ }),
  26045. /***/ 1318:
  26046. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_22092__) {
  26047. var toIndexedObject = __nested_webpack_require_22092__(5656);
  26048. var toLength = __nested_webpack_require_22092__(7466);
  26049. var toAbsoluteIndex = __nested_webpack_require_22092__(1400);
  26050. // `Array.prototype.{ indexOf, includes }` methods implementation
  26051. var createMethod = function (IS_INCLUDES) {
  26052. return function ($this, el, fromIndex) {
  26053. var O = toIndexedObject($this);
  26054. var length = toLength(O.length);
  26055. var index = toAbsoluteIndex(fromIndex, length);
  26056. var value;
  26057. // Array#includes uses SameValueZero equality algorithm
  26058. // eslint-disable-next-line no-self-compare -- NaN check
  26059. if (IS_INCLUDES && el != el) while (length > index) {
  26060. value = O[index++];
  26061. // eslint-disable-next-line no-self-compare -- NaN check
  26062. if (value != value) return true;
  26063. // Array#indexOf ignores holes, Array#includes - not
  26064. } else for (;length > index; index++) {
  26065. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  26066. } return !IS_INCLUDES && -1;
  26067. };
  26068. };
  26069. module.exports = {
  26070. // `Array.prototype.includes` method
  26071. // https://tc39.es/ecma262/#sec-array.prototype.includes
  26072. includes: createMethod(true),
  26073. // `Array.prototype.indexOf` method
  26074. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  26075. indexOf: createMethod(false)
  26076. };
  26077. /***/ }),
  26078. /***/ 2092:
  26079. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_23446__) {
  26080. var bind = __nested_webpack_require_23446__(9974);
  26081. var IndexedObject = __nested_webpack_require_23446__(8361);
  26082. var toObject = __nested_webpack_require_23446__(7908);
  26083. var toLength = __nested_webpack_require_23446__(7466);
  26084. var arraySpeciesCreate = __nested_webpack_require_23446__(5417);
  26085. var push = [].push;
  26086. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  26087. var createMethod = function (TYPE) {
  26088. var IS_MAP = TYPE == 1;
  26089. var IS_FILTER = TYPE == 2;
  26090. var IS_SOME = TYPE == 3;
  26091. var IS_EVERY = TYPE == 4;
  26092. var IS_FIND_INDEX = TYPE == 6;
  26093. var IS_FILTER_OUT = TYPE == 7;
  26094. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  26095. return function ($this, callbackfn, that, specificCreate) {
  26096. var O = toObject($this);
  26097. var self = IndexedObject(O);
  26098. var boundFunction = bind(callbackfn, that, 3);
  26099. var length = toLength(self.length);
  26100. var index = 0;
  26101. var create = specificCreate || arraySpeciesCreate;
  26102. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  26103. var value, result;
  26104. for (;length > index; index++) if (NO_HOLES || index in self) {
  26105. value = self[index];
  26106. result = boundFunction(value, index, O);
  26107. if (TYPE) {
  26108. if (IS_MAP) target[index] = result; // map
  26109. else if (result) switch (TYPE) {
  26110. case 3: return true; // some
  26111. case 5: return value; // find
  26112. case 6: return index; // findIndex
  26113. case 2: push.call(target, value); // filter
  26114. } else switch (TYPE) {
  26115. case 4: return false; // every
  26116. case 7: push.call(target, value); // filterOut
  26117. }
  26118. }
  26119. }
  26120. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  26121. };
  26122. };
  26123. module.exports = {
  26124. // `Array.prototype.forEach` method
  26125. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  26126. forEach: createMethod(0),
  26127. // `Array.prototype.map` method
  26128. // https://tc39.es/ecma262/#sec-array.prototype.map
  26129. map: createMethod(1),
  26130. // `Array.prototype.filter` method
  26131. // https://tc39.es/ecma262/#sec-array.prototype.filter
  26132. filter: createMethod(2),
  26133. // `Array.prototype.some` method
  26134. // https://tc39.es/ecma262/#sec-array.prototype.some
  26135. some: createMethod(3),
  26136. // `Array.prototype.every` method
  26137. // https://tc39.es/ecma262/#sec-array.prototype.every
  26138. every: createMethod(4),
  26139. // `Array.prototype.find` method
  26140. // https://tc39.es/ecma262/#sec-array.prototype.find
  26141. find: createMethod(5),
  26142. // `Array.prototype.findIndex` method
  26143. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  26144. findIndex: createMethod(6),
  26145. // `Array.prototype.filterOut` method
  26146. // https://github.com/tc39/proposal-array-filtering
  26147. filterOut: createMethod(7)
  26148. };
  26149. /***/ }),
  26150. /***/ 6583:
  26151. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_26271__) {
  26152. "use strict";
  26153. var toIndexedObject = __nested_webpack_require_26271__(5656);
  26154. var toInteger = __nested_webpack_require_26271__(9958);
  26155. var toLength = __nested_webpack_require_26271__(7466);
  26156. var arrayMethodIsStrict = __nested_webpack_require_26271__(9341);
  26157. var min = Math.min;
  26158. var nativeLastIndexOf = [].lastIndexOf;
  26159. var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
  26160. var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
  26161. var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
  26162. // `Array.prototype.lastIndexOf` method implementation
  26163. // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
  26164. module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  26165. // convert -0 to +0
  26166. if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
  26167. var O = toIndexedObject(this);
  26168. var length = toLength(O.length);
  26169. var index = length - 1;
  26170. if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
  26171. if (index < 0) index = length + index;
  26172. for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
  26173. return -1;
  26174. } : nativeLastIndexOf;
  26175. /***/ }),
  26176. /***/ 1194:
  26177. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_27452__) {
  26178. var fails = __nested_webpack_require_27452__(7293);
  26179. var wellKnownSymbol = __nested_webpack_require_27452__(5112);
  26180. var V8_VERSION = __nested_webpack_require_27452__(7392);
  26181. var SPECIES = wellKnownSymbol('species');
  26182. module.exports = function (METHOD_NAME) {
  26183. // We can't use this feature detection in V8 since it causes
  26184. // deoptimization and serious performance degradation
  26185. // https://github.com/zloirock/core-js/issues/677
  26186. return V8_VERSION >= 51 || !fails(function () {
  26187. var array = [];
  26188. var constructor = array.constructor = {};
  26189. constructor[SPECIES] = function () {
  26190. return { foo: 1 };
  26191. };
  26192. return array[METHOD_NAME](Boolean).foo !== 1;
  26193. });
  26194. };
  26195. /***/ }),
  26196. /***/ 9341:
  26197. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_28188__) {
  26198. "use strict";
  26199. var fails = __nested_webpack_require_28188__(7293);
  26200. module.exports = function (METHOD_NAME, argument) {
  26201. var method = [][METHOD_NAME];
  26202. return !!method && fails(function () {
  26203. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  26204. method.call(null, argument || function () { throw 1; }, 1);
  26205. });
  26206. };
  26207. /***/ }),
  26208. /***/ 3671:
  26209. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_28629__) {
  26210. var aFunction = __nested_webpack_require_28629__(3099);
  26211. var toObject = __nested_webpack_require_28629__(7908);
  26212. var IndexedObject = __nested_webpack_require_28629__(8361);
  26213. var toLength = __nested_webpack_require_28629__(7466);
  26214. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  26215. var createMethod = function (IS_RIGHT) {
  26216. return function (that, callbackfn, argumentsLength, memo) {
  26217. aFunction(callbackfn);
  26218. var O = toObject(that);
  26219. var self = IndexedObject(O);
  26220. var length = toLength(O.length);
  26221. var index = IS_RIGHT ? length - 1 : 0;
  26222. var i = IS_RIGHT ? -1 : 1;
  26223. if (argumentsLength < 2) while (true) {
  26224. if (index in self) {
  26225. memo = self[index];
  26226. index += i;
  26227. break;
  26228. }
  26229. index += i;
  26230. if (IS_RIGHT ? index < 0 : length <= index) {
  26231. throw TypeError('Reduce of empty array with no initial value');
  26232. }
  26233. }
  26234. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  26235. memo = callbackfn(memo, self[index], index, O);
  26236. }
  26237. return memo;
  26238. };
  26239. };
  26240. module.exports = {
  26241. // `Array.prototype.reduce` method
  26242. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  26243. left: createMethod(false),
  26244. // `Array.prototype.reduceRight` method
  26245. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  26246. right: createMethod(true)
  26247. };
  26248. /***/ }),
  26249. /***/ 5417:
  26250. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_30017__) {
  26251. var isObject = __nested_webpack_require_30017__(111);
  26252. var isArray = __nested_webpack_require_30017__(3157);
  26253. var wellKnownSymbol = __nested_webpack_require_30017__(5112);
  26254. var SPECIES = wellKnownSymbol('species');
  26255. // `ArraySpeciesCreate` abstract operation
  26256. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  26257. module.exports = function (originalArray, length) {
  26258. var C;
  26259. if (isArray(originalArray)) {
  26260. C = originalArray.constructor;
  26261. // cross-realm fallback
  26262. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  26263. else if (isObject(C)) {
  26264. C = C[SPECIES];
  26265. if (C === null) C = undefined;
  26266. }
  26267. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  26268. };
  26269. /***/ }),
  26270. /***/ 3411:
  26271. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_30798__) {
  26272. var anObject = __nested_webpack_require_30798__(9670);
  26273. var iteratorClose = __nested_webpack_require_30798__(9212);
  26274. // call something on iterator step with safe closing on error
  26275. module.exports = function (iterator, fn, value, ENTRIES) {
  26276. try {
  26277. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  26278. // 7.4.6 IteratorClose(iterator, completion)
  26279. } catch (error) {
  26280. iteratorClose(iterator);
  26281. throw error;
  26282. }
  26283. };
  26284. /***/ }),
  26285. /***/ 7072:
  26286. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_31303__) {
  26287. var wellKnownSymbol = __nested_webpack_require_31303__(5112);
  26288. var ITERATOR = wellKnownSymbol('iterator');
  26289. var SAFE_CLOSING = false;
  26290. try {
  26291. var called = 0;
  26292. var iteratorWithReturn = {
  26293. next: function () {
  26294. return { done: !!called++ };
  26295. },
  26296. 'return': function () {
  26297. SAFE_CLOSING = true;
  26298. }
  26299. };
  26300. iteratorWithReturn[ITERATOR] = function () {
  26301. return this;
  26302. };
  26303. // eslint-disable-next-line no-throw-literal -- required for testing
  26304. Array.from(iteratorWithReturn, function () { throw 2; });
  26305. } catch (error) { /* empty */ }
  26306. module.exports = function (exec, SKIP_CLOSING) {
  26307. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  26308. var ITERATION_SUPPORT = false;
  26309. try {
  26310. var object = {};
  26311. object[ITERATOR] = function () {
  26312. return {
  26313. next: function () {
  26314. return { done: ITERATION_SUPPORT = true };
  26315. }
  26316. };
  26317. };
  26318. exec(object);
  26319. } catch (error) { /* empty */ }
  26320. return ITERATION_SUPPORT;
  26321. };
  26322. /***/ }),
  26323. /***/ 4326:
  26324. /***/ (function(module) {
  26325. var toString = {}.toString;
  26326. module.exports = function (it) {
  26327. return toString.call(it).slice(8, -1);
  26328. };
  26329. /***/ }),
  26330. /***/ 648:
  26331. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_32503__) {
  26332. var TO_STRING_TAG_SUPPORT = __nested_webpack_require_32503__(1694);
  26333. var classofRaw = __nested_webpack_require_32503__(4326);
  26334. var wellKnownSymbol = __nested_webpack_require_32503__(5112);
  26335. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  26336. // ES3 wrong here
  26337. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  26338. // fallback for IE11 Script Access Denied error
  26339. var tryGet = function (it, key) {
  26340. try {
  26341. return it[key];
  26342. } catch (error) { /* empty */ }
  26343. };
  26344. // getting tag from ES6+ `Object.prototype.toString`
  26345. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  26346. var O, tag, result;
  26347. return it === undefined ? 'Undefined' : it === null ? 'Null'
  26348. // @@toStringTag case
  26349. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  26350. // builtinTag case
  26351. : CORRECT_ARGUMENTS ? classofRaw(O)
  26352. // ES3 arguments fallback
  26353. : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
  26354. };
  26355. /***/ }),
  26356. /***/ 9920:
  26357. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_33565__) {
  26358. var has = __nested_webpack_require_33565__(6656);
  26359. var ownKeys = __nested_webpack_require_33565__(3887);
  26360. var getOwnPropertyDescriptorModule = __nested_webpack_require_33565__(1236);
  26361. var definePropertyModule = __nested_webpack_require_33565__(3070);
  26362. module.exports = function (target, source) {
  26363. var keys = ownKeys(source);
  26364. var defineProperty = definePropertyModule.f;
  26365. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  26366. for (var i = 0; i < keys.length; i++) {
  26367. var key = keys[i];
  26368. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  26369. }
  26370. };
  26371. /***/ }),
  26372. /***/ 8544:
  26373. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_34217__) {
  26374. var fails = __nested_webpack_require_34217__(7293);
  26375. module.exports = !fails(function () {
  26376. function F() { /* empty */ }
  26377. F.prototype.constructor = null;
  26378. return Object.getPrototypeOf(new F()) !== F.prototype;
  26379. });
  26380. /***/ }),
  26381. /***/ 4994:
  26382. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_34520__) {
  26383. "use strict";
  26384. var IteratorPrototype = __nested_webpack_require_34520__(3383).IteratorPrototype;
  26385. var create = __nested_webpack_require_34520__(30);
  26386. var createPropertyDescriptor = __nested_webpack_require_34520__(9114);
  26387. var setToStringTag = __nested_webpack_require_34520__(8003);
  26388. var Iterators = __nested_webpack_require_34520__(7497);
  26389. var returnThis = function () { return this; };
  26390. module.exports = function (IteratorConstructor, NAME, next) {
  26391. var TO_STRING_TAG = NAME + ' Iterator';
  26392. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  26393. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  26394. Iterators[TO_STRING_TAG] = returnThis;
  26395. return IteratorConstructor;
  26396. };
  26397. /***/ }),
  26398. /***/ 8880:
  26399. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_35290__) {
  26400. var DESCRIPTORS = __nested_webpack_require_35290__(9781);
  26401. var definePropertyModule = __nested_webpack_require_35290__(3070);
  26402. var createPropertyDescriptor = __nested_webpack_require_35290__(9114);
  26403. module.exports = DESCRIPTORS ? function (object, key, value) {
  26404. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  26405. } : function (object, key, value) {
  26406. object[key] = value;
  26407. return object;
  26408. };
  26409. /***/ }),
  26410. /***/ 9114:
  26411. /***/ (function(module) {
  26412. module.exports = function (bitmap, value) {
  26413. return {
  26414. enumerable: !(bitmap & 1),
  26415. configurable: !(bitmap & 2),
  26416. writable: !(bitmap & 4),
  26417. value: value
  26418. };
  26419. };
  26420. /***/ }),
  26421. /***/ 6135:
  26422. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_35996__) {
  26423. "use strict";
  26424. var toPrimitive = __nested_webpack_require_35996__(7593);
  26425. var definePropertyModule = __nested_webpack_require_35996__(3070);
  26426. var createPropertyDescriptor = __nested_webpack_require_35996__(9114);
  26427. module.exports = function (object, key, value) {
  26428. var propertyKey = toPrimitive(key);
  26429. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  26430. else object[propertyKey] = value;
  26431. };
  26432. /***/ }),
  26433. /***/ 654:
  26434. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_36503__) {
  26435. "use strict";
  26436. var $ = __nested_webpack_require_36503__(2109);
  26437. var createIteratorConstructor = __nested_webpack_require_36503__(4994);
  26438. var getPrototypeOf = __nested_webpack_require_36503__(9518);
  26439. var setPrototypeOf = __nested_webpack_require_36503__(7674);
  26440. var setToStringTag = __nested_webpack_require_36503__(8003);
  26441. var createNonEnumerableProperty = __nested_webpack_require_36503__(8880);
  26442. var redefine = __nested_webpack_require_36503__(1320);
  26443. var wellKnownSymbol = __nested_webpack_require_36503__(5112);
  26444. var IS_PURE = __nested_webpack_require_36503__(1913);
  26445. var Iterators = __nested_webpack_require_36503__(7497);
  26446. var IteratorsCore = __nested_webpack_require_36503__(3383);
  26447. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  26448. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  26449. var ITERATOR = wellKnownSymbol('iterator');
  26450. var KEYS = 'keys';
  26451. var VALUES = 'values';
  26452. var ENTRIES = 'entries';
  26453. var returnThis = function () { return this; };
  26454. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  26455. createIteratorConstructor(IteratorConstructor, NAME, next);
  26456. var getIterationMethod = function (KIND) {
  26457. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  26458. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  26459. switch (KIND) {
  26460. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  26461. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  26462. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  26463. } return function () { return new IteratorConstructor(this); };
  26464. };
  26465. var TO_STRING_TAG = NAME + ' Iterator';
  26466. var INCORRECT_VALUES_NAME = false;
  26467. var IterablePrototype = Iterable.prototype;
  26468. var nativeIterator = IterablePrototype[ITERATOR]
  26469. || IterablePrototype['@@iterator']
  26470. || DEFAULT && IterablePrototype[DEFAULT];
  26471. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  26472. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  26473. var CurrentIteratorPrototype, methods, KEY;
  26474. // fix native
  26475. if (anyNativeIterator) {
  26476. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  26477. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  26478. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  26479. if (setPrototypeOf) {
  26480. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  26481. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  26482. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  26483. }
  26484. }
  26485. // Set @@toStringTag to native iterators
  26486. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  26487. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  26488. }
  26489. }
  26490. // fix Array#{values, @@iterator}.name in V8 / FF
  26491. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  26492. INCORRECT_VALUES_NAME = true;
  26493. defaultIterator = function values() { return nativeIterator.call(this); };
  26494. }
  26495. // define iterator
  26496. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  26497. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  26498. }
  26499. Iterators[NAME] = defaultIterator;
  26500. // export additional methods
  26501. if (DEFAULT) {
  26502. methods = {
  26503. values: getIterationMethod(VALUES),
  26504. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  26505. entries: getIterationMethod(ENTRIES)
  26506. };
  26507. if (FORCED) for (KEY in methods) {
  26508. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  26509. redefine(IterablePrototype, KEY, methods[KEY]);
  26510. }
  26511. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  26512. }
  26513. return methods;
  26514. };
  26515. /***/ }),
  26516. /***/ 9781:
  26517. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_40475__) {
  26518. var fails = __nested_webpack_require_40475__(7293);
  26519. // Detect IE8's incomplete defineProperty implementation
  26520. module.exports = !fails(function () {
  26521. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  26522. });
  26523. /***/ }),
  26524. /***/ 317:
  26525. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_40795__) {
  26526. var global = __nested_webpack_require_40795__(7854);
  26527. var isObject = __nested_webpack_require_40795__(111);
  26528. var document = global.document;
  26529. // typeof document.createElement is 'object' in old IE
  26530. var EXISTS = isObject(document) && isObject(document.createElement);
  26531. module.exports = function (it) {
  26532. return EXISTS ? document.createElement(it) : {};
  26533. };
  26534. /***/ }),
  26535. /***/ 8324:
  26536. /***/ (function(module) {
  26537. // iterable DOM collections
  26538. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  26539. module.exports = {
  26540. CSSRuleList: 0,
  26541. CSSStyleDeclaration: 0,
  26542. CSSValueList: 0,
  26543. ClientRectList: 0,
  26544. DOMRectList: 0,
  26545. DOMStringList: 0,
  26546. DOMTokenList: 1,
  26547. DataTransferItemList: 0,
  26548. FileList: 0,
  26549. HTMLAllCollection: 0,
  26550. HTMLCollection: 0,
  26551. HTMLFormElement: 0,
  26552. HTMLSelectElement: 0,
  26553. MediaList: 0,
  26554. MimeTypeArray: 0,
  26555. NamedNodeMap: 0,
  26556. NodeList: 1,
  26557. PaintRequestList: 0,
  26558. Plugin: 0,
  26559. PluginArray: 0,
  26560. SVGLengthList: 0,
  26561. SVGNumberList: 0,
  26562. SVGPathSegList: 0,
  26563. SVGPointList: 0,
  26564. SVGStringList: 0,
  26565. SVGTransformList: 0,
  26566. SourceBufferList: 0,
  26567. StyleSheetList: 0,
  26568. TextTrackCueList: 0,
  26569. TextTrackList: 0,
  26570. TouchList: 0
  26571. };
  26572. /***/ }),
  26573. /***/ 8113:
  26574. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_42025__) {
  26575. var getBuiltIn = __nested_webpack_require_42025__(5005);
  26576. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  26577. /***/ }),
  26578. /***/ 7392:
  26579. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_42230__) {
  26580. var global = __nested_webpack_require_42230__(7854);
  26581. var userAgent = __nested_webpack_require_42230__(8113);
  26582. var process = global.process;
  26583. var versions = process && process.versions;
  26584. var v8 = versions && versions.v8;
  26585. var match, version;
  26586. if (v8) {
  26587. match = v8.split('.');
  26588. version = match[0] + match[1];
  26589. } else if (userAgent) {
  26590. match = userAgent.match(/Edge\/(\d+)/);
  26591. if (!match || match[1] >= 74) {
  26592. match = userAgent.match(/Chrome\/(\d+)/);
  26593. if (match) version = match[1];
  26594. }
  26595. }
  26596. module.exports = version && +version;
  26597. /***/ }),
  26598. /***/ 748:
  26599. /***/ (function(module) {
  26600. // IE8- don't enum bug keys
  26601. module.exports = [
  26602. 'constructor',
  26603. 'hasOwnProperty',
  26604. 'isPrototypeOf',
  26605. 'propertyIsEnumerable',
  26606. 'toLocaleString',
  26607. 'toString',
  26608. 'valueOf'
  26609. ];
  26610. /***/ }),
  26611. /***/ 2109:
  26612. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_43065__) {
  26613. var global = __nested_webpack_require_43065__(7854);
  26614. var getOwnPropertyDescriptor = __nested_webpack_require_43065__(1236).f;
  26615. var createNonEnumerableProperty = __nested_webpack_require_43065__(8880);
  26616. var redefine = __nested_webpack_require_43065__(1320);
  26617. var setGlobal = __nested_webpack_require_43065__(3505);
  26618. var copyConstructorProperties = __nested_webpack_require_43065__(9920);
  26619. var isForced = __nested_webpack_require_43065__(4705);
  26620. /*
  26621. options.target - name of the target object
  26622. options.global - target is the global object
  26623. options.stat - export as static methods of target
  26624. options.proto - export as prototype methods of target
  26625. options.real - real prototype method for the `pure` version
  26626. options.forced - export even if the native feature is available
  26627. options.bind - bind methods to the target, required for the `pure` version
  26628. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  26629. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  26630. options.sham - add a flag to not completely full polyfills
  26631. options.enumerable - export as enumerable property
  26632. options.noTargetGet - prevent calling a getter on target
  26633. */
  26634. module.exports = function (options, source) {
  26635. var TARGET = options.target;
  26636. var GLOBAL = options.global;
  26637. var STATIC = options.stat;
  26638. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  26639. if (GLOBAL) {
  26640. target = global;
  26641. } else if (STATIC) {
  26642. target = global[TARGET] || setGlobal(TARGET, {});
  26643. } else {
  26644. target = (global[TARGET] || {}).prototype;
  26645. }
  26646. if (target) for (key in source) {
  26647. sourceProperty = source[key];
  26648. if (options.noTargetGet) {
  26649. descriptor = getOwnPropertyDescriptor(target, key);
  26650. targetProperty = descriptor && descriptor.value;
  26651. } else targetProperty = target[key];
  26652. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  26653. // contained in target
  26654. if (!FORCED && targetProperty !== undefined) {
  26655. if (typeof sourceProperty === typeof targetProperty) continue;
  26656. copyConstructorProperties(sourceProperty, targetProperty);
  26657. }
  26658. // add a flag to not completely full polyfills
  26659. if (options.sham || (targetProperty && targetProperty.sham)) {
  26660. createNonEnumerableProperty(sourceProperty, 'sham', true);
  26661. }
  26662. // extend global
  26663. redefine(target, key, sourceProperty, options);
  26664. }
  26665. };
  26666. /***/ }),
  26667. /***/ 7293:
  26668. /***/ (function(module) {
  26669. module.exports = function (exec) {
  26670. try {
  26671. return !!exec();
  26672. } catch (error) {
  26673. return true;
  26674. }
  26675. };
  26676. /***/ }),
  26677. /***/ 7007:
  26678. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_45726__) {
  26679. "use strict";
  26680. // TODO: Remove from `core-js@4` since it's moved to entry points
  26681. __nested_webpack_require_45726__(4916);
  26682. var redefine = __nested_webpack_require_45726__(1320);
  26683. var fails = __nested_webpack_require_45726__(7293);
  26684. var wellKnownSymbol = __nested_webpack_require_45726__(5112);
  26685. var regexpExec = __nested_webpack_require_45726__(2261);
  26686. var createNonEnumerableProperty = __nested_webpack_require_45726__(8880);
  26687. var SPECIES = wellKnownSymbol('species');
  26688. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  26689. // #replace needs built-in support for named groups.
  26690. // #match works fine because it just return the exec results, even if it has
  26691. // a "grops" property.
  26692. var re = /./;
  26693. re.exec = function () {
  26694. var result = [];
  26695. result.groups = { a: '7' };
  26696. return result;
  26697. };
  26698. return ''.replace(re, '$<a>') !== '7';
  26699. });
  26700. // IE <= 11 replaces $0 with the whole match, as if it was $&
  26701. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  26702. var REPLACE_KEEPS_$0 = (function () {
  26703. return 'a'.replace(/./, '$0') === '$0';
  26704. })();
  26705. var REPLACE = wellKnownSymbol('replace');
  26706. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  26707. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  26708. if (/./[REPLACE]) {
  26709. return /./[REPLACE]('a', '$0') === '';
  26710. }
  26711. return false;
  26712. })();
  26713. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  26714. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  26715. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  26716. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  26717. var re = /(?:)/;
  26718. var originalExec = re.exec;
  26719. re.exec = function () { return originalExec.apply(this, arguments); };
  26720. var result = 'ab'.split(re);
  26721. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  26722. });
  26723. module.exports = function (KEY, length, exec, sham) {
  26724. var SYMBOL = wellKnownSymbol(KEY);
  26725. var DELEGATES_TO_SYMBOL = !fails(function () {
  26726. // String methods call symbol-named RegEp methods
  26727. var O = {};
  26728. O[SYMBOL] = function () { return 7; };
  26729. return ''[KEY](O) != 7;
  26730. });
  26731. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  26732. // Symbol-named RegExp methods call .exec
  26733. var execCalled = false;
  26734. var re = /a/;
  26735. if (KEY === 'split') {
  26736. // We can't use real regex here since it causes deoptimization
  26737. // and serious performance degradation in V8
  26738. // https://github.com/zloirock/core-js/issues/306
  26739. re = {};
  26740. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  26741. // a new one. We need to return the patched regex when creating the new one.
  26742. re.constructor = {};
  26743. re.constructor[SPECIES] = function () { return re; };
  26744. re.flags = '';
  26745. re[SYMBOL] = /./[SYMBOL];
  26746. }
  26747. re.exec = function () { execCalled = true; return null; };
  26748. re[SYMBOL]('');
  26749. return !execCalled;
  26750. });
  26751. if (
  26752. !DELEGATES_TO_SYMBOL ||
  26753. !DELEGATES_TO_EXEC ||
  26754. (KEY === 'replace' && !(
  26755. REPLACE_SUPPORTS_NAMED_GROUPS &&
  26756. REPLACE_KEEPS_$0 &&
  26757. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  26758. )) ||
  26759. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  26760. ) {
  26761. var nativeRegExpMethod = /./[SYMBOL];
  26762. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  26763. if (regexp.exec === regexpExec) {
  26764. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  26765. // The native String method already delegates to @@method (this
  26766. // polyfilled function), leasing to infinite recursion.
  26767. // We avoid it by directly calling the native @@method method.
  26768. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  26769. }
  26770. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  26771. }
  26772. return { done: false };
  26773. }, {
  26774. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  26775. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  26776. });
  26777. var stringMethod = methods[0];
  26778. var regexMethod = methods[1];
  26779. redefine(String.prototype, KEY, stringMethod);
  26780. redefine(RegExp.prototype, SYMBOL, length == 2
  26781. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  26782. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  26783. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  26784. // 21.2.5.6 RegExp.prototype[@@match](string)
  26785. // 21.2.5.9 RegExp.prototype[@@search](string)
  26786. : function (string) { return regexMethod.call(string, this); }
  26787. );
  26788. }
  26789. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  26790. };
  26791. /***/ }),
  26792. /***/ 9974:
  26793. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_50488__) {
  26794. var aFunction = __nested_webpack_require_50488__(3099);
  26795. // optional / simple context binding
  26796. module.exports = function (fn, that, length) {
  26797. aFunction(fn);
  26798. if (that === undefined) return fn;
  26799. switch (length) {
  26800. case 0: return function () {
  26801. return fn.call(that);
  26802. };
  26803. case 1: return function (a) {
  26804. return fn.call(that, a);
  26805. };
  26806. case 2: return function (a, b) {
  26807. return fn.call(that, a, b);
  26808. };
  26809. case 3: return function (a, b, c) {
  26810. return fn.call(that, a, b, c);
  26811. };
  26812. }
  26813. return function (/* ...args */) {
  26814. return fn.apply(that, arguments);
  26815. };
  26816. };
  26817. /***/ }),
  26818. /***/ 5005:
  26819. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_51177__) {
  26820. var path = __nested_webpack_require_51177__(857);
  26821. var global = __nested_webpack_require_51177__(7854);
  26822. var aFunction = function (variable) {
  26823. return typeof variable == 'function' ? variable : undefined;
  26824. };
  26825. module.exports = function (namespace, method) {
  26826. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
  26827. : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
  26828. };
  26829. /***/ }),
  26830. /***/ 1246:
  26831. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_51701__) {
  26832. var classof = __nested_webpack_require_51701__(648);
  26833. var Iterators = __nested_webpack_require_51701__(7497);
  26834. var wellKnownSymbol = __nested_webpack_require_51701__(5112);
  26835. var ITERATOR = wellKnownSymbol('iterator');
  26836. module.exports = function (it) {
  26837. if (it != undefined) return it[ITERATOR]
  26838. || it['@@iterator']
  26839. || Iterators[classof(it)];
  26840. };
  26841. /***/ }),
  26842. /***/ 8554:
  26843. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_52112__) {
  26844. var anObject = __nested_webpack_require_52112__(9670);
  26845. var getIteratorMethod = __nested_webpack_require_52112__(1246);
  26846. module.exports = function (it) {
  26847. var iteratorMethod = getIteratorMethod(it);
  26848. if (typeof iteratorMethod != 'function') {
  26849. throw TypeError(String(it) + ' is not iterable');
  26850. } return anObject(iteratorMethod.call(it));
  26851. };
  26852. /***/ }),
  26853. /***/ 647:
  26854. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_52531__) {
  26855. var toObject = __nested_webpack_require_52531__(7908);
  26856. var floor = Math.floor;
  26857. var replace = ''.replace;
  26858. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
  26859. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
  26860. // https://tc39.es/ecma262/#sec-getsubstitution
  26861. module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  26862. var tailPos = position + matched.length;
  26863. var m = captures.length;
  26864. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  26865. if (namedCaptures !== undefined) {
  26866. namedCaptures = toObject(namedCaptures);
  26867. symbols = SUBSTITUTION_SYMBOLS;
  26868. }
  26869. return replace.call(replacement, symbols, function (match, ch) {
  26870. var capture;
  26871. switch (ch.charAt(0)) {
  26872. case '$': return '$';
  26873. case '&': return matched;
  26874. case '`': return str.slice(0, position);
  26875. case "'": return str.slice(tailPos);
  26876. case '<':
  26877. capture = namedCaptures[ch.slice(1, -1)];
  26878. break;
  26879. default: // \d\d?
  26880. var n = +ch;
  26881. if (n === 0) return match;
  26882. if (n > m) {
  26883. var f = floor(n / 10);
  26884. if (f === 0) return match;
  26885. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  26886. return match;
  26887. }
  26888. capture = captures[n - 1];
  26889. }
  26890. return capture === undefined ? '' : capture;
  26891. });
  26892. };
  26893. /***/ }),
  26894. /***/ 7854:
  26895. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_53970__) {
  26896. var check = function (it) {
  26897. return it && it.Math == Math && it;
  26898. };
  26899. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  26900. module.exports =
  26901. /* global globalThis -- safe */
  26902. check(typeof globalThis == 'object' && globalThis) ||
  26903. check(typeof window == 'object' && window) ||
  26904. check(typeof self == 'object' && self) ||
  26905. check(typeof __nested_webpack_require_53970__.g == 'object' && __nested_webpack_require_53970__.g) ||
  26906. // eslint-disable-next-line no-new-func -- fallback
  26907. (function () { return this; })() || Function('return this')();
  26908. /***/ }),
  26909. /***/ 6656:
  26910. /***/ (function(module) {
  26911. var hasOwnProperty = {}.hasOwnProperty;
  26912. module.exports = function (it, key) {
  26913. return hasOwnProperty.call(it, key);
  26914. };
  26915. /***/ }),
  26916. /***/ 3501:
  26917. /***/ (function(module) {
  26918. module.exports = {};
  26919. /***/ }),
  26920. /***/ 490:
  26921. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_54852__) {
  26922. var getBuiltIn = __nested_webpack_require_54852__(5005);
  26923. module.exports = getBuiltIn('document', 'documentElement');
  26924. /***/ }),
  26925. /***/ 4664:
  26926. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_55056__) {
  26927. var DESCRIPTORS = __nested_webpack_require_55056__(9781);
  26928. var fails = __nested_webpack_require_55056__(7293);
  26929. var createElement = __nested_webpack_require_55056__(317);
  26930. // Thank's IE8 for his funny defineProperty
  26931. module.exports = !DESCRIPTORS && !fails(function () {
  26932. return Object.defineProperty(createElement('div'), 'a', {
  26933. get: function () { return 7; }
  26934. }).a != 7;
  26935. });
  26936. /***/ }),
  26937. /***/ 1179:
  26938. /***/ (function(module) {
  26939. // IEEE754 conversions based on https://github.com/feross/ieee754
  26940. var abs = Math.abs;
  26941. var pow = Math.pow;
  26942. var floor = Math.floor;
  26943. var log = Math.log;
  26944. var LN2 = Math.LN2;
  26945. var pack = function (number, mantissaLength, bytes) {
  26946. var buffer = new Array(bytes);
  26947. var exponentLength = bytes * 8 - mantissaLength - 1;
  26948. var eMax = (1 << exponentLength) - 1;
  26949. var eBias = eMax >> 1;
  26950. var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
  26951. var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
  26952. var index = 0;
  26953. var exponent, mantissa, c;
  26954. number = abs(number);
  26955. // eslint-disable-next-line no-self-compare -- NaN check
  26956. if (number != number || number === Infinity) {
  26957. // eslint-disable-next-line no-self-compare -- NaN check
  26958. mantissa = number != number ? 1 : 0;
  26959. exponent = eMax;
  26960. } else {
  26961. exponent = floor(log(number) / LN2);
  26962. if (number * (c = pow(2, -exponent)) < 1) {
  26963. exponent--;
  26964. c *= 2;
  26965. }
  26966. if (exponent + eBias >= 1) {
  26967. number += rt / c;
  26968. } else {
  26969. number += rt * pow(2, 1 - eBias);
  26970. }
  26971. if (number * c >= 2) {
  26972. exponent++;
  26973. c /= 2;
  26974. }
  26975. if (exponent + eBias >= eMax) {
  26976. mantissa = 0;
  26977. exponent = eMax;
  26978. } else if (exponent + eBias >= 1) {
  26979. mantissa = (number * c - 1) * pow(2, mantissaLength);
  26980. exponent = exponent + eBias;
  26981. } else {
  26982. mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
  26983. exponent = 0;
  26984. }
  26985. }
  26986. for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
  26987. exponent = exponent << mantissaLength | mantissa;
  26988. exponentLength += mantissaLength;
  26989. for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
  26990. buffer[--index] |= sign * 128;
  26991. return buffer;
  26992. };
  26993. var unpack = function (buffer, mantissaLength) {
  26994. var bytes = buffer.length;
  26995. var exponentLength = bytes * 8 - mantissaLength - 1;
  26996. var eMax = (1 << exponentLength) - 1;
  26997. var eBias = eMax >> 1;
  26998. var nBits = exponentLength - 7;
  26999. var index = bytes - 1;
  27000. var sign = buffer[index--];
  27001. var exponent = sign & 127;
  27002. var mantissa;
  27003. sign >>= 7;
  27004. for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
  27005. mantissa = exponent & (1 << -nBits) - 1;
  27006. exponent >>= -nBits;
  27007. nBits += mantissaLength;
  27008. for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
  27009. if (exponent === 0) {
  27010. exponent = 1 - eBias;
  27011. } else if (exponent === eMax) {
  27012. return mantissa ? NaN : sign ? -Infinity : Infinity;
  27013. } else {
  27014. mantissa = mantissa + pow(2, mantissaLength);
  27015. exponent = exponent - eBias;
  27016. } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
  27017. };
  27018. module.exports = {
  27019. pack: pack,
  27020. unpack: unpack
  27021. };
  27022. /***/ }),
  27023. /***/ 8361:
  27024. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_58329__) {
  27025. var fails = __nested_webpack_require_58329__(7293);
  27026. var classof = __nested_webpack_require_58329__(4326);
  27027. var split = ''.split;
  27028. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  27029. module.exports = fails(function () {
  27030. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  27031. // eslint-disable-next-line no-prototype-builtins -- safe
  27032. return !Object('z').propertyIsEnumerable(0);
  27033. }) ? function (it) {
  27034. return classof(it) == 'String' ? split.call(it, '') : Object(it);
  27035. } : Object;
  27036. /***/ }),
  27037. /***/ 9587:
  27038. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_58925__) {
  27039. var isObject = __nested_webpack_require_58925__(111);
  27040. var setPrototypeOf = __nested_webpack_require_58925__(7674);
  27041. // makes subclassing work correct for wrapped built-ins
  27042. module.exports = function ($this, dummy, Wrapper) {
  27043. var NewTarget, NewTargetPrototype;
  27044. if (
  27045. // it can work only with native `setPrototypeOf`
  27046. setPrototypeOf &&
  27047. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  27048. typeof (NewTarget = dummy.constructor) == 'function' &&
  27049. NewTarget !== Wrapper &&
  27050. isObject(NewTargetPrototype = NewTarget.prototype) &&
  27051. NewTargetPrototype !== Wrapper.prototype
  27052. ) setPrototypeOf($this, NewTargetPrototype);
  27053. return $this;
  27054. };
  27055. /***/ }),
  27056. /***/ 2788:
  27057. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_59686__) {
  27058. var store = __nested_webpack_require_59686__(5465);
  27059. var functionToString = Function.toString;
  27060. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  27061. if (typeof store.inspectSource != 'function') {
  27062. store.inspectSource = function (it) {
  27063. return functionToString.call(it);
  27064. };
  27065. }
  27066. module.exports = store.inspectSource;
  27067. /***/ }),
  27068. /***/ 9909:
  27069. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_60112__) {
  27070. var NATIVE_WEAK_MAP = __nested_webpack_require_60112__(8536);
  27071. var global = __nested_webpack_require_60112__(7854);
  27072. var isObject = __nested_webpack_require_60112__(111);
  27073. var createNonEnumerableProperty = __nested_webpack_require_60112__(8880);
  27074. var objectHas = __nested_webpack_require_60112__(6656);
  27075. var shared = __nested_webpack_require_60112__(5465);
  27076. var sharedKey = __nested_webpack_require_60112__(6200);
  27077. var hiddenKeys = __nested_webpack_require_60112__(3501);
  27078. var WeakMap = global.WeakMap;
  27079. var set, get, has;
  27080. var enforce = function (it) {
  27081. return has(it) ? get(it) : set(it, {});
  27082. };
  27083. var getterFor = function (TYPE) {
  27084. return function (it) {
  27085. var state;
  27086. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  27087. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  27088. } return state;
  27089. };
  27090. };
  27091. if (NATIVE_WEAK_MAP) {
  27092. var store = shared.state || (shared.state = new WeakMap());
  27093. var wmget = store.get;
  27094. var wmhas = store.has;
  27095. var wmset = store.set;
  27096. set = function (it, metadata) {
  27097. metadata.facade = it;
  27098. wmset.call(store, it, metadata);
  27099. return metadata;
  27100. };
  27101. get = function (it) {
  27102. return wmget.call(store, it) || {};
  27103. };
  27104. has = function (it) {
  27105. return wmhas.call(store, it);
  27106. };
  27107. } else {
  27108. var STATE = sharedKey('state');
  27109. hiddenKeys[STATE] = true;
  27110. set = function (it, metadata) {
  27111. metadata.facade = it;
  27112. createNonEnumerableProperty(it, STATE, metadata);
  27113. return metadata;
  27114. };
  27115. get = function (it) {
  27116. return objectHas(it, STATE) ? it[STATE] : {};
  27117. };
  27118. has = function (it) {
  27119. return objectHas(it, STATE);
  27120. };
  27121. }
  27122. module.exports = {
  27123. set: set,
  27124. get: get,
  27125. has: has,
  27126. enforce: enforce,
  27127. getterFor: getterFor
  27128. };
  27129. /***/ }),
  27130. /***/ 7659:
  27131. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_61804__) {
  27132. var wellKnownSymbol = __nested_webpack_require_61804__(5112);
  27133. var Iterators = __nested_webpack_require_61804__(7497);
  27134. var ITERATOR = wellKnownSymbol('iterator');
  27135. var ArrayPrototype = Array.prototype;
  27136. // check on default Array iterator
  27137. module.exports = function (it) {
  27138. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  27139. };
  27140. /***/ }),
  27141. /***/ 3157:
  27142. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_62240__) {
  27143. var classof = __nested_webpack_require_62240__(4326);
  27144. // `IsArray` abstract operation
  27145. // https://tc39.es/ecma262/#sec-isarray
  27146. module.exports = Array.isArray || function isArray(arg) {
  27147. return classof(arg) == 'Array';
  27148. };
  27149. /***/ }),
  27150. /***/ 4705:
  27151. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_62548__) {
  27152. var fails = __nested_webpack_require_62548__(7293);
  27153. var replacement = /#|\.prototype\./;
  27154. var isForced = function (feature, detection) {
  27155. var value = data[normalize(feature)];
  27156. return value == POLYFILL ? true
  27157. : value == NATIVE ? false
  27158. : typeof detection == 'function' ? fails(detection)
  27159. : !!detection;
  27160. };
  27161. var normalize = isForced.normalize = function (string) {
  27162. return String(string).replace(replacement, '.').toLowerCase();
  27163. };
  27164. var data = isForced.data = {};
  27165. var NATIVE = isForced.NATIVE = 'N';
  27166. var POLYFILL = isForced.POLYFILL = 'P';
  27167. module.exports = isForced;
  27168. /***/ }),
  27169. /***/ 111:
  27170. /***/ (function(module) {
  27171. module.exports = function (it) {
  27172. return typeof it === 'object' ? it !== null : typeof it === 'function';
  27173. };
  27174. /***/ }),
  27175. /***/ 1913:
  27176. /***/ (function(module) {
  27177. module.exports = false;
  27178. /***/ }),
  27179. /***/ 7850:
  27180. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_63453__) {
  27181. var isObject = __nested_webpack_require_63453__(111);
  27182. var classof = __nested_webpack_require_63453__(4326);
  27183. var wellKnownSymbol = __nested_webpack_require_63453__(5112);
  27184. var MATCH = wellKnownSymbol('match');
  27185. // `IsRegExp` abstract operation
  27186. // https://tc39.es/ecma262/#sec-isregexp
  27187. module.exports = function (it) {
  27188. var isRegExp;
  27189. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
  27190. };
  27191. /***/ }),
  27192. /***/ 9212:
  27193. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_63953__) {
  27194. var anObject = __nested_webpack_require_63953__(9670);
  27195. module.exports = function (iterator) {
  27196. var returnMethod = iterator['return'];
  27197. if (returnMethod !== undefined) {
  27198. return anObject(returnMethod.call(iterator)).value;
  27199. }
  27200. };
  27201. /***/ }),
  27202. /***/ 3383:
  27203. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_64274__) {
  27204. "use strict";
  27205. var fails = __nested_webpack_require_64274__(7293);
  27206. var getPrototypeOf = __nested_webpack_require_64274__(9518);
  27207. var createNonEnumerableProperty = __nested_webpack_require_64274__(8880);
  27208. var has = __nested_webpack_require_64274__(6656);
  27209. var wellKnownSymbol = __nested_webpack_require_64274__(5112);
  27210. var IS_PURE = __nested_webpack_require_64274__(1913);
  27211. var ITERATOR = wellKnownSymbol('iterator');
  27212. var BUGGY_SAFARI_ITERATORS = false;
  27213. var returnThis = function () { return this; };
  27214. // `%IteratorPrototype%` object
  27215. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  27216. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  27217. if ([].keys) {
  27218. arrayIterator = [].keys();
  27219. // Safari 8 has buggy iterators w/o `next`
  27220. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  27221. else {
  27222. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  27223. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  27224. }
  27225. }
  27226. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  27227. var test = {};
  27228. // FF44- legacy iterators case
  27229. return IteratorPrototype[ITERATOR].call(test) !== test;
  27230. });
  27231. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  27232. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  27233. if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  27234. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  27235. }
  27236. module.exports = {
  27237. IteratorPrototype: IteratorPrototype,
  27238. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  27239. };
  27240. /***/ }),
  27241. /***/ 7497:
  27242. /***/ (function(module) {
  27243. module.exports = {};
  27244. /***/ }),
  27245. /***/ 133:
  27246. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_65970__) {
  27247. var fails = __nested_webpack_require_65970__(7293);
  27248. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  27249. // Chrome 38 Symbol has incorrect toString conversion
  27250. /* global Symbol -- required for testing */
  27251. return !String(Symbol());
  27252. });
  27253. /***/ }),
  27254. /***/ 590:
  27255. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_66314__) {
  27256. var fails = __nested_webpack_require_66314__(7293);
  27257. var wellKnownSymbol = __nested_webpack_require_66314__(5112);
  27258. var IS_PURE = __nested_webpack_require_66314__(1913);
  27259. var ITERATOR = wellKnownSymbol('iterator');
  27260. module.exports = !fails(function () {
  27261. var url = new URL('b?a=1&b=2&c=3', 'http://a');
  27262. var searchParams = url.searchParams;
  27263. var result = '';
  27264. url.pathname = 'c%20d';
  27265. searchParams.forEach(function (value, key) {
  27266. searchParams['delete']('b');
  27267. result += key + value;
  27268. });
  27269. return (IS_PURE && !url.toJSON)
  27270. || !searchParams.sort
  27271. || url.href !== 'http://a/c%20d?a=1&c=3'
  27272. || searchParams.get('c') !== '3'
  27273. || String(new URLSearchParams('?a=1')) !== 'a=1'
  27274. || !searchParams[ITERATOR]
  27275. // throws in Edge
  27276. || new URL('https://a@b').username !== 'a'
  27277. || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
  27278. // not punycoded in Edge
  27279. || new URL('http://тест').host !== 'xn--e1aybc'
  27280. // not escaped in Chrome 62-
  27281. || new URL('http://a#б').hash !== '#%D0%B1'
  27282. // fails in Chrome 66-
  27283. || result !== 'a1c3'
  27284. // throws in Safari
  27285. || new URL('http://x', undefined).host !== 'x';
  27286. });
  27287. /***/ }),
  27288. /***/ 8536:
  27289. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_67534__) {
  27290. var global = __nested_webpack_require_67534__(7854);
  27291. var inspectSource = __nested_webpack_require_67534__(2788);
  27292. var WeakMap = global.WeakMap;
  27293. module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
  27294. /***/ }),
  27295. /***/ 1574:
  27296. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_67846__) {
  27297. "use strict";
  27298. var DESCRIPTORS = __nested_webpack_require_67846__(9781);
  27299. var fails = __nested_webpack_require_67846__(7293);
  27300. var objectKeys = __nested_webpack_require_67846__(1956);
  27301. var getOwnPropertySymbolsModule = __nested_webpack_require_67846__(5181);
  27302. var propertyIsEnumerableModule = __nested_webpack_require_67846__(5296);
  27303. var toObject = __nested_webpack_require_67846__(7908);
  27304. var IndexedObject = __nested_webpack_require_67846__(8361);
  27305. var nativeAssign = Object.assign;
  27306. var defineProperty = Object.defineProperty;
  27307. // `Object.assign` method
  27308. // https://tc39.es/ecma262/#sec-object.assign
  27309. module.exports = !nativeAssign || fails(function () {
  27310. // should have correct order of operations (Edge bug)
  27311. if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
  27312. enumerable: true,
  27313. get: function () {
  27314. defineProperty(this, 'b', {
  27315. value: 3,
  27316. enumerable: false
  27317. });
  27318. }
  27319. }), { b: 2 })).b !== 1) return true;
  27320. // should work with symbols and should have deterministic property order (V8 bug)
  27321. var A = {};
  27322. var B = {};
  27323. /* global Symbol -- required for testing */
  27324. var symbol = Symbol();
  27325. var alphabet = 'abcdefghijklmnopqrst';
  27326. A[symbol] = 7;
  27327. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  27328. return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
  27329. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  27330. var T = toObject(target);
  27331. var argumentsLength = arguments.length;
  27332. var index = 1;
  27333. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  27334. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  27335. while (argumentsLength > index) {
  27336. var S = IndexedObject(arguments[index++]);
  27337. var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
  27338. var length = keys.length;
  27339. var j = 0;
  27340. var key;
  27341. while (length > j) {
  27342. key = keys[j++];
  27343. if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
  27344. }
  27345. } return T;
  27346. } : nativeAssign;
  27347. /***/ }),
  27348. /***/ 30:
  27349. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_69941__) {
  27350. var anObject = __nested_webpack_require_69941__(9670);
  27351. var defineProperties = __nested_webpack_require_69941__(6048);
  27352. var enumBugKeys = __nested_webpack_require_69941__(748);
  27353. var hiddenKeys = __nested_webpack_require_69941__(3501);
  27354. var html = __nested_webpack_require_69941__(490);
  27355. var documentCreateElement = __nested_webpack_require_69941__(317);
  27356. var sharedKey = __nested_webpack_require_69941__(6200);
  27357. var GT = '>';
  27358. var LT = '<';
  27359. var PROTOTYPE = 'prototype';
  27360. var SCRIPT = 'script';
  27361. var IE_PROTO = sharedKey('IE_PROTO');
  27362. var EmptyConstructor = function () { /* empty */ };
  27363. var scriptTag = function (content) {
  27364. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  27365. };
  27366. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  27367. var NullProtoObjectViaActiveX = function (activeXDocument) {
  27368. activeXDocument.write(scriptTag(''));
  27369. activeXDocument.close();
  27370. var temp = activeXDocument.parentWindow.Object;
  27371. activeXDocument = null; // avoid memory leak
  27372. return temp;
  27373. };
  27374. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  27375. var NullProtoObjectViaIFrame = function () {
  27376. // Thrash, waste and sodomy: IE GC bug
  27377. var iframe = documentCreateElement('iframe');
  27378. var JS = 'java' + SCRIPT + ':';
  27379. var iframeDocument;
  27380. iframe.style.display = 'none';
  27381. html.appendChild(iframe);
  27382. // https://github.com/zloirock/core-js/issues/475
  27383. iframe.src = String(JS);
  27384. iframeDocument = iframe.contentWindow.document;
  27385. iframeDocument.open();
  27386. iframeDocument.write(scriptTag('document.F=Object'));
  27387. iframeDocument.close();
  27388. return iframeDocument.F;
  27389. };
  27390. // Check for document.domain and active x support
  27391. // No need to use active x approach when document.domain is not set
  27392. // see https://github.com/es-shims/es5-shim/issues/150
  27393. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  27394. // avoid IE GC bug
  27395. var activeXDocument;
  27396. var NullProtoObject = function () {
  27397. try {
  27398. /* global ActiveXObject -- old IE */
  27399. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  27400. } catch (error) { /* ignore */ }
  27401. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  27402. var length = enumBugKeys.length;
  27403. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  27404. return NullProtoObject();
  27405. };
  27406. hiddenKeys[IE_PROTO] = true;
  27407. // `Object.create` method
  27408. // https://tc39.es/ecma262/#sec-object.create
  27409. module.exports = Object.create || function create(O, Properties) {
  27410. var result;
  27411. if (O !== null) {
  27412. EmptyConstructor[PROTOTYPE] = anObject(O);
  27413. result = new EmptyConstructor();
  27414. EmptyConstructor[PROTOTYPE] = null;
  27415. // add "__proto__" for Object.getPrototypeOf polyfill
  27416. result[IE_PROTO] = O;
  27417. } else result = NullProtoObject();
  27418. return Properties === undefined ? result : defineProperties(result, Properties);
  27419. };
  27420. /***/ }),
  27421. /***/ 6048:
  27422. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_72835__) {
  27423. var DESCRIPTORS = __nested_webpack_require_72835__(9781);
  27424. var definePropertyModule = __nested_webpack_require_72835__(3070);
  27425. var anObject = __nested_webpack_require_72835__(9670);
  27426. var objectKeys = __nested_webpack_require_72835__(1956);
  27427. // `Object.defineProperties` method
  27428. // https://tc39.es/ecma262/#sec-object.defineproperties
  27429. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  27430. anObject(O);
  27431. var keys = objectKeys(Properties);
  27432. var length = keys.length;
  27433. var index = 0;
  27434. var key;
  27435. while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  27436. return O;
  27437. };
  27438. /***/ }),
  27439. /***/ 3070:
  27440. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_73525__) {
  27441. var DESCRIPTORS = __nested_webpack_require_73525__(9781);
  27442. var IE8_DOM_DEFINE = __nested_webpack_require_73525__(4664);
  27443. var anObject = __nested_webpack_require_73525__(9670);
  27444. var toPrimitive = __nested_webpack_require_73525__(7593);
  27445. var nativeDefineProperty = Object.defineProperty;
  27446. // `Object.defineProperty` method
  27447. // https://tc39.es/ecma262/#sec-object.defineproperty
  27448. exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  27449. anObject(O);
  27450. P = toPrimitive(P, true);
  27451. anObject(Attributes);
  27452. if (IE8_DOM_DEFINE) try {
  27453. return nativeDefineProperty(O, P, Attributes);
  27454. } catch (error) { /* empty */ }
  27455. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  27456. if ('value' in Attributes) O[P] = Attributes.value;
  27457. return O;
  27458. };
  27459. /***/ }),
  27460. /***/ 1236:
  27461. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_74380__) {
  27462. var DESCRIPTORS = __nested_webpack_require_74380__(9781);
  27463. var propertyIsEnumerableModule = __nested_webpack_require_74380__(5296);
  27464. var createPropertyDescriptor = __nested_webpack_require_74380__(9114);
  27465. var toIndexedObject = __nested_webpack_require_74380__(5656);
  27466. var toPrimitive = __nested_webpack_require_74380__(7593);
  27467. var has = __nested_webpack_require_74380__(6656);
  27468. var IE8_DOM_DEFINE = __nested_webpack_require_74380__(4664);
  27469. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  27470. // `Object.getOwnPropertyDescriptor` method
  27471. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  27472. exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  27473. O = toIndexedObject(O);
  27474. P = toPrimitive(P, true);
  27475. if (IE8_DOM_DEFINE) try {
  27476. return nativeGetOwnPropertyDescriptor(O, P);
  27477. } catch (error) { /* empty */ }
  27478. if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
  27479. };
  27480. /***/ }),
  27481. /***/ 8006:
  27482. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_75368__) {
  27483. var internalObjectKeys = __nested_webpack_require_75368__(6324);
  27484. var enumBugKeys = __nested_webpack_require_75368__(748);
  27485. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  27486. // `Object.getOwnPropertyNames` method
  27487. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  27488. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  27489. return internalObjectKeys(O, hiddenKeys);
  27490. };
  27491. /***/ }),
  27492. /***/ 5181:
  27493. /***/ (function(__unused_webpack_module, exports) {
  27494. exports.f = Object.getOwnPropertySymbols;
  27495. /***/ }),
  27496. /***/ 9518:
  27497. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_75966__) {
  27498. var has = __nested_webpack_require_75966__(6656);
  27499. var toObject = __nested_webpack_require_75966__(7908);
  27500. var sharedKey = __nested_webpack_require_75966__(6200);
  27501. var CORRECT_PROTOTYPE_GETTER = __nested_webpack_require_75966__(8544);
  27502. var IE_PROTO = sharedKey('IE_PROTO');
  27503. var ObjectPrototype = Object.prototype;
  27504. // `Object.getPrototypeOf` method
  27505. // https://tc39.es/ecma262/#sec-object.getprototypeof
  27506. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  27507. O = toObject(O);
  27508. if (has(O, IE_PROTO)) return O[IE_PROTO];
  27509. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  27510. return O.constructor.prototype;
  27511. } return O instanceof Object ? ObjectPrototype : null;
  27512. };
  27513. /***/ }),
  27514. /***/ 6324:
  27515. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_76729__) {
  27516. var has = __nested_webpack_require_76729__(6656);
  27517. var toIndexedObject = __nested_webpack_require_76729__(5656);
  27518. var indexOf = __nested_webpack_require_76729__(1318).indexOf;
  27519. var hiddenKeys = __nested_webpack_require_76729__(3501);
  27520. module.exports = function (object, names) {
  27521. var O = toIndexedObject(object);
  27522. var i = 0;
  27523. var result = [];
  27524. var key;
  27525. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  27526. // Don't enum bug & hidden keys
  27527. while (names.length > i) if (has(O, key = names[i++])) {
  27528. ~indexOf(result, key) || result.push(key);
  27529. }
  27530. return result;
  27531. };
  27532. /***/ }),
  27533. /***/ 1956:
  27534. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_77369__) {
  27535. var internalObjectKeys = __nested_webpack_require_77369__(6324);
  27536. var enumBugKeys = __nested_webpack_require_77369__(748);
  27537. // `Object.keys` method
  27538. // https://tc39.es/ecma262/#sec-object.keys
  27539. module.exports = Object.keys || function keys(O) {
  27540. return internalObjectKeys(O, enumBugKeys);
  27541. };
  27542. /***/ }),
  27543. /***/ 5296:
  27544. /***/ (function(__unused_webpack_module, exports) {
  27545. "use strict";
  27546. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  27547. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  27548. // Nashorn ~ JDK8 bug
  27549. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  27550. // `Object.prototype.propertyIsEnumerable` method implementation
  27551. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  27552. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  27553. var descriptor = getOwnPropertyDescriptor(this, V);
  27554. return !!descriptor && descriptor.enumerable;
  27555. } : nativePropertyIsEnumerable;
  27556. /***/ }),
  27557. /***/ 7674:
  27558. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_78394__) {
  27559. /* eslint-disable no-proto -- safe */
  27560. var anObject = __nested_webpack_require_78394__(9670);
  27561. var aPossiblePrototype = __nested_webpack_require_78394__(6077);
  27562. // `Object.setPrototypeOf` method
  27563. // https://tc39.es/ecma262/#sec-object.setprototypeof
  27564. // Works with __proto__ only. Old v8 can't work with null proto objects.
  27565. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  27566. var CORRECT_SETTER = false;
  27567. var test = {};
  27568. var setter;
  27569. try {
  27570. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  27571. setter.call(test, []);
  27572. CORRECT_SETTER = test instanceof Array;
  27573. } catch (error) { /* empty */ }
  27574. return function setPrototypeOf(O, proto) {
  27575. anObject(O);
  27576. aPossiblePrototype(proto);
  27577. if (CORRECT_SETTER) setter.call(O, proto);
  27578. else O.__proto__ = proto;
  27579. return O;
  27580. };
  27581. }() : undefined);
  27582. /***/ }),
  27583. /***/ 288:
  27584. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_79325__) {
  27585. "use strict";
  27586. var TO_STRING_TAG_SUPPORT = __nested_webpack_require_79325__(1694);
  27587. var classof = __nested_webpack_require_79325__(648);
  27588. // `Object.prototype.toString` method implementation
  27589. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  27590. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  27591. return '[object ' + classof(this) + ']';
  27592. };
  27593. /***/ }),
  27594. /***/ 3887:
  27595. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_79769__) {
  27596. var getBuiltIn = __nested_webpack_require_79769__(5005);
  27597. var getOwnPropertyNamesModule = __nested_webpack_require_79769__(8006);
  27598. var getOwnPropertySymbolsModule = __nested_webpack_require_79769__(5181);
  27599. var anObject = __nested_webpack_require_79769__(9670);
  27600. // all object keys, includes non-enumerable and symbols
  27601. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  27602. var keys = getOwnPropertyNamesModule.f(anObject(it));
  27603. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  27604. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  27605. };
  27606. /***/ }),
  27607. /***/ 857:
  27608. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_80406__) {
  27609. var global = __nested_webpack_require_80406__(7854);
  27610. module.exports = global;
  27611. /***/ }),
  27612. /***/ 2248:
  27613. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_80571__) {
  27614. var redefine = __nested_webpack_require_80571__(1320);
  27615. module.exports = function (target, src, options) {
  27616. for (var key in src) redefine(target, key, src[key], options);
  27617. return target;
  27618. };
  27619. /***/ }),
  27620. /***/ 1320:
  27621. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_80849__) {
  27622. var global = __nested_webpack_require_80849__(7854);
  27623. var createNonEnumerableProperty = __nested_webpack_require_80849__(8880);
  27624. var has = __nested_webpack_require_80849__(6656);
  27625. var setGlobal = __nested_webpack_require_80849__(3505);
  27626. var inspectSource = __nested_webpack_require_80849__(2788);
  27627. var InternalStateModule = __nested_webpack_require_80849__(9909);
  27628. var getInternalState = InternalStateModule.get;
  27629. var enforceInternalState = InternalStateModule.enforce;
  27630. var TEMPLATE = String(String).split('String');
  27631. (module.exports = function (O, key, value, options) {
  27632. var unsafe = options ? !!options.unsafe : false;
  27633. var simple = options ? !!options.enumerable : false;
  27634. var noTargetGet = options ? !!options.noTargetGet : false;
  27635. var state;
  27636. if (typeof value == 'function') {
  27637. if (typeof key == 'string' && !has(value, 'name')) {
  27638. createNonEnumerableProperty(value, 'name', key);
  27639. }
  27640. state = enforceInternalState(value);
  27641. if (!state.source) {
  27642. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  27643. }
  27644. }
  27645. if (O === global) {
  27646. if (simple) O[key] = value;
  27647. else setGlobal(key, value);
  27648. return;
  27649. } else if (!unsafe) {
  27650. delete O[key];
  27651. } else if (!noTargetGet && O[key]) {
  27652. simple = true;
  27653. }
  27654. if (simple) O[key] = value;
  27655. else createNonEnumerableProperty(O, key, value);
  27656. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  27657. })(Function.prototype, 'toString', function toString() {
  27658. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  27659. });
  27660. /***/ }),
  27661. /***/ 7651:
  27662. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_82466__) {
  27663. var classof = __nested_webpack_require_82466__(4326);
  27664. var regexpExec = __nested_webpack_require_82466__(2261);
  27665. // `RegExpExec` abstract operation
  27666. // https://tc39.es/ecma262/#sec-regexpexec
  27667. module.exports = function (R, S) {
  27668. var exec = R.exec;
  27669. if (typeof exec === 'function') {
  27670. var result = exec.call(R, S);
  27671. if (typeof result !== 'object') {
  27672. throw TypeError('RegExp exec method returned something other than an Object or null');
  27673. }
  27674. return result;
  27675. }
  27676. if (classof(R) !== 'RegExp') {
  27677. throw TypeError('RegExp#exec called on incompatible receiver');
  27678. }
  27679. return regexpExec.call(R, S);
  27680. };
  27681. /***/ }),
  27682. /***/ 2261:
  27683. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_83158__) {
  27684. "use strict";
  27685. var regexpFlags = __nested_webpack_require_83158__(7066);
  27686. var stickyHelpers = __nested_webpack_require_83158__(2999);
  27687. var nativeExec = RegExp.prototype.exec;
  27688. // This always refers to the native implementation, because the
  27689. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  27690. // which loads this file before patching the method.
  27691. var nativeReplace = String.prototype.replace;
  27692. var patchedExec = nativeExec;
  27693. var UPDATES_LAST_INDEX_WRONG = (function () {
  27694. var re1 = /a/;
  27695. var re2 = /b*/g;
  27696. nativeExec.call(re1, 'a');
  27697. nativeExec.call(re2, 'a');
  27698. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  27699. })();
  27700. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
  27701. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  27702. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  27703. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  27704. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  27705. if (PATCH) {
  27706. patchedExec = function exec(str) {
  27707. var re = this;
  27708. var lastIndex, reCopy, match, i;
  27709. var sticky = UNSUPPORTED_Y && re.sticky;
  27710. var flags = regexpFlags.call(re);
  27711. var source = re.source;
  27712. var charsAdded = 0;
  27713. var strCopy = str;
  27714. if (sticky) {
  27715. flags = flags.replace('y', '');
  27716. if (flags.indexOf('g') === -1) {
  27717. flags += 'g';
  27718. }
  27719. strCopy = String(str).slice(re.lastIndex);
  27720. // Support anchored sticky behavior.
  27721. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  27722. source = '(?: ' + source + ')';
  27723. strCopy = ' ' + strCopy;
  27724. charsAdded++;
  27725. }
  27726. // ^(? + rx + ) is needed, in combination with some str slicing, to
  27727. // simulate the 'y' flag.
  27728. reCopy = new RegExp('^(?:' + source + ')', flags);
  27729. }
  27730. if (NPCG_INCLUDED) {
  27731. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  27732. }
  27733. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  27734. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  27735. if (sticky) {
  27736. if (match) {
  27737. match.input = match.input.slice(charsAdded);
  27738. match[0] = match[0].slice(charsAdded);
  27739. match.index = re.lastIndex;
  27740. re.lastIndex += match[0].length;
  27741. } else re.lastIndex = 0;
  27742. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  27743. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  27744. }
  27745. if (NPCG_INCLUDED && match && match.length > 1) {
  27746. // Fix browsers whose `exec` methods don't consistently return `undefined`
  27747. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  27748. nativeReplace.call(match[0], reCopy, function () {
  27749. for (i = 1; i < arguments.length - 2; i++) {
  27750. if (arguments[i] === undefined) match[i] = undefined;
  27751. }
  27752. });
  27753. }
  27754. return match;
  27755. };
  27756. }
  27757. module.exports = patchedExec;
  27758. /***/ }),
  27759. /***/ 7066:
  27760. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_86176__) {
  27761. "use strict";
  27762. var anObject = __nested_webpack_require_86176__(9670);
  27763. // `RegExp.prototype.flags` getter implementation
  27764. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  27765. module.exports = function () {
  27766. var that = anObject(this);
  27767. var result = '';
  27768. if (that.global) result += 'g';
  27769. if (that.ignoreCase) result += 'i';
  27770. if (that.multiline) result += 'm';
  27771. if (that.dotAll) result += 's';
  27772. if (that.unicode) result += 'u';
  27773. if (that.sticky) result += 'y';
  27774. return result;
  27775. };
  27776. /***/ }),
  27777. /***/ 2999:
  27778. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_86753__) {
  27779. "use strict";
  27780. var fails = __nested_webpack_require_86753__(7293);
  27781. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  27782. // so we use an intermediate function.
  27783. function RE(s, f) {
  27784. return RegExp(s, f);
  27785. }
  27786. exports.UNSUPPORTED_Y = fails(function () {
  27787. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  27788. var re = RE('a', 'y');
  27789. re.lastIndex = 2;
  27790. return re.exec('abcd') != null;
  27791. });
  27792. exports.BROKEN_CARET = fails(function () {
  27793. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  27794. var re = RE('^r', 'gy');
  27795. re.lastIndex = 2;
  27796. return re.exec('str') != null;
  27797. });
  27798. /***/ }),
  27799. /***/ 4488:
  27800. /***/ (function(module) {
  27801. // `RequireObjectCoercible` abstract operation
  27802. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  27803. module.exports = function (it) {
  27804. if (it == undefined) throw TypeError("Can't call method on " + it);
  27805. return it;
  27806. };
  27807. /***/ }),
  27808. /***/ 3505:
  27809. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_87737__) {
  27810. var global = __nested_webpack_require_87737__(7854);
  27811. var createNonEnumerableProperty = __nested_webpack_require_87737__(8880);
  27812. module.exports = function (key, value) {
  27813. try {
  27814. createNonEnumerableProperty(global, key, value);
  27815. } catch (error) {
  27816. global[key] = value;
  27817. } return value;
  27818. };
  27819. /***/ }),
  27820. /***/ 6340:
  27821. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_88106__) {
  27822. "use strict";
  27823. var getBuiltIn = __nested_webpack_require_88106__(5005);
  27824. var definePropertyModule = __nested_webpack_require_88106__(3070);
  27825. var wellKnownSymbol = __nested_webpack_require_88106__(5112);
  27826. var DESCRIPTORS = __nested_webpack_require_88106__(9781);
  27827. var SPECIES = wellKnownSymbol('species');
  27828. module.exports = function (CONSTRUCTOR_NAME) {
  27829. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  27830. var defineProperty = definePropertyModule.f;
  27831. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  27832. defineProperty(Constructor, SPECIES, {
  27833. configurable: true,
  27834. get: function () { return this; }
  27835. });
  27836. }
  27837. };
  27838. /***/ }),
  27839. /***/ 8003:
  27840. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_88786__) {
  27841. var defineProperty = __nested_webpack_require_88786__(3070).f;
  27842. var has = __nested_webpack_require_88786__(6656);
  27843. var wellKnownSymbol = __nested_webpack_require_88786__(5112);
  27844. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  27845. module.exports = function (it, TAG, STATIC) {
  27846. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  27847. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  27848. }
  27849. };
  27850. /***/ }),
  27851. /***/ 6200:
  27852. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_89271__) {
  27853. var shared = __nested_webpack_require_89271__(2309);
  27854. var uid = __nested_webpack_require_89271__(9711);
  27855. var keys = shared('keys');
  27856. module.exports = function (key) {
  27857. return keys[key] || (keys[key] = uid(key));
  27858. };
  27859. /***/ }),
  27860. /***/ 5465:
  27861. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_89559__) {
  27862. var global = __nested_webpack_require_89559__(7854);
  27863. var setGlobal = __nested_webpack_require_89559__(3505);
  27864. var SHARED = '__core-js_shared__';
  27865. var store = global[SHARED] || setGlobal(SHARED, {});
  27866. module.exports = store;
  27867. /***/ }),
  27868. /***/ 2309:
  27869. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_89855__) {
  27870. var IS_PURE = __nested_webpack_require_89855__(1913);
  27871. var store = __nested_webpack_require_89855__(5465);
  27872. (module.exports = function (key, value) {
  27873. return store[key] || (store[key] = value !== undefined ? value : {});
  27874. })('versions', []).push({
  27875. version: '3.9.0',
  27876. mode: IS_PURE ? 'pure' : 'global',
  27877. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  27878. });
  27879. /***/ }),
  27880. /***/ 6707:
  27881. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_90288__) {
  27882. var anObject = __nested_webpack_require_90288__(9670);
  27883. var aFunction = __nested_webpack_require_90288__(3099);
  27884. var wellKnownSymbol = __nested_webpack_require_90288__(5112);
  27885. var SPECIES = wellKnownSymbol('species');
  27886. // `SpeciesConstructor` abstract operation
  27887. // https://tc39.es/ecma262/#sec-speciesconstructor
  27888. module.exports = function (O, defaultConstructor) {
  27889. var C = anObject(O).constructor;
  27890. var S;
  27891. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
  27892. };
  27893. /***/ }),
  27894. /***/ 8710:
  27895. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_90863__) {
  27896. var toInteger = __nested_webpack_require_90863__(9958);
  27897. var requireObjectCoercible = __nested_webpack_require_90863__(4488);
  27898. // `String.prototype.{ codePointAt, at }` methods implementation
  27899. var createMethod = function (CONVERT_TO_STRING) {
  27900. return function ($this, pos) {
  27901. var S = String(requireObjectCoercible($this));
  27902. var position = toInteger(pos);
  27903. var size = S.length;
  27904. var first, second;
  27905. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  27906. first = S.charCodeAt(position);
  27907. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  27908. || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
  27909. ? CONVERT_TO_STRING ? S.charAt(position) : first
  27910. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  27911. };
  27912. };
  27913. module.exports = {
  27914. // `String.prototype.codePointAt` method
  27915. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  27916. codeAt: createMethod(false),
  27917. // `String.prototype.at` method
  27918. // https://github.com/mathiasbynens/String.prototype.at
  27919. charAt: createMethod(true)
  27920. };
  27921. /***/ }),
  27922. /***/ 3197:
  27923. /***/ (function(module) {
  27924. "use strict";
  27925. // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
  27926. var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
  27927. var base = 36;
  27928. var tMin = 1;
  27929. var tMax = 26;
  27930. var skew = 38;
  27931. var damp = 700;
  27932. var initialBias = 72;
  27933. var initialN = 128; // 0x80
  27934. var delimiter = '-'; // '\x2D'
  27935. var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
  27936. var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
  27937. var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
  27938. var baseMinusTMin = base - tMin;
  27939. var floor = Math.floor;
  27940. var stringFromCharCode = String.fromCharCode;
  27941. /**
  27942. * Creates an array containing the numeric code points of each Unicode
  27943. * character in the string. While JavaScript uses UCS-2 internally,
  27944. * this function will convert a pair of surrogate halves (each of which
  27945. * UCS-2 exposes as separate characters) into a single code point,
  27946. * matching UTF-16.
  27947. */
  27948. var ucs2decode = function (string) {
  27949. var output = [];
  27950. var counter = 0;
  27951. var length = string.length;
  27952. while (counter < length) {
  27953. var value = string.charCodeAt(counter++);
  27954. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  27955. // It's a high surrogate, and there is a next character.
  27956. var extra = string.charCodeAt(counter++);
  27957. if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
  27958. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  27959. } else {
  27960. // It's an unmatched surrogate; only append this code unit, in case the
  27961. // next code unit is the high surrogate of a surrogate pair.
  27962. output.push(value);
  27963. counter--;
  27964. }
  27965. } else {
  27966. output.push(value);
  27967. }
  27968. }
  27969. return output;
  27970. };
  27971. /**
  27972. * Converts a digit/integer into a basic code point.
  27973. */
  27974. var digitToBasic = function (digit) {
  27975. // 0..25 map to ASCII a..z or A..Z
  27976. // 26..35 map to ASCII 0..9
  27977. return digit + 22 + 75 * (digit < 26);
  27978. };
  27979. /**
  27980. * Bias adaptation function as per section 3.4 of RFC 3492.
  27981. * https://tools.ietf.org/html/rfc3492#section-3.4
  27982. */
  27983. var adapt = function (delta, numPoints, firstTime) {
  27984. var k = 0;
  27985. delta = firstTime ? floor(delta / damp) : delta >> 1;
  27986. delta += floor(delta / numPoints);
  27987. for (; delta > baseMinusTMin * tMax >> 1; k += base) {
  27988. delta = floor(delta / baseMinusTMin);
  27989. }
  27990. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  27991. };
  27992. /**
  27993. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  27994. * Punycode string of ASCII-only symbols.
  27995. */
  27996. // eslint-disable-next-line max-statements -- TODO
  27997. var encode = function (input) {
  27998. var output = [];
  27999. // Convert the input in UCS-2 to an array of Unicode code points.
  28000. input = ucs2decode(input);
  28001. // Cache the length.
  28002. var inputLength = input.length;
  28003. // Initialize the state.
  28004. var n = initialN;
  28005. var delta = 0;
  28006. var bias = initialBias;
  28007. var i, currentValue;
  28008. // Handle the basic code points.
  28009. for (i = 0; i < input.length; i++) {
  28010. currentValue = input[i];
  28011. if (currentValue < 0x80) {
  28012. output.push(stringFromCharCode(currentValue));
  28013. }
  28014. }
  28015. var basicLength = output.length; // number of basic code points.
  28016. var handledCPCount = basicLength; // number of code points that have been handled;
  28017. // Finish the basic string with a delimiter unless it's empty.
  28018. if (basicLength) {
  28019. output.push(delimiter);
  28020. }
  28021. // Main encoding loop:
  28022. while (handledCPCount < inputLength) {
  28023. // All non-basic code points < n have been handled already. Find the next larger one:
  28024. var m = maxInt;
  28025. for (i = 0; i < input.length; i++) {
  28026. currentValue = input[i];
  28027. if (currentValue >= n && currentValue < m) {
  28028. m = currentValue;
  28029. }
  28030. }
  28031. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
  28032. var handledCPCountPlusOne = handledCPCount + 1;
  28033. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  28034. throw RangeError(OVERFLOW_ERROR);
  28035. }
  28036. delta += (m - n) * handledCPCountPlusOne;
  28037. n = m;
  28038. for (i = 0; i < input.length; i++) {
  28039. currentValue = input[i];
  28040. if (currentValue < n && ++delta > maxInt) {
  28041. throw RangeError(OVERFLOW_ERROR);
  28042. }
  28043. if (currentValue == n) {
  28044. // Represent delta as a generalized variable-length integer.
  28045. var q = delta;
  28046. for (var k = base; /* no condition */; k += base) {
  28047. var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  28048. if (q < t) break;
  28049. var qMinusT = q - t;
  28050. var baseMinusT = base - t;
  28051. output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
  28052. q = floor(qMinusT / baseMinusT);
  28053. }
  28054. output.push(stringFromCharCode(digitToBasic(q)));
  28055. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  28056. delta = 0;
  28057. ++handledCPCount;
  28058. }
  28059. }
  28060. ++delta;
  28061. ++n;
  28062. }
  28063. return output.join('');
  28064. };
  28065. module.exports = function (input) {
  28066. var encoded = [];
  28067. var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
  28068. var i, label;
  28069. for (i = 0; i < labels.length; i++) {
  28070. label = labels[i];
  28071. encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
  28072. }
  28073. return encoded.join('.');
  28074. };
  28075. /***/ }),
  28076. /***/ 6091:
  28077. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_97360__) {
  28078. var fails = __nested_webpack_require_97360__(7293);
  28079. var whitespaces = __nested_webpack_require_97360__(1361);
  28080. var non = '\u200B\u0085\u180E';
  28081. // check that a method works with the correct list
  28082. // of whitespaces and has a correct name
  28083. module.exports = function (METHOD_NAME) {
  28084. return fails(function () {
  28085. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  28086. });
  28087. };
  28088. /***/ }),
  28089. /***/ 3111:
  28090. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_97868__) {
  28091. var requireObjectCoercible = __nested_webpack_require_97868__(4488);
  28092. var whitespaces = __nested_webpack_require_97868__(1361);
  28093. var whitespace = '[' + whitespaces + ']';
  28094. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  28095. var rtrim = RegExp(whitespace + whitespace + '*$');
  28096. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  28097. var createMethod = function (TYPE) {
  28098. return function ($this) {
  28099. var string = String(requireObjectCoercible($this));
  28100. if (TYPE & 1) string = string.replace(ltrim, '');
  28101. if (TYPE & 2) string = string.replace(rtrim, '');
  28102. return string;
  28103. };
  28104. };
  28105. module.exports = {
  28106. // `String.prototype.{ trimLeft, trimStart }` methods
  28107. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  28108. start: createMethod(1),
  28109. // `String.prototype.{ trimRight, trimEnd }` methods
  28110. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  28111. end: createMethod(2),
  28112. // `String.prototype.trim` method
  28113. // https://tc39.es/ecma262/#sec-string.prototype.trim
  28114. trim: createMethod(3)
  28115. };
  28116. /***/ }),
  28117. /***/ 1400:
  28118. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_98992__) {
  28119. var toInteger = __nested_webpack_require_98992__(9958);
  28120. var max = Math.max;
  28121. var min = Math.min;
  28122. // Helper for a popular repeating case of the spec:
  28123. // Let integer be ? ToInteger(index).
  28124. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  28125. module.exports = function (index, length) {
  28126. var integer = toInteger(index);
  28127. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  28128. };
  28129. /***/ }),
  28130. /***/ 7067:
  28131. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_99521__) {
  28132. var toInteger = __nested_webpack_require_99521__(9958);
  28133. var toLength = __nested_webpack_require_99521__(7466);
  28134. // `ToIndex` abstract operation
  28135. // https://tc39.es/ecma262/#sec-toindex
  28136. module.exports = function (it) {
  28137. if (it === undefined) return 0;
  28138. var number = toInteger(it);
  28139. var length = toLength(number);
  28140. if (number !== length) throw RangeError('Wrong length or index');
  28141. return length;
  28142. };
  28143. /***/ }),
  28144. /***/ 5656:
  28145. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_99996__) {
  28146. // toObject with fallback for non-array-like ES3 strings
  28147. var IndexedObject = __nested_webpack_require_99996__(8361);
  28148. var requireObjectCoercible = __nested_webpack_require_99996__(4488);
  28149. module.exports = function (it) {
  28150. return IndexedObject(requireObjectCoercible(it));
  28151. };
  28152. /***/ }),
  28153. /***/ 9958:
  28154. /***/ (function(module) {
  28155. var ceil = Math.ceil;
  28156. var floor = Math.floor;
  28157. // `ToInteger` abstract operation
  28158. // https://tc39.es/ecma262/#sec-tointeger
  28159. module.exports = function (argument) {
  28160. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  28161. };
  28162. /***/ }),
  28163. /***/ 7466:
  28164. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_100645__) {
  28165. var toInteger = __nested_webpack_require_100645__(9958);
  28166. var min = Math.min;
  28167. // `ToLength` abstract operation
  28168. // https://tc39.es/ecma262/#sec-tolength
  28169. module.exports = function (argument) {
  28170. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  28171. };
  28172. /***/ }),
  28173. /***/ 7908:
  28174. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101032__) {
  28175. var requireObjectCoercible = __nested_webpack_require_101032__(4488);
  28176. // `ToObject` abstract operation
  28177. // https://tc39.es/ecma262/#sec-toobject
  28178. module.exports = function (argument) {
  28179. return Object(requireObjectCoercible(argument));
  28180. };
  28181. /***/ }),
  28182. /***/ 4590:
  28183. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101355__) {
  28184. var toPositiveInteger = __nested_webpack_require_101355__(3002);
  28185. module.exports = function (it, BYTES) {
  28186. var offset = toPositiveInteger(it);
  28187. if (offset % BYTES) throw RangeError('Wrong offset');
  28188. return offset;
  28189. };
  28190. /***/ }),
  28191. /***/ 3002:
  28192. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101660__) {
  28193. var toInteger = __nested_webpack_require_101660__(9958);
  28194. module.exports = function (it) {
  28195. var result = toInteger(it);
  28196. if (result < 0) throw RangeError("The argument can't be less than 0");
  28197. return result;
  28198. };
  28199. /***/ }),
  28200. /***/ 7593:
  28201. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101959__) {
  28202. var isObject = __nested_webpack_require_101959__(111);
  28203. // `ToPrimitive` abstract operation
  28204. // https://tc39.es/ecma262/#sec-toprimitive
  28205. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  28206. // and the second argument - flag - preferred type is a string
  28207. module.exports = function (input, PREFERRED_STRING) {
  28208. if (!isObject(input)) return input;
  28209. var fn, val;
  28210. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  28211. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  28212. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  28213. throw TypeError("Can't convert object to primitive value");
  28214. };
  28215. /***/ }),
  28216. /***/ 1694:
  28217. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_102821__) {
  28218. var wellKnownSymbol = __nested_webpack_require_102821__(5112);
  28219. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  28220. var test = {};
  28221. test[TO_STRING_TAG] = 'z';
  28222. module.exports = String(test) === '[object z]';
  28223. /***/ }),
  28224. /***/ 9843:
  28225. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_103114__) {
  28226. "use strict";
  28227. var $ = __nested_webpack_require_103114__(2109);
  28228. var global = __nested_webpack_require_103114__(7854);
  28229. var DESCRIPTORS = __nested_webpack_require_103114__(9781);
  28230. var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __nested_webpack_require_103114__(3832);
  28231. var ArrayBufferViewCore = __nested_webpack_require_103114__(260);
  28232. var ArrayBufferModule = __nested_webpack_require_103114__(3331);
  28233. var anInstance = __nested_webpack_require_103114__(5787);
  28234. var createPropertyDescriptor = __nested_webpack_require_103114__(9114);
  28235. var createNonEnumerableProperty = __nested_webpack_require_103114__(8880);
  28236. var toLength = __nested_webpack_require_103114__(7466);
  28237. var toIndex = __nested_webpack_require_103114__(7067);
  28238. var toOffset = __nested_webpack_require_103114__(4590);
  28239. var toPrimitive = __nested_webpack_require_103114__(7593);
  28240. var has = __nested_webpack_require_103114__(6656);
  28241. var classof = __nested_webpack_require_103114__(648);
  28242. var isObject = __nested_webpack_require_103114__(111);
  28243. var create = __nested_webpack_require_103114__(30);
  28244. var setPrototypeOf = __nested_webpack_require_103114__(7674);
  28245. var getOwnPropertyNames = __nested_webpack_require_103114__(8006).f;
  28246. var typedArrayFrom = __nested_webpack_require_103114__(7321);
  28247. var forEach = __nested_webpack_require_103114__(2092).forEach;
  28248. var setSpecies = __nested_webpack_require_103114__(6340);
  28249. var definePropertyModule = __nested_webpack_require_103114__(3070);
  28250. var getOwnPropertyDescriptorModule = __nested_webpack_require_103114__(1236);
  28251. var InternalStateModule = __nested_webpack_require_103114__(9909);
  28252. var inheritIfRequired = __nested_webpack_require_103114__(9587);
  28253. var getInternalState = InternalStateModule.get;
  28254. var setInternalState = InternalStateModule.set;
  28255. var nativeDefineProperty = definePropertyModule.f;
  28256. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  28257. var round = Math.round;
  28258. var RangeError = global.RangeError;
  28259. var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
  28260. var DataView = ArrayBufferModule.DataView;
  28261. var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
  28262. var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
  28263. var TypedArray = ArrayBufferViewCore.TypedArray;
  28264. var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
  28265. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  28266. var isTypedArray = ArrayBufferViewCore.isTypedArray;
  28267. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  28268. var WRONG_LENGTH = 'Wrong length';
  28269. var fromList = function (C, list) {
  28270. var index = 0;
  28271. var length = list.length;
  28272. var result = new (aTypedArrayConstructor(C))(length);
  28273. while (length > index) result[index] = list[index++];
  28274. return result;
  28275. };
  28276. var addGetter = function (it, key) {
  28277. nativeDefineProperty(it, key, { get: function () {
  28278. return getInternalState(this)[key];
  28279. } });
  28280. };
  28281. var isArrayBuffer = function (it) {
  28282. var klass;
  28283. return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
  28284. };
  28285. var isTypedArrayIndex = function (target, key) {
  28286. return isTypedArray(target)
  28287. && typeof key != 'symbol'
  28288. && key in target
  28289. && String(+key) == String(key);
  28290. };
  28291. var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
  28292. return isTypedArrayIndex(target, key = toPrimitive(key, true))
  28293. ? createPropertyDescriptor(2, target[key])
  28294. : nativeGetOwnPropertyDescriptor(target, key);
  28295. };
  28296. var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
  28297. if (isTypedArrayIndex(target, key = toPrimitive(key, true))
  28298. && isObject(descriptor)
  28299. && has(descriptor, 'value')
  28300. && !has(descriptor, 'get')
  28301. && !has(descriptor, 'set')
  28302. // TODO: add validation descriptor w/o calling accessors
  28303. && !descriptor.configurable
  28304. && (!has(descriptor, 'writable') || descriptor.writable)
  28305. && (!has(descriptor, 'enumerable') || descriptor.enumerable)
  28306. ) {
  28307. target[key] = descriptor.value;
  28308. return target;
  28309. } return nativeDefineProperty(target, key, descriptor);
  28310. };
  28311. if (DESCRIPTORS) {
  28312. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  28313. getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
  28314. definePropertyModule.f = wrappedDefineProperty;
  28315. addGetter(TypedArrayPrototype, 'buffer');
  28316. addGetter(TypedArrayPrototype, 'byteOffset');
  28317. addGetter(TypedArrayPrototype, 'byteLength');
  28318. addGetter(TypedArrayPrototype, 'length');
  28319. }
  28320. $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
  28321. getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
  28322. defineProperty: wrappedDefineProperty
  28323. });
  28324. module.exports = function (TYPE, wrapper, CLAMPED) {
  28325. var BYTES = TYPE.match(/\d+$/)[0] / 8;
  28326. var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
  28327. var GETTER = 'get' + TYPE;
  28328. var SETTER = 'set' + TYPE;
  28329. var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
  28330. var TypedArrayConstructor = NativeTypedArrayConstructor;
  28331. var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
  28332. var exported = {};
  28333. var getter = function (that, index) {
  28334. var data = getInternalState(that);
  28335. return data.view[GETTER](index * BYTES + data.byteOffset, true);
  28336. };
  28337. var setter = function (that, index, value) {
  28338. var data = getInternalState(that);
  28339. if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
  28340. data.view[SETTER](index * BYTES + data.byteOffset, value, true);
  28341. };
  28342. var addElement = function (that, index) {
  28343. nativeDefineProperty(that, index, {
  28344. get: function () {
  28345. return getter(this, index);
  28346. },
  28347. set: function (value) {
  28348. return setter(this, index, value);
  28349. },
  28350. enumerable: true
  28351. });
  28352. };
  28353. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  28354. TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
  28355. anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
  28356. var index = 0;
  28357. var byteOffset = 0;
  28358. var buffer, byteLength, length;
  28359. if (!isObject(data)) {
  28360. length = toIndex(data);
  28361. byteLength = length * BYTES;
  28362. buffer = new ArrayBuffer(byteLength);
  28363. } else if (isArrayBuffer(data)) {
  28364. buffer = data;
  28365. byteOffset = toOffset(offset, BYTES);
  28366. var $len = data.byteLength;
  28367. if ($length === undefined) {
  28368. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  28369. byteLength = $len - byteOffset;
  28370. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  28371. } else {
  28372. byteLength = toLength($length) * BYTES;
  28373. if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
  28374. }
  28375. length = byteLength / BYTES;
  28376. } else if (isTypedArray(data)) {
  28377. return fromList(TypedArrayConstructor, data);
  28378. } else {
  28379. return typedArrayFrom.call(TypedArrayConstructor, data);
  28380. }
  28381. setInternalState(that, {
  28382. buffer: buffer,
  28383. byteOffset: byteOffset,
  28384. byteLength: byteLength,
  28385. length: length,
  28386. view: new DataView(buffer)
  28387. });
  28388. while (index < length) addElement(that, index++);
  28389. });
  28390. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  28391. TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
  28392. } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
  28393. TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
  28394. anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
  28395. return inheritIfRequired(function () {
  28396. if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
  28397. if (isArrayBuffer(data)) return $length !== undefined
  28398. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
  28399. : typedArrayOffset !== undefined
  28400. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
  28401. : new NativeTypedArrayConstructor(data);
  28402. if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
  28403. return typedArrayFrom.call(TypedArrayConstructor, data);
  28404. }(), dummy, TypedArrayConstructor);
  28405. });
  28406. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  28407. forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
  28408. if (!(key in TypedArrayConstructor)) {
  28409. createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
  28410. }
  28411. });
  28412. TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
  28413. }
  28414. if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
  28415. createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
  28416. }
  28417. if (TYPED_ARRAY_TAG) {
  28418. createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
  28419. }
  28420. exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
  28421. $({
  28422. global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
  28423. }, exported);
  28424. if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
  28425. createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
  28426. }
  28427. if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
  28428. createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
  28429. }
  28430. setSpecies(CONSTRUCTOR_NAME);
  28431. };
  28432. } else module.exports = function () { /* empty */ };
  28433. /***/ }),
  28434. /***/ 3832:
  28435. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_112503__) {
  28436. /* eslint-disable no-new -- required for testing */
  28437. var global = __nested_webpack_require_112503__(7854);
  28438. var fails = __nested_webpack_require_112503__(7293);
  28439. var checkCorrectnessOfIteration = __nested_webpack_require_112503__(7072);
  28440. var NATIVE_ARRAY_BUFFER_VIEWS = __nested_webpack_require_112503__(260).NATIVE_ARRAY_BUFFER_VIEWS;
  28441. var ArrayBuffer = global.ArrayBuffer;
  28442. var Int8Array = global.Int8Array;
  28443. module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
  28444. Int8Array(1);
  28445. }) || !fails(function () {
  28446. new Int8Array(-1);
  28447. }) || !checkCorrectnessOfIteration(function (iterable) {
  28448. new Int8Array();
  28449. new Int8Array(null);
  28450. new Int8Array(1.5);
  28451. new Int8Array(iterable);
  28452. }, true) || fails(function () {
  28453. // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
  28454. return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
  28455. });
  28456. /***/ }),
  28457. /***/ 3074:
  28458. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_113426__) {
  28459. var aTypedArrayConstructor = __nested_webpack_require_113426__(260).aTypedArrayConstructor;
  28460. var speciesConstructor = __nested_webpack_require_113426__(6707);
  28461. module.exports = function (instance, list) {
  28462. var C = speciesConstructor(instance, instance.constructor);
  28463. var index = 0;
  28464. var length = list.length;
  28465. var result = new (aTypedArrayConstructor(C))(length);
  28466. while (length > index) result[index] = list[index++];
  28467. return result;
  28468. };
  28469. /***/ }),
  28470. /***/ 7321:
  28471. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_113940__) {
  28472. var toObject = __nested_webpack_require_113940__(7908);
  28473. var toLength = __nested_webpack_require_113940__(7466);
  28474. var getIteratorMethod = __nested_webpack_require_113940__(1246);
  28475. var isArrayIteratorMethod = __nested_webpack_require_113940__(7659);
  28476. var bind = __nested_webpack_require_113940__(9974);
  28477. var aTypedArrayConstructor = __nested_webpack_require_113940__(260).aTypedArrayConstructor;
  28478. module.exports = function from(source /* , mapfn, thisArg */) {
  28479. var O = toObject(source);
  28480. var argumentsLength = arguments.length;
  28481. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  28482. var mapping = mapfn !== undefined;
  28483. var iteratorMethod = getIteratorMethod(O);
  28484. var i, length, result, step, iterator, next;
  28485. if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
  28486. iterator = iteratorMethod.call(O);
  28487. next = iterator.next;
  28488. O = [];
  28489. while (!(step = next.call(iterator)).done) {
  28490. O.push(step.value);
  28491. }
  28492. }
  28493. if (mapping && argumentsLength > 2) {
  28494. mapfn = bind(mapfn, arguments[2], 2);
  28495. }
  28496. length = toLength(O.length);
  28497. result = new (aTypedArrayConstructor(this))(length);
  28498. for (i = 0; length > i; i++) {
  28499. result[i] = mapping ? mapfn(O[i], i) : O[i];
  28500. }
  28501. return result;
  28502. };
  28503. /***/ }),
  28504. /***/ 9711:
  28505. /***/ (function(module) {
  28506. var id = 0;
  28507. var postfix = Math.random();
  28508. module.exports = function (key) {
  28509. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  28510. };
  28511. /***/ }),
  28512. /***/ 3307:
  28513. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_115419__) {
  28514. var NATIVE_SYMBOL = __nested_webpack_require_115419__(133);
  28515. module.exports = NATIVE_SYMBOL
  28516. /* global Symbol -- safe */
  28517. && !Symbol.sham
  28518. && typeof Symbol.iterator == 'symbol';
  28519. /***/ }),
  28520. /***/ 5112:
  28521. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_115685__) {
  28522. var global = __nested_webpack_require_115685__(7854);
  28523. var shared = __nested_webpack_require_115685__(2309);
  28524. var has = __nested_webpack_require_115685__(6656);
  28525. var uid = __nested_webpack_require_115685__(9711);
  28526. var NATIVE_SYMBOL = __nested_webpack_require_115685__(133);
  28527. var USE_SYMBOL_AS_UID = __nested_webpack_require_115685__(3307);
  28528. var WellKnownSymbolsStore = shared('wks');
  28529. var Symbol = global.Symbol;
  28530. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  28531. module.exports = function (name) {
  28532. if (!has(WellKnownSymbolsStore, name)) {
  28533. if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
  28534. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  28535. } return WellKnownSymbolsStore[name];
  28536. };
  28537. /***/ }),
  28538. /***/ 1361:
  28539. /***/ (function(module) {
  28540. // a string of all valid unicode whitespaces
  28541. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  28542. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  28543. /***/ }),
  28544. /***/ 8264:
  28545. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_116785__) {
  28546. "use strict";
  28547. var $ = __nested_webpack_require_116785__(2109);
  28548. var global = __nested_webpack_require_116785__(7854);
  28549. var arrayBufferModule = __nested_webpack_require_116785__(3331);
  28550. var setSpecies = __nested_webpack_require_116785__(6340);
  28551. var ARRAY_BUFFER = 'ArrayBuffer';
  28552. var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
  28553. var NativeArrayBuffer = global[ARRAY_BUFFER];
  28554. // `ArrayBuffer` constructor
  28555. // https://tc39.es/ecma262/#sec-arraybuffer-constructor
  28556. $({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {
  28557. ArrayBuffer: ArrayBuffer
  28558. });
  28559. setSpecies(ARRAY_BUFFER);
  28560. /***/ }),
  28561. /***/ 2222:
  28562. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_117427__) {
  28563. "use strict";
  28564. var $ = __nested_webpack_require_117427__(2109);
  28565. var fails = __nested_webpack_require_117427__(7293);
  28566. var isArray = __nested_webpack_require_117427__(3157);
  28567. var isObject = __nested_webpack_require_117427__(111);
  28568. var toObject = __nested_webpack_require_117427__(7908);
  28569. var toLength = __nested_webpack_require_117427__(7466);
  28570. var createProperty = __nested_webpack_require_117427__(6135);
  28571. var arraySpeciesCreate = __nested_webpack_require_117427__(5417);
  28572. var arrayMethodHasSpeciesSupport = __nested_webpack_require_117427__(1194);
  28573. var wellKnownSymbol = __nested_webpack_require_117427__(5112);
  28574. var V8_VERSION = __nested_webpack_require_117427__(7392);
  28575. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  28576. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  28577. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  28578. // We can't use this feature detection in V8 since it causes
  28579. // deoptimization and serious performance degradation
  28580. // https://github.com/zloirock/core-js/issues/679
  28581. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  28582. var array = [];
  28583. array[IS_CONCAT_SPREADABLE] = false;
  28584. return array.concat()[0] !== array;
  28585. });
  28586. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  28587. var isConcatSpreadable = function (O) {
  28588. if (!isObject(O)) return false;
  28589. var spreadable = O[IS_CONCAT_SPREADABLE];
  28590. return spreadable !== undefined ? !!spreadable : isArray(O);
  28591. };
  28592. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  28593. // `Array.prototype.concat` method
  28594. // https://tc39.es/ecma262/#sec-array.prototype.concat
  28595. // with adding support of @@isConcatSpreadable and @@species
  28596. $({ target: 'Array', proto: true, forced: FORCED }, {
  28597. // eslint-disable-next-line no-unused-vars -- required for `.length`
  28598. concat: function concat(arg) {
  28599. var O = toObject(this);
  28600. var A = arraySpeciesCreate(O, 0);
  28601. var n = 0;
  28602. var i, k, length, len, E;
  28603. for (i = -1, length = arguments.length; i < length; i++) {
  28604. E = i === -1 ? O : arguments[i];
  28605. if (isConcatSpreadable(E)) {
  28606. len = toLength(E.length);
  28607. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  28608. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  28609. } else {
  28610. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  28611. createProperty(A, n++, E);
  28612. }
  28613. }
  28614. A.length = n;
  28615. return A;
  28616. }
  28617. });
  28618. /***/ }),
  28619. /***/ 7327:
  28620. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_119834__) {
  28621. "use strict";
  28622. var $ = __nested_webpack_require_119834__(2109);
  28623. var $filter = __nested_webpack_require_119834__(2092).filter;
  28624. var arrayMethodHasSpeciesSupport = __nested_webpack_require_119834__(1194);
  28625. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  28626. // `Array.prototype.filter` method
  28627. // https://tc39.es/ecma262/#sec-array.prototype.filter
  28628. // with adding support of @@species
  28629. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28630. filter: function filter(callbackfn /* , thisArg */) {
  28631. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  28632. }
  28633. });
  28634. /***/ }),
  28635. /***/ 2772:
  28636. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_120523__) {
  28637. "use strict";
  28638. var $ = __nested_webpack_require_120523__(2109);
  28639. var $indexOf = __nested_webpack_require_120523__(1318).indexOf;
  28640. var arrayMethodIsStrict = __nested_webpack_require_120523__(9341);
  28641. var nativeIndexOf = [].indexOf;
  28642. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
  28643. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  28644. // `Array.prototype.indexOf` method
  28645. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  28646. $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  28647. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  28648. return NEGATIVE_ZERO
  28649. // convert -0 to +0
  28650. ? nativeIndexOf.apply(this, arguments) || 0
  28651. : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  28652. }
  28653. });
  28654. /***/ }),
  28655. /***/ 6992:
  28656. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_121364__) {
  28657. "use strict";
  28658. var toIndexedObject = __nested_webpack_require_121364__(5656);
  28659. var addToUnscopables = __nested_webpack_require_121364__(1223);
  28660. var Iterators = __nested_webpack_require_121364__(7497);
  28661. var InternalStateModule = __nested_webpack_require_121364__(9909);
  28662. var defineIterator = __nested_webpack_require_121364__(654);
  28663. var ARRAY_ITERATOR = 'Array Iterator';
  28664. var setInternalState = InternalStateModule.set;
  28665. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  28666. // `Array.prototype.entries` method
  28667. // https://tc39.es/ecma262/#sec-array.prototype.entries
  28668. // `Array.prototype.keys` method
  28669. // https://tc39.es/ecma262/#sec-array.prototype.keys
  28670. // `Array.prototype.values` method
  28671. // https://tc39.es/ecma262/#sec-array.prototype.values
  28672. // `Array.prototype[@@iterator]` method
  28673. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  28674. // `CreateArrayIterator` internal method
  28675. // https://tc39.es/ecma262/#sec-createarrayiterator
  28676. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  28677. setInternalState(this, {
  28678. type: ARRAY_ITERATOR,
  28679. target: toIndexedObject(iterated), // target
  28680. index: 0, // next index
  28681. kind: kind // kind
  28682. });
  28683. // `%ArrayIteratorPrototype%.next` method
  28684. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  28685. }, function () {
  28686. var state = getInternalState(this);
  28687. var target = state.target;
  28688. var kind = state.kind;
  28689. var index = state.index++;
  28690. if (!target || index >= target.length) {
  28691. state.target = undefined;
  28692. return { value: undefined, done: true };
  28693. }
  28694. if (kind == 'keys') return { value: index, done: false };
  28695. if (kind == 'values') return { value: target[index], done: false };
  28696. return { value: [index, target[index]], done: false };
  28697. }, 'values');
  28698. // argumentsList[@@iterator] is %ArrayProto_values%
  28699. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  28700. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  28701. Iterators.Arguments = Iterators.Array;
  28702. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  28703. addToUnscopables('keys');
  28704. addToUnscopables('values');
  28705. addToUnscopables('entries');
  28706. /***/ }),
  28707. /***/ 1249:
  28708. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_123565__) {
  28709. "use strict";
  28710. var $ = __nested_webpack_require_123565__(2109);
  28711. var $map = __nested_webpack_require_123565__(2092).map;
  28712. var arrayMethodHasSpeciesSupport = __nested_webpack_require_123565__(1194);
  28713. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  28714. // `Array.prototype.map` method
  28715. // https://tc39.es/ecma262/#sec-array.prototype.map
  28716. // with adding support of @@species
  28717. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28718. map: function map(callbackfn /* , thisArg */) {
  28719. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  28720. }
  28721. });
  28722. /***/ }),
  28723. /***/ 7042:
  28724. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_124230__) {
  28725. "use strict";
  28726. var $ = __nested_webpack_require_124230__(2109);
  28727. var isObject = __nested_webpack_require_124230__(111);
  28728. var isArray = __nested_webpack_require_124230__(3157);
  28729. var toAbsoluteIndex = __nested_webpack_require_124230__(1400);
  28730. var toLength = __nested_webpack_require_124230__(7466);
  28731. var toIndexedObject = __nested_webpack_require_124230__(5656);
  28732. var createProperty = __nested_webpack_require_124230__(6135);
  28733. var wellKnownSymbol = __nested_webpack_require_124230__(5112);
  28734. var arrayMethodHasSpeciesSupport = __nested_webpack_require_124230__(1194);
  28735. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  28736. var SPECIES = wellKnownSymbol('species');
  28737. var nativeSlice = [].slice;
  28738. var max = Math.max;
  28739. // `Array.prototype.slice` method
  28740. // https://tc39.es/ecma262/#sec-array.prototype.slice
  28741. // fallback for not array-like ES3 strings and DOM objects
  28742. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28743. slice: function slice(start, end) {
  28744. var O = toIndexedObject(this);
  28745. var length = toLength(O.length);
  28746. var k = toAbsoluteIndex(start, length);
  28747. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  28748. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  28749. var Constructor, result, n;
  28750. if (isArray(O)) {
  28751. Constructor = O.constructor;
  28752. // cross-realm fallback
  28753. if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
  28754. Constructor = undefined;
  28755. } else if (isObject(Constructor)) {
  28756. Constructor = Constructor[SPECIES];
  28757. if (Constructor === null) Constructor = undefined;
  28758. }
  28759. if (Constructor === Array || Constructor === undefined) {
  28760. return nativeSlice.call(O, k, fin);
  28761. }
  28762. }
  28763. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  28764. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  28765. result.length = n;
  28766. return result;
  28767. }
  28768. });
  28769. /***/ }),
  28770. /***/ 561:
  28771. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_126211__) {
  28772. "use strict";
  28773. var $ = __nested_webpack_require_126211__(2109);
  28774. var toAbsoluteIndex = __nested_webpack_require_126211__(1400);
  28775. var toInteger = __nested_webpack_require_126211__(9958);
  28776. var toLength = __nested_webpack_require_126211__(7466);
  28777. var toObject = __nested_webpack_require_126211__(7908);
  28778. var arraySpeciesCreate = __nested_webpack_require_126211__(5417);
  28779. var createProperty = __nested_webpack_require_126211__(6135);
  28780. var arrayMethodHasSpeciesSupport = __nested_webpack_require_126211__(1194);
  28781. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  28782. var max = Math.max;
  28783. var min = Math.min;
  28784. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  28785. var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
  28786. // `Array.prototype.splice` method
  28787. // https://tc39.es/ecma262/#sec-array.prototype.splice
  28788. // with adding support of @@species
  28789. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28790. splice: function splice(start, deleteCount /* , ...items */) {
  28791. var O = toObject(this);
  28792. var len = toLength(O.length);
  28793. var actualStart = toAbsoluteIndex(start, len);
  28794. var argumentsLength = arguments.length;
  28795. var insertCount, actualDeleteCount, A, k, from, to;
  28796. if (argumentsLength === 0) {
  28797. insertCount = actualDeleteCount = 0;
  28798. } else if (argumentsLength === 1) {
  28799. insertCount = 0;
  28800. actualDeleteCount = len - actualStart;
  28801. } else {
  28802. insertCount = argumentsLength - 2;
  28803. actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
  28804. }
  28805. if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
  28806. throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
  28807. }
  28808. A = arraySpeciesCreate(O, actualDeleteCount);
  28809. for (k = 0; k < actualDeleteCount; k++) {
  28810. from = actualStart + k;
  28811. if (from in O) createProperty(A, k, O[from]);
  28812. }
  28813. A.length = actualDeleteCount;
  28814. if (insertCount < actualDeleteCount) {
  28815. for (k = actualStart; k < len - actualDeleteCount; k++) {
  28816. from = k + actualDeleteCount;
  28817. to = k + insertCount;
  28818. if (from in O) O[to] = O[from];
  28819. else delete O[to];
  28820. }
  28821. for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
  28822. } else if (insertCount > actualDeleteCount) {
  28823. for (k = len - actualDeleteCount; k > actualStart; k--) {
  28824. from = k + actualDeleteCount - 1;
  28825. to = k + insertCount - 1;
  28826. if (from in O) O[to] = O[from];
  28827. else delete O[to];
  28828. }
  28829. }
  28830. for (k = 0; k < insertCount; k++) {
  28831. O[k + actualStart] = arguments[k + 2];
  28832. }
  28833. O.length = len - actualDeleteCount + insertCount;
  28834. return A;
  28835. }
  28836. });
  28837. /***/ }),
  28838. /***/ 8309:
  28839. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_128857__) {
  28840. var DESCRIPTORS = __nested_webpack_require_128857__(9781);
  28841. var defineProperty = __nested_webpack_require_128857__(3070).f;
  28842. var FunctionPrototype = Function.prototype;
  28843. var FunctionPrototypeToString = FunctionPrototype.toString;
  28844. var nameRE = /^\s*function ([^ (]*)/;
  28845. var NAME = 'name';
  28846. // Function instances `.name` property
  28847. // https://tc39.es/ecma262/#sec-function-instances-name
  28848. if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  28849. defineProperty(FunctionPrototype, NAME, {
  28850. configurable: true,
  28851. get: function () {
  28852. try {
  28853. return FunctionPrototypeToString.call(this).match(nameRE)[1];
  28854. } catch (error) {
  28855. return '';
  28856. }
  28857. }
  28858. });
  28859. }
  28860. /***/ }),
  28861. /***/ 489:
  28862. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_129614__) {
  28863. var $ = __nested_webpack_require_129614__(2109);
  28864. var fails = __nested_webpack_require_129614__(7293);
  28865. var toObject = __nested_webpack_require_129614__(7908);
  28866. var nativeGetPrototypeOf = __nested_webpack_require_129614__(9518);
  28867. var CORRECT_PROTOTYPE_GETTER = __nested_webpack_require_129614__(8544);
  28868. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
  28869. // `Object.getPrototypeOf` method
  28870. // https://tc39.es/ecma262/#sec-object.getprototypeof
  28871. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
  28872. getPrototypeOf: function getPrototypeOf(it) {
  28873. return nativeGetPrototypeOf(toObject(it));
  28874. }
  28875. });
  28876. /***/ }),
  28877. /***/ 1539:
  28878. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_130327__) {
  28879. var TO_STRING_TAG_SUPPORT = __nested_webpack_require_130327__(1694);
  28880. var redefine = __nested_webpack_require_130327__(1320);
  28881. var toString = __nested_webpack_require_130327__(288);
  28882. // `Object.prototype.toString` method
  28883. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  28884. if (!TO_STRING_TAG_SUPPORT) {
  28885. redefine(Object.prototype, 'toString', toString, { unsafe: true });
  28886. }
  28887. /***/ }),
  28888. /***/ 4916:
  28889. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_130780__) {
  28890. "use strict";
  28891. var $ = __nested_webpack_require_130780__(2109);
  28892. var exec = __nested_webpack_require_130780__(2261);
  28893. // `RegExp.prototype.exec` method
  28894. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  28895. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  28896. exec: exec
  28897. });
  28898. /***/ }),
  28899. /***/ 9714:
  28900. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_131156__) {
  28901. "use strict";
  28902. var redefine = __nested_webpack_require_131156__(1320);
  28903. var anObject = __nested_webpack_require_131156__(9670);
  28904. var fails = __nested_webpack_require_131156__(7293);
  28905. var flags = __nested_webpack_require_131156__(7066);
  28906. var TO_STRING = 'toString';
  28907. var RegExpPrototype = RegExp.prototype;
  28908. var nativeToString = RegExpPrototype[TO_STRING];
  28909. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  28910. // FF44- RegExp#toString has a wrong name
  28911. var INCORRECT_NAME = nativeToString.name != TO_STRING;
  28912. // `RegExp.prototype.toString` method
  28913. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  28914. if (NOT_GENERIC || INCORRECT_NAME) {
  28915. redefine(RegExp.prototype, TO_STRING, function toString() {
  28916. var R = anObject(this);
  28917. var p = String(R.source);
  28918. var rf = R.flags;
  28919. var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
  28920. return '/' + p + '/' + f;
  28921. }, { unsafe: true });
  28922. }
  28923. /***/ }),
  28924. /***/ 8783:
  28925. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_132221__) {
  28926. "use strict";
  28927. var charAt = __nested_webpack_require_132221__(8710).charAt;
  28928. var InternalStateModule = __nested_webpack_require_132221__(9909);
  28929. var defineIterator = __nested_webpack_require_132221__(654);
  28930. var STRING_ITERATOR = 'String Iterator';
  28931. var setInternalState = InternalStateModule.set;
  28932. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  28933. // `String.prototype[@@iterator]` method
  28934. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  28935. defineIterator(String, 'String', function (iterated) {
  28936. setInternalState(this, {
  28937. type: STRING_ITERATOR,
  28938. string: String(iterated),
  28939. index: 0
  28940. });
  28941. // `%StringIteratorPrototype%.next` method
  28942. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  28943. }, function next() {
  28944. var state = getInternalState(this);
  28945. var string = state.string;
  28946. var index = state.index;
  28947. var point;
  28948. if (index >= string.length) return { value: undefined, done: true };
  28949. point = charAt(string, index);
  28950. state.index += point.length;
  28951. return { value: point, done: false };
  28952. });
  28953. /***/ }),
  28954. /***/ 4723:
  28955. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_133333__) {
  28956. "use strict";
  28957. var fixRegExpWellKnownSymbolLogic = __nested_webpack_require_133333__(7007);
  28958. var anObject = __nested_webpack_require_133333__(9670);
  28959. var toLength = __nested_webpack_require_133333__(7466);
  28960. var requireObjectCoercible = __nested_webpack_require_133333__(4488);
  28961. var advanceStringIndex = __nested_webpack_require_133333__(1530);
  28962. var regExpExec = __nested_webpack_require_133333__(7651);
  28963. // @@match logic
  28964. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  28965. return [
  28966. // `String.prototype.match` method
  28967. // https://tc39.es/ecma262/#sec-string.prototype.match
  28968. function match(regexp) {
  28969. var O = requireObjectCoercible(this);
  28970. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  28971. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  28972. },
  28973. // `RegExp.prototype[@@match]` method
  28974. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  28975. function (regexp) {
  28976. var res = maybeCallNative(nativeMatch, regexp, this);
  28977. if (res.done) return res.value;
  28978. var rx = anObject(regexp);
  28979. var S = String(this);
  28980. if (!rx.global) return regExpExec(rx, S);
  28981. var fullUnicode = rx.unicode;
  28982. rx.lastIndex = 0;
  28983. var A = [];
  28984. var n = 0;
  28985. var result;
  28986. while ((result = regExpExec(rx, S)) !== null) {
  28987. var matchStr = String(result[0]);
  28988. A[n] = matchStr;
  28989. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  28990. n++;
  28991. }
  28992. return n === 0 ? null : A;
  28993. }
  28994. ];
  28995. });
  28996. /***/ }),
  28997. /***/ 5306:
  28998. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_134975__) {
  28999. "use strict";
  29000. var fixRegExpWellKnownSymbolLogic = __nested_webpack_require_134975__(7007);
  29001. var anObject = __nested_webpack_require_134975__(9670);
  29002. var toLength = __nested_webpack_require_134975__(7466);
  29003. var toInteger = __nested_webpack_require_134975__(9958);
  29004. var requireObjectCoercible = __nested_webpack_require_134975__(4488);
  29005. var advanceStringIndex = __nested_webpack_require_134975__(1530);
  29006. var getSubstitution = __nested_webpack_require_134975__(647);
  29007. var regExpExec = __nested_webpack_require_134975__(7651);
  29008. var max = Math.max;
  29009. var min = Math.min;
  29010. var maybeToString = function (it) {
  29011. return it === undefined ? it : String(it);
  29012. };
  29013. // @@replace logic
  29014. fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  29015. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  29016. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  29017. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  29018. return [
  29019. // `String.prototype.replace` method
  29020. // https://tc39.es/ecma262/#sec-string.prototype.replace
  29021. function replace(searchValue, replaceValue) {
  29022. var O = requireObjectCoercible(this);
  29023. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  29024. return replacer !== undefined
  29025. ? replacer.call(searchValue, O, replaceValue)
  29026. : nativeReplace.call(String(O), searchValue, replaceValue);
  29027. },
  29028. // `RegExp.prototype[@@replace]` method
  29029. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  29030. function (regexp, replaceValue) {
  29031. if (
  29032. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  29033. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  29034. ) {
  29035. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  29036. if (res.done) return res.value;
  29037. }
  29038. var rx = anObject(regexp);
  29039. var S = String(this);
  29040. var functionalReplace = typeof replaceValue === 'function';
  29041. if (!functionalReplace) replaceValue = String(replaceValue);
  29042. var global = rx.global;
  29043. if (global) {
  29044. var fullUnicode = rx.unicode;
  29045. rx.lastIndex = 0;
  29046. }
  29047. var results = [];
  29048. while (true) {
  29049. var result = regExpExec(rx, S);
  29050. if (result === null) break;
  29051. results.push(result);
  29052. if (!global) break;
  29053. var matchStr = String(result[0]);
  29054. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  29055. }
  29056. var accumulatedResult = '';
  29057. var nextSourcePosition = 0;
  29058. for (var i = 0; i < results.length; i++) {
  29059. result = results[i];
  29060. var matched = String(result[0]);
  29061. var position = max(min(toInteger(result.index), S.length), 0);
  29062. var captures = [];
  29063. // NOTE: This is equivalent to
  29064. // captures = result.slice(1).map(maybeToString)
  29065. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  29066. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  29067. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  29068. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  29069. var namedCaptures = result.groups;
  29070. if (functionalReplace) {
  29071. var replacerArgs = [matched].concat(captures, position, S);
  29072. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  29073. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  29074. } else {
  29075. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  29076. }
  29077. if (position >= nextSourcePosition) {
  29078. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  29079. nextSourcePosition = position + matched.length;
  29080. }
  29081. }
  29082. return accumulatedResult + S.slice(nextSourcePosition);
  29083. }
  29084. ];
  29085. });
  29086. /***/ }),
  29087. /***/ 3123:
  29088. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_139010__) {
  29089. "use strict";
  29090. var fixRegExpWellKnownSymbolLogic = __nested_webpack_require_139010__(7007);
  29091. var isRegExp = __nested_webpack_require_139010__(7850);
  29092. var anObject = __nested_webpack_require_139010__(9670);
  29093. var requireObjectCoercible = __nested_webpack_require_139010__(4488);
  29094. var speciesConstructor = __nested_webpack_require_139010__(6707);
  29095. var advanceStringIndex = __nested_webpack_require_139010__(1530);
  29096. var toLength = __nested_webpack_require_139010__(7466);
  29097. var callRegExpExec = __nested_webpack_require_139010__(7651);
  29098. var regexpExec = __nested_webpack_require_139010__(2261);
  29099. var fails = __nested_webpack_require_139010__(7293);
  29100. var arrayPush = [].push;
  29101. var min = Math.min;
  29102. var MAX_UINT32 = 0xFFFFFFFF;
  29103. // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
  29104. var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
  29105. // @@split logic
  29106. fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  29107. var internalSplit;
  29108. if (
  29109. 'abbc'.split(/(b)*/)[1] == 'c' ||
  29110. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  29111. 'test'.split(/(?:)/, -1).length != 4 ||
  29112. 'ab'.split(/(?:ab)*/).length != 2 ||
  29113. '.'.split(/(.?)(.?)/).length != 4 ||
  29114. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  29115. '.'.split(/()()/).length > 1 ||
  29116. ''.split(/.?/).length
  29117. ) {
  29118. // based on es5-shim implementation, need to rework it
  29119. internalSplit = function (separator, limit) {
  29120. var string = String(requireObjectCoercible(this));
  29121. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  29122. if (lim === 0) return [];
  29123. if (separator === undefined) return [string];
  29124. // If `separator` is not a regex, use native split
  29125. if (!isRegExp(separator)) {
  29126. return nativeSplit.call(string, separator, lim);
  29127. }
  29128. var output = [];
  29129. var flags = (separator.ignoreCase ? 'i' : '') +
  29130. (separator.multiline ? 'm' : '') +
  29131. (separator.unicode ? 'u' : '') +
  29132. (separator.sticky ? 'y' : '');
  29133. var lastLastIndex = 0;
  29134. // Make `global` and avoid `lastIndex` issues by working with a copy
  29135. var separatorCopy = new RegExp(separator.source, flags + 'g');
  29136. var match, lastIndex, lastLength;
  29137. while (match = regexpExec.call(separatorCopy, string)) {
  29138. lastIndex = separatorCopy.lastIndex;
  29139. if (lastIndex > lastLastIndex) {
  29140. output.push(string.slice(lastLastIndex, match.index));
  29141. if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
  29142. lastLength = match[0].length;
  29143. lastLastIndex = lastIndex;
  29144. if (output.length >= lim) break;
  29145. }
  29146. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  29147. }
  29148. if (lastLastIndex === string.length) {
  29149. if (lastLength || !separatorCopy.test('')) output.push('');
  29150. } else output.push(string.slice(lastLastIndex));
  29151. return output.length > lim ? output.slice(0, lim) : output;
  29152. };
  29153. // Chakra, V8
  29154. } else if ('0'.split(undefined, 0).length) {
  29155. internalSplit = function (separator, limit) {
  29156. return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
  29157. };
  29158. } else internalSplit = nativeSplit;
  29159. return [
  29160. // `String.prototype.split` method
  29161. // https://tc39.es/ecma262/#sec-string.prototype.split
  29162. function split(separator, limit) {
  29163. var O = requireObjectCoercible(this);
  29164. var splitter = separator == undefined ? undefined : separator[SPLIT];
  29165. return splitter !== undefined
  29166. ? splitter.call(separator, O, limit)
  29167. : internalSplit.call(String(O), separator, limit);
  29168. },
  29169. // `RegExp.prototype[@@split]` method
  29170. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  29171. //
  29172. // NOTE: This cannot be properly polyfilled in engines that don't support
  29173. // the 'y' flag.
  29174. function (regexp, limit) {
  29175. var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
  29176. if (res.done) return res.value;
  29177. var rx = anObject(regexp);
  29178. var S = String(this);
  29179. var C = speciesConstructor(rx, RegExp);
  29180. var unicodeMatching = rx.unicode;
  29181. var flags = (rx.ignoreCase ? 'i' : '') +
  29182. (rx.multiline ? 'm' : '') +
  29183. (rx.unicode ? 'u' : '') +
  29184. (SUPPORTS_Y ? 'y' : 'g');
  29185. // ^(? + rx + ) is needed, in combination with some S slicing, to
  29186. // simulate the 'y' flag.
  29187. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
  29188. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  29189. if (lim === 0) return [];
  29190. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  29191. var p = 0;
  29192. var q = 0;
  29193. var A = [];
  29194. while (q < S.length) {
  29195. splitter.lastIndex = SUPPORTS_Y ? q : 0;
  29196. var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
  29197. var e;
  29198. if (
  29199. z === null ||
  29200. (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
  29201. ) {
  29202. q = advanceStringIndex(S, q, unicodeMatching);
  29203. } else {
  29204. A.push(S.slice(p, q));
  29205. if (A.length === lim) return A;
  29206. for (var i = 1; i <= z.length - 1; i++) {
  29207. A.push(z[i]);
  29208. if (A.length === lim) return A;
  29209. }
  29210. q = p = e;
  29211. }
  29212. }
  29213. A.push(S.slice(p));
  29214. return A;
  29215. }
  29216. ];
  29217. }, !SUPPORTS_Y);
  29218. /***/ }),
  29219. /***/ 3210:
  29220. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_144619__) {
  29221. "use strict";
  29222. var $ = __nested_webpack_require_144619__(2109);
  29223. var $trim = __nested_webpack_require_144619__(3111).trim;
  29224. var forcedStringTrimMethod = __nested_webpack_require_144619__(6091);
  29225. // `String.prototype.trim` method
  29226. // https://tc39.es/ecma262/#sec-string.prototype.trim
  29227. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  29228. trim: function trim() {
  29229. return $trim(this);
  29230. }
  29231. });
  29232. /***/ }),
  29233. /***/ 2990:
  29234. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_145111__) {
  29235. "use strict";
  29236. var ArrayBufferViewCore = __nested_webpack_require_145111__(260);
  29237. var $copyWithin = __nested_webpack_require_145111__(1048);
  29238. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29239. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29240. // `%TypedArray%.prototype.copyWithin` method
  29241. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
  29242. exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
  29243. return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  29244. });
  29245. /***/ }),
  29246. /***/ 8927:
  29247. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_145777__) {
  29248. "use strict";
  29249. var ArrayBufferViewCore = __nested_webpack_require_145777__(260);
  29250. var $every = __nested_webpack_require_145777__(2092).every;
  29251. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29252. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29253. // `%TypedArray%.prototype.every` method
  29254. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
  29255. exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
  29256. return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29257. });
  29258. /***/ }),
  29259. /***/ 3105:
  29260. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_146412__) {
  29261. "use strict";
  29262. var ArrayBufferViewCore = __nested_webpack_require_146412__(260);
  29263. var $fill = __nested_webpack_require_146412__(1285);
  29264. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29265. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29266. // `%TypedArray%.prototype.fill` method
  29267. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
  29268. // eslint-disable-next-line no-unused-vars -- required for `.length`
  29269. exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
  29270. return $fill.apply(aTypedArray(this), arguments);
  29271. });
  29272. /***/ }),
  29273. /***/ 5035:
  29274. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_147058__) {
  29275. "use strict";
  29276. var ArrayBufferViewCore = __nested_webpack_require_147058__(260);
  29277. var $filter = __nested_webpack_require_147058__(2092).filter;
  29278. var fromSpeciesAndList = __nested_webpack_require_147058__(3074);
  29279. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29280. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29281. // `%TypedArray%.prototype.filter` method
  29282. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
  29283. exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
  29284. var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29285. return fromSpeciesAndList(this, list);
  29286. });
  29287. /***/ }),
  29288. /***/ 7174:
  29289. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_147797__) {
  29290. "use strict";
  29291. var ArrayBufferViewCore = __nested_webpack_require_147797__(260);
  29292. var $findIndex = __nested_webpack_require_147797__(2092).findIndex;
  29293. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29294. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29295. // `%TypedArray%.prototype.findIndex` method
  29296. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
  29297. exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
  29298. return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  29299. });
  29300. /***/ }),
  29301. /***/ 4345:
  29302. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_148458__) {
  29303. "use strict";
  29304. var ArrayBufferViewCore = __nested_webpack_require_148458__(260);
  29305. var $find = __nested_webpack_require_148458__(2092).find;
  29306. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29307. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29308. // `%TypedArray%.prototype.find` method
  29309. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
  29310. exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
  29311. return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  29312. });
  29313. /***/ }),
  29314. /***/ 2846:
  29315. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_149084__) {
  29316. "use strict";
  29317. var ArrayBufferViewCore = __nested_webpack_require_149084__(260);
  29318. var $forEach = __nested_webpack_require_149084__(2092).forEach;
  29319. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29320. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29321. // `%TypedArray%.prototype.forEach` method
  29322. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
  29323. exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
  29324. $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29325. });
  29326. /***/ }),
  29327. /***/ 4731:
  29328. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_149726__) {
  29329. "use strict";
  29330. var ArrayBufferViewCore = __nested_webpack_require_149726__(260);
  29331. var $includes = __nested_webpack_require_149726__(1318).includes;
  29332. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29333. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29334. // `%TypedArray%.prototype.includes` method
  29335. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
  29336. exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
  29337. return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  29338. });
  29339. /***/ }),
  29340. /***/ 7209:
  29341. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_150390__) {
  29342. "use strict";
  29343. var ArrayBufferViewCore = __nested_webpack_require_150390__(260);
  29344. var $indexOf = __nested_webpack_require_150390__(1318).indexOf;
  29345. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29346. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29347. // `%TypedArray%.prototype.indexOf` method
  29348. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
  29349. exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
  29350. return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  29351. });
  29352. /***/ }),
  29353. /***/ 6319:
  29354. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_151047__) {
  29355. "use strict";
  29356. var global = __nested_webpack_require_151047__(7854);
  29357. var ArrayBufferViewCore = __nested_webpack_require_151047__(260);
  29358. var ArrayIterators = __nested_webpack_require_151047__(6992);
  29359. var wellKnownSymbol = __nested_webpack_require_151047__(5112);
  29360. var ITERATOR = wellKnownSymbol('iterator');
  29361. var Uint8Array = global.Uint8Array;
  29362. var arrayValues = ArrayIterators.values;
  29363. var arrayKeys = ArrayIterators.keys;
  29364. var arrayEntries = ArrayIterators.entries;
  29365. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29366. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29367. var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
  29368. var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
  29369. && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
  29370. var typedArrayValues = function values() {
  29371. return arrayValues.call(aTypedArray(this));
  29372. };
  29373. // `%TypedArray%.prototype.entries` method
  29374. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
  29375. exportTypedArrayMethod('entries', function entries() {
  29376. return arrayEntries.call(aTypedArray(this));
  29377. });
  29378. // `%TypedArray%.prototype.keys` method
  29379. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
  29380. exportTypedArrayMethod('keys', function keys() {
  29381. return arrayKeys.call(aTypedArray(this));
  29382. });
  29383. // `%TypedArray%.prototype.values` method
  29384. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
  29385. exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);
  29386. // `%TypedArray%.prototype[@@iterator]` method
  29387. // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
  29388. exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);
  29389. /***/ }),
  29390. /***/ 8867:
  29391. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_152782__) {
  29392. "use strict";
  29393. var ArrayBufferViewCore = __nested_webpack_require_152782__(260);
  29394. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29395. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29396. var $join = [].join;
  29397. // `%TypedArray%.prototype.join` method
  29398. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
  29399. // eslint-disable-next-line no-unused-vars -- required for `.length`
  29400. exportTypedArrayMethod('join', function join(separator) {
  29401. return $join.apply(aTypedArray(this), arguments);
  29402. });
  29403. /***/ }),
  29404. /***/ 7789:
  29405. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_153395__) {
  29406. "use strict";
  29407. var ArrayBufferViewCore = __nested_webpack_require_153395__(260);
  29408. var $lastIndexOf = __nested_webpack_require_153395__(6583);
  29409. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29410. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29411. // `%TypedArray%.prototype.lastIndexOf` method
  29412. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
  29413. // eslint-disable-next-line no-unused-vars -- required for `.length`
  29414. exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
  29415. return $lastIndexOf.apply(aTypedArray(this), arguments);
  29416. });
  29417. /***/ }),
  29418. /***/ 3739:
  29419. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_154090__) {
  29420. "use strict";
  29421. var ArrayBufferViewCore = __nested_webpack_require_154090__(260);
  29422. var $map = __nested_webpack_require_154090__(2092).map;
  29423. var speciesConstructor = __nested_webpack_require_154090__(6707);
  29424. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29425. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  29426. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29427. // `%TypedArray%.prototype.map` method
  29428. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
  29429. exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
  29430. return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
  29431. return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
  29432. });
  29433. });
  29434. /***/ }),
  29435. /***/ 4483:
  29436. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_154941__) {
  29437. "use strict";
  29438. var ArrayBufferViewCore = __nested_webpack_require_154941__(260);
  29439. var $reduceRight = __nested_webpack_require_154941__(3671).right;
  29440. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29441. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29442. // `%TypedArray%.prototype.reduceRicht` method
  29443. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
  29444. exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
  29445. return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  29446. });
  29447. /***/ }),
  29448. /***/ 9368:
  29449. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_155635__) {
  29450. "use strict";
  29451. var ArrayBufferViewCore = __nested_webpack_require_155635__(260);
  29452. var $reduce = __nested_webpack_require_155635__(3671).left;
  29453. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29454. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29455. // `%TypedArray%.prototype.reduce` method
  29456. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
  29457. exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
  29458. return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  29459. });
  29460. /***/ }),
  29461. /***/ 2056:
  29462. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_156298__) {
  29463. "use strict";
  29464. var ArrayBufferViewCore = __nested_webpack_require_156298__(260);
  29465. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29466. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29467. var floor = Math.floor;
  29468. // `%TypedArray%.prototype.reverse` method
  29469. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
  29470. exportTypedArrayMethod('reverse', function reverse() {
  29471. var that = this;
  29472. var length = aTypedArray(that).length;
  29473. var middle = floor(length / 2);
  29474. var index = 0;
  29475. var value;
  29476. while (index < middle) {
  29477. value = that[index];
  29478. that[index++] = that[--length];
  29479. that[length] = value;
  29480. } return that;
  29481. });
  29482. /***/ }),
  29483. /***/ 3462:
  29484. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_157051__) {
  29485. "use strict";
  29486. var ArrayBufferViewCore = __nested_webpack_require_157051__(260);
  29487. var toLength = __nested_webpack_require_157051__(7466);
  29488. var toOffset = __nested_webpack_require_157051__(4590);
  29489. var toObject = __nested_webpack_require_157051__(7908);
  29490. var fails = __nested_webpack_require_157051__(7293);
  29491. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29492. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29493. var FORCED = fails(function () {
  29494. /* global Int8Array -- safe */
  29495. new Int8Array(1).set({});
  29496. });
  29497. // `%TypedArray%.prototype.set` method
  29498. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
  29499. exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  29500. aTypedArray(this);
  29501. var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  29502. var length = this.length;
  29503. var src = toObject(arrayLike);
  29504. var len = toLength(src.length);
  29505. var index = 0;
  29506. if (len + offset > length) throw RangeError('Wrong length');
  29507. while (index < len) this[offset + index] = src[index++];
  29508. }, FORCED);
  29509. /***/ }),
  29510. /***/ 678:
  29511. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_158136__) {
  29512. "use strict";
  29513. var ArrayBufferViewCore = __nested_webpack_require_158136__(260);
  29514. var speciesConstructor = __nested_webpack_require_158136__(6707);
  29515. var fails = __nested_webpack_require_158136__(7293);
  29516. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29517. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  29518. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29519. var $slice = [].slice;
  29520. var FORCED = fails(function () {
  29521. /* global Int8Array -- safe */
  29522. new Int8Array(1).slice();
  29523. });
  29524. // `%TypedArray%.prototype.slice` method
  29525. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
  29526. exportTypedArrayMethod('slice', function slice(start, end) {
  29527. var list = $slice.call(aTypedArray(this), start, end);
  29528. var C = speciesConstructor(this, this.constructor);
  29529. var index = 0;
  29530. var length = list.length;
  29531. var result = new (aTypedArrayConstructor(C))(length);
  29532. while (length > index) result[index] = list[index++];
  29533. return result;
  29534. }, FORCED);
  29535. /***/ }),
  29536. /***/ 7462:
  29537. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_159191__) {
  29538. "use strict";
  29539. var ArrayBufferViewCore = __nested_webpack_require_159191__(260);
  29540. var $some = __nested_webpack_require_159191__(2092).some;
  29541. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29542. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29543. // `%TypedArray%.prototype.some` method
  29544. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
  29545. exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
  29546. return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29547. });
  29548. /***/ }),
  29549. /***/ 3824:
  29550. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_159819__) {
  29551. "use strict";
  29552. var ArrayBufferViewCore = __nested_webpack_require_159819__(260);
  29553. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29554. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29555. var $sort = [].sort;
  29556. // `%TypedArray%.prototype.sort` method
  29557. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
  29558. exportTypedArrayMethod('sort', function sort(comparefn) {
  29559. return $sort.call(aTypedArray(this), comparefn);
  29560. });
  29561. /***/ }),
  29562. /***/ 5021:
  29563. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_160362__) {
  29564. "use strict";
  29565. var ArrayBufferViewCore = __nested_webpack_require_160362__(260);
  29566. var toLength = __nested_webpack_require_160362__(7466);
  29567. var toAbsoluteIndex = __nested_webpack_require_160362__(1400);
  29568. var speciesConstructor = __nested_webpack_require_160362__(6707);
  29569. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29570. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29571. // `%TypedArray%.prototype.subarray` method
  29572. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
  29573. exportTypedArrayMethod('subarray', function subarray(begin, end) {
  29574. var O = aTypedArray(this);
  29575. var length = O.length;
  29576. var beginIndex = toAbsoluteIndex(begin, length);
  29577. return new (speciesConstructor(O, O.constructor))(
  29578. O.buffer,
  29579. O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
  29580. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
  29581. );
  29582. });
  29583. /***/ }),
  29584. /***/ 2974:
  29585. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_161310__) {
  29586. "use strict";
  29587. var global = __nested_webpack_require_161310__(7854);
  29588. var ArrayBufferViewCore = __nested_webpack_require_161310__(260);
  29589. var fails = __nested_webpack_require_161310__(7293);
  29590. var Int8Array = global.Int8Array;
  29591. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29592. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29593. var $toLocaleString = [].toLocaleString;
  29594. var $slice = [].slice;
  29595. // iOS Safari 6.x fails here
  29596. var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
  29597. $toLocaleString.call(new Int8Array(1));
  29598. });
  29599. var FORCED = fails(function () {
  29600. return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
  29601. }) || !fails(function () {
  29602. Int8Array.prototype.toLocaleString.call([1, 2]);
  29603. });
  29604. // `%TypedArray%.prototype.toLocaleString` method
  29605. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
  29606. exportTypedArrayMethod('toLocaleString', function toLocaleString() {
  29607. return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
  29608. }, FORCED);
  29609. /***/ }),
  29610. /***/ 5016:
  29611. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_162445__) {
  29612. "use strict";
  29613. var exportTypedArrayMethod = __nested_webpack_require_162445__(260).exportTypedArrayMethod;
  29614. var fails = __nested_webpack_require_162445__(7293);
  29615. var global = __nested_webpack_require_162445__(7854);
  29616. var Uint8Array = global.Uint8Array;
  29617. var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
  29618. var arrayToString = [].toString;
  29619. var arrayJoin = [].join;
  29620. if (fails(function () { arrayToString.call({}); })) {
  29621. arrayToString = function toString() {
  29622. return arrayJoin.call(this);
  29623. };
  29624. }
  29625. var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
  29626. // `%TypedArray%.prototype.toString` method
  29627. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
  29628. exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
  29629. /***/ }),
  29630. /***/ 2472:
  29631. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_163286__) {
  29632. var createTypedArrayConstructor = __nested_webpack_require_163286__(9843);
  29633. // `Uint8Array` constructor
  29634. // https://tc39.es/ecma262/#sec-typedarray-objects
  29635. createTypedArrayConstructor('Uint8', function (init) {
  29636. return function Uint8Array(data, byteOffset, length) {
  29637. return init(this, data, byteOffset, length);
  29638. };
  29639. });
  29640. /***/ }),
  29641. /***/ 4747:
  29642. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_163713__) {
  29643. var global = __nested_webpack_require_163713__(7854);
  29644. var DOMIterables = __nested_webpack_require_163713__(8324);
  29645. var forEach = __nested_webpack_require_163713__(8533);
  29646. var createNonEnumerableProperty = __nested_webpack_require_163713__(8880);
  29647. for (var COLLECTION_NAME in DOMIterables) {
  29648. var Collection = global[COLLECTION_NAME];
  29649. var CollectionPrototype = Collection && Collection.prototype;
  29650. // some Chrome versions have non-configurable methods on DOMTokenList
  29651. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  29652. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  29653. } catch (error) {
  29654. CollectionPrototype.forEach = forEach;
  29655. }
  29656. }
  29657. /***/ }),
  29658. /***/ 3948:
  29659. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_164461__) {
  29660. var global = __nested_webpack_require_164461__(7854);
  29661. var DOMIterables = __nested_webpack_require_164461__(8324);
  29662. var ArrayIteratorMethods = __nested_webpack_require_164461__(6992);
  29663. var createNonEnumerableProperty = __nested_webpack_require_164461__(8880);
  29664. var wellKnownSymbol = __nested_webpack_require_164461__(5112);
  29665. var ITERATOR = wellKnownSymbol('iterator');
  29666. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  29667. var ArrayValues = ArrayIteratorMethods.values;
  29668. for (var COLLECTION_NAME in DOMIterables) {
  29669. var Collection = global[COLLECTION_NAME];
  29670. var CollectionPrototype = Collection && Collection.prototype;
  29671. if (CollectionPrototype) {
  29672. // some Chrome versions have non-configurable methods on DOMTokenList
  29673. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  29674. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  29675. } catch (error) {
  29676. CollectionPrototype[ITERATOR] = ArrayValues;
  29677. }
  29678. if (!CollectionPrototype[TO_STRING_TAG]) {
  29679. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  29680. }
  29681. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  29682. // some Chrome versions have non-configurable methods on DOMTokenList
  29683. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  29684. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  29685. } catch (error) {
  29686. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  29687. }
  29688. }
  29689. }
  29690. }
  29691. /***/ }),
  29692. /***/ 1637:
  29693. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_166049__) {
  29694. "use strict";
  29695. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  29696. __nested_webpack_require_166049__(6992);
  29697. var $ = __nested_webpack_require_166049__(2109);
  29698. var getBuiltIn = __nested_webpack_require_166049__(5005);
  29699. var USE_NATIVE_URL = __nested_webpack_require_166049__(590);
  29700. var redefine = __nested_webpack_require_166049__(1320);
  29701. var redefineAll = __nested_webpack_require_166049__(2248);
  29702. var setToStringTag = __nested_webpack_require_166049__(8003);
  29703. var createIteratorConstructor = __nested_webpack_require_166049__(4994);
  29704. var InternalStateModule = __nested_webpack_require_166049__(9909);
  29705. var anInstance = __nested_webpack_require_166049__(5787);
  29706. var hasOwn = __nested_webpack_require_166049__(6656);
  29707. var bind = __nested_webpack_require_166049__(9974);
  29708. var classof = __nested_webpack_require_166049__(648);
  29709. var anObject = __nested_webpack_require_166049__(9670);
  29710. var isObject = __nested_webpack_require_166049__(111);
  29711. var create = __nested_webpack_require_166049__(30);
  29712. var createPropertyDescriptor = __nested_webpack_require_166049__(9114);
  29713. var getIterator = __nested_webpack_require_166049__(8554);
  29714. var getIteratorMethod = __nested_webpack_require_166049__(1246);
  29715. var wellKnownSymbol = __nested_webpack_require_166049__(5112);
  29716. var $fetch = getBuiltIn('fetch');
  29717. var Headers = getBuiltIn('Headers');
  29718. var ITERATOR = wellKnownSymbol('iterator');
  29719. var URL_SEARCH_PARAMS = 'URLSearchParams';
  29720. var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
  29721. var setInternalState = InternalStateModule.set;
  29722. var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
  29723. var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
  29724. var plus = /\+/g;
  29725. var sequences = Array(4);
  29726. var percentSequence = function (bytes) {
  29727. return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
  29728. };
  29729. var percentDecode = function (sequence) {
  29730. try {
  29731. return decodeURIComponent(sequence);
  29732. } catch (error) {
  29733. return sequence;
  29734. }
  29735. };
  29736. var deserialize = function (it) {
  29737. var result = it.replace(plus, ' ');
  29738. var bytes = 4;
  29739. try {
  29740. return decodeURIComponent(result);
  29741. } catch (error) {
  29742. while (bytes) {
  29743. result = result.replace(percentSequence(bytes--), percentDecode);
  29744. }
  29745. return result;
  29746. }
  29747. };
  29748. var find = /[!'()~]|%20/g;
  29749. var replace = {
  29750. '!': '%21',
  29751. "'": '%27',
  29752. '(': '%28',
  29753. ')': '%29',
  29754. '~': '%7E',
  29755. '%20': '+'
  29756. };
  29757. var replacer = function (match) {
  29758. return replace[match];
  29759. };
  29760. var serialize = function (it) {
  29761. return encodeURIComponent(it).replace(find, replacer);
  29762. };
  29763. var parseSearchParams = function (result, query) {
  29764. if (query) {
  29765. var attributes = query.split('&');
  29766. var index = 0;
  29767. var attribute, entry;
  29768. while (index < attributes.length) {
  29769. attribute = attributes[index++];
  29770. if (attribute.length) {
  29771. entry = attribute.split('=');
  29772. result.push({
  29773. key: deserialize(entry.shift()),
  29774. value: deserialize(entry.join('='))
  29775. });
  29776. }
  29777. }
  29778. }
  29779. };
  29780. var updateSearchParams = function (query) {
  29781. this.entries.length = 0;
  29782. parseSearchParams(this.entries, query);
  29783. };
  29784. var validateArgumentsLength = function (passed, required) {
  29785. if (passed < required) throw TypeError('Not enough arguments');
  29786. };
  29787. var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  29788. setInternalState(this, {
  29789. type: URL_SEARCH_PARAMS_ITERATOR,
  29790. iterator: getIterator(getInternalParamsState(params).entries),
  29791. kind: kind
  29792. });
  29793. }, 'Iterator', function next() {
  29794. var state = getInternalIteratorState(this);
  29795. var kind = state.kind;
  29796. var step = state.iterator.next();
  29797. var entry = step.value;
  29798. if (!step.done) {
  29799. step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
  29800. } return step;
  29801. });
  29802. // `URLSearchParams` constructor
  29803. // https://url.spec.whatwg.org/#interface-urlsearchparams
  29804. var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  29805. anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  29806. var init = arguments.length > 0 ? arguments[0] : undefined;
  29807. var that = this;
  29808. var entries = [];
  29809. var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
  29810. setInternalState(that, {
  29811. type: URL_SEARCH_PARAMS,
  29812. entries: entries,
  29813. updateURL: function () { /* empty */ },
  29814. updateSearchParams: updateSearchParams
  29815. });
  29816. if (init !== undefined) {
  29817. if (isObject(init)) {
  29818. iteratorMethod = getIteratorMethod(init);
  29819. if (typeof iteratorMethod === 'function') {
  29820. iterator = iteratorMethod.call(init);
  29821. next = iterator.next;
  29822. while (!(step = next.call(iterator)).done) {
  29823. entryIterator = getIterator(anObject(step.value));
  29824. entryNext = entryIterator.next;
  29825. if (
  29826. (first = entryNext.call(entryIterator)).done ||
  29827. (second = entryNext.call(entryIterator)).done ||
  29828. !entryNext.call(entryIterator).done
  29829. ) throw TypeError('Expected sequence with length 2');
  29830. entries.push({ key: first.value + '', value: second.value + '' });
  29831. }
  29832. } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
  29833. } else {
  29834. parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
  29835. }
  29836. }
  29837. };
  29838. var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
  29839. redefineAll(URLSearchParamsPrototype, {
  29840. // `URLSearchParams.prototype.append` method
  29841. // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  29842. append: function append(name, value) {
  29843. validateArgumentsLength(arguments.length, 2);
  29844. var state = getInternalParamsState(this);
  29845. state.entries.push({ key: name + '', value: value + '' });
  29846. state.updateURL();
  29847. },
  29848. // `URLSearchParams.prototype.delete` method
  29849. // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  29850. 'delete': function (name) {
  29851. validateArgumentsLength(arguments.length, 1);
  29852. var state = getInternalParamsState(this);
  29853. var entries = state.entries;
  29854. var key = name + '';
  29855. var index = 0;
  29856. while (index < entries.length) {
  29857. if (entries[index].key === key) entries.splice(index, 1);
  29858. else index++;
  29859. }
  29860. state.updateURL();
  29861. },
  29862. // `URLSearchParams.prototype.get` method
  29863. // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  29864. get: function get(name) {
  29865. validateArgumentsLength(arguments.length, 1);
  29866. var entries = getInternalParamsState(this).entries;
  29867. var key = name + '';
  29868. var index = 0;
  29869. for (; index < entries.length; index++) {
  29870. if (entries[index].key === key) return entries[index].value;
  29871. }
  29872. return null;
  29873. },
  29874. // `URLSearchParams.prototype.getAll` method
  29875. // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  29876. getAll: function getAll(name) {
  29877. validateArgumentsLength(arguments.length, 1);
  29878. var entries = getInternalParamsState(this).entries;
  29879. var key = name + '';
  29880. var result = [];
  29881. var index = 0;
  29882. for (; index < entries.length; index++) {
  29883. if (entries[index].key === key) result.push(entries[index].value);
  29884. }
  29885. return result;
  29886. },
  29887. // `URLSearchParams.prototype.has` method
  29888. // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  29889. has: function has(name) {
  29890. validateArgumentsLength(arguments.length, 1);
  29891. var entries = getInternalParamsState(this).entries;
  29892. var key = name + '';
  29893. var index = 0;
  29894. while (index < entries.length) {
  29895. if (entries[index++].key === key) return true;
  29896. }
  29897. return false;
  29898. },
  29899. // `URLSearchParams.prototype.set` method
  29900. // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  29901. set: function set(name, value) {
  29902. validateArgumentsLength(arguments.length, 1);
  29903. var state = getInternalParamsState(this);
  29904. var entries = state.entries;
  29905. var found = false;
  29906. var key = name + '';
  29907. var val = value + '';
  29908. var index = 0;
  29909. var entry;
  29910. for (; index < entries.length; index++) {
  29911. entry = entries[index];
  29912. if (entry.key === key) {
  29913. if (found) entries.splice(index--, 1);
  29914. else {
  29915. found = true;
  29916. entry.value = val;
  29917. }
  29918. }
  29919. }
  29920. if (!found) entries.push({ key: key, value: val });
  29921. state.updateURL();
  29922. },
  29923. // `URLSearchParams.prototype.sort` method
  29924. // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  29925. sort: function sort() {
  29926. var state = getInternalParamsState(this);
  29927. var entries = state.entries;
  29928. // Array#sort is not stable in some engines
  29929. var slice = entries.slice();
  29930. var entry, entriesIndex, sliceIndex;
  29931. entries.length = 0;
  29932. for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
  29933. entry = slice[sliceIndex];
  29934. for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
  29935. if (entries[entriesIndex].key > entry.key) {
  29936. entries.splice(entriesIndex, 0, entry);
  29937. break;
  29938. }
  29939. }
  29940. if (entriesIndex === sliceIndex) entries.push(entry);
  29941. }
  29942. state.updateURL();
  29943. },
  29944. // `URLSearchParams.prototype.forEach` method
  29945. forEach: function forEach(callback /* , thisArg */) {
  29946. var entries = getInternalParamsState(this).entries;
  29947. var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
  29948. var index = 0;
  29949. var entry;
  29950. while (index < entries.length) {
  29951. entry = entries[index++];
  29952. boundFunction(entry.value, entry.key, this);
  29953. }
  29954. },
  29955. // `URLSearchParams.prototype.keys` method
  29956. keys: function keys() {
  29957. return new URLSearchParamsIterator(this, 'keys');
  29958. },
  29959. // `URLSearchParams.prototype.values` method
  29960. values: function values() {
  29961. return new URLSearchParamsIterator(this, 'values');
  29962. },
  29963. // `URLSearchParams.prototype.entries` method
  29964. entries: function entries() {
  29965. return new URLSearchParamsIterator(this, 'entries');
  29966. }
  29967. }, { enumerable: true });
  29968. // `URLSearchParams.prototype[@@iterator]` method
  29969. redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
  29970. // `URLSearchParams.prototype.toString` method
  29971. // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
  29972. redefine(URLSearchParamsPrototype, 'toString', function toString() {
  29973. var entries = getInternalParamsState(this).entries;
  29974. var result = [];
  29975. var index = 0;
  29976. var entry;
  29977. while (index < entries.length) {
  29978. entry = entries[index++];
  29979. result.push(serialize(entry.key) + '=' + serialize(entry.value));
  29980. } return result.join('&');
  29981. }, { enumerable: true });
  29982. setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  29983. $({ global: true, forced: !USE_NATIVE_URL }, {
  29984. URLSearchParams: URLSearchParamsConstructor
  29985. });
  29986. // Wrap `fetch` for correct work with polyfilled `URLSearchParams`
  29987. // https://github.com/zloirock/core-js/issues/674
  29988. if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
  29989. $({ global: true, enumerable: true, forced: true }, {
  29990. fetch: function fetch(input /* , init */) {
  29991. var args = [input];
  29992. var init, body, headers;
  29993. if (arguments.length > 1) {
  29994. init = arguments[1];
  29995. if (isObject(init)) {
  29996. body = init.body;
  29997. if (classof(body) === URL_SEARCH_PARAMS) {
  29998. headers = init.headers ? new Headers(init.headers) : new Headers();
  29999. if (!headers.has('content-type')) {
  30000. headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
  30001. }
  30002. init = create(init, {
  30003. body: createPropertyDescriptor(0, String(body)),
  30004. headers: createPropertyDescriptor(0, headers)
  30005. });
  30006. }
  30007. }
  30008. args.push(init);
  30009. } return $fetch.apply(this, args);
  30010. }
  30011. });
  30012. }
  30013. module.exports = {
  30014. URLSearchParams: URLSearchParamsConstructor,
  30015. getState: getInternalParamsState
  30016. };
  30017. /***/ }),
  30018. /***/ 285:
  30019. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_177789__) {
  30020. "use strict";
  30021. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  30022. __nested_webpack_require_177789__(8783);
  30023. var $ = __nested_webpack_require_177789__(2109);
  30024. var DESCRIPTORS = __nested_webpack_require_177789__(9781);
  30025. var USE_NATIVE_URL = __nested_webpack_require_177789__(590);
  30026. var global = __nested_webpack_require_177789__(7854);
  30027. var defineProperties = __nested_webpack_require_177789__(6048);
  30028. var redefine = __nested_webpack_require_177789__(1320);
  30029. var anInstance = __nested_webpack_require_177789__(5787);
  30030. var has = __nested_webpack_require_177789__(6656);
  30031. var assign = __nested_webpack_require_177789__(1574);
  30032. var arrayFrom = __nested_webpack_require_177789__(8457);
  30033. var codeAt = __nested_webpack_require_177789__(8710).codeAt;
  30034. var toASCII = __nested_webpack_require_177789__(3197);
  30035. var setToStringTag = __nested_webpack_require_177789__(8003);
  30036. var URLSearchParamsModule = __nested_webpack_require_177789__(1637);
  30037. var InternalStateModule = __nested_webpack_require_177789__(9909);
  30038. var NativeURL = global.URL;
  30039. var URLSearchParams = URLSearchParamsModule.URLSearchParams;
  30040. var getInternalSearchParamsState = URLSearchParamsModule.getState;
  30041. var setInternalState = InternalStateModule.set;
  30042. var getInternalURLState = InternalStateModule.getterFor('URL');
  30043. var floor = Math.floor;
  30044. var pow = Math.pow;
  30045. var INVALID_AUTHORITY = 'Invalid authority';
  30046. var INVALID_SCHEME = 'Invalid scheme';
  30047. var INVALID_HOST = 'Invalid host';
  30048. var INVALID_PORT = 'Invalid port';
  30049. var ALPHA = /[A-Za-z]/;
  30050. var ALPHANUMERIC = /[\d+-.A-Za-z]/;
  30051. var DIGIT = /\d/;
  30052. var HEX_START = /^(0x|0X)/;
  30053. var OCT = /^[0-7]+$/;
  30054. var DEC = /^\d+$/;
  30055. var HEX = /^[\dA-Fa-f]+$/;
  30056. /* eslint-disable no-control-regex -- safe */
  30057. var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
  30058. var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
  30059. var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
  30060. var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
  30061. /* eslint-enable no-control-regex -- safe */
  30062. var EOF;
  30063. var parseHost = function (url, input) {
  30064. var result, codePoints, index;
  30065. if (input.charAt(0) == '[') {
  30066. if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
  30067. result = parseIPv6(input.slice(1, -1));
  30068. if (!result) return INVALID_HOST;
  30069. url.host = result;
  30070. // opaque host
  30071. } else if (!isSpecial(url)) {
  30072. if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
  30073. result = '';
  30074. codePoints = arrayFrom(input);
  30075. for (index = 0; index < codePoints.length; index++) {
  30076. result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
  30077. }
  30078. url.host = result;
  30079. } else {
  30080. input = toASCII(input);
  30081. if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
  30082. result = parseIPv4(input);
  30083. if (result === null) return INVALID_HOST;
  30084. url.host = result;
  30085. }
  30086. };
  30087. var parseIPv4 = function (input) {
  30088. var parts = input.split('.');
  30089. var partsLength, numbers, index, part, radix, number, ipv4;
  30090. if (parts.length && parts[parts.length - 1] == '') {
  30091. parts.pop();
  30092. }
  30093. partsLength = parts.length;
  30094. if (partsLength > 4) return input;
  30095. numbers = [];
  30096. for (index = 0; index < partsLength; index++) {
  30097. part = parts[index];
  30098. if (part == '') return input;
  30099. radix = 10;
  30100. if (part.length > 1 && part.charAt(0) == '0') {
  30101. radix = HEX_START.test(part) ? 16 : 8;
  30102. part = part.slice(radix == 8 ? 1 : 2);
  30103. }
  30104. if (part === '') {
  30105. number = 0;
  30106. } else {
  30107. if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
  30108. number = parseInt(part, radix);
  30109. }
  30110. numbers.push(number);
  30111. }
  30112. for (index = 0; index < partsLength; index++) {
  30113. number = numbers[index];
  30114. if (index == partsLength - 1) {
  30115. if (number >= pow(256, 5 - partsLength)) return null;
  30116. } else if (number > 255) return null;
  30117. }
  30118. ipv4 = numbers.pop();
  30119. for (index = 0; index < numbers.length; index++) {
  30120. ipv4 += numbers[index] * pow(256, 3 - index);
  30121. }
  30122. return ipv4;
  30123. };
  30124. // eslint-disable-next-line max-statements -- TODO
  30125. var parseIPv6 = function (input) {
  30126. var address = [0, 0, 0, 0, 0, 0, 0, 0];
  30127. var pieceIndex = 0;
  30128. var compress = null;
  30129. var pointer = 0;
  30130. var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
  30131. var char = function () {
  30132. return input.charAt(pointer);
  30133. };
  30134. if (char() == ':') {
  30135. if (input.charAt(1) != ':') return;
  30136. pointer += 2;
  30137. pieceIndex++;
  30138. compress = pieceIndex;
  30139. }
  30140. while (char()) {
  30141. if (pieceIndex == 8) return;
  30142. if (char() == ':') {
  30143. if (compress !== null) return;
  30144. pointer++;
  30145. pieceIndex++;
  30146. compress = pieceIndex;
  30147. continue;
  30148. }
  30149. value = length = 0;
  30150. while (length < 4 && HEX.test(char())) {
  30151. value = value * 16 + parseInt(char(), 16);
  30152. pointer++;
  30153. length++;
  30154. }
  30155. if (char() == '.') {
  30156. if (length == 0) return;
  30157. pointer -= length;
  30158. if (pieceIndex > 6) return;
  30159. numbersSeen = 0;
  30160. while (char()) {
  30161. ipv4Piece = null;
  30162. if (numbersSeen > 0) {
  30163. if (char() == '.' && numbersSeen < 4) pointer++;
  30164. else return;
  30165. }
  30166. if (!DIGIT.test(char())) return;
  30167. while (DIGIT.test(char())) {
  30168. number = parseInt(char(), 10);
  30169. if (ipv4Piece === null) ipv4Piece = number;
  30170. else if (ipv4Piece == 0) return;
  30171. else ipv4Piece = ipv4Piece * 10 + number;
  30172. if (ipv4Piece > 255) return;
  30173. pointer++;
  30174. }
  30175. address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
  30176. numbersSeen++;
  30177. if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
  30178. }
  30179. if (numbersSeen != 4) return;
  30180. break;
  30181. } else if (char() == ':') {
  30182. pointer++;
  30183. if (!char()) return;
  30184. } else if (char()) return;
  30185. address[pieceIndex++] = value;
  30186. }
  30187. if (compress !== null) {
  30188. swaps = pieceIndex - compress;
  30189. pieceIndex = 7;
  30190. while (pieceIndex != 0 && swaps > 0) {
  30191. swap = address[pieceIndex];
  30192. address[pieceIndex--] = address[compress + swaps - 1];
  30193. address[compress + --swaps] = swap;
  30194. }
  30195. } else if (pieceIndex != 8) return;
  30196. return address;
  30197. };
  30198. var findLongestZeroSequence = function (ipv6) {
  30199. var maxIndex = null;
  30200. var maxLength = 1;
  30201. var currStart = null;
  30202. var currLength = 0;
  30203. var index = 0;
  30204. for (; index < 8; index++) {
  30205. if (ipv6[index] !== 0) {
  30206. if (currLength > maxLength) {
  30207. maxIndex = currStart;
  30208. maxLength = currLength;
  30209. }
  30210. currStart = null;
  30211. currLength = 0;
  30212. } else {
  30213. if (currStart === null) currStart = index;
  30214. ++currLength;
  30215. }
  30216. }
  30217. if (currLength > maxLength) {
  30218. maxIndex = currStart;
  30219. maxLength = currLength;
  30220. }
  30221. return maxIndex;
  30222. };
  30223. var serializeHost = function (host) {
  30224. var result, index, compress, ignore0;
  30225. // ipv4
  30226. if (typeof host == 'number') {
  30227. result = [];
  30228. for (index = 0; index < 4; index++) {
  30229. result.unshift(host % 256);
  30230. host = floor(host / 256);
  30231. } return result.join('.');
  30232. // ipv6
  30233. } else if (typeof host == 'object') {
  30234. result = '';
  30235. compress = findLongestZeroSequence(host);
  30236. for (index = 0; index < 8; index++) {
  30237. if (ignore0 && host[index] === 0) continue;
  30238. if (ignore0) ignore0 = false;
  30239. if (compress === index) {
  30240. result += index ? ':' : '::';
  30241. ignore0 = true;
  30242. } else {
  30243. result += host[index].toString(16);
  30244. if (index < 7) result += ':';
  30245. }
  30246. }
  30247. return '[' + result + ']';
  30248. } return host;
  30249. };
  30250. var C0ControlPercentEncodeSet = {};
  30251. var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  30252. ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
  30253. });
  30254. var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  30255. '#': 1, '?': 1, '{': 1, '}': 1
  30256. });
  30257. var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  30258. '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
  30259. });
  30260. var percentEncode = function (char, set) {
  30261. var code = codeAt(char, 0);
  30262. return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
  30263. };
  30264. var specialSchemes = {
  30265. ftp: 21,
  30266. file: null,
  30267. http: 80,
  30268. https: 443,
  30269. ws: 80,
  30270. wss: 443
  30271. };
  30272. var isSpecial = function (url) {
  30273. return has(specialSchemes, url.scheme);
  30274. };
  30275. var includesCredentials = function (url) {
  30276. return url.username != '' || url.password != '';
  30277. };
  30278. var cannotHaveUsernamePasswordPort = function (url) {
  30279. return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
  30280. };
  30281. var isWindowsDriveLetter = function (string, normalized) {
  30282. var second;
  30283. return string.length == 2 && ALPHA.test(string.charAt(0))
  30284. && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
  30285. };
  30286. var startsWithWindowsDriveLetter = function (string) {
  30287. var third;
  30288. return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
  30289. string.length == 2 ||
  30290. ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
  30291. );
  30292. };
  30293. var shortenURLsPath = function (url) {
  30294. var path = url.path;
  30295. var pathSize = path.length;
  30296. if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
  30297. path.pop();
  30298. }
  30299. };
  30300. var isSingleDot = function (segment) {
  30301. return segment === '.' || segment.toLowerCase() === '%2e';
  30302. };
  30303. var isDoubleDot = function (segment) {
  30304. segment = segment.toLowerCase();
  30305. return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
  30306. };
  30307. // States:
  30308. var SCHEME_START = {};
  30309. var SCHEME = {};
  30310. var NO_SCHEME = {};
  30311. var SPECIAL_RELATIVE_OR_AUTHORITY = {};
  30312. var PATH_OR_AUTHORITY = {};
  30313. var RELATIVE = {};
  30314. var RELATIVE_SLASH = {};
  30315. var SPECIAL_AUTHORITY_SLASHES = {};
  30316. var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
  30317. var AUTHORITY = {};
  30318. var HOST = {};
  30319. var HOSTNAME = {};
  30320. var PORT = {};
  30321. var FILE = {};
  30322. var FILE_SLASH = {};
  30323. var FILE_HOST = {};
  30324. var PATH_START = {};
  30325. var PATH = {};
  30326. var CANNOT_BE_A_BASE_URL_PATH = {};
  30327. var QUERY = {};
  30328. var FRAGMENT = {};
  30329. // eslint-disable-next-line max-statements -- TODO
  30330. var parseURL = function (url, input, stateOverride, base) {
  30331. var state = stateOverride || SCHEME_START;
  30332. var pointer = 0;
  30333. var buffer = '';
  30334. var seenAt = false;
  30335. var seenBracket = false;
  30336. var seenPasswordToken = false;
  30337. var codePoints, char, bufferCodePoints, failure;
  30338. if (!stateOverride) {
  30339. url.scheme = '';
  30340. url.username = '';
  30341. url.password = '';
  30342. url.host = null;
  30343. url.port = null;
  30344. url.path = [];
  30345. url.query = null;
  30346. url.fragment = null;
  30347. url.cannotBeABaseURL = false;
  30348. input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
  30349. }
  30350. input = input.replace(TAB_AND_NEW_LINE, '');
  30351. codePoints = arrayFrom(input);
  30352. while (pointer <= codePoints.length) {
  30353. char = codePoints[pointer];
  30354. switch (state) {
  30355. case SCHEME_START:
  30356. if (char && ALPHA.test(char)) {
  30357. buffer += char.toLowerCase();
  30358. state = SCHEME;
  30359. } else if (!stateOverride) {
  30360. state = NO_SCHEME;
  30361. continue;
  30362. } else return INVALID_SCHEME;
  30363. break;
  30364. case SCHEME:
  30365. if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
  30366. buffer += char.toLowerCase();
  30367. } else if (char == ':') {
  30368. if (stateOverride && (
  30369. (isSpecial(url) != has(specialSchemes, buffer)) ||
  30370. (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
  30371. (url.scheme == 'file' && !url.host)
  30372. )) return;
  30373. url.scheme = buffer;
  30374. if (stateOverride) {
  30375. if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
  30376. return;
  30377. }
  30378. buffer = '';
  30379. if (url.scheme == 'file') {
  30380. state = FILE;
  30381. } else if (isSpecial(url) && base && base.scheme == url.scheme) {
  30382. state = SPECIAL_RELATIVE_OR_AUTHORITY;
  30383. } else if (isSpecial(url)) {
  30384. state = SPECIAL_AUTHORITY_SLASHES;
  30385. } else if (codePoints[pointer + 1] == '/') {
  30386. state = PATH_OR_AUTHORITY;
  30387. pointer++;
  30388. } else {
  30389. url.cannotBeABaseURL = true;
  30390. url.path.push('');
  30391. state = CANNOT_BE_A_BASE_URL_PATH;
  30392. }
  30393. } else if (!stateOverride) {
  30394. buffer = '';
  30395. state = NO_SCHEME;
  30396. pointer = 0;
  30397. continue;
  30398. } else return INVALID_SCHEME;
  30399. break;
  30400. case NO_SCHEME:
  30401. if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
  30402. if (base.cannotBeABaseURL && char == '#') {
  30403. url.scheme = base.scheme;
  30404. url.path = base.path.slice();
  30405. url.query = base.query;
  30406. url.fragment = '';
  30407. url.cannotBeABaseURL = true;
  30408. state = FRAGMENT;
  30409. break;
  30410. }
  30411. state = base.scheme == 'file' ? FILE : RELATIVE;
  30412. continue;
  30413. case SPECIAL_RELATIVE_OR_AUTHORITY:
  30414. if (char == '/' && codePoints[pointer + 1] == '/') {
  30415. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  30416. pointer++;
  30417. } else {
  30418. state = RELATIVE;
  30419. continue;
  30420. } break;
  30421. case PATH_OR_AUTHORITY:
  30422. if (char == '/') {
  30423. state = AUTHORITY;
  30424. break;
  30425. } else {
  30426. state = PATH;
  30427. continue;
  30428. }
  30429. case RELATIVE:
  30430. url.scheme = base.scheme;
  30431. if (char == EOF) {
  30432. url.username = base.username;
  30433. url.password = base.password;
  30434. url.host = base.host;
  30435. url.port = base.port;
  30436. url.path = base.path.slice();
  30437. url.query = base.query;
  30438. } else if (char == '/' || (char == '\\' && isSpecial(url))) {
  30439. state = RELATIVE_SLASH;
  30440. } else if (char == '?') {
  30441. url.username = base.username;
  30442. url.password = base.password;
  30443. url.host = base.host;
  30444. url.port = base.port;
  30445. url.path = base.path.slice();
  30446. url.query = '';
  30447. state = QUERY;
  30448. } else if (char == '#') {
  30449. url.username = base.username;
  30450. url.password = base.password;
  30451. url.host = base.host;
  30452. url.port = base.port;
  30453. url.path = base.path.slice();
  30454. url.query = base.query;
  30455. url.fragment = '';
  30456. state = FRAGMENT;
  30457. } else {
  30458. url.username = base.username;
  30459. url.password = base.password;
  30460. url.host = base.host;
  30461. url.port = base.port;
  30462. url.path = base.path.slice();
  30463. url.path.pop();
  30464. state = PATH;
  30465. continue;
  30466. } break;
  30467. case RELATIVE_SLASH:
  30468. if (isSpecial(url) && (char == '/' || char == '\\')) {
  30469. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  30470. } else if (char == '/') {
  30471. state = AUTHORITY;
  30472. } else {
  30473. url.username = base.username;
  30474. url.password = base.password;
  30475. url.host = base.host;
  30476. url.port = base.port;
  30477. state = PATH;
  30478. continue;
  30479. } break;
  30480. case SPECIAL_AUTHORITY_SLASHES:
  30481. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  30482. if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
  30483. pointer++;
  30484. break;
  30485. case SPECIAL_AUTHORITY_IGNORE_SLASHES:
  30486. if (char != '/' && char != '\\') {
  30487. state = AUTHORITY;
  30488. continue;
  30489. } break;
  30490. case AUTHORITY:
  30491. if (char == '@') {
  30492. if (seenAt) buffer = '%40' + buffer;
  30493. seenAt = true;
  30494. bufferCodePoints = arrayFrom(buffer);
  30495. for (var i = 0; i < bufferCodePoints.length; i++) {
  30496. var codePoint = bufferCodePoints[i];
  30497. if (codePoint == ':' && !seenPasswordToken) {
  30498. seenPasswordToken = true;
  30499. continue;
  30500. }
  30501. var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
  30502. if (seenPasswordToken) url.password += encodedCodePoints;
  30503. else url.username += encodedCodePoints;
  30504. }
  30505. buffer = '';
  30506. } else if (
  30507. char == EOF || char == '/' || char == '?' || char == '#' ||
  30508. (char == '\\' && isSpecial(url))
  30509. ) {
  30510. if (seenAt && buffer == '') return INVALID_AUTHORITY;
  30511. pointer -= arrayFrom(buffer).length + 1;
  30512. buffer = '';
  30513. state = HOST;
  30514. } else buffer += char;
  30515. break;
  30516. case HOST:
  30517. case HOSTNAME:
  30518. if (stateOverride && url.scheme == 'file') {
  30519. state = FILE_HOST;
  30520. continue;
  30521. } else if (char == ':' && !seenBracket) {
  30522. if (buffer == '') return INVALID_HOST;
  30523. failure = parseHost(url, buffer);
  30524. if (failure) return failure;
  30525. buffer = '';
  30526. state = PORT;
  30527. if (stateOverride == HOSTNAME) return;
  30528. } else if (
  30529. char == EOF || char == '/' || char == '?' || char == '#' ||
  30530. (char == '\\' && isSpecial(url))
  30531. ) {
  30532. if (isSpecial(url) && buffer == '') return INVALID_HOST;
  30533. if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
  30534. failure = parseHost(url, buffer);
  30535. if (failure) return failure;
  30536. buffer = '';
  30537. state = PATH_START;
  30538. if (stateOverride) return;
  30539. continue;
  30540. } else {
  30541. if (char == '[') seenBracket = true;
  30542. else if (char == ']') seenBracket = false;
  30543. buffer += char;
  30544. } break;
  30545. case PORT:
  30546. if (DIGIT.test(char)) {
  30547. buffer += char;
  30548. } else if (
  30549. char == EOF || char == '/' || char == '?' || char == '#' ||
  30550. (char == '\\' && isSpecial(url)) ||
  30551. stateOverride
  30552. ) {
  30553. if (buffer != '') {
  30554. var port = parseInt(buffer, 10);
  30555. if (port > 0xFFFF) return INVALID_PORT;
  30556. url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
  30557. buffer = '';
  30558. }
  30559. if (stateOverride) return;
  30560. state = PATH_START;
  30561. continue;
  30562. } else return INVALID_PORT;
  30563. break;
  30564. case FILE:
  30565. url.scheme = 'file';
  30566. if (char == '/' || char == '\\') state = FILE_SLASH;
  30567. else if (base && base.scheme == 'file') {
  30568. if (char == EOF) {
  30569. url.host = base.host;
  30570. url.path = base.path.slice();
  30571. url.query = base.query;
  30572. } else if (char == '?') {
  30573. url.host = base.host;
  30574. url.path = base.path.slice();
  30575. url.query = '';
  30576. state = QUERY;
  30577. } else if (char == '#') {
  30578. url.host = base.host;
  30579. url.path = base.path.slice();
  30580. url.query = base.query;
  30581. url.fragment = '';
  30582. state = FRAGMENT;
  30583. } else {
  30584. if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
  30585. url.host = base.host;
  30586. url.path = base.path.slice();
  30587. shortenURLsPath(url);
  30588. }
  30589. state = PATH;
  30590. continue;
  30591. }
  30592. } else {
  30593. state = PATH;
  30594. continue;
  30595. } break;
  30596. case FILE_SLASH:
  30597. if (char == '/' || char == '\\') {
  30598. state = FILE_HOST;
  30599. break;
  30600. }
  30601. if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
  30602. if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
  30603. else url.host = base.host;
  30604. }
  30605. state = PATH;
  30606. continue;
  30607. case FILE_HOST:
  30608. if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
  30609. if (!stateOverride && isWindowsDriveLetter(buffer)) {
  30610. state = PATH;
  30611. } else if (buffer == '') {
  30612. url.host = '';
  30613. if (stateOverride) return;
  30614. state = PATH_START;
  30615. } else {
  30616. failure = parseHost(url, buffer);
  30617. if (failure) return failure;
  30618. if (url.host == 'localhost') url.host = '';
  30619. if (stateOverride) return;
  30620. buffer = '';
  30621. state = PATH_START;
  30622. } continue;
  30623. } else buffer += char;
  30624. break;
  30625. case PATH_START:
  30626. if (isSpecial(url)) {
  30627. state = PATH;
  30628. if (char != '/' && char != '\\') continue;
  30629. } else if (!stateOverride && char == '?') {
  30630. url.query = '';
  30631. state = QUERY;
  30632. } else if (!stateOverride && char == '#') {
  30633. url.fragment = '';
  30634. state = FRAGMENT;
  30635. } else if (char != EOF) {
  30636. state = PATH;
  30637. if (char != '/') continue;
  30638. } break;
  30639. case PATH:
  30640. if (
  30641. char == EOF || char == '/' ||
  30642. (char == '\\' && isSpecial(url)) ||
  30643. (!stateOverride && (char == '?' || char == '#'))
  30644. ) {
  30645. if (isDoubleDot(buffer)) {
  30646. shortenURLsPath(url);
  30647. if (char != '/' && !(char == '\\' && isSpecial(url))) {
  30648. url.path.push('');
  30649. }
  30650. } else if (isSingleDot(buffer)) {
  30651. if (char != '/' && !(char == '\\' && isSpecial(url))) {
  30652. url.path.push('');
  30653. }
  30654. } else {
  30655. if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
  30656. if (url.host) url.host = '';
  30657. buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
  30658. }
  30659. url.path.push(buffer);
  30660. }
  30661. buffer = '';
  30662. if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
  30663. while (url.path.length > 1 && url.path[0] === '') {
  30664. url.path.shift();
  30665. }
  30666. }
  30667. if (char == '?') {
  30668. url.query = '';
  30669. state = QUERY;
  30670. } else if (char == '#') {
  30671. url.fragment = '';
  30672. state = FRAGMENT;
  30673. }
  30674. } else {
  30675. buffer += percentEncode(char, pathPercentEncodeSet);
  30676. } break;
  30677. case CANNOT_BE_A_BASE_URL_PATH:
  30678. if (char == '?') {
  30679. url.query = '';
  30680. state = QUERY;
  30681. } else if (char == '#') {
  30682. url.fragment = '';
  30683. state = FRAGMENT;
  30684. } else if (char != EOF) {
  30685. url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
  30686. } break;
  30687. case QUERY:
  30688. if (!stateOverride && char == '#') {
  30689. url.fragment = '';
  30690. state = FRAGMENT;
  30691. } else if (char != EOF) {
  30692. if (char == "'" && isSpecial(url)) url.query += '%27';
  30693. else if (char == '#') url.query += '%23';
  30694. else url.query += percentEncode(char, C0ControlPercentEncodeSet);
  30695. } break;
  30696. case FRAGMENT:
  30697. if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
  30698. break;
  30699. }
  30700. pointer++;
  30701. }
  30702. };
  30703. // `URL` constructor
  30704. // https://url.spec.whatwg.org/#url-class
  30705. var URLConstructor = function URL(url /* , base */) {
  30706. var that = anInstance(this, URLConstructor, 'URL');
  30707. var base = arguments.length > 1 ? arguments[1] : undefined;
  30708. var urlString = String(url);
  30709. var state = setInternalState(that, { type: 'URL' });
  30710. var baseState, failure;
  30711. if (base !== undefined) {
  30712. if (base instanceof URLConstructor) baseState = getInternalURLState(base);
  30713. else {
  30714. failure = parseURL(baseState = {}, String(base));
  30715. if (failure) throw TypeError(failure);
  30716. }
  30717. }
  30718. failure = parseURL(state, urlString, null, baseState);
  30719. if (failure) throw TypeError(failure);
  30720. var searchParams = state.searchParams = new URLSearchParams();
  30721. var searchParamsState = getInternalSearchParamsState(searchParams);
  30722. searchParamsState.updateSearchParams(state.query);
  30723. searchParamsState.updateURL = function () {
  30724. state.query = String(searchParams) || null;
  30725. };
  30726. if (!DESCRIPTORS) {
  30727. that.href = serializeURL.call(that);
  30728. that.origin = getOrigin.call(that);
  30729. that.protocol = getProtocol.call(that);
  30730. that.username = getUsername.call(that);
  30731. that.password = getPassword.call(that);
  30732. that.host = getHost.call(that);
  30733. that.hostname = getHostname.call(that);
  30734. that.port = getPort.call(that);
  30735. that.pathname = getPathname.call(that);
  30736. that.search = getSearch.call(that);
  30737. that.searchParams = getSearchParams.call(that);
  30738. that.hash = getHash.call(that);
  30739. }
  30740. };
  30741. var URLPrototype = URLConstructor.prototype;
  30742. var serializeURL = function () {
  30743. var url = getInternalURLState(this);
  30744. var scheme = url.scheme;
  30745. var username = url.username;
  30746. var password = url.password;
  30747. var host = url.host;
  30748. var port = url.port;
  30749. var path = url.path;
  30750. var query = url.query;
  30751. var fragment = url.fragment;
  30752. var output = scheme + ':';
  30753. if (host !== null) {
  30754. output += '//';
  30755. if (includesCredentials(url)) {
  30756. output += username + (password ? ':' + password : '') + '@';
  30757. }
  30758. output += serializeHost(host);
  30759. if (port !== null) output += ':' + port;
  30760. } else if (scheme == 'file') output += '//';
  30761. output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  30762. if (query !== null) output += '?' + query;
  30763. if (fragment !== null) output += '#' + fragment;
  30764. return output;
  30765. };
  30766. var getOrigin = function () {
  30767. var url = getInternalURLState(this);
  30768. var scheme = url.scheme;
  30769. var port = url.port;
  30770. if (scheme == 'blob') try {
  30771. return new URL(scheme.path[0]).origin;
  30772. } catch (error) {
  30773. return 'null';
  30774. }
  30775. if (scheme == 'file' || !isSpecial(url)) return 'null';
  30776. return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
  30777. };
  30778. var getProtocol = function () {
  30779. return getInternalURLState(this).scheme + ':';
  30780. };
  30781. var getUsername = function () {
  30782. return getInternalURLState(this).username;
  30783. };
  30784. var getPassword = function () {
  30785. return getInternalURLState(this).password;
  30786. };
  30787. var getHost = function () {
  30788. var url = getInternalURLState(this);
  30789. var host = url.host;
  30790. var port = url.port;
  30791. return host === null ? ''
  30792. : port === null ? serializeHost(host)
  30793. : serializeHost(host) + ':' + port;
  30794. };
  30795. var getHostname = function () {
  30796. var host = getInternalURLState(this).host;
  30797. return host === null ? '' : serializeHost(host);
  30798. };
  30799. var getPort = function () {
  30800. var port = getInternalURLState(this).port;
  30801. return port === null ? '' : String(port);
  30802. };
  30803. var getPathname = function () {
  30804. var url = getInternalURLState(this);
  30805. var path = url.path;
  30806. return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  30807. };
  30808. var getSearch = function () {
  30809. var query = getInternalURLState(this).query;
  30810. return query ? '?' + query : '';
  30811. };
  30812. var getSearchParams = function () {
  30813. return getInternalURLState(this).searchParams;
  30814. };
  30815. var getHash = function () {
  30816. var fragment = getInternalURLState(this).fragment;
  30817. return fragment ? '#' + fragment : '';
  30818. };
  30819. var accessorDescriptor = function (getter, setter) {
  30820. return { get: getter, set: setter, configurable: true, enumerable: true };
  30821. };
  30822. if (DESCRIPTORS) {
  30823. defineProperties(URLPrototype, {
  30824. // `URL.prototype.href` accessors pair
  30825. // https://url.spec.whatwg.org/#dom-url-href
  30826. href: accessorDescriptor(serializeURL, function (href) {
  30827. var url = getInternalURLState(this);
  30828. var urlString = String(href);
  30829. var failure = parseURL(url, urlString);
  30830. if (failure) throw TypeError(failure);
  30831. getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
  30832. }),
  30833. // `URL.prototype.origin` getter
  30834. // https://url.spec.whatwg.org/#dom-url-origin
  30835. origin: accessorDescriptor(getOrigin),
  30836. // `URL.prototype.protocol` accessors pair
  30837. // https://url.spec.whatwg.org/#dom-url-protocol
  30838. protocol: accessorDescriptor(getProtocol, function (protocol) {
  30839. var url = getInternalURLState(this);
  30840. parseURL(url, String(protocol) + ':', SCHEME_START);
  30841. }),
  30842. // `URL.prototype.username` accessors pair
  30843. // https://url.spec.whatwg.org/#dom-url-username
  30844. username: accessorDescriptor(getUsername, function (username) {
  30845. var url = getInternalURLState(this);
  30846. var codePoints = arrayFrom(String(username));
  30847. if (cannotHaveUsernamePasswordPort(url)) return;
  30848. url.username = '';
  30849. for (var i = 0; i < codePoints.length; i++) {
  30850. url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  30851. }
  30852. }),
  30853. // `URL.prototype.password` accessors pair
  30854. // https://url.spec.whatwg.org/#dom-url-password
  30855. password: accessorDescriptor(getPassword, function (password) {
  30856. var url = getInternalURLState(this);
  30857. var codePoints = arrayFrom(String(password));
  30858. if (cannotHaveUsernamePasswordPort(url)) return;
  30859. url.password = '';
  30860. for (var i = 0; i < codePoints.length; i++) {
  30861. url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  30862. }
  30863. }),
  30864. // `URL.prototype.host` accessors pair
  30865. // https://url.spec.whatwg.org/#dom-url-host
  30866. host: accessorDescriptor(getHost, function (host) {
  30867. var url = getInternalURLState(this);
  30868. if (url.cannotBeABaseURL) return;
  30869. parseURL(url, String(host), HOST);
  30870. }),
  30871. // `URL.prototype.hostname` accessors pair
  30872. // https://url.spec.whatwg.org/#dom-url-hostname
  30873. hostname: accessorDescriptor(getHostname, function (hostname) {
  30874. var url = getInternalURLState(this);
  30875. if (url.cannotBeABaseURL) return;
  30876. parseURL(url, String(hostname), HOSTNAME);
  30877. }),
  30878. // `URL.prototype.port` accessors pair
  30879. // https://url.spec.whatwg.org/#dom-url-port
  30880. port: accessorDescriptor(getPort, function (port) {
  30881. var url = getInternalURLState(this);
  30882. if (cannotHaveUsernamePasswordPort(url)) return;
  30883. port = String(port);
  30884. if (port == '') url.port = null;
  30885. else parseURL(url, port, PORT);
  30886. }),
  30887. // `URL.prototype.pathname` accessors pair
  30888. // https://url.spec.whatwg.org/#dom-url-pathname
  30889. pathname: accessorDescriptor(getPathname, function (pathname) {
  30890. var url = getInternalURLState(this);
  30891. if (url.cannotBeABaseURL) return;
  30892. url.path = [];
  30893. parseURL(url, pathname + '', PATH_START);
  30894. }),
  30895. // `URL.prototype.search` accessors pair
  30896. // https://url.spec.whatwg.org/#dom-url-search
  30897. search: accessorDescriptor(getSearch, function (search) {
  30898. var url = getInternalURLState(this);
  30899. search = String(search);
  30900. if (search == '') {
  30901. url.query = null;
  30902. } else {
  30903. if ('?' == search.charAt(0)) search = search.slice(1);
  30904. url.query = '';
  30905. parseURL(url, search, QUERY);
  30906. }
  30907. getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
  30908. }),
  30909. // `URL.prototype.searchParams` getter
  30910. // https://url.spec.whatwg.org/#dom-url-searchparams
  30911. searchParams: accessorDescriptor(getSearchParams),
  30912. // `URL.prototype.hash` accessors pair
  30913. // https://url.spec.whatwg.org/#dom-url-hash
  30914. hash: accessorDescriptor(getHash, function (hash) {
  30915. var url = getInternalURLState(this);
  30916. hash = String(hash);
  30917. if (hash == '') {
  30918. url.fragment = null;
  30919. return;
  30920. }
  30921. if ('#' == hash.charAt(0)) hash = hash.slice(1);
  30922. url.fragment = '';
  30923. parseURL(url, hash, FRAGMENT);
  30924. })
  30925. });
  30926. }
  30927. // `URL.prototype.toJSON` method
  30928. // https://url.spec.whatwg.org/#dom-url-tojson
  30929. redefine(URLPrototype, 'toJSON', function toJSON() {
  30930. return serializeURL.call(this);
  30931. }, { enumerable: true });
  30932. // `URL.prototype.toString` method
  30933. // https://url.spec.whatwg.org/#URL-stringification-behavior
  30934. redefine(URLPrototype, 'toString', function toString() {
  30935. return serializeURL.call(this);
  30936. }, { enumerable: true });
  30937. if (NativeURL) {
  30938. var nativeCreateObjectURL = NativeURL.createObjectURL;
  30939. var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  30940. // `URL.createObjectURL` method
  30941. // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  30942. // eslint-disable-next-line no-unused-vars -- required for `.length`
  30943. if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
  30944. return nativeCreateObjectURL.apply(NativeURL, arguments);
  30945. });
  30946. // `URL.revokeObjectURL` method
  30947. // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  30948. // eslint-disable-next-line no-unused-vars -- required for `.length`
  30949. if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
  30950. return nativeRevokeObjectURL.apply(NativeURL, arguments);
  30951. });
  30952. }
  30953. setToStringTag(URLConstructor, 'URL');
  30954. $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  30955. URL: URLConstructor
  30956. });
  30957. /***/ })
  30958. /******/ });
  30959. /************************************************************************/
  30960. /******/ // The module cache
  30961. /******/ var __webpack_module_cache__ = {};
  30962. /******/
  30963. /******/ // The require function
  30964. /******/ function __nested_webpack_require_210484__(moduleId) {
  30965. /******/ // Check if module is in cache
  30966. /******/ if(__webpack_module_cache__[moduleId]) {
  30967. /******/ return __webpack_module_cache__[moduleId].exports;
  30968. /******/ }
  30969. /******/ // Create a new module (and put it into the cache)
  30970. /******/ var module = __webpack_module_cache__[moduleId] = {
  30971. /******/ // no module.id needed
  30972. /******/ // no module.loaded needed
  30973. /******/ exports: {}
  30974. /******/ };
  30975. /******/
  30976. /******/ // Execute the module function
  30977. /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_210484__);
  30978. /******/
  30979. /******/ // Return the exports of the module
  30980. /******/ return module.exports;
  30981. /******/ }
  30982. /******/
  30983. /************************************************************************/
  30984. /******/ /* webpack/runtime/define property getters */
  30985. /******/ !function() {
  30986. /******/ // define getter functions for harmony exports
  30987. /******/ __nested_webpack_require_210484__.d = function(exports, definition) {
  30988. /******/ for(var key in definition) {
  30989. /******/ if(__nested_webpack_require_210484__.o(definition, key) && !__nested_webpack_require_210484__.o(exports, key)) {
  30990. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  30991. /******/ }
  30992. /******/ }
  30993. /******/ };
  30994. /******/ }();
  30995. /******/
  30996. /******/ /* webpack/runtime/global */
  30997. /******/ !function() {
  30998. /******/ __nested_webpack_require_210484__.g = (function() {
  30999. /******/ if (typeof globalThis === 'object') return globalThis;
  31000. /******/ try {
  31001. /******/ return this || new Function('return this')();
  31002. /******/ } catch (e) {
  31003. /******/ if (typeof window === 'object') return window;
  31004. /******/ }
  31005. /******/ })();
  31006. /******/ }();
  31007. /******/
  31008. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  31009. /******/ !function() {
  31010. /******/ __nested_webpack_require_210484__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  31011. /******/ }();
  31012. /******/
  31013. /******/ /* webpack/runtime/make namespace object */
  31014. /******/ !function() {
  31015. /******/ // define __esModule on exports
  31016. /******/ __nested_webpack_require_210484__.r = function(exports) {
  31017. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  31018. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  31019. /******/ }
  31020. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  31021. /******/ };
  31022. /******/ }();
  31023. /******/
  31024. /************************************************************************/
  31025. var __webpack_exports__ = {};
  31026. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  31027. !function() {
  31028. "use strict";
  31029. // ESM COMPAT FLAG
  31030. __nested_webpack_require_210484__.r(__webpack_exports__);
  31031. // EXPORTS
  31032. __nested_webpack_require_210484__.d(__webpack_exports__, {
  31033. "Dropzone": function() { return /* reexport */ Dropzone; },
  31034. "default": function() { return /* binding */ dropzone_dist; }
  31035. });
  31036. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
  31037. var es_array_concat = __nested_webpack_require_210484__(2222);
  31038. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
  31039. var es_array_filter = __nested_webpack_require_210484__(7327);
  31040. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
  31041. var es_array_index_of = __nested_webpack_require_210484__(2772);
  31042. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
  31043. var es_array_iterator = __nested_webpack_require_210484__(6992);
  31044. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
  31045. var es_array_map = __nested_webpack_require_210484__(1249);
  31046. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
  31047. var es_array_slice = __nested_webpack_require_210484__(7042);
  31048. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
  31049. var es_array_splice = __nested_webpack_require_210484__(561);
  31050. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js
  31051. var es_array_buffer_constructor = __nested_webpack_require_210484__(8264);
  31052. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
  31053. var es_function_name = __nested_webpack_require_210484__(8309);
  31054. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
  31055. var es_object_get_prototype_of = __nested_webpack_require_210484__(489);
  31056. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
  31057. var es_object_to_string = __nested_webpack_require_210484__(1539);
  31058. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
  31059. var es_regexp_exec = __nested_webpack_require_210484__(4916);
  31060. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
  31061. var es_regexp_to_string = __nested_webpack_require_210484__(9714);
  31062. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
  31063. var es_string_iterator = __nested_webpack_require_210484__(8783);
  31064. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
  31065. var es_string_match = __nested_webpack_require_210484__(4723);
  31066. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
  31067. var es_string_replace = __nested_webpack_require_210484__(5306);
  31068. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
  31069. var es_string_split = __nested_webpack_require_210484__(3123);
  31070. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
  31071. var es_string_trim = __nested_webpack_require_210484__(3210);
  31072. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
  31073. var es_typed_array_uint8_array = __nested_webpack_require_210484__(2472);
  31074. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
  31075. var es_typed_array_copy_within = __nested_webpack_require_210484__(2990);
  31076. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
  31077. var es_typed_array_every = __nested_webpack_require_210484__(8927);
  31078. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
  31079. var es_typed_array_fill = __nested_webpack_require_210484__(3105);
  31080. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
  31081. var es_typed_array_filter = __nested_webpack_require_210484__(5035);
  31082. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
  31083. var es_typed_array_find = __nested_webpack_require_210484__(4345);
  31084. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
  31085. var es_typed_array_find_index = __nested_webpack_require_210484__(7174);
  31086. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
  31087. var es_typed_array_for_each = __nested_webpack_require_210484__(2846);
  31088. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
  31089. var es_typed_array_includes = __nested_webpack_require_210484__(4731);
  31090. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
  31091. var es_typed_array_index_of = __nested_webpack_require_210484__(7209);
  31092. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
  31093. var es_typed_array_iterator = __nested_webpack_require_210484__(6319);
  31094. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
  31095. var es_typed_array_join = __nested_webpack_require_210484__(8867);
  31096. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
  31097. var es_typed_array_last_index_of = __nested_webpack_require_210484__(7789);
  31098. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
  31099. var es_typed_array_map = __nested_webpack_require_210484__(3739);
  31100. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
  31101. var es_typed_array_reduce = __nested_webpack_require_210484__(9368);
  31102. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
  31103. var es_typed_array_reduce_right = __nested_webpack_require_210484__(4483);
  31104. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
  31105. var es_typed_array_reverse = __nested_webpack_require_210484__(2056);
  31106. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
  31107. var es_typed_array_set = __nested_webpack_require_210484__(3462);
  31108. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
  31109. var es_typed_array_slice = __nested_webpack_require_210484__(678);
  31110. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
  31111. var es_typed_array_some = __nested_webpack_require_210484__(7462);
  31112. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
  31113. var es_typed_array_sort = __nested_webpack_require_210484__(3824);
  31114. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
  31115. var es_typed_array_subarray = __nested_webpack_require_210484__(5021);
  31116. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
  31117. var es_typed_array_to_locale_string = __nested_webpack_require_210484__(2974);
  31118. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
  31119. var es_typed_array_to_string = __nested_webpack_require_210484__(5016);
  31120. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
  31121. var web_dom_collections_for_each = __nested_webpack_require_210484__(4747);
  31122. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
  31123. var web_dom_collections_iterator = __nested_webpack_require_210484__(3948);
  31124. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
  31125. var web_url = __nested_webpack_require_210484__(285);
  31126. ;// CONCATENATED MODULE: ./src/emitter.js
  31127. function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  31128. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  31129. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  31130. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  31131. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  31132. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  31133. // The Emitter class provides the ability to call `.on()` on Dropzone to listen
  31134. // to events.
  31135. // It is strongly based on component's emitter class, and I removed the
  31136. // functionality because of the dependency hell with different frameworks.
  31137. var Emitter = /*#__PURE__*/function () {
  31138. function Emitter() {
  31139. _classCallCheck(this, Emitter);
  31140. }
  31141. _createClass(Emitter, [{
  31142. key: "on",
  31143. value: // Add an event listener for given event
  31144. function on(event, fn) {
  31145. this._callbacks = this._callbacks || {}; // Create namespace for this event
  31146. if (!this._callbacks[event]) {
  31147. this._callbacks[event] = [];
  31148. }
  31149. this._callbacks[event].push(fn);
  31150. return this;
  31151. }
  31152. }, {
  31153. key: "emit",
  31154. value: function emit(event) {
  31155. this._callbacks = this._callbacks || {};
  31156. var callbacks = this._callbacks[event];
  31157. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  31158. args[_key - 1] = arguments[_key];
  31159. }
  31160. if (callbacks) {
  31161. var _iterator = _createForOfIteratorHelper(callbacks, true),
  31162. _step;
  31163. try {
  31164. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  31165. var callback = _step.value;
  31166. callback.apply(this, args);
  31167. }
  31168. } catch (err) {
  31169. _iterator.e(err);
  31170. } finally {
  31171. _iterator.f();
  31172. }
  31173. } // trigger a corresponding DOM event
  31174. if (this.element) {
  31175. this.element.dispatchEvent(this.makeEvent("dropzone:" + event, {
  31176. args: args
  31177. }));
  31178. }
  31179. return this;
  31180. }
  31181. }, {
  31182. key: "makeEvent",
  31183. value: function makeEvent(eventName, detail) {
  31184. var params = {
  31185. bubbles: true,
  31186. cancelable: true,
  31187. detail: detail
  31188. };
  31189. if (typeof window.CustomEvent === "function") {
  31190. return new CustomEvent(eventName, params);
  31191. } else {
  31192. // IE 11 support
  31193. // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
  31194. var evt = document.createEvent("CustomEvent");
  31195. evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
  31196. return evt;
  31197. }
  31198. } // Remove event listener for given event. If fn is not provided, all event
  31199. // listeners for that event will be removed. If neither is provided, all
  31200. // event listeners will be removed.
  31201. }, {
  31202. key: "off",
  31203. value: function off(event, fn) {
  31204. if (!this._callbacks || arguments.length === 0) {
  31205. this._callbacks = {};
  31206. return this;
  31207. } // specific event
  31208. var callbacks = this._callbacks[event];
  31209. if (!callbacks) {
  31210. return this;
  31211. } // remove all handlers
  31212. if (arguments.length === 1) {
  31213. delete this._callbacks[event];
  31214. return this;
  31215. } // remove specific handler
  31216. for (var i = 0; i < callbacks.length; i++) {
  31217. var callback = callbacks[i];
  31218. if (callback === fn) {
  31219. callbacks.splice(i, 1);
  31220. break;
  31221. }
  31222. }
  31223. return this;
  31224. }
  31225. }]);
  31226. return Emitter;
  31227. }();
  31228. ;// CONCATENATED MODULE: ./src/preview-template.html
  31229. // Module
  31230. var code = "<div class=\"dz-preview dz-file-preview\"> <div class=\"dz-image\"><img data-dz-thumbnail/></div> <div class=\"dz-details\"> <div class=\"dz-size\"><span data-dz-size></span></div> <div class=\"dz-filename\"><span data-dz-name></span></div> </div> <div class=\"dz-progress\"> <span class=\"dz-upload\" data-dz-uploadprogress></span> </div> <div class=\"dz-error-message\"><span data-dz-errormessage></span></div> <div class=\"dz-success-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Check</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\"></path> </g> </svg> </div> <div class=\"dz-error-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Error</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\"> <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\"></path> </g> </g> </svg> </div> </div> ";
  31231. // Exports
  31232. /* harmony default export */ var preview_template = (code);
  31233. ;// CONCATENATED MODULE: ./src/options.js
  31234. function options_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = options_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  31235. function options_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return options_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return options_arrayLikeToArray(o, minLen); }
  31236. function options_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  31237. var defaultOptions = {
  31238. /**
  31239. * Has to be specified on elements other than form (or when the form
  31240. * doesn't have an `action` attribute). You can also
  31241. * provide a function that will be called with `files` and
  31242. * must return the url (since `v3.12.0`)
  31243. */
  31244. url: null,
  31245. /**
  31246. * Can be changed to `"put"` if necessary. You can also provide a function
  31247. * that will be called with `files` and must return the method (since `v3.12.0`).
  31248. */
  31249. method: "post",
  31250. /**
  31251. * Will be set on the XHRequest.
  31252. */
  31253. withCredentials: false,
  31254. /**
  31255. * The timeout for the XHR requests in milliseconds (since `v4.4.0`).
  31256. * If set to null or 0, no timeout is going to be set.
  31257. */
  31258. timeout: null,
  31259. /**
  31260. * How many file uploads to process in parallel (See the
  31261. * Enqueuing file uploads documentation section for more info)
  31262. */
  31263. parallelUploads: 2,
  31264. /**
  31265. * Whether to send multiple files in one request. If
  31266. * this it set to true, then the fallback file input element will
  31267. * have the `multiple` attribute as well. This option will
  31268. * also trigger additional events (like `processingmultiple`). See the events
  31269. * documentation section for more information.
  31270. */
  31271. uploadMultiple: false,
  31272. /**
  31273. * Whether you want files to be uploaded in chunks to your server. This can't be
  31274. * used in combination with `uploadMultiple`.
  31275. *
  31276. * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.
  31277. */
  31278. chunking: false,
  31279. /**
  31280. * If `chunking` is enabled, this defines whether **every** file should be chunked,
  31281. * even if the file size is below chunkSize. This means, that the additional chunk
  31282. * form data will be submitted and the `chunksUploaded` callback will be invoked.
  31283. */
  31284. forceChunking: false,
  31285. /**
  31286. * If `chunking` is `true`, then this defines the chunk size in bytes.
  31287. */
  31288. chunkSize: 2000000,
  31289. /**
  31290. * If `true`, the individual chunks of a file are being uploaded simultaneously.
  31291. */
  31292. parallelChunkUploads: false,
  31293. /**
  31294. * Whether a chunk should be retried if it fails.
  31295. */
  31296. retryChunks: false,
  31297. /**
  31298. * If `retryChunks` is true, how many times should it be retried.
  31299. */
  31300. retryChunksLimit: 3,
  31301. /**
  31302. * The maximum filesize (in bytes) that is allowed to be uploaded.
  31303. */
  31304. maxFilesize: 256,
  31305. /**
  31306. * The name of the file param that gets transferred.
  31307. * **NOTE**: If you have the option `uploadMultiple` set to `true`, then
  31308. * Dropzone will append `[]` to the name.
  31309. */
  31310. paramName: "file",
  31311. /**
  31312. * Whether thumbnails for images should be generated
  31313. */
  31314. createImageThumbnails: true,
  31315. /**
  31316. * In MB. When the filename exceeds this limit, the thumbnail will not be generated.
  31317. */
  31318. maxThumbnailFilesize: 10,
  31319. /**
  31320. * If `null`, the ratio of the image will be used to calculate it.
  31321. */
  31322. thumbnailWidth: 120,
  31323. /**
  31324. * The same as `thumbnailWidth`. If both are null, images will not be resized.
  31325. */
  31326. thumbnailHeight: 120,
  31327. /**
  31328. * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.
  31329. * Can be either `contain` or `crop`.
  31330. */
  31331. thumbnailMethod: "crop",
  31332. /**
  31333. * If set, images will be resized to these dimensions before being **uploaded**.
  31334. * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect
  31335. * ratio of the file will be preserved.
  31336. *
  31337. * The `options.transformFile` function uses these options, so if the `transformFile` function
  31338. * is overridden, these options don't do anything.
  31339. */
  31340. resizeWidth: null,
  31341. /**
  31342. * See `resizeWidth`.
  31343. */
  31344. resizeHeight: null,
  31345. /**
  31346. * The mime type of the resized image (before it gets uploaded to the server).
  31347. * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.
  31348. * See `resizeWidth` for more information.
  31349. */
  31350. resizeMimeType: null,
  31351. /**
  31352. * The quality of the resized images. See `resizeWidth`.
  31353. */
  31354. resizeQuality: 0.8,
  31355. /**
  31356. * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.
  31357. * Can be either `contain` or `crop`.
  31358. */
  31359. resizeMethod: "contain",
  31360. /**
  31361. * The base that is used to calculate the **displayed** filesize. You can
  31362. * change this to 1024 if you would rather display kibibytes, mebibytes,
  31363. * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`
  31364. * not `1 kilobyte`. You can change this to `1024` if you don't care about
  31365. * validity.
  31366. */
  31367. filesizeBase: 1000,
  31368. /**
  31369. * If not `null` defines how many files this Dropzone handles. If it exceeds,
  31370. * the event `maxfilesexceeded` will be called. The dropzone element gets the
  31371. * class `dz-max-files-reached` accordingly so you can provide visual
  31372. * feedback.
  31373. */
  31374. maxFiles: null,
  31375. /**
  31376. * An optional object to send additional headers to the server. Eg:
  31377. * `{ "My-Awesome-Header": "header value" }`
  31378. */
  31379. headers: null,
  31380. /**
  31381. * If `true`, the dropzone element itself will be clickable, if `false`
  31382. * nothing will be clickable.
  31383. *
  31384. * You can also pass an HTML element, a CSS selector (for multiple elements)
  31385. * or an array of those. In that case, all of those elements will trigger an
  31386. * upload when clicked.
  31387. */
  31388. clickable: true,
  31389. /**
  31390. * Whether hidden files in directories should be ignored.
  31391. */
  31392. ignoreHiddenFiles: true,
  31393. /**
  31394. * The default implementation of `accept` checks the file's mime type or
  31395. * extension against this list. This is a comma separated list of mime
  31396. * types or file extensions.
  31397. *
  31398. * Eg.: `image/*,application/pdf,.psd`
  31399. *
  31400. * If the Dropzone is `clickable` this option will also be used as
  31401. * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)
  31402. * parameter on the hidden file input as well.
  31403. */
  31404. acceptedFiles: null,
  31405. /**
  31406. * **Deprecated!**
  31407. * Use acceptedFiles instead.
  31408. */
  31409. acceptedMimeTypes: null,
  31410. /**
  31411. * If false, files will be added to the queue but the queue will not be
  31412. * processed automatically.
  31413. * This can be useful if you need some additional user input before sending
  31414. * files (or if you want want all files sent at once).
  31415. * If you're ready to send the file simply call `myDropzone.processQueue()`.
  31416. *
  31417. * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation
  31418. * section for more information.
  31419. */
  31420. autoProcessQueue: true,
  31421. /**
  31422. * If false, files added to the dropzone will not be queued by default.
  31423. * You'll have to call `enqueueFile(file)` manually.
  31424. */
  31425. autoQueue: true,
  31426. /**
  31427. * If `true`, this will add a link to every file preview to remove or cancel (if
  31428. * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`
  31429. * and `dictRemoveFile` options are used for the wording.
  31430. */
  31431. addRemoveLinks: false,
  31432. /**
  31433. * Defines where to display the file previews – if `null` the
  31434. * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS
  31435. * selector. The element should have the `dropzone-previews` class so
  31436. * the previews are displayed properly.
  31437. */
  31438. previewsContainer: null,
  31439. /**
  31440. * Set this to `true` if you don't want previews to be shown.
  31441. */
  31442. disablePreviews: false,
  31443. /**
  31444. * This is the element the hidden input field (which is used when clicking on the
  31445. * dropzone to trigger file selection) will be appended to. This might
  31446. * be important in case you use frameworks to switch the content of your page.
  31447. *
  31448. * Can be a selector string, or an element directly.
  31449. */
  31450. hiddenInputContainer: "body",
  31451. /**
  31452. * If null, no capture type will be specified
  31453. * If camera, mobile devices will skip the file selection and choose camera
  31454. * If microphone, mobile devices will skip the file selection and choose the microphone
  31455. * If camcorder, mobile devices will skip the file selection and choose the camera in video mode
  31456. * On apple devices multiple must be set to false. AcceptedFiles may need to
  31457. * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*").
  31458. */
  31459. capture: null,
  31460. /**
  31461. * **Deprecated**. Use `renameFile` instead.
  31462. */
  31463. renameFilename: null,
  31464. /**
  31465. * A function that is invoked before the file is uploaded to the server and renames the file.
  31466. * This function gets the `File` as argument and can use the `file.name`. The actual name of the
  31467. * file that gets used during the upload can be accessed through `file.upload.filename`.
  31468. */
  31469. renameFile: null,
  31470. /**
  31471. * If `true` the fallback will be forced. This is very useful to test your server
  31472. * implementations first and make sure that everything works as
  31473. * expected without dropzone if you experience problems, and to test
  31474. * how your fallbacks will look.
  31475. */
  31476. forceFallback: false,
  31477. /**
  31478. * The text used before any files are dropped.
  31479. */
  31480. dictDefaultMessage: "Drop files here to upload",
  31481. /**
  31482. * The text that replaces the default message text it the browser is not supported.
  31483. */
  31484. dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
  31485. /**
  31486. * The text that will be added before the fallback form.
  31487. * If you provide a fallback element yourself, or if this option is `null` this will
  31488. * be ignored.
  31489. */
  31490. dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
  31491. /**
  31492. * If the filesize is too big.
  31493. * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.
  31494. */
  31495. dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
  31496. /**
  31497. * If the file doesn't match the file type.
  31498. */
  31499. dictInvalidFileType: "You can't upload files of this type.",
  31500. /**
  31501. * If the server response was invalid.
  31502. * `{{statusCode}}` will be replaced with the servers status code.
  31503. */
  31504. dictResponseError: "Server responded with {{statusCode}} code.",
  31505. /**
  31506. * If `addRemoveLinks` is true, the text to be used for the cancel upload link.
  31507. */
  31508. dictCancelUpload: "Cancel upload",
  31509. /**
  31510. * The text that is displayed if an upload was manually canceled
  31511. */
  31512. dictUploadCanceled: "Upload canceled.",
  31513. /**
  31514. * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.
  31515. */
  31516. dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
  31517. /**
  31518. * If `addRemoveLinks` is true, the text to be used to remove a file.
  31519. */
  31520. dictRemoveFile: "Remove file",
  31521. /**
  31522. * If this is not null, then the user will be prompted before removing a file.
  31523. */
  31524. dictRemoveFileConfirmation: null,
  31525. /**
  31526. * Displayed if `maxFiles` is st and exceeded.
  31527. * The string `{{maxFiles}}` will be replaced by the configuration value.
  31528. */
  31529. dictMaxFilesExceeded: "You can not upload any more files.",
  31530. /**
  31531. * Allows you to translate the different units. Starting with `tb` for terabytes and going down to
  31532. * `b` for bytes.
  31533. */
  31534. dictFileSizeUnits: {
  31535. tb: "TB",
  31536. gb: "GB",
  31537. mb: "MB",
  31538. kb: "KB",
  31539. b: "b"
  31540. },
  31541. /**
  31542. * Called when dropzone initialized
  31543. * You can add event listeners here
  31544. */
  31545. init: function init() {},
  31546. /**
  31547. * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`
  31548. * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case
  31549. * of a function, this needs to return a map.
  31550. *
  31551. * The default implementation does nothing for normal uploads, but adds relevant information for
  31552. * chunked uploads.
  31553. *
  31554. * This is the same as adding hidden input fields in the form element.
  31555. */
  31556. params: function params(files, xhr, chunk) {
  31557. if (chunk) {
  31558. return {
  31559. dzuuid: chunk.file.upload.uuid,
  31560. dzchunkindex: chunk.index,
  31561. dztotalfilesize: chunk.file.size,
  31562. dzchunksize: this.options.chunkSize,
  31563. dztotalchunkcount: chunk.file.upload.totalChunkCount,
  31564. dzchunkbyteoffset: chunk.index * this.options.chunkSize
  31565. };
  31566. }
  31567. },
  31568. /**
  31569. * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)
  31570. * and a `done` function as parameters.
  31571. *
  31572. * If the done function is invoked without arguments, the file is "accepted" and will
  31573. * be processed. If you pass an error message, the file is rejected, and the error
  31574. * message will be displayed.
  31575. * This function will not be called if the file is too big or doesn't match the mime types.
  31576. */
  31577. accept: function accept(file, done) {
  31578. return done();
  31579. },
  31580. /**
  31581. * The callback that will be invoked when all chunks have been uploaded for a file.
  31582. * It gets the file for which the chunks have been uploaded as the first parameter,
  31583. * and the `done` function as second. `done()` needs to be invoked when everything
  31584. * needed to finish the upload process is done.
  31585. */
  31586. chunksUploaded: function chunksUploaded(file, done) {
  31587. done();
  31588. },
  31589. /**
  31590. * Gets called when the browser is not supported.
  31591. * The default implementation shows the fallback input field and adds
  31592. * a text.
  31593. */
  31594. fallback: function fallback() {
  31595. // This code should pass in IE7... :(
  31596. var messageElement;
  31597. this.element.className = "".concat(this.element.className, " dz-browser-not-supported");
  31598. var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName("div"), true),
  31599. _step;
  31600. try {
  31601. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  31602. var child = _step.value;
  31603. if (/(^| )dz-message($| )/.test(child.className)) {
  31604. messageElement = child;
  31605. child.className = "dz-message"; // Removes the 'dz-default' class
  31606. break;
  31607. }
  31608. }
  31609. } catch (err) {
  31610. _iterator.e(err);
  31611. } finally {
  31612. _iterator.f();
  31613. }
  31614. if (!messageElement) {
  31615. messageElement = Dropzone.createElement('<div class="dz-message"><span></span></div>');
  31616. this.element.appendChild(messageElement);
  31617. }
  31618. var span = messageElement.getElementsByTagName("span")[0];
  31619. if (span) {
  31620. if (span.textContent != null) {
  31621. span.textContent = this.options.dictFallbackMessage;
  31622. } else if (span.innerText != null) {
  31623. span.innerText = this.options.dictFallbackMessage;
  31624. }
  31625. }
  31626. return this.element.appendChild(this.getFallbackForm());
  31627. },
  31628. /**
  31629. * Gets called to calculate the thumbnail dimensions.
  31630. *
  31631. * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:
  31632. *
  31633. * - `srcWidth` & `srcHeight` (required)
  31634. * - `trgWidth` & `trgHeight` (required)
  31635. * - `srcX` & `srcY` (optional, default `0`)
  31636. * - `trgX` & `trgY` (optional, default `0`)
  31637. *
  31638. * Those values are going to be used by `ctx.drawImage()`.
  31639. */
  31640. resize: function resize(file, width, height, resizeMethod) {
  31641. var info = {
  31642. srcX: 0,
  31643. srcY: 0,
  31644. srcWidth: file.width,
  31645. srcHeight: file.height
  31646. };
  31647. var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified
  31648. if (width == null && height == null) {
  31649. width = info.srcWidth;
  31650. height = info.srcHeight;
  31651. } else if (width == null) {
  31652. width = height * srcRatio;
  31653. } else if (height == null) {
  31654. height = width / srcRatio;
  31655. } // Make sure images aren't upscaled
  31656. width = Math.min(width, info.srcWidth);
  31657. height = Math.min(height, info.srcHeight);
  31658. var trgRatio = width / height;
  31659. if (info.srcWidth > width || info.srcHeight > height) {
  31660. // Image is bigger and needs rescaling
  31661. if (resizeMethod === "crop") {
  31662. if (srcRatio > trgRatio) {
  31663. info.srcHeight = file.height;
  31664. info.srcWidth = info.srcHeight * trgRatio;
  31665. } else {
  31666. info.srcWidth = file.width;
  31667. info.srcHeight = info.srcWidth / trgRatio;
  31668. }
  31669. } else if (resizeMethod === "contain") {
  31670. // Method 'contain'
  31671. if (srcRatio > trgRatio) {
  31672. height = width / srcRatio;
  31673. } else {
  31674. width = height * srcRatio;
  31675. }
  31676. } else {
  31677. throw new Error("Unknown resizeMethod '".concat(resizeMethod, "'"));
  31678. }
  31679. }
  31680. info.srcX = (file.width - info.srcWidth) / 2;
  31681. info.srcY = (file.height - info.srcHeight) / 2;
  31682. info.trgWidth = width;
  31683. info.trgHeight = height;
  31684. return info;
  31685. },
  31686. /**
  31687. * Can be used to transform the file (for example, resize an image if necessary).
  31688. *
  31689. * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes
  31690. * images according to those dimensions.
  31691. *
  31692. * Gets the `file` as the first parameter, and a `done()` function as the second, that needs
  31693. * to be invoked with the file when the transformation is done.
  31694. */
  31695. transformFile: function transformFile(file, done) {
  31696. if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {
  31697. return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);
  31698. } else {
  31699. return done(file);
  31700. }
  31701. },
  31702. /**
  31703. * A string that contains the template used for each dropped
  31704. * file. Change it to fulfill your needs but make sure to properly
  31705. * provide all elements.
  31706. *
  31707. * If you want to use an actual HTML element instead of providing a String
  31708. * as a config option, you could create a div with the id `tpl`,
  31709. * put the template inside it and provide the element like this:
  31710. *
  31711. * document
  31712. * .querySelector('#tpl')
  31713. * .innerHTML
  31714. *
  31715. */
  31716. previewTemplate: preview_template,
  31717. /*
  31718. Those functions register themselves to the events on init and handle all
  31719. the user interface specific stuff. Overwriting them won't break the upload
  31720. but can break the way it's displayed.
  31721. You can overwrite them if you don't like the default behavior. If you just
  31722. want to add an additional event handler, register it on the dropzone object
  31723. and don't overwrite those options.
  31724. */
  31725. // Those are self explanatory and simply concern the DragnDrop.
  31726. drop: function drop(e) {
  31727. return this.element.classList.remove("dz-drag-hover");
  31728. },
  31729. dragstart: function dragstart(e) {},
  31730. dragend: function dragend(e) {
  31731. return this.element.classList.remove("dz-drag-hover");
  31732. },
  31733. dragenter: function dragenter(e) {
  31734. return this.element.classList.add("dz-drag-hover");
  31735. },
  31736. dragover: function dragover(e) {
  31737. return this.element.classList.add("dz-drag-hover");
  31738. },
  31739. dragleave: function dragleave(e) {
  31740. return this.element.classList.remove("dz-drag-hover");
  31741. },
  31742. paste: function paste(e) {},
  31743. // Called whenever there are no files left in the dropzone anymore, and the
  31744. // dropzone should be displayed as if in the initial state.
  31745. reset: function reset() {
  31746. return this.element.classList.remove("dz-started");
  31747. },
  31748. // Called when a file is added to the queue
  31749. // Receives `file`
  31750. addedfile: function addedfile(file) {
  31751. var _this = this;
  31752. if (this.element === this.previewsContainer) {
  31753. this.element.classList.add("dz-started");
  31754. }
  31755. if (this.previewsContainer && !this.options.disablePreviews) {
  31756. file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
  31757. file.previewTemplate = file.previewElement; // Backwards compatibility
  31758. this.previewsContainer.appendChild(file.previewElement);
  31759. var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-name]"), true),
  31760. _step2;
  31761. try {
  31762. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  31763. var node = _step2.value;
  31764. node.textContent = file.name;
  31765. }
  31766. } catch (err) {
  31767. _iterator2.e(err);
  31768. } finally {
  31769. _iterator2.f();
  31770. }
  31771. var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-size]"), true),
  31772. _step3;
  31773. try {
  31774. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  31775. node = _step3.value;
  31776. node.innerHTML = this.filesize(file.size);
  31777. }
  31778. } catch (err) {
  31779. _iterator3.e(err);
  31780. } finally {
  31781. _iterator3.f();
  31782. }
  31783. if (this.options.addRemoveLinks) {
  31784. file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>".concat(this.options.dictRemoveFile, "</a>"));
  31785. file.previewElement.appendChild(file._removeLink);
  31786. }
  31787. var removeFileEvent = function removeFileEvent(e) {
  31788. e.preventDefault();
  31789. e.stopPropagation();
  31790. if (file.status === Dropzone.UPLOADING) {
  31791. return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () {
  31792. return _this.removeFile(file);
  31793. });
  31794. } else {
  31795. if (_this.options.dictRemoveFileConfirmation) {
  31796. return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () {
  31797. return _this.removeFile(file);
  31798. });
  31799. } else {
  31800. return _this.removeFile(file);
  31801. }
  31802. }
  31803. };
  31804. var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-remove]"), true),
  31805. _step4;
  31806. try {
  31807. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  31808. var removeLink = _step4.value;
  31809. removeLink.addEventListener("click", removeFileEvent);
  31810. }
  31811. } catch (err) {
  31812. _iterator4.e(err);
  31813. } finally {
  31814. _iterator4.f();
  31815. }
  31816. }
  31817. },
  31818. // Called whenever a file is removed.
  31819. removedfile: function removedfile(file) {
  31820. if (file.previewElement != null && file.previewElement.parentNode != null) {
  31821. file.previewElement.parentNode.removeChild(file.previewElement);
  31822. }
  31823. return this._updateMaxFilesReachedClass();
  31824. },
  31825. // Called when a thumbnail has been generated
  31826. // Receives `file` and `dataUrl`
  31827. thumbnail: function thumbnail(file, dataUrl) {
  31828. if (file.previewElement) {
  31829. file.previewElement.classList.remove("dz-file-preview");
  31830. var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-thumbnail]"), true),
  31831. _step5;
  31832. try {
  31833. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  31834. var thumbnailElement = _step5.value;
  31835. thumbnailElement.alt = file.name;
  31836. thumbnailElement.src = dataUrl;
  31837. }
  31838. } catch (err) {
  31839. _iterator5.e(err);
  31840. } finally {
  31841. _iterator5.f();
  31842. }
  31843. return setTimeout(function () {
  31844. return file.previewElement.classList.add("dz-image-preview");
  31845. }, 1);
  31846. }
  31847. },
  31848. // Called whenever an error occurs
  31849. // Receives `file` and `message`
  31850. error: function error(file, message) {
  31851. if (file.previewElement) {
  31852. file.previewElement.classList.add("dz-error");
  31853. if (typeof message !== "string" && message.error) {
  31854. message = message.error;
  31855. }
  31856. var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-errormessage]"), true),
  31857. _step6;
  31858. try {
  31859. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  31860. var node = _step6.value;
  31861. node.textContent = message;
  31862. }
  31863. } catch (err) {
  31864. _iterator6.e(err);
  31865. } finally {
  31866. _iterator6.f();
  31867. }
  31868. }
  31869. },
  31870. errormultiple: function errormultiple() {},
  31871. // Called when a file gets processed. Since there is a cue, not all added
  31872. // files are processed immediately.
  31873. // Receives `file`
  31874. processing: function processing(file) {
  31875. if (file.previewElement) {
  31876. file.previewElement.classList.add("dz-processing");
  31877. if (file._removeLink) {
  31878. return file._removeLink.innerHTML = this.options.dictCancelUpload;
  31879. }
  31880. }
  31881. },
  31882. processingmultiple: function processingmultiple() {},
  31883. // Called whenever the upload progress gets updated.
  31884. // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.
  31885. // To get the total number of bytes of the file, use `file.size`
  31886. uploadprogress: function uploadprogress(file, progress, bytesSent) {
  31887. if (file.previewElement) {
  31888. var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), true),
  31889. _step7;
  31890. try {
  31891. for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
  31892. var node = _step7.value;
  31893. node.nodeName === "PROGRESS" ? node.value = progress : node.style.width = "".concat(progress, "%");
  31894. }
  31895. } catch (err) {
  31896. _iterator7.e(err);
  31897. } finally {
  31898. _iterator7.f();
  31899. }
  31900. }
  31901. },
  31902. // Called whenever the total upload progress gets updated.
  31903. // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent
  31904. totaluploadprogress: function totaluploadprogress() {},
  31905. // Called just before the file is sent. Gets the `xhr` object as second
  31906. // parameter, so you can modify it (for example to add a CSRF token) and a
  31907. // `formData` object to add additional information.
  31908. sending: function sending() {},
  31909. sendingmultiple: function sendingmultiple() {},
  31910. // When the complete upload is finished and successful
  31911. // Receives `file`
  31912. success: function success(file) {
  31913. if (file.previewElement) {
  31914. return file.previewElement.classList.add("dz-success");
  31915. }
  31916. },
  31917. successmultiple: function successmultiple() {},
  31918. // When the upload is canceled.
  31919. canceled: function canceled(file) {
  31920. return this.emit("error", file, this.options.dictUploadCanceled);
  31921. },
  31922. canceledmultiple: function canceledmultiple() {},
  31923. // When the upload is finished, either with success or an error.
  31924. // Receives `file`
  31925. complete: function complete(file) {
  31926. if (file._removeLink) {
  31927. file._removeLink.innerHTML = this.options.dictRemoveFile;
  31928. }
  31929. if (file.previewElement) {
  31930. return file.previewElement.classList.add("dz-complete");
  31931. }
  31932. },
  31933. completemultiple: function completemultiple() {},
  31934. maxfilesexceeded: function maxfilesexceeded() {},
  31935. maxfilesreached: function maxfilesreached() {},
  31936. queuecomplete: function queuecomplete() {},
  31937. addedfiles: function addedfiles() {}
  31938. };
  31939. /* harmony default export */ var src_options = (defaultOptions);
  31940. ;// CONCATENATED MODULE: ./src/dropzone.js
  31941. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  31942. function dropzone_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = dropzone_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  31943. function dropzone_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return dropzone_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dropzone_arrayLikeToArray(o, minLen); }
  31944. function dropzone_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  31945. function dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  31946. function dropzone_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  31947. function dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; }
  31948. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  31949. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  31950. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  31951. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  31952. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  31953. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  31954. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  31955. var Dropzone = /*#__PURE__*/function (_Emitter) {
  31956. _inherits(Dropzone, _Emitter);
  31957. var _super = _createSuper(Dropzone);
  31958. function Dropzone(el, options) {
  31959. var _this;
  31960. dropzone_classCallCheck(this, Dropzone);
  31961. _this = _super.call(this);
  31962. var fallback, left;
  31963. _this.element = el; // For backwards compatibility since the version was in the prototype previously
  31964. _this.version = Dropzone.version;
  31965. _this.clickableElements = [];
  31966. _this.listeners = [];
  31967. _this.files = []; // All files
  31968. if (typeof _this.element === "string") {
  31969. _this.element = document.querySelector(_this.element);
  31970. } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.
  31971. if (!_this.element || _this.element.nodeType == null) {
  31972. throw new Error("Invalid dropzone element.");
  31973. }
  31974. if (_this.element.dropzone) {
  31975. throw new Error("Dropzone already attached.");
  31976. } // Now add this dropzone to the instances.
  31977. Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself.
  31978. _this.element.dropzone = _assertThisInitialized(_this);
  31979. var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};
  31980. _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {});
  31981. _this.options.previewTemplate = _this.options.previewTemplate.replace(/\n*/g, ""); // If the browser failed, just call the fallback and leave
  31982. if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {
  31983. return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this)));
  31984. } // @options.url = @element.getAttribute "action" unless @options.url?
  31985. if (_this.options.url == null) {
  31986. _this.options.url = _this.element.getAttribute("action");
  31987. }
  31988. if (!_this.options.url) {
  31989. throw new Error("No URL provided.");
  31990. }
  31991. if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {
  31992. throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
  31993. }
  31994. if (_this.options.uploadMultiple && _this.options.chunking) {
  31995. throw new Error("You cannot set both: uploadMultiple and chunking.");
  31996. } // Backwards compatibility
  31997. if (_this.options.acceptedMimeTypes) {
  31998. _this.options.acceptedFiles = _this.options.acceptedMimeTypes;
  31999. delete _this.options.acceptedMimeTypes;
  32000. } // Backwards compatibility
  32001. if (_this.options.renameFilename != null) {
  32002. _this.options.renameFile = function (file) {
  32003. return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file);
  32004. };
  32005. }
  32006. if (typeof _this.options.method === "string") {
  32007. _this.options.method = _this.options.method.toUpperCase();
  32008. }
  32009. if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {
  32010. // Remove the fallback
  32011. fallback.parentNode.removeChild(fallback);
  32012. } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false
  32013. if (_this.options.previewsContainer !== false) {
  32014. if (_this.options.previewsContainer) {
  32015. _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer");
  32016. } else {
  32017. _this.previewsContainer = _this.element;
  32018. }
  32019. }
  32020. if (_this.options.clickable) {
  32021. if (_this.options.clickable === true) {
  32022. _this.clickableElements = [_this.element];
  32023. } else {
  32024. _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable");
  32025. }
  32026. }
  32027. _this.init();
  32028. return _this;
  32029. } // Returns all files that have been accepted
  32030. dropzone_createClass(Dropzone, [{
  32031. key: "getAcceptedFiles",
  32032. value: function getAcceptedFiles() {
  32033. return this.files.filter(function (file) {
  32034. return file.accepted;
  32035. }).map(function (file) {
  32036. return file;
  32037. });
  32038. } // Returns all files that have been rejected
  32039. // Not sure when that's going to be useful, but added for completeness.
  32040. }, {
  32041. key: "getRejectedFiles",
  32042. value: function getRejectedFiles() {
  32043. return this.files.filter(function (file) {
  32044. return !file.accepted;
  32045. }).map(function (file) {
  32046. return file;
  32047. });
  32048. }
  32049. }, {
  32050. key: "getFilesWithStatus",
  32051. value: function getFilesWithStatus(status) {
  32052. return this.files.filter(function (file) {
  32053. return file.status === status;
  32054. }).map(function (file) {
  32055. return file;
  32056. });
  32057. } // Returns all files that are in the queue
  32058. }, {
  32059. key: "getQueuedFiles",
  32060. value: function getQueuedFiles() {
  32061. return this.getFilesWithStatus(Dropzone.QUEUED);
  32062. }
  32063. }, {
  32064. key: "getUploadingFiles",
  32065. value: function getUploadingFiles() {
  32066. return this.getFilesWithStatus(Dropzone.UPLOADING);
  32067. }
  32068. }, {
  32069. key: "getAddedFiles",
  32070. value: function getAddedFiles() {
  32071. return this.getFilesWithStatus(Dropzone.ADDED);
  32072. } // Files that are either queued or uploading
  32073. }, {
  32074. key: "getActiveFiles",
  32075. value: function getActiveFiles() {
  32076. return this.files.filter(function (file) {
  32077. return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;
  32078. }).map(function (file) {
  32079. return file;
  32080. });
  32081. } // The function that gets called when Dropzone is initialized. You
  32082. // can (and should) setup event listeners inside this function.
  32083. }, {
  32084. key: "init",
  32085. value: function init() {
  32086. var _this2 = this;
  32087. // In case it isn't set already
  32088. if (this.element.tagName === "form") {
  32089. this.element.setAttribute("enctype", "multipart/form-data");
  32090. }
  32091. if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
  32092. this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><button class=\"dz-button\" type=\"button\">".concat(this.options.dictDefaultMessage, "</button></div>")));
  32093. }
  32094. if (this.clickableElements.length) {
  32095. var setupHiddenFileInput = function setupHiddenFileInput() {
  32096. if (_this2.hiddenFileInput) {
  32097. _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput);
  32098. }
  32099. _this2.hiddenFileInput = document.createElement("input");
  32100. _this2.hiddenFileInput.setAttribute("type", "file");
  32101. if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) {
  32102. _this2.hiddenFileInput.setAttribute("multiple", "multiple");
  32103. }
  32104. _this2.hiddenFileInput.className = "dz-hidden-input";
  32105. if (_this2.options.acceptedFiles !== null) {
  32106. _this2.hiddenFileInput.setAttribute("accept", _this2.options.acceptedFiles);
  32107. }
  32108. if (_this2.options.capture !== null) {
  32109. _this2.hiddenFileInput.setAttribute("capture", _this2.options.capture);
  32110. } // Making sure that no one can "tab" into this field.
  32111. _this2.hiddenFileInput.setAttribute("tabindex", "-1"); // Not setting `display="none"` because some browsers don't accept clicks
  32112. // on elements that aren't displayed.
  32113. _this2.hiddenFileInput.style.visibility = "hidden";
  32114. _this2.hiddenFileInput.style.position = "absolute";
  32115. _this2.hiddenFileInput.style.top = "0";
  32116. _this2.hiddenFileInput.style.left = "0";
  32117. _this2.hiddenFileInput.style.height = "0";
  32118. _this2.hiddenFileInput.style.width = "0";
  32119. Dropzone.getElement(_this2.options.hiddenInputContainer, "hiddenInputContainer").appendChild(_this2.hiddenFileInput);
  32120. _this2.hiddenFileInput.addEventListener("change", function () {
  32121. var files = _this2.hiddenFileInput.files;
  32122. if (files.length) {
  32123. var _iterator = dropzone_createForOfIteratorHelper(files, true),
  32124. _step;
  32125. try {
  32126. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  32127. var file = _step.value;
  32128. _this2.addFile(file);
  32129. }
  32130. } catch (err) {
  32131. _iterator.e(err);
  32132. } finally {
  32133. _iterator.f();
  32134. }
  32135. }
  32136. _this2.emit("addedfiles", files);
  32137. setupHiddenFileInput();
  32138. });
  32139. };
  32140. setupHiddenFileInput();
  32141. }
  32142. this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.
  32143. // They're not in @setupEventListeners() because they shouldn't be removed
  32144. // again when the dropzone gets disabled.
  32145. var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true),
  32146. _step2;
  32147. try {
  32148. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  32149. var eventName = _step2.value;
  32150. this.on(eventName, this.options[eventName]);
  32151. }
  32152. } catch (err) {
  32153. _iterator2.e(err);
  32154. } finally {
  32155. _iterator2.f();
  32156. }
  32157. this.on("uploadprogress", function () {
  32158. return _this2.updateTotalUploadProgress();
  32159. });
  32160. this.on("removedfile", function () {
  32161. return _this2.updateTotalUploadProgress();
  32162. });
  32163. this.on("canceled", function (file) {
  32164. return _this2.emit("complete", file);
  32165. }); // Emit a `queuecomplete` event if all files finished uploading.
  32166. this.on("complete", function (file) {
  32167. if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) {
  32168. // This needs to be deferred so that `queuecomplete` really triggers after `complete`
  32169. return setTimeout(function () {
  32170. return _this2.emit("queuecomplete");
  32171. }, 0);
  32172. }
  32173. });
  32174. var containsFiles = function containsFiles(e) {
  32175. if (e.dataTransfer.types) {
  32176. // Because e.dataTransfer.types is an Object in
  32177. // IE, we need to iterate like this instead of
  32178. // using e.dataTransfer.types.some()
  32179. for (var i = 0; i < e.dataTransfer.types.length; i++) {
  32180. if (e.dataTransfer.types[i] === "Files") return true;
  32181. }
  32182. }
  32183. return false;
  32184. };
  32185. var noPropagation = function noPropagation(e) {
  32186. // If there are no files, we don't want to stop
  32187. // propagation so we don't interfere with other
  32188. // drag and drop behaviour.
  32189. if (!containsFiles(e)) return;
  32190. e.stopPropagation();
  32191. if (e.preventDefault) {
  32192. return e.preventDefault();
  32193. } else {
  32194. return e.returnValue = false;
  32195. }
  32196. }; // Create the listeners
  32197. this.listeners = [{
  32198. element: this.element,
  32199. events: {
  32200. dragstart: function dragstart(e) {
  32201. return _this2.emit("dragstart", e);
  32202. },
  32203. dragenter: function dragenter(e) {
  32204. noPropagation(e);
  32205. return _this2.emit("dragenter", e);
  32206. },
  32207. dragover: function dragover(e) {
  32208. // Makes it possible to drag files from chrome's download bar
  32209. // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
  32210. // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)
  32211. var efct;
  32212. try {
  32213. efct = e.dataTransfer.effectAllowed;
  32214. } catch (error) {}
  32215. e.dataTransfer.dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy";
  32216. noPropagation(e);
  32217. return _this2.emit("dragover", e);
  32218. },
  32219. dragleave: function dragleave(e) {
  32220. return _this2.emit("dragleave", e);
  32221. },
  32222. drop: function drop(e) {
  32223. noPropagation(e);
  32224. return _this2.drop(e);
  32225. },
  32226. dragend: function dragend(e) {
  32227. return _this2.emit("dragend", e);
  32228. }
  32229. } // This is disabled right now, because the browsers don't implement it properly.
  32230. // "paste": (e) =>
  32231. // noPropagation e
  32232. // @paste e
  32233. }];
  32234. this.clickableElements.forEach(function (clickableElement) {
  32235. return _this2.listeners.push({
  32236. element: clickableElement,
  32237. events: {
  32238. click: function click(evt) {
  32239. // Only the actual dropzone or the message element should trigger file selection
  32240. if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(".dz-message"))) {
  32241. _this2.hiddenFileInput.click(); // Forward the click
  32242. }
  32243. return true;
  32244. }
  32245. }
  32246. });
  32247. });
  32248. this.enable();
  32249. return this.options.init.call(this);
  32250. } // Not fully tested yet
  32251. }, {
  32252. key: "destroy",
  32253. value: function destroy() {
  32254. this.disable();
  32255. this.removeAllFiles(true);
  32256. if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {
  32257. this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
  32258. this.hiddenFileInput = null;
  32259. }
  32260. delete this.element.dropzone;
  32261. return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
  32262. }
  32263. }, {
  32264. key: "updateTotalUploadProgress",
  32265. value: function updateTotalUploadProgress() {
  32266. var totalUploadProgress;
  32267. var totalBytesSent = 0;
  32268. var totalBytes = 0;
  32269. var activeFiles = this.getActiveFiles();
  32270. if (activeFiles.length) {
  32271. var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true),
  32272. _step3;
  32273. try {
  32274. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  32275. var file = _step3.value;
  32276. totalBytesSent += file.upload.bytesSent;
  32277. totalBytes += file.upload.total;
  32278. }
  32279. } catch (err) {
  32280. _iterator3.e(err);
  32281. } finally {
  32282. _iterator3.f();
  32283. }
  32284. totalUploadProgress = 100 * totalBytesSent / totalBytes;
  32285. } else {
  32286. totalUploadProgress = 100;
  32287. }
  32288. return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
  32289. } // @options.paramName can be a function taking one parameter rather than a string.
  32290. // A parameter name for a file is obtained simply by calling this with an index number.
  32291. }, {
  32292. key: "_getParamName",
  32293. value: function _getParamName(n) {
  32294. if (typeof this.options.paramName === "function") {
  32295. return this.options.paramName(n);
  32296. } else {
  32297. return "".concat(this.options.paramName).concat(this.options.uploadMultiple ? "[".concat(n, "]") : "");
  32298. }
  32299. } // If @options.renameFile is a function,
  32300. // the function will be used to rename the file.name before appending it to the formData
  32301. }, {
  32302. key: "_renameFile",
  32303. value: function _renameFile(file) {
  32304. if (typeof this.options.renameFile !== "function") {
  32305. return file.name;
  32306. }
  32307. return this.options.renameFile(file);
  32308. } // Returns a form that can be used as fallback if the browser does not support DragnDrop
  32309. //
  32310. // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.
  32311. // This code has to pass in IE7 :(
  32312. }, {
  32313. key: "getFallbackForm",
  32314. value: function getFallbackForm() {
  32315. var existingFallback, form;
  32316. if (existingFallback = this.getExistingFallback()) {
  32317. return existingFallback;
  32318. }
  32319. var fieldsString = '<div class="dz-fallback">';
  32320. if (this.options.dictFallbackText) {
  32321. fieldsString += "<p>".concat(this.options.dictFallbackText, "</p>");
  32322. }
  32323. fieldsString += "<input type=\"file\" name=\"".concat(this._getParamName(0), "\" ").concat(this.options.uploadMultiple ? 'multiple="multiple"' : undefined, " /><input type=\"submit\" value=\"Upload!\"></div>");
  32324. var fields = Dropzone.createElement(fieldsString);
  32325. if (this.element.tagName !== "FORM") {
  32326. form = Dropzone.createElement("<form action=\"".concat(this.options.url, "\" enctype=\"multipart/form-data\" method=\"").concat(this.options.method, "\"></form>"));
  32327. form.appendChild(fields);
  32328. } else {
  32329. // Make sure that the enctype and method attributes are set properly
  32330. this.element.setAttribute("enctype", "multipart/form-data");
  32331. this.element.setAttribute("method", this.options.method);
  32332. }
  32333. return form != null ? form : fields;
  32334. } // Returns the fallback elements if they exist already
  32335. //
  32336. // This code has to pass in IE7 :(
  32337. }, {
  32338. key: "getExistingFallback",
  32339. value: function getExistingFallback() {
  32340. var getFallback = function getFallback(elements) {
  32341. var _iterator4 = dropzone_createForOfIteratorHelper(elements, true),
  32342. _step4;
  32343. try {
  32344. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  32345. var el = _step4.value;
  32346. if (/(^| )fallback($| )/.test(el.className)) {
  32347. return el;
  32348. }
  32349. }
  32350. } catch (err) {
  32351. _iterator4.e(err);
  32352. } finally {
  32353. _iterator4.f();
  32354. }
  32355. };
  32356. for (var _i = 0, _arr = ["div", "form"]; _i < _arr.length; _i++) {
  32357. var tagName = _arr[_i];
  32358. var fallback;
  32359. if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
  32360. return fallback;
  32361. }
  32362. }
  32363. } // Activates all listeners stored in @listeners
  32364. }, {
  32365. key: "setupEventListeners",
  32366. value: function setupEventListeners() {
  32367. return this.listeners.map(function (elementListeners) {
  32368. return function () {
  32369. var result = [];
  32370. for (var event in elementListeners.events) {
  32371. var listener = elementListeners.events[event];
  32372. result.push(elementListeners.element.addEventListener(event, listener, false));
  32373. }
  32374. return result;
  32375. }();
  32376. });
  32377. } // Deactivates all listeners stored in @listeners
  32378. }, {
  32379. key: "removeEventListeners",
  32380. value: function removeEventListeners() {
  32381. return this.listeners.map(function (elementListeners) {
  32382. return function () {
  32383. var result = [];
  32384. for (var event in elementListeners.events) {
  32385. var listener = elementListeners.events[event];
  32386. result.push(elementListeners.element.removeEventListener(event, listener, false));
  32387. }
  32388. return result;
  32389. }();
  32390. });
  32391. } // Removes all event listeners and cancels all files in the queue or being processed.
  32392. }, {
  32393. key: "disable",
  32394. value: function disable() {
  32395. var _this3 = this;
  32396. this.clickableElements.forEach(function (element) {
  32397. return element.classList.remove("dz-clickable");
  32398. });
  32399. this.removeEventListeners();
  32400. this.disabled = true;
  32401. return this.files.map(function (file) {
  32402. return _this3.cancelUpload(file);
  32403. });
  32404. }
  32405. }, {
  32406. key: "enable",
  32407. value: function enable() {
  32408. delete this.disabled;
  32409. this.clickableElements.forEach(function (element) {
  32410. return element.classList.add("dz-clickable");
  32411. });
  32412. return this.setupEventListeners();
  32413. } // Returns a nicely formatted filesize
  32414. }, {
  32415. key: "filesize",
  32416. value: function filesize(size) {
  32417. var selectedSize = 0;
  32418. var selectedUnit = "b";
  32419. if (size > 0) {
  32420. var units = ["tb", "gb", "mb", "kb", "b"];
  32421. for (var i = 0; i < units.length; i++) {
  32422. var unit = units[i];
  32423. var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
  32424. if (size >= cutoff) {
  32425. selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
  32426. selectedUnit = unit;
  32427. break;
  32428. }
  32429. }
  32430. selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits
  32431. }
  32432. return "<strong>".concat(selectedSize, "</strong> ").concat(this.options.dictFileSizeUnits[selectedUnit]);
  32433. } // Adds or removes the `dz-max-files-reached` class from the form.
  32434. }, {
  32435. key: "_updateMaxFilesReachedClass",
  32436. value: function _updateMaxFilesReachedClass() {
  32437. if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
  32438. if (this.getAcceptedFiles().length === this.options.maxFiles) {
  32439. this.emit("maxfilesreached", this.files);
  32440. }
  32441. return this.element.classList.add("dz-max-files-reached");
  32442. } else {
  32443. return this.element.classList.remove("dz-max-files-reached");
  32444. }
  32445. }
  32446. }, {
  32447. key: "drop",
  32448. value: function drop(e) {
  32449. if (!e.dataTransfer) {
  32450. return;
  32451. }
  32452. this.emit("drop", e); // Convert the FileList to an Array
  32453. // This is necessary for IE11
  32454. var files = [];
  32455. for (var i = 0; i < e.dataTransfer.files.length; i++) {
  32456. files[i] = e.dataTransfer.files[i];
  32457. } // Even if it's a folder, files.length will contain the folders.
  32458. if (files.length) {
  32459. var items = e.dataTransfer.items;
  32460. if (items && items.length && items[0].webkitGetAsEntry != null) {
  32461. // The browser supports dropping of folders, so handle items instead of files
  32462. this._addFilesFromItems(items);
  32463. } else {
  32464. this.handleFiles(files);
  32465. }
  32466. }
  32467. this.emit("addedfiles", files);
  32468. }
  32469. }, {
  32470. key: "paste",
  32471. value: function paste(e) {
  32472. if (__guard__(e != null ? e.clipboardData : undefined, function (x) {
  32473. return x.items;
  32474. }) == null) {
  32475. return;
  32476. }
  32477. this.emit("paste", e);
  32478. var items = e.clipboardData.items;
  32479. if (items.length) {
  32480. return this._addFilesFromItems(items);
  32481. }
  32482. }
  32483. }, {
  32484. key: "handleFiles",
  32485. value: function handleFiles(files) {
  32486. var _iterator5 = dropzone_createForOfIteratorHelper(files, true),
  32487. _step5;
  32488. try {
  32489. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  32490. var file = _step5.value;
  32491. this.addFile(file);
  32492. }
  32493. } catch (err) {
  32494. _iterator5.e(err);
  32495. } finally {
  32496. _iterator5.f();
  32497. }
  32498. } // When a folder is dropped (or files are pasted), items must be handled
  32499. // instead of files.
  32500. }, {
  32501. key: "_addFilesFromItems",
  32502. value: function _addFilesFromItems(items) {
  32503. var _this4 = this;
  32504. return function () {
  32505. var result = [];
  32506. var _iterator6 = dropzone_createForOfIteratorHelper(items, true),
  32507. _step6;
  32508. try {
  32509. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  32510. var item = _step6.value;
  32511. var entry;
  32512. if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {
  32513. if (entry.isFile) {
  32514. result.push(_this4.addFile(item.getAsFile()));
  32515. } else if (entry.isDirectory) {
  32516. // Append all files from that directory to files
  32517. result.push(_this4._addFilesFromDirectory(entry, entry.name));
  32518. } else {
  32519. result.push(undefined);
  32520. }
  32521. } else if (item.getAsFile != null) {
  32522. if (item.kind == null || item.kind === "file") {
  32523. result.push(_this4.addFile(item.getAsFile()));
  32524. } else {
  32525. result.push(undefined);
  32526. }
  32527. } else {
  32528. result.push(undefined);
  32529. }
  32530. }
  32531. } catch (err) {
  32532. _iterator6.e(err);
  32533. } finally {
  32534. _iterator6.f();
  32535. }
  32536. return result;
  32537. }();
  32538. } // Goes through the directory, and adds each file it finds recursively
  32539. }, {
  32540. key: "_addFilesFromDirectory",
  32541. value: function _addFilesFromDirectory(directory, path) {
  32542. var _this5 = this;
  32543. var dirReader = directory.createReader();
  32544. var errorHandler = function errorHandler(error) {
  32545. return __guardMethod__(console, "log", function (o) {
  32546. return o.log(error);
  32547. });
  32548. };
  32549. var readEntries = function readEntries() {
  32550. return dirReader.readEntries(function (entries) {
  32551. if (entries.length > 0) {
  32552. var _iterator7 = dropzone_createForOfIteratorHelper(entries, true),
  32553. _step7;
  32554. try {
  32555. for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
  32556. var entry = _step7.value;
  32557. if (entry.isFile) {
  32558. entry.file(function (file) {
  32559. if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === ".") {
  32560. return;
  32561. }
  32562. file.fullPath = "".concat(path, "/").concat(file.name);
  32563. return _this5.addFile(file);
  32564. });
  32565. } else if (entry.isDirectory) {
  32566. _this5._addFilesFromDirectory(entry, "".concat(path, "/").concat(entry.name));
  32567. }
  32568. } // Recursively call readEntries() again, since browser only handle
  32569. // the first 100 entries.
  32570. // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries
  32571. } catch (err) {
  32572. _iterator7.e(err);
  32573. } finally {
  32574. _iterator7.f();
  32575. }
  32576. readEntries();
  32577. }
  32578. return null;
  32579. }, errorHandler);
  32580. };
  32581. return readEntries();
  32582. } // If `done()` is called without argument the file is accepted
  32583. // If you call it with an error message, the file is rejected
  32584. // (This allows for asynchronous validation)
  32585. //
  32586. // This function checks the filesize, and if the file.type passes the
  32587. // `acceptedFiles` check.
  32588. }, {
  32589. key: "accept",
  32590. value: function accept(file, done) {
  32591. if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {
  32592. done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
  32593. } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
  32594. done(this.options.dictInvalidFileType);
  32595. } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
  32596. done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
  32597. this.emit("maxfilesexceeded", file);
  32598. } else {
  32599. this.options.accept.call(this, file, done);
  32600. }
  32601. }
  32602. }, {
  32603. key: "addFile",
  32604. value: function addFile(file) {
  32605. var _this6 = this;
  32606. file.upload = {
  32607. uuid: Dropzone.uuidv4(),
  32608. progress: 0,
  32609. // Setting the total upload size to file.size for the beginning
  32610. // It's actual different than the size to be transmitted.
  32611. total: file.size,
  32612. bytesSent: 0,
  32613. filename: this._renameFile(file) // Not setting chunking information here, because the acutal data — and
  32614. // thus the chunks — might change if `options.transformFile` is set
  32615. // and does something to the data.
  32616. };
  32617. this.files.push(file);
  32618. file.status = Dropzone.ADDED;
  32619. this.emit("addedfile", file);
  32620. this._enqueueThumbnail(file);
  32621. this.accept(file, function (error) {
  32622. if (error) {
  32623. file.accepted = false;
  32624. _this6._errorProcessing([file], error); // Will set the file.status
  32625. } else {
  32626. file.accepted = true;
  32627. if (_this6.options.autoQueue) {
  32628. _this6.enqueueFile(file);
  32629. } // Will set .accepted = true
  32630. }
  32631. _this6._updateMaxFilesReachedClass();
  32632. });
  32633. } // Wrapper for enqueueFile
  32634. }, {
  32635. key: "enqueueFiles",
  32636. value: function enqueueFiles(files) {
  32637. var _iterator8 = dropzone_createForOfIteratorHelper(files, true),
  32638. _step8;
  32639. try {
  32640. for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
  32641. var file = _step8.value;
  32642. this.enqueueFile(file);
  32643. }
  32644. } catch (err) {
  32645. _iterator8.e(err);
  32646. } finally {
  32647. _iterator8.f();
  32648. }
  32649. return null;
  32650. }
  32651. }, {
  32652. key: "enqueueFile",
  32653. value: function enqueueFile(file) {
  32654. var _this7 = this;
  32655. if (file.status === Dropzone.ADDED && file.accepted === true) {
  32656. file.status = Dropzone.QUEUED;
  32657. if (this.options.autoProcessQueue) {
  32658. return setTimeout(function () {
  32659. return _this7.processQueue();
  32660. }, 0); // Deferring the call
  32661. }
  32662. } else {
  32663. throw new Error("This file can't be queued because it has already been processed or was rejected.");
  32664. }
  32665. }
  32666. }, {
  32667. key: "_enqueueThumbnail",
  32668. value: function _enqueueThumbnail(file) {
  32669. var _this8 = this;
  32670. if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
  32671. this._thumbnailQueue.push(file);
  32672. return setTimeout(function () {
  32673. return _this8._processThumbnailQueue();
  32674. }, 0); // Deferring the call
  32675. }
  32676. }
  32677. }, {
  32678. key: "_processThumbnailQueue",
  32679. value: function _processThumbnailQueue() {
  32680. var _this9 = this;
  32681. if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
  32682. return;
  32683. }
  32684. this._processingThumbnail = true;
  32685. var file = this._thumbnailQueue.shift();
  32686. return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {
  32687. _this9.emit("thumbnail", file, dataUrl);
  32688. _this9._processingThumbnail = false;
  32689. return _this9._processThumbnailQueue();
  32690. });
  32691. } // Can be called by the user to remove a file
  32692. }, {
  32693. key: "removeFile",
  32694. value: function removeFile(file) {
  32695. if (file.status === Dropzone.UPLOADING) {
  32696. this.cancelUpload(file);
  32697. }
  32698. this.files = without(this.files, file);
  32699. this.emit("removedfile", file);
  32700. if (this.files.length === 0) {
  32701. return this.emit("reset");
  32702. }
  32703. } // Removes all files that aren't currently processed from the list
  32704. }, {
  32705. key: "removeAllFiles",
  32706. value: function removeAllFiles(cancelIfNecessary) {
  32707. // Create a copy of files since removeFile() changes the @files array.
  32708. if (cancelIfNecessary == null) {
  32709. cancelIfNecessary = false;
  32710. }
  32711. var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true),
  32712. _step9;
  32713. try {
  32714. for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
  32715. var file = _step9.value;
  32716. if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
  32717. this.removeFile(file);
  32718. }
  32719. }
  32720. } catch (err) {
  32721. _iterator9.e(err);
  32722. } finally {
  32723. _iterator9.f();
  32724. }
  32725. return null;
  32726. } // Resizes an image before it gets sent to the server. This function is the default behavior of
  32727. // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with
  32728. // the resized blob.
  32729. }, {
  32730. key: "resizeImage",
  32731. value: function resizeImage(file, width, height, resizeMethod, callback) {
  32732. var _this10 = this;
  32733. return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {
  32734. if (canvas == null) {
  32735. // The image has not been resized
  32736. return callback(file);
  32737. } else {
  32738. var resizeMimeType = _this10.options.resizeMimeType;
  32739. if (resizeMimeType == null) {
  32740. resizeMimeType = file.type;
  32741. }
  32742. var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality);
  32743. if (resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg") {
  32744. // Now add the original EXIF information
  32745. resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);
  32746. }
  32747. return callback(Dropzone.dataURItoBlob(resizedDataURL));
  32748. }
  32749. });
  32750. }
  32751. }, {
  32752. key: "createThumbnail",
  32753. value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {
  32754. var _this11 = this;
  32755. var fileReader = new FileReader();
  32756. fileReader.onload = function () {
  32757. file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector
  32758. if (file.type === "image/svg+xml") {
  32759. if (callback != null) {
  32760. callback(fileReader.result);
  32761. }
  32762. return;
  32763. }
  32764. _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);
  32765. };
  32766. fileReader.readAsDataURL(file);
  32767. } // `mockFile` needs to have these attributes:
  32768. //
  32769. // { name: 'name', size: 12345, imageUrl: '' }
  32770. //
  32771. // `callback` will be invoked when the image has been downloaded and displayed.
  32772. // `crossOrigin` will be added to the `img` tag when accessing the file.
  32773. }, {
  32774. key: "displayExistingFile",
  32775. value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) {
  32776. var _this12 = this;
  32777. var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
  32778. this.emit("addedfile", mockFile);
  32779. this.emit("complete", mockFile);
  32780. if (!resizeThumbnail) {
  32781. this.emit("thumbnail", mockFile, imageUrl);
  32782. if (callback) callback();
  32783. } else {
  32784. var onDone = function onDone(thumbnail) {
  32785. _this12.emit("thumbnail", mockFile, thumbnail);
  32786. if (callback) callback();
  32787. };
  32788. mockFile.dataURL = imageUrl;
  32789. this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.resizeMethod, this.options.fixOrientation, onDone, crossOrigin);
  32790. }
  32791. }
  32792. }, {
  32793. key: "createThumbnailFromUrl",
  32794. value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {
  32795. var _this13 = this;
  32796. // Not using `new Image` here because of a bug in latest Chrome versions.
  32797. // See https://github.com/enyo/dropzone/pull/226
  32798. var img = document.createElement("img");
  32799. if (crossOrigin) {
  32800. img.crossOrigin = crossOrigin;
  32801. } // fixOrientation is not needed anymore with browsers handling imageOrientation
  32802. fixOrientation = getComputedStyle(document.body)["imageOrientation"] == "from-image" ? false : fixOrientation;
  32803. img.onload = function () {
  32804. var loadExif = function loadExif(callback) {
  32805. return callback(1);
  32806. };
  32807. if (typeof EXIF !== "undefined" && EXIF !== null && fixOrientation) {
  32808. loadExif = function loadExif(callback) {
  32809. return EXIF.getData(img, function () {
  32810. return callback(EXIF.getTag(this, "Orientation"));
  32811. });
  32812. };
  32813. }
  32814. return loadExif(function (orientation) {
  32815. file.width = img.width;
  32816. file.height = img.height;
  32817. var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);
  32818. var canvas = document.createElement("canvas");
  32819. var ctx = canvas.getContext("2d");
  32820. canvas.width = resizeInfo.trgWidth;
  32821. canvas.height = resizeInfo.trgHeight;
  32822. if (orientation > 4) {
  32823. canvas.width = resizeInfo.trgHeight;
  32824. canvas.height = resizeInfo.trgWidth;
  32825. }
  32826. switch (orientation) {
  32827. case 2:
  32828. // horizontal flip
  32829. ctx.translate(canvas.width, 0);
  32830. ctx.scale(-1, 1);
  32831. break;
  32832. case 3:
  32833. // 180° rotate left
  32834. ctx.translate(canvas.width, canvas.height);
  32835. ctx.rotate(Math.PI);
  32836. break;
  32837. case 4:
  32838. // vertical flip
  32839. ctx.translate(0, canvas.height);
  32840. ctx.scale(1, -1);
  32841. break;
  32842. case 5:
  32843. // vertical flip + 90 rotate right
  32844. ctx.rotate(0.5 * Math.PI);
  32845. ctx.scale(1, -1);
  32846. break;
  32847. case 6:
  32848. // 90° rotate right
  32849. ctx.rotate(0.5 * Math.PI);
  32850. ctx.translate(0, -canvas.width);
  32851. break;
  32852. case 7:
  32853. // horizontal flip + 90 rotate right
  32854. ctx.rotate(0.5 * Math.PI);
  32855. ctx.translate(canvas.height, -canvas.width);
  32856. ctx.scale(-1, 1);
  32857. break;
  32858. case 8:
  32859. // 90° rotate left
  32860. ctx.rotate(-0.5 * Math.PI);
  32861. ctx.translate(-canvas.height, 0);
  32862. break;
  32863. } // This is a bugfix for iOS' scaling bug.
  32864. drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
  32865. var thumbnail = canvas.toDataURL("image/png");
  32866. if (callback != null) {
  32867. return callback(thumbnail, canvas);
  32868. }
  32869. });
  32870. };
  32871. if (callback != null) {
  32872. img.onerror = callback;
  32873. }
  32874. return img.src = file.dataURL;
  32875. } // Goes through the queue and processes files if there aren't too many already.
  32876. }, {
  32877. key: "processQueue",
  32878. value: function processQueue() {
  32879. var parallelUploads = this.options.parallelUploads;
  32880. var processingLength = this.getUploadingFiles().length;
  32881. var i = processingLength; // There are already at least as many files uploading than should be
  32882. if (processingLength >= parallelUploads) {
  32883. return;
  32884. }
  32885. var queuedFiles = this.getQueuedFiles();
  32886. if (!(queuedFiles.length > 0)) {
  32887. return;
  32888. }
  32889. if (this.options.uploadMultiple) {
  32890. // The files should be uploaded in one request
  32891. return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
  32892. } else {
  32893. while (i < parallelUploads) {
  32894. if (!queuedFiles.length) {
  32895. return;
  32896. } // Nothing left to process
  32897. this.processFile(queuedFiles.shift());
  32898. i++;
  32899. }
  32900. }
  32901. } // Wrapper for `processFiles`
  32902. }, {
  32903. key: "processFile",
  32904. value: function processFile(file) {
  32905. return this.processFiles([file]);
  32906. } // Loads the file, then calls finishedLoading()
  32907. }, {
  32908. key: "processFiles",
  32909. value: function processFiles(files) {
  32910. var _iterator10 = dropzone_createForOfIteratorHelper(files, true),
  32911. _step10;
  32912. try {
  32913. for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
  32914. var file = _step10.value;
  32915. file.processing = true; // Backwards compatibility
  32916. file.status = Dropzone.UPLOADING;
  32917. this.emit("processing", file);
  32918. }
  32919. } catch (err) {
  32920. _iterator10.e(err);
  32921. } finally {
  32922. _iterator10.f();
  32923. }
  32924. if (this.options.uploadMultiple) {
  32925. this.emit("processingmultiple", files);
  32926. }
  32927. return this.uploadFiles(files);
  32928. }
  32929. }, {
  32930. key: "_getFilesWithXhr",
  32931. value: function _getFilesWithXhr(xhr) {
  32932. var files;
  32933. return files = this.files.filter(function (file) {
  32934. return file.xhr === xhr;
  32935. }).map(function (file) {
  32936. return file;
  32937. });
  32938. } // Cancels the file upload and sets the status to CANCELED
  32939. // **if** the file is actually being uploaded.
  32940. // If it's still in the queue, the file is being removed from it and the status
  32941. // set to CANCELED.
  32942. }, {
  32943. key: "cancelUpload",
  32944. value: function cancelUpload(file) {
  32945. if (file.status === Dropzone.UPLOADING) {
  32946. var groupedFiles = this._getFilesWithXhr(file.xhr);
  32947. var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true),
  32948. _step11;
  32949. try {
  32950. for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
  32951. var groupedFile = _step11.value;
  32952. groupedFile.status = Dropzone.CANCELED;
  32953. }
  32954. } catch (err) {
  32955. _iterator11.e(err);
  32956. } finally {
  32957. _iterator11.f();
  32958. }
  32959. if (typeof file.xhr !== "undefined") {
  32960. file.xhr.abort();
  32961. }
  32962. var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true),
  32963. _step12;
  32964. try {
  32965. for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
  32966. var _groupedFile = _step12.value;
  32967. this.emit("canceled", _groupedFile);
  32968. }
  32969. } catch (err) {
  32970. _iterator12.e(err);
  32971. } finally {
  32972. _iterator12.f();
  32973. }
  32974. if (this.options.uploadMultiple) {
  32975. this.emit("canceledmultiple", groupedFiles);
  32976. }
  32977. } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {
  32978. file.status = Dropzone.CANCELED;
  32979. this.emit("canceled", file);
  32980. if (this.options.uploadMultiple) {
  32981. this.emit("canceledmultiple", [file]);
  32982. }
  32983. }
  32984. if (this.options.autoProcessQueue) {
  32985. return this.processQueue();
  32986. }
  32987. }
  32988. }, {
  32989. key: "resolveOption",
  32990. value: function resolveOption(option) {
  32991. if (typeof option === "function") {
  32992. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  32993. args[_key - 1] = arguments[_key];
  32994. }
  32995. return option.apply(this, args);
  32996. }
  32997. return option;
  32998. }
  32999. }, {
  33000. key: "uploadFile",
  33001. value: function uploadFile(file) {
  33002. return this.uploadFiles([file]);
  33003. }
  33004. }, {
  33005. key: "uploadFiles",
  33006. value: function uploadFiles(files) {
  33007. var _this14 = this;
  33008. this._transformFiles(files, function (transformedFiles) {
  33009. if (_this14.options.chunking) {
  33010. // Chunking is not allowed to be used with `uploadMultiple` so we know
  33011. // that there is only __one__file.
  33012. var transformedFile = transformedFiles[0];
  33013. files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize);
  33014. files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize);
  33015. }
  33016. if (files[0].upload.chunked) {
  33017. // This file should be sent in chunks!
  33018. // If the chunking option is set, we **know** that there can only be **one** file, since
  33019. // uploadMultiple is not allowed with this option.
  33020. var file = files[0];
  33021. var _transformedFile = transformedFiles[0];
  33022. var startedChunkCount = 0;
  33023. file.upload.chunks = [];
  33024. var handleNextChunk = function handleNextChunk() {
  33025. var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.
  33026. while (file.upload.chunks[chunkIndex] !== undefined) {
  33027. chunkIndex++;
  33028. } // This means, that all chunks have already been started.
  33029. if (chunkIndex >= file.upload.totalChunkCount) return;
  33030. startedChunkCount++;
  33031. var start = chunkIndex * _this14.options.chunkSize;
  33032. var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size);
  33033. var dataBlock = {
  33034. name: _this14._getParamName(0),
  33035. data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end),
  33036. filename: file.upload.filename,
  33037. chunkIndex: chunkIndex
  33038. };
  33039. file.upload.chunks[chunkIndex] = {
  33040. file: file,
  33041. index: chunkIndex,
  33042. dataBlock: dataBlock,
  33043. // In case we want to retry.
  33044. status: Dropzone.UPLOADING,
  33045. progress: 0,
  33046. retries: 0 // The number of times this block has been retried.
  33047. };
  33048. _this14._uploadData(files, [dataBlock]);
  33049. };
  33050. file.upload.finishedChunkUpload = function (chunk, response) {
  33051. var allFinished = true;
  33052. chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk
  33053. chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers
  33054. chunk.xhr = null;
  33055. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  33056. if (file.upload.chunks[i] === undefined) {
  33057. return handleNextChunk();
  33058. }
  33059. if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {
  33060. allFinished = false;
  33061. }
  33062. }
  33063. if (allFinished) {
  33064. _this14.options.chunksUploaded(file, function () {
  33065. _this14._finished(files, response, null);
  33066. });
  33067. }
  33068. };
  33069. if (_this14.options.parallelChunkUploads) {
  33070. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  33071. handleNextChunk();
  33072. }
  33073. } else {
  33074. handleNextChunk();
  33075. }
  33076. } else {
  33077. var dataBlocks = [];
  33078. for (var _i2 = 0; _i2 < files.length; _i2++) {
  33079. dataBlocks[_i2] = {
  33080. name: _this14._getParamName(_i2),
  33081. data: transformedFiles[_i2],
  33082. filename: files[_i2].upload.filename
  33083. };
  33084. }
  33085. _this14._uploadData(files, dataBlocks);
  33086. }
  33087. });
  33088. } /// Returns the right chunk for given file and xhr
  33089. }, {
  33090. key: "_getChunk",
  33091. value: function _getChunk(file, xhr) {
  33092. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  33093. if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {
  33094. return file.upload.chunks[i];
  33095. }
  33096. }
  33097. } // This function actually uploads the file(s) to the server.
  33098. // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed
  33099. // files, or individual chunks for chunked upload).
  33100. }, {
  33101. key: "_uploadData",
  33102. value: function _uploadData(files, dataBlocks) {
  33103. var _this15 = this;
  33104. var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.
  33105. var _iterator13 = dropzone_createForOfIteratorHelper(files, true),
  33106. _step13;
  33107. try {
  33108. for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
  33109. var file = _step13.value;
  33110. file.xhr = xhr;
  33111. }
  33112. } catch (err) {
  33113. _iterator13.e(err);
  33114. } finally {
  33115. _iterator13.f();
  33116. }
  33117. if (files[0].upload.chunked) {
  33118. // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk
  33119. files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;
  33120. }
  33121. var method = this.resolveOption(this.options.method, files);
  33122. var url = this.resolveOption(this.options.url, files);
  33123. xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8
  33124. var timeout = this.resolveOption(this.options.timeout, files);
  33125. if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
  33126. xhr.withCredentials = !!this.options.withCredentials;
  33127. xhr.onload = function (e) {
  33128. _this15._finishedUploading(files, xhr, e);
  33129. };
  33130. xhr.ontimeout = function () {
  33131. _this15._handleUploadError(files, xhr, "Request timedout after ".concat(_this15.options.timeout / 1000, " seconds"));
  33132. };
  33133. xhr.onerror = function () {
  33134. _this15._handleUploadError(files, xhr);
  33135. }; // Some browsers do not have the .upload property
  33136. var progressObj = xhr.upload != null ? xhr.upload : xhr;
  33137. progressObj.onprogress = function (e) {
  33138. return _this15._updateFilesUploadProgress(files, xhr, e);
  33139. };
  33140. var headers = {
  33141. Accept: "application/json",
  33142. "Cache-Control": "no-cache",
  33143. "X-Requested-With": "XMLHttpRequest"
  33144. };
  33145. if (this.options.headers) {
  33146. Dropzone.extend(headers, this.options.headers);
  33147. }
  33148. for (var headerName in headers) {
  33149. var headerValue = headers[headerName];
  33150. if (headerValue) {
  33151. xhr.setRequestHeader(headerName, headerValue);
  33152. }
  33153. }
  33154. var formData = new FormData(); // Adding all @options parameters
  33155. if (this.options.params) {
  33156. var additionalParams = this.options.params;
  33157. if (typeof additionalParams === "function") {
  33158. additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);
  33159. }
  33160. for (var key in additionalParams) {
  33161. var value = additionalParams[key];
  33162. if (Array.isArray(value)) {
  33163. // The additional parameter contains an array,
  33164. // so lets iterate over it to attach each value
  33165. // individually.
  33166. for (var i = 0; i < value.length; i++) {
  33167. formData.append(key, value[i]);
  33168. }
  33169. } else {
  33170. formData.append(key, value);
  33171. }
  33172. }
  33173. } // Let the user add additional data if necessary
  33174. var _iterator14 = dropzone_createForOfIteratorHelper(files, true),
  33175. _step14;
  33176. try {
  33177. for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
  33178. var _file = _step14.value;
  33179. this.emit("sending", _file, xhr, formData);
  33180. }
  33181. } catch (err) {
  33182. _iterator14.e(err);
  33183. } finally {
  33184. _iterator14.f();
  33185. }
  33186. if (this.options.uploadMultiple) {
  33187. this.emit("sendingmultiple", files, xhr, formData);
  33188. }
  33189. this._addFormElementData(formData); // Finally add the files
  33190. // Has to be last because some servers (eg: S3) expect the file to be the last parameter
  33191. for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) {
  33192. var dataBlock = dataBlocks[_i3];
  33193. formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);
  33194. }
  33195. this.submitRequest(xhr, formData, files);
  33196. } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.
  33197. }, {
  33198. key: "_transformFiles",
  33199. value: function _transformFiles(files, done) {
  33200. var _this16 = this;
  33201. var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.
  33202. var doneCounter = 0;
  33203. var _loop = function _loop(i) {
  33204. _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {
  33205. transformedFiles[i] = transformedFile;
  33206. if (++doneCounter === files.length) {
  33207. done(transformedFiles);
  33208. }
  33209. });
  33210. };
  33211. for (var i = 0; i < files.length; i++) {
  33212. _loop(i);
  33213. }
  33214. } // Takes care of adding other input elements of the form to the AJAX request
  33215. }, {
  33216. key: "_addFormElementData",
  33217. value: function _addFormElementData(formData) {
  33218. // Take care of other input elements
  33219. if (this.element.tagName === "FORM") {
  33220. var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"), true),
  33221. _step15;
  33222. try {
  33223. for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
  33224. var input = _step15.value;
  33225. var inputName = input.getAttribute("name");
  33226. var inputType = input.getAttribute("type");
  33227. if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.
  33228. if (typeof inputName === "undefined" || inputName === null) continue;
  33229. if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
  33230. // Possibly multiple values
  33231. var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true),
  33232. _step16;
  33233. try {
  33234. for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
  33235. var option = _step16.value;
  33236. if (option.selected) {
  33237. formData.append(inputName, option.value);
  33238. }
  33239. }
  33240. } catch (err) {
  33241. _iterator16.e(err);
  33242. } finally {
  33243. _iterator16.f();
  33244. }
  33245. } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) {
  33246. formData.append(inputName, input.value);
  33247. }
  33248. }
  33249. } catch (err) {
  33250. _iterator15.e(err);
  33251. } finally {
  33252. _iterator15.f();
  33253. }
  33254. }
  33255. } // Invoked when there is new progress information about given files.
  33256. // If e is not provided, it is assumed that the upload is finished.
  33257. }, {
  33258. key: "_updateFilesUploadProgress",
  33259. value: function _updateFilesUploadProgress(files, xhr, e) {
  33260. if (!files[0].upload.chunked) {
  33261. // Handle file uploads without chunking
  33262. var _iterator17 = dropzone_createForOfIteratorHelper(files, true),
  33263. _step17;
  33264. try {
  33265. for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
  33266. var file = _step17.value;
  33267. if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) {
  33268. // If both, the `total` and `bytesSent` have already been set, and
  33269. // they are equal (meaning progress is at 100%), we can skip this
  33270. // file, since an upload progress shouldn't go down.
  33271. continue;
  33272. }
  33273. if (e) {
  33274. file.upload.progress = 100 * e.loaded / e.total;
  33275. file.upload.total = e.total;
  33276. file.upload.bytesSent = e.loaded;
  33277. } else {
  33278. // No event, so we're at 100%
  33279. file.upload.progress = 100;
  33280. file.upload.bytesSent = file.upload.total;
  33281. }
  33282. this.emit("uploadprogress", file, file.upload.progress, file.upload.bytesSent);
  33283. }
  33284. } catch (err) {
  33285. _iterator17.e(err);
  33286. } finally {
  33287. _iterator17.f();
  33288. }
  33289. } else {
  33290. // Handle chunked file uploads
  33291. // Chunked upload is not compatible with uploading multiple files in one
  33292. // request, so we know there's only one file.
  33293. var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk
  33294. // progress.
  33295. var chunk = this._getChunk(_file2, xhr);
  33296. if (e) {
  33297. chunk.progress = 100 * e.loaded / e.total;
  33298. chunk.total = e.total;
  33299. chunk.bytesSent = e.loaded;
  33300. } else {
  33301. // No event, so we're at 100%
  33302. chunk.progress = 100;
  33303. chunk.bytesSent = chunk.total;
  33304. } // Now tally the *file* upload progress from its individual chunks
  33305. _file2.upload.progress = 0;
  33306. _file2.upload.total = 0;
  33307. _file2.upload.bytesSent = 0;
  33308. for (var i = 0; i < _file2.upload.totalChunkCount; i++) {
  33309. if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== "undefined") {
  33310. _file2.upload.progress += _file2.upload.chunks[i].progress;
  33311. _file2.upload.total += _file2.upload.chunks[i].total;
  33312. _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent;
  33313. }
  33314. } // Since the process is a percentage, we need to divide by the amount of
  33315. // chunks we've used.
  33316. _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount;
  33317. this.emit("uploadprogress", _file2, _file2.upload.progress, _file2.upload.bytesSent);
  33318. }
  33319. }
  33320. }, {
  33321. key: "_finishedUploading",
  33322. value: function _finishedUploading(files, xhr, e) {
  33323. var response;
  33324. if (files[0].status === Dropzone.CANCELED) {
  33325. return;
  33326. }
  33327. if (xhr.readyState !== 4) {
  33328. return;
  33329. }
  33330. if (xhr.responseType !== "arraybuffer" && xhr.responseType !== "blob") {
  33331. response = xhr.responseText;
  33332. if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
  33333. try {
  33334. response = JSON.parse(response);
  33335. } catch (error) {
  33336. e = error;
  33337. response = "Invalid JSON response from server.";
  33338. }
  33339. }
  33340. }
  33341. this._updateFilesUploadProgress(files, xhr);
  33342. if (!(200 <= xhr.status && xhr.status < 300)) {
  33343. this._handleUploadError(files, xhr, response);
  33344. } else {
  33345. if (files[0].upload.chunked) {
  33346. files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response);
  33347. } else {
  33348. this._finished(files, response, e);
  33349. }
  33350. }
  33351. }
  33352. }, {
  33353. key: "_handleUploadError",
  33354. value: function _handleUploadError(files, xhr, response) {
  33355. if (files[0].status === Dropzone.CANCELED) {
  33356. return;
  33357. }
  33358. if (files[0].upload.chunked && this.options.retryChunks) {
  33359. var chunk = this._getChunk(files[0], xhr);
  33360. if (chunk.retries++ < this.options.retryChunksLimit) {
  33361. this._uploadData(files, [chunk.dataBlock]);
  33362. return;
  33363. } else {
  33364. console.warn("Retried this chunk too often. Giving up.");
  33365. }
  33366. }
  33367. this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
  33368. }
  33369. }, {
  33370. key: "submitRequest",
  33371. value: function submitRequest(xhr, formData, files) {
  33372. if (xhr.readyState != 1) {
  33373. console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");
  33374. return;
  33375. }
  33376. xhr.send(formData);
  33377. } // Called internally when processing is finished.
  33378. // Individual callbacks have to be called in the appropriate sections.
  33379. }, {
  33380. key: "_finished",
  33381. value: function _finished(files, responseText, e) {
  33382. var _iterator18 = dropzone_createForOfIteratorHelper(files, true),
  33383. _step18;
  33384. try {
  33385. for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
  33386. var file = _step18.value;
  33387. file.status = Dropzone.SUCCESS;
  33388. this.emit("success", file, responseText, e);
  33389. this.emit("complete", file);
  33390. }
  33391. } catch (err) {
  33392. _iterator18.e(err);
  33393. } finally {
  33394. _iterator18.f();
  33395. }
  33396. if (this.options.uploadMultiple) {
  33397. this.emit("successmultiple", files, responseText, e);
  33398. this.emit("completemultiple", files);
  33399. }
  33400. if (this.options.autoProcessQueue) {
  33401. return this.processQueue();
  33402. }
  33403. } // Called internally when processing is finished.
  33404. // Individual callbacks have to be called in the appropriate sections.
  33405. }, {
  33406. key: "_errorProcessing",
  33407. value: function _errorProcessing(files, message, xhr) {
  33408. var _iterator19 = dropzone_createForOfIteratorHelper(files, true),
  33409. _step19;
  33410. try {
  33411. for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
  33412. var file = _step19.value;
  33413. file.status = Dropzone.ERROR;
  33414. this.emit("error", file, message, xhr);
  33415. this.emit("complete", file);
  33416. }
  33417. } catch (err) {
  33418. _iterator19.e(err);
  33419. } finally {
  33420. _iterator19.f();
  33421. }
  33422. if (this.options.uploadMultiple) {
  33423. this.emit("errormultiple", files, message, xhr);
  33424. this.emit("completemultiple", files);
  33425. }
  33426. if (this.options.autoProcessQueue) {
  33427. return this.processQueue();
  33428. }
  33429. }
  33430. }], [{
  33431. key: "initClass",
  33432. value: function initClass() {
  33433. // Exposing the emitter class, mainly for tests
  33434. this.prototype.Emitter = Emitter;
  33435. /*
  33436. This is a list of all available events you can register on a dropzone object.
  33437. You can register an event handler like this:
  33438. dropzone.on("dragEnter", function() { });
  33439. */
  33440. this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
  33441. this.prototype._thumbnailQueue = [];
  33442. this.prototype._processingThumbnail = false;
  33443. } // global utility
  33444. }, {
  33445. key: "extend",
  33446. value: function extend(target) {
  33447. for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  33448. objects[_key2 - 1] = arguments[_key2];
  33449. }
  33450. for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) {
  33451. var object = _objects[_i4];
  33452. for (var key in object) {
  33453. var val = object[key];
  33454. target[key] = val;
  33455. }
  33456. }
  33457. return target;
  33458. }
  33459. }, {
  33460. key: "uuidv4",
  33461. value: function uuidv4() {
  33462. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
  33463. var r = Math.random() * 16 | 0,
  33464. v = c === "x" ? r : r & 0x3 | 0x8;
  33465. return v.toString(16);
  33466. });
  33467. }
  33468. }]);
  33469. return Dropzone;
  33470. }(Emitter);
  33471. Dropzone.initClass();
  33472. Dropzone.version = "5.9.2"; // This is a map of options for your different dropzones. Add configurations
  33473. // to this object for your different dropzone elemens.
  33474. //
  33475. // Example:
  33476. //
  33477. // Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };
  33478. //
  33479. // To disable autoDiscover for a specific element, you can set `false` as an option:
  33480. //
  33481. // Dropzone.options.myDisabledElementId = false;
  33482. //
  33483. // And in html:
  33484. //
  33485. // <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form>
  33486. Dropzone.options = {}; // Returns the options for an element or undefined if none available.
  33487. Dropzone.optionsForElement = function (element) {
  33488. // Get the `Dropzone.options.elementId` for this element if it exists
  33489. if (element.getAttribute("id")) {
  33490. return Dropzone.options[camelize(element.getAttribute("id"))];
  33491. } else {
  33492. return undefined;
  33493. }
  33494. }; // Holds a list of all dropzone instances
  33495. Dropzone.instances = []; // Returns the dropzone for given element if any
  33496. Dropzone.forElement = function (element) {
  33497. if (typeof element === "string") {
  33498. element = document.querySelector(element);
  33499. }
  33500. if ((element != null ? element.dropzone : undefined) == null) {
  33501. throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
  33502. }
  33503. return element.dropzone;
  33504. }; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.
  33505. Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them
  33506. Dropzone.discover = function () {
  33507. var dropzones;
  33508. if (document.querySelectorAll) {
  33509. dropzones = document.querySelectorAll(".dropzone");
  33510. } else {
  33511. dropzones = []; // IE :(
  33512. var checkElements = function checkElements(elements) {
  33513. return function () {
  33514. var result = [];
  33515. var _iterator20 = dropzone_createForOfIteratorHelper(elements, true),
  33516. _step20;
  33517. try {
  33518. for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
  33519. var el = _step20.value;
  33520. if (/(^| )dropzone($| )/.test(el.className)) {
  33521. result.push(dropzones.push(el));
  33522. } else {
  33523. result.push(undefined);
  33524. }
  33525. }
  33526. } catch (err) {
  33527. _iterator20.e(err);
  33528. } finally {
  33529. _iterator20.f();
  33530. }
  33531. return result;
  33532. }();
  33533. };
  33534. checkElements(document.getElementsByTagName("div"));
  33535. checkElements(document.getElementsByTagName("form"));
  33536. }
  33537. return function () {
  33538. var result = [];
  33539. var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true),
  33540. _step21;
  33541. try {
  33542. for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
  33543. var dropzone = _step21.value;
  33544. // Create a dropzone unless auto discover has been disabled for specific element
  33545. if (Dropzone.optionsForElement(dropzone) !== false) {
  33546. result.push(new Dropzone(dropzone));
  33547. } else {
  33548. result.push(undefined);
  33549. }
  33550. }
  33551. } catch (err) {
  33552. _iterator21.e(err);
  33553. } finally {
  33554. _iterator21.f();
  33555. }
  33556. return result;
  33557. }();
  33558. }; // Some browsers support drag and drog functionality, but not correctly.
  33559. //
  33560. // So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.
  33561. // But what to do when browsers *theoretically* support an API, but crash
  33562. // when using it.
  33563. //
  33564. // This is a list of regular expressions tested against navigator.userAgent
  33565. //
  33566. // ** It should only be used on browser that *do* support the API, but
  33567. // incorrectly **
  33568. Dropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.
  33569. /opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported
  33570. Dropzone.isBrowserSupported = function () {
  33571. var capableBrowser = true;
  33572. if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
  33573. if (!("classList" in document.createElement("a"))) {
  33574. capableBrowser = false;
  33575. } else {
  33576. if (Dropzone.blacklistedBrowsers !== undefined) {
  33577. // Since this has been renamed, this makes sure we don't break older
  33578. // configuration.
  33579. Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers;
  33580. } // The browser supports the API, but may be blocked.
  33581. var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true),
  33582. _step22;
  33583. try {
  33584. for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
  33585. var regex = _step22.value;
  33586. if (regex.test(navigator.userAgent)) {
  33587. capableBrowser = false;
  33588. continue;
  33589. }
  33590. }
  33591. } catch (err) {
  33592. _iterator22.e(err);
  33593. } finally {
  33594. _iterator22.f();
  33595. }
  33596. }
  33597. } else {
  33598. capableBrowser = false;
  33599. }
  33600. return capableBrowser;
  33601. };
  33602. Dropzone.dataURItoBlob = function (dataURI) {
  33603. // convert base64 to raw binary data held in a string
  33604. // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
  33605. var byteString = atob(dataURI.split(",")[1]); // separate out the mime component
  33606. var mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0]; // write the bytes of the string to an ArrayBuffer
  33607. var ab = new ArrayBuffer(byteString.length);
  33608. var ia = new Uint8Array(ab);
  33609. for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {
  33610. ia[i] = byteString.charCodeAt(i);
  33611. } // write the ArrayBuffer to a blob
  33612. return new Blob([ab], {
  33613. type: mimeString
  33614. });
  33615. }; // Returns an array without the rejected item
  33616. var without = function without(list, rejectedItem) {
  33617. return list.filter(function (item) {
  33618. return item !== rejectedItem;
  33619. }).map(function (item) {
  33620. return item;
  33621. });
  33622. }; // abc-def_ghi -> abcDefGhi
  33623. var camelize = function camelize(str) {
  33624. return str.replace(/[\-_](\w)/g, function (match) {
  33625. return match.charAt(1).toUpperCase();
  33626. });
  33627. }; // Creates an element from string
  33628. Dropzone.createElement = function (string) {
  33629. var div = document.createElement("div");
  33630. div.innerHTML = string;
  33631. return div.childNodes[0];
  33632. }; // Tests if given element is inside (or simply is) the container
  33633. Dropzone.elementInside = function (element, container) {
  33634. if (element === container) {
  33635. return true;
  33636. } // Coffeescript doesn't support do/while loops
  33637. while (element = element.parentNode) {
  33638. if (element === container) {
  33639. return true;
  33640. }
  33641. }
  33642. return false;
  33643. };
  33644. Dropzone.getElement = function (el, name) {
  33645. var element;
  33646. if (typeof el === "string") {
  33647. element = document.querySelector(el);
  33648. } else if (el.nodeType != null) {
  33649. element = el;
  33650. }
  33651. if (element == null) {
  33652. throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector or a plain HTML element."));
  33653. }
  33654. return element;
  33655. };
  33656. Dropzone.getElements = function (els, name) {
  33657. var el, elements;
  33658. if (els instanceof Array) {
  33659. elements = [];
  33660. try {
  33661. var _iterator23 = dropzone_createForOfIteratorHelper(els, true),
  33662. _step23;
  33663. try {
  33664. for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
  33665. el = _step23.value;
  33666. elements.push(this.getElement(el, name));
  33667. }
  33668. } catch (err) {
  33669. _iterator23.e(err);
  33670. } finally {
  33671. _iterator23.f();
  33672. }
  33673. } catch (e) {
  33674. elements = null;
  33675. }
  33676. } else if (typeof els === "string") {
  33677. elements = [];
  33678. var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true),
  33679. _step24;
  33680. try {
  33681. for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
  33682. el = _step24.value;
  33683. elements.push(el);
  33684. }
  33685. } catch (err) {
  33686. _iterator24.e(err);
  33687. } finally {
  33688. _iterator24.f();
  33689. }
  33690. } else if (els.nodeType != null) {
  33691. elements = [els];
  33692. }
  33693. if (elements == null || !elements.length) {
  33694. throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));
  33695. }
  33696. return elements;
  33697. }; // Asks the user the question and calls accepted or rejected accordingly
  33698. //
  33699. // The default implementation just uses `window.confirm` and then calls the
  33700. // appropriate callback.
  33701. Dropzone.confirm = function (question, accepted, rejected) {
  33702. if (window.confirm(question)) {
  33703. return accepted();
  33704. } else if (rejected != null) {
  33705. return rejected();
  33706. }
  33707. }; // Validates the mime type like this:
  33708. //
  33709. // https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept
  33710. Dropzone.isValidFile = function (file, acceptedFiles) {
  33711. if (!acceptedFiles) {
  33712. return true;
  33713. } // If there are no accepted mime types, it's OK
  33714. acceptedFiles = acceptedFiles.split(",");
  33715. var mimeType = file.type;
  33716. var baseMimeType = mimeType.replace(/\/.*$/, "");
  33717. var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true),
  33718. _step25;
  33719. try {
  33720. for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
  33721. var validType = _step25.value;
  33722. validType = validType.trim();
  33723. if (validType.charAt(0) === ".") {
  33724. if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
  33725. return true;
  33726. }
  33727. } else if (/\/\*$/.test(validType)) {
  33728. // This is something like a image/* mime type
  33729. if (baseMimeType === validType.replace(/\/.*$/, "")) {
  33730. return true;
  33731. }
  33732. } else {
  33733. if (mimeType === validType) {
  33734. return true;
  33735. }
  33736. }
  33737. }
  33738. } catch (err) {
  33739. _iterator25.e(err);
  33740. } finally {
  33741. _iterator25.f();
  33742. }
  33743. return false;
  33744. }; // Augment jQuery
  33745. if (typeof jQuery !== "undefined" && jQuery !== null) {
  33746. jQuery.fn.dropzone = function (options) {
  33747. return this.each(function () {
  33748. return new Dropzone(this, options);
  33749. });
  33750. };
  33751. } // Dropzone file status codes
  33752. Dropzone.ADDED = "added";
  33753. Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued
  33754. // or uploading.
  33755. Dropzone.ACCEPTED = Dropzone.QUEUED;
  33756. Dropzone.UPLOADING = "uploading";
  33757. Dropzone.PROCESSING = Dropzone.UPLOADING; // alias
  33758. Dropzone.CANCELED = "canceled";
  33759. Dropzone.ERROR = "error";
  33760. Dropzone.SUCCESS = "success";
  33761. /*
  33762. Bugfix for iOS 6 and 7
  33763. Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
  33764. based on the work of https://github.com/stomita/ios-imagefile-megapixel
  33765. */
  33766. // Detecting vertical squash in loaded image.
  33767. // Fixes a bug which squash image vertically while drawing into canvas for some images.
  33768. // This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel
  33769. var detectVerticalSquash = function detectVerticalSquash(img) {
  33770. var iw = img.naturalWidth;
  33771. var ih = img.naturalHeight;
  33772. var canvas = document.createElement("canvas");
  33773. canvas.width = 1;
  33774. canvas.height = ih;
  33775. var ctx = canvas.getContext("2d");
  33776. ctx.drawImage(img, 0, 0);
  33777. var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),
  33778. data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.
  33779. var sy = 0;
  33780. var ey = ih;
  33781. var py = ih;
  33782. while (py > sy) {
  33783. var alpha = data[(py - 1) * 4 + 3];
  33784. if (alpha === 0) {
  33785. ey = py;
  33786. } else {
  33787. sy = py;
  33788. }
  33789. py = ey + sy >> 1;
  33790. }
  33791. var ratio = py / ih;
  33792. if (ratio === 0) {
  33793. return 1;
  33794. } else {
  33795. return ratio;
  33796. }
  33797. }; // A replacement for context.drawImage
  33798. // (args are for source and destination).
  33799. var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
  33800. var vertSquashRatio = detectVerticalSquash(img);
  33801. return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
  33802. }; // Based on MinifyJpeg
  33803. // Source: http://www.perry.cz/files/ExifRestorer.js
  33804. // http://elicon.blog57.fc2.com/blog-entry-206.html
  33805. var ExifRestore = /*#__PURE__*/function () {
  33806. function ExifRestore() {
  33807. dropzone_classCallCheck(this, ExifRestore);
  33808. }
  33809. dropzone_createClass(ExifRestore, null, [{
  33810. key: "initClass",
  33811. value: function initClass() {
  33812. this.KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  33813. }
  33814. }, {
  33815. key: "encode64",
  33816. value: function encode64(input) {
  33817. var output = "";
  33818. var chr1 = undefined;
  33819. var chr2 = undefined;
  33820. var chr3 = "";
  33821. var enc1 = undefined;
  33822. var enc2 = undefined;
  33823. var enc3 = undefined;
  33824. var enc4 = "";
  33825. var i = 0;
  33826. while (true) {
  33827. chr1 = input[i++];
  33828. chr2 = input[i++];
  33829. chr3 = input[i++];
  33830. enc1 = chr1 >> 2;
  33831. enc2 = (chr1 & 3) << 4 | chr2 >> 4;
  33832. enc3 = (chr2 & 15) << 2 | chr3 >> 6;
  33833. enc4 = chr3 & 63;
  33834. if (isNaN(chr2)) {
  33835. enc3 = enc4 = 64;
  33836. } else if (isNaN(chr3)) {
  33837. enc4 = 64;
  33838. }
  33839. output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);
  33840. chr1 = chr2 = chr3 = "";
  33841. enc1 = enc2 = enc3 = enc4 = "";
  33842. if (!(i < input.length)) {
  33843. break;
  33844. }
  33845. }
  33846. return output;
  33847. }
  33848. }, {
  33849. key: "restore",
  33850. value: function restore(origFileBase64, resizedFileBase64) {
  33851. if (!origFileBase64.match("data:image/jpeg;base64,")) {
  33852. return resizedFileBase64;
  33853. }
  33854. var rawImage = this.decode64(origFileBase64.replace("data:image/jpeg;base64,", ""));
  33855. var segments = this.slice2Segments(rawImage);
  33856. var image = this.exifManipulation(resizedFileBase64, segments);
  33857. return "data:image/jpeg;base64,".concat(this.encode64(image));
  33858. }
  33859. }, {
  33860. key: "exifManipulation",
  33861. value: function exifManipulation(resizedFileBase64, segments) {
  33862. var exifArray = this.getExifArray(segments);
  33863. var newImageArray = this.insertExif(resizedFileBase64, exifArray);
  33864. var aBuffer = new Uint8Array(newImageArray);
  33865. return aBuffer;
  33866. }
  33867. }, {
  33868. key: "getExifArray",
  33869. value: function getExifArray(segments) {
  33870. var seg = undefined;
  33871. var x = 0;
  33872. while (x < segments.length) {
  33873. seg = segments[x];
  33874. if (seg[0] === 255 & seg[1] === 225) {
  33875. return seg;
  33876. }
  33877. x++;
  33878. }
  33879. return [];
  33880. }
  33881. }, {
  33882. key: "insertExif",
  33883. value: function insertExif(resizedFileBase64, exifArray) {
  33884. var imageData = resizedFileBase64.replace("data:image/jpeg;base64,", "");
  33885. var buf = this.decode64(imageData);
  33886. var separatePoint = buf.indexOf(255, 3);
  33887. var mae = buf.slice(0, separatePoint);
  33888. var ato = buf.slice(separatePoint);
  33889. var array = mae;
  33890. array = array.concat(exifArray);
  33891. array = array.concat(ato);
  33892. return array;
  33893. }
  33894. }, {
  33895. key: "slice2Segments",
  33896. value: function slice2Segments(rawImageArray) {
  33897. var head = 0;
  33898. var segments = [];
  33899. while (true) {
  33900. var length;
  33901. if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {
  33902. break;
  33903. }
  33904. if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {
  33905. head += 2;
  33906. } else {
  33907. length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];
  33908. var endPoint = head + length + 2;
  33909. var seg = rawImageArray.slice(head, endPoint);
  33910. segments.push(seg);
  33911. head = endPoint;
  33912. }
  33913. if (head > rawImageArray.length) {
  33914. break;
  33915. }
  33916. }
  33917. return segments;
  33918. }
  33919. }, {
  33920. key: "decode64",
  33921. value: function decode64(input) {
  33922. var output = "";
  33923. var chr1 = undefined;
  33924. var chr2 = undefined;
  33925. var chr3 = "";
  33926. var enc1 = undefined;
  33927. var enc2 = undefined;
  33928. var enc3 = undefined;
  33929. var enc4 = "";
  33930. var i = 0;
  33931. var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
  33932. var base64test = /[^A-Za-z0-9\+\/\=]/g;
  33933. if (base64test.exec(input)) {
  33934. console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.");
  33935. }
  33936. input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  33937. while (true) {
  33938. enc1 = this.KEY_STR.indexOf(input.charAt(i++));
  33939. enc2 = this.KEY_STR.indexOf(input.charAt(i++));
  33940. enc3 = this.KEY_STR.indexOf(input.charAt(i++));
  33941. enc4 = this.KEY_STR.indexOf(input.charAt(i++));
  33942. chr1 = enc1 << 2 | enc2 >> 4;
  33943. chr2 = (enc2 & 15) << 4 | enc3 >> 2;
  33944. chr3 = (enc3 & 3) << 6 | enc4;
  33945. buf.push(chr1);
  33946. if (enc3 !== 64) {
  33947. buf.push(chr2);
  33948. }
  33949. if (enc4 !== 64) {
  33950. buf.push(chr3);
  33951. }
  33952. chr1 = chr2 = chr3 = "";
  33953. enc1 = enc2 = enc3 = enc4 = "";
  33954. if (!(i < input.length)) {
  33955. break;
  33956. }
  33957. }
  33958. return buf;
  33959. }
  33960. }]);
  33961. return ExifRestore;
  33962. }();
  33963. ExifRestore.initClass();
  33964. /*
  33965. * contentloaded.js
  33966. *
  33967. * Author: Diego Perini (diego.perini at gmail.com)
  33968. * Summary: cross-browser wrapper for DOMContentLoaded
  33969. * Updated: 20101020
  33970. * License: MIT
  33971. * Version: 1.2
  33972. *
  33973. * URL:
  33974. * http://javascript.nwbox.com/ContentLoaded/
  33975. * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
  33976. */
  33977. // @win window reference
  33978. // @fn function reference
  33979. var contentLoaded = function contentLoaded(win, fn) {
  33980. var done = false;
  33981. var top = true;
  33982. var doc = win.document;
  33983. var root = doc.documentElement;
  33984. var add = doc.addEventListener ? "addEventListener" : "attachEvent";
  33985. var rem = doc.addEventListener ? "removeEventListener" : "detachEvent";
  33986. var pre = doc.addEventListener ? "" : "on";
  33987. var init = function init(e) {
  33988. if (e.type === "readystatechange" && doc.readyState !== "complete") {
  33989. return;
  33990. }
  33991. (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
  33992. if (!done && (done = true)) {
  33993. return fn.call(win, e.type || e);
  33994. }
  33995. };
  33996. var poll = function poll() {
  33997. try {
  33998. root.doScroll("left");
  33999. } catch (e) {
  34000. setTimeout(poll, 50);
  34001. return;
  34002. }
  34003. return init("poll");
  34004. };
  34005. if (doc.readyState !== "complete") {
  34006. if (doc.createEventObject && root.doScroll) {
  34007. try {
  34008. top = !win.frameElement;
  34009. } catch (error) {}
  34010. if (top) {
  34011. poll();
  34012. }
  34013. }
  34014. doc[add](pre + "DOMContentLoaded", init, false);
  34015. doc[add](pre + "readystatechange", init, false);
  34016. return win[add](pre + "load", init, false);
  34017. }
  34018. }; // As a single function to be able to write tests.
  34019. Dropzone._autoDiscoverFunction = function () {
  34020. if (Dropzone.autoDiscover) {
  34021. return Dropzone.discover();
  34022. }
  34023. };
  34024. contentLoaded(window, Dropzone._autoDiscoverFunction);
  34025. function __guard__(value, transform) {
  34026. return typeof value !== "undefined" && value !== null ? transform(value) : undefined;
  34027. }
  34028. function __guardMethod__(obj, methodName, transform) {
  34029. if (typeof obj !== "undefined" && obj !== null && typeof obj[methodName] === "function") {
  34030. return transform(obj, methodName);
  34031. } else {
  34032. return undefined;
  34033. }
  34034. }
  34035. ;// CONCATENATED MODULE: ./tool/dropzone.dist.js
  34036. /// Make Dropzone a global variable.
  34037. window.Dropzone = Dropzone;
  34038. /* harmony default export */ var dropzone_dist = (Dropzone);
  34039. }();
  34040. /******/ return __webpack_exports__;
  34041. /******/ })()
  34042. ;
  34043. });
  34044. /***/ }),
  34045. /***/ 31126:
  34046. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34047. "use strict";
  34048. // Inspired by Google Closure:
  34049. // http://closure-library.googlecode.com/svn/docs/
  34050. // closure_goog_array_array.js.html#goog.array.clear
  34051. var value = __webpack_require__(32745);
  34052. module.exports = function () {
  34053. value(this).length = 0;
  34054. return this;
  34055. };
  34056. /***/ }),
  34057. /***/ 62041:
  34058. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34059. "use strict";
  34060. var numberIsNaN = __webpack_require__(59980)
  34061. , toPosInt = __webpack_require__(73902)
  34062. , value = __webpack_require__(32745)
  34063. , indexOf = Array.prototype.indexOf
  34064. , objHasOwnProperty = Object.prototype.hasOwnProperty
  34065. , abs = Math.abs
  34066. , floor = Math.floor;
  34067. module.exports = function (searchElement/*, fromIndex*/) {
  34068. var i, length, fromIndex, val;
  34069. if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);
  34070. length = toPosInt(value(this).length);
  34071. fromIndex = arguments[1];
  34072. if (isNaN(fromIndex)) fromIndex = 0;
  34073. else if (fromIndex >= 0) fromIndex = floor(fromIndex);
  34074. else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
  34075. for (i = fromIndex; i < length; ++i) {
  34076. if (objHasOwnProperty.call(this, i)) {
  34077. val = this[i];
  34078. if (numberIsNaN(val)) return i; // Jslint: ignore
  34079. }
  34080. }
  34081. return -1;
  34082. };
  34083. /***/ }),
  34084. /***/ 84616:
  34085. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34086. "use strict";
  34087. module.exports = __webpack_require__(47379)() ? Array.from : __webpack_require__(62669);
  34088. /***/ }),
  34089. /***/ 47379:
  34090. /***/ ((module) => {
  34091. "use strict";
  34092. module.exports = function () {
  34093. var from = Array.from, arr, result;
  34094. if (typeof from !== "function") return false;
  34095. arr = ["raz", "dwa"];
  34096. result = from(arr);
  34097. return Boolean(result && result !== arr && result[1] === "dwa");
  34098. };
  34099. /***/ }),
  34100. /***/ 62669:
  34101. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34102. "use strict";
  34103. var iteratorSymbol = __webpack_require__(98641).iterator
  34104. , isArguments = __webpack_require__(56766)
  34105. , isFunction = __webpack_require__(31216)
  34106. , toPosInt = __webpack_require__(73902)
  34107. , callable = __webpack_require__(31290)
  34108. , validValue = __webpack_require__(32745)
  34109. , isValue = __webpack_require__(76914)
  34110. , isString = __webpack_require__(84349)
  34111. , isArray = Array.isArray
  34112. , call = Function.prototype.call
  34113. , desc = { configurable: true, enumerable: true, writable: true, value: null }
  34114. , defineProperty = Object.defineProperty;
  34115. // eslint-disable-next-line complexity, max-lines-per-function
  34116. module.exports = function (arrayLike/*, mapFn, thisArg*/) {
  34117. var mapFn = arguments[1]
  34118. , thisArg = arguments[2]
  34119. , Context
  34120. , i
  34121. , j
  34122. , arr
  34123. , length
  34124. , code
  34125. , iterator
  34126. , result
  34127. , getIterator
  34128. , value;
  34129. arrayLike = Object(validValue(arrayLike));
  34130. if (isValue(mapFn)) callable(mapFn);
  34131. if (!this || this === Array || !isFunction(this)) {
  34132. // Result: Plain array
  34133. if (!mapFn) {
  34134. if (isArguments(arrayLike)) {
  34135. // Source: Arguments
  34136. length = arrayLike.length;
  34137. if (length !== 1) return Array.apply(null, arrayLike);
  34138. arr = new Array(1);
  34139. arr[0] = arrayLike[0];
  34140. return arr;
  34141. }
  34142. if (isArray(arrayLike)) {
  34143. // Source: Array
  34144. arr = new Array((length = arrayLike.length));
  34145. for (i = 0; i < length; ++i) arr[i] = arrayLike[i];
  34146. return arr;
  34147. }
  34148. }
  34149. arr = [];
  34150. } else {
  34151. // Result: Non plain array
  34152. Context = this;
  34153. }
  34154. if (!isArray(arrayLike)) {
  34155. if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
  34156. // Source: Iterator
  34157. iterator = callable(getIterator).call(arrayLike);
  34158. if (Context) arr = new Context();
  34159. result = iterator.next();
  34160. i = 0;
  34161. while (!result.done) {
  34162. value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
  34163. if (Context) {
  34164. desc.value = value;
  34165. defineProperty(arr, i, desc);
  34166. } else {
  34167. arr[i] = value;
  34168. }
  34169. result = iterator.next();
  34170. ++i;
  34171. }
  34172. length = i;
  34173. } else if (isString(arrayLike)) {
  34174. // Source: String
  34175. length = arrayLike.length;
  34176. if (Context) arr = new Context();
  34177. for (i = 0, j = 0; i < length; ++i) {
  34178. value = arrayLike[i];
  34179. if (i + 1 < length) {
  34180. code = value.charCodeAt(0);
  34181. // eslint-disable-next-line max-depth
  34182. if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];
  34183. }
  34184. value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
  34185. if (Context) {
  34186. desc.value = value;
  34187. defineProperty(arr, j, desc);
  34188. } else {
  34189. arr[j] = value;
  34190. }
  34191. ++j;
  34192. }
  34193. length = j;
  34194. }
  34195. }
  34196. if (length === undefined) {
  34197. // Source: array or array-like
  34198. length = toPosInt(arrayLike.length);
  34199. if (Context) arr = new Context(length);
  34200. for (i = 0; i < length; ++i) {
  34201. value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
  34202. if (Context) {
  34203. desc.value = value;
  34204. defineProperty(arr, i, desc);
  34205. } else {
  34206. arr[i] = value;
  34207. }
  34208. }
  34209. }
  34210. if (Context) {
  34211. desc.value = null;
  34212. arr.length = length;
  34213. }
  34214. return arr;
  34215. };
  34216. /***/ }),
  34217. /***/ 56766:
  34218. /***/ ((module) => {
  34219. "use strict";
  34220. var objToString = Object.prototype.toString
  34221. , id = objToString.call((function () { return arguments; })());
  34222. module.exports = function (value) { return objToString.call(value) === id; };
  34223. /***/ }),
  34224. /***/ 31216:
  34225. /***/ ((module) => {
  34226. "use strict";
  34227. var objToString = Object.prototype.toString
  34228. , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
  34229. module.exports = function (value) {
  34230. return typeof value === "function" && isFunctionStringTag(objToString.call(value));
  34231. };
  34232. /***/ }),
  34233. /***/ 70430:
  34234. /***/ ((module) => {
  34235. "use strict";
  34236. // eslint-disable-next-line no-empty-function
  34237. module.exports = function () {};
  34238. /***/ }),
  34239. /***/ 85875:
  34240. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34241. "use strict";
  34242. module.exports = __webpack_require__(45448)() ? Math.sign : __webpack_require__(94592);
  34243. /***/ }),
  34244. /***/ 45448:
  34245. /***/ ((module) => {
  34246. "use strict";
  34247. module.exports = function () {
  34248. var sign = Math.sign;
  34249. if (typeof sign !== "function") return false;
  34250. return sign(10) === 1 && sign(-20) === -1;
  34251. };
  34252. /***/ }),
  34253. /***/ 94592:
  34254. /***/ ((module) => {
  34255. "use strict";
  34256. module.exports = function (value) {
  34257. value = Number(value);
  34258. if (isNaN(value) || value === 0) return value;
  34259. return value > 0 ? 1 : -1;
  34260. };
  34261. /***/ }),
  34262. /***/ 59980:
  34263. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34264. "use strict";
  34265. module.exports = __webpack_require__(39496)() ? Number.isNaN : __webpack_require__(84517);
  34266. /***/ }),
  34267. /***/ 39496:
  34268. /***/ ((module) => {
  34269. "use strict";
  34270. module.exports = function () {
  34271. var numberIsNaN = Number.isNaN;
  34272. if (typeof numberIsNaN !== "function") return false;
  34273. return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
  34274. };
  34275. /***/ }),
  34276. /***/ 84517:
  34277. /***/ ((module) => {
  34278. "use strict";
  34279. module.exports = function (value) {
  34280. // eslint-disable-next-line no-self-compare
  34281. return value !== value;
  34282. };
  34283. /***/ }),
  34284. /***/ 23478:
  34285. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34286. "use strict";
  34287. var sign = __webpack_require__(85875)
  34288. , abs = Math.abs
  34289. , floor = Math.floor;
  34290. module.exports = function (value) {
  34291. if (isNaN(value)) return 0;
  34292. value = Number(value);
  34293. if (value === 0 || !isFinite(value)) return value;
  34294. return sign(value) * floor(abs(value));
  34295. };
  34296. /***/ }),
  34297. /***/ 73902:
  34298. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34299. "use strict";
  34300. var toInteger = __webpack_require__(23478)
  34301. , max = Math.max;
  34302. module.exports = function (value) { return max(0, toInteger(value)); };
  34303. /***/ }),
  34304. /***/ 84214:
  34305. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34306. "use strict";
  34307. // Internal method, used by iteration functions.
  34308. // Calls a function for each key-value pair found in object
  34309. // Optionally takes compareFn to iterate object in specific order
  34310. var callable = __webpack_require__(31290)
  34311. , value = __webpack_require__(32745)
  34312. , bind = Function.prototype.bind
  34313. , call = Function.prototype.call
  34314. , keys = Object.keys
  34315. , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
  34316. module.exports = function (method, defVal) {
  34317. return function (obj, cb/*, thisArg, compareFn*/) {
  34318. var list, thisArg = arguments[2], compareFn = arguments[3];
  34319. obj = Object(value(obj));
  34320. callable(cb);
  34321. list = keys(obj);
  34322. if (compareFn) {
  34323. list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined);
  34324. }
  34325. if (typeof method !== "function") method = list[method];
  34326. return call.call(method, list, function (key, index) {
  34327. if (!objPropertyIsEnumerable.call(obj, key)) return defVal;
  34328. return call.call(cb, thisArg, obj[key], key, obj, index);
  34329. });
  34330. };
  34331. };
  34332. /***/ }),
  34333. /***/ 67191:
  34334. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34335. "use strict";
  34336. module.exports = __webpack_require__(96560)() ? Object.assign : __webpack_require__(47346);
  34337. /***/ }),
  34338. /***/ 96560:
  34339. /***/ ((module) => {
  34340. "use strict";
  34341. module.exports = function () {
  34342. var assign = Object.assign, obj;
  34343. if (typeof assign !== "function") return false;
  34344. obj = { foo: "raz" };
  34345. assign(obj, { bar: "dwa" }, { trzy: "trzy" });
  34346. return obj.foo + obj.bar + obj.trzy === "razdwatrzy";
  34347. };
  34348. /***/ }),
  34349. /***/ 47346:
  34350. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34351. "use strict";
  34352. var keys = __webpack_require__(45103)
  34353. , value = __webpack_require__(32745)
  34354. , max = Math.max;
  34355. module.exports = function (dest, src/*, …srcn*/) {
  34356. var error, i, length = max(arguments.length, 2), assign;
  34357. dest = Object(value(dest));
  34358. assign = function (key) {
  34359. try {
  34360. dest[key] = src[key];
  34361. } catch (e) {
  34362. if (!error) error = e;
  34363. }
  34364. };
  34365. for (i = 1; i < length; ++i) {
  34366. src = arguments[i];
  34367. keys(src).forEach(assign);
  34368. }
  34369. if (error !== undefined) throw error;
  34370. return dest;
  34371. };
  34372. /***/ }),
  34373. /***/ 88005:
  34374. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34375. "use strict";
  34376. var aFrom = __webpack_require__(84616)
  34377. , assign = __webpack_require__(67191)
  34378. , value = __webpack_require__(32745);
  34379. module.exports = function (obj/*, propertyNames, options*/) {
  34380. var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]);
  34381. if (copy !== obj && !propertyNames) return copy;
  34382. var result = {};
  34383. if (propertyNames) {
  34384. aFrom(propertyNames, function (propertyName) {
  34385. if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName];
  34386. });
  34387. } else {
  34388. assign(result, obj);
  34389. }
  34390. return result;
  34391. };
  34392. /***/ }),
  34393. /***/ 60634:
  34394. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34395. "use strict";
  34396. // Workaround for http://code.google.com/p/v8/issues/detail?id=2804
  34397. var create = Object.create, shim;
  34398. if (!__webpack_require__(34589)()) {
  34399. shim = __webpack_require__(9221);
  34400. }
  34401. module.exports = (function () {
  34402. var nullObject, polyProps, desc;
  34403. if (!shim) return create;
  34404. if (shim.level !== 1) return create;
  34405. nullObject = {};
  34406. polyProps = {};
  34407. desc = { configurable: false, enumerable: false, writable: true, value: undefined };
  34408. Object.getOwnPropertyNames(Object.prototype).forEach(function (name) {
  34409. if (name === "__proto__") {
  34410. polyProps[name] = {
  34411. configurable: true,
  34412. enumerable: false,
  34413. writable: true,
  34414. value: undefined
  34415. };
  34416. return;
  34417. }
  34418. polyProps[name] = desc;
  34419. });
  34420. Object.defineProperties(nullObject, polyProps);
  34421. Object.defineProperty(shim, "nullPolyfill", {
  34422. configurable: false,
  34423. enumerable: false,
  34424. writable: false,
  34425. value: nullObject
  34426. });
  34427. return function (prototype, props) {
  34428. return create(prototype === null ? nullObject : prototype, props);
  34429. };
  34430. })();
  34431. /***/ }),
  34432. /***/ 17031:
  34433. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34434. "use strict";
  34435. module.exports = __webpack_require__(84214)("forEach");
  34436. /***/ }),
  34437. /***/ 96191:
  34438. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34439. "use strict";
  34440. var isValue = __webpack_require__(76914);
  34441. var map = { function: true, object: true };
  34442. module.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };
  34443. /***/ }),
  34444. /***/ 76914:
  34445. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34446. "use strict";
  34447. var _undefined = __webpack_require__(70430)(); // Support ES3 engines
  34448. module.exports = function (val) { return val !== _undefined && val !== null; };
  34449. /***/ }),
  34450. /***/ 45103:
  34451. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34452. "use strict";
  34453. module.exports = __webpack_require__(17446)() ? Object.keys : __webpack_require__(96137);
  34454. /***/ }),
  34455. /***/ 17446:
  34456. /***/ ((module) => {
  34457. "use strict";
  34458. module.exports = function () {
  34459. try {
  34460. Object.keys("primitive");
  34461. return true;
  34462. } catch (e) {
  34463. return false;
  34464. }
  34465. };
  34466. /***/ }),
  34467. /***/ 96137:
  34468. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34469. "use strict";
  34470. var isValue = __webpack_require__(76914);
  34471. var keys = Object.keys;
  34472. module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };
  34473. /***/ }),
  34474. /***/ 21465:
  34475. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34476. "use strict";
  34477. var callable = __webpack_require__(31290)
  34478. , forEach = __webpack_require__(17031)
  34479. , call = Function.prototype.call;
  34480. module.exports = function (obj, cb/*, thisArg*/) {
  34481. var result = {}, thisArg = arguments[2];
  34482. callable(cb);
  34483. forEach(obj, function (value, key, targetObj, index) {
  34484. result[key] = call.call(cb, thisArg, value, key, targetObj, index);
  34485. });
  34486. return result;
  34487. };
  34488. /***/ }),
  34489. /***/ 5516:
  34490. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34491. "use strict";
  34492. var isValue = __webpack_require__(76914);
  34493. var forEach = Array.prototype.forEach, create = Object.create;
  34494. var process = function (src, obj) {
  34495. var key;
  34496. for (key in src) obj[key] = src[key];
  34497. };
  34498. // eslint-disable-next-line no-unused-vars
  34499. module.exports = function (opts1/*, …options*/) {
  34500. var result = create(null);
  34501. forEach.call(arguments, function (options) {
  34502. if (!isValue(options)) return;
  34503. process(Object(options), result);
  34504. });
  34505. return result;
  34506. };
  34507. /***/ }),
  34508. /***/ 79474:
  34509. /***/ ((module) => {
  34510. "use strict";
  34511. var forEach = Array.prototype.forEach, create = Object.create;
  34512. // eslint-disable-next-line no-unused-vars
  34513. module.exports = function (arg/*, …args*/) {
  34514. var set = create(null);
  34515. forEach.call(arguments, function (name) { set[name] = true; });
  34516. return set;
  34517. };
  34518. /***/ }),
  34519. /***/ 91386:
  34520. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34521. "use strict";
  34522. module.exports = __webpack_require__(34589)() ? Object.setPrototypeOf : __webpack_require__(9221);
  34523. /***/ }),
  34524. /***/ 34589:
  34525. /***/ ((module) => {
  34526. "use strict";
  34527. var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {};
  34528. module.exports = function (/* CustomCreate*/) {
  34529. var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create;
  34530. if (typeof setPrototypeOf !== "function") return false;
  34531. return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject;
  34532. };
  34533. /***/ }),
  34534. /***/ 9221:
  34535. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34536. "use strict";
  34537. /* eslint no-proto: "off" */
  34538. // Big thanks to @WebReflection for sorting this out
  34539. // https://gist.github.com/WebReflection/5593554
  34540. var isObject = __webpack_require__(96191)
  34541. , value = __webpack_require__(32745)
  34542. , objIsPrototypeOf = Object.prototype.isPrototypeOf
  34543. , defineProperty = Object.defineProperty
  34544. , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined }
  34545. , validate;
  34546. validate = function (obj, prototype) {
  34547. value(obj);
  34548. if (prototype === null || isObject(prototype)) return obj;
  34549. throw new TypeError("Prototype must be null or an object");
  34550. };
  34551. module.exports = (function (status) {
  34552. var fn, set;
  34553. if (!status) return null;
  34554. if (status.level === 2) {
  34555. if (status.set) {
  34556. set = status.set;
  34557. fn = function (obj, prototype) {
  34558. set.call(validate(obj, prototype), prototype);
  34559. return obj;
  34560. };
  34561. } else {
  34562. fn = function (obj, prototype) {
  34563. validate(obj, prototype).__proto__ = prototype;
  34564. return obj;
  34565. };
  34566. }
  34567. } else {
  34568. fn = function self(obj, prototype) {
  34569. var isNullBase;
  34570. validate(obj, prototype);
  34571. isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj);
  34572. if (isNullBase) delete self.nullPolyfill.__proto__;
  34573. if (prototype === null) prototype = self.nullPolyfill;
  34574. obj.__proto__ = prototype;
  34575. if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc);
  34576. return obj;
  34577. };
  34578. }
  34579. return Object.defineProperty(fn, "level", {
  34580. configurable: false,
  34581. enumerable: false,
  34582. writable: false,
  34583. value: status.level
  34584. });
  34585. })(
  34586. (function () {
  34587. var tmpObj1 = Object.create(null)
  34588. , tmpObj2 = {}
  34589. , set
  34590. , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
  34591. if (desc) {
  34592. try {
  34593. set = desc.set; // Opera crashes at this point
  34594. set.call(tmpObj1, tmpObj2);
  34595. } catch (ignore) {}
  34596. if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 };
  34597. }
  34598. tmpObj1.__proto__ = tmpObj2;
  34599. if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 };
  34600. tmpObj1 = {};
  34601. tmpObj1.__proto__ = tmpObj2;
  34602. if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 };
  34603. return false;
  34604. })()
  34605. );
  34606. __webpack_require__(60634);
  34607. /***/ }),
  34608. /***/ 31290:
  34609. /***/ ((module) => {
  34610. "use strict";
  34611. module.exports = function (fn) {
  34612. if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
  34613. return fn;
  34614. };
  34615. /***/ }),
  34616. /***/ 32745:
  34617. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34618. "use strict";
  34619. var isValue = __webpack_require__(76914);
  34620. module.exports = function (value) {
  34621. if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
  34622. return value;
  34623. };
  34624. /***/ }),
  34625. /***/ 49981:
  34626. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34627. "use strict";
  34628. module.exports = __webpack_require__(43591)() ? String.prototype.contains : __webpack_require__(6042);
  34629. /***/ }),
  34630. /***/ 43591:
  34631. /***/ ((module) => {
  34632. "use strict";
  34633. var str = "razdwatrzy";
  34634. module.exports = function () {
  34635. if (typeof str.contains !== "function") return false;
  34636. return str.contains("dwa") === true && str.contains("foo") === false;
  34637. };
  34638. /***/ }),
  34639. /***/ 6042:
  34640. /***/ ((module) => {
  34641. "use strict";
  34642. var indexOf = String.prototype.indexOf;
  34643. module.exports = function (searchString/*, position*/) {
  34644. return indexOf.call(this, searchString, arguments[1]) > -1;
  34645. };
  34646. /***/ }),
  34647. /***/ 84349:
  34648. /***/ ((module) => {
  34649. "use strict";
  34650. var objToString = Object.prototype.toString, id = objToString.call("");
  34651. module.exports = function (value) {
  34652. return (
  34653. typeof value === "string" ||
  34654. (value &&
  34655. typeof value === "object" &&
  34656. (value instanceof String || objToString.call(value) === id)) ||
  34657. false
  34658. );
  34659. };
  34660. /***/ }),
  34661. /***/ 62270:
  34662. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34663. "use strict";
  34664. var setPrototypeOf = __webpack_require__(91386)
  34665. , contains = __webpack_require__(49981)
  34666. , d = __webpack_require__(51804)
  34667. , Symbol = __webpack_require__(98641)
  34668. , Iterator = __webpack_require__(42764);
  34669. var defineProperty = Object.defineProperty, ArrayIterator;
  34670. ArrayIterator = module.exports = function (arr, kind) {
  34671. if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'");
  34672. Iterator.call(this, arr);
  34673. if (!kind) kind = "value";
  34674. else if (contains.call(kind, "key+value")) kind = "key+value";
  34675. else if (contains.call(kind, "key")) kind = "key";
  34676. else kind = "value";
  34677. defineProperty(this, "__kind__", d("", kind));
  34678. };
  34679. if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);
  34680. // Internal %ArrayIteratorPrototype% doesn't expose its constructor
  34681. delete ArrayIterator.prototype.constructor;
  34682. ArrayIterator.prototype = Object.create(Iterator.prototype, {
  34683. _resolve: d(function (i) {
  34684. if (this.__kind__ === "value") return this.__list__[i];
  34685. if (this.__kind__ === "key+value") return [i, this.__list__[i]];
  34686. return i;
  34687. })
  34688. });
  34689. defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator"));
  34690. /***/ }),
  34691. /***/ 69334:
  34692. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34693. "use strict";
  34694. var isArguments = __webpack_require__(56766)
  34695. , callable = __webpack_require__(31290)
  34696. , isString = __webpack_require__(84349)
  34697. , get = __webpack_require__(93226);
  34698. var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some;
  34699. module.exports = function (iterable, cb /*, thisArg*/) {
  34700. var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code;
  34701. if (isArray(iterable) || isArguments(iterable)) mode = "array";
  34702. else if (isString(iterable)) mode = "string";
  34703. else iterable = get(iterable);
  34704. callable(cb);
  34705. doBreak = function () {
  34706. broken = true;
  34707. };
  34708. if (mode === "array") {
  34709. some.call(iterable, function (value) {
  34710. call.call(cb, thisArg, value, doBreak);
  34711. return broken;
  34712. });
  34713. return;
  34714. }
  34715. if (mode === "string") {
  34716. length = iterable.length;
  34717. for (i = 0; i < length; ++i) {
  34718. char = iterable[i];
  34719. if (i + 1 < length) {
  34720. code = char.charCodeAt(0);
  34721. if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i];
  34722. }
  34723. call.call(cb, thisArg, char, doBreak);
  34724. if (broken) break;
  34725. }
  34726. return;
  34727. }
  34728. result = iterable.next();
  34729. while (!result.done) {
  34730. call.call(cb, thisArg, result.value, doBreak);
  34731. if (broken) return;
  34732. result = iterable.next();
  34733. }
  34734. };
  34735. /***/ }),
  34736. /***/ 93226:
  34737. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34738. "use strict";
  34739. var isArguments = __webpack_require__(56766)
  34740. , isString = __webpack_require__(84349)
  34741. , ArrayIterator = __webpack_require__(62270)
  34742. , StringIterator = __webpack_require__(65430)
  34743. , iterable = __webpack_require__(22233)
  34744. , iteratorSymbol = __webpack_require__(98641).iterator;
  34745. module.exports = function (obj) {
  34746. if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol]();
  34747. if (isArguments(obj)) return new ArrayIterator(obj);
  34748. if (isString(obj)) return new StringIterator(obj);
  34749. return new ArrayIterator(obj);
  34750. };
  34751. /***/ }),
  34752. /***/ 42764:
  34753. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34754. "use strict";
  34755. var clear = __webpack_require__(31126)
  34756. , assign = __webpack_require__(67191)
  34757. , callable = __webpack_require__(31290)
  34758. , value = __webpack_require__(32745)
  34759. , d = __webpack_require__(51804)
  34760. , autoBind = __webpack_require__(66577)
  34761. , Symbol = __webpack_require__(98641);
  34762. var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator;
  34763. module.exports = Iterator = function (list, context) {
  34764. if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'");
  34765. defineProperties(this, {
  34766. __list__: d("w", value(list)),
  34767. __context__: d("w", context),
  34768. __nextIndex__: d("w", 0)
  34769. });
  34770. if (!context) return;
  34771. callable(context.on);
  34772. context.on("_add", this._onAdd);
  34773. context.on("_delete", this._onDelete);
  34774. context.on("_clear", this._onClear);
  34775. };
  34776. // Internal %IteratorPrototype% doesn't expose its constructor
  34777. delete Iterator.prototype.constructor;
  34778. defineProperties(
  34779. Iterator.prototype,
  34780. assign(
  34781. {
  34782. _next: d(function () {
  34783. var i;
  34784. if (!this.__list__) return undefined;
  34785. if (this.__redo__) {
  34786. i = this.__redo__.shift();
  34787. if (i !== undefined) return i;
  34788. }
  34789. if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;
  34790. this._unBind();
  34791. return undefined;
  34792. }),
  34793. next: d(function () {
  34794. return this._createResult(this._next());
  34795. }),
  34796. _createResult: d(function (i) {
  34797. if (i === undefined) return { done: true, value: undefined };
  34798. return { done: false, value: this._resolve(i) };
  34799. }),
  34800. _resolve: d(function (i) {
  34801. return this.__list__[i];
  34802. }),
  34803. _unBind: d(function () {
  34804. this.__list__ = null;
  34805. delete this.__redo__;
  34806. if (!this.__context__) return;
  34807. this.__context__.off("_add", this._onAdd);
  34808. this.__context__.off("_delete", this._onDelete);
  34809. this.__context__.off("_clear", this._onClear);
  34810. this.__context__ = null;
  34811. }),
  34812. toString: d(function () {
  34813. return "[object " + (this[Symbol.toStringTag] || "Object") + "]";
  34814. })
  34815. },
  34816. autoBind({
  34817. _onAdd: d(function (index) {
  34818. if (index >= this.__nextIndex__) return;
  34819. ++this.__nextIndex__;
  34820. if (!this.__redo__) {
  34821. defineProperty(this, "__redo__", d("c", [index]));
  34822. return;
  34823. }
  34824. this.__redo__.forEach(function (redo, i) {
  34825. if (redo >= index) this.__redo__[i] = ++redo;
  34826. }, this);
  34827. this.__redo__.push(index);
  34828. }),
  34829. _onDelete: d(function (index) {
  34830. var i;
  34831. if (index >= this.__nextIndex__) return;
  34832. --this.__nextIndex__;
  34833. if (!this.__redo__) return;
  34834. i = this.__redo__.indexOf(index);
  34835. if (i !== -1) this.__redo__.splice(i, 1);
  34836. this.__redo__.forEach(function (redo, j) {
  34837. if (redo > index) this.__redo__[j] = --redo;
  34838. }, this);
  34839. }),
  34840. _onClear: d(function () {
  34841. if (this.__redo__) clear.call(this.__redo__);
  34842. this.__nextIndex__ = 0;
  34843. })
  34844. })
  34845. )
  34846. );
  34847. defineProperty(
  34848. Iterator.prototype,
  34849. Symbol.iterator,
  34850. d(function () {
  34851. return this;
  34852. })
  34853. );
  34854. /***/ }),
  34855. /***/ 13182:
  34856. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34857. "use strict";
  34858. var isArguments = __webpack_require__(56766)
  34859. , isValue = __webpack_require__(76914)
  34860. , isString = __webpack_require__(84349);
  34861. var iteratorSymbol = __webpack_require__(98641).iterator
  34862. , isArray = Array.isArray;
  34863. module.exports = function (value) {
  34864. if (!isValue(value)) return false;
  34865. if (isArray(value)) return true;
  34866. if (isString(value)) return true;
  34867. if (isArguments(value)) return true;
  34868. return typeof value[iteratorSymbol] === "function";
  34869. };
  34870. /***/ }),
  34871. /***/ 65430:
  34872. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34873. "use strict";
  34874. // Thanks @mathiasbynens
  34875. // http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols
  34876. var setPrototypeOf = __webpack_require__(91386)
  34877. , d = __webpack_require__(51804)
  34878. , Symbol = __webpack_require__(98641)
  34879. , Iterator = __webpack_require__(42764);
  34880. var defineProperty = Object.defineProperty, StringIterator;
  34881. StringIterator = module.exports = function (str) {
  34882. if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'");
  34883. str = String(str);
  34884. Iterator.call(this, str);
  34885. defineProperty(this, "__length__", d("", str.length));
  34886. };
  34887. if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);
  34888. // Internal %ArrayIteratorPrototype% doesn't expose its constructor
  34889. delete StringIterator.prototype.constructor;
  34890. StringIterator.prototype = Object.create(Iterator.prototype, {
  34891. _next: d(function () {
  34892. if (!this.__list__) return undefined;
  34893. if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;
  34894. this._unBind();
  34895. return undefined;
  34896. }),
  34897. _resolve: d(function (i) {
  34898. var char = this.__list__[i], code;
  34899. if (this.__nextIndex__ === this.__length__) return char;
  34900. code = char.charCodeAt(0);
  34901. if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++];
  34902. return char;
  34903. })
  34904. });
  34905. defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator"));
  34906. /***/ }),
  34907. /***/ 22233:
  34908. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34909. "use strict";
  34910. var isIterable = __webpack_require__(13182);
  34911. module.exports = function (value) {
  34912. if (!isIterable(value)) throw new TypeError(value + " is not iterable");
  34913. return value;
  34914. };
  34915. /***/ }),
  34916. /***/ 1520:
  34917. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34918. "use strict";
  34919. module.exports = __webpack_require__(22752)() ? Map : __webpack_require__(64580);
  34920. /***/ }),
  34921. /***/ 22752:
  34922. /***/ ((module) => {
  34923. "use strict";
  34924. module.exports = function () {
  34925. var map, iterator, result;
  34926. if (typeof Map !== 'function') return false;
  34927. try {
  34928. // WebKit doesn't support arguments and crashes
  34929. map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
  34930. } catch (e) {
  34931. return false;
  34932. }
  34933. if (String(map) !== '[object Map]') return false;
  34934. if (map.size !== 3) return false;
  34935. if (typeof map.clear !== 'function') return false;
  34936. if (typeof map.delete !== 'function') return false;
  34937. if (typeof map.entries !== 'function') return false;
  34938. if (typeof map.forEach !== 'function') return false;
  34939. if (typeof map.get !== 'function') return false;
  34940. if (typeof map.has !== 'function') return false;
  34941. if (typeof map.keys !== 'function') return false;
  34942. if (typeof map.set !== 'function') return false;
  34943. if (typeof map.values !== 'function') return false;
  34944. iterator = map.entries();
  34945. result = iterator.next();
  34946. if (result.done !== false) return false;
  34947. if (!result.value) return false;
  34948. if (result.value[0] !== 'raz') return false;
  34949. if (result.value[1] !== 'one') return false;
  34950. return true;
  34951. };
  34952. /***/ }),
  34953. /***/ 42438:
  34954. /***/ ((module) => {
  34955. "use strict";
  34956. // Exports true if environment provides native `Map` implementation,
  34957. // whatever that is.
  34958. module.exports = (function () {
  34959. if (typeof Map === 'undefined') return false;
  34960. return (Object.prototype.toString.call(new Map()) === '[object Map]');
  34961. }());
  34962. /***/ }),
  34963. /***/ 56433:
  34964. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34965. "use strict";
  34966. module.exports = __webpack_require__(79474)('key',
  34967. 'value', 'key+value');
  34968. /***/ }),
  34969. /***/ 75189:
  34970. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  34971. "use strict";
  34972. var setPrototypeOf = __webpack_require__(91386)
  34973. , d = __webpack_require__(51804)
  34974. , Iterator = __webpack_require__(42764)
  34975. , toStringTagSymbol = __webpack_require__(98641).toStringTag
  34976. , kinds = __webpack_require__(56433)
  34977. , defineProperties = Object.defineProperties
  34978. , unBind = Iterator.prototype._unBind
  34979. , MapIterator;
  34980. MapIterator = module.exports = function (map, kind) {
  34981. if (!(this instanceof MapIterator)) return new MapIterator(map, kind);
  34982. Iterator.call(this, map.__mapKeysData__, map);
  34983. if (!kind || !kinds[kind]) kind = 'key+value';
  34984. defineProperties(this, {
  34985. __kind__: d('', kind),
  34986. __values__: d('w', map.__mapValuesData__)
  34987. });
  34988. };
  34989. if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);
  34990. MapIterator.prototype = Object.create(Iterator.prototype, {
  34991. constructor: d(MapIterator),
  34992. _resolve: d(function (i) {
  34993. if (this.__kind__ === 'value') return this.__values__[i];
  34994. if (this.__kind__ === 'key') return this.__list__[i];
  34995. return [this.__list__[i], this.__values__[i]];
  34996. }),
  34997. _unBind: d(function () {
  34998. this.__values__ = null;
  34999. unBind.call(this);
  35000. }),
  35001. toString: d(function () { return '[object Map Iterator]'; })
  35002. });
  35003. Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
  35004. d('c', 'Map Iterator'));
  35005. /***/ }),
  35006. /***/ 64580:
  35007. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  35008. "use strict";
  35009. var clear = __webpack_require__(31126)
  35010. , eIndexOf = __webpack_require__(62041)
  35011. , setPrototypeOf = __webpack_require__(91386)
  35012. , callable = __webpack_require__(31290)
  35013. , validValue = __webpack_require__(32745)
  35014. , d = __webpack_require__(51804)
  35015. , ee = __webpack_require__(48370)
  35016. , Symbol = __webpack_require__(98641)
  35017. , iterator = __webpack_require__(22233)
  35018. , forOf = __webpack_require__(69334)
  35019. , Iterator = __webpack_require__(75189)
  35020. , isNative = __webpack_require__(42438)
  35021. , call = Function.prototype.call
  35022. , defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf
  35023. , MapPoly;
  35024. module.exports = MapPoly = function (/*iterable*/) {
  35025. var iterable = arguments[0], keys, values, self;
  35026. if (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \'new\'');
  35027. if (isNative && setPrototypeOf && (Map !== MapPoly)) {
  35028. self = setPrototypeOf(new Map(), getPrototypeOf(this));
  35029. } else {
  35030. self = this;
  35031. }
  35032. if (iterable != null) iterator(iterable);
  35033. defineProperties(self, {
  35034. __mapKeysData__: d('c', keys = []),
  35035. __mapValuesData__: d('c', values = [])
  35036. });
  35037. if (!iterable) return self;
  35038. forOf(iterable, function (value) {
  35039. var key = validValue(value)[0];
  35040. value = value[1];
  35041. if (eIndexOf.call(keys, key) !== -1) return;
  35042. keys.push(key);
  35043. values.push(value);
  35044. }, self);
  35045. return self;
  35046. };
  35047. if (isNative) {
  35048. if (setPrototypeOf) setPrototypeOf(MapPoly, Map);
  35049. MapPoly.prototype = Object.create(Map.prototype, {
  35050. constructor: d(MapPoly)
  35051. });
  35052. }
  35053. ee(defineProperties(MapPoly.prototype, {
  35054. clear: d(function () {
  35055. if (!this.__mapKeysData__.length) return;
  35056. clear.call(this.__mapKeysData__);
  35057. clear.call(this.__mapValuesData__);
  35058. this.emit('_clear');
  35059. }),
  35060. delete: d(function (key) {
  35061. var index = eIndexOf.call(this.__mapKeysData__, key);
  35062. if (index === -1) return false;
  35063. this.__mapKeysData__.splice(index, 1);
  35064. this.__mapValuesData__.splice(index, 1);
  35065. this.emit('_delete', index, key);
  35066. return true;
  35067. }),
  35068. entries: d(function () { return new Iterator(this, 'key+value'); }),
  35069. forEach: d(function (cb/*, thisArg*/) {
  35070. var thisArg = arguments[1], iterator, result;
  35071. callable(cb);
  35072. iterator = this.entries();
  35073. result = iterator._next();
  35074. while (result !== undefined) {
  35075. call.call(cb, thisArg, this.__mapValuesData__[result],
  35076. this.__mapKeysData__[result], this);
  35077. result = iterator._next();
  35078. }
  35079. }),
  35080. get: d(function (key) {
  35081. var index = eIndexOf.call(this.__mapKeysData__, key);
  35082. if (index === -1) return;
  35083. return this.__mapValuesData__[index];
  35084. }),
  35085. has: d(function (key) {
  35086. return (eIndexOf.call(this.__mapKeysData__, key) !== -1);
  35087. }),
  35088. keys: d(function () { return new Iterator(this, 'key'); }),
  35089. set: d(function (key, value) {
  35090. var index = eIndexOf.call(this.__mapKeysData__, key), emit;
  35091. if (index === -1) {
  35092. index = this.__mapKeysData__.push(key) - 1;
  35093. emit = true;
  35094. }
  35095. this.__mapValuesData__[index] = value;
  35096. if (emit) this.emit('_add', index, key);
  35097. return this;
  35098. }),
  35099. size: d.gs(function () { return this.__mapKeysData__.length; }),
  35100. values: d(function () { return new Iterator(this, 'value'); }),
  35101. toString: d(function () { return '[object Map]'; })
  35102. }));
  35103. Object.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () {
  35104. return this.entries();
  35105. }));
  35106. Object.defineProperty(MapPoly.prototype, Symbol.toStringTag, d('c', 'Map'));
  35107. /***/ }),
  35108. /***/ 82702:
  35109. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  35110. /*!
  35111. * @overview es6-promise - a tiny implementation of Promises/A+.
  35112. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
  35113. * @license Licensed under MIT license
  35114. * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
  35115. * @version v4.2.8+1e68dce6
  35116. */
  35117. (function (global, factory) {
  35118. true ? module.exports = factory() :
  35119. 0;
  35120. }(this, (function () { 'use strict';
  35121. function objectOrFunction(x) {
  35122. var type = typeof x;
  35123. return x !== null && (type === 'object' || type === 'function');
  35124. }
  35125. function isFunction(x) {
  35126. return typeof x === 'function';
  35127. }
  35128. var _isArray = void 0;
  35129. if (Array.isArray) {
  35130. _isArray = Array.isArray;
  35131. } else {
  35132. _isArray = function (x) {
  35133. return Object.prototype.toString.call(x) === '[object Array]';
  35134. };
  35135. }
  35136. var isArray = _isArray;
  35137. var len = 0;
  35138. var vertxNext = void 0;
  35139. var customSchedulerFn = void 0;
  35140. var asap = function asap(callback, arg) {
  35141. queue[len] = callback;
  35142. queue[len + 1] = arg;
  35143. len += 2;
  35144. if (len === 2) {
  35145. // If len is 2, that means that we need to schedule an async flush.
  35146. // If additional callbacks are queued before the queue is flushed, they
  35147. // will be processed by this flush that we are scheduling.
  35148. if (customSchedulerFn) {
  35149. customSchedulerFn(flush);
  35150. } else {
  35151. scheduleFlush();
  35152. }
  35153. }
  35154. };
  35155. function setScheduler(scheduleFn) {
  35156. customSchedulerFn = scheduleFn;
  35157. }
  35158. function setAsap(asapFn) {
  35159. asap = asapFn;
  35160. }
  35161. var browserWindow = typeof window !== 'undefined' ? window : undefined;
  35162. var browserGlobal = browserWindow || {};
  35163. var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
  35164. var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
  35165. // test for web worker but not in IE10
  35166. var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
  35167. // node
  35168. function useNextTick() {
  35169. // node version 0.10.x displays a deprecation warning when nextTick is used recursively
  35170. // see https://github.com/cujojs/when/issues/410 for details
  35171. return function () {
  35172. return process.nextTick(flush);
  35173. };
  35174. }
  35175. // vertx
  35176. function useVertxTimer() {
  35177. if (typeof vertxNext !== 'undefined') {
  35178. return function () {
  35179. vertxNext(flush);
  35180. };
  35181. }
  35182. return useSetTimeout();
  35183. }
  35184. function useMutationObserver() {
  35185. var iterations = 0;
  35186. var observer = new BrowserMutationObserver(flush);
  35187. var node = document.createTextNode('');
  35188. observer.observe(node, { characterData: true });
  35189. return function () {
  35190. node.data = iterations = ++iterations % 2;
  35191. };
  35192. }
  35193. // web worker
  35194. function useMessageChannel() {
  35195. var channel = new MessageChannel();
  35196. channel.port1.onmessage = flush;
  35197. return function () {
  35198. return channel.port2.postMessage(0);
  35199. };
  35200. }
  35201. function useSetTimeout() {
  35202. // Store setTimeout reference so es6-promise will be unaffected by
  35203. // other code modifying setTimeout (like sinon.useFakeTimers())
  35204. var globalSetTimeout = setTimeout;
  35205. return function () {
  35206. return globalSetTimeout(flush, 1);
  35207. };
  35208. }
  35209. var queue = new Array(1000);
  35210. function flush() {
  35211. for (var i = 0; i < len; i += 2) {
  35212. var callback = queue[i];
  35213. var arg = queue[i + 1];
  35214. callback(arg);
  35215. queue[i] = undefined;
  35216. queue[i + 1] = undefined;
  35217. }
  35218. len = 0;
  35219. }
  35220. function attemptVertx() {
  35221. try {
  35222. var vertx = Function('return this')().require('vertx');
  35223. vertxNext = vertx.runOnLoop || vertx.runOnContext;
  35224. return useVertxTimer();
  35225. } catch (e) {
  35226. return useSetTimeout();
  35227. }
  35228. }
  35229. var scheduleFlush = void 0;
  35230. // Decide what async method to use to triggering processing of queued callbacks:
  35231. if (isNode) {
  35232. scheduleFlush = useNextTick();
  35233. } else if (BrowserMutationObserver) {
  35234. scheduleFlush = useMutationObserver();
  35235. } else if (isWorker) {
  35236. scheduleFlush = useMessageChannel();
  35237. } else if (browserWindow === undefined && "function" === 'function') {
  35238. scheduleFlush = attemptVertx();
  35239. } else {
  35240. scheduleFlush = useSetTimeout();
  35241. }
  35242. function then(onFulfillment, onRejection) {
  35243. var parent = this;
  35244. var child = new this.constructor(noop);
  35245. if (child[PROMISE_ID] === undefined) {
  35246. makePromise(child);
  35247. }
  35248. var _state = parent._state;
  35249. if (_state) {
  35250. var callback = arguments[_state - 1];
  35251. asap(function () {
  35252. return invokeCallback(_state, child, callback, parent._result);
  35253. });
  35254. } else {
  35255. subscribe(parent, child, onFulfillment, onRejection);
  35256. }
  35257. return child;
  35258. }
  35259. /**
  35260. `Promise.resolve` returns a promise that will become resolved with the
  35261. passed `value`. It is shorthand for the following:
  35262. ```javascript
  35263. let promise = new Promise(function(resolve, reject){
  35264. resolve(1);
  35265. });
  35266. promise.then(function(value){
  35267. // value === 1
  35268. });
  35269. ```
  35270. Instead of writing the above, your code now simply becomes the following:
  35271. ```javascript
  35272. let promise = Promise.resolve(1);
  35273. promise.then(function(value){
  35274. // value === 1
  35275. });
  35276. ```
  35277. @method resolve
  35278. @static
  35279. @param {Any} value value that the returned promise will be resolved with
  35280. Useful for tooling.
  35281. @return {Promise} a promise that will become fulfilled with the given
  35282. `value`
  35283. */
  35284. function resolve$1(object) {
  35285. /*jshint validthis:true */
  35286. var Constructor = this;
  35287. if (object && typeof object === 'object' && object.constructor === Constructor) {
  35288. return object;
  35289. }
  35290. var promise = new Constructor(noop);
  35291. resolve(promise, object);
  35292. return promise;
  35293. }
  35294. var PROMISE_ID = Math.random().toString(36).substring(2);
  35295. function noop() {}
  35296. var PENDING = void 0;
  35297. var FULFILLED = 1;
  35298. var REJECTED = 2;
  35299. function selfFulfillment() {
  35300. return new TypeError("You cannot resolve a promise with itself");
  35301. }
  35302. function cannotReturnOwn() {
  35303. return new TypeError('A promises callback cannot return that same promise.');
  35304. }
  35305. function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  35306. try {
  35307. then$$1.call(value, fulfillmentHandler, rejectionHandler);
  35308. } catch (e) {
  35309. return e;
  35310. }
  35311. }
  35312. function handleForeignThenable(promise, thenable, then$$1) {
  35313. asap(function (promise) {
  35314. var sealed = false;
  35315. var error = tryThen(then$$1, thenable, function (value) {
  35316. if (sealed) {
  35317. return;
  35318. }
  35319. sealed = true;
  35320. if (thenable !== value) {
  35321. resolve(promise, value);
  35322. } else {
  35323. fulfill(promise, value);
  35324. }
  35325. }, function (reason) {
  35326. if (sealed) {
  35327. return;
  35328. }
  35329. sealed = true;
  35330. reject(promise, reason);
  35331. }, 'Settle: ' + (promise._label || ' unknown promise'));
  35332. if (!sealed && error) {
  35333. sealed = true;
  35334. reject(promise, error);
  35335. }
  35336. }, promise);
  35337. }
  35338. function handleOwnThenable(promise, thenable) {
  35339. if (thenable._state === FULFILLED) {
  35340. fulfill(promise, thenable._result);
  35341. } else if (thenable._state === REJECTED) {
  35342. reject(promise, thenable._result);
  35343. } else {
  35344. subscribe(thenable, undefined, function (value) {
  35345. return resolve(promise, value);
  35346. }, function (reason) {
  35347. return reject(promise, reason);
  35348. });
  35349. }
  35350. }
  35351. function handleMaybeThenable(promise, maybeThenable, then$$1) {
  35352. if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
  35353. handleOwnThenable(promise, maybeThenable);
  35354. } else {
  35355. if (then$$1 === undefined) {
  35356. fulfill(promise, maybeThenable);
  35357. } else if (isFunction(then$$1)) {
  35358. handleForeignThenable(promise, maybeThenable, then$$1);
  35359. } else {
  35360. fulfill(promise, maybeThenable);
  35361. }
  35362. }
  35363. }
  35364. function resolve(promise, value) {
  35365. if (promise === value) {
  35366. reject(promise, selfFulfillment());
  35367. } else if (objectOrFunction(value)) {
  35368. var then$$1 = void 0;
  35369. try {
  35370. then$$1 = value.then;
  35371. } catch (error) {
  35372. reject(promise, error);
  35373. return;
  35374. }
  35375. handleMaybeThenable(promise, value, then$$1);
  35376. } else {
  35377. fulfill(promise, value);
  35378. }
  35379. }
  35380. function publishRejection(promise) {
  35381. if (promise._onerror) {
  35382. promise._onerror(promise._result);
  35383. }
  35384. publish(promise);
  35385. }
  35386. function fulfill(promise, value) {
  35387. if (promise._state !== PENDING) {
  35388. return;
  35389. }
  35390. promise._result = value;
  35391. promise._state = FULFILLED;
  35392. if (promise._subscribers.length !== 0) {
  35393. asap(publish, promise);
  35394. }
  35395. }
  35396. function reject(promise, reason) {
  35397. if (promise._state !== PENDING) {
  35398. return;
  35399. }
  35400. promise._state = REJECTED;
  35401. promise._result = reason;
  35402. asap(publishRejection, promise);
  35403. }
  35404. function subscribe(parent, child, onFulfillment, onRejection) {
  35405. var _subscribers = parent._subscribers;
  35406. var length = _subscribers.length;
  35407. parent._onerror = null;
  35408. _subscribers[length] = child;
  35409. _subscribers[length + FULFILLED] = onFulfillment;
  35410. _subscribers[length + REJECTED] = onRejection;
  35411. if (length === 0 && parent._state) {
  35412. asap(publish, parent);
  35413. }
  35414. }
  35415. function publish(promise) {
  35416. var subscribers = promise._subscribers;
  35417. var settled = promise._state;
  35418. if (subscribers.length === 0) {
  35419. return;
  35420. }
  35421. var child = void 0,
  35422. callback = void 0,
  35423. detail = promise._result;
  35424. for (var i = 0; i < subscribers.length; i += 3) {
  35425. child = subscribers[i];
  35426. callback = subscribers[i + settled];
  35427. if (child) {
  35428. invokeCallback(settled, child, callback, detail);
  35429. } else {
  35430. callback(detail);
  35431. }
  35432. }
  35433. promise._subscribers.length = 0;
  35434. }
  35435. function invokeCallback(settled, promise, callback, detail) {
  35436. var hasCallback = isFunction(callback),
  35437. value = void 0,
  35438. error = void 0,
  35439. succeeded = true;
  35440. if (hasCallback) {
  35441. try {
  35442. value = callback(detail);
  35443. } catch (e) {
  35444. succeeded = false;
  35445. error = e;
  35446. }
  35447. if (promise === value) {
  35448. reject(promise, cannotReturnOwn());
  35449. return;
  35450. }
  35451. } else {
  35452. value = detail;
  35453. }
  35454. if (promise._state !== PENDING) {
  35455. // noop
  35456. } else if (hasCallback && succeeded) {
  35457. resolve(promise, value);
  35458. } else if (succeeded === false) {
  35459. reject(promise, error);
  35460. } else if (settled === FULFILLED) {
  35461. fulfill(promise, value);
  35462. } else if (settled === REJECTED) {
  35463. reject(promise, value);
  35464. }
  35465. }
  35466. function initializePromise(promise, resolver) {
  35467. try {
  35468. resolver(function resolvePromise(value) {
  35469. resolve(promise, value);
  35470. }, function rejectPromise(reason) {
  35471. reject(promise, reason);
  35472. });
  35473. } catch (e) {
  35474. reject(promise, e);
  35475. }
  35476. }
  35477. var id = 0;
  35478. function nextId() {
  35479. return id++;
  35480. }
  35481. function makePromise(promise) {
  35482. promise[PROMISE_ID] = id++;
  35483. promise._state = undefined;
  35484. promise._result = undefined;
  35485. promise._subscribers = [];
  35486. }
  35487. function validationError() {
  35488. return new Error('Array Methods must be provided an Array');
  35489. }
  35490. var Enumerator = function () {
  35491. function Enumerator(Constructor, input) {
  35492. this._instanceConstructor = Constructor;
  35493. this.promise = new Constructor(noop);
  35494. if (!this.promise[PROMISE_ID]) {
  35495. makePromise(this.promise);
  35496. }
  35497. if (isArray(input)) {
  35498. this.length = input.length;
  35499. this._remaining = input.length;
  35500. this._result = new Array(this.length);
  35501. if (this.length === 0) {
  35502. fulfill(this.promise, this._result);
  35503. } else {
  35504. this.length = this.length || 0;
  35505. this._enumerate(input);
  35506. if (this._remaining === 0) {
  35507. fulfill(this.promise, this._result);
  35508. }
  35509. }
  35510. } else {
  35511. reject(this.promise, validationError());
  35512. }
  35513. }
  35514. Enumerator.prototype._enumerate = function _enumerate(input) {
  35515. for (var i = 0; this._state === PENDING && i < input.length; i++) {
  35516. this._eachEntry(input[i], i);
  35517. }
  35518. };
  35519. Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
  35520. var c = this._instanceConstructor;
  35521. var resolve$$1 = c.resolve;
  35522. if (resolve$$1 === resolve$1) {
  35523. var _then = void 0;
  35524. var error = void 0;
  35525. var didError = false;
  35526. try {
  35527. _then = entry.then;
  35528. } catch (e) {
  35529. didError = true;
  35530. error = e;
  35531. }
  35532. if (_then === then && entry._state !== PENDING) {
  35533. this._settledAt(entry._state, i, entry._result);
  35534. } else if (typeof _then !== 'function') {
  35535. this._remaining--;
  35536. this._result[i] = entry;
  35537. } else if (c === Promise$1) {
  35538. var promise = new c(noop);
  35539. if (didError) {
  35540. reject(promise, error);
  35541. } else {
  35542. handleMaybeThenable(promise, entry, _then);
  35543. }
  35544. this._willSettleAt(promise, i);
  35545. } else {
  35546. this._willSettleAt(new c(function (resolve$$1) {
  35547. return resolve$$1(entry);
  35548. }), i);
  35549. }
  35550. } else {
  35551. this._willSettleAt(resolve$$1(entry), i);
  35552. }
  35553. };
  35554. Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
  35555. var promise = this.promise;
  35556. if (promise._state === PENDING) {
  35557. this._remaining--;
  35558. if (state === REJECTED) {
  35559. reject(promise, value);
  35560. } else {
  35561. this._result[i] = value;
  35562. }
  35563. }
  35564. if (this._remaining === 0) {
  35565. fulfill(promise, this._result);
  35566. }
  35567. };
  35568. Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
  35569. var enumerator = this;
  35570. subscribe(promise, undefined, function (value) {
  35571. return enumerator._settledAt(FULFILLED, i, value);
  35572. }, function (reason) {
  35573. return enumerator._settledAt(REJECTED, i, reason);
  35574. });
  35575. };
  35576. return Enumerator;
  35577. }();
  35578. /**
  35579. `Promise.all` accepts an array of promises, and returns a new promise which
  35580. is fulfilled with an array of fulfillment values for the passed promises, or
  35581. rejected with the reason of the first passed promise to be rejected. It casts all
  35582. elements of the passed iterable to promises as it runs this algorithm.
  35583. Example:
  35584. ```javascript
  35585. let promise1 = resolve(1);
  35586. let promise2 = resolve(2);
  35587. let promise3 = resolve(3);
  35588. let promises = [ promise1, promise2, promise3 ];
  35589. Promise.all(promises).then(function(array){
  35590. // The array here would be [ 1, 2, 3 ];
  35591. });
  35592. ```
  35593. If any of the `promises` given to `all` are rejected, the first promise
  35594. that is rejected will be given as an argument to the returned promises's
  35595. rejection handler. For example:
  35596. Example:
  35597. ```javascript
  35598. let promise1 = resolve(1);
  35599. let promise2 = reject(new Error("2"));
  35600. let promise3 = reject(new Error("3"));
  35601. let promises = [ promise1, promise2, promise3 ];
  35602. Promise.all(promises).then(function(array){
  35603. // Code here never runs because there are rejected promises!
  35604. }, function(error) {
  35605. // error.message === "2"
  35606. });
  35607. ```
  35608. @method all
  35609. @static
  35610. @param {Array} entries array of promises
  35611. @param {String} label optional string for labeling the promise.
  35612. Useful for tooling.
  35613. @return {Promise} promise that is fulfilled when all `promises` have been
  35614. fulfilled, or rejected if any of them become rejected.
  35615. @static
  35616. */
  35617. function all(entries) {
  35618. return new Enumerator(this, entries).promise;
  35619. }
  35620. /**
  35621. `Promise.race` returns a new promise which is settled in the same way as the
  35622. first passed promise to settle.
  35623. Example:
  35624. ```javascript
  35625. let promise1 = new Promise(function(resolve, reject){
  35626. setTimeout(function(){
  35627. resolve('promise 1');
  35628. }, 200);
  35629. });
  35630. let promise2 = new Promise(function(resolve, reject){
  35631. setTimeout(function(){
  35632. resolve('promise 2');
  35633. }, 100);
  35634. });
  35635. Promise.race([promise1, promise2]).then(function(result){
  35636. // result === 'promise 2' because it was resolved before promise1
  35637. // was resolved.
  35638. });
  35639. ```
  35640. `Promise.race` is deterministic in that only the state of the first
  35641. settled promise matters. For example, even if other promises given to the
  35642. `promises` array argument are resolved, but the first settled promise has
  35643. become rejected before the other promises became fulfilled, the returned
  35644. promise will become rejected:
  35645. ```javascript
  35646. let promise1 = new Promise(function(resolve, reject){
  35647. setTimeout(function(){
  35648. resolve('promise 1');
  35649. }, 200);
  35650. });
  35651. let promise2 = new Promise(function(resolve, reject){
  35652. setTimeout(function(){
  35653. reject(new Error('promise 2'));
  35654. }, 100);
  35655. });
  35656. Promise.race([promise1, promise2]).then(function(result){
  35657. // Code here never runs
  35658. }, function(reason){
  35659. // reason.message === 'promise 2' because promise 2 became rejected before
  35660. // promise 1 became fulfilled
  35661. });
  35662. ```
  35663. An example real-world use case is implementing timeouts:
  35664. ```javascript
  35665. Promise.race([ajax('foo.json'), timeout(5000)])
  35666. ```
  35667. @method race
  35668. @static
  35669. @param {Array} promises array of promises to observe
  35670. Useful for tooling.
  35671. @return {Promise} a promise which settles in the same way as the first passed
  35672. promise to settle.
  35673. */
  35674. function race(entries) {
  35675. /*jshint validthis:true */
  35676. var Constructor = this;
  35677. if (!isArray(entries)) {
  35678. return new Constructor(function (_, reject) {
  35679. return reject(new TypeError('You must pass an array to race.'));
  35680. });
  35681. } else {
  35682. return new Constructor(function (resolve, reject) {
  35683. var length = entries.length;
  35684. for (var i = 0; i < length; i++) {
  35685. Constructor.resolve(entries[i]).then(resolve, reject);
  35686. }
  35687. });
  35688. }
  35689. }
  35690. /**
  35691. `Promise.reject` returns a promise rejected with the passed `reason`.
  35692. It is shorthand for the following:
  35693. ```javascript
  35694. let promise = new Promise(function(resolve, reject){
  35695. reject(new Error('WHOOPS'));
  35696. });
  35697. promise.then(function(value){
  35698. // Code here doesn't run because the promise is rejected!
  35699. }, function(reason){
  35700. // reason.message === 'WHOOPS'
  35701. });
  35702. ```
  35703. Instead of writing the above, your code now simply becomes the following:
  35704. ```javascript
  35705. let promise = Promise.reject(new Error('WHOOPS'));
  35706. promise.then(function(value){
  35707. // Code here doesn't run because the promise is rejected!
  35708. }, function(reason){
  35709. // reason.message === 'WHOOPS'
  35710. });
  35711. ```
  35712. @method reject
  35713. @static
  35714. @param {Any} reason value that the returned promise will be rejected with.
  35715. Useful for tooling.
  35716. @return {Promise} a promise rejected with the given `reason`.
  35717. */
  35718. function reject$1(reason) {
  35719. /*jshint validthis:true */
  35720. var Constructor = this;
  35721. var promise = new Constructor(noop);
  35722. reject(promise, reason);
  35723. return promise;
  35724. }
  35725. function needsResolver() {
  35726. throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
  35727. }
  35728. function needsNew() {
  35729. throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
  35730. }
  35731. /**
  35732. Promise objects represent the eventual result of an asynchronous operation. The
  35733. primary way of interacting with a promise is through its `then` method, which
  35734. registers callbacks to receive either a promise's eventual value or the reason
  35735. why the promise cannot be fulfilled.
  35736. Terminology
  35737. -----------
  35738. - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
  35739. - `thenable` is an object or function that defines a `then` method.
  35740. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
  35741. - `exception` is a value that is thrown using the throw statement.
  35742. - `reason` is a value that indicates why a promise was rejected.
  35743. - `settled` the final resting state of a promise, fulfilled or rejected.
  35744. A promise can be in one of three states: pending, fulfilled, or rejected.
  35745. Promises that are fulfilled have a fulfillment value and are in the fulfilled
  35746. state. Promises that are rejected have a rejection reason and are in the
  35747. rejected state. A fulfillment value is never a thenable.
  35748. Promises can also be said to *resolve* a value. If this value is also a
  35749. promise, then the original promise's settled state will match the value's
  35750. settled state. So a promise that *resolves* a promise that rejects will
  35751. itself reject, and a promise that *resolves* a promise that fulfills will
  35752. itself fulfill.
  35753. Basic Usage:
  35754. ------------
  35755. ```js
  35756. let promise = new Promise(function(resolve, reject) {
  35757. // on success
  35758. resolve(value);
  35759. // on failure
  35760. reject(reason);
  35761. });
  35762. promise.then(function(value) {
  35763. // on fulfillment
  35764. }, function(reason) {
  35765. // on rejection
  35766. });
  35767. ```
  35768. Advanced Usage:
  35769. ---------------
  35770. Promises shine when abstracting away asynchronous interactions such as
  35771. `XMLHttpRequest`s.
  35772. ```js
  35773. function getJSON(url) {
  35774. return new Promise(function(resolve, reject){
  35775. let xhr = new XMLHttpRequest();
  35776. xhr.open('GET', url);
  35777. xhr.onreadystatechange = handler;
  35778. xhr.responseType = 'json';
  35779. xhr.setRequestHeader('Accept', 'application/json');
  35780. xhr.send();
  35781. function handler() {
  35782. if (this.readyState === this.DONE) {
  35783. if (this.status === 200) {
  35784. resolve(this.response);
  35785. } else {
  35786. reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
  35787. }
  35788. }
  35789. };
  35790. });
  35791. }
  35792. getJSON('/posts.json').then(function(json) {
  35793. // on fulfillment
  35794. }, function(reason) {
  35795. // on rejection
  35796. });
  35797. ```
  35798. Unlike callbacks, promises are great composable primitives.
  35799. ```js
  35800. Promise.all([
  35801. getJSON('/posts'),
  35802. getJSON('/comments')
  35803. ]).then(function(values){
  35804. values[0] // => postsJSON
  35805. values[1] // => commentsJSON
  35806. return values;
  35807. });
  35808. ```
  35809. @class Promise
  35810. @param {Function} resolver
  35811. Useful for tooling.
  35812. @constructor
  35813. */
  35814. var Promise$1 = function () {
  35815. function Promise(resolver) {
  35816. this[PROMISE_ID] = nextId();
  35817. this._result = this._state = undefined;
  35818. this._subscribers = [];
  35819. if (noop !== resolver) {
  35820. typeof resolver !== 'function' && needsResolver();
  35821. this instanceof Promise ? initializePromise(this, resolver) : needsNew();
  35822. }
  35823. }
  35824. /**
  35825. The primary way of interacting with a promise is through its `then` method,
  35826. which registers callbacks to receive either a promise's eventual value or the
  35827. reason why the promise cannot be fulfilled.
  35828. ```js
  35829. findUser().then(function(user){
  35830. // user is available
  35831. }, function(reason){
  35832. // user is unavailable, and you are given the reason why
  35833. });
  35834. ```
  35835. Chaining
  35836. --------
  35837. The return value of `then` is itself a promise. This second, 'downstream'
  35838. promise is resolved with the return value of the first promise's fulfillment
  35839. or rejection handler, or rejected if the handler throws an exception.
  35840. ```js
  35841. findUser().then(function (user) {
  35842. return user.name;
  35843. }, function (reason) {
  35844. return 'default name';
  35845. }).then(function (userName) {
  35846. // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
  35847. // will be `'default name'`
  35848. });
  35849. findUser().then(function (user) {
  35850. throw new Error('Found user, but still unhappy');
  35851. }, function (reason) {
  35852. throw new Error('`findUser` rejected and we're unhappy');
  35853. }).then(function (value) {
  35854. // never reached
  35855. }, function (reason) {
  35856. // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
  35857. // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
  35858. });
  35859. ```
  35860. If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
  35861. ```js
  35862. findUser().then(function (user) {
  35863. throw new PedagogicalException('Upstream error');
  35864. }).then(function (value) {
  35865. // never reached
  35866. }).then(function (value) {
  35867. // never reached
  35868. }, function (reason) {
  35869. // The `PedgagocialException` is propagated all the way down to here
  35870. });
  35871. ```
  35872. Assimilation
  35873. ------------
  35874. Sometimes the value you want to propagate to a downstream promise can only be
  35875. retrieved asynchronously. This can be achieved by returning a promise in the
  35876. fulfillment or rejection handler. The downstream promise will then be pending
  35877. until the returned promise is settled. This is called *assimilation*.
  35878. ```js
  35879. findUser().then(function (user) {
  35880. return findCommentsByAuthor(user);
  35881. }).then(function (comments) {
  35882. // The user's comments are now available
  35883. });
  35884. ```
  35885. If the assimliated promise rejects, then the downstream promise will also reject.
  35886. ```js
  35887. findUser().then(function (user) {
  35888. return findCommentsByAuthor(user);
  35889. }).then(function (comments) {
  35890. // If `findCommentsByAuthor` fulfills, we'll have the value here
  35891. }, function (reason) {
  35892. // If `findCommentsByAuthor` rejects, we'll have the reason here
  35893. });
  35894. ```
  35895. Simple Example
  35896. --------------
  35897. Synchronous Example
  35898. ```javascript
  35899. let result;
  35900. try {
  35901. result = findResult();
  35902. // success
  35903. } catch(reason) {
  35904. // failure
  35905. }
  35906. ```
  35907. Errback Example
  35908. ```js
  35909. findResult(function(result, err){
  35910. if (err) {
  35911. // failure
  35912. } else {
  35913. // success
  35914. }
  35915. });
  35916. ```
  35917. Promise Example;
  35918. ```javascript
  35919. findResult().then(function(result){
  35920. // success
  35921. }, function(reason){
  35922. // failure
  35923. });
  35924. ```
  35925. Advanced Example
  35926. --------------
  35927. Synchronous Example
  35928. ```javascript
  35929. let author, books;
  35930. try {
  35931. author = findAuthor();
  35932. books = findBooksByAuthor(author);
  35933. // success
  35934. } catch(reason) {
  35935. // failure
  35936. }
  35937. ```
  35938. Errback Example
  35939. ```js
  35940. function foundBooks(books) {
  35941. }
  35942. function failure(reason) {
  35943. }
  35944. findAuthor(function(author, err){
  35945. if (err) {
  35946. failure(err);
  35947. // failure
  35948. } else {
  35949. try {
  35950. findBoooksByAuthor(author, function(books, err) {
  35951. if (err) {
  35952. failure(err);
  35953. } else {
  35954. try {
  35955. foundBooks(books);
  35956. } catch(reason) {
  35957. failure(reason);
  35958. }
  35959. }
  35960. });
  35961. } catch(error) {
  35962. failure(err);
  35963. }
  35964. // success
  35965. }
  35966. });
  35967. ```
  35968. Promise Example;
  35969. ```javascript
  35970. findAuthor().
  35971. then(findBooksByAuthor).
  35972. then(function(books){
  35973. // found books
  35974. }).catch(function(reason){
  35975. // something went wrong
  35976. });
  35977. ```
  35978. @method then
  35979. @param {Function} onFulfilled
  35980. @param {Function} onRejected
  35981. Useful for tooling.
  35982. @return {Promise}
  35983. */
  35984. /**
  35985. `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
  35986. as the catch block of a try/catch statement.
  35987. ```js
  35988. function findAuthor(){
  35989. throw new Error('couldn't find that author');
  35990. }
  35991. // synchronous
  35992. try {
  35993. findAuthor();
  35994. } catch(reason) {
  35995. // something went wrong
  35996. }
  35997. // async with promises
  35998. findAuthor().catch(function(reason){
  35999. // something went wrong
  36000. });
  36001. ```
  36002. @method catch
  36003. @param {Function} onRejection
  36004. Useful for tooling.
  36005. @return {Promise}
  36006. */
  36007. Promise.prototype.catch = function _catch(onRejection) {
  36008. return this.then(null, onRejection);
  36009. };
  36010. /**
  36011. `finally` will be invoked regardless of the promise's fate just as native
  36012. try/catch/finally behaves
  36013. Synchronous example:
  36014. ```js
  36015. findAuthor() {
  36016. if (Math.random() > 0.5) {
  36017. throw new Error();
  36018. }
  36019. return new Author();
  36020. }
  36021. try {
  36022. return findAuthor(); // succeed or fail
  36023. } catch(error) {
  36024. return findOtherAuther();
  36025. } finally {
  36026. // always runs
  36027. // doesn't affect the return value
  36028. }
  36029. ```
  36030. Asynchronous example:
  36031. ```js
  36032. findAuthor().catch(function(reason){
  36033. return findOtherAuther();
  36034. }).finally(function(){
  36035. // author was either found, or not
  36036. });
  36037. ```
  36038. @method finally
  36039. @param {Function} callback
  36040. @return {Promise}
  36041. */
  36042. Promise.prototype.finally = function _finally(callback) {
  36043. var promise = this;
  36044. var constructor = promise.constructor;
  36045. if (isFunction(callback)) {
  36046. return promise.then(function (value) {
  36047. return constructor.resolve(callback()).then(function () {
  36048. return value;
  36049. });
  36050. }, function (reason) {
  36051. return constructor.resolve(callback()).then(function () {
  36052. throw reason;
  36053. });
  36054. });
  36055. }
  36056. return promise.then(callback, callback);
  36057. };
  36058. return Promise;
  36059. }();
  36060. Promise$1.prototype.then = then;
  36061. Promise$1.all = all;
  36062. Promise$1.race = race;
  36063. Promise$1.resolve = resolve$1;
  36064. Promise$1.reject = reject$1;
  36065. Promise$1._setScheduler = setScheduler;
  36066. Promise$1._setAsap = setAsap;
  36067. Promise$1._asap = asap;
  36068. /*global self*/
  36069. function polyfill() {
  36070. var local = void 0;
  36071. if (typeof __webpack_require__.g !== 'undefined') {
  36072. local = __webpack_require__.g;
  36073. } else if (typeof self !== 'undefined') {
  36074. local = self;
  36075. } else {
  36076. try {
  36077. local = Function('return this')();
  36078. } catch (e) {
  36079. throw new Error('polyfill failed because global object is unavailable in this environment');
  36080. }
  36081. }
  36082. var P = local.Promise;
  36083. if (P) {
  36084. var promiseToString = null;
  36085. try {
  36086. promiseToString = Object.prototype.toString.call(P.resolve());
  36087. } catch (e) {
  36088. // silently ignored
  36089. }
  36090. if (promiseToString === '[object Promise]' && !P.cast) {
  36091. return;
  36092. }
  36093. }
  36094. local.Promise = Promise$1;
  36095. }
  36096. // Strange compat..
  36097. Promise$1.polyfill = polyfill;
  36098. Promise$1.Promise = Promise$1;
  36099. return Promise$1;
  36100. })));
  36101. //# sourceMappingURL=es6-promise.map
  36102. /***/ }),
  36103. /***/ 98641:
  36104. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36105. "use strict";
  36106. module.exports = __webpack_require__(58821)()
  36107. ? __webpack_require__(87933).Symbol
  36108. : __webpack_require__(25127);
  36109. /***/ }),
  36110. /***/ 58821:
  36111. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36112. "use strict";
  36113. var global = __webpack_require__(87933)
  36114. , validTypes = { object: true, symbol: true };
  36115. module.exports = function () {
  36116. var Symbol = global.Symbol;
  36117. var symbol;
  36118. if (typeof Symbol !== "function") return false;
  36119. symbol = Symbol("test symbol");
  36120. try { String(symbol); }
  36121. catch (e) { return false; }
  36122. // Return 'true' also for polyfills
  36123. if (!validTypes[typeof Symbol.iterator]) return false;
  36124. if (!validTypes[typeof Symbol.toPrimitive]) return false;
  36125. if (!validTypes[typeof Symbol.toStringTag]) return false;
  36126. return true;
  36127. };
  36128. /***/ }),
  36129. /***/ 45386:
  36130. /***/ ((module) => {
  36131. "use strict";
  36132. module.exports = function (value) {
  36133. if (!value) return false;
  36134. if (typeof value === "symbol") return true;
  36135. if (!value.constructor) return false;
  36136. if (value.constructor.name !== "Symbol") return false;
  36137. return value[value.constructor.toStringTag] === "Symbol";
  36138. };
  36139. /***/ }),
  36140. /***/ 17451:
  36141. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36142. "use strict";
  36143. var d = __webpack_require__(51804);
  36144. var create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;
  36145. var created = create(null);
  36146. module.exports = function (desc) {
  36147. var postfix = 0, name, ie11BugWorkaround;
  36148. while (created[desc + (postfix || "")]) ++postfix;
  36149. desc += postfix || "";
  36150. created[desc] = true;
  36151. name = "@@" + desc;
  36152. defineProperty(
  36153. objPrototype,
  36154. name,
  36155. d.gs(null, function (value) {
  36156. // For IE11 issue see:
  36157. // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
  36158. // ie11-broken-getters-on-dom-objects
  36159. // https://github.com/medikoo/es6-symbol/issues/12
  36160. if (ie11BugWorkaround) return;
  36161. ie11BugWorkaround = true;
  36162. defineProperty(this, name, d(value));
  36163. ie11BugWorkaround = false;
  36164. })
  36165. );
  36166. return name;
  36167. };
  36168. /***/ }),
  36169. /***/ 36237:
  36170. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36171. "use strict";
  36172. var d = __webpack_require__(51804)
  36173. , NativeSymbol = __webpack_require__(87933).Symbol;
  36174. module.exports = function (SymbolPolyfill) {
  36175. return Object.defineProperties(SymbolPolyfill, {
  36176. // To ensure proper interoperability with other native functions (e.g. Array.from)
  36177. // fallback to eventual native implementation of given symbol
  36178. hasInstance: d(
  36179. "", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill("hasInstance")
  36180. ),
  36181. isConcatSpreadable: d(
  36182. "",
  36183. (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
  36184. SymbolPolyfill("isConcatSpreadable")
  36185. ),
  36186. iterator: d("", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill("iterator")),
  36187. match: d("", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill("match")),
  36188. replace: d("", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill("replace")),
  36189. search: d("", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill("search")),
  36190. species: d("", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill("species")),
  36191. split: d("", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill("split")),
  36192. toPrimitive: d(
  36193. "", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill("toPrimitive")
  36194. ),
  36195. toStringTag: d(
  36196. "", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill("toStringTag")
  36197. ),
  36198. unscopables: d(
  36199. "", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill("unscopables")
  36200. )
  36201. });
  36202. };
  36203. /***/ }),
  36204. /***/ 70277:
  36205. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36206. "use strict";
  36207. var d = __webpack_require__(51804)
  36208. , validateSymbol = __webpack_require__(28541);
  36209. var registry = Object.create(null);
  36210. module.exports = function (SymbolPolyfill) {
  36211. return Object.defineProperties(SymbolPolyfill, {
  36212. for: d(function (key) {
  36213. if (registry[key]) return registry[key];
  36214. return (registry[key] = SymbolPolyfill(String(key)));
  36215. }),
  36216. keyFor: d(function (symbol) {
  36217. var key;
  36218. validateSymbol(symbol);
  36219. for (key in registry) {
  36220. if (registry[key] === symbol) return key;
  36221. }
  36222. return undefined;
  36223. })
  36224. });
  36225. };
  36226. /***/ }),
  36227. /***/ 25127:
  36228. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36229. "use strict";
  36230. // ES2015 Symbol polyfill for environments that do not (or partially) support it
  36231. var d = __webpack_require__(51804)
  36232. , validateSymbol = __webpack_require__(28541)
  36233. , NativeSymbol = __webpack_require__(87933).Symbol
  36234. , generateName = __webpack_require__(17451)
  36235. , setupStandardSymbols = __webpack_require__(36237)
  36236. , setupSymbolRegistry = __webpack_require__(70277);
  36237. var create = Object.create
  36238. , defineProperties = Object.defineProperties
  36239. , defineProperty = Object.defineProperty;
  36240. var SymbolPolyfill, HiddenSymbol, isNativeSafe;
  36241. if (typeof NativeSymbol === "function") {
  36242. try {
  36243. String(NativeSymbol());
  36244. isNativeSafe = true;
  36245. } catch (ignore) {}
  36246. } else {
  36247. NativeSymbol = null;
  36248. }
  36249. // Internal constructor (not one exposed) for creating Symbol instances.
  36250. // This one is used to ensure that `someSymbol instanceof Symbol` always return false
  36251. HiddenSymbol = function Symbol(description) {
  36252. if (this instanceof HiddenSymbol) throw new TypeError("Symbol is not a constructor");
  36253. return SymbolPolyfill(description);
  36254. };
  36255. // Exposed `Symbol` constructor
  36256. // (returns instances of HiddenSymbol)
  36257. module.exports = SymbolPolyfill = function Symbol(description) {
  36258. var symbol;
  36259. if (this instanceof Symbol) throw new TypeError("Symbol is not a constructor");
  36260. if (isNativeSafe) return NativeSymbol(description);
  36261. symbol = create(HiddenSymbol.prototype);
  36262. description = description === undefined ? "" : String(description);
  36263. return defineProperties(symbol, {
  36264. __description__: d("", description),
  36265. __name__: d("", generateName(description))
  36266. });
  36267. };
  36268. setupStandardSymbols(SymbolPolyfill);
  36269. setupSymbolRegistry(SymbolPolyfill);
  36270. // Internal tweaks for real symbol producer
  36271. defineProperties(HiddenSymbol.prototype, {
  36272. constructor: d(SymbolPolyfill),
  36273. toString: d("", function () { return this.__name__; })
  36274. });
  36275. // Proper implementation of methods exposed on Symbol.prototype
  36276. // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
  36277. defineProperties(SymbolPolyfill.prototype, {
  36278. toString: d(function () { return "Symbol (" + validateSymbol(this).__description__ + ")"; }),
  36279. valueOf: d(function () { return validateSymbol(this); })
  36280. });
  36281. defineProperty(
  36282. SymbolPolyfill.prototype,
  36283. SymbolPolyfill.toPrimitive,
  36284. d("", function () {
  36285. var symbol = validateSymbol(this);
  36286. if (typeof symbol === "symbol") return symbol;
  36287. return symbol.toString();
  36288. })
  36289. );
  36290. defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol"));
  36291. // Proper implementaton of toPrimitive and toStringTag for returned symbol instances
  36292. defineProperty(
  36293. HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
  36294. d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])
  36295. );
  36296. // Note: It's important to define `toPrimitive` as last one, as some implementations
  36297. // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
  36298. // And that may invoke error in definition flow:
  36299. // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
  36300. defineProperty(
  36301. HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
  36302. d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])
  36303. );
  36304. /***/ }),
  36305. /***/ 28541:
  36306. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  36307. "use strict";
  36308. var isSymbol = __webpack_require__(45386);
  36309. module.exports = function (value) {
  36310. if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
  36311. return value;
  36312. };
  36313. /***/ }),
  36314. /***/ 48370:
  36315. /***/ ((module, exports, __webpack_require__) => {
  36316. "use strict";
  36317. var d = __webpack_require__(51804)
  36318. , callable = __webpack_require__(31290)
  36319. , apply = Function.prototype.apply, call = Function.prototype.call
  36320. , create = Object.create, defineProperty = Object.defineProperty
  36321. , defineProperties = Object.defineProperties
  36322. , hasOwnProperty = Object.prototype.hasOwnProperty
  36323. , descriptor = { configurable: true, enumerable: false, writable: true }
  36324. , on, once, off, emit, methods, descriptors, base;
  36325. on = function (type, listener) {
  36326. var data;
  36327. callable(listener);
  36328. if (!hasOwnProperty.call(this, '__ee__')) {
  36329. data = descriptor.value = create(null);
  36330. defineProperty(this, '__ee__', descriptor);
  36331. descriptor.value = null;
  36332. } else {
  36333. data = this.__ee__;
  36334. }
  36335. if (!data[type]) data[type] = listener;
  36336. else if (typeof data[type] === 'object') data[type].push(listener);
  36337. else data[type] = [data[type], listener];
  36338. return this;
  36339. };
  36340. once = function (type, listener) {
  36341. var once, self;
  36342. callable(listener);
  36343. self = this;
  36344. on.call(this, type, once = function () {
  36345. off.call(self, type, once);
  36346. apply.call(listener, this, arguments);
  36347. });
  36348. once.__eeOnceListener__ = listener;
  36349. return this;
  36350. };
  36351. off = function (type, listener) {
  36352. var data, listeners, candidate, i;
  36353. callable(listener);
  36354. if (!hasOwnProperty.call(this, '__ee__')) return this;
  36355. data = this.__ee__;
  36356. if (!data[type]) return this;
  36357. listeners = data[type];
  36358. if (typeof listeners === 'object') {
  36359. for (i = 0; (candidate = listeners[i]); ++i) {
  36360. if ((candidate === listener) ||
  36361. (candidate.__eeOnceListener__ === listener)) {
  36362. if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
  36363. else listeners.splice(i, 1);
  36364. }
  36365. }
  36366. } else {
  36367. if ((listeners === listener) ||
  36368. (listeners.__eeOnceListener__ === listener)) {
  36369. delete data[type];
  36370. }
  36371. }
  36372. return this;
  36373. };
  36374. emit = function (type) {
  36375. var i, l, listener, listeners, args;
  36376. if (!hasOwnProperty.call(this, '__ee__')) return;
  36377. listeners = this.__ee__[type];
  36378. if (!listeners) return;
  36379. if (typeof listeners === 'object') {
  36380. l = arguments.length;
  36381. args = new Array(l - 1);
  36382. for (i = 1; i < l; ++i) args[i - 1] = arguments[i];
  36383. listeners = listeners.slice();
  36384. for (i = 0; (listener = listeners[i]); ++i) {
  36385. apply.call(listener, this, args);
  36386. }
  36387. } else {
  36388. switch (arguments.length) {
  36389. case 1:
  36390. call.call(listeners, this);
  36391. break;
  36392. case 2:
  36393. call.call(listeners, this, arguments[1]);
  36394. break;
  36395. case 3:
  36396. call.call(listeners, this, arguments[1], arguments[2]);
  36397. break;
  36398. default:
  36399. l = arguments.length;
  36400. args = new Array(l - 1);
  36401. for (i = 1; i < l; ++i) {
  36402. args[i - 1] = arguments[i];
  36403. }
  36404. apply.call(listeners, this, args);
  36405. }
  36406. }
  36407. };
  36408. methods = {
  36409. on: on,
  36410. once: once,
  36411. off: off,
  36412. emit: emit
  36413. };
  36414. descriptors = {
  36415. on: d(on),
  36416. once: d(once),
  36417. off: d(off),
  36418. emit: d(emit)
  36419. };
  36420. base = defineProperties({}, descriptors);
  36421. module.exports = exports = function (o) {
  36422. return (o == null) ? create(base) : defineProperties(Object(o), descriptors);
  36423. };
  36424. exports.methods = methods;
  36425. /***/ }),
  36426. /***/ 26729:
  36427. /***/ ((module) => {
  36428. "use strict";
  36429. var has = Object.prototype.hasOwnProperty
  36430. , prefix = '~';
  36431. /**
  36432. * Constructor to create a storage for our `EE` objects.
  36433. * An `Events` instance is a plain object whose properties are event names.
  36434. *
  36435. * @constructor
  36436. * @private
  36437. */
  36438. function Events() {}
  36439. //
  36440. // We try to not inherit from `Object.prototype`. In some engines creating an
  36441. // instance in this way is faster than calling `Object.create(null)` directly.
  36442. // If `Object.create(null)` is not supported we prefix the event names with a
  36443. // character to make sure that the built-in object properties are not
  36444. // overridden or used as an attack vector.
  36445. //
  36446. if (Object.create) {
  36447. Events.prototype = Object.create(null);
  36448. //
  36449. // This hack is needed because the `__proto__` property is still inherited in
  36450. // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
  36451. //
  36452. if (!new Events().__proto__) prefix = false;
  36453. }
  36454. /**
  36455. * Representation of a single event listener.
  36456. *
  36457. * @param {Function} fn The listener function.
  36458. * @param {*} context The context to invoke the listener with.
  36459. * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
  36460. * @constructor
  36461. * @private
  36462. */
  36463. function EE(fn, context, once) {
  36464. this.fn = fn;
  36465. this.context = context;
  36466. this.once = once || false;
  36467. }
  36468. /**
  36469. * Add a listener for a given event.
  36470. *
  36471. * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
  36472. * @param {(String|Symbol)} event The event name.
  36473. * @param {Function} fn The listener function.
  36474. * @param {*} context The context to invoke the listener with.
  36475. * @param {Boolean} once Specify if the listener is a one-time listener.
  36476. * @returns {EventEmitter}
  36477. * @private
  36478. */
  36479. function addListener(emitter, event, fn, context, once) {
  36480. if (typeof fn !== 'function') {
  36481. throw new TypeError('The listener must be a function');
  36482. }
  36483. var listener = new EE(fn, context || emitter, once)
  36484. , evt = prefix ? prefix + event : event;
  36485. if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
  36486. else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
  36487. else emitter._events[evt] = [emitter._events[evt], listener];
  36488. return emitter;
  36489. }
  36490. /**
  36491. * Clear event by name.
  36492. *
  36493. * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
  36494. * @param {(String|Symbol)} evt The Event name.
  36495. * @private
  36496. */
  36497. function clearEvent(emitter, evt) {
  36498. if (--emitter._eventsCount === 0) emitter._events = new Events();
  36499. else delete emitter._events[evt];
  36500. }
  36501. /**
  36502. * Minimal `EventEmitter` interface that is molded against the Node.js
  36503. * `EventEmitter` interface.
  36504. *
  36505. * @constructor
  36506. * @public
  36507. */
  36508. function EventEmitter() {
  36509. this._events = new Events();
  36510. this._eventsCount = 0;
  36511. }
  36512. /**
  36513. * Return an array listing the events for which the emitter has registered
  36514. * listeners.
  36515. *
  36516. * @returns {Array}
  36517. * @public
  36518. */
  36519. EventEmitter.prototype.eventNames = function eventNames() {
  36520. var names = []
  36521. , events
  36522. , name;
  36523. if (this._eventsCount === 0) return names;
  36524. for (name in (events = this._events)) {
  36525. if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
  36526. }
  36527. if (Object.getOwnPropertySymbols) {
  36528. return names.concat(Object.getOwnPropertySymbols(events));
  36529. }
  36530. return names;
  36531. };
  36532. /**
  36533. * Return the listeners registered for a given event.
  36534. *
  36535. * @param {(String|Symbol)} event The event name.
  36536. * @returns {Array} The registered listeners.
  36537. * @public
  36538. */
  36539. EventEmitter.prototype.listeners = function listeners(event) {
  36540. var evt = prefix ? prefix + event : event
  36541. , handlers = this._events[evt];
  36542. if (!handlers) return [];
  36543. if (handlers.fn) return [handlers.fn];
  36544. for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
  36545. ee[i] = handlers[i].fn;
  36546. }
  36547. return ee;
  36548. };
  36549. /**
  36550. * Return the number of listeners listening to a given event.
  36551. *
  36552. * @param {(String|Symbol)} event The event name.
  36553. * @returns {Number} The number of listeners.
  36554. * @public
  36555. */
  36556. EventEmitter.prototype.listenerCount = function listenerCount(event) {
  36557. var evt = prefix ? prefix + event : event
  36558. , listeners = this._events[evt];
  36559. if (!listeners) return 0;
  36560. if (listeners.fn) return 1;
  36561. return listeners.length;
  36562. };
  36563. /**
  36564. * Calls each of the listeners registered for a given event.
  36565. *
  36566. * @param {(String|Symbol)} event The event name.
  36567. * @returns {Boolean} `true` if the event had listeners, else `false`.
  36568. * @public
  36569. */
  36570. EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
  36571. var evt = prefix ? prefix + event : event;
  36572. if (!this._events[evt]) return false;
  36573. var listeners = this._events[evt]
  36574. , len = arguments.length
  36575. , args
  36576. , i;
  36577. if (listeners.fn) {
  36578. if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
  36579. switch (len) {
  36580. case 1: return listeners.fn.call(listeners.context), true;
  36581. case 2: return listeners.fn.call(listeners.context, a1), true;
  36582. case 3: return listeners.fn.call(listeners.context, a1, a2), true;
  36583. case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
  36584. case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
  36585. case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
  36586. }
  36587. for (i = 1, args = new Array(len -1); i < len; i++) {
  36588. args[i - 1] = arguments[i];
  36589. }
  36590. listeners.fn.apply(listeners.context, args);
  36591. } else {
  36592. var length = listeners.length
  36593. , j;
  36594. for (i = 0; i < length; i++) {
  36595. if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
  36596. switch (len) {
  36597. case 1: listeners[i].fn.call(listeners[i].context); break;
  36598. case 2: listeners[i].fn.call(listeners[i].context, a1); break;
  36599. case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
  36600. case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
  36601. default:
  36602. if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
  36603. args[j - 1] = arguments[j];
  36604. }
  36605. listeners[i].fn.apply(listeners[i].context, args);
  36606. }
  36607. }
  36608. }
  36609. return true;
  36610. };
  36611. /**
  36612. * Add a listener for a given event.
  36613. *
  36614. * @param {(String|Symbol)} event The event name.
  36615. * @param {Function} fn The listener function.
  36616. * @param {*} [context=this] The context to invoke the listener with.
  36617. * @returns {EventEmitter} `this`.
  36618. * @public
  36619. */
  36620. EventEmitter.prototype.on = function on(event, fn, context) {
  36621. return addListener(this, event, fn, context, false);
  36622. };
  36623. /**
  36624. * Add a one-time listener for a given event.
  36625. *
  36626. * @param {(String|Symbol)} event The event name.
  36627. * @param {Function} fn The listener function.
  36628. * @param {*} [context=this] The context to invoke the listener with.
  36629. * @returns {EventEmitter} `this`.
  36630. * @public
  36631. */
  36632. EventEmitter.prototype.once = function once(event, fn, context) {
  36633. return addListener(this, event, fn, context, true);
  36634. };
  36635. /**
  36636. * Remove the listeners of a given event.
  36637. *
  36638. * @param {(String|Symbol)} event The event name.
  36639. * @param {Function} fn Only remove the listeners that match this function.
  36640. * @param {*} context Only remove the listeners that have this context.
  36641. * @param {Boolean} once Only remove one-time listeners.
  36642. * @returns {EventEmitter} `this`.
  36643. * @public
  36644. */
  36645. EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
  36646. var evt = prefix ? prefix + event : event;
  36647. if (!this._events[evt]) return this;
  36648. if (!fn) {
  36649. clearEvent(this, evt);
  36650. return this;
  36651. }
  36652. var listeners = this._events[evt];
  36653. if (listeners.fn) {
  36654. if (
  36655. listeners.fn === fn &&
  36656. (!once || listeners.once) &&
  36657. (!context || listeners.context === context)
  36658. ) {
  36659. clearEvent(this, evt);
  36660. }
  36661. } else {
  36662. for (var i = 0, events = [], length = listeners.length; i < length; i++) {
  36663. if (
  36664. listeners[i].fn !== fn ||
  36665. (once && !listeners[i].once) ||
  36666. (context && listeners[i].context !== context)
  36667. ) {
  36668. events.push(listeners[i]);
  36669. }
  36670. }
  36671. //
  36672. // Reset the array, or remove it completely if we have no more listeners.
  36673. //
  36674. if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
  36675. else clearEvent(this, evt);
  36676. }
  36677. return this;
  36678. };
  36679. /**
  36680. * Remove all listeners, or those of the specified event.
  36681. *
  36682. * @param {(String|Symbol)} [event] The event name.
  36683. * @returns {EventEmitter} `this`.
  36684. * @public
  36685. */
  36686. EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
  36687. var evt;
  36688. if (event) {
  36689. evt = prefix ? prefix + event : event;
  36690. if (this._events[evt]) clearEvent(this, evt);
  36691. } else {
  36692. this._events = new Events();
  36693. this._eventsCount = 0;
  36694. }
  36695. return this;
  36696. };
  36697. //
  36698. // Alias methods names because people roll like that.
  36699. //
  36700. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  36701. EventEmitter.prototype.addListener = EventEmitter.prototype.on;
  36702. //
  36703. // Expose the prefix.
  36704. //
  36705. EventEmitter.prefixed = prefix;
  36706. //
  36707. // Allow `EventEmitter` to be imported as module namespace.
  36708. //
  36709. EventEmitter.EventEmitter = EventEmitter;
  36710. //
  36711. // Expose the module.
  36712. //
  36713. if (true) {
  36714. module.exports = EventEmitter;
  36715. }
  36716. /***/ }),
  36717. /***/ 17187:
  36718. /***/ ((module) => {
  36719. "use strict";
  36720. // Copyright Joyent, Inc. and other Node contributors.
  36721. //
  36722. // Permission is hereby granted, free of charge, to any person obtaining a
  36723. // copy of this software and associated documentation files (the
  36724. // "Software"), to deal in the Software without restriction, including
  36725. // without limitation the rights to use, copy, modify, merge, publish,
  36726. // distribute, sublicense, and/or sell copies of the Software, and to permit
  36727. // persons to whom the Software is furnished to do so, subject to the
  36728. // following conditions:
  36729. //
  36730. // The above copyright notice and this permission notice shall be included
  36731. // in all copies or substantial portions of the Software.
  36732. //
  36733. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  36734. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  36735. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  36736. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  36737. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  36738. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  36739. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  36740. var R = typeof Reflect === 'object' ? Reflect : null
  36741. var ReflectApply = R && typeof R.apply === 'function'
  36742. ? R.apply
  36743. : function ReflectApply(target, receiver, args) {
  36744. return Function.prototype.apply.call(target, receiver, args);
  36745. }
  36746. var ReflectOwnKeys
  36747. if (R && typeof R.ownKeys === 'function') {
  36748. ReflectOwnKeys = R.ownKeys
  36749. } else if (Object.getOwnPropertySymbols) {
  36750. ReflectOwnKeys = function ReflectOwnKeys(target) {
  36751. return Object.getOwnPropertyNames(target)
  36752. .concat(Object.getOwnPropertySymbols(target));
  36753. };
  36754. } else {
  36755. ReflectOwnKeys = function ReflectOwnKeys(target) {
  36756. return Object.getOwnPropertyNames(target);
  36757. };
  36758. }
  36759. function ProcessEmitWarning(warning) {
  36760. if (console && console.warn) console.warn(warning);
  36761. }
  36762. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  36763. return value !== value;
  36764. }
  36765. function EventEmitter() {
  36766. EventEmitter.init.call(this);
  36767. }
  36768. module.exports = EventEmitter;
  36769. module.exports.once = once;
  36770. // Backwards-compat with node 0.10.x
  36771. EventEmitter.EventEmitter = EventEmitter;
  36772. EventEmitter.prototype._events = undefined;
  36773. EventEmitter.prototype._eventsCount = 0;
  36774. EventEmitter.prototype._maxListeners = undefined;
  36775. // By default EventEmitters will print a warning if more than 10 listeners are
  36776. // added to it. This is a useful default which helps finding memory leaks.
  36777. var defaultMaxListeners = 10;
  36778. function checkListener(listener) {
  36779. if (typeof listener !== 'function') {
  36780. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  36781. }
  36782. }
  36783. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  36784. enumerable: true,
  36785. get: function() {
  36786. return defaultMaxListeners;
  36787. },
  36788. set: function(arg) {
  36789. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  36790. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  36791. }
  36792. defaultMaxListeners = arg;
  36793. }
  36794. });
  36795. EventEmitter.init = function() {
  36796. if (this._events === undefined ||
  36797. this._events === Object.getPrototypeOf(this)._events) {
  36798. this._events = Object.create(null);
  36799. this._eventsCount = 0;
  36800. }
  36801. this._maxListeners = this._maxListeners || undefined;
  36802. };
  36803. // Obviously not all Emitters should be limited to 10. This function allows
  36804. // that to be increased. Set to zero for unlimited.
  36805. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  36806. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  36807. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  36808. }
  36809. this._maxListeners = n;
  36810. return this;
  36811. };
  36812. function _getMaxListeners(that) {
  36813. if (that._maxListeners === undefined)
  36814. return EventEmitter.defaultMaxListeners;
  36815. return that._maxListeners;
  36816. }
  36817. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  36818. return _getMaxListeners(this);
  36819. };
  36820. EventEmitter.prototype.emit = function emit(type) {
  36821. var args = [];
  36822. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  36823. var doError = (type === 'error');
  36824. var events = this._events;
  36825. if (events !== undefined)
  36826. doError = (doError && events.error === undefined);
  36827. else if (!doError)
  36828. return false;
  36829. // If there is no 'error' event listener then throw.
  36830. if (doError) {
  36831. var er;
  36832. if (args.length > 0)
  36833. er = args[0];
  36834. if (er instanceof Error) {
  36835. // Note: The comments on the `throw` lines are intentional, they show
  36836. // up in Node's output if this results in an unhandled exception.
  36837. throw er; // Unhandled 'error' event
  36838. }
  36839. // At least give some kind of context to the user
  36840. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  36841. err.context = er;
  36842. throw err; // Unhandled 'error' event
  36843. }
  36844. var handler = events[type];
  36845. if (handler === undefined)
  36846. return false;
  36847. if (typeof handler === 'function') {
  36848. ReflectApply(handler, this, args);
  36849. } else {
  36850. var len = handler.length;
  36851. var listeners = arrayClone(handler, len);
  36852. for (var i = 0; i < len; ++i)
  36853. ReflectApply(listeners[i], this, args);
  36854. }
  36855. return true;
  36856. };
  36857. function _addListener(target, type, listener, prepend) {
  36858. var m;
  36859. var events;
  36860. var existing;
  36861. checkListener(listener);
  36862. events = target._events;
  36863. if (events === undefined) {
  36864. events = target._events = Object.create(null);
  36865. target._eventsCount = 0;
  36866. } else {
  36867. // To avoid recursion in the case that type === "newListener"! Before
  36868. // adding it to the listeners, first emit "newListener".
  36869. if (events.newListener !== undefined) {
  36870. target.emit('newListener', type,
  36871. listener.listener ? listener.listener : listener);
  36872. // Re-assign `events` because a newListener handler could have caused the
  36873. // this._events to be assigned to a new object
  36874. events = target._events;
  36875. }
  36876. existing = events[type];
  36877. }
  36878. if (existing === undefined) {
  36879. // Optimize the case of one listener. Don't need the extra array object.
  36880. existing = events[type] = listener;
  36881. ++target._eventsCount;
  36882. } else {
  36883. if (typeof existing === 'function') {
  36884. // Adding the second element, need to change to array.
  36885. existing = events[type] =
  36886. prepend ? [listener, existing] : [existing, listener];
  36887. // If we've already got an array, just append.
  36888. } else if (prepend) {
  36889. existing.unshift(listener);
  36890. } else {
  36891. existing.push(listener);
  36892. }
  36893. // Check for listener leak
  36894. m = _getMaxListeners(target);
  36895. if (m > 0 && existing.length > m && !existing.warned) {
  36896. existing.warned = true;
  36897. // No error code for this since it is a Warning
  36898. // eslint-disable-next-line no-restricted-syntax
  36899. var w = new Error('Possible EventEmitter memory leak detected. ' +
  36900. existing.length + ' ' + String(type) + ' listeners ' +
  36901. 'added. Use emitter.setMaxListeners() to ' +
  36902. 'increase limit');
  36903. w.name = 'MaxListenersExceededWarning';
  36904. w.emitter = target;
  36905. w.type = type;
  36906. w.count = existing.length;
  36907. ProcessEmitWarning(w);
  36908. }
  36909. }
  36910. return target;
  36911. }
  36912. EventEmitter.prototype.addListener = function addListener(type, listener) {
  36913. return _addListener(this, type, listener, false);
  36914. };
  36915. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  36916. EventEmitter.prototype.prependListener =
  36917. function prependListener(type, listener) {
  36918. return _addListener(this, type, listener, true);
  36919. };
  36920. function onceWrapper() {
  36921. if (!this.fired) {
  36922. this.target.removeListener(this.type, this.wrapFn);
  36923. this.fired = true;
  36924. if (arguments.length === 0)
  36925. return this.listener.call(this.target);
  36926. return this.listener.apply(this.target, arguments);
  36927. }
  36928. }
  36929. function _onceWrap(target, type, listener) {
  36930. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  36931. var wrapped = onceWrapper.bind(state);
  36932. wrapped.listener = listener;
  36933. state.wrapFn = wrapped;
  36934. return wrapped;
  36935. }
  36936. EventEmitter.prototype.once = function once(type, listener) {
  36937. checkListener(listener);
  36938. this.on(type, _onceWrap(this, type, listener));
  36939. return this;
  36940. };
  36941. EventEmitter.prototype.prependOnceListener =
  36942. function prependOnceListener(type, listener) {
  36943. checkListener(listener);
  36944. this.prependListener(type, _onceWrap(this, type, listener));
  36945. return this;
  36946. };
  36947. // Emits a 'removeListener' event if and only if the listener was removed.
  36948. EventEmitter.prototype.removeListener =
  36949. function removeListener(type, listener) {
  36950. var list, events, position, i, originalListener;
  36951. checkListener(listener);
  36952. events = this._events;
  36953. if (events === undefined)
  36954. return this;
  36955. list = events[type];
  36956. if (list === undefined)
  36957. return this;
  36958. if (list === listener || list.listener === listener) {
  36959. if (--this._eventsCount === 0)
  36960. this._events = Object.create(null);
  36961. else {
  36962. delete events[type];
  36963. if (events.removeListener)
  36964. this.emit('removeListener', type, list.listener || listener);
  36965. }
  36966. } else if (typeof list !== 'function') {
  36967. position = -1;
  36968. for (i = list.length - 1; i >= 0; i--) {
  36969. if (list[i] === listener || list[i].listener === listener) {
  36970. originalListener = list[i].listener;
  36971. position = i;
  36972. break;
  36973. }
  36974. }
  36975. if (position < 0)
  36976. return this;
  36977. if (position === 0)
  36978. list.shift();
  36979. else {
  36980. spliceOne(list, position);
  36981. }
  36982. if (list.length === 1)
  36983. events[type] = list[0];
  36984. if (events.removeListener !== undefined)
  36985. this.emit('removeListener', type, originalListener || listener);
  36986. }
  36987. return this;
  36988. };
  36989. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  36990. EventEmitter.prototype.removeAllListeners =
  36991. function removeAllListeners(type) {
  36992. var listeners, events, i;
  36993. events = this._events;
  36994. if (events === undefined)
  36995. return this;
  36996. // not listening for removeListener, no need to emit
  36997. if (events.removeListener === undefined) {
  36998. if (arguments.length === 0) {
  36999. this._events = Object.create(null);
  37000. this._eventsCount = 0;
  37001. } else if (events[type] !== undefined) {
  37002. if (--this._eventsCount === 0)
  37003. this._events = Object.create(null);
  37004. else
  37005. delete events[type];
  37006. }
  37007. return this;
  37008. }
  37009. // emit removeListener for all listeners on all events
  37010. if (arguments.length === 0) {
  37011. var keys = Object.keys(events);
  37012. var key;
  37013. for (i = 0; i < keys.length; ++i) {
  37014. key = keys[i];
  37015. if (key === 'removeListener') continue;
  37016. this.removeAllListeners(key);
  37017. }
  37018. this.removeAllListeners('removeListener');
  37019. this._events = Object.create(null);
  37020. this._eventsCount = 0;
  37021. return this;
  37022. }
  37023. listeners = events[type];
  37024. if (typeof listeners === 'function') {
  37025. this.removeListener(type, listeners);
  37026. } else if (listeners !== undefined) {
  37027. // LIFO order
  37028. for (i = listeners.length - 1; i >= 0; i--) {
  37029. this.removeListener(type, listeners[i]);
  37030. }
  37031. }
  37032. return this;
  37033. };
  37034. function _listeners(target, type, unwrap) {
  37035. var events = target._events;
  37036. if (events === undefined)
  37037. return [];
  37038. var evlistener = events[type];
  37039. if (evlistener === undefined)
  37040. return [];
  37041. if (typeof evlistener === 'function')
  37042. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  37043. return unwrap ?
  37044. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  37045. }
  37046. EventEmitter.prototype.listeners = function listeners(type) {
  37047. return _listeners(this, type, true);
  37048. };
  37049. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  37050. return _listeners(this, type, false);
  37051. };
  37052. EventEmitter.listenerCount = function(emitter, type) {
  37053. if (typeof emitter.listenerCount === 'function') {
  37054. return emitter.listenerCount(type);
  37055. } else {
  37056. return listenerCount.call(emitter, type);
  37057. }
  37058. };
  37059. EventEmitter.prototype.listenerCount = listenerCount;
  37060. function listenerCount(type) {
  37061. var events = this._events;
  37062. if (events !== undefined) {
  37063. var evlistener = events[type];
  37064. if (typeof evlistener === 'function') {
  37065. return 1;
  37066. } else if (evlistener !== undefined) {
  37067. return evlistener.length;
  37068. }
  37069. }
  37070. return 0;
  37071. }
  37072. EventEmitter.prototype.eventNames = function eventNames() {
  37073. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  37074. };
  37075. function arrayClone(arr, n) {
  37076. var copy = new Array(n);
  37077. for (var i = 0; i < n; ++i)
  37078. copy[i] = arr[i];
  37079. return copy;
  37080. }
  37081. function spliceOne(list, index) {
  37082. for (; index + 1 < list.length; index++)
  37083. list[index] = list[index + 1];
  37084. list.pop();
  37085. }
  37086. function unwrapListeners(arr) {
  37087. var ret = new Array(arr.length);
  37088. for (var i = 0; i < ret.length; ++i) {
  37089. ret[i] = arr[i].listener || arr[i];
  37090. }
  37091. return ret;
  37092. }
  37093. function once(emitter, name) {
  37094. return new Promise(function (resolve, reject) {
  37095. function errorListener(err) {
  37096. emitter.removeListener(name, resolver);
  37097. reject(err);
  37098. }
  37099. function resolver() {
  37100. if (typeof emitter.removeListener === 'function') {
  37101. emitter.removeListener('error', errorListener);
  37102. }
  37103. resolve([].slice.call(arguments));
  37104. };
  37105. eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
  37106. if (name !== 'error') {
  37107. addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
  37108. }
  37109. });
  37110. }
  37111. function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
  37112. if (typeof emitter.on === 'function') {
  37113. eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
  37114. }
  37115. }
  37116. function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
  37117. if (typeof emitter.on === 'function') {
  37118. if (flags.once) {
  37119. emitter.once(name, listener);
  37120. } else {
  37121. emitter.on(name, listener);
  37122. }
  37123. } else if (typeof emitter.addEventListener === 'function') {
  37124. // EventTarget does not have `error` event semantics like Node
  37125. // EventEmitters, we do not listen for `error` events here.
  37126. emitter.addEventListener(name, function wrapListener(arg) {
  37127. // IE does not have builtin `{ once: true }` support so we
  37128. // have to do it manually.
  37129. if (flags.once) {
  37130. emitter.removeEventListener(name, wrapListener);
  37131. }
  37132. listener(arg);
  37133. });
  37134. } else {
  37135. throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
  37136. }
  37137. }
  37138. /***/ }),
  37139. /***/ 67145:
  37140. /***/ ((module) => {
  37141. var naiveFallback = function () {
  37142. if (typeof self === "object" && self) return self;
  37143. if (typeof window === "object" && window) return window;
  37144. throw new Error("Unable to resolve global `this`");
  37145. };
  37146. module.exports = (function () {
  37147. if (this) return this;
  37148. // Unexpected strict mode (may happen if e.g. bundled into ESM module)
  37149. // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
  37150. // In all ES5+ engines global object inherits from Object.prototype
  37151. // (if you approached one that doesn't please report)
  37152. try {
  37153. Object.defineProperty(Object.prototype, "__global__", {
  37154. get: function () { return this; },
  37155. configurable: true
  37156. });
  37157. } catch (error) {
  37158. // Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)
  37159. return naiveFallback();
  37160. }
  37161. try {
  37162. // Safari case (window.__global__ is resolved with global context, but __global__ does not)
  37163. if (!__global__) return naiveFallback();
  37164. return __global__;
  37165. } finally {
  37166. delete Object.prototype.__global__;
  37167. }
  37168. })();
  37169. /***/ }),
  37170. /***/ 87933:
  37171. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  37172. "use strict";
  37173. module.exports = __webpack_require__(66344)() ? globalThis : __webpack_require__(67145);
  37174. /***/ }),
  37175. /***/ 66344:
  37176. /***/ ((module) => {
  37177. "use strict";
  37178. module.exports = function () {
  37179. if (typeof globalThis !== "object") return false;
  37180. if (!globalThis) return false;
  37181. return globalThis.Array === Array;
  37182. };
  37183. /***/ }),
  37184. /***/ 43393:
  37185. /***/ (function(module) {
  37186. /**
  37187. * Copyright (c) 2014-present, Facebook, Inc.
  37188. *
  37189. * This source code is licensed under the MIT license found in the
  37190. * LICENSE file in the root directory of this source tree.
  37191. */
  37192. (function (global, factory) {
  37193. true ? module.exports = factory() :
  37194. 0;
  37195. }(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;
  37196. function createClass(ctor, superClass) {
  37197. if (superClass) {
  37198. ctor.prototype = Object.create(superClass.prototype);
  37199. }
  37200. ctor.prototype.constructor = ctor;
  37201. }
  37202. function Iterable(value) {
  37203. return isIterable(value) ? value : Seq(value);
  37204. }
  37205. createClass(KeyedIterable, Iterable);
  37206. function KeyedIterable(value) {
  37207. return isKeyed(value) ? value : KeyedSeq(value);
  37208. }
  37209. createClass(IndexedIterable, Iterable);
  37210. function IndexedIterable(value) {
  37211. return isIndexed(value) ? value : IndexedSeq(value);
  37212. }
  37213. createClass(SetIterable, Iterable);
  37214. function SetIterable(value) {
  37215. return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);
  37216. }
  37217. function isIterable(maybeIterable) {
  37218. return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);
  37219. }
  37220. function isKeyed(maybeKeyed) {
  37221. return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);
  37222. }
  37223. function isIndexed(maybeIndexed) {
  37224. return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);
  37225. }
  37226. function isAssociative(maybeAssociative) {
  37227. return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
  37228. }
  37229. function isOrdered(maybeOrdered) {
  37230. return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);
  37231. }
  37232. Iterable.isIterable = isIterable;
  37233. Iterable.isKeyed = isKeyed;
  37234. Iterable.isIndexed = isIndexed;
  37235. Iterable.isAssociative = isAssociative;
  37236. Iterable.isOrdered = isOrdered;
  37237. Iterable.Keyed = KeyedIterable;
  37238. Iterable.Indexed = IndexedIterable;
  37239. Iterable.Set = SetIterable;
  37240. var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
  37241. var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
  37242. var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
  37243. var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
  37244. // Used for setting prototype methods that IE8 chokes on.
  37245. var DELETE = 'delete';
  37246. // Constants describing the size of trie nodes.
  37247. var SHIFT = 5; // Resulted in best performance after ______?
  37248. var SIZE = 1 << SHIFT;
  37249. var MASK = SIZE - 1;
  37250. // A consistent shared value representing "not set" which equals nothing other
  37251. // than itself, and nothing that could be provided externally.
  37252. var NOT_SET = {};
  37253. // Boolean references, Rough equivalent of `bool &`.
  37254. var CHANGE_LENGTH = { value: false };
  37255. var DID_ALTER = { value: false };
  37256. function MakeRef(ref) {
  37257. ref.value = false;
  37258. return ref;
  37259. }
  37260. function SetRef(ref) {
  37261. ref && (ref.value = true);
  37262. }
  37263. // A function which returns a value representing an "owner" for transient writes
  37264. // to tries. The return value will only ever equal itself, and will not equal
  37265. // the return of any subsequent call of this function.
  37266. function OwnerID() {}
  37267. // http://jsperf.com/copy-array-inline
  37268. function arrCopy(arr, offset) {
  37269. offset = offset || 0;
  37270. var len = Math.max(0, arr.length - offset);
  37271. var newArr = new Array(len);
  37272. for (var ii = 0; ii < len; ii++) {
  37273. newArr[ii] = arr[ii + offset];
  37274. }
  37275. return newArr;
  37276. }
  37277. function ensureSize(iter) {
  37278. if (iter.size === undefined) {
  37279. iter.size = iter.__iterate(returnTrue);
  37280. }
  37281. return iter.size;
  37282. }
  37283. function wrapIndex(iter, index) {
  37284. // This implements "is array index" which the ECMAString spec defines as:
  37285. //
  37286. // A String property name P is an array index if and only if
  37287. // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
  37288. // to 2^32−1.
  37289. //
  37290. // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
  37291. if (typeof index !== 'number') {
  37292. var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
  37293. if ('' + uint32Index !== index || uint32Index === 4294967295) {
  37294. return NaN;
  37295. }
  37296. index = uint32Index;
  37297. }
  37298. return index < 0 ? ensureSize(iter) + index : index;
  37299. }
  37300. function returnTrue() {
  37301. return true;
  37302. }
  37303. function wholeSlice(begin, end, size) {
  37304. return (begin === 0 || (size !== undefined && begin <= -size)) &&
  37305. (end === undefined || (size !== undefined && end >= size));
  37306. }
  37307. function resolveBegin(begin, size) {
  37308. return resolveIndex(begin, size, 0);
  37309. }
  37310. function resolveEnd(end, size) {
  37311. return resolveIndex(end, size, size);
  37312. }
  37313. function resolveIndex(index, size, defaultIndex) {
  37314. return index === undefined ?
  37315. defaultIndex :
  37316. index < 0 ?
  37317. Math.max(0, size + index) :
  37318. size === undefined ?
  37319. index :
  37320. Math.min(size, index);
  37321. }
  37322. /* global Symbol */
  37323. var ITERATE_KEYS = 0;
  37324. var ITERATE_VALUES = 1;
  37325. var ITERATE_ENTRIES = 2;
  37326. var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  37327. var FAUX_ITERATOR_SYMBOL = '@@iterator';
  37328. var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
  37329. function Iterator(next) {
  37330. this.next = next;
  37331. }
  37332. Iterator.prototype.toString = function() {
  37333. return '[Iterator]';
  37334. };
  37335. Iterator.KEYS = ITERATE_KEYS;
  37336. Iterator.VALUES = ITERATE_VALUES;
  37337. Iterator.ENTRIES = ITERATE_ENTRIES;
  37338. Iterator.prototype.inspect =
  37339. Iterator.prototype.toSource = function () { return this.toString(); }
  37340. Iterator.prototype[ITERATOR_SYMBOL] = function () {
  37341. return this;
  37342. };
  37343. function iteratorValue(type, k, v, iteratorResult) {
  37344. var value = type === 0 ? k : type === 1 ? v : [k, v];
  37345. iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {
  37346. value: value, done: false
  37347. });
  37348. return iteratorResult;
  37349. }
  37350. function iteratorDone() {
  37351. return { value: undefined, done: true };
  37352. }
  37353. function hasIterator(maybeIterable) {
  37354. return !!getIteratorFn(maybeIterable);
  37355. }
  37356. function isIterator(maybeIterator) {
  37357. return maybeIterator && typeof maybeIterator.next === 'function';
  37358. }
  37359. function getIterator(iterable) {
  37360. var iteratorFn = getIteratorFn(iterable);
  37361. return iteratorFn && iteratorFn.call(iterable);
  37362. }
  37363. function getIteratorFn(iterable) {
  37364. var iteratorFn = iterable && (
  37365. (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
  37366. iterable[FAUX_ITERATOR_SYMBOL]
  37367. );
  37368. if (typeof iteratorFn === 'function') {
  37369. return iteratorFn;
  37370. }
  37371. }
  37372. function isArrayLike(value) {
  37373. return value && typeof value.length === 'number';
  37374. }
  37375. createClass(Seq, Iterable);
  37376. function Seq(value) {
  37377. return value === null || value === undefined ? emptySequence() :
  37378. isIterable(value) ? value.toSeq() : seqFromValue(value);
  37379. }
  37380. Seq.of = function(/*...values*/) {
  37381. return Seq(arguments);
  37382. };
  37383. Seq.prototype.toSeq = function() {
  37384. return this;
  37385. };
  37386. Seq.prototype.toString = function() {
  37387. return this.__toString('Seq {', '}');
  37388. };
  37389. Seq.prototype.cacheResult = function() {
  37390. if (!this._cache && this.__iterateUncached) {
  37391. this._cache = this.entrySeq().toArray();
  37392. this.size = this._cache.length;
  37393. }
  37394. return this;
  37395. };
  37396. // abstract __iterateUncached(fn, reverse)
  37397. Seq.prototype.__iterate = function(fn, reverse) {
  37398. return seqIterate(this, fn, reverse, true);
  37399. };
  37400. // abstract __iteratorUncached(type, reverse)
  37401. Seq.prototype.__iterator = function(type, reverse) {
  37402. return seqIterator(this, type, reverse, true);
  37403. };
  37404. createClass(KeyedSeq, Seq);
  37405. function KeyedSeq(value) {
  37406. return value === null || value === undefined ?
  37407. emptySequence().toKeyedSeq() :
  37408. isIterable(value) ?
  37409. (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :
  37410. keyedSeqFromValue(value);
  37411. }
  37412. KeyedSeq.prototype.toKeyedSeq = function() {
  37413. return this;
  37414. };
  37415. createClass(IndexedSeq, Seq);
  37416. function IndexedSeq(value) {
  37417. return value === null || value === undefined ? emptySequence() :
  37418. !isIterable(value) ? indexedSeqFromValue(value) :
  37419. isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();
  37420. }
  37421. IndexedSeq.of = function(/*...values*/) {
  37422. return IndexedSeq(arguments);
  37423. };
  37424. IndexedSeq.prototype.toIndexedSeq = function() {
  37425. return this;
  37426. };
  37427. IndexedSeq.prototype.toString = function() {
  37428. return this.__toString('Seq [', ']');
  37429. };
  37430. IndexedSeq.prototype.__iterate = function(fn, reverse) {
  37431. return seqIterate(this, fn, reverse, false);
  37432. };
  37433. IndexedSeq.prototype.__iterator = function(type, reverse) {
  37434. return seqIterator(this, type, reverse, false);
  37435. };
  37436. createClass(SetSeq, Seq);
  37437. function SetSeq(value) {
  37438. return (
  37439. value === null || value === undefined ? emptySequence() :
  37440. !isIterable(value) ? indexedSeqFromValue(value) :
  37441. isKeyed(value) ? value.entrySeq() : value
  37442. ).toSetSeq();
  37443. }
  37444. SetSeq.of = function(/*...values*/) {
  37445. return SetSeq(arguments);
  37446. };
  37447. SetSeq.prototype.toSetSeq = function() {
  37448. return this;
  37449. };
  37450. Seq.isSeq = isSeq;
  37451. Seq.Keyed = KeyedSeq;
  37452. Seq.Set = SetSeq;
  37453. Seq.Indexed = IndexedSeq;
  37454. var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
  37455. Seq.prototype[IS_SEQ_SENTINEL] = true;
  37456. createClass(ArraySeq, IndexedSeq);
  37457. function ArraySeq(array) {
  37458. this._array = array;
  37459. this.size = array.length;
  37460. }
  37461. ArraySeq.prototype.get = function(index, notSetValue) {
  37462. return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
  37463. };
  37464. ArraySeq.prototype.__iterate = function(fn, reverse) {
  37465. var array = this._array;
  37466. var maxIndex = array.length - 1;
  37467. for (var ii = 0; ii <= maxIndex; ii++) {
  37468. if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {
  37469. return ii + 1;
  37470. }
  37471. }
  37472. return ii;
  37473. };
  37474. ArraySeq.prototype.__iterator = function(type, reverse) {
  37475. var array = this._array;
  37476. var maxIndex = array.length - 1;
  37477. var ii = 0;
  37478. return new Iterator(function()
  37479. {return ii > maxIndex ?
  37480. iteratorDone() :
  37481. iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}
  37482. );
  37483. };
  37484. createClass(ObjectSeq, KeyedSeq);
  37485. function ObjectSeq(object) {
  37486. var keys = Object.keys(object);
  37487. this._object = object;
  37488. this._keys = keys;
  37489. this.size = keys.length;
  37490. }
  37491. ObjectSeq.prototype.get = function(key, notSetValue) {
  37492. if (notSetValue !== undefined && !this.has(key)) {
  37493. return notSetValue;
  37494. }
  37495. return this._object[key];
  37496. };
  37497. ObjectSeq.prototype.has = function(key) {
  37498. return this._object.hasOwnProperty(key);
  37499. };
  37500. ObjectSeq.prototype.__iterate = function(fn, reverse) {
  37501. var object = this._object;
  37502. var keys = this._keys;
  37503. var maxIndex = keys.length - 1;
  37504. for (var ii = 0; ii <= maxIndex; ii++) {
  37505. var key = keys[reverse ? maxIndex - ii : ii];
  37506. if (fn(object[key], key, this) === false) {
  37507. return ii + 1;
  37508. }
  37509. }
  37510. return ii;
  37511. };
  37512. ObjectSeq.prototype.__iterator = function(type, reverse) {
  37513. var object = this._object;
  37514. var keys = this._keys;
  37515. var maxIndex = keys.length - 1;
  37516. var ii = 0;
  37517. return new Iterator(function() {
  37518. var key = keys[reverse ? maxIndex - ii : ii];
  37519. return ii++ > maxIndex ?
  37520. iteratorDone() :
  37521. iteratorValue(type, key, object[key]);
  37522. });
  37523. };
  37524. ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;
  37525. createClass(IterableSeq, IndexedSeq);
  37526. function IterableSeq(iterable) {
  37527. this._iterable = iterable;
  37528. this.size = iterable.length || iterable.size;
  37529. }
  37530. IterableSeq.prototype.__iterateUncached = function(fn, reverse) {
  37531. if (reverse) {
  37532. return this.cacheResult().__iterate(fn, reverse);
  37533. }
  37534. var iterable = this._iterable;
  37535. var iterator = getIterator(iterable);
  37536. var iterations = 0;
  37537. if (isIterator(iterator)) {
  37538. var step;
  37539. while (!(step = iterator.next()).done) {
  37540. if (fn(step.value, iterations++, this) === false) {
  37541. break;
  37542. }
  37543. }
  37544. }
  37545. return iterations;
  37546. };
  37547. IterableSeq.prototype.__iteratorUncached = function(type, reverse) {
  37548. if (reverse) {
  37549. return this.cacheResult().__iterator(type, reverse);
  37550. }
  37551. var iterable = this._iterable;
  37552. var iterator = getIterator(iterable);
  37553. if (!isIterator(iterator)) {
  37554. return new Iterator(iteratorDone);
  37555. }
  37556. var iterations = 0;
  37557. return new Iterator(function() {
  37558. var step = iterator.next();
  37559. return step.done ? step : iteratorValue(type, iterations++, step.value);
  37560. });
  37561. };
  37562. createClass(IteratorSeq, IndexedSeq);
  37563. function IteratorSeq(iterator) {
  37564. this._iterator = iterator;
  37565. this._iteratorCache = [];
  37566. }
  37567. IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {
  37568. if (reverse) {
  37569. return this.cacheResult().__iterate(fn, reverse);
  37570. }
  37571. var iterator = this._iterator;
  37572. var cache = this._iteratorCache;
  37573. var iterations = 0;
  37574. while (iterations < cache.length) {
  37575. if (fn(cache[iterations], iterations++, this) === false) {
  37576. return iterations;
  37577. }
  37578. }
  37579. var step;
  37580. while (!(step = iterator.next()).done) {
  37581. var val = step.value;
  37582. cache[iterations] = val;
  37583. if (fn(val, iterations++, this) === false) {
  37584. break;
  37585. }
  37586. }
  37587. return iterations;
  37588. };
  37589. IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {
  37590. if (reverse) {
  37591. return this.cacheResult().__iterator(type, reverse);
  37592. }
  37593. var iterator = this._iterator;
  37594. var cache = this._iteratorCache;
  37595. var iterations = 0;
  37596. return new Iterator(function() {
  37597. if (iterations >= cache.length) {
  37598. var step = iterator.next();
  37599. if (step.done) {
  37600. return step;
  37601. }
  37602. cache[iterations] = step.value;
  37603. }
  37604. return iteratorValue(type, iterations, cache[iterations++]);
  37605. });
  37606. };
  37607. // # pragma Helper functions
  37608. function isSeq(maybeSeq) {
  37609. return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);
  37610. }
  37611. var EMPTY_SEQ;
  37612. function emptySequence() {
  37613. return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
  37614. }
  37615. function keyedSeqFromValue(value) {
  37616. var seq =
  37617. Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :
  37618. isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :
  37619. hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :
  37620. typeof value === 'object' ? new ObjectSeq(value) :
  37621. undefined;
  37622. if (!seq) {
  37623. throw new TypeError(
  37624. 'Expected Array or iterable object of [k, v] entries, '+
  37625. 'or keyed object: ' + value
  37626. );
  37627. }
  37628. return seq;
  37629. }
  37630. function indexedSeqFromValue(value) {
  37631. var seq = maybeIndexedSeqFromValue(value);
  37632. if (!seq) {
  37633. throw new TypeError(
  37634. 'Expected Array or iterable object of values: ' + value
  37635. );
  37636. }
  37637. return seq;
  37638. }
  37639. function seqFromValue(value) {
  37640. var seq = maybeIndexedSeqFromValue(value) ||
  37641. (typeof value === 'object' && new ObjectSeq(value));
  37642. if (!seq) {
  37643. throw new TypeError(
  37644. 'Expected Array or iterable object of values, or keyed object: ' + value
  37645. );
  37646. }
  37647. return seq;
  37648. }
  37649. function maybeIndexedSeqFromValue(value) {
  37650. return (
  37651. isArrayLike(value) ? new ArraySeq(value) :
  37652. isIterator(value) ? new IteratorSeq(value) :
  37653. hasIterator(value) ? new IterableSeq(value) :
  37654. undefined
  37655. );
  37656. }
  37657. function seqIterate(seq, fn, reverse, useKeys) {
  37658. var cache = seq._cache;
  37659. if (cache) {
  37660. var maxIndex = cache.length - 1;
  37661. for (var ii = 0; ii <= maxIndex; ii++) {
  37662. var entry = cache[reverse ? maxIndex - ii : ii];
  37663. if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {
  37664. return ii + 1;
  37665. }
  37666. }
  37667. return ii;
  37668. }
  37669. return seq.__iterateUncached(fn, reverse);
  37670. }
  37671. function seqIterator(seq, type, reverse, useKeys) {
  37672. var cache = seq._cache;
  37673. if (cache) {
  37674. var maxIndex = cache.length - 1;
  37675. var ii = 0;
  37676. return new Iterator(function() {
  37677. var entry = cache[reverse ? maxIndex - ii : ii];
  37678. return ii++ > maxIndex ?
  37679. iteratorDone() :
  37680. iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);
  37681. });
  37682. }
  37683. return seq.__iteratorUncached(type, reverse);
  37684. }
  37685. function fromJS(json, converter) {
  37686. return converter ?
  37687. fromJSWith(converter, json, '', {'': json}) :
  37688. fromJSDefault(json);
  37689. }
  37690. function fromJSWith(converter, json, key, parentJSON) {
  37691. if (Array.isArray(json)) {
  37692. return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));
  37693. }
  37694. if (isPlainObj(json)) {
  37695. return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));
  37696. }
  37697. return json;
  37698. }
  37699. function fromJSDefault(json) {
  37700. if (Array.isArray(json)) {
  37701. return IndexedSeq(json).map(fromJSDefault).toList();
  37702. }
  37703. if (isPlainObj(json)) {
  37704. return KeyedSeq(json).map(fromJSDefault).toMap();
  37705. }
  37706. return json;
  37707. }
  37708. function isPlainObj(value) {
  37709. return value && (value.constructor === Object || value.constructor === undefined);
  37710. }
  37711. /**
  37712. * An extension of the "same-value" algorithm as [described for use by ES6 Map
  37713. * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
  37714. *
  37715. * NaN is considered the same as NaN, however -0 and 0 are considered the same
  37716. * value, which is different from the algorithm described by
  37717. * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
  37718. *
  37719. * This is extended further to allow Objects to describe the values they
  37720. * represent, by way of `valueOf` or `equals` (and `hashCode`).
  37721. *
  37722. * Note: because of this extension, the key equality of Immutable.Map and the
  37723. * value equality of Immutable.Set will differ from ES6 Map and Set.
  37724. *
  37725. * ### Defining custom values
  37726. *
  37727. * The easiest way to describe the value an object represents is by implementing
  37728. * `valueOf`. For example, `Date` represents a value by returning a unix
  37729. * timestamp for `valueOf`:
  37730. *
  37731. * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
  37732. * var date2 = new Date(1234567890000);
  37733. * date1.valueOf(); // 1234567890000
  37734. * assert( date1 !== date2 );
  37735. * assert( Immutable.is( date1, date2 ) );
  37736. *
  37737. * Note: overriding `valueOf` may have other implications if you use this object
  37738. * where JavaScript expects a primitive, such as implicit string coercion.
  37739. *
  37740. * For more complex types, especially collections, implementing `valueOf` may
  37741. * not be performant. An alternative is to implement `equals` and `hashCode`.
  37742. *
  37743. * `equals` takes another object, presumably of similar type, and returns true
  37744. * if the it is equal. Equality is symmetrical, so the same result should be
  37745. * returned if this and the argument are flipped.
  37746. *
  37747. * assert( a.equals(b) === b.equals(a) );
  37748. *
  37749. * `hashCode` returns a 32bit integer number representing the object which will
  37750. * be used to determine how to store the value object in a Map or Set. You must
  37751. * provide both or neither methods, one must not exist without the other.
  37752. *
  37753. * Also, an important relationship between these methods must be upheld: if two
  37754. * values are equal, they *must* return the same hashCode. If the values are not
  37755. * equal, they might have the same hashCode; this is called a hash collision,
  37756. * and while undesirable for performance reasons, it is acceptable.
  37757. *
  37758. * if (a.equals(b)) {
  37759. * assert( a.hashCode() === b.hashCode() );
  37760. * }
  37761. *
  37762. * All Immutable collections implement `equals` and `hashCode`.
  37763. *
  37764. */
  37765. function is(valueA, valueB) {
  37766. if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
  37767. return true;
  37768. }
  37769. if (!valueA || !valueB) {
  37770. return false;
  37771. }
  37772. if (typeof valueA.valueOf === 'function' &&
  37773. typeof valueB.valueOf === 'function') {
  37774. valueA = valueA.valueOf();
  37775. valueB = valueB.valueOf();
  37776. if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
  37777. return true;
  37778. }
  37779. if (!valueA || !valueB) {
  37780. return false;
  37781. }
  37782. }
  37783. if (typeof valueA.equals === 'function' &&
  37784. typeof valueB.equals === 'function' &&
  37785. valueA.equals(valueB)) {
  37786. return true;
  37787. }
  37788. return false;
  37789. }
  37790. function deepEqual(a, b) {
  37791. if (a === b) {
  37792. return true;
  37793. }
  37794. if (
  37795. !isIterable(b) ||
  37796. a.size !== undefined && b.size !== undefined && a.size !== b.size ||
  37797. a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||
  37798. isKeyed(a) !== isKeyed(b) ||
  37799. isIndexed(a) !== isIndexed(b) ||
  37800. isOrdered(a) !== isOrdered(b)
  37801. ) {
  37802. return false;
  37803. }
  37804. if (a.size === 0 && b.size === 0) {
  37805. return true;
  37806. }
  37807. var notAssociative = !isAssociative(a);
  37808. if (isOrdered(a)) {
  37809. var entries = a.entries();
  37810. return b.every(function(v, k) {
  37811. var entry = entries.next().value;
  37812. return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
  37813. }) && entries.next().done;
  37814. }
  37815. var flipped = false;
  37816. if (a.size === undefined) {
  37817. if (b.size === undefined) {
  37818. if (typeof a.cacheResult === 'function') {
  37819. a.cacheResult();
  37820. }
  37821. } else {
  37822. flipped = true;
  37823. var _ = a;
  37824. a = b;
  37825. b = _;
  37826. }
  37827. }
  37828. var allEqual = true;
  37829. var bSize = b.__iterate(function(v, k) {
  37830. if (notAssociative ? !a.has(v) :
  37831. flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {
  37832. allEqual = false;
  37833. return false;
  37834. }
  37835. });
  37836. return allEqual && a.size === bSize;
  37837. }
  37838. createClass(Repeat, IndexedSeq);
  37839. function Repeat(value, times) {
  37840. if (!(this instanceof Repeat)) {
  37841. return new Repeat(value, times);
  37842. }
  37843. this._value = value;
  37844. this.size = times === undefined ? Infinity : Math.max(0, times);
  37845. if (this.size === 0) {
  37846. if (EMPTY_REPEAT) {
  37847. return EMPTY_REPEAT;
  37848. }
  37849. EMPTY_REPEAT = this;
  37850. }
  37851. }
  37852. Repeat.prototype.toString = function() {
  37853. if (this.size === 0) {
  37854. return 'Repeat []';
  37855. }
  37856. return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
  37857. };
  37858. Repeat.prototype.get = function(index, notSetValue) {
  37859. return this.has(index) ? this._value : notSetValue;
  37860. };
  37861. Repeat.prototype.includes = function(searchValue) {
  37862. return is(this._value, searchValue);
  37863. };
  37864. Repeat.prototype.slice = function(begin, end) {
  37865. var size = this.size;
  37866. return wholeSlice(begin, end, size) ? this :
  37867. new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));
  37868. };
  37869. Repeat.prototype.reverse = function() {
  37870. return this;
  37871. };
  37872. Repeat.prototype.indexOf = function(searchValue) {
  37873. if (is(this._value, searchValue)) {
  37874. return 0;
  37875. }
  37876. return -1;
  37877. };
  37878. Repeat.prototype.lastIndexOf = function(searchValue) {
  37879. if (is(this._value, searchValue)) {
  37880. return this.size;
  37881. }
  37882. return -1;
  37883. };
  37884. Repeat.prototype.__iterate = function(fn, reverse) {
  37885. for (var ii = 0; ii < this.size; ii++) {
  37886. if (fn(this._value, ii, this) === false) {
  37887. return ii + 1;
  37888. }
  37889. }
  37890. return ii;
  37891. };
  37892. Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;
  37893. var ii = 0;
  37894. return new Iterator(function()
  37895. {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}
  37896. );
  37897. };
  37898. Repeat.prototype.equals = function(other) {
  37899. return other instanceof Repeat ?
  37900. is(this._value, other._value) :
  37901. deepEqual(other);
  37902. };
  37903. var EMPTY_REPEAT;
  37904. function invariant(condition, error) {
  37905. if (!condition) throw new Error(error);
  37906. }
  37907. createClass(Range, IndexedSeq);
  37908. function Range(start, end, step) {
  37909. if (!(this instanceof Range)) {
  37910. return new Range(start, end, step);
  37911. }
  37912. invariant(step !== 0, 'Cannot step a Range by 0');
  37913. start = start || 0;
  37914. if (end === undefined) {
  37915. end = Infinity;
  37916. }
  37917. step = step === undefined ? 1 : Math.abs(step);
  37918. if (end < start) {
  37919. step = -step;
  37920. }
  37921. this._start = start;
  37922. this._end = end;
  37923. this._step = step;
  37924. this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
  37925. if (this.size === 0) {
  37926. if (EMPTY_RANGE) {
  37927. return EMPTY_RANGE;
  37928. }
  37929. EMPTY_RANGE = this;
  37930. }
  37931. }
  37932. Range.prototype.toString = function() {
  37933. if (this.size === 0) {
  37934. return 'Range []';
  37935. }
  37936. return 'Range [ ' +
  37937. this._start + '...' + this._end +
  37938. (this._step !== 1 ? ' by ' + this._step : '') +
  37939. ' ]';
  37940. };
  37941. Range.prototype.get = function(index, notSetValue) {
  37942. return this.has(index) ?
  37943. this._start + wrapIndex(this, index) * this._step :
  37944. notSetValue;
  37945. };
  37946. Range.prototype.includes = function(searchValue) {
  37947. var possibleIndex = (searchValue - this._start) / this._step;
  37948. return possibleIndex >= 0 &&
  37949. possibleIndex < this.size &&
  37950. possibleIndex === Math.floor(possibleIndex);
  37951. };
  37952. Range.prototype.slice = function(begin, end) {
  37953. if (wholeSlice(begin, end, this.size)) {
  37954. return this;
  37955. }
  37956. begin = resolveBegin(begin, this.size);
  37957. end = resolveEnd(end, this.size);
  37958. if (end <= begin) {
  37959. return new Range(0, 0);
  37960. }
  37961. return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);
  37962. };
  37963. Range.prototype.indexOf = function(searchValue) {
  37964. var offsetValue = searchValue - this._start;
  37965. if (offsetValue % this._step === 0) {
  37966. var index = offsetValue / this._step;
  37967. if (index >= 0 && index < this.size) {
  37968. return index
  37969. }
  37970. }
  37971. return -1;
  37972. };
  37973. Range.prototype.lastIndexOf = function(searchValue) {
  37974. return this.indexOf(searchValue);
  37975. };
  37976. Range.prototype.__iterate = function(fn, reverse) {
  37977. var maxIndex = this.size - 1;
  37978. var step = this._step;
  37979. var value = reverse ? this._start + maxIndex * step : this._start;
  37980. for (var ii = 0; ii <= maxIndex; ii++) {
  37981. if (fn(value, ii, this) === false) {
  37982. return ii + 1;
  37983. }
  37984. value += reverse ? -step : step;
  37985. }
  37986. return ii;
  37987. };
  37988. Range.prototype.__iterator = function(type, reverse) {
  37989. var maxIndex = this.size - 1;
  37990. var step = this._step;
  37991. var value = reverse ? this._start + maxIndex * step : this._start;
  37992. var ii = 0;
  37993. return new Iterator(function() {
  37994. var v = value;
  37995. value += reverse ? -step : step;
  37996. return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);
  37997. });
  37998. };
  37999. Range.prototype.equals = function(other) {
  38000. return other instanceof Range ?
  38001. this._start === other._start &&
  38002. this._end === other._end &&
  38003. this._step === other._step :
  38004. deepEqual(this, other);
  38005. };
  38006. var EMPTY_RANGE;
  38007. createClass(Collection, Iterable);
  38008. function Collection() {
  38009. throw TypeError('Abstract');
  38010. }
  38011. createClass(KeyedCollection, Collection);function KeyedCollection() {}
  38012. createClass(IndexedCollection, Collection);function IndexedCollection() {}
  38013. createClass(SetCollection, Collection);function SetCollection() {}
  38014. Collection.Keyed = KeyedCollection;
  38015. Collection.Indexed = IndexedCollection;
  38016. Collection.Set = SetCollection;
  38017. var imul =
  38018. typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?
  38019. Math.imul :
  38020. function imul(a, b) {
  38021. a = a | 0; // int
  38022. b = b | 0; // int
  38023. var c = a & 0xffff;
  38024. var d = b & 0xffff;
  38025. // Shift by 0 fixes the sign on the high part.
  38026. return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int
  38027. };
  38028. // v8 has an optimization for storing 31-bit signed numbers.
  38029. // Values which have either 00 or 11 as the high order bits qualify.
  38030. // This function drops the highest order bit in a signed number, maintaining
  38031. // the sign bit.
  38032. function smi(i32) {
  38033. return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);
  38034. }
  38035. function hash(o) {
  38036. if (o === false || o === null || o === undefined) {
  38037. return 0;
  38038. }
  38039. if (typeof o.valueOf === 'function') {
  38040. o = o.valueOf();
  38041. if (o === false || o === null || o === undefined) {
  38042. return 0;
  38043. }
  38044. }
  38045. if (o === true) {
  38046. return 1;
  38047. }
  38048. var type = typeof o;
  38049. if (type === 'number') {
  38050. if (o !== o || o === Infinity) {
  38051. return 0;
  38052. }
  38053. var h = o | 0;
  38054. if (h !== o) {
  38055. h ^= o * 0xFFFFFFFF;
  38056. }
  38057. while (o > 0xFFFFFFFF) {
  38058. o /= 0xFFFFFFFF;
  38059. h ^= o;
  38060. }
  38061. return smi(h);
  38062. }
  38063. if (type === 'string') {
  38064. return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);
  38065. }
  38066. if (typeof o.hashCode === 'function') {
  38067. return o.hashCode();
  38068. }
  38069. if (type === 'object') {
  38070. return hashJSObj(o);
  38071. }
  38072. if (typeof o.toString === 'function') {
  38073. return hashString(o.toString());
  38074. }
  38075. throw new Error('Value type ' + type + ' cannot be hashed.');
  38076. }
  38077. function cachedHashString(string) {
  38078. var hash = stringHashCache[string];
  38079. if (hash === undefined) {
  38080. hash = hashString(string);
  38081. if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
  38082. STRING_HASH_CACHE_SIZE = 0;
  38083. stringHashCache = {};
  38084. }
  38085. STRING_HASH_CACHE_SIZE++;
  38086. stringHashCache[string] = hash;
  38087. }
  38088. return hash;
  38089. }
  38090. // http://jsperf.com/hashing-strings
  38091. function hashString(string) {
  38092. // This is the hash from JVM
  38093. // The hash code for a string is computed as
  38094. // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
  38095. // where s[i] is the ith character of the string and n is the length of
  38096. // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
  38097. // (exclusive) by dropping high bits.
  38098. var hash = 0;
  38099. for (var ii = 0; ii < string.length; ii++) {
  38100. hash = 31 * hash + string.charCodeAt(ii) | 0;
  38101. }
  38102. return smi(hash);
  38103. }
  38104. function hashJSObj(obj) {
  38105. var hash;
  38106. if (usingWeakMap) {
  38107. hash = weakMap.get(obj);
  38108. if (hash !== undefined) {
  38109. return hash;
  38110. }
  38111. }
  38112. hash = obj[UID_HASH_KEY];
  38113. if (hash !== undefined) {
  38114. return hash;
  38115. }
  38116. if (!canDefineProperty) {
  38117. hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
  38118. if (hash !== undefined) {
  38119. return hash;
  38120. }
  38121. hash = getIENodeHash(obj);
  38122. if (hash !== undefined) {
  38123. return hash;
  38124. }
  38125. }
  38126. hash = ++objHashUID;
  38127. if (objHashUID & 0x40000000) {
  38128. objHashUID = 0;
  38129. }
  38130. if (usingWeakMap) {
  38131. weakMap.set(obj, hash);
  38132. } else if (isExtensible !== undefined && isExtensible(obj) === false) {
  38133. throw new Error('Non-extensible objects are not allowed as keys.');
  38134. } else if (canDefineProperty) {
  38135. Object.defineProperty(obj, UID_HASH_KEY, {
  38136. 'enumerable': false,
  38137. 'configurable': false,
  38138. 'writable': false,
  38139. 'value': hash
  38140. });
  38141. } else if (obj.propertyIsEnumerable !== undefined &&
  38142. obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {
  38143. // Since we can't define a non-enumerable property on the object
  38144. // we'll hijack one of the less-used non-enumerable properties to
  38145. // save our hash on it. Since this is a function it will not show up in
  38146. // `JSON.stringify` which is what we want.
  38147. obj.propertyIsEnumerable = function() {
  38148. return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);
  38149. };
  38150. obj.propertyIsEnumerable[UID_HASH_KEY] = hash;
  38151. } else if (obj.nodeType !== undefined) {
  38152. // At this point we couldn't get the IE `uniqueID` to use as a hash
  38153. // and we couldn't use a non-enumerable property to exploit the
  38154. // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
  38155. // itself.
  38156. obj[UID_HASH_KEY] = hash;
  38157. } else {
  38158. throw new Error('Unable to set a non-enumerable property on object.');
  38159. }
  38160. return hash;
  38161. }
  38162. // Get references to ES5 object methods.
  38163. var isExtensible = Object.isExtensible;
  38164. // True if Object.defineProperty works as expected. IE8 fails this test.
  38165. var canDefineProperty = (function() {
  38166. try {
  38167. Object.defineProperty({}, '@', {});
  38168. return true;
  38169. } catch (e) {
  38170. return false;
  38171. }
  38172. }());
  38173. // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
  38174. // and avoid memory leaks from the IE cloneNode bug.
  38175. function getIENodeHash(node) {
  38176. if (node && node.nodeType > 0) {
  38177. switch (node.nodeType) {
  38178. case 1: // Element
  38179. return node.uniqueID;
  38180. case 9: // Document
  38181. return node.documentElement && node.documentElement.uniqueID;
  38182. }
  38183. }
  38184. }
  38185. // If possible, use a WeakMap.
  38186. var usingWeakMap = typeof WeakMap === 'function';
  38187. var weakMap;
  38188. if (usingWeakMap) {
  38189. weakMap = new WeakMap();
  38190. }
  38191. var objHashUID = 0;
  38192. var UID_HASH_KEY = '__immutablehash__';
  38193. if (typeof Symbol === 'function') {
  38194. UID_HASH_KEY = Symbol(UID_HASH_KEY);
  38195. }
  38196. var STRING_HASH_CACHE_MIN_STRLEN = 16;
  38197. var STRING_HASH_CACHE_MAX_SIZE = 255;
  38198. var STRING_HASH_CACHE_SIZE = 0;
  38199. var stringHashCache = {};
  38200. function assertNotInfinite(size) {
  38201. invariant(
  38202. size !== Infinity,
  38203. 'Cannot perform this action with an infinite size.'
  38204. );
  38205. }
  38206. createClass(Map, KeyedCollection);
  38207. // @pragma Construction
  38208. function Map(value) {
  38209. return value === null || value === undefined ? emptyMap() :
  38210. isMap(value) && !isOrdered(value) ? value :
  38211. emptyMap().withMutations(function(map ) {
  38212. var iter = KeyedIterable(value);
  38213. assertNotInfinite(iter.size);
  38214. iter.forEach(function(v, k) {return map.set(k, v)});
  38215. });
  38216. }
  38217. Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);
  38218. return emptyMap().withMutations(function(map ) {
  38219. for (var i = 0; i < keyValues.length; i += 2) {
  38220. if (i + 1 >= keyValues.length) {
  38221. throw new Error('Missing value for key: ' + keyValues[i]);
  38222. }
  38223. map.set(keyValues[i], keyValues[i + 1]);
  38224. }
  38225. });
  38226. };
  38227. Map.prototype.toString = function() {
  38228. return this.__toString('Map {', '}');
  38229. };
  38230. // @pragma Access
  38231. Map.prototype.get = function(k, notSetValue) {
  38232. return this._root ?
  38233. this._root.get(0, undefined, k, notSetValue) :
  38234. notSetValue;
  38235. };
  38236. // @pragma Modification
  38237. Map.prototype.set = function(k, v) {
  38238. return updateMap(this, k, v);
  38239. };
  38240. Map.prototype.setIn = function(keyPath, v) {
  38241. return this.updateIn(keyPath, NOT_SET, function() {return v});
  38242. };
  38243. Map.prototype.remove = function(k) {
  38244. return updateMap(this, k, NOT_SET);
  38245. };
  38246. Map.prototype.deleteIn = function(keyPath) {
  38247. return this.updateIn(keyPath, function() {return NOT_SET});
  38248. };
  38249. Map.prototype.update = function(k, notSetValue, updater) {
  38250. return arguments.length === 1 ?
  38251. k(this) :
  38252. this.updateIn([k], notSetValue, updater);
  38253. };
  38254. Map.prototype.updateIn = function(keyPath, notSetValue, updater) {
  38255. if (!updater) {
  38256. updater = notSetValue;
  38257. notSetValue = undefined;
  38258. }
  38259. var updatedValue = updateInDeepMap(
  38260. this,
  38261. forceIterator(keyPath),
  38262. notSetValue,
  38263. updater
  38264. );
  38265. return updatedValue === NOT_SET ? undefined : updatedValue;
  38266. };
  38267. Map.prototype.clear = function() {
  38268. if (this.size === 0) {
  38269. return this;
  38270. }
  38271. if (this.__ownerID) {
  38272. this.size = 0;
  38273. this._root = null;
  38274. this.__hash = undefined;
  38275. this.__altered = true;
  38276. return this;
  38277. }
  38278. return emptyMap();
  38279. };
  38280. // @pragma Composition
  38281. Map.prototype.merge = function(/*...iters*/) {
  38282. return mergeIntoMapWith(this, undefined, arguments);
  38283. };
  38284. Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  38285. return mergeIntoMapWith(this, merger, iters);
  38286. };
  38287. Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
  38288. return this.updateIn(
  38289. keyPath,
  38290. emptyMap(),
  38291. function(m ) {return typeof m.merge === 'function' ?
  38292. m.merge.apply(m, iters) :
  38293. iters[iters.length - 1]}
  38294. );
  38295. };
  38296. Map.prototype.mergeDeep = function(/*...iters*/) {
  38297. return mergeIntoMapWith(this, deepMerger, arguments);
  38298. };
  38299. Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  38300. return mergeIntoMapWith(this, deepMergerWith(merger), iters);
  38301. };
  38302. Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
  38303. return this.updateIn(
  38304. keyPath,
  38305. emptyMap(),
  38306. function(m ) {return typeof m.mergeDeep === 'function' ?
  38307. m.mergeDeep.apply(m, iters) :
  38308. iters[iters.length - 1]}
  38309. );
  38310. };
  38311. Map.prototype.sort = function(comparator) {
  38312. // Late binding
  38313. return OrderedMap(sortFactory(this, comparator));
  38314. };
  38315. Map.prototype.sortBy = function(mapper, comparator) {
  38316. // Late binding
  38317. return OrderedMap(sortFactory(this, comparator, mapper));
  38318. };
  38319. // @pragma Mutability
  38320. Map.prototype.withMutations = function(fn) {
  38321. var mutable = this.asMutable();
  38322. fn(mutable);
  38323. return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
  38324. };
  38325. Map.prototype.asMutable = function() {
  38326. return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
  38327. };
  38328. Map.prototype.asImmutable = function() {
  38329. return this.__ensureOwner();
  38330. };
  38331. Map.prototype.wasAltered = function() {
  38332. return this.__altered;
  38333. };
  38334. Map.prototype.__iterator = function(type, reverse) {
  38335. return new MapIterator(this, type, reverse);
  38336. };
  38337. Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  38338. var iterations = 0;
  38339. this._root && this._root.iterate(function(entry ) {
  38340. iterations++;
  38341. return fn(entry[1], entry[0], this$0);
  38342. }, reverse);
  38343. return iterations;
  38344. };
  38345. Map.prototype.__ensureOwner = function(ownerID) {
  38346. if (ownerID === this.__ownerID) {
  38347. return this;
  38348. }
  38349. if (!ownerID) {
  38350. this.__ownerID = ownerID;
  38351. this.__altered = false;
  38352. return this;
  38353. }
  38354. return makeMap(this.size, this._root, ownerID, this.__hash);
  38355. };
  38356. function isMap(maybeMap) {
  38357. return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);
  38358. }
  38359. Map.isMap = isMap;
  38360. var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
  38361. var MapPrototype = Map.prototype;
  38362. MapPrototype[IS_MAP_SENTINEL] = true;
  38363. MapPrototype[DELETE] = MapPrototype.remove;
  38364. MapPrototype.removeIn = MapPrototype.deleteIn;
  38365. // #pragma Trie Nodes
  38366. function ArrayMapNode(ownerID, entries) {
  38367. this.ownerID = ownerID;
  38368. this.entries = entries;
  38369. }
  38370. ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  38371. var entries = this.entries;
  38372. for (var ii = 0, len = entries.length; ii < len; ii++) {
  38373. if (is(key, entries[ii][0])) {
  38374. return entries[ii][1];
  38375. }
  38376. }
  38377. return notSetValue;
  38378. };
  38379. ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  38380. var removed = value === NOT_SET;
  38381. var entries = this.entries;
  38382. var idx = 0;
  38383. for (var len = entries.length; idx < len; idx++) {
  38384. if (is(key, entries[idx][0])) {
  38385. break;
  38386. }
  38387. }
  38388. var exists = idx < len;
  38389. if (exists ? entries[idx][1] === value : removed) {
  38390. return this;
  38391. }
  38392. SetRef(didAlter);
  38393. (removed || !exists) && SetRef(didChangeSize);
  38394. if (removed && entries.length === 1) {
  38395. return; // undefined
  38396. }
  38397. if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
  38398. return createNodes(ownerID, entries, key, value);
  38399. }
  38400. var isEditable = ownerID && ownerID === this.ownerID;
  38401. var newEntries = isEditable ? entries : arrCopy(entries);
  38402. if (exists) {
  38403. if (removed) {
  38404. idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
  38405. } else {
  38406. newEntries[idx] = [key, value];
  38407. }
  38408. } else {
  38409. newEntries.push([key, value]);
  38410. }
  38411. if (isEditable) {
  38412. this.entries = newEntries;
  38413. return this;
  38414. }
  38415. return new ArrayMapNode(ownerID, newEntries);
  38416. };
  38417. function BitmapIndexedNode(ownerID, bitmap, nodes) {
  38418. this.ownerID = ownerID;
  38419. this.bitmap = bitmap;
  38420. this.nodes = nodes;
  38421. }
  38422. BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  38423. if (keyHash === undefined) {
  38424. keyHash = hash(key);
  38425. }
  38426. var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));
  38427. var bitmap = this.bitmap;
  38428. return (bitmap & bit) === 0 ? notSetValue :
  38429. this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);
  38430. };
  38431. BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  38432. if (keyHash === undefined) {
  38433. keyHash = hash(key);
  38434. }
  38435. var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  38436. var bit = 1 << keyHashFrag;
  38437. var bitmap = this.bitmap;
  38438. var exists = (bitmap & bit) !== 0;
  38439. if (!exists && value === NOT_SET) {
  38440. return this;
  38441. }
  38442. var idx = popCount(bitmap & (bit - 1));
  38443. var nodes = this.nodes;
  38444. var node = exists ? nodes[idx] : undefined;
  38445. var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
  38446. if (newNode === node) {
  38447. return this;
  38448. }
  38449. if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
  38450. return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
  38451. }
  38452. if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {
  38453. return nodes[idx ^ 1];
  38454. }
  38455. if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
  38456. return newNode;
  38457. }
  38458. var isEditable = ownerID && ownerID === this.ownerID;
  38459. var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;
  38460. var newNodes = exists ? newNode ?
  38461. setIn(nodes, idx, newNode, isEditable) :
  38462. spliceOut(nodes, idx, isEditable) :
  38463. spliceIn(nodes, idx, newNode, isEditable);
  38464. if (isEditable) {
  38465. this.bitmap = newBitmap;
  38466. this.nodes = newNodes;
  38467. return this;
  38468. }
  38469. return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
  38470. };
  38471. function HashArrayMapNode(ownerID, count, nodes) {
  38472. this.ownerID = ownerID;
  38473. this.count = count;
  38474. this.nodes = nodes;
  38475. }
  38476. HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  38477. if (keyHash === undefined) {
  38478. keyHash = hash(key);
  38479. }
  38480. var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  38481. var node = this.nodes[idx];
  38482. return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;
  38483. };
  38484. HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  38485. if (keyHash === undefined) {
  38486. keyHash = hash(key);
  38487. }
  38488. var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  38489. var removed = value === NOT_SET;
  38490. var nodes = this.nodes;
  38491. var node = nodes[idx];
  38492. if (removed && !node) {
  38493. return this;
  38494. }
  38495. var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
  38496. if (newNode === node) {
  38497. return this;
  38498. }
  38499. var newCount = this.count;
  38500. if (!node) {
  38501. newCount++;
  38502. } else if (!newNode) {
  38503. newCount--;
  38504. if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
  38505. return packNodes(ownerID, nodes, newCount, idx);
  38506. }
  38507. }
  38508. var isEditable = ownerID && ownerID === this.ownerID;
  38509. var newNodes = setIn(nodes, idx, newNode, isEditable);
  38510. if (isEditable) {
  38511. this.count = newCount;
  38512. this.nodes = newNodes;
  38513. return this;
  38514. }
  38515. return new HashArrayMapNode(ownerID, newCount, newNodes);
  38516. };
  38517. function HashCollisionNode(ownerID, keyHash, entries) {
  38518. this.ownerID = ownerID;
  38519. this.keyHash = keyHash;
  38520. this.entries = entries;
  38521. }
  38522. HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  38523. var entries = this.entries;
  38524. for (var ii = 0, len = entries.length; ii < len; ii++) {
  38525. if (is(key, entries[ii][0])) {
  38526. return entries[ii][1];
  38527. }
  38528. }
  38529. return notSetValue;
  38530. };
  38531. HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  38532. if (keyHash === undefined) {
  38533. keyHash = hash(key);
  38534. }
  38535. var removed = value === NOT_SET;
  38536. if (keyHash !== this.keyHash) {
  38537. if (removed) {
  38538. return this;
  38539. }
  38540. SetRef(didAlter);
  38541. SetRef(didChangeSize);
  38542. return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
  38543. }
  38544. var entries = this.entries;
  38545. var idx = 0;
  38546. for (var len = entries.length; idx < len; idx++) {
  38547. if (is(key, entries[idx][0])) {
  38548. break;
  38549. }
  38550. }
  38551. var exists = idx < len;
  38552. if (exists ? entries[idx][1] === value : removed) {
  38553. return this;
  38554. }
  38555. SetRef(didAlter);
  38556. (removed || !exists) && SetRef(didChangeSize);
  38557. if (removed && len === 2) {
  38558. return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
  38559. }
  38560. var isEditable = ownerID && ownerID === this.ownerID;
  38561. var newEntries = isEditable ? entries : arrCopy(entries);
  38562. if (exists) {
  38563. if (removed) {
  38564. idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
  38565. } else {
  38566. newEntries[idx] = [key, value];
  38567. }
  38568. } else {
  38569. newEntries.push([key, value]);
  38570. }
  38571. if (isEditable) {
  38572. this.entries = newEntries;
  38573. return this;
  38574. }
  38575. return new HashCollisionNode(ownerID, this.keyHash, newEntries);
  38576. };
  38577. function ValueNode(ownerID, keyHash, entry) {
  38578. this.ownerID = ownerID;
  38579. this.keyHash = keyHash;
  38580. this.entry = entry;
  38581. }
  38582. ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  38583. return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
  38584. };
  38585. ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  38586. var removed = value === NOT_SET;
  38587. var keyMatch = is(key, this.entry[0]);
  38588. if (keyMatch ? value === this.entry[1] : removed) {
  38589. return this;
  38590. }
  38591. SetRef(didAlter);
  38592. if (removed) {
  38593. SetRef(didChangeSize);
  38594. return; // undefined
  38595. }
  38596. if (keyMatch) {
  38597. if (ownerID && ownerID === this.ownerID) {
  38598. this.entry[1] = value;
  38599. return this;
  38600. }
  38601. return new ValueNode(ownerID, this.keyHash, [key, value]);
  38602. }
  38603. SetRef(didChangeSize);
  38604. return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
  38605. };
  38606. // #pragma Iterators
  38607. ArrayMapNode.prototype.iterate =
  38608. HashCollisionNode.prototype.iterate = function (fn, reverse) {
  38609. var entries = this.entries;
  38610. for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
  38611. if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
  38612. return false;
  38613. }
  38614. }
  38615. }
  38616. BitmapIndexedNode.prototype.iterate =
  38617. HashArrayMapNode.prototype.iterate = function (fn, reverse) {
  38618. var nodes = this.nodes;
  38619. for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
  38620. var node = nodes[reverse ? maxIndex - ii : ii];
  38621. if (node && node.iterate(fn, reverse) === false) {
  38622. return false;
  38623. }
  38624. }
  38625. }
  38626. ValueNode.prototype.iterate = function (fn, reverse) {
  38627. return fn(this.entry);
  38628. }
  38629. createClass(MapIterator, Iterator);
  38630. function MapIterator(map, type, reverse) {
  38631. this._type = type;
  38632. this._reverse = reverse;
  38633. this._stack = map._root && mapIteratorFrame(map._root);
  38634. }
  38635. MapIterator.prototype.next = function() {
  38636. var type = this._type;
  38637. var stack = this._stack;
  38638. while (stack) {
  38639. var node = stack.node;
  38640. var index = stack.index++;
  38641. var maxIndex;
  38642. if (node.entry) {
  38643. if (index === 0) {
  38644. return mapIteratorValue(type, node.entry);
  38645. }
  38646. } else if (node.entries) {
  38647. maxIndex = node.entries.length - 1;
  38648. if (index <= maxIndex) {
  38649. return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);
  38650. }
  38651. } else {
  38652. maxIndex = node.nodes.length - 1;
  38653. if (index <= maxIndex) {
  38654. var subNode = node.nodes[this._reverse ? maxIndex - index : index];
  38655. if (subNode) {
  38656. if (subNode.entry) {
  38657. return mapIteratorValue(type, subNode.entry);
  38658. }
  38659. stack = this._stack = mapIteratorFrame(subNode, stack);
  38660. }
  38661. continue;
  38662. }
  38663. }
  38664. stack = this._stack = this._stack.__prev;
  38665. }
  38666. return iteratorDone();
  38667. };
  38668. function mapIteratorValue(type, entry) {
  38669. return iteratorValue(type, entry[0], entry[1]);
  38670. }
  38671. function mapIteratorFrame(node, prev) {
  38672. return {
  38673. node: node,
  38674. index: 0,
  38675. __prev: prev
  38676. };
  38677. }
  38678. function makeMap(size, root, ownerID, hash) {
  38679. var map = Object.create(MapPrototype);
  38680. map.size = size;
  38681. map._root = root;
  38682. map.__ownerID = ownerID;
  38683. map.__hash = hash;
  38684. map.__altered = false;
  38685. return map;
  38686. }
  38687. var EMPTY_MAP;
  38688. function emptyMap() {
  38689. return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
  38690. }
  38691. function updateMap(map, k, v) {
  38692. var newRoot;
  38693. var newSize;
  38694. if (!map._root) {
  38695. if (v === NOT_SET) {
  38696. return map;
  38697. }
  38698. newSize = 1;
  38699. newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
  38700. } else {
  38701. var didChangeSize = MakeRef(CHANGE_LENGTH);
  38702. var didAlter = MakeRef(DID_ALTER);
  38703. newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);
  38704. if (!didAlter.value) {
  38705. return map;
  38706. }
  38707. newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);
  38708. }
  38709. if (map.__ownerID) {
  38710. map.size = newSize;
  38711. map._root = newRoot;
  38712. map.__hash = undefined;
  38713. map.__altered = true;
  38714. return map;
  38715. }
  38716. return newRoot ? makeMap(newSize, newRoot) : emptyMap();
  38717. }
  38718. function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  38719. if (!node) {
  38720. if (value === NOT_SET) {
  38721. return node;
  38722. }
  38723. SetRef(didAlter);
  38724. SetRef(didChangeSize);
  38725. return new ValueNode(ownerID, keyHash, [key, value]);
  38726. }
  38727. return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);
  38728. }
  38729. function isLeafNode(node) {
  38730. return node.constructor === ValueNode || node.constructor === HashCollisionNode;
  38731. }
  38732. function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
  38733. if (node.keyHash === keyHash) {
  38734. return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
  38735. }
  38736. var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
  38737. var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  38738. var newNode;
  38739. var nodes = idx1 === idx2 ?
  38740. [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :
  38741. ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);
  38742. return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
  38743. }
  38744. function createNodes(ownerID, entries, key, value) {
  38745. if (!ownerID) {
  38746. ownerID = new OwnerID();
  38747. }
  38748. var node = new ValueNode(ownerID, hash(key), [key, value]);
  38749. for (var ii = 0; ii < entries.length; ii++) {
  38750. var entry = entries[ii];
  38751. node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
  38752. }
  38753. return node;
  38754. }
  38755. function packNodes(ownerID, nodes, count, excluding) {
  38756. var bitmap = 0;
  38757. var packedII = 0;
  38758. var packedNodes = new Array(count);
  38759. for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
  38760. var node = nodes[ii];
  38761. if (node !== undefined && ii !== excluding) {
  38762. bitmap |= bit;
  38763. packedNodes[packedII++] = node;
  38764. }
  38765. }
  38766. return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
  38767. }
  38768. function expandNodes(ownerID, nodes, bitmap, including, node) {
  38769. var count = 0;
  38770. var expandedNodes = new Array(SIZE);
  38771. for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
  38772. expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
  38773. }
  38774. expandedNodes[including] = node;
  38775. return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
  38776. }
  38777. function mergeIntoMapWith(map, merger, iterables) {
  38778. var iters = [];
  38779. for (var ii = 0; ii < iterables.length; ii++) {
  38780. var value = iterables[ii];
  38781. var iter = KeyedIterable(value);
  38782. if (!isIterable(value)) {
  38783. iter = iter.map(function(v ) {return fromJS(v)});
  38784. }
  38785. iters.push(iter);
  38786. }
  38787. return mergeIntoCollectionWith(map, merger, iters);
  38788. }
  38789. function deepMerger(existing, value, key) {
  38790. return existing && existing.mergeDeep && isIterable(value) ?
  38791. existing.mergeDeep(value) :
  38792. is(existing, value) ? existing : value;
  38793. }
  38794. function deepMergerWith(merger) {
  38795. return function(existing, value, key) {
  38796. if (existing && existing.mergeDeepWith && isIterable(value)) {
  38797. return existing.mergeDeepWith(merger, value);
  38798. }
  38799. var nextValue = merger(existing, value, key);
  38800. return is(existing, nextValue) ? existing : nextValue;
  38801. };
  38802. }
  38803. function mergeIntoCollectionWith(collection, merger, iters) {
  38804. iters = iters.filter(function(x ) {return x.size !== 0});
  38805. if (iters.length === 0) {
  38806. return collection;
  38807. }
  38808. if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {
  38809. return collection.constructor(iters[0]);
  38810. }
  38811. return collection.withMutations(function(collection ) {
  38812. var mergeIntoMap = merger ?
  38813. function(value, key) {
  38814. collection.update(key, NOT_SET, function(existing )
  38815. {return existing === NOT_SET ? value : merger(existing, value, key)}
  38816. );
  38817. } :
  38818. function(value, key) {
  38819. collection.set(key, value);
  38820. }
  38821. for (var ii = 0; ii < iters.length; ii++) {
  38822. iters[ii].forEach(mergeIntoMap);
  38823. }
  38824. });
  38825. }
  38826. function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {
  38827. var isNotSet = existing === NOT_SET;
  38828. var step = keyPathIter.next();
  38829. if (step.done) {
  38830. var existingValue = isNotSet ? notSetValue : existing;
  38831. var newValue = updater(existingValue);
  38832. return newValue === existingValue ? existing : newValue;
  38833. }
  38834. invariant(
  38835. isNotSet || (existing && existing.set),
  38836. 'invalid keyPath'
  38837. );
  38838. var key = step.value;
  38839. var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);
  38840. var nextUpdated = updateInDeepMap(
  38841. nextExisting,
  38842. keyPathIter,
  38843. notSetValue,
  38844. updater
  38845. );
  38846. return nextUpdated === nextExisting ? existing :
  38847. nextUpdated === NOT_SET ? existing.remove(key) :
  38848. (isNotSet ? emptyMap() : existing).set(key, nextUpdated);
  38849. }
  38850. function popCount(x) {
  38851. x = x - ((x >> 1) & 0x55555555);
  38852. x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  38853. x = (x + (x >> 4)) & 0x0f0f0f0f;
  38854. x = x + (x >> 8);
  38855. x = x + (x >> 16);
  38856. return x & 0x7f;
  38857. }
  38858. function setIn(array, idx, val, canEdit) {
  38859. var newArray = canEdit ? array : arrCopy(array);
  38860. newArray[idx] = val;
  38861. return newArray;
  38862. }
  38863. function spliceIn(array, idx, val, canEdit) {
  38864. var newLen = array.length + 1;
  38865. if (canEdit && idx + 1 === newLen) {
  38866. array[idx] = val;
  38867. return array;
  38868. }
  38869. var newArray = new Array(newLen);
  38870. var after = 0;
  38871. for (var ii = 0; ii < newLen; ii++) {
  38872. if (ii === idx) {
  38873. newArray[ii] = val;
  38874. after = -1;
  38875. } else {
  38876. newArray[ii] = array[ii + after];
  38877. }
  38878. }
  38879. return newArray;
  38880. }
  38881. function spliceOut(array, idx, canEdit) {
  38882. var newLen = array.length - 1;
  38883. if (canEdit && idx === newLen) {
  38884. array.pop();
  38885. return array;
  38886. }
  38887. var newArray = new Array(newLen);
  38888. var after = 0;
  38889. for (var ii = 0; ii < newLen; ii++) {
  38890. if (ii === idx) {
  38891. after = 1;
  38892. }
  38893. newArray[ii] = array[ii + after];
  38894. }
  38895. return newArray;
  38896. }
  38897. var MAX_ARRAY_MAP_SIZE = SIZE / 4;
  38898. var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
  38899. var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
  38900. createClass(List, IndexedCollection);
  38901. // @pragma Construction
  38902. function List(value) {
  38903. var empty = emptyList();
  38904. if (value === null || value === undefined) {
  38905. return empty;
  38906. }
  38907. if (isList(value)) {
  38908. return value;
  38909. }
  38910. var iter = IndexedIterable(value);
  38911. var size = iter.size;
  38912. if (size === 0) {
  38913. return empty;
  38914. }
  38915. assertNotInfinite(size);
  38916. if (size > 0 && size < SIZE) {
  38917. return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
  38918. }
  38919. return empty.withMutations(function(list ) {
  38920. list.setSize(size);
  38921. iter.forEach(function(v, i) {return list.set(i, v)});
  38922. });
  38923. }
  38924. List.of = function(/*...values*/) {
  38925. return this(arguments);
  38926. };
  38927. List.prototype.toString = function() {
  38928. return this.__toString('List [', ']');
  38929. };
  38930. // @pragma Access
  38931. List.prototype.get = function(index, notSetValue) {
  38932. index = wrapIndex(this, index);
  38933. if (index >= 0 && index < this.size) {
  38934. index += this._origin;
  38935. var node = listNodeFor(this, index);
  38936. return node && node.array[index & MASK];
  38937. }
  38938. return notSetValue;
  38939. };
  38940. // @pragma Modification
  38941. List.prototype.set = function(index, value) {
  38942. return updateList(this, index, value);
  38943. };
  38944. List.prototype.remove = function(index) {
  38945. return !this.has(index) ? this :
  38946. index === 0 ? this.shift() :
  38947. index === this.size - 1 ? this.pop() :
  38948. this.splice(index, 1);
  38949. };
  38950. List.prototype.insert = function(index, value) {
  38951. return this.splice(index, 0, value);
  38952. };
  38953. List.prototype.clear = function() {
  38954. if (this.size === 0) {
  38955. return this;
  38956. }
  38957. if (this.__ownerID) {
  38958. this.size = this._origin = this._capacity = 0;
  38959. this._level = SHIFT;
  38960. this._root = this._tail = null;
  38961. this.__hash = undefined;
  38962. this.__altered = true;
  38963. return this;
  38964. }
  38965. return emptyList();
  38966. };
  38967. List.prototype.push = function(/*...values*/) {
  38968. var values = arguments;
  38969. var oldSize = this.size;
  38970. return this.withMutations(function(list ) {
  38971. setListBounds(list, 0, oldSize + values.length);
  38972. for (var ii = 0; ii < values.length; ii++) {
  38973. list.set(oldSize + ii, values[ii]);
  38974. }
  38975. });
  38976. };
  38977. List.prototype.pop = function() {
  38978. return setListBounds(this, 0, -1);
  38979. };
  38980. List.prototype.unshift = function(/*...values*/) {
  38981. var values = arguments;
  38982. return this.withMutations(function(list ) {
  38983. setListBounds(list, -values.length);
  38984. for (var ii = 0; ii < values.length; ii++) {
  38985. list.set(ii, values[ii]);
  38986. }
  38987. });
  38988. };
  38989. List.prototype.shift = function() {
  38990. return setListBounds(this, 1);
  38991. };
  38992. // @pragma Composition
  38993. List.prototype.merge = function(/*...iters*/) {
  38994. return mergeIntoListWith(this, undefined, arguments);
  38995. };
  38996. List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  38997. return mergeIntoListWith(this, merger, iters);
  38998. };
  38999. List.prototype.mergeDeep = function(/*...iters*/) {
  39000. return mergeIntoListWith(this, deepMerger, arguments);
  39001. };
  39002. List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  39003. return mergeIntoListWith(this, deepMergerWith(merger), iters);
  39004. };
  39005. List.prototype.setSize = function(size) {
  39006. return setListBounds(this, 0, size);
  39007. };
  39008. // @pragma Iteration
  39009. List.prototype.slice = function(begin, end) {
  39010. var size = this.size;
  39011. if (wholeSlice(begin, end, size)) {
  39012. return this;
  39013. }
  39014. return setListBounds(
  39015. this,
  39016. resolveBegin(begin, size),
  39017. resolveEnd(end, size)
  39018. );
  39019. };
  39020. List.prototype.__iterator = function(type, reverse) {
  39021. var index = 0;
  39022. var values = iterateList(this, reverse);
  39023. return new Iterator(function() {
  39024. var value = values();
  39025. return value === DONE ?
  39026. iteratorDone() :
  39027. iteratorValue(type, index++, value);
  39028. });
  39029. };
  39030. List.prototype.__iterate = function(fn, reverse) {
  39031. var index = 0;
  39032. var values = iterateList(this, reverse);
  39033. var value;
  39034. while ((value = values()) !== DONE) {
  39035. if (fn(value, index++, this) === false) {
  39036. break;
  39037. }
  39038. }
  39039. return index;
  39040. };
  39041. List.prototype.__ensureOwner = function(ownerID) {
  39042. if (ownerID === this.__ownerID) {
  39043. return this;
  39044. }
  39045. if (!ownerID) {
  39046. this.__ownerID = ownerID;
  39047. return this;
  39048. }
  39049. return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);
  39050. };
  39051. function isList(maybeList) {
  39052. return !!(maybeList && maybeList[IS_LIST_SENTINEL]);
  39053. }
  39054. List.isList = isList;
  39055. var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
  39056. var ListPrototype = List.prototype;
  39057. ListPrototype[IS_LIST_SENTINEL] = true;
  39058. ListPrototype[DELETE] = ListPrototype.remove;
  39059. ListPrototype.setIn = MapPrototype.setIn;
  39060. ListPrototype.deleteIn =
  39061. ListPrototype.removeIn = MapPrototype.removeIn;
  39062. ListPrototype.update = MapPrototype.update;
  39063. ListPrototype.updateIn = MapPrototype.updateIn;
  39064. ListPrototype.mergeIn = MapPrototype.mergeIn;
  39065. ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
  39066. ListPrototype.withMutations = MapPrototype.withMutations;
  39067. ListPrototype.asMutable = MapPrototype.asMutable;
  39068. ListPrototype.asImmutable = MapPrototype.asImmutable;
  39069. ListPrototype.wasAltered = MapPrototype.wasAltered;
  39070. function VNode(array, ownerID) {
  39071. this.array = array;
  39072. this.ownerID = ownerID;
  39073. }
  39074. // TODO: seems like these methods are very similar
  39075. VNode.prototype.removeBefore = function(ownerID, level, index) {
  39076. if (index === level ? 1 << level : false || this.array.length === 0) {
  39077. return this;
  39078. }
  39079. var originIndex = (index >>> level) & MASK;
  39080. if (originIndex >= this.array.length) {
  39081. return new VNode([], ownerID);
  39082. }
  39083. var removingFirst = originIndex === 0;
  39084. var newChild;
  39085. if (level > 0) {
  39086. var oldChild = this.array[originIndex];
  39087. newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
  39088. if (newChild === oldChild && removingFirst) {
  39089. return this;
  39090. }
  39091. }
  39092. if (removingFirst && !newChild) {
  39093. return this;
  39094. }
  39095. var editable = editableVNode(this, ownerID);
  39096. if (!removingFirst) {
  39097. for (var ii = 0; ii < originIndex; ii++) {
  39098. editable.array[ii] = undefined;
  39099. }
  39100. }
  39101. if (newChild) {
  39102. editable.array[originIndex] = newChild;
  39103. }
  39104. return editable;
  39105. };
  39106. VNode.prototype.removeAfter = function(ownerID, level, index) {
  39107. if (index === (level ? 1 << level : 0) || this.array.length === 0) {
  39108. return this;
  39109. }
  39110. var sizeIndex = ((index - 1) >>> level) & MASK;
  39111. if (sizeIndex >= this.array.length) {
  39112. return this;
  39113. }
  39114. var newChild;
  39115. if (level > 0) {
  39116. var oldChild = this.array[sizeIndex];
  39117. newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
  39118. if (newChild === oldChild && sizeIndex === this.array.length - 1) {
  39119. return this;
  39120. }
  39121. }
  39122. var editable = editableVNode(this, ownerID);
  39123. editable.array.splice(sizeIndex + 1);
  39124. if (newChild) {
  39125. editable.array[sizeIndex] = newChild;
  39126. }
  39127. return editable;
  39128. };
  39129. var DONE = {};
  39130. function iterateList(list, reverse) {
  39131. var left = list._origin;
  39132. var right = list._capacity;
  39133. var tailPos = getTailOffset(right);
  39134. var tail = list._tail;
  39135. return iterateNodeOrLeaf(list._root, list._level, 0);
  39136. function iterateNodeOrLeaf(node, level, offset) {
  39137. return level === 0 ?
  39138. iterateLeaf(node, offset) :
  39139. iterateNode(node, level, offset);
  39140. }
  39141. function iterateLeaf(node, offset) {
  39142. var array = offset === tailPos ? tail && tail.array : node && node.array;
  39143. var from = offset > left ? 0 : left - offset;
  39144. var to = right - offset;
  39145. if (to > SIZE) {
  39146. to = SIZE;
  39147. }
  39148. return function() {
  39149. if (from === to) {
  39150. return DONE;
  39151. }
  39152. var idx = reverse ? --to : from++;
  39153. return array && array[idx];
  39154. };
  39155. }
  39156. function iterateNode(node, level, offset) {
  39157. var values;
  39158. var array = node && node.array;
  39159. var from = offset > left ? 0 : (left - offset) >> level;
  39160. var to = ((right - offset) >> level) + 1;
  39161. if (to > SIZE) {
  39162. to = SIZE;
  39163. }
  39164. return function() {
  39165. do {
  39166. if (values) {
  39167. var value = values();
  39168. if (value !== DONE) {
  39169. return value;
  39170. }
  39171. values = null;
  39172. }
  39173. if (from === to) {
  39174. return DONE;
  39175. }
  39176. var idx = reverse ? --to : from++;
  39177. values = iterateNodeOrLeaf(
  39178. array && array[idx], level - SHIFT, offset + (idx << level)
  39179. );
  39180. } while (true);
  39181. };
  39182. }
  39183. }
  39184. function makeList(origin, capacity, level, root, tail, ownerID, hash) {
  39185. var list = Object.create(ListPrototype);
  39186. list.size = capacity - origin;
  39187. list._origin = origin;
  39188. list._capacity = capacity;
  39189. list._level = level;
  39190. list._root = root;
  39191. list._tail = tail;
  39192. list.__ownerID = ownerID;
  39193. list.__hash = hash;
  39194. list.__altered = false;
  39195. return list;
  39196. }
  39197. var EMPTY_LIST;
  39198. function emptyList() {
  39199. return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
  39200. }
  39201. function updateList(list, index, value) {
  39202. index = wrapIndex(list, index);
  39203. if (index !== index) {
  39204. return list;
  39205. }
  39206. if (index >= list.size || index < 0) {
  39207. return list.withMutations(function(list ) {
  39208. index < 0 ?
  39209. setListBounds(list, index).set(0, value) :
  39210. setListBounds(list, 0, index + 1).set(index, value)
  39211. });
  39212. }
  39213. index += list._origin;
  39214. var newTail = list._tail;
  39215. var newRoot = list._root;
  39216. var didAlter = MakeRef(DID_ALTER);
  39217. if (index >= getTailOffset(list._capacity)) {
  39218. newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
  39219. } else {
  39220. newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);
  39221. }
  39222. if (!didAlter.value) {
  39223. return list;
  39224. }
  39225. if (list.__ownerID) {
  39226. list._root = newRoot;
  39227. list._tail = newTail;
  39228. list.__hash = undefined;
  39229. list.__altered = true;
  39230. return list;
  39231. }
  39232. return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
  39233. }
  39234. function updateVNode(node, ownerID, level, index, value, didAlter) {
  39235. var idx = (index >>> level) & MASK;
  39236. var nodeHas = node && idx < node.array.length;
  39237. if (!nodeHas && value === undefined) {
  39238. return node;
  39239. }
  39240. var newNode;
  39241. if (level > 0) {
  39242. var lowerNode = node && node.array[idx];
  39243. var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);
  39244. if (newLowerNode === lowerNode) {
  39245. return node;
  39246. }
  39247. newNode = editableVNode(node, ownerID);
  39248. newNode.array[idx] = newLowerNode;
  39249. return newNode;
  39250. }
  39251. if (nodeHas && node.array[idx] === value) {
  39252. return node;
  39253. }
  39254. SetRef(didAlter);
  39255. newNode = editableVNode(node, ownerID);
  39256. if (value === undefined && idx === newNode.array.length - 1) {
  39257. newNode.array.pop();
  39258. } else {
  39259. newNode.array[idx] = value;
  39260. }
  39261. return newNode;
  39262. }
  39263. function editableVNode(node, ownerID) {
  39264. if (ownerID && node && ownerID === node.ownerID) {
  39265. return node;
  39266. }
  39267. return new VNode(node ? node.array.slice() : [], ownerID);
  39268. }
  39269. function listNodeFor(list, rawIndex) {
  39270. if (rawIndex >= getTailOffset(list._capacity)) {
  39271. return list._tail;
  39272. }
  39273. if (rawIndex < 1 << (list._level + SHIFT)) {
  39274. var node = list._root;
  39275. var level = list._level;
  39276. while (node && level > 0) {
  39277. node = node.array[(rawIndex >>> level) & MASK];
  39278. level -= SHIFT;
  39279. }
  39280. return node;
  39281. }
  39282. }
  39283. function setListBounds(list, begin, end) {
  39284. // Sanitize begin & end using this shorthand for ToInt32(argument)
  39285. // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
  39286. if (begin !== undefined) {
  39287. begin = begin | 0;
  39288. }
  39289. if (end !== undefined) {
  39290. end = end | 0;
  39291. }
  39292. var owner = list.__ownerID || new OwnerID();
  39293. var oldOrigin = list._origin;
  39294. var oldCapacity = list._capacity;
  39295. var newOrigin = oldOrigin + begin;
  39296. var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;
  39297. if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
  39298. return list;
  39299. }
  39300. // If it's going to end after it starts, it's empty.
  39301. if (newOrigin >= newCapacity) {
  39302. return list.clear();
  39303. }
  39304. var newLevel = list._level;
  39305. var newRoot = list._root;
  39306. // New origin might need creating a higher root.
  39307. var offsetShift = 0;
  39308. while (newOrigin + offsetShift < 0) {
  39309. newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);
  39310. newLevel += SHIFT;
  39311. offsetShift += 1 << newLevel;
  39312. }
  39313. if (offsetShift) {
  39314. newOrigin += offsetShift;
  39315. oldOrigin += offsetShift;
  39316. newCapacity += offsetShift;
  39317. oldCapacity += offsetShift;
  39318. }
  39319. var oldTailOffset = getTailOffset(oldCapacity);
  39320. var newTailOffset = getTailOffset(newCapacity);
  39321. // New size might need creating a higher root.
  39322. while (newTailOffset >= 1 << (newLevel + SHIFT)) {
  39323. newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);
  39324. newLevel += SHIFT;
  39325. }
  39326. // Locate or create the new tail.
  39327. var oldTail = list._tail;
  39328. var newTail = newTailOffset < oldTailOffset ?
  39329. listNodeFor(list, newCapacity - 1) :
  39330. newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;
  39331. // Merge Tail into tree.
  39332. if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {
  39333. newRoot = editableVNode(newRoot, owner);
  39334. var node = newRoot;
  39335. for (var level = newLevel; level > SHIFT; level -= SHIFT) {
  39336. var idx = (oldTailOffset >>> level) & MASK;
  39337. node = node.array[idx] = editableVNode(node.array[idx], owner);
  39338. }
  39339. node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
  39340. }
  39341. // If the size has been reduced, there's a chance the tail needs to be trimmed.
  39342. if (newCapacity < oldCapacity) {
  39343. newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
  39344. }
  39345. // If the new origin is within the tail, then we do not need a root.
  39346. if (newOrigin >= newTailOffset) {
  39347. newOrigin -= newTailOffset;
  39348. newCapacity -= newTailOffset;
  39349. newLevel = SHIFT;
  39350. newRoot = null;
  39351. newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
  39352. // Otherwise, if the root has been trimmed, garbage collect.
  39353. } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
  39354. offsetShift = 0;
  39355. // Identify the new top root node of the subtree of the old root.
  39356. while (newRoot) {
  39357. var beginIndex = (newOrigin >>> newLevel) & MASK;
  39358. if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {
  39359. break;
  39360. }
  39361. if (beginIndex) {
  39362. offsetShift += (1 << newLevel) * beginIndex;
  39363. }
  39364. newLevel -= SHIFT;
  39365. newRoot = newRoot.array[beginIndex];
  39366. }
  39367. // Trim the new sides of the new root.
  39368. if (newRoot && newOrigin > oldOrigin) {
  39369. newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
  39370. }
  39371. if (newRoot && newTailOffset < oldTailOffset) {
  39372. newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);
  39373. }
  39374. if (offsetShift) {
  39375. newOrigin -= offsetShift;
  39376. newCapacity -= offsetShift;
  39377. }
  39378. }
  39379. if (list.__ownerID) {
  39380. list.size = newCapacity - newOrigin;
  39381. list._origin = newOrigin;
  39382. list._capacity = newCapacity;
  39383. list._level = newLevel;
  39384. list._root = newRoot;
  39385. list._tail = newTail;
  39386. list.__hash = undefined;
  39387. list.__altered = true;
  39388. return list;
  39389. }
  39390. return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
  39391. }
  39392. function mergeIntoListWith(list, merger, iterables) {
  39393. var iters = [];
  39394. var maxSize = 0;
  39395. for (var ii = 0; ii < iterables.length; ii++) {
  39396. var value = iterables[ii];
  39397. var iter = IndexedIterable(value);
  39398. if (iter.size > maxSize) {
  39399. maxSize = iter.size;
  39400. }
  39401. if (!isIterable(value)) {
  39402. iter = iter.map(function(v ) {return fromJS(v)});
  39403. }
  39404. iters.push(iter);
  39405. }
  39406. if (maxSize > list.size) {
  39407. list = list.setSize(maxSize);
  39408. }
  39409. return mergeIntoCollectionWith(list, merger, iters);
  39410. }
  39411. function getTailOffset(size) {
  39412. return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);
  39413. }
  39414. createClass(OrderedMap, Map);
  39415. // @pragma Construction
  39416. function OrderedMap(value) {
  39417. return value === null || value === undefined ? emptyOrderedMap() :
  39418. isOrderedMap(value) ? value :
  39419. emptyOrderedMap().withMutations(function(map ) {
  39420. var iter = KeyedIterable(value);
  39421. assertNotInfinite(iter.size);
  39422. iter.forEach(function(v, k) {return map.set(k, v)});
  39423. });
  39424. }
  39425. OrderedMap.of = function(/*...values*/) {
  39426. return this(arguments);
  39427. };
  39428. OrderedMap.prototype.toString = function() {
  39429. return this.__toString('OrderedMap {', '}');
  39430. };
  39431. // @pragma Access
  39432. OrderedMap.prototype.get = function(k, notSetValue) {
  39433. var index = this._map.get(k);
  39434. return index !== undefined ? this._list.get(index)[1] : notSetValue;
  39435. };
  39436. // @pragma Modification
  39437. OrderedMap.prototype.clear = function() {
  39438. if (this.size === 0) {
  39439. return this;
  39440. }
  39441. if (this.__ownerID) {
  39442. this.size = 0;
  39443. this._map.clear();
  39444. this._list.clear();
  39445. return this;
  39446. }
  39447. return emptyOrderedMap();
  39448. };
  39449. OrderedMap.prototype.set = function(k, v) {
  39450. return updateOrderedMap(this, k, v);
  39451. };
  39452. OrderedMap.prototype.remove = function(k) {
  39453. return updateOrderedMap(this, k, NOT_SET);
  39454. };
  39455. OrderedMap.prototype.wasAltered = function() {
  39456. return this._map.wasAltered() || this._list.wasAltered();
  39457. };
  39458. OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  39459. return this._list.__iterate(
  39460. function(entry ) {return entry && fn(entry[1], entry[0], this$0)},
  39461. reverse
  39462. );
  39463. };
  39464. OrderedMap.prototype.__iterator = function(type, reverse) {
  39465. return this._list.fromEntrySeq().__iterator(type, reverse);
  39466. };
  39467. OrderedMap.prototype.__ensureOwner = function(ownerID) {
  39468. if (ownerID === this.__ownerID) {
  39469. return this;
  39470. }
  39471. var newMap = this._map.__ensureOwner(ownerID);
  39472. var newList = this._list.__ensureOwner(ownerID);
  39473. if (!ownerID) {
  39474. this.__ownerID = ownerID;
  39475. this._map = newMap;
  39476. this._list = newList;
  39477. return this;
  39478. }
  39479. return makeOrderedMap(newMap, newList, ownerID, this.__hash);
  39480. };
  39481. function isOrderedMap(maybeOrderedMap) {
  39482. return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
  39483. }
  39484. OrderedMap.isOrderedMap = isOrderedMap;
  39485. OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;
  39486. OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
  39487. function makeOrderedMap(map, list, ownerID, hash) {
  39488. var omap = Object.create(OrderedMap.prototype);
  39489. omap.size = map ? map.size : 0;
  39490. omap._map = map;
  39491. omap._list = list;
  39492. omap.__ownerID = ownerID;
  39493. omap.__hash = hash;
  39494. return omap;
  39495. }
  39496. var EMPTY_ORDERED_MAP;
  39497. function emptyOrderedMap() {
  39498. return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));
  39499. }
  39500. function updateOrderedMap(omap, k, v) {
  39501. var map = omap._map;
  39502. var list = omap._list;
  39503. var i = map.get(k);
  39504. var has = i !== undefined;
  39505. var newMap;
  39506. var newList;
  39507. if (v === NOT_SET) { // removed
  39508. if (!has) {
  39509. return omap;
  39510. }
  39511. if (list.size >= SIZE && list.size >= map.size * 2) {
  39512. newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});
  39513. newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();
  39514. if (omap.__ownerID) {
  39515. newMap.__ownerID = newList.__ownerID = omap.__ownerID;
  39516. }
  39517. } else {
  39518. newMap = map.remove(k);
  39519. newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
  39520. }
  39521. } else {
  39522. if (has) {
  39523. if (v === list.get(i)[1]) {
  39524. return omap;
  39525. }
  39526. newMap = map;
  39527. newList = list.set(i, [k, v]);
  39528. } else {
  39529. newMap = map.set(k, list.size);
  39530. newList = list.set(list.size, [k, v]);
  39531. }
  39532. }
  39533. if (omap.__ownerID) {
  39534. omap.size = newMap.size;
  39535. omap._map = newMap;
  39536. omap._list = newList;
  39537. omap.__hash = undefined;
  39538. return omap;
  39539. }
  39540. return makeOrderedMap(newMap, newList);
  39541. }
  39542. createClass(ToKeyedSequence, KeyedSeq);
  39543. function ToKeyedSequence(indexed, useKeys) {
  39544. this._iter = indexed;
  39545. this._useKeys = useKeys;
  39546. this.size = indexed.size;
  39547. }
  39548. ToKeyedSequence.prototype.get = function(key, notSetValue) {
  39549. return this._iter.get(key, notSetValue);
  39550. };
  39551. ToKeyedSequence.prototype.has = function(key) {
  39552. return this._iter.has(key);
  39553. };
  39554. ToKeyedSequence.prototype.valueSeq = function() {
  39555. return this._iter.valueSeq();
  39556. };
  39557. ToKeyedSequence.prototype.reverse = function() {var this$0 = this;
  39558. var reversedSequence = reverseFactory(this, true);
  39559. if (!this._useKeys) {
  39560. reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};
  39561. }
  39562. return reversedSequence;
  39563. };
  39564. ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;
  39565. var mappedSequence = mapFactory(this, mapper, context);
  39566. if (!this._useKeys) {
  39567. mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};
  39568. }
  39569. return mappedSequence;
  39570. };
  39571. ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  39572. var ii;
  39573. return this._iter.__iterate(
  39574. this._useKeys ?
  39575. function(v, k) {return fn(v, k, this$0)} :
  39576. ((ii = reverse ? resolveSize(this) : 0),
  39577. function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),
  39578. reverse
  39579. );
  39580. };
  39581. ToKeyedSequence.prototype.__iterator = function(type, reverse) {
  39582. if (this._useKeys) {
  39583. return this._iter.__iterator(type, reverse);
  39584. }
  39585. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  39586. var ii = reverse ? resolveSize(this) : 0;
  39587. return new Iterator(function() {
  39588. var step = iterator.next();
  39589. return step.done ? step :
  39590. iteratorValue(type, reverse ? --ii : ii++, step.value, step);
  39591. });
  39592. };
  39593. ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;
  39594. createClass(ToIndexedSequence, IndexedSeq);
  39595. function ToIndexedSequence(iter) {
  39596. this._iter = iter;
  39597. this.size = iter.size;
  39598. }
  39599. ToIndexedSequence.prototype.includes = function(value) {
  39600. return this._iter.includes(value);
  39601. };
  39602. ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  39603. var iterations = 0;
  39604. return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);
  39605. };
  39606. ToIndexedSequence.prototype.__iterator = function(type, reverse) {
  39607. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  39608. var iterations = 0;
  39609. return new Iterator(function() {
  39610. var step = iterator.next();
  39611. return step.done ? step :
  39612. iteratorValue(type, iterations++, step.value, step)
  39613. });
  39614. };
  39615. createClass(ToSetSequence, SetSeq);
  39616. function ToSetSequence(iter) {
  39617. this._iter = iter;
  39618. this.size = iter.size;
  39619. }
  39620. ToSetSequence.prototype.has = function(key) {
  39621. return this._iter.includes(key);
  39622. };
  39623. ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  39624. return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);
  39625. };
  39626. ToSetSequence.prototype.__iterator = function(type, reverse) {
  39627. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  39628. return new Iterator(function() {
  39629. var step = iterator.next();
  39630. return step.done ? step :
  39631. iteratorValue(type, step.value, step.value, step);
  39632. });
  39633. };
  39634. createClass(FromEntriesSequence, KeyedSeq);
  39635. function FromEntriesSequence(entries) {
  39636. this._iter = entries;
  39637. this.size = entries.size;
  39638. }
  39639. FromEntriesSequence.prototype.entrySeq = function() {
  39640. return this._iter.toSeq();
  39641. };
  39642. FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  39643. return this._iter.__iterate(function(entry ) {
  39644. // Check if entry exists first so array access doesn't throw for holes
  39645. // in the parent iteration.
  39646. if (entry) {
  39647. validateEntry(entry);
  39648. var indexedIterable = isIterable(entry);
  39649. return fn(
  39650. indexedIterable ? entry.get(1) : entry[1],
  39651. indexedIterable ? entry.get(0) : entry[0],
  39652. this$0
  39653. );
  39654. }
  39655. }, reverse);
  39656. };
  39657. FromEntriesSequence.prototype.__iterator = function(type, reverse) {
  39658. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  39659. return new Iterator(function() {
  39660. while (true) {
  39661. var step = iterator.next();
  39662. if (step.done) {
  39663. return step;
  39664. }
  39665. var entry = step.value;
  39666. // Check if entry exists first so array access doesn't throw for holes
  39667. // in the parent iteration.
  39668. if (entry) {
  39669. validateEntry(entry);
  39670. var indexedIterable = isIterable(entry);
  39671. return iteratorValue(
  39672. type,
  39673. indexedIterable ? entry.get(0) : entry[0],
  39674. indexedIterable ? entry.get(1) : entry[1],
  39675. step
  39676. );
  39677. }
  39678. }
  39679. });
  39680. };
  39681. ToIndexedSequence.prototype.cacheResult =
  39682. ToKeyedSequence.prototype.cacheResult =
  39683. ToSetSequence.prototype.cacheResult =
  39684. FromEntriesSequence.prototype.cacheResult =
  39685. cacheResultThrough;
  39686. function flipFactory(iterable) {
  39687. var flipSequence = makeSequence(iterable);
  39688. flipSequence._iter = iterable;
  39689. flipSequence.size = iterable.size;
  39690. flipSequence.flip = function() {return iterable};
  39691. flipSequence.reverse = function () {
  39692. var reversedSequence = iterable.reverse.apply(this); // super.reverse()
  39693. reversedSequence.flip = function() {return iterable.reverse()};
  39694. return reversedSequence;
  39695. };
  39696. flipSequence.has = function(key ) {return iterable.includes(key)};
  39697. flipSequence.includes = function(key ) {return iterable.has(key)};
  39698. flipSequence.cacheResult = cacheResultThrough;
  39699. flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  39700. return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);
  39701. }
  39702. flipSequence.__iteratorUncached = function(type, reverse) {
  39703. if (type === ITERATE_ENTRIES) {
  39704. var iterator = iterable.__iterator(type, reverse);
  39705. return new Iterator(function() {
  39706. var step = iterator.next();
  39707. if (!step.done) {
  39708. var k = step.value[0];
  39709. step.value[0] = step.value[1];
  39710. step.value[1] = k;
  39711. }
  39712. return step;
  39713. });
  39714. }
  39715. return iterable.__iterator(
  39716. type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
  39717. reverse
  39718. );
  39719. }
  39720. return flipSequence;
  39721. }
  39722. function mapFactory(iterable, mapper, context) {
  39723. var mappedSequence = makeSequence(iterable);
  39724. mappedSequence.size = iterable.size;
  39725. mappedSequence.has = function(key ) {return iterable.has(key)};
  39726. mappedSequence.get = function(key, notSetValue) {
  39727. var v = iterable.get(key, NOT_SET);
  39728. return v === NOT_SET ?
  39729. notSetValue :
  39730. mapper.call(context, v, key, iterable);
  39731. };
  39732. mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  39733. return iterable.__iterate(
  39734. function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},
  39735. reverse
  39736. );
  39737. }
  39738. mappedSequence.__iteratorUncached = function (type, reverse) {
  39739. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  39740. return new Iterator(function() {
  39741. var step = iterator.next();
  39742. if (step.done) {
  39743. return step;
  39744. }
  39745. var entry = step.value;
  39746. var key = entry[0];
  39747. return iteratorValue(
  39748. type,
  39749. key,
  39750. mapper.call(context, entry[1], key, iterable),
  39751. step
  39752. );
  39753. });
  39754. }
  39755. return mappedSequence;
  39756. }
  39757. function reverseFactory(iterable, useKeys) {
  39758. var reversedSequence = makeSequence(iterable);
  39759. reversedSequence._iter = iterable;
  39760. reversedSequence.size = iterable.size;
  39761. reversedSequence.reverse = function() {return iterable};
  39762. if (iterable.flip) {
  39763. reversedSequence.flip = function () {
  39764. var flipSequence = flipFactory(iterable);
  39765. flipSequence.reverse = function() {return iterable.flip()};
  39766. return flipSequence;
  39767. };
  39768. }
  39769. reversedSequence.get = function(key, notSetValue)
  39770. {return iterable.get(useKeys ? key : -1 - key, notSetValue)};
  39771. reversedSequence.has = function(key )
  39772. {return iterable.has(useKeys ? key : -1 - key)};
  39773. reversedSequence.includes = function(value ) {return iterable.includes(value)};
  39774. reversedSequence.cacheResult = cacheResultThrough;
  39775. reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;
  39776. return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);
  39777. };
  39778. reversedSequence.__iterator =
  39779. function(type, reverse) {return iterable.__iterator(type, !reverse)};
  39780. return reversedSequence;
  39781. }
  39782. function filterFactory(iterable, predicate, context, useKeys) {
  39783. var filterSequence = makeSequence(iterable);
  39784. if (useKeys) {
  39785. filterSequence.has = function(key ) {
  39786. var v = iterable.get(key, NOT_SET);
  39787. return v !== NOT_SET && !!predicate.call(context, v, key, iterable);
  39788. };
  39789. filterSequence.get = function(key, notSetValue) {
  39790. var v = iterable.get(key, NOT_SET);
  39791. return v !== NOT_SET && predicate.call(context, v, key, iterable) ?
  39792. v : notSetValue;
  39793. };
  39794. }
  39795. filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  39796. var iterations = 0;
  39797. iterable.__iterate(function(v, k, c) {
  39798. if (predicate.call(context, v, k, c)) {
  39799. iterations++;
  39800. return fn(v, useKeys ? k : iterations - 1, this$0);
  39801. }
  39802. }, reverse);
  39803. return iterations;
  39804. };
  39805. filterSequence.__iteratorUncached = function (type, reverse) {
  39806. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  39807. var iterations = 0;
  39808. return new Iterator(function() {
  39809. while (true) {
  39810. var step = iterator.next();
  39811. if (step.done) {
  39812. return step;
  39813. }
  39814. var entry = step.value;
  39815. var key = entry[0];
  39816. var value = entry[1];
  39817. if (predicate.call(context, value, key, iterable)) {
  39818. return iteratorValue(type, useKeys ? key : iterations++, value, step);
  39819. }
  39820. }
  39821. });
  39822. }
  39823. return filterSequence;
  39824. }
  39825. function countByFactory(iterable, grouper, context) {
  39826. var groups = Map().asMutable();
  39827. iterable.__iterate(function(v, k) {
  39828. groups.update(
  39829. grouper.call(context, v, k, iterable),
  39830. 0,
  39831. function(a ) {return a + 1}
  39832. );
  39833. });
  39834. return groups.asImmutable();
  39835. }
  39836. function groupByFactory(iterable, grouper, context) {
  39837. var isKeyedIter = isKeyed(iterable);
  39838. var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();
  39839. iterable.__iterate(function(v, k) {
  39840. groups.update(
  39841. grouper.call(context, v, k, iterable),
  39842. function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}
  39843. );
  39844. });
  39845. var coerce = iterableClass(iterable);
  39846. return groups.map(function(arr ) {return reify(iterable, coerce(arr))});
  39847. }
  39848. function sliceFactory(iterable, begin, end, useKeys) {
  39849. var originalSize = iterable.size;
  39850. // Sanitize begin & end using this shorthand for ToInt32(argument)
  39851. // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
  39852. if (begin !== undefined) {
  39853. begin = begin | 0;
  39854. }
  39855. if (end !== undefined) {
  39856. if (end === Infinity) {
  39857. end = originalSize;
  39858. } else {
  39859. end = end | 0;
  39860. }
  39861. }
  39862. if (wholeSlice(begin, end, originalSize)) {
  39863. return iterable;
  39864. }
  39865. var resolvedBegin = resolveBegin(begin, originalSize);
  39866. var resolvedEnd = resolveEnd(end, originalSize);
  39867. // begin or end will be NaN if they were provided as negative numbers and
  39868. // this iterable's size is unknown. In that case, cache first so there is
  39869. // a known size and these do not resolve to NaN.
  39870. if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
  39871. return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);
  39872. }
  39873. // Note: resolvedEnd is undefined when the original sequence's length is
  39874. // unknown and this slice did not supply an end and should contain all
  39875. // elements after resolvedBegin.
  39876. // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
  39877. var resolvedSize = resolvedEnd - resolvedBegin;
  39878. var sliceSize;
  39879. if (resolvedSize === resolvedSize) {
  39880. sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
  39881. }
  39882. var sliceSeq = makeSequence(iterable);
  39883. // If iterable.size is undefined, the size of the realized sliceSeq is
  39884. // unknown at this point unless the number of items to slice is 0
  39885. sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;
  39886. if (!useKeys && isSeq(iterable) && sliceSize >= 0) {
  39887. sliceSeq.get = function (index, notSetValue) {
  39888. index = wrapIndex(this, index);
  39889. return index >= 0 && index < sliceSize ?
  39890. iterable.get(index + resolvedBegin, notSetValue) :
  39891. notSetValue;
  39892. }
  39893. }
  39894. sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;
  39895. if (sliceSize === 0) {
  39896. return 0;
  39897. }
  39898. if (reverse) {
  39899. return this.cacheResult().__iterate(fn, reverse);
  39900. }
  39901. var skipped = 0;
  39902. var isSkipping = true;
  39903. var iterations = 0;
  39904. iterable.__iterate(function(v, k) {
  39905. if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
  39906. iterations++;
  39907. return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&
  39908. iterations !== sliceSize;
  39909. }
  39910. });
  39911. return iterations;
  39912. };
  39913. sliceSeq.__iteratorUncached = function(type, reverse) {
  39914. if (sliceSize !== 0 && reverse) {
  39915. return this.cacheResult().__iterator(type, reverse);
  39916. }
  39917. // Don't bother instantiating parent iterator if taking 0.
  39918. var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);
  39919. var skipped = 0;
  39920. var iterations = 0;
  39921. return new Iterator(function() {
  39922. while (skipped++ < resolvedBegin) {
  39923. iterator.next();
  39924. }
  39925. if (++iterations > sliceSize) {
  39926. return iteratorDone();
  39927. }
  39928. var step = iterator.next();
  39929. if (useKeys || type === ITERATE_VALUES) {
  39930. return step;
  39931. } else if (type === ITERATE_KEYS) {
  39932. return iteratorValue(type, iterations - 1, undefined, step);
  39933. } else {
  39934. return iteratorValue(type, iterations - 1, step.value[1], step);
  39935. }
  39936. });
  39937. }
  39938. return sliceSeq;
  39939. }
  39940. function takeWhileFactory(iterable, predicate, context) {
  39941. var takeSequence = makeSequence(iterable);
  39942. takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
  39943. if (reverse) {
  39944. return this.cacheResult().__iterate(fn, reverse);
  39945. }
  39946. var iterations = 0;
  39947. iterable.__iterate(function(v, k, c)
  39948. {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}
  39949. );
  39950. return iterations;
  39951. };
  39952. takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
  39953. if (reverse) {
  39954. return this.cacheResult().__iterator(type, reverse);
  39955. }
  39956. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  39957. var iterating = true;
  39958. return new Iterator(function() {
  39959. if (!iterating) {
  39960. return iteratorDone();
  39961. }
  39962. var step = iterator.next();
  39963. if (step.done) {
  39964. return step;
  39965. }
  39966. var entry = step.value;
  39967. var k = entry[0];
  39968. var v = entry[1];
  39969. if (!predicate.call(context, v, k, this$0)) {
  39970. iterating = false;
  39971. return iteratorDone();
  39972. }
  39973. return type === ITERATE_ENTRIES ? step :
  39974. iteratorValue(type, k, v, step);
  39975. });
  39976. };
  39977. return takeSequence;
  39978. }
  39979. function skipWhileFactory(iterable, predicate, context, useKeys) {
  39980. var skipSequence = makeSequence(iterable);
  39981. skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  39982. if (reverse) {
  39983. return this.cacheResult().__iterate(fn, reverse);
  39984. }
  39985. var isSkipping = true;
  39986. var iterations = 0;
  39987. iterable.__iterate(function(v, k, c) {
  39988. if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
  39989. iterations++;
  39990. return fn(v, useKeys ? k : iterations - 1, this$0);
  39991. }
  39992. });
  39993. return iterations;
  39994. };
  39995. skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
  39996. if (reverse) {
  39997. return this.cacheResult().__iterator(type, reverse);
  39998. }
  39999. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  40000. var skipping = true;
  40001. var iterations = 0;
  40002. return new Iterator(function() {
  40003. var step, k, v;
  40004. do {
  40005. step = iterator.next();
  40006. if (step.done) {
  40007. if (useKeys || type === ITERATE_VALUES) {
  40008. return step;
  40009. } else if (type === ITERATE_KEYS) {
  40010. return iteratorValue(type, iterations++, undefined, step);
  40011. } else {
  40012. return iteratorValue(type, iterations++, step.value[1], step);
  40013. }
  40014. }
  40015. var entry = step.value;
  40016. k = entry[0];
  40017. v = entry[1];
  40018. skipping && (skipping = predicate.call(context, v, k, this$0));
  40019. } while (skipping);
  40020. return type === ITERATE_ENTRIES ? step :
  40021. iteratorValue(type, k, v, step);
  40022. });
  40023. };
  40024. return skipSequence;
  40025. }
  40026. function concatFactory(iterable, values) {
  40027. var isKeyedIterable = isKeyed(iterable);
  40028. var iters = [iterable].concat(values).map(function(v ) {
  40029. if (!isIterable(v)) {
  40030. v = isKeyedIterable ?
  40031. keyedSeqFromValue(v) :
  40032. indexedSeqFromValue(Array.isArray(v) ? v : [v]);
  40033. } else if (isKeyedIterable) {
  40034. v = KeyedIterable(v);
  40035. }
  40036. return v;
  40037. }).filter(function(v ) {return v.size !== 0});
  40038. if (iters.length === 0) {
  40039. return iterable;
  40040. }
  40041. if (iters.length === 1) {
  40042. var singleton = iters[0];
  40043. if (singleton === iterable ||
  40044. isKeyedIterable && isKeyed(singleton) ||
  40045. isIndexed(iterable) && isIndexed(singleton)) {
  40046. return singleton;
  40047. }
  40048. }
  40049. var concatSeq = new ArraySeq(iters);
  40050. if (isKeyedIterable) {
  40051. concatSeq = concatSeq.toKeyedSeq();
  40052. } else if (!isIndexed(iterable)) {
  40053. concatSeq = concatSeq.toSetSeq();
  40054. }
  40055. concatSeq = concatSeq.flatten(true);
  40056. concatSeq.size = iters.reduce(
  40057. function(sum, seq) {
  40058. if (sum !== undefined) {
  40059. var size = seq.size;
  40060. if (size !== undefined) {
  40061. return sum + size;
  40062. }
  40063. }
  40064. },
  40065. 0
  40066. );
  40067. return concatSeq;
  40068. }
  40069. function flattenFactory(iterable, depth, useKeys) {
  40070. var flatSequence = makeSequence(iterable);
  40071. flatSequence.__iterateUncached = function(fn, reverse) {
  40072. var iterations = 0;
  40073. var stopped = false;
  40074. function flatDeep(iter, currentDepth) {var this$0 = this;
  40075. iter.__iterate(function(v, k) {
  40076. if ((!depth || currentDepth < depth) && isIterable(v)) {
  40077. flatDeep(v, currentDepth + 1);
  40078. } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {
  40079. stopped = true;
  40080. }
  40081. return !stopped;
  40082. }, reverse);
  40083. }
  40084. flatDeep(iterable, 0);
  40085. return iterations;
  40086. }
  40087. flatSequence.__iteratorUncached = function(type, reverse) {
  40088. var iterator = iterable.__iterator(type, reverse);
  40089. var stack = [];
  40090. var iterations = 0;
  40091. return new Iterator(function() {
  40092. while (iterator) {
  40093. var step = iterator.next();
  40094. if (step.done !== false) {
  40095. iterator = stack.pop();
  40096. continue;
  40097. }
  40098. var v = step.value;
  40099. if (type === ITERATE_ENTRIES) {
  40100. v = v[1];
  40101. }
  40102. if ((!depth || stack.length < depth) && isIterable(v)) {
  40103. stack.push(iterator);
  40104. iterator = v.__iterator(type, reverse);
  40105. } else {
  40106. return useKeys ? step : iteratorValue(type, iterations++, v, step);
  40107. }
  40108. }
  40109. return iteratorDone();
  40110. });
  40111. }
  40112. return flatSequence;
  40113. }
  40114. function flatMapFactory(iterable, mapper, context) {
  40115. var coerce = iterableClass(iterable);
  40116. return iterable.toSeq().map(
  40117. function(v, k) {return coerce(mapper.call(context, v, k, iterable))}
  40118. ).flatten(true);
  40119. }
  40120. function interposeFactory(iterable, separator) {
  40121. var interposedSequence = makeSequence(iterable);
  40122. interposedSequence.size = iterable.size && iterable.size * 2 -1;
  40123. interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
  40124. var iterations = 0;
  40125. iterable.__iterate(function(v, k)
  40126. {return (!iterations || fn(separator, iterations++, this$0) !== false) &&
  40127. fn(v, iterations++, this$0) !== false},
  40128. reverse
  40129. );
  40130. return iterations;
  40131. };
  40132. interposedSequence.__iteratorUncached = function(type, reverse) {
  40133. var iterator = iterable.__iterator(ITERATE_VALUES, reverse);
  40134. var iterations = 0;
  40135. var step;
  40136. return new Iterator(function() {
  40137. if (!step || iterations % 2) {
  40138. step = iterator.next();
  40139. if (step.done) {
  40140. return step;
  40141. }
  40142. }
  40143. return iterations % 2 ?
  40144. iteratorValue(type, iterations++, separator) :
  40145. iteratorValue(type, iterations++, step.value, step);
  40146. });
  40147. };
  40148. return interposedSequence;
  40149. }
  40150. function sortFactory(iterable, comparator, mapper) {
  40151. if (!comparator) {
  40152. comparator = defaultComparator;
  40153. }
  40154. var isKeyedIterable = isKeyed(iterable);
  40155. var index = 0;
  40156. var entries = iterable.toSeq().map(
  40157. function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}
  40158. ).toArray();
  40159. entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(
  40160. isKeyedIterable ?
  40161. function(v, i) { entries[i].length = 2; } :
  40162. function(v, i) { entries[i] = v[1]; }
  40163. );
  40164. return isKeyedIterable ? KeyedSeq(entries) :
  40165. isIndexed(iterable) ? IndexedSeq(entries) :
  40166. SetSeq(entries);
  40167. }
  40168. function maxFactory(iterable, comparator, mapper) {
  40169. if (!comparator) {
  40170. comparator = defaultComparator;
  40171. }
  40172. if (mapper) {
  40173. var entry = iterable.toSeq()
  40174. .map(function(v, k) {return [v, mapper(v, k, iterable)]})
  40175. .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});
  40176. return entry && entry[0];
  40177. } else {
  40178. return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});
  40179. }
  40180. }
  40181. function maxCompare(comparator, a, b) {
  40182. var comp = comparator(b, a);
  40183. // b is considered the new max if the comparator declares them equal, but
  40184. // they are not equal and b is in fact a nullish value.
  40185. return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;
  40186. }
  40187. function zipWithFactory(keyIter, zipper, iters) {
  40188. var zipSequence = makeSequence(keyIter);
  40189. zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();
  40190. // Note: this a generic base implementation of __iterate in terms of
  40191. // __iterator which may be more generically useful in the future.
  40192. zipSequence.__iterate = function(fn, reverse) {
  40193. /* generic:
  40194. var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
  40195. var step;
  40196. var iterations = 0;
  40197. while (!(step = iterator.next()).done) {
  40198. iterations++;
  40199. if (fn(step.value[1], step.value[0], this) === false) {
  40200. break;
  40201. }
  40202. }
  40203. return iterations;
  40204. */
  40205. // indexed:
  40206. var iterator = this.__iterator(ITERATE_VALUES, reverse);
  40207. var step;
  40208. var iterations = 0;
  40209. while (!(step = iterator.next()).done) {
  40210. if (fn(step.value, iterations++, this) === false) {
  40211. break;
  40212. }
  40213. }
  40214. return iterations;
  40215. };
  40216. zipSequence.__iteratorUncached = function(type, reverse) {
  40217. var iterators = iters.map(function(i )
  40218. {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}
  40219. );
  40220. var iterations = 0;
  40221. var isDone = false;
  40222. return new Iterator(function() {
  40223. var steps;
  40224. if (!isDone) {
  40225. steps = iterators.map(function(i ) {return i.next()});
  40226. isDone = steps.some(function(s ) {return s.done});
  40227. }
  40228. if (isDone) {
  40229. return iteratorDone();
  40230. }
  40231. return iteratorValue(
  40232. type,
  40233. iterations++,
  40234. zipper.apply(null, steps.map(function(s ) {return s.value}))
  40235. );
  40236. });
  40237. };
  40238. return zipSequence
  40239. }
  40240. // #pragma Helper Functions
  40241. function reify(iter, seq) {
  40242. return isSeq(iter) ? seq : iter.constructor(seq);
  40243. }
  40244. function validateEntry(entry) {
  40245. if (entry !== Object(entry)) {
  40246. throw new TypeError('Expected [K, V] tuple: ' + entry);
  40247. }
  40248. }
  40249. function resolveSize(iter) {
  40250. assertNotInfinite(iter.size);
  40251. return ensureSize(iter);
  40252. }
  40253. function iterableClass(iterable) {
  40254. return isKeyed(iterable) ? KeyedIterable :
  40255. isIndexed(iterable) ? IndexedIterable :
  40256. SetIterable;
  40257. }
  40258. function makeSequence(iterable) {
  40259. return Object.create(
  40260. (
  40261. isKeyed(iterable) ? KeyedSeq :
  40262. isIndexed(iterable) ? IndexedSeq :
  40263. SetSeq
  40264. ).prototype
  40265. );
  40266. }
  40267. function cacheResultThrough() {
  40268. if (this._iter.cacheResult) {
  40269. this._iter.cacheResult();
  40270. this.size = this._iter.size;
  40271. return this;
  40272. } else {
  40273. return Seq.prototype.cacheResult.call(this);
  40274. }
  40275. }
  40276. function defaultComparator(a, b) {
  40277. return a > b ? 1 : a < b ? -1 : 0;
  40278. }
  40279. function forceIterator(keyPath) {
  40280. var iter = getIterator(keyPath);
  40281. if (!iter) {
  40282. // Array might not be iterable in this environment, so we need a fallback
  40283. // to our wrapped type.
  40284. if (!isArrayLike(keyPath)) {
  40285. throw new TypeError('Expected iterable or array-like: ' + keyPath);
  40286. }
  40287. iter = getIterator(Iterable(keyPath));
  40288. }
  40289. return iter;
  40290. }
  40291. createClass(Record, KeyedCollection);
  40292. function Record(defaultValues, name) {
  40293. var hasInitialized;
  40294. var RecordType = function Record(values) {
  40295. if (values instanceof RecordType) {
  40296. return values;
  40297. }
  40298. if (!(this instanceof RecordType)) {
  40299. return new RecordType(values);
  40300. }
  40301. if (!hasInitialized) {
  40302. hasInitialized = true;
  40303. var keys = Object.keys(defaultValues);
  40304. setProps(RecordTypePrototype, keys);
  40305. RecordTypePrototype.size = keys.length;
  40306. RecordTypePrototype._name = name;
  40307. RecordTypePrototype._keys = keys;
  40308. RecordTypePrototype._defaultValues = defaultValues;
  40309. }
  40310. this._map = Map(values);
  40311. };
  40312. var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);
  40313. RecordTypePrototype.constructor = RecordType;
  40314. return RecordType;
  40315. }
  40316. Record.prototype.toString = function() {
  40317. return this.__toString(recordName(this) + ' {', '}');
  40318. };
  40319. // @pragma Access
  40320. Record.prototype.has = function(k) {
  40321. return this._defaultValues.hasOwnProperty(k);
  40322. };
  40323. Record.prototype.get = function(k, notSetValue) {
  40324. if (!this.has(k)) {
  40325. return notSetValue;
  40326. }
  40327. var defaultVal = this._defaultValues[k];
  40328. return this._map ? this._map.get(k, defaultVal) : defaultVal;
  40329. };
  40330. // @pragma Modification
  40331. Record.prototype.clear = function() {
  40332. if (this.__ownerID) {
  40333. this._map && this._map.clear();
  40334. return this;
  40335. }
  40336. var RecordType = this.constructor;
  40337. return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));
  40338. };
  40339. Record.prototype.set = function(k, v) {
  40340. if (!this.has(k)) {
  40341. throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
  40342. }
  40343. if (this._map && !this._map.has(k)) {
  40344. var defaultVal = this._defaultValues[k];
  40345. if (v === defaultVal) {
  40346. return this;
  40347. }
  40348. }
  40349. var newMap = this._map && this._map.set(k, v);
  40350. if (this.__ownerID || newMap === this._map) {
  40351. return this;
  40352. }
  40353. return makeRecord(this, newMap);
  40354. };
  40355. Record.prototype.remove = function(k) {
  40356. if (!this.has(k)) {
  40357. return this;
  40358. }
  40359. var newMap = this._map && this._map.remove(k);
  40360. if (this.__ownerID || newMap === this._map) {
  40361. return this;
  40362. }
  40363. return makeRecord(this, newMap);
  40364. };
  40365. Record.prototype.wasAltered = function() {
  40366. return this._map.wasAltered();
  40367. };
  40368. Record.prototype.__iterator = function(type, reverse) {var this$0 = this;
  40369. return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);
  40370. };
  40371. Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  40372. return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);
  40373. };
  40374. Record.prototype.__ensureOwner = function(ownerID) {
  40375. if (ownerID === this.__ownerID) {
  40376. return this;
  40377. }
  40378. var newMap = this._map && this._map.__ensureOwner(ownerID);
  40379. if (!ownerID) {
  40380. this.__ownerID = ownerID;
  40381. this._map = newMap;
  40382. return this;
  40383. }
  40384. return makeRecord(this, newMap, ownerID);
  40385. };
  40386. var RecordPrototype = Record.prototype;
  40387. RecordPrototype[DELETE] = RecordPrototype.remove;
  40388. RecordPrototype.deleteIn =
  40389. RecordPrototype.removeIn = MapPrototype.removeIn;
  40390. RecordPrototype.merge = MapPrototype.merge;
  40391. RecordPrototype.mergeWith = MapPrototype.mergeWith;
  40392. RecordPrototype.mergeIn = MapPrototype.mergeIn;
  40393. RecordPrototype.mergeDeep = MapPrototype.mergeDeep;
  40394. RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;
  40395. RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
  40396. RecordPrototype.setIn = MapPrototype.setIn;
  40397. RecordPrototype.update = MapPrototype.update;
  40398. RecordPrototype.updateIn = MapPrototype.updateIn;
  40399. RecordPrototype.withMutations = MapPrototype.withMutations;
  40400. RecordPrototype.asMutable = MapPrototype.asMutable;
  40401. RecordPrototype.asImmutable = MapPrototype.asImmutable;
  40402. function makeRecord(likeRecord, map, ownerID) {
  40403. var record = Object.create(Object.getPrototypeOf(likeRecord));
  40404. record._map = map;
  40405. record.__ownerID = ownerID;
  40406. return record;
  40407. }
  40408. function recordName(record) {
  40409. return record._name || record.constructor.name || 'Record';
  40410. }
  40411. function setProps(prototype, names) {
  40412. try {
  40413. names.forEach(setProp.bind(undefined, prototype));
  40414. } catch (error) {
  40415. // Object.defineProperty failed. Probably IE8.
  40416. }
  40417. }
  40418. function setProp(prototype, name) {
  40419. Object.defineProperty(prototype, name, {
  40420. get: function() {
  40421. return this.get(name);
  40422. },
  40423. set: function(value) {
  40424. invariant(this.__ownerID, 'Cannot set on an immutable record.');
  40425. this.set(name, value);
  40426. }
  40427. });
  40428. }
  40429. createClass(Set, SetCollection);
  40430. // @pragma Construction
  40431. function Set(value) {
  40432. return value === null || value === undefined ? emptySet() :
  40433. isSet(value) && !isOrdered(value) ? value :
  40434. emptySet().withMutations(function(set ) {
  40435. var iter = SetIterable(value);
  40436. assertNotInfinite(iter.size);
  40437. iter.forEach(function(v ) {return set.add(v)});
  40438. });
  40439. }
  40440. Set.of = function(/*...values*/) {
  40441. return this(arguments);
  40442. };
  40443. Set.fromKeys = function(value) {
  40444. return this(KeyedIterable(value).keySeq());
  40445. };
  40446. Set.prototype.toString = function() {
  40447. return this.__toString('Set {', '}');
  40448. };
  40449. // @pragma Access
  40450. Set.prototype.has = function(value) {
  40451. return this._map.has(value);
  40452. };
  40453. // @pragma Modification
  40454. Set.prototype.add = function(value) {
  40455. return updateSet(this, this._map.set(value, true));
  40456. };
  40457. Set.prototype.remove = function(value) {
  40458. return updateSet(this, this._map.remove(value));
  40459. };
  40460. Set.prototype.clear = function() {
  40461. return updateSet(this, this._map.clear());
  40462. };
  40463. // @pragma Composition
  40464. Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);
  40465. iters = iters.filter(function(x ) {return x.size !== 0});
  40466. if (iters.length === 0) {
  40467. return this;
  40468. }
  40469. if (this.size === 0 && !this.__ownerID && iters.length === 1) {
  40470. return this.constructor(iters[0]);
  40471. }
  40472. return this.withMutations(function(set ) {
  40473. for (var ii = 0; ii < iters.length; ii++) {
  40474. SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});
  40475. }
  40476. });
  40477. };
  40478. Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);
  40479. if (iters.length === 0) {
  40480. return this;
  40481. }
  40482. iters = iters.map(function(iter ) {return SetIterable(iter)});
  40483. var originalSet = this;
  40484. return this.withMutations(function(set ) {
  40485. originalSet.forEach(function(value ) {
  40486. if (!iters.every(function(iter ) {return iter.includes(value)})) {
  40487. set.remove(value);
  40488. }
  40489. });
  40490. });
  40491. };
  40492. Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);
  40493. if (iters.length === 0) {
  40494. return this;
  40495. }
  40496. iters = iters.map(function(iter ) {return SetIterable(iter)});
  40497. var originalSet = this;
  40498. return this.withMutations(function(set ) {
  40499. originalSet.forEach(function(value ) {
  40500. if (iters.some(function(iter ) {return iter.includes(value)})) {
  40501. set.remove(value);
  40502. }
  40503. });
  40504. });
  40505. };
  40506. Set.prototype.merge = function() {
  40507. return this.union.apply(this, arguments);
  40508. };
  40509. Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  40510. return this.union.apply(this, iters);
  40511. };
  40512. Set.prototype.sort = function(comparator) {
  40513. // Late binding
  40514. return OrderedSet(sortFactory(this, comparator));
  40515. };
  40516. Set.prototype.sortBy = function(mapper, comparator) {
  40517. // Late binding
  40518. return OrderedSet(sortFactory(this, comparator, mapper));
  40519. };
  40520. Set.prototype.wasAltered = function() {
  40521. return this._map.wasAltered();
  40522. };
  40523. Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  40524. return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);
  40525. };
  40526. Set.prototype.__iterator = function(type, reverse) {
  40527. return this._map.map(function(_, k) {return k}).__iterator(type, reverse);
  40528. };
  40529. Set.prototype.__ensureOwner = function(ownerID) {
  40530. if (ownerID === this.__ownerID) {
  40531. return this;
  40532. }
  40533. var newMap = this._map.__ensureOwner(ownerID);
  40534. if (!ownerID) {
  40535. this.__ownerID = ownerID;
  40536. this._map = newMap;
  40537. return this;
  40538. }
  40539. return this.__make(newMap, ownerID);
  40540. };
  40541. function isSet(maybeSet) {
  40542. return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);
  40543. }
  40544. Set.isSet = isSet;
  40545. var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
  40546. var SetPrototype = Set.prototype;
  40547. SetPrototype[IS_SET_SENTINEL] = true;
  40548. SetPrototype[DELETE] = SetPrototype.remove;
  40549. SetPrototype.mergeDeep = SetPrototype.merge;
  40550. SetPrototype.mergeDeepWith = SetPrototype.mergeWith;
  40551. SetPrototype.withMutations = MapPrototype.withMutations;
  40552. SetPrototype.asMutable = MapPrototype.asMutable;
  40553. SetPrototype.asImmutable = MapPrototype.asImmutable;
  40554. SetPrototype.__empty = emptySet;
  40555. SetPrototype.__make = makeSet;
  40556. function updateSet(set, newMap) {
  40557. if (set.__ownerID) {
  40558. set.size = newMap.size;
  40559. set._map = newMap;
  40560. return set;
  40561. }
  40562. return newMap === set._map ? set :
  40563. newMap.size === 0 ? set.__empty() :
  40564. set.__make(newMap);
  40565. }
  40566. function makeSet(map, ownerID) {
  40567. var set = Object.create(SetPrototype);
  40568. set.size = map ? map.size : 0;
  40569. set._map = map;
  40570. set.__ownerID = ownerID;
  40571. return set;
  40572. }
  40573. var EMPTY_SET;
  40574. function emptySet() {
  40575. return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
  40576. }
  40577. createClass(OrderedSet, Set);
  40578. // @pragma Construction
  40579. function OrderedSet(value) {
  40580. return value === null || value === undefined ? emptyOrderedSet() :
  40581. isOrderedSet(value) ? value :
  40582. emptyOrderedSet().withMutations(function(set ) {
  40583. var iter = SetIterable(value);
  40584. assertNotInfinite(iter.size);
  40585. iter.forEach(function(v ) {return set.add(v)});
  40586. });
  40587. }
  40588. OrderedSet.of = function(/*...values*/) {
  40589. return this(arguments);
  40590. };
  40591. OrderedSet.fromKeys = function(value) {
  40592. return this(KeyedIterable(value).keySeq());
  40593. };
  40594. OrderedSet.prototype.toString = function() {
  40595. return this.__toString('OrderedSet {', '}');
  40596. };
  40597. function isOrderedSet(maybeOrderedSet) {
  40598. return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
  40599. }
  40600. OrderedSet.isOrderedSet = isOrderedSet;
  40601. var OrderedSetPrototype = OrderedSet.prototype;
  40602. OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;
  40603. OrderedSetPrototype.__empty = emptyOrderedSet;
  40604. OrderedSetPrototype.__make = makeOrderedSet;
  40605. function makeOrderedSet(map, ownerID) {
  40606. var set = Object.create(OrderedSetPrototype);
  40607. set.size = map ? map.size : 0;
  40608. set._map = map;
  40609. set.__ownerID = ownerID;
  40610. return set;
  40611. }
  40612. var EMPTY_ORDERED_SET;
  40613. function emptyOrderedSet() {
  40614. return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));
  40615. }
  40616. createClass(Stack, IndexedCollection);
  40617. // @pragma Construction
  40618. function Stack(value) {
  40619. return value === null || value === undefined ? emptyStack() :
  40620. isStack(value) ? value :
  40621. emptyStack().unshiftAll(value);
  40622. }
  40623. Stack.of = function(/*...values*/) {
  40624. return this(arguments);
  40625. };
  40626. Stack.prototype.toString = function() {
  40627. return this.__toString('Stack [', ']');
  40628. };
  40629. // @pragma Access
  40630. Stack.prototype.get = function(index, notSetValue) {
  40631. var head = this._head;
  40632. index = wrapIndex(this, index);
  40633. while (head && index--) {
  40634. head = head.next;
  40635. }
  40636. return head ? head.value : notSetValue;
  40637. };
  40638. Stack.prototype.peek = function() {
  40639. return this._head && this._head.value;
  40640. };
  40641. // @pragma Modification
  40642. Stack.prototype.push = function(/*...values*/) {
  40643. if (arguments.length === 0) {
  40644. return this;
  40645. }
  40646. var newSize = this.size + arguments.length;
  40647. var head = this._head;
  40648. for (var ii = arguments.length - 1; ii >= 0; ii--) {
  40649. head = {
  40650. value: arguments[ii],
  40651. next: head
  40652. };
  40653. }
  40654. if (this.__ownerID) {
  40655. this.size = newSize;
  40656. this._head = head;
  40657. this.__hash = undefined;
  40658. this.__altered = true;
  40659. return this;
  40660. }
  40661. return makeStack(newSize, head);
  40662. };
  40663. Stack.prototype.pushAll = function(iter) {
  40664. iter = IndexedIterable(iter);
  40665. if (iter.size === 0) {
  40666. return this;
  40667. }
  40668. assertNotInfinite(iter.size);
  40669. var newSize = this.size;
  40670. var head = this._head;
  40671. iter.reverse().forEach(function(value ) {
  40672. newSize++;
  40673. head = {
  40674. value: value,
  40675. next: head
  40676. };
  40677. });
  40678. if (this.__ownerID) {
  40679. this.size = newSize;
  40680. this._head = head;
  40681. this.__hash = undefined;
  40682. this.__altered = true;
  40683. return this;
  40684. }
  40685. return makeStack(newSize, head);
  40686. };
  40687. Stack.prototype.pop = function() {
  40688. return this.slice(1);
  40689. };
  40690. Stack.prototype.unshift = function(/*...values*/) {
  40691. return this.push.apply(this, arguments);
  40692. };
  40693. Stack.prototype.unshiftAll = function(iter) {
  40694. return this.pushAll(iter);
  40695. };
  40696. Stack.prototype.shift = function() {
  40697. return this.pop.apply(this, arguments);
  40698. };
  40699. Stack.prototype.clear = function() {
  40700. if (this.size === 0) {
  40701. return this;
  40702. }
  40703. if (this.__ownerID) {
  40704. this.size = 0;
  40705. this._head = undefined;
  40706. this.__hash = undefined;
  40707. this.__altered = true;
  40708. return this;
  40709. }
  40710. return emptyStack();
  40711. };
  40712. Stack.prototype.slice = function(begin, end) {
  40713. if (wholeSlice(begin, end, this.size)) {
  40714. return this;
  40715. }
  40716. var resolvedBegin = resolveBegin(begin, this.size);
  40717. var resolvedEnd = resolveEnd(end, this.size);
  40718. if (resolvedEnd !== this.size) {
  40719. // super.slice(begin, end);
  40720. return IndexedCollection.prototype.slice.call(this, begin, end);
  40721. }
  40722. var newSize = this.size - resolvedBegin;
  40723. var head = this._head;
  40724. while (resolvedBegin--) {
  40725. head = head.next;
  40726. }
  40727. if (this.__ownerID) {
  40728. this.size = newSize;
  40729. this._head = head;
  40730. this.__hash = undefined;
  40731. this.__altered = true;
  40732. return this;
  40733. }
  40734. return makeStack(newSize, head);
  40735. };
  40736. // @pragma Mutability
  40737. Stack.prototype.__ensureOwner = function(ownerID) {
  40738. if (ownerID === this.__ownerID) {
  40739. return this;
  40740. }
  40741. if (!ownerID) {
  40742. this.__ownerID = ownerID;
  40743. this.__altered = false;
  40744. return this;
  40745. }
  40746. return makeStack(this.size, this._head, ownerID, this.__hash);
  40747. };
  40748. // @pragma Iteration
  40749. Stack.prototype.__iterate = function(fn, reverse) {
  40750. if (reverse) {
  40751. return this.reverse().__iterate(fn);
  40752. }
  40753. var iterations = 0;
  40754. var node = this._head;
  40755. while (node) {
  40756. if (fn(node.value, iterations++, this) === false) {
  40757. break;
  40758. }
  40759. node = node.next;
  40760. }
  40761. return iterations;
  40762. };
  40763. Stack.prototype.__iterator = function(type, reverse) {
  40764. if (reverse) {
  40765. return this.reverse().__iterator(type);
  40766. }
  40767. var iterations = 0;
  40768. var node = this._head;
  40769. return new Iterator(function() {
  40770. if (node) {
  40771. var value = node.value;
  40772. node = node.next;
  40773. return iteratorValue(type, iterations++, value);
  40774. }
  40775. return iteratorDone();
  40776. });
  40777. };
  40778. function isStack(maybeStack) {
  40779. return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);
  40780. }
  40781. Stack.isStack = isStack;
  40782. var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
  40783. var StackPrototype = Stack.prototype;
  40784. StackPrototype[IS_STACK_SENTINEL] = true;
  40785. StackPrototype.withMutations = MapPrototype.withMutations;
  40786. StackPrototype.asMutable = MapPrototype.asMutable;
  40787. StackPrototype.asImmutable = MapPrototype.asImmutable;
  40788. StackPrototype.wasAltered = MapPrototype.wasAltered;
  40789. function makeStack(size, head, ownerID, hash) {
  40790. var map = Object.create(StackPrototype);
  40791. map.size = size;
  40792. map._head = head;
  40793. map.__ownerID = ownerID;
  40794. map.__hash = hash;
  40795. map.__altered = false;
  40796. return map;
  40797. }
  40798. var EMPTY_STACK;
  40799. function emptyStack() {
  40800. return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
  40801. }
  40802. /**
  40803. * Contributes additional methods to a constructor
  40804. */
  40805. function mixin(ctor, methods) {
  40806. var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };
  40807. Object.keys(methods).forEach(keyCopier);
  40808. Object.getOwnPropertySymbols &&
  40809. Object.getOwnPropertySymbols(methods).forEach(keyCopier);
  40810. return ctor;
  40811. }
  40812. Iterable.Iterator = Iterator;
  40813. mixin(Iterable, {
  40814. // ### Conversion to other types
  40815. toArray: function() {
  40816. assertNotInfinite(this.size);
  40817. var array = new Array(this.size || 0);
  40818. this.valueSeq().__iterate(function(v, i) { array[i] = v; });
  40819. return array;
  40820. },
  40821. toIndexedSeq: function() {
  40822. return new ToIndexedSequence(this);
  40823. },
  40824. toJS: function() {
  40825. return this.toSeq().map(
  40826. function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}
  40827. ).__toJS();
  40828. },
  40829. toJSON: function() {
  40830. return this.toSeq().map(
  40831. function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}
  40832. ).__toJS();
  40833. },
  40834. toKeyedSeq: function() {
  40835. return new ToKeyedSequence(this, true);
  40836. },
  40837. toMap: function() {
  40838. // Use Late Binding here to solve the circular dependency.
  40839. return Map(this.toKeyedSeq());
  40840. },
  40841. toObject: function() {
  40842. assertNotInfinite(this.size);
  40843. var object = {};
  40844. this.__iterate(function(v, k) { object[k] = v; });
  40845. return object;
  40846. },
  40847. toOrderedMap: function() {
  40848. // Use Late Binding here to solve the circular dependency.
  40849. return OrderedMap(this.toKeyedSeq());
  40850. },
  40851. toOrderedSet: function() {
  40852. // Use Late Binding here to solve the circular dependency.
  40853. return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
  40854. },
  40855. toSet: function() {
  40856. // Use Late Binding here to solve the circular dependency.
  40857. return Set(isKeyed(this) ? this.valueSeq() : this);
  40858. },
  40859. toSetSeq: function() {
  40860. return new ToSetSequence(this);
  40861. },
  40862. toSeq: function() {
  40863. return isIndexed(this) ? this.toIndexedSeq() :
  40864. isKeyed(this) ? this.toKeyedSeq() :
  40865. this.toSetSeq();
  40866. },
  40867. toStack: function() {
  40868. // Use Late Binding here to solve the circular dependency.
  40869. return Stack(isKeyed(this) ? this.valueSeq() : this);
  40870. },
  40871. toList: function() {
  40872. // Use Late Binding here to solve the circular dependency.
  40873. return List(isKeyed(this) ? this.valueSeq() : this);
  40874. },
  40875. // ### Common JavaScript methods and properties
  40876. toString: function() {
  40877. return '[Iterable]';
  40878. },
  40879. __toString: function(head, tail) {
  40880. if (this.size === 0) {
  40881. return head + tail;
  40882. }
  40883. return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;
  40884. },
  40885. // ### ES6 Collection methods (ES6 Array and Map)
  40886. concat: function() {var values = SLICE$0.call(arguments, 0);
  40887. return reify(this, concatFactory(this, values));
  40888. },
  40889. includes: function(searchValue) {
  40890. return this.some(function(value ) {return is(value, searchValue)});
  40891. },
  40892. entries: function() {
  40893. return this.__iterator(ITERATE_ENTRIES);
  40894. },
  40895. every: function(predicate, context) {
  40896. assertNotInfinite(this.size);
  40897. var returnValue = true;
  40898. this.__iterate(function(v, k, c) {
  40899. if (!predicate.call(context, v, k, c)) {
  40900. returnValue = false;
  40901. return false;
  40902. }
  40903. });
  40904. return returnValue;
  40905. },
  40906. filter: function(predicate, context) {
  40907. return reify(this, filterFactory(this, predicate, context, true));
  40908. },
  40909. find: function(predicate, context, notSetValue) {
  40910. var entry = this.findEntry(predicate, context);
  40911. return entry ? entry[1] : notSetValue;
  40912. },
  40913. forEach: function(sideEffect, context) {
  40914. assertNotInfinite(this.size);
  40915. return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
  40916. },
  40917. join: function(separator) {
  40918. assertNotInfinite(this.size);
  40919. separator = separator !== undefined ? '' + separator : ',';
  40920. var joined = '';
  40921. var isFirst = true;
  40922. this.__iterate(function(v ) {
  40923. isFirst ? (isFirst = false) : (joined += separator);
  40924. joined += v !== null && v !== undefined ? v.toString() : '';
  40925. });
  40926. return joined;
  40927. },
  40928. keys: function() {
  40929. return this.__iterator(ITERATE_KEYS);
  40930. },
  40931. map: function(mapper, context) {
  40932. return reify(this, mapFactory(this, mapper, context));
  40933. },
  40934. reduce: function(reducer, initialReduction, context) {
  40935. assertNotInfinite(this.size);
  40936. var reduction;
  40937. var useFirst;
  40938. if (arguments.length < 2) {
  40939. useFirst = true;
  40940. } else {
  40941. reduction = initialReduction;
  40942. }
  40943. this.__iterate(function(v, k, c) {
  40944. if (useFirst) {
  40945. useFirst = false;
  40946. reduction = v;
  40947. } else {
  40948. reduction = reducer.call(context, reduction, v, k, c);
  40949. }
  40950. });
  40951. return reduction;
  40952. },
  40953. reduceRight: function(reducer, initialReduction, context) {
  40954. var reversed = this.toKeyedSeq().reverse();
  40955. return reversed.reduce.apply(reversed, arguments);
  40956. },
  40957. reverse: function() {
  40958. return reify(this, reverseFactory(this, true));
  40959. },
  40960. slice: function(begin, end) {
  40961. return reify(this, sliceFactory(this, begin, end, true));
  40962. },
  40963. some: function(predicate, context) {
  40964. return !this.every(not(predicate), context);
  40965. },
  40966. sort: function(comparator) {
  40967. return reify(this, sortFactory(this, comparator));
  40968. },
  40969. values: function() {
  40970. return this.__iterator(ITERATE_VALUES);
  40971. },
  40972. // ### More sequential methods
  40973. butLast: function() {
  40974. return this.slice(0, -1);
  40975. },
  40976. isEmpty: function() {
  40977. return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});
  40978. },
  40979. count: function(predicate, context) {
  40980. return ensureSize(
  40981. predicate ? this.toSeq().filter(predicate, context) : this
  40982. );
  40983. },
  40984. countBy: function(grouper, context) {
  40985. return countByFactory(this, grouper, context);
  40986. },
  40987. equals: function(other) {
  40988. return deepEqual(this, other);
  40989. },
  40990. entrySeq: function() {
  40991. var iterable = this;
  40992. if (iterable._cache) {
  40993. // We cache as an entries array, so we can just return the cache!
  40994. return new ArraySeq(iterable._cache);
  40995. }
  40996. var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();
  40997. entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};
  40998. return entriesSequence;
  40999. },
  41000. filterNot: function(predicate, context) {
  41001. return this.filter(not(predicate), context);
  41002. },
  41003. findEntry: function(predicate, context, notSetValue) {
  41004. var found = notSetValue;
  41005. this.__iterate(function(v, k, c) {
  41006. if (predicate.call(context, v, k, c)) {
  41007. found = [k, v];
  41008. return false;
  41009. }
  41010. });
  41011. return found;
  41012. },
  41013. findKey: function(predicate, context) {
  41014. var entry = this.findEntry(predicate, context);
  41015. return entry && entry[0];
  41016. },
  41017. findLast: function(predicate, context, notSetValue) {
  41018. return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
  41019. },
  41020. findLastEntry: function(predicate, context, notSetValue) {
  41021. return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);
  41022. },
  41023. findLastKey: function(predicate, context) {
  41024. return this.toKeyedSeq().reverse().findKey(predicate, context);
  41025. },
  41026. first: function() {
  41027. return this.find(returnTrue);
  41028. },
  41029. flatMap: function(mapper, context) {
  41030. return reify(this, flatMapFactory(this, mapper, context));
  41031. },
  41032. flatten: function(depth) {
  41033. return reify(this, flattenFactory(this, depth, true));
  41034. },
  41035. fromEntrySeq: function() {
  41036. return new FromEntriesSequence(this);
  41037. },
  41038. get: function(searchKey, notSetValue) {
  41039. return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);
  41040. },
  41041. getIn: function(searchKeyPath, notSetValue) {
  41042. var nested = this;
  41043. // Note: in an ES6 environment, we would prefer:
  41044. // for (var key of searchKeyPath) {
  41045. var iter = forceIterator(searchKeyPath);
  41046. var step;
  41047. while (!(step = iter.next()).done) {
  41048. var key = step.value;
  41049. nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;
  41050. if (nested === NOT_SET) {
  41051. return notSetValue;
  41052. }
  41053. }
  41054. return nested;
  41055. },
  41056. groupBy: function(grouper, context) {
  41057. return groupByFactory(this, grouper, context);
  41058. },
  41059. has: function(searchKey) {
  41060. return this.get(searchKey, NOT_SET) !== NOT_SET;
  41061. },
  41062. hasIn: function(searchKeyPath) {
  41063. return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;
  41064. },
  41065. isSubset: function(iter) {
  41066. iter = typeof iter.includes === 'function' ? iter : Iterable(iter);
  41067. return this.every(function(value ) {return iter.includes(value)});
  41068. },
  41069. isSuperset: function(iter) {
  41070. iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);
  41071. return iter.isSubset(this);
  41072. },
  41073. keyOf: function(searchValue) {
  41074. return this.findKey(function(value ) {return is(value, searchValue)});
  41075. },
  41076. keySeq: function() {
  41077. return this.toSeq().map(keyMapper).toIndexedSeq();
  41078. },
  41079. last: function() {
  41080. return this.toSeq().reverse().first();
  41081. },
  41082. lastKeyOf: function(searchValue) {
  41083. return this.toKeyedSeq().reverse().keyOf(searchValue);
  41084. },
  41085. max: function(comparator) {
  41086. return maxFactory(this, comparator);
  41087. },
  41088. maxBy: function(mapper, comparator) {
  41089. return maxFactory(this, comparator, mapper);
  41090. },
  41091. min: function(comparator) {
  41092. return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);
  41093. },
  41094. minBy: function(mapper, comparator) {
  41095. return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);
  41096. },
  41097. rest: function() {
  41098. return this.slice(1);
  41099. },
  41100. skip: function(amount) {
  41101. return this.slice(Math.max(0, amount));
  41102. },
  41103. skipLast: function(amount) {
  41104. return reify(this, this.toSeq().reverse().skip(amount).reverse());
  41105. },
  41106. skipWhile: function(predicate, context) {
  41107. return reify(this, skipWhileFactory(this, predicate, context, true));
  41108. },
  41109. skipUntil: function(predicate, context) {
  41110. return this.skipWhile(not(predicate), context);
  41111. },
  41112. sortBy: function(mapper, comparator) {
  41113. return reify(this, sortFactory(this, comparator, mapper));
  41114. },
  41115. take: function(amount) {
  41116. return this.slice(0, Math.max(0, amount));
  41117. },
  41118. takeLast: function(amount) {
  41119. return reify(this, this.toSeq().reverse().take(amount).reverse());
  41120. },
  41121. takeWhile: function(predicate, context) {
  41122. return reify(this, takeWhileFactory(this, predicate, context));
  41123. },
  41124. takeUntil: function(predicate, context) {
  41125. return this.takeWhile(not(predicate), context);
  41126. },
  41127. valueSeq: function() {
  41128. return this.toIndexedSeq();
  41129. },
  41130. // ### Hashable Object
  41131. hashCode: function() {
  41132. return this.__hash || (this.__hash = hashIterable(this));
  41133. }
  41134. // ### Internal
  41135. // abstract __iterate(fn, reverse)
  41136. // abstract __iterator(type, reverse)
  41137. });
  41138. // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
  41139. // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
  41140. // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
  41141. // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
  41142. var IterablePrototype = Iterable.prototype;
  41143. IterablePrototype[IS_ITERABLE_SENTINEL] = true;
  41144. IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;
  41145. IterablePrototype.__toJS = IterablePrototype.toArray;
  41146. IterablePrototype.__toStringMapper = quoteString;
  41147. IterablePrototype.inspect =
  41148. IterablePrototype.toSource = function() { return this.toString(); };
  41149. IterablePrototype.chain = IterablePrototype.flatMap;
  41150. IterablePrototype.contains = IterablePrototype.includes;
  41151. mixin(KeyedIterable, {
  41152. // ### More sequential methods
  41153. flip: function() {
  41154. return reify(this, flipFactory(this));
  41155. },
  41156. mapEntries: function(mapper, context) {var this$0 = this;
  41157. var iterations = 0;
  41158. return reify(this,
  41159. this.toSeq().map(
  41160. function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}
  41161. ).fromEntrySeq()
  41162. );
  41163. },
  41164. mapKeys: function(mapper, context) {var this$0 = this;
  41165. return reify(this,
  41166. this.toSeq().flip().map(
  41167. function(k, v) {return mapper.call(context, k, v, this$0)}
  41168. ).flip()
  41169. );
  41170. }
  41171. });
  41172. var KeyedIterablePrototype = KeyedIterable.prototype;
  41173. KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;
  41174. KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;
  41175. KeyedIterablePrototype.__toJS = IterablePrototype.toObject;
  41176. KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};
  41177. mixin(IndexedIterable, {
  41178. // ### Conversion to other types
  41179. toKeyedSeq: function() {
  41180. return new ToKeyedSequence(this, false);
  41181. },
  41182. // ### ES6 Collection methods (ES6 Array and Map)
  41183. filter: function(predicate, context) {
  41184. return reify(this, filterFactory(this, predicate, context, false));
  41185. },
  41186. findIndex: function(predicate, context) {
  41187. var entry = this.findEntry(predicate, context);
  41188. return entry ? entry[0] : -1;
  41189. },
  41190. indexOf: function(searchValue) {
  41191. var key = this.keyOf(searchValue);
  41192. return key === undefined ? -1 : key;
  41193. },
  41194. lastIndexOf: function(searchValue) {
  41195. var key = this.lastKeyOf(searchValue);
  41196. return key === undefined ? -1 : key;
  41197. },
  41198. reverse: function() {
  41199. return reify(this, reverseFactory(this, false));
  41200. },
  41201. slice: function(begin, end) {
  41202. return reify(this, sliceFactory(this, begin, end, false));
  41203. },
  41204. splice: function(index, removeNum /*, ...values*/) {
  41205. var numArgs = arguments.length;
  41206. removeNum = Math.max(removeNum | 0, 0);
  41207. if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
  41208. return this;
  41209. }
  41210. // If index is negative, it should resolve relative to the size of the
  41211. // collection. However size may be expensive to compute if not cached, so
  41212. // only call count() if the number is in fact negative.
  41213. index = resolveBegin(index, index < 0 ? this.count() : this.size);
  41214. var spliced = this.slice(0, index);
  41215. return reify(
  41216. this,
  41217. numArgs === 1 ?
  41218. spliced :
  41219. spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
  41220. );
  41221. },
  41222. // ### More collection methods
  41223. findLastIndex: function(predicate, context) {
  41224. var entry = this.findLastEntry(predicate, context);
  41225. return entry ? entry[0] : -1;
  41226. },
  41227. first: function() {
  41228. return this.get(0);
  41229. },
  41230. flatten: function(depth) {
  41231. return reify(this, flattenFactory(this, depth, false));
  41232. },
  41233. get: function(index, notSetValue) {
  41234. index = wrapIndex(this, index);
  41235. return (index < 0 || (this.size === Infinity ||
  41236. (this.size !== undefined && index > this.size))) ?
  41237. notSetValue :
  41238. this.find(function(_, key) {return key === index}, undefined, notSetValue);
  41239. },
  41240. has: function(index) {
  41241. index = wrapIndex(this, index);
  41242. return index >= 0 && (this.size !== undefined ?
  41243. this.size === Infinity || index < this.size :
  41244. this.indexOf(index) !== -1
  41245. );
  41246. },
  41247. interpose: function(separator) {
  41248. return reify(this, interposeFactory(this, separator));
  41249. },
  41250. interleave: function(/*...iterables*/) {
  41251. var iterables = [this].concat(arrCopy(arguments));
  41252. var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);
  41253. var interleaved = zipped.flatten(true);
  41254. if (zipped.size) {
  41255. interleaved.size = zipped.size * iterables.length;
  41256. }
  41257. return reify(this, interleaved);
  41258. },
  41259. keySeq: function() {
  41260. return Range(0, this.size);
  41261. },
  41262. last: function() {
  41263. return this.get(-1);
  41264. },
  41265. skipWhile: function(predicate, context) {
  41266. return reify(this, skipWhileFactory(this, predicate, context, false));
  41267. },
  41268. zip: function(/*, ...iterables */) {
  41269. var iterables = [this].concat(arrCopy(arguments));
  41270. return reify(this, zipWithFactory(this, defaultZipper, iterables));
  41271. },
  41272. zipWith: function(zipper/*, ...iterables */) {
  41273. var iterables = arrCopy(arguments);
  41274. iterables[0] = this;
  41275. return reify(this, zipWithFactory(this, zipper, iterables));
  41276. }
  41277. });
  41278. IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;
  41279. IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;
  41280. mixin(SetIterable, {
  41281. // ### ES6 Collection methods (ES6 Array and Map)
  41282. get: function(value, notSetValue) {
  41283. return this.has(value) ? value : notSetValue;
  41284. },
  41285. includes: function(value) {
  41286. return this.has(value);
  41287. },
  41288. // ### More sequential methods
  41289. keySeq: function() {
  41290. return this.valueSeq();
  41291. }
  41292. });
  41293. SetIterable.prototype.has = IterablePrototype.includes;
  41294. SetIterable.prototype.contains = SetIterable.prototype.includes;
  41295. // Mixin subclasses
  41296. mixin(KeyedSeq, KeyedIterable.prototype);
  41297. mixin(IndexedSeq, IndexedIterable.prototype);
  41298. mixin(SetSeq, SetIterable.prototype);
  41299. mixin(KeyedCollection, KeyedIterable.prototype);
  41300. mixin(IndexedCollection, IndexedIterable.prototype);
  41301. mixin(SetCollection, SetIterable.prototype);
  41302. // #pragma Helper functions
  41303. function keyMapper(v, k) {
  41304. return k;
  41305. }
  41306. function entryMapper(v, k) {
  41307. return [k, v];
  41308. }
  41309. function not(predicate) {
  41310. return function() {
  41311. return !predicate.apply(this, arguments);
  41312. }
  41313. }
  41314. function neg(predicate) {
  41315. return function() {
  41316. return -predicate.apply(this, arguments);
  41317. }
  41318. }
  41319. function quoteString(value) {
  41320. return typeof value === 'string' ? JSON.stringify(value) : String(value);
  41321. }
  41322. function defaultZipper() {
  41323. return arrCopy(arguments);
  41324. }
  41325. function defaultNegComparator(a, b) {
  41326. return a < b ? 1 : a > b ? -1 : 0;
  41327. }
  41328. function hashIterable(iterable) {
  41329. if (iterable.size === Infinity) {
  41330. return 0;
  41331. }
  41332. var ordered = isOrdered(iterable);
  41333. var keyed = isKeyed(iterable);
  41334. var h = ordered ? 1 : 0;
  41335. var size = iterable.__iterate(
  41336. keyed ?
  41337. ordered ?
  41338. function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :
  41339. function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :
  41340. ordered ?
  41341. function(v ) { h = 31 * h + hash(v) | 0; } :
  41342. function(v ) { h = h + hash(v) | 0; }
  41343. );
  41344. return murmurHashOfSize(size, h);
  41345. }
  41346. function murmurHashOfSize(size, h) {
  41347. h = imul(h, 0xCC9E2D51);
  41348. h = imul(h << 15 | h >>> -15, 0x1B873593);
  41349. h = imul(h << 13 | h >>> -13, 5);
  41350. h = (h + 0xE6546B64 | 0) ^ size;
  41351. h = imul(h ^ h >>> 16, 0x85EBCA6B);
  41352. h = imul(h ^ h >>> 13, 0xC2B2AE35);
  41353. h = smi(h ^ h >>> 16);
  41354. return h;
  41355. }
  41356. function hashMerge(a, b) {
  41357. return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int
  41358. }
  41359. var Immutable = {
  41360. Iterable: Iterable,
  41361. Seq: Seq,
  41362. Collection: Collection,
  41363. Map: Map,
  41364. OrderedMap: OrderedMap,
  41365. List: List,
  41366. Stack: Stack,
  41367. Set: Set,
  41368. OrderedSet: OrderedSet,
  41369. Record: Record,
  41370. Range: Range,
  41371. Repeat: Repeat,
  41372. is: is,
  41373. fromJS: fromJS
  41374. };
  41375. return Immutable;
  41376. }));
  41377. /***/ }),
  41378. /***/ 64847:
  41379. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  41380. "use strict";
  41381. var Immutable = __webpack_require__(43393);
  41382. var utils = __webpack_require__(67129);
  41383. var lcs = __webpack_require__(55153);
  41384. var path = __webpack_require__(42472);
  41385. var concatPath = path.concat,
  41386. escape = path.escape,
  41387. op = utils.op,
  41388. isMap = utils.isMap,
  41389. isIndexed = utils.isIndexed;
  41390. var mapDiff = function(a, b, p){
  41391. var ops = [];
  41392. var path = p || '';
  41393. if(Immutable.is(a, b) || (a == b == null)){ return ops; }
  41394. var areLists = isIndexed(a) && isIndexed(b);
  41395. var lastKey = null;
  41396. var removeKey = null
  41397. if(a.forEach){
  41398. a.forEach(function(aValue, aKey){
  41399. if(b.has(aKey)){
  41400. if(isMap(aValue) && isMap(b.get(aKey))){
  41401. ops = ops.concat(mapDiff(aValue, b.get(aKey), concatPath(path, escape(aKey))));
  41402. }
  41403. else if(isIndexed(b.get(aKey)) && isIndexed(aValue)){
  41404. ops = ops.concat(sequenceDiff(aValue, b.get(aKey), concatPath(path, escape(aKey))));
  41405. }
  41406. else {
  41407. var bValue = b.get ? b.get(aKey) : b;
  41408. var areDifferentValues = (aValue !== bValue);
  41409. if (areDifferentValues) {
  41410. ops.push(op('replace', concatPath(path, escape(aKey)), bValue));
  41411. }
  41412. }
  41413. }
  41414. else {
  41415. if(areLists){
  41416. removeKey = (lastKey != null && (lastKey+1) === aKey) ? removeKey : aKey;
  41417. ops.push( op('remove', concatPath(path, escape(removeKey))) );
  41418. lastKey = aKey;
  41419. }
  41420. else{
  41421. ops.push( op('remove', concatPath(path, escape(aKey))) );
  41422. }
  41423. }
  41424. });
  41425. }
  41426. b.forEach(function(bValue, bKey){
  41427. if(a.has && !a.has(bKey)){
  41428. ops.push( op('add', concatPath(path, escape(bKey)), bValue) );
  41429. }
  41430. });
  41431. return ops;
  41432. };
  41433. var sequenceDiff = function (a, b, p) {
  41434. var ops = [];
  41435. var path = p || '';
  41436. if(Immutable.is(a, b) || (a == b == null)){ return ops; }
  41437. if((a.count() + 1) * (b.count() + 1) >= 10000 ) { return mapDiff(a, b, p); }
  41438. var lcsDiff = lcs.diff(a, b);
  41439. var pathIndex = 0;
  41440. lcsDiff.forEach(function (diff) {
  41441. if(diff.op === '='){ pathIndex++; }
  41442. else if(diff.op === '!='){
  41443. if(isMap(diff.val) && isMap(diff.newVal)){
  41444. var mapDiffs = mapDiff(diff.val, diff.newVal, concatPath(path, pathIndex));
  41445. ops = ops.concat(mapDiffs);
  41446. }
  41447. else{
  41448. ops.push(op('replace', concatPath(path, pathIndex), diff.newVal));
  41449. }
  41450. pathIndex++;
  41451. }
  41452. else if(diff.op === '+'){
  41453. ops.push(op('add', concatPath(path, pathIndex), diff.val));
  41454. pathIndex++;
  41455. }
  41456. else if(diff.op === '-'){ ops.push(op('remove', concatPath(path, pathIndex))); }
  41457. });
  41458. return ops;
  41459. };
  41460. var primitiveTypeDiff = function (a, b, p) {
  41461. var path = p || '';
  41462. if(a === b){ return []; }
  41463. else{
  41464. return [ op('replace', concatPath(path, ''), b) ];
  41465. }
  41466. };
  41467. var diff = function(a, b, p){
  41468. if(Immutable.is(a, b)){ return Immutable.List(); }
  41469. if(a != b && (a == null || b == null)){ return Immutable.fromJS([op('replace', '/', b)]); }
  41470. if(isIndexed(a) && isIndexed(b)){
  41471. return Immutable.fromJS(sequenceDiff(a, b));
  41472. }
  41473. else if(isMap(a) && isMap(b)){
  41474. return Immutable.fromJS(mapDiff(a, b));
  41475. }
  41476. else{
  41477. return Immutable.fromJS(primitiveTypeDiff(a, b, p));
  41478. }
  41479. };
  41480. module.exports = diff;
  41481. /***/ }),
  41482. /***/ 55153:
  41483. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  41484. "use strict";
  41485. var Immutable = __webpack_require__(43393);
  41486. /**
  41487. * Returns a two-dimensional array (an array of arrays) with dimensions n by m.
  41488. * All the elements of this new matrix are initially equal to x
  41489. * @param n number of rows
  41490. * @param m number of columns
  41491. * @param x initial element for every item in matrix
  41492. */
  41493. var makeMatrix = function(n, m, x){
  41494. var matrix = [];
  41495. for(var i = 0; i < n; i++) {
  41496. matrix[i] = new Array(m);
  41497. if(x != null){
  41498. for(var j = 0; j < m; j++){
  41499. matrix[i][j] = x;
  41500. }
  41501. }
  41502. }
  41503. return matrix;
  41504. };
  41505. /**
  41506. * Computes Longest Common Subsequence between two Immutable.JS Indexed Iterables
  41507. * Based on Dynamic Programming http://rosettacode.org/wiki/Longest_common_subsequence#Java
  41508. * @param xs ImmutableJS Indexed Sequence 1
  41509. * @param ys ImmutableJS Indexed Sequence 2
  41510. */
  41511. var lcs = function(xs, ys){
  41512. var matrix = computeLcsMatrix(xs, ys);
  41513. return backtrackLcs(xs, ys, matrix);
  41514. };
  41515. var DiffResult = Immutable.Record({op: '=', val: null});
  41516. var ReplaceResult = Immutable.Record({op: '!=', val: null, newVal: null});
  41517. /**
  41518. * Returns the resulting diff operations of LCS between two sequences
  41519. * @param xs Indexed Sequence 1
  41520. * @param ys Indexed Sequence 2
  41521. * @returns Array of DiffResult {op:'=' | '+' | '-', val:any}
  41522. */
  41523. var diff = function(xs, ys){
  41524. var matrix = computeLcsMatrix(xs, ys);
  41525. return printDiff(matrix, xs, ys, xs.size||0, ys.size||0);
  41526. };
  41527. var printDiff = function(matrix, xs, ys, xSize, ySize) {
  41528. var diffArray = [];
  41529. var i = xSize - 1;
  41530. var j = ySize - 1;
  41531. while (i >= 0 || j >= 0) {
  41532. if (i >= 0 && j >= 0 && Immutable.is(xs.get(i), ys.get(j))) {
  41533. diffArray.push(new DiffResult({
  41534. op: '=',
  41535. val: xs.get(i)
  41536. }));
  41537. i -= 1;
  41538. j -= 1;
  41539. }
  41540. else if (i >= 0 && j >= 0 && i === j && !Immutable.is(xs.get(i), ys.get(j))) {
  41541. diffArray.push(new ReplaceResult({
  41542. val: xs.get(i),
  41543. newVal: ys.get(i)
  41544. }));
  41545. i -= 1;
  41546. j -= 1;
  41547. }
  41548. else {
  41549. if (j >= 0 && (i === -1 || matrix[i+1][j] >= matrix[i][j+1])) {
  41550. diffArray.push(new DiffResult({
  41551. op: '+',
  41552. val: ys.get(j)
  41553. }));
  41554. j -= 1;
  41555. }
  41556. else if (i >= 0 && (j === -1 || matrix[i+1][j] < matrix[i][j+1])){
  41557. diffArray.push(new DiffResult({
  41558. op: '-',
  41559. val: xs.get(i)
  41560. }));
  41561. i -= 1;
  41562. }
  41563. }
  41564. }
  41565. return diffArray.reverse();
  41566. };
  41567. /**
  41568. * Computes the Longest Common Subsequence table
  41569. * @param xs Indexed Sequence 1
  41570. * @param ys Indexed Sequence 2
  41571. */
  41572. function computeLcsMatrix(xs, ys) {
  41573. var n = xs.size||0;
  41574. var m = ys.size||0;
  41575. var a = makeMatrix(n + 1, m + 1, 0);
  41576. for (var i = 0; i < n; i++) {
  41577. for (var j = 0; j < m; j++) {
  41578. if (Immutable.is(xs.get(i), ys.get(j))) {
  41579. a[i + 1][j + 1] = a[i][j] + 1;
  41580. }
  41581. else {
  41582. a[i + 1][j + 1] = Math.max(a[i + 1][j], a[i][j + 1]);
  41583. }
  41584. }
  41585. }
  41586. return a;
  41587. }
  41588. /**
  41589. * Extracts a LCS from matrix M
  41590. * @param xs Indexed Sequence 1
  41591. * @param ys Indexed Sequence 2
  41592. * @param matrix LCS Matrix
  41593. * @returns {Array.<T>} Longest Common Subsequence
  41594. */
  41595. var backtrackLcs = function(xs, ys, matrix){
  41596. var lcs = [];
  41597. for(var i = xs.size, j = ys.size; i !== 0 && j !== 0;){
  41598. if (matrix[i][j] === matrix[i-1][j]){ i--; }
  41599. else if (matrix[i][j] === matrix[i][j-1]){ j--; }
  41600. else{
  41601. if(Immutable.is(xs.get(i-1), ys.get(j-1))){
  41602. lcs.push(xs.get(i-1));
  41603. i--;
  41604. j--;
  41605. }
  41606. }
  41607. }
  41608. return lcs.reverse();
  41609. };
  41610. module.exports = {
  41611. lcs: lcs,
  41612. computeLcsMatrix: computeLcsMatrix,
  41613. diff: diff
  41614. };
  41615. /***/ }),
  41616. /***/ 42472:
  41617. /***/ ((module) => {
  41618. "use strict";
  41619. var slashRe = new RegExp('/', 'g');
  41620. var escapedSlashRe = new RegExp('~1', 'g');
  41621. var tildeRe = /~/g;
  41622. var escapedTildeRe = /~0/g;
  41623. var Path = {
  41624. escape: function (str) {
  41625. if(typeof(str) === 'number'){
  41626. return str.toString();
  41627. }
  41628. if(typeof(str) !== 'string'){
  41629. throw 'param str (' + str + ') is not a string';
  41630. }
  41631. return str.replace(tildeRe, '~0').replace(slashRe, '~1');
  41632. },
  41633. unescape: function (str) {
  41634. if(typeof(str) == 'string') {
  41635. return str.replace(escapedSlashRe, '/').replace(escapedTildeRe, '~');
  41636. }
  41637. else {
  41638. return str;
  41639. }
  41640. },
  41641. concat: function(path, key){
  41642. return path + '/' + key;
  41643. }
  41644. };
  41645. module.exports = Path;
  41646. /***/ }),
  41647. /***/ 67129:
  41648. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  41649. "use strict";
  41650. var Immutable = __webpack_require__(43393);
  41651. var isMap = function(obj){ return Immutable.Iterable.isKeyed(obj); };
  41652. var isIndexed = function(obj) { return Immutable.Iterable.isIndexed(obj); };
  41653. var op = function(operation, path, value){
  41654. if(operation === 'remove') { return { op: operation, path: path }; }
  41655. return { op: operation, path: path, value: value };
  41656. };
  41657. module.exports = {
  41658. isMap: isMap,
  41659. isIndexed: isIndexed,
  41660. op: op
  41661. };
  41662. /***/ }),
  41663. /***/ 47180:
  41664. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  41665. "use strict";
  41666. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  41667. /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__)
  41668. /* harmony export */ });
  41669. /* unused harmony exports CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types */
  41670. /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
  41671. function isNothing(subject) {
  41672. return (typeof subject === 'undefined') || (subject === null);
  41673. }
  41674. function isObject(subject) {
  41675. return (typeof subject === 'object') && (subject !== null);
  41676. }
  41677. function toArray(sequence) {
  41678. if (Array.isArray(sequence)) return sequence;
  41679. else if (isNothing(sequence)) return [];
  41680. return [ sequence ];
  41681. }
  41682. function extend(target, source) {
  41683. var index, length, key, sourceKeys;
  41684. if (source) {
  41685. sourceKeys = Object.keys(source);
  41686. for (index = 0, length = sourceKeys.length; index < length; index += 1) {
  41687. key = sourceKeys[index];
  41688. target[key] = source[key];
  41689. }
  41690. }
  41691. return target;
  41692. }
  41693. function repeat(string, count) {
  41694. var result = '', cycle;
  41695. for (cycle = 0; cycle < count; cycle += 1) {
  41696. result += string;
  41697. }
  41698. return result;
  41699. }
  41700. function isNegativeZero(number) {
  41701. return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
  41702. }
  41703. var isNothing_1 = isNothing;
  41704. var isObject_1 = isObject;
  41705. var toArray_1 = toArray;
  41706. var repeat_1 = repeat;
  41707. var isNegativeZero_1 = isNegativeZero;
  41708. var extend_1 = extend;
  41709. var common = {
  41710. isNothing: isNothing_1,
  41711. isObject: isObject_1,
  41712. toArray: toArray_1,
  41713. repeat: repeat_1,
  41714. isNegativeZero: isNegativeZero_1,
  41715. extend: extend_1
  41716. };
  41717. // YAML error class. http://stackoverflow.com/questions/8458984
  41718. function formatError(exception, compact) {
  41719. var where = '', message = exception.reason || '(unknown reason)';
  41720. if (!exception.mark) return message;
  41721. if (exception.mark.name) {
  41722. where += 'in "' + exception.mark.name + '" ';
  41723. }
  41724. where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';
  41725. if (!compact && exception.mark.snippet) {
  41726. where += '\n\n' + exception.mark.snippet;
  41727. }
  41728. return message + ' ' + where;
  41729. }
  41730. function YAMLException$1(reason, mark) {
  41731. // Super constructor
  41732. Error.call(this);
  41733. this.name = 'YAMLException';
  41734. this.reason = reason;
  41735. this.mark = mark;
  41736. this.message = formatError(this, false);
  41737. // Include stack trace in error object
  41738. if (Error.captureStackTrace) {
  41739. // Chrome and NodeJS
  41740. Error.captureStackTrace(this, this.constructor);
  41741. } else {
  41742. // FF, IE 10+ and Safari 6+. Fallback for others
  41743. this.stack = (new Error()).stack || '';
  41744. }
  41745. }
  41746. // Inherit from Error
  41747. YAMLException$1.prototype = Object.create(Error.prototype);
  41748. YAMLException$1.prototype.constructor = YAMLException$1;
  41749. YAMLException$1.prototype.toString = function toString(compact) {
  41750. return this.name + ': ' + formatError(this, compact);
  41751. };
  41752. var exception = YAMLException$1;
  41753. // get snippet for a single line, respecting maxLength
  41754. function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
  41755. var head = '';
  41756. var tail = '';
  41757. var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
  41758. if (position - lineStart > maxHalfLength) {
  41759. head = ' ... ';
  41760. lineStart = position - maxHalfLength + head.length;
  41761. }
  41762. if (lineEnd - position > maxHalfLength) {
  41763. tail = ' ...';
  41764. lineEnd = position + maxHalfLength - tail.length;
  41765. }
  41766. return {
  41767. str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail,
  41768. pos: position - lineStart + head.length // relative position
  41769. };
  41770. }
  41771. function padStart(string, max) {
  41772. return common.repeat(' ', max - string.length) + string;
  41773. }
  41774. function makeSnippet(mark, options) {
  41775. options = Object.create(options || null);
  41776. if (!mark.buffer) return null;
  41777. if (!options.maxLength) options.maxLength = 79;
  41778. if (typeof options.indent !== 'number') options.indent = 1;
  41779. if (typeof options.linesBefore !== 'number') options.linesBefore = 3;
  41780. if (typeof options.linesAfter !== 'number') options.linesAfter = 2;
  41781. var re = /\r?\n|\r|\0/g;
  41782. var lineStarts = [ 0 ];
  41783. var lineEnds = [];
  41784. var match;
  41785. var foundLineNo = -1;
  41786. while ((match = re.exec(mark.buffer))) {
  41787. lineEnds.push(match.index);
  41788. lineStarts.push(match.index + match[0].length);
  41789. if (mark.position <= match.index && foundLineNo < 0) {
  41790. foundLineNo = lineStarts.length - 2;
  41791. }
  41792. }
  41793. if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
  41794. var result = '', i, line;
  41795. var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
  41796. var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
  41797. for (i = 1; i <= options.linesBefore; i++) {
  41798. if (foundLineNo - i < 0) break;
  41799. line = getLine(
  41800. mark.buffer,
  41801. lineStarts[foundLineNo - i],
  41802. lineEnds[foundLineNo - i],
  41803. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
  41804. maxLineLength
  41805. );
  41806. result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +
  41807. ' | ' + line.str + '\n' + result;
  41808. }
  41809. line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
  41810. result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +
  41811. ' | ' + line.str + '\n';
  41812. result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n';
  41813. for (i = 1; i <= options.linesAfter; i++) {
  41814. if (foundLineNo + i >= lineEnds.length) break;
  41815. line = getLine(
  41816. mark.buffer,
  41817. lineStarts[foundLineNo + i],
  41818. lineEnds[foundLineNo + i],
  41819. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
  41820. maxLineLength
  41821. );
  41822. result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +
  41823. ' | ' + line.str + '\n';
  41824. }
  41825. return result.replace(/\n$/, '');
  41826. }
  41827. var snippet = makeSnippet;
  41828. var TYPE_CONSTRUCTOR_OPTIONS = [
  41829. 'kind',
  41830. 'multi',
  41831. 'resolve',
  41832. 'construct',
  41833. 'instanceOf',
  41834. 'predicate',
  41835. 'represent',
  41836. 'representName',
  41837. 'defaultStyle',
  41838. 'styleAliases'
  41839. ];
  41840. var YAML_NODE_KINDS = [
  41841. 'scalar',
  41842. 'sequence',
  41843. 'mapping'
  41844. ];
  41845. function compileStyleAliases(map) {
  41846. var result = {};
  41847. if (map !== null) {
  41848. Object.keys(map).forEach(function (style) {
  41849. map[style].forEach(function (alias) {
  41850. result[String(alias)] = style;
  41851. });
  41852. });
  41853. }
  41854. return result;
  41855. }
  41856. function Type$1(tag, options) {
  41857. options = options || {};
  41858. Object.keys(options).forEach(function (name) {
  41859. if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
  41860. throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
  41861. }
  41862. });
  41863. // TODO: Add tag format check.
  41864. this.options = options; // keep original options in case user wants to extend this type later
  41865. this.tag = tag;
  41866. this.kind = options['kind'] || null;
  41867. this.resolve = options['resolve'] || function () { return true; };
  41868. this.construct = options['construct'] || function (data) { return data; };
  41869. this.instanceOf = options['instanceOf'] || null;
  41870. this.predicate = options['predicate'] || null;
  41871. this.represent = options['represent'] || null;
  41872. this.representName = options['representName'] || null;
  41873. this.defaultStyle = options['defaultStyle'] || null;
  41874. this.multi = options['multi'] || false;
  41875. this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
  41876. if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
  41877. throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
  41878. }
  41879. }
  41880. var type = Type$1;
  41881. /*eslint-disable max-len*/
  41882. function compileList(schema, name) {
  41883. var result = [];
  41884. schema[name].forEach(function (currentType) {
  41885. var newIndex = result.length;
  41886. result.forEach(function (previousType, previousIndex) {
  41887. if (previousType.tag === currentType.tag &&
  41888. previousType.kind === currentType.kind &&
  41889. previousType.multi === currentType.multi) {
  41890. newIndex = previousIndex;
  41891. }
  41892. });
  41893. result[newIndex] = currentType;
  41894. });
  41895. return result;
  41896. }
  41897. function compileMap(/* lists... */) {
  41898. var result = {
  41899. scalar: {},
  41900. sequence: {},
  41901. mapping: {},
  41902. fallback: {},
  41903. multi: {
  41904. scalar: [],
  41905. sequence: [],
  41906. mapping: [],
  41907. fallback: []
  41908. }
  41909. }, index, length;
  41910. function collectType(type) {
  41911. if (type.multi) {
  41912. result.multi[type.kind].push(type);
  41913. result.multi['fallback'].push(type);
  41914. } else {
  41915. result[type.kind][type.tag] = result['fallback'][type.tag] = type;
  41916. }
  41917. }
  41918. for (index = 0, length = arguments.length; index < length; index += 1) {
  41919. arguments[index].forEach(collectType);
  41920. }
  41921. return result;
  41922. }
  41923. function Schema$1(definition) {
  41924. return this.extend(definition);
  41925. }
  41926. Schema$1.prototype.extend = function extend(definition) {
  41927. var implicit = [];
  41928. var explicit = [];
  41929. if (definition instanceof type) {
  41930. // Schema.extend(type)
  41931. explicit.push(definition);
  41932. } else if (Array.isArray(definition)) {
  41933. // Schema.extend([ type1, type2, ... ])
  41934. explicit = explicit.concat(definition);
  41935. } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
  41936. // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
  41937. if (definition.implicit) implicit = implicit.concat(definition.implicit);
  41938. if (definition.explicit) explicit = explicit.concat(definition.explicit);
  41939. } else {
  41940. throw new exception('Schema.extend argument should be a Type, [ Type ], ' +
  41941. 'or a schema definition ({ implicit: [...], explicit: [...] })');
  41942. }
  41943. implicit.forEach(function (type$1) {
  41944. if (!(type$1 instanceof type)) {
  41945. throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');
  41946. }
  41947. if (type$1.loadKind && type$1.loadKind !== 'scalar') {
  41948. throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
  41949. }
  41950. if (type$1.multi) {
  41951. throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');
  41952. }
  41953. });
  41954. explicit.forEach(function (type$1) {
  41955. if (!(type$1 instanceof type)) {
  41956. throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');
  41957. }
  41958. });
  41959. var result = Object.create(Schema$1.prototype);
  41960. result.implicit = (this.implicit || []).concat(implicit);
  41961. result.explicit = (this.explicit || []).concat(explicit);
  41962. result.compiledImplicit = compileList(result, 'implicit');
  41963. result.compiledExplicit = compileList(result, 'explicit');
  41964. result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
  41965. return result;
  41966. };
  41967. var schema = Schema$1;
  41968. var str = new type('tag:yaml.org,2002:str', {
  41969. kind: 'scalar',
  41970. construct: function (data) { return data !== null ? data : ''; }
  41971. });
  41972. var seq = new type('tag:yaml.org,2002:seq', {
  41973. kind: 'sequence',
  41974. construct: function (data) { return data !== null ? data : []; }
  41975. });
  41976. var map = new type('tag:yaml.org,2002:map', {
  41977. kind: 'mapping',
  41978. construct: function (data) { return data !== null ? data : {}; }
  41979. });
  41980. var failsafe = new schema({
  41981. explicit: [
  41982. str,
  41983. seq,
  41984. map
  41985. ]
  41986. });
  41987. function resolveYamlNull(data) {
  41988. if (data === null) return true;
  41989. var max = data.length;
  41990. return (max === 1 && data === '~') ||
  41991. (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
  41992. }
  41993. function constructYamlNull() {
  41994. return null;
  41995. }
  41996. function isNull(object) {
  41997. return object === null;
  41998. }
  41999. var _null = new type('tag:yaml.org,2002:null', {
  42000. kind: 'scalar',
  42001. resolve: resolveYamlNull,
  42002. construct: constructYamlNull,
  42003. predicate: isNull,
  42004. represent: {
  42005. canonical: function () { return '~'; },
  42006. lowercase: function () { return 'null'; },
  42007. uppercase: function () { return 'NULL'; },
  42008. camelcase: function () { return 'Null'; },
  42009. empty: function () { return ''; }
  42010. },
  42011. defaultStyle: 'lowercase'
  42012. });
  42013. function resolveYamlBoolean(data) {
  42014. if (data === null) return false;
  42015. var max = data.length;
  42016. return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
  42017. (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
  42018. }
  42019. function constructYamlBoolean(data) {
  42020. return data === 'true' ||
  42021. data === 'True' ||
  42022. data === 'TRUE';
  42023. }
  42024. function isBoolean(object) {
  42025. return Object.prototype.toString.call(object) === '[object Boolean]';
  42026. }
  42027. var bool = new type('tag:yaml.org,2002:bool', {
  42028. kind: 'scalar',
  42029. resolve: resolveYamlBoolean,
  42030. construct: constructYamlBoolean,
  42031. predicate: isBoolean,
  42032. represent: {
  42033. lowercase: function (object) { return object ? 'true' : 'false'; },
  42034. uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
  42035. camelcase: function (object) { return object ? 'True' : 'False'; }
  42036. },
  42037. defaultStyle: 'lowercase'
  42038. });
  42039. function isHexCode(c) {
  42040. return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
  42041. ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
  42042. ((0x61/* a */ <= c) && (c <= 0x66/* f */));
  42043. }
  42044. function isOctCode(c) {
  42045. return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
  42046. }
  42047. function isDecCode(c) {
  42048. return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
  42049. }
  42050. function resolveYamlInteger(data) {
  42051. if (data === null) return false;
  42052. var max = data.length,
  42053. index = 0,
  42054. hasDigits = false,
  42055. ch;
  42056. if (!max) return false;
  42057. ch = data[index];
  42058. // sign
  42059. if (ch === '-' || ch === '+') {
  42060. ch = data[++index];
  42061. }
  42062. if (ch === '0') {
  42063. // 0
  42064. if (index + 1 === max) return true;
  42065. ch = data[++index];
  42066. // base 2, base 8, base 16
  42067. if (ch === 'b') {
  42068. // base 2
  42069. index++;
  42070. for (; index < max; index++) {
  42071. ch = data[index];
  42072. if (ch === '_') continue;
  42073. if (ch !== '0' && ch !== '1') return false;
  42074. hasDigits = true;
  42075. }
  42076. return hasDigits && ch !== '_';
  42077. }
  42078. if (ch === 'x') {
  42079. // base 16
  42080. index++;
  42081. for (; index < max; index++) {
  42082. ch = data[index];
  42083. if (ch === '_') continue;
  42084. if (!isHexCode(data.charCodeAt(index))) return false;
  42085. hasDigits = true;
  42086. }
  42087. return hasDigits && ch !== '_';
  42088. }
  42089. if (ch === 'o') {
  42090. // base 8
  42091. index++;
  42092. for (; index < max; index++) {
  42093. ch = data[index];
  42094. if (ch === '_') continue;
  42095. if (!isOctCode(data.charCodeAt(index))) return false;
  42096. hasDigits = true;
  42097. }
  42098. return hasDigits && ch !== '_';
  42099. }
  42100. }
  42101. // base 10 (except 0)
  42102. // value should not start with `_`;
  42103. if (ch === '_') return false;
  42104. for (; index < max; index++) {
  42105. ch = data[index];
  42106. if (ch === '_') continue;
  42107. if (!isDecCode(data.charCodeAt(index))) {
  42108. return false;
  42109. }
  42110. hasDigits = true;
  42111. }
  42112. // Should have digits and should not end with `_`
  42113. if (!hasDigits || ch === '_') return false;
  42114. return true;
  42115. }
  42116. function constructYamlInteger(data) {
  42117. var value = data, sign = 1, ch;
  42118. if (value.indexOf('_') !== -1) {
  42119. value = value.replace(/_/g, '');
  42120. }
  42121. ch = value[0];
  42122. if (ch === '-' || ch === '+') {
  42123. if (ch === '-') sign = -1;
  42124. value = value.slice(1);
  42125. ch = value[0];
  42126. }
  42127. if (value === '0') return 0;
  42128. if (ch === '0') {
  42129. if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
  42130. if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);
  42131. if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);
  42132. }
  42133. return sign * parseInt(value, 10);
  42134. }
  42135. function isInteger(object) {
  42136. return (Object.prototype.toString.call(object)) === '[object Number]' &&
  42137. (object % 1 === 0 && !common.isNegativeZero(object));
  42138. }
  42139. var int = new type('tag:yaml.org,2002:int', {
  42140. kind: 'scalar',
  42141. resolve: resolveYamlInteger,
  42142. construct: constructYamlInteger,
  42143. predicate: isInteger,
  42144. represent: {
  42145. binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },
  42146. octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },
  42147. decimal: function (obj) { return obj.toString(10); },
  42148. /* eslint-disable max-len */
  42149. hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }
  42150. },
  42151. defaultStyle: 'decimal',
  42152. styleAliases: {
  42153. binary: [ 2, 'bin' ],
  42154. octal: [ 8, 'oct' ],
  42155. decimal: [ 10, 'dec' ],
  42156. hexadecimal: [ 16, 'hex' ]
  42157. }
  42158. });
  42159. var YAML_FLOAT_PATTERN = new RegExp(
  42160. // 2.5e4, 2.5 and integers
  42161. '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
  42162. // .2e4, .2
  42163. // special case, seems not from spec
  42164. '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
  42165. // .inf
  42166. '|[-+]?\\.(?:inf|Inf|INF)' +
  42167. // .nan
  42168. '|\\.(?:nan|NaN|NAN))$');
  42169. function resolveYamlFloat(data) {
  42170. if (data === null) return false;
  42171. if (!YAML_FLOAT_PATTERN.test(data) ||
  42172. // Quick hack to not allow integers end with `_`
  42173. // Probably should update regexp & check speed
  42174. data[data.length - 1] === '_') {
  42175. return false;
  42176. }
  42177. return true;
  42178. }
  42179. function constructYamlFloat(data) {
  42180. var value, sign;
  42181. value = data.replace(/_/g, '').toLowerCase();
  42182. sign = value[0] === '-' ? -1 : 1;
  42183. if ('+-'.indexOf(value[0]) >= 0) {
  42184. value = value.slice(1);
  42185. }
  42186. if (value === '.inf') {
  42187. return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
  42188. } else if (value === '.nan') {
  42189. return NaN;
  42190. }
  42191. return sign * parseFloat(value, 10);
  42192. }
  42193. var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
  42194. function representYamlFloat(object, style) {
  42195. var res;
  42196. if (isNaN(object)) {
  42197. switch (style) {
  42198. case 'lowercase': return '.nan';
  42199. case 'uppercase': return '.NAN';
  42200. case 'camelcase': return '.NaN';
  42201. }
  42202. } else if (Number.POSITIVE_INFINITY === object) {
  42203. switch (style) {
  42204. case 'lowercase': return '.inf';
  42205. case 'uppercase': return '.INF';
  42206. case 'camelcase': return '.Inf';
  42207. }
  42208. } else if (Number.NEGATIVE_INFINITY === object) {
  42209. switch (style) {
  42210. case 'lowercase': return '-.inf';
  42211. case 'uppercase': return '-.INF';
  42212. case 'camelcase': return '-.Inf';
  42213. }
  42214. } else if (common.isNegativeZero(object)) {
  42215. return '-0.0';
  42216. }
  42217. res = object.toString(10);
  42218. // JS stringifier can build scientific format without dots: 5e-100,
  42219. // while YAML requres dot: 5.e-100. Fix it with simple hack
  42220. return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
  42221. }
  42222. function isFloat(object) {
  42223. return (Object.prototype.toString.call(object) === '[object Number]') &&
  42224. (object % 1 !== 0 || common.isNegativeZero(object));
  42225. }
  42226. var float = new type('tag:yaml.org,2002:float', {
  42227. kind: 'scalar',
  42228. resolve: resolveYamlFloat,
  42229. construct: constructYamlFloat,
  42230. predicate: isFloat,
  42231. represent: representYamlFloat,
  42232. defaultStyle: 'lowercase'
  42233. });
  42234. var json = failsafe.extend({
  42235. implicit: [
  42236. _null,
  42237. bool,
  42238. int,
  42239. float
  42240. ]
  42241. });
  42242. var core = json;
  42243. var YAML_DATE_REGEXP = new RegExp(
  42244. '^([0-9][0-9][0-9][0-9])' + // [1] year
  42245. '-([0-9][0-9])' + // [2] month
  42246. '-([0-9][0-9])$'); // [3] day
  42247. var YAML_TIMESTAMP_REGEXP = new RegExp(
  42248. '^([0-9][0-9][0-9][0-9])' + // [1] year
  42249. '-([0-9][0-9]?)' + // [2] month
  42250. '-([0-9][0-9]?)' + // [3] day
  42251. '(?:[Tt]|[ \\t]+)' + // ...
  42252. '([0-9][0-9]?)' + // [4] hour
  42253. ':([0-9][0-9])' + // [5] minute
  42254. ':([0-9][0-9])' + // [6] second
  42255. '(?:\\.([0-9]*))?' + // [7] fraction
  42256. '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
  42257. '(?::([0-9][0-9]))?))?$'); // [11] tz_minute
  42258. function resolveYamlTimestamp(data) {
  42259. if (data === null) return false;
  42260. if (YAML_DATE_REGEXP.exec(data) !== null) return true;
  42261. if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
  42262. return false;
  42263. }
  42264. function constructYamlTimestamp(data) {
  42265. var match, year, month, day, hour, minute, second, fraction = 0,
  42266. delta = null, tz_hour, tz_minute, date;
  42267. match = YAML_DATE_REGEXP.exec(data);
  42268. if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
  42269. if (match === null) throw new Error('Date resolve error');
  42270. // match: [1] year [2] month [3] day
  42271. year = +(match[1]);
  42272. month = +(match[2]) - 1; // JS month starts with 0
  42273. day = +(match[3]);
  42274. if (!match[4]) { // no hour
  42275. return new Date(Date.UTC(year, month, day));
  42276. }
  42277. // match: [4] hour [5] minute [6] second [7] fraction
  42278. hour = +(match[4]);
  42279. minute = +(match[5]);
  42280. second = +(match[6]);
  42281. if (match[7]) {
  42282. fraction = match[7].slice(0, 3);
  42283. while (fraction.length < 3) { // milli-seconds
  42284. fraction += '0';
  42285. }
  42286. fraction = +fraction;
  42287. }
  42288. // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
  42289. if (match[9]) {
  42290. tz_hour = +(match[10]);
  42291. tz_minute = +(match[11] || 0);
  42292. delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
  42293. if (match[9] === '-') delta = -delta;
  42294. }
  42295. date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
  42296. if (delta) date.setTime(date.getTime() - delta);
  42297. return date;
  42298. }
  42299. function representYamlTimestamp(object /*, style*/) {
  42300. return object.toISOString();
  42301. }
  42302. var timestamp = new type('tag:yaml.org,2002:timestamp', {
  42303. kind: 'scalar',
  42304. resolve: resolveYamlTimestamp,
  42305. construct: constructYamlTimestamp,
  42306. instanceOf: Date,
  42307. represent: representYamlTimestamp
  42308. });
  42309. function resolveYamlMerge(data) {
  42310. return data === '<<' || data === null;
  42311. }
  42312. var merge = new type('tag:yaml.org,2002:merge', {
  42313. kind: 'scalar',
  42314. resolve: resolveYamlMerge
  42315. });
  42316. /*eslint-disable no-bitwise*/
  42317. // [ 64, 65, 66 ] -> [ padding, CR, LF ]
  42318. var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
  42319. function resolveYamlBinary(data) {
  42320. if (data === null) return false;
  42321. var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
  42322. // Convert one by one.
  42323. for (idx = 0; idx < max; idx++) {
  42324. code = map.indexOf(data.charAt(idx));
  42325. // Skip CR/LF
  42326. if (code > 64) continue;
  42327. // Fail on illegal characters
  42328. if (code < 0) return false;
  42329. bitlen += 6;
  42330. }
  42331. // If there are any bits left, source was corrupted
  42332. return (bitlen % 8) === 0;
  42333. }
  42334. function constructYamlBinary(data) {
  42335. var idx, tailbits,
  42336. input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
  42337. max = input.length,
  42338. map = BASE64_MAP,
  42339. bits = 0,
  42340. result = [];
  42341. // Collect by 6*4 bits (3 bytes)
  42342. for (idx = 0; idx < max; idx++) {
  42343. if ((idx % 4 === 0) && idx) {
  42344. result.push((bits >> 16) & 0xFF);
  42345. result.push((bits >> 8) & 0xFF);
  42346. result.push(bits & 0xFF);
  42347. }
  42348. bits = (bits << 6) | map.indexOf(input.charAt(idx));
  42349. }
  42350. // Dump tail
  42351. tailbits = (max % 4) * 6;
  42352. if (tailbits === 0) {
  42353. result.push((bits >> 16) & 0xFF);
  42354. result.push((bits >> 8) & 0xFF);
  42355. result.push(bits & 0xFF);
  42356. } else if (tailbits === 18) {
  42357. result.push((bits >> 10) & 0xFF);
  42358. result.push((bits >> 2) & 0xFF);
  42359. } else if (tailbits === 12) {
  42360. result.push((bits >> 4) & 0xFF);
  42361. }
  42362. return new Uint8Array(result);
  42363. }
  42364. function representYamlBinary(object /*, style*/) {
  42365. var result = '', bits = 0, idx, tail,
  42366. max = object.length,
  42367. map = BASE64_MAP;
  42368. // Convert every three bytes to 4 ASCII characters.
  42369. for (idx = 0; idx < max; idx++) {
  42370. if ((idx % 3 === 0) && idx) {
  42371. result += map[(bits >> 18) & 0x3F];
  42372. result += map[(bits >> 12) & 0x3F];
  42373. result += map[(bits >> 6) & 0x3F];
  42374. result += map[bits & 0x3F];
  42375. }
  42376. bits = (bits << 8) + object[idx];
  42377. }
  42378. // Dump tail
  42379. tail = max % 3;
  42380. if (tail === 0) {
  42381. result += map[(bits >> 18) & 0x3F];
  42382. result += map[(bits >> 12) & 0x3F];
  42383. result += map[(bits >> 6) & 0x3F];
  42384. result += map[bits & 0x3F];
  42385. } else if (tail === 2) {
  42386. result += map[(bits >> 10) & 0x3F];
  42387. result += map[(bits >> 4) & 0x3F];
  42388. result += map[(bits << 2) & 0x3F];
  42389. result += map[64];
  42390. } else if (tail === 1) {
  42391. result += map[(bits >> 2) & 0x3F];
  42392. result += map[(bits << 4) & 0x3F];
  42393. result += map[64];
  42394. result += map[64];
  42395. }
  42396. return result;
  42397. }
  42398. function isBinary(obj) {
  42399. return Object.prototype.toString.call(obj) === '[object Uint8Array]';
  42400. }
  42401. var binary = new type('tag:yaml.org,2002:binary', {
  42402. kind: 'scalar',
  42403. resolve: resolveYamlBinary,
  42404. construct: constructYamlBinary,
  42405. predicate: isBinary,
  42406. represent: representYamlBinary
  42407. });
  42408. var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
  42409. var _toString$2 = Object.prototype.toString;
  42410. function resolveYamlOmap(data) {
  42411. if (data === null) return true;
  42412. var objectKeys = [], index, length, pair, pairKey, pairHasKey,
  42413. object = data;
  42414. for (index = 0, length = object.length; index < length; index += 1) {
  42415. pair = object[index];
  42416. pairHasKey = false;
  42417. if (_toString$2.call(pair) !== '[object Object]') return false;
  42418. for (pairKey in pair) {
  42419. if (_hasOwnProperty$3.call(pair, pairKey)) {
  42420. if (!pairHasKey) pairHasKey = true;
  42421. else return false;
  42422. }
  42423. }
  42424. if (!pairHasKey) return false;
  42425. if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
  42426. else return false;
  42427. }
  42428. return true;
  42429. }
  42430. function constructYamlOmap(data) {
  42431. return data !== null ? data : [];
  42432. }
  42433. var omap = new type('tag:yaml.org,2002:omap', {
  42434. kind: 'sequence',
  42435. resolve: resolveYamlOmap,
  42436. construct: constructYamlOmap
  42437. });
  42438. var _toString$1 = Object.prototype.toString;
  42439. function resolveYamlPairs(data) {
  42440. if (data === null) return true;
  42441. var index, length, pair, keys, result,
  42442. object = data;
  42443. result = new Array(object.length);
  42444. for (index = 0, length = object.length; index < length; index += 1) {
  42445. pair = object[index];
  42446. if (_toString$1.call(pair) !== '[object Object]') return false;
  42447. keys = Object.keys(pair);
  42448. if (keys.length !== 1) return false;
  42449. result[index] = [ keys[0], pair[keys[0]] ];
  42450. }
  42451. return true;
  42452. }
  42453. function constructYamlPairs(data) {
  42454. if (data === null) return [];
  42455. var index, length, pair, keys, result,
  42456. object = data;
  42457. result = new Array(object.length);
  42458. for (index = 0, length = object.length; index < length; index += 1) {
  42459. pair = object[index];
  42460. keys = Object.keys(pair);
  42461. result[index] = [ keys[0], pair[keys[0]] ];
  42462. }
  42463. return result;
  42464. }
  42465. var pairs = new type('tag:yaml.org,2002:pairs', {
  42466. kind: 'sequence',
  42467. resolve: resolveYamlPairs,
  42468. construct: constructYamlPairs
  42469. });
  42470. var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  42471. function resolveYamlSet(data) {
  42472. if (data === null) return true;
  42473. var key, object = data;
  42474. for (key in object) {
  42475. if (_hasOwnProperty$2.call(object, key)) {
  42476. if (object[key] !== null) return false;
  42477. }
  42478. }
  42479. return true;
  42480. }
  42481. function constructYamlSet(data) {
  42482. return data !== null ? data : {};
  42483. }
  42484. var set = new type('tag:yaml.org,2002:set', {
  42485. kind: 'mapping',
  42486. resolve: resolveYamlSet,
  42487. construct: constructYamlSet
  42488. });
  42489. var _default = core.extend({
  42490. implicit: [
  42491. timestamp,
  42492. merge
  42493. ],
  42494. explicit: [
  42495. binary,
  42496. omap,
  42497. pairs,
  42498. set
  42499. ]
  42500. });
  42501. /*eslint-disable max-len,no-use-before-define*/
  42502. var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  42503. var CONTEXT_FLOW_IN = 1;
  42504. var CONTEXT_FLOW_OUT = 2;
  42505. var CONTEXT_BLOCK_IN = 3;
  42506. var CONTEXT_BLOCK_OUT = 4;
  42507. var CHOMPING_CLIP = 1;
  42508. var CHOMPING_STRIP = 2;
  42509. var CHOMPING_KEEP = 3;
  42510. var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
  42511. var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
  42512. var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
  42513. var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
  42514. var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
  42515. function _class(obj) { return Object.prototype.toString.call(obj); }
  42516. function is_EOL(c) {
  42517. return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);
  42518. }
  42519. function is_WHITE_SPACE(c) {
  42520. return (c === 0x09/* Tab */) || (c === 0x20/* Space */);
  42521. }
  42522. function is_WS_OR_EOL(c) {
  42523. return (c === 0x09/* Tab */) ||
  42524. (c === 0x20/* Space */) ||
  42525. (c === 0x0A/* LF */) ||
  42526. (c === 0x0D/* CR */);
  42527. }
  42528. function is_FLOW_INDICATOR(c) {
  42529. return c === 0x2C/* , */ ||
  42530. c === 0x5B/* [ */ ||
  42531. c === 0x5D/* ] */ ||
  42532. c === 0x7B/* { */ ||
  42533. c === 0x7D/* } */;
  42534. }
  42535. function fromHexCode(c) {
  42536. var lc;
  42537. if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
  42538. return c - 0x30;
  42539. }
  42540. /*eslint-disable no-bitwise*/
  42541. lc = c | 0x20;
  42542. if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {
  42543. return lc - 0x61 + 10;
  42544. }
  42545. return -1;
  42546. }
  42547. function escapedHexLen(c) {
  42548. if (c === 0x78/* x */) { return 2; }
  42549. if (c === 0x75/* u */) { return 4; }
  42550. if (c === 0x55/* U */) { return 8; }
  42551. return 0;
  42552. }
  42553. function fromDecimalCode(c) {
  42554. if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
  42555. return c - 0x30;
  42556. }
  42557. return -1;
  42558. }
  42559. function simpleEscapeSequence(c) {
  42560. /* eslint-disable indent */
  42561. return (c === 0x30/* 0 */) ? '\x00' :
  42562. (c === 0x61/* a */) ? '\x07' :
  42563. (c === 0x62/* b */) ? '\x08' :
  42564. (c === 0x74/* t */) ? '\x09' :
  42565. (c === 0x09/* Tab */) ? '\x09' :
  42566. (c === 0x6E/* n */) ? '\x0A' :
  42567. (c === 0x76/* v */) ? '\x0B' :
  42568. (c === 0x66/* f */) ? '\x0C' :
  42569. (c === 0x72/* r */) ? '\x0D' :
  42570. (c === 0x65/* e */) ? '\x1B' :
  42571. (c === 0x20/* Space */) ? ' ' :
  42572. (c === 0x22/* " */) ? '\x22' :
  42573. (c === 0x2F/* / */) ? '/' :
  42574. (c === 0x5C/* \ */) ? '\x5C' :
  42575. (c === 0x4E/* N */) ? '\x85' :
  42576. (c === 0x5F/* _ */) ? '\xA0' :
  42577. (c === 0x4C/* L */) ? '\u2028' :
  42578. (c === 0x50/* P */) ? '\u2029' : '';
  42579. }
  42580. function charFromCodepoint(c) {
  42581. if (c <= 0xFFFF) {
  42582. return String.fromCharCode(c);
  42583. }
  42584. // Encode UTF-16 surrogate pair
  42585. // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
  42586. return String.fromCharCode(
  42587. ((c - 0x010000) >> 10) + 0xD800,
  42588. ((c - 0x010000) & 0x03FF) + 0xDC00
  42589. );
  42590. }
  42591. var simpleEscapeCheck = new Array(256); // integer, for fast access
  42592. var simpleEscapeMap = new Array(256);
  42593. for (var i = 0; i < 256; i++) {
  42594. simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
  42595. simpleEscapeMap[i] = simpleEscapeSequence(i);
  42596. }
  42597. function State$1(input, options) {
  42598. this.input = input;
  42599. this.filename = options['filename'] || null;
  42600. this.schema = options['schema'] || _default;
  42601. this.onWarning = options['onWarning'] || null;
  42602. // (Hidden) Remove? makes the loader to expect YAML 1.1 documents
  42603. // if such documents have no explicit %YAML directive
  42604. this.legacy = options['legacy'] || false;
  42605. this.json = options['json'] || false;
  42606. this.listener = options['listener'] || null;
  42607. this.implicitTypes = this.schema.compiledImplicit;
  42608. this.typeMap = this.schema.compiledTypeMap;
  42609. this.length = input.length;
  42610. this.position = 0;
  42611. this.line = 0;
  42612. this.lineStart = 0;
  42613. this.lineIndent = 0;
  42614. // position of first leading tab in the current line,
  42615. // used to make sure there are no tabs in the indentation
  42616. this.firstTabInLine = -1;
  42617. this.documents = [];
  42618. /*
  42619. this.version;
  42620. this.checkLineBreaks;
  42621. this.tagMap;
  42622. this.anchorMap;
  42623. this.tag;
  42624. this.anchor;
  42625. this.kind;
  42626. this.result;*/
  42627. }
  42628. function generateError(state, message) {
  42629. var mark = {
  42630. name: state.filename,
  42631. buffer: state.input.slice(0, -1), // omit trailing \0
  42632. position: state.position,
  42633. line: state.line,
  42634. column: state.position - state.lineStart
  42635. };
  42636. mark.snippet = snippet(mark);
  42637. return new exception(message, mark);
  42638. }
  42639. function throwError(state, message) {
  42640. throw generateError(state, message);
  42641. }
  42642. function throwWarning(state, message) {
  42643. if (state.onWarning) {
  42644. state.onWarning.call(null, generateError(state, message));
  42645. }
  42646. }
  42647. var directiveHandlers = {
  42648. YAML: function handleYamlDirective(state, name, args) {
  42649. var match, major, minor;
  42650. if (state.version !== null) {
  42651. throwError(state, 'duplication of %YAML directive');
  42652. }
  42653. if (args.length !== 1) {
  42654. throwError(state, 'YAML directive accepts exactly one argument');
  42655. }
  42656. match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
  42657. if (match === null) {
  42658. throwError(state, 'ill-formed argument of the YAML directive');
  42659. }
  42660. major = parseInt(match[1], 10);
  42661. minor = parseInt(match[2], 10);
  42662. if (major !== 1) {
  42663. throwError(state, 'unacceptable YAML version of the document');
  42664. }
  42665. state.version = args[0];
  42666. state.checkLineBreaks = (minor < 2);
  42667. if (minor !== 1 && minor !== 2) {
  42668. throwWarning(state, 'unsupported YAML version of the document');
  42669. }
  42670. },
  42671. TAG: function handleTagDirective(state, name, args) {
  42672. var handle, prefix;
  42673. if (args.length !== 2) {
  42674. throwError(state, 'TAG directive accepts exactly two arguments');
  42675. }
  42676. handle = args[0];
  42677. prefix = args[1];
  42678. if (!PATTERN_TAG_HANDLE.test(handle)) {
  42679. throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');
  42680. }
  42681. if (_hasOwnProperty$1.call(state.tagMap, handle)) {
  42682. throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
  42683. }
  42684. if (!PATTERN_TAG_URI.test(prefix)) {
  42685. throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');
  42686. }
  42687. try {
  42688. prefix = decodeURIComponent(prefix);
  42689. } catch (err) {
  42690. throwError(state, 'tag prefix is malformed: ' + prefix);
  42691. }
  42692. state.tagMap[handle] = prefix;
  42693. }
  42694. };
  42695. function captureSegment(state, start, end, checkJson) {
  42696. var _position, _length, _character, _result;
  42697. if (start < end) {
  42698. _result = state.input.slice(start, end);
  42699. if (checkJson) {
  42700. for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
  42701. _character = _result.charCodeAt(_position);
  42702. if (!(_character === 0x09 ||
  42703. (0x20 <= _character && _character <= 0x10FFFF))) {
  42704. throwError(state, 'expected valid JSON character');
  42705. }
  42706. }
  42707. } else if (PATTERN_NON_PRINTABLE.test(_result)) {
  42708. throwError(state, 'the stream contains non-printable characters');
  42709. }
  42710. state.result += _result;
  42711. }
  42712. }
  42713. function mergeMappings(state, destination, source, overridableKeys) {
  42714. var sourceKeys, key, index, quantity;
  42715. if (!common.isObject(source)) {
  42716. throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
  42717. }
  42718. sourceKeys = Object.keys(source);
  42719. for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
  42720. key = sourceKeys[index];
  42721. if (!_hasOwnProperty$1.call(destination, key)) {
  42722. destination[key] = source[key];
  42723. overridableKeys[key] = true;
  42724. }
  42725. }
  42726. }
  42727. function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,
  42728. startLine, startLineStart, startPos) {
  42729. var index, quantity;
  42730. // The output is a plain object here, so keys can only be strings.
  42731. // We need to convert keyNode to a string, but doing so can hang the process
  42732. // (deeply nested arrays that explode exponentially using aliases).
  42733. if (Array.isArray(keyNode)) {
  42734. keyNode = Array.prototype.slice.call(keyNode);
  42735. for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
  42736. if (Array.isArray(keyNode[index])) {
  42737. throwError(state, 'nested arrays are not supported inside keys');
  42738. }
  42739. if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {
  42740. keyNode[index] = '[object Object]';
  42741. }
  42742. }
  42743. }
  42744. // Avoid code execution in load() via toString property
  42745. // (still use its own toString for arrays, timestamps,
  42746. // and whatever user schema extensions happen to have @@toStringTag)
  42747. if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {
  42748. keyNode = '[object Object]';
  42749. }
  42750. keyNode = String(keyNode);
  42751. if (_result === null) {
  42752. _result = {};
  42753. }
  42754. if (keyTag === 'tag:yaml.org,2002:merge') {
  42755. if (Array.isArray(valueNode)) {
  42756. for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
  42757. mergeMappings(state, _result, valueNode[index], overridableKeys);
  42758. }
  42759. } else {
  42760. mergeMappings(state, _result, valueNode, overridableKeys);
  42761. }
  42762. } else {
  42763. if (!state.json &&
  42764. !_hasOwnProperty$1.call(overridableKeys, keyNode) &&
  42765. _hasOwnProperty$1.call(_result, keyNode)) {
  42766. state.line = startLine || state.line;
  42767. state.lineStart = startLineStart || state.lineStart;
  42768. state.position = startPos || state.position;
  42769. throwError(state, 'duplicated mapping key');
  42770. }
  42771. // used for this specific key only because Object.defineProperty is slow
  42772. if (keyNode === '__proto__') {
  42773. Object.defineProperty(_result, keyNode, {
  42774. configurable: true,
  42775. enumerable: true,
  42776. writable: true,
  42777. value: valueNode
  42778. });
  42779. } else {
  42780. _result[keyNode] = valueNode;
  42781. }
  42782. delete overridableKeys[keyNode];
  42783. }
  42784. return _result;
  42785. }
  42786. function readLineBreak(state) {
  42787. var ch;
  42788. ch = state.input.charCodeAt(state.position);
  42789. if (ch === 0x0A/* LF */) {
  42790. state.position++;
  42791. } else if (ch === 0x0D/* CR */) {
  42792. state.position++;
  42793. if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
  42794. state.position++;
  42795. }
  42796. } else {
  42797. throwError(state, 'a line break is expected');
  42798. }
  42799. state.line += 1;
  42800. state.lineStart = state.position;
  42801. state.firstTabInLine = -1;
  42802. }
  42803. function skipSeparationSpace(state, allowComments, checkIndent) {
  42804. var lineBreaks = 0,
  42805. ch = state.input.charCodeAt(state.position);
  42806. while (ch !== 0) {
  42807. while (is_WHITE_SPACE(ch)) {
  42808. if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {
  42809. state.firstTabInLine = state.position;
  42810. }
  42811. ch = state.input.charCodeAt(++state.position);
  42812. }
  42813. if (allowComments && ch === 0x23/* # */) {
  42814. do {
  42815. ch = state.input.charCodeAt(++state.position);
  42816. } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);
  42817. }
  42818. if (is_EOL(ch)) {
  42819. readLineBreak(state);
  42820. ch = state.input.charCodeAt(state.position);
  42821. lineBreaks++;
  42822. state.lineIndent = 0;
  42823. while (ch === 0x20/* Space */) {
  42824. state.lineIndent++;
  42825. ch = state.input.charCodeAt(++state.position);
  42826. }
  42827. } else {
  42828. break;
  42829. }
  42830. }
  42831. if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
  42832. throwWarning(state, 'deficient indentation');
  42833. }
  42834. return lineBreaks;
  42835. }
  42836. function testDocumentSeparator(state) {
  42837. var _position = state.position,
  42838. ch;
  42839. ch = state.input.charCodeAt(_position);
  42840. // Condition state.position === state.lineStart is tested
  42841. // in parent on each call, for efficiency. No needs to test here again.
  42842. if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
  42843. ch === state.input.charCodeAt(_position + 1) &&
  42844. ch === state.input.charCodeAt(_position + 2)) {
  42845. _position += 3;
  42846. ch = state.input.charCodeAt(_position);
  42847. if (ch === 0 || is_WS_OR_EOL(ch)) {
  42848. return true;
  42849. }
  42850. }
  42851. return false;
  42852. }
  42853. function writeFoldedLines(state, count) {
  42854. if (count === 1) {
  42855. state.result += ' ';
  42856. } else if (count > 1) {
  42857. state.result += common.repeat('\n', count - 1);
  42858. }
  42859. }
  42860. function readPlainScalar(state, nodeIndent, withinFlowCollection) {
  42861. var preceding,
  42862. following,
  42863. captureStart,
  42864. captureEnd,
  42865. hasPendingContent,
  42866. _line,
  42867. _lineStart,
  42868. _lineIndent,
  42869. _kind = state.kind,
  42870. _result = state.result,
  42871. ch;
  42872. ch = state.input.charCodeAt(state.position);
  42873. if (is_WS_OR_EOL(ch) ||
  42874. is_FLOW_INDICATOR(ch) ||
  42875. ch === 0x23/* # */ ||
  42876. ch === 0x26/* & */ ||
  42877. ch === 0x2A/* * */ ||
  42878. ch === 0x21/* ! */ ||
  42879. ch === 0x7C/* | */ ||
  42880. ch === 0x3E/* > */ ||
  42881. ch === 0x27/* ' */ ||
  42882. ch === 0x22/* " */ ||
  42883. ch === 0x25/* % */ ||
  42884. ch === 0x40/* @ */ ||
  42885. ch === 0x60/* ` */) {
  42886. return false;
  42887. }
  42888. if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
  42889. following = state.input.charCodeAt(state.position + 1);
  42890. if (is_WS_OR_EOL(following) ||
  42891. withinFlowCollection && is_FLOW_INDICATOR(following)) {
  42892. return false;
  42893. }
  42894. }
  42895. state.kind = 'scalar';
  42896. state.result = '';
  42897. captureStart = captureEnd = state.position;
  42898. hasPendingContent = false;
  42899. while (ch !== 0) {
  42900. if (ch === 0x3A/* : */) {
  42901. following = state.input.charCodeAt(state.position + 1);
  42902. if (is_WS_OR_EOL(following) ||
  42903. withinFlowCollection && is_FLOW_INDICATOR(following)) {
  42904. break;
  42905. }
  42906. } else if (ch === 0x23/* # */) {
  42907. preceding = state.input.charCodeAt(state.position - 1);
  42908. if (is_WS_OR_EOL(preceding)) {
  42909. break;
  42910. }
  42911. } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
  42912. withinFlowCollection && is_FLOW_INDICATOR(ch)) {
  42913. break;
  42914. } else if (is_EOL(ch)) {
  42915. _line = state.line;
  42916. _lineStart = state.lineStart;
  42917. _lineIndent = state.lineIndent;
  42918. skipSeparationSpace(state, false, -1);
  42919. if (state.lineIndent >= nodeIndent) {
  42920. hasPendingContent = true;
  42921. ch = state.input.charCodeAt(state.position);
  42922. continue;
  42923. } else {
  42924. state.position = captureEnd;
  42925. state.line = _line;
  42926. state.lineStart = _lineStart;
  42927. state.lineIndent = _lineIndent;
  42928. break;
  42929. }
  42930. }
  42931. if (hasPendingContent) {
  42932. captureSegment(state, captureStart, captureEnd, false);
  42933. writeFoldedLines(state, state.line - _line);
  42934. captureStart = captureEnd = state.position;
  42935. hasPendingContent = false;
  42936. }
  42937. if (!is_WHITE_SPACE(ch)) {
  42938. captureEnd = state.position + 1;
  42939. }
  42940. ch = state.input.charCodeAt(++state.position);
  42941. }
  42942. captureSegment(state, captureStart, captureEnd, false);
  42943. if (state.result) {
  42944. return true;
  42945. }
  42946. state.kind = _kind;
  42947. state.result = _result;
  42948. return false;
  42949. }
  42950. function readSingleQuotedScalar(state, nodeIndent) {
  42951. var ch,
  42952. captureStart, captureEnd;
  42953. ch = state.input.charCodeAt(state.position);
  42954. if (ch !== 0x27/* ' */) {
  42955. return false;
  42956. }
  42957. state.kind = 'scalar';
  42958. state.result = '';
  42959. state.position++;
  42960. captureStart = captureEnd = state.position;
  42961. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  42962. if (ch === 0x27/* ' */) {
  42963. captureSegment(state, captureStart, state.position, true);
  42964. ch = state.input.charCodeAt(++state.position);
  42965. if (ch === 0x27/* ' */) {
  42966. captureStart = state.position;
  42967. state.position++;
  42968. captureEnd = state.position;
  42969. } else {
  42970. return true;
  42971. }
  42972. } else if (is_EOL(ch)) {
  42973. captureSegment(state, captureStart, captureEnd, true);
  42974. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  42975. captureStart = captureEnd = state.position;
  42976. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  42977. throwError(state, 'unexpected end of the document within a single quoted scalar');
  42978. } else {
  42979. state.position++;
  42980. captureEnd = state.position;
  42981. }
  42982. }
  42983. throwError(state, 'unexpected end of the stream within a single quoted scalar');
  42984. }
  42985. function readDoubleQuotedScalar(state, nodeIndent) {
  42986. var captureStart,
  42987. captureEnd,
  42988. hexLength,
  42989. hexResult,
  42990. tmp,
  42991. ch;
  42992. ch = state.input.charCodeAt(state.position);
  42993. if (ch !== 0x22/* " */) {
  42994. return false;
  42995. }
  42996. state.kind = 'scalar';
  42997. state.result = '';
  42998. state.position++;
  42999. captureStart = captureEnd = state.position;
  43000. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  43001. if (ch === 0x22/* " */) {
  43002. captureSegment(state, captureStart, state.position, true);
  43003. state.position++;
  43004. return true;
  43005. } else if (ch === 0x5C/* \ */) {
  43006. captureSegment(state, captureStart, state.position, true);
  43007. ch = state.input.charCodeAt(++state.position);
  43008. if (is_EOL(ch)) {
  43009. skipSeparationSpace(state, false, nodeIndent);
  43010. // TODO: rework to inline fn with no type cast?
  43011. } else if (ch < 256 && simpleEscapeCheck[ch]) {
  43012. state.result += simpleEscapeMap[ch];
  43013. state.position++;
  43014. } else if ((tmp = escapedHexLen(ch)) > 0) {
  43015. hexLength = tmp;
  43016. hexResult = 0;
  43017. for (; hexLength > 0; hexLength--) {
  43018. ch = state.input.charCodeAt(++state.position);
  43019. if ((tmp = fromHexCode(ch)) >= 0) {
  43020. hexResult = (hexResult << 4) + tmp;
  43021. } else {
  43022. throwError(state, 'expected hexadecimal character');
  43023. }
  43024. }
  43025. state.result += charFromCodepoint(hexResult);
  43026. state.position++;
  43027. } else {
  43028. throwError(state, 'unknown escape sequence');
  43029. }
  43030. captureStart = captureEnd = state.position;
  43031. } else if (is_EOL(ch)) {
  43032. captureSegment(state, captureStart, captureEnd, true);
  43033. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  43034. captureStart = captureEnd = state.position;
  43035. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  43036. throwError(state, 'unexpected end of the document within a double quoted scalar');
  43037. } else {
  43038. state.position++;
  43039. captureEnd = state.position;
  43040. }
  43041. }
  43042. throwError(state, 'unexpected end of the stream within a double quoted scalar');
  43043. }
  43044. function readFlowCollection(state, nodeIndent) {
  43045. var readNext = true,
  43046. _line,
  43047. _lineStart,
  43048. _pos,
  43049. _tag = state.tag,
  43050. _result,
  43051. _anchor = state.anchor,
  43052. following,
  43053. terminator,
  43054. isPair,
  43055. isExplicitPair,
  43056. isMapping,
  43057. overridableKeys = Object.create(null),
  43058. keyNode,
  43059. keyTag,
  43060. valueNode,
  43061. ch;
  43062. ch = state.input.charCodeAt(state.position);
  43063. if (ch === 0x5B/* [ */) {
  43064. terminator = 0x5D;/* ] */
  43065. isMapping = false;
  43066. _result = [];
  43067. } else if (ch === 0x7B/* { */) {
  43068. terminator = 0x7D;/* } */
  43069. isMapping = true;
  43070. _result = {};
  43071. } else {
  43072. return false;
  43073. }
  43074. if (state.anchor !== null) {
  43075. state.anchorMap[state.anchor] = _result;
  43076. }
  43077. ch = state.input.charCodeAt(++state.position);
  43078. while (ch !== 0) {
  43079. skipSeparationSpace(state, true, nodeIndent);
  43080. ch = state.input.charCodeAt(state.position);
  43081. if (ch === terminator) {
  43082. state.position++;
  43083. state.tag = _tag;
  43084. state.anchor = _anchor;
  43085. state.kind = isMapping ? 'mapping' : 'sequence';
  43086. state.result = _result;
  43087. return true;
  43088. } else if (!readNext) {
  43089. throwError(state, 'missed comma between flow collection entries');
  43090. } else if (ch === 0x2C/* , */) {
  43091. // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4
  43092. throwError(state, "expected the node content, but found ','");
  43093. }
  43094. keyTag = keyNode = valueNode = null;
  43095. isPair = isExplicitPair = false;
  43096. if (ch === 0x3F/* ? */) {
  43097. following = state.input.charCodeAt(state.position + 1);
  43098. if (is_WS_OR_EOL(following)) {
  43099. isPair = isExplicitPair = true;
  43100. state.position++;
  43101. skipSeparationSpace(state, true, nodeIndent);
  43102. }
  43103. }
  43104. _line = state.line; // Save the current line.
  43105. _lineStart = state.lineStart;
  43106. _pos = state.position;
  43107. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  43108. keyTag = state.tag;
  43109. keyNode = state.result;
  43110. skipSeparationSpace(state, true, nodeIndent);
  43111. ch = state.input.charCodeAt(state.position);
  43112. if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
  43113. isPair = true;
  43114. ch = state.input.charCodeAt(++state.position);
  43115. skipSeparationSpace(state, true, nodeIndent);
  43116. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  43117. valueNode = state.result;
  43118. }
  43119. if (isMapping) {
  43120. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
  43121. } else if (isPair) {
  43122. _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
  43123. } else {
  43124. _result.push(keyNode);
  43125. }
  43126. skipSeparationSpace(state, true, nodeIndent);
  43127. ch = state.input.charCodeAt(state.position);
  43128. if (ch === 0x2C/* , */) {
  43129. readNext = true;
  43130. ch = state.input.charCodeAt(++state.position);
  43131. } else {
  43132. readNext = false;
  43133. }
  43134. }
  43135. throwError(state, 'unexpected end of the stream within a flow collection');
  43136. }
  43137. function readBlockScalar(state, nodeIndent) {
  43138. var captureStart,
  43139. folding,
  43140. chomping = CHOMPING_CLIP,
  43141. didReadContent = false,
  43142. detectedIndent = false,
  43143. textIndent = nodeIndent,
  43144. emptyLines = 0,
  43145. atMoreIndented = false,
  43146. tmp,
  43147. ch;
  43148. ch = state.input.charCodeAt(state.position);
  43149. if (ch === 0x7C/* | */) {
  43150. folding = false;
  43151. } else if (ch === 0x3E/* > */) {
  43152. folding = true;
  43153. } else {
  43154. return false;
  43155. }
  43156. state.kind = 'scalar';
  43157. state.result = '';
  43158. while (ch !== 0) {
  43159. ch = state.input.charCodeAt(++state.position);
  43160. if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
  43161. if (CHOMPING_CLIP === chomping) {
  43162. chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;
  43163. } else {
  43164. throwError(state, 'repeat of a chomping mode identifier');
  43165. }
  43166. } else if ((tmp = fromDecimalCode(ch)) >= 0) {
  43167. if (tmp === 0) {
  43168. throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
  43169. } else if (!detectedIndent) {
  43170. textIndent = nodeIndent + tmp - 1;
  43171. detectedIndent = true;
  43172. } else {
  43173. throwError(state, 'repeat of an indentation width identifier');
  43174. }
  43175. } else {
  43176. break;
  43177. }
  43178. }
  43179. if (is_WHITE_SPACE(ch)) {
  43180. do { ch = state.input.charCodeAt(++state.position); }
  43181. while (is_WHITE_SPACE(ch));
  43182. if (ch === 0x23/* # */) {
  43183. do { ch = state.input.charCodeAt(++state.position); }
  43184. while (!is_EOL(ch) && (ch !== 0));
  43185. }
  43186. }
  43187. while (ch !== 0) {
  43188. readLineBreak(state);
  43189. state.lineIndent = 0;
  43190. ch = state.input.charCodeAt(state.position);
  43191. while ((!detectedIndent || state.lineIndent < textIndent) &&
  43192. (ch === 0x20/* Space */)) {
  43193. state.lineIndent++;
  43194. ch = state.input.charCodeAt(++state.position);
  43195. }
  43196. if (!detectedIndent && state.lineIndent > textIndent) {
  43197. textIndent = state.lineIndent;
  43198. }
  43199. if (is_EOL(ch)) {
  43200. emptyLines++;
  43201. continue;
  43202. }
  43203. // End of the scalar.
  43204. if (state.lineIndent < textIndent) {
  43205. // Perform the chomping.
  43206. if (chomping === CHOMPING_KEEP) {
  43207. state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
  43208. } else if (chomping === CHOMPING_CLIP) {
  43209. if (didReadContent) { // i.e. only if the scalar is not empty.
  43210. state.result += '\n';
  43211. }
  43212. }
  43213. // Break this `while` cycle and go to the funciton's epilogue.
  43214. break;
  43215. }
  43216. // Folded style: use fancy rules to handle line breaks.
  43217. if (folding) {
  43218. // Lines starting with white space characters (more-indented lines) are not folded.
  43219. if (is_WHITE_SPACE(ch)) {
  43220. atMoreIndented = true;
  43221. // except for the first content line (cf. Example 8.1)
  43222. state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
  43223. // End of more-indented block.
  43224. } else if (atMoreIndented) {
  43225. atMoreIndented = false;
  43226. state.result += common.repeat('\n', emptyLines + 1);
  43227. // Just one line break - perceive as the same line.
  43228. } else if (emptyLines === 0) {
  43229. if (didReadContent) { // i.e. only if we have already read some scalar content.
  43230. state.result += ' ';
  43231. }
  43232. // Several line breaks - perceive as different lines.
  43233. } else {
  43234. state.result += common.repeat('\n', emptyLines);
  43235. }
  43236. // Literal style: just add exact number of line breaks between content lines.
  43237. } else {
  43238. // Keep all line breaks except the header line break.
  43239. state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
  43240. }
  43241. didReadContent = true;
  43242. detectedIndent = true;
  43243. emptyLines = 0;
  43244. captureStart = state.position;
  43245. while (!is_EOL(ch) && (ch !== 0)) {
  43246. ch = state.input.charCodeAt(++state.position);
  43247. }
  43248. captureSegment(state, captureStart, state.position, false);
  43249. }
  43250. return true;
  43251. }
  43252. function readBlockSequence(state, nodeIndent) {
  43253. var _line,
  43254. _tag = state.tag,
  43255. _anchor = state.anchor,
  43256. _result = [],
  43257. following,
  43258. detected = false,
  43259. ch;
  43260. // there is a leading tab before this token, so it can't be a block sequence/mapping;
  43261. // it can still be flow sequence/mapping or a scalar
  43262. if (state.firstTabInLine !== -1) return false;
  43263. if (state.anchor !== null) {
  43264. state.anchorMap[state.anchor] = _result;
  43265. }
  43266. ch = state.input.charCodeAt(state.position);
  43267. while (ch !== 0) {
  43268. if (state.firstTabInLine !== -1) {
  43269. state.position = state.firstTabInLine;
  43270. throwError(state, 'tab characters must not be used in indentation');
  43271. }
  43272. if (ch !== 0x2D/* - */) {
  43273. break;
  43274. }
  43275. following = state.input.charCodeAt(state.position + 1);
  43276. if (!is_WS_OR_EOL(following)) {
  43277. break;
  43278. }
  43279. detected = true;
  43280. state.position++;
  43281. if (skipSeparationSpace(state, true, -1)) {
  43282. if (state.lineIndent <= nodeIndent) {
  43283. _result.push(null);
  43284. ch = state.input.charCodeAt(state.position);
  43285. continue;
  43286. }
  43287. }
  43288. _line = state.line;
  43289. composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
  43290. _result.push(state.result);
  43291. skipSeparationSpace(state, true, -1);
  43292. ch = state.input.charCodeAt(state.position);
  43293. if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
  43294. throwError(state, 'bad indentation of a sequence entry');
  43295. } else if (state.lineIndent < nodeIndent) {
  43296. break;
  43297. }
  43298. }
  43299. if (detected) {
  43300. state.tag = _tag;
  43301. state.anchor = _anchor;
  43302. state.kind = 'sequence';
  43303. state.result = _result;
  43304. return true;
  43305. }
  43306. return false;
  43307. }
  43308. function readBlockMapping(state, nodeIndent, flowIndent) {
  43309. var following,
  43310. allowCompact,
  43311. _line,
  43312. _keyLine,
  43313. _keyLineStart,
  43314. _keyPos,
  43315. _tag = state.tag,
  43316. _anchor = state.anchor,
  43317. _result = {},
  43318. overridableKeys = Object.create(null),
  43319. keyTag = null,
  43320. keyNode = null,
  43321. valueNode = null,
  43322. atExplicitKey = false,
  43323. detected = false,
  43324. ch;
  43325. // there is a leading tab before this token, so it can't be a block sequence/mapping;
  43326. // it can still be flow sequence/mapping or a scalar
  43327. if (state.firstTabInLine !== -1) return false;
  43328. if (state.anchor !== null) {
  43329. state.anchorMap[state.anchor] = _result;
  43330. }
  43331. ch = state.input.charCodeAt(state.position);
  43332. while (ch !== 0) {
  43333. if (!atExplicitKey && state.firstTabInLine !== -1) {
  43334. state.position = state.firstTabInLine;
  43335. throwError(state, 'tab characters must not be used in indentation');
  43336. }
  43337. following = state.input.charCodeAt(state.position + 1);
  43338. _line = state.line; // Save the current line.
  43339. //
  43340. // Explicit notation case. There are two separate blocks:
  43341. // first for the key (denoted by "?") and second for the value (denoted by ":")
  43342. //
  43343. if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {
  43344. if (ch === 0x3F/* ? */) {
  43345. if (atExplicitKey) {
  43346. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  43347. keyTag = keyNode = valueNode = null;
  43348. }
  43349. detected = true;
  43350. atExplicitKey = true;
  43351. allowCompact = true;
  43352. } else if (atExplicitKey) {
  43353. // i.e. 0x3A/* : */ === character after the explicit key.
  43354. atExplicitKey = false;
  43355. allowCompact = true;
  43356. } else {
  43357. throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
  43358. }
  43359. state.position += 1;
  43360. ch = following;
  43361. //
  43362. // Implicit notation case. Flow-style node as the key first, then ":", and the value.
  43363. //
  43364. } else {
  43365. _keyLine = state.line;
  43366. _keyLineStart = state.lineStart;
  43367. _keyPos = state.position;
  43368. if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
  43369. // Neither implicit nor explicit notation.
  43370. // Reading is done. Go to the epilogue.
  43371. break;
  43372. }
  43373. if (state.line === _line) {
  43374. ch = state.input.charCodeAt(state.position);
  43375. while (is_WHITE_SPACE(ch)) {
  43376. ch = state.input.charCodeAt(++state.position);
  43377. }
  43378. if (ch === 0x3A/* : */) {
  43379. ch = state.input.charCodeAt(++state.position);
  43380. if (!is_WS_OR_EOL(ch)) {
  43381. throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');
  43382. }
  43383. if (atExplicitKey) {
  43384. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  43385. keyTag = keyNode = valueNode = null;
  43386. }
  43387. detected = true;
  43388. atExplicitKey = false;
  43389. allowCompact = false;
  43390. keyTag = state.tag;
  43391. keyNode = state.result;
  43392. } else if (detected) {
  43393. throwError(state, 'can not read an implicit mapping pair; a colon is missed');
  43394. } else {
  43395. state.tag = _tag;
  43396. state.anchor = _anchor;
  43397. return true; // Keep the result of `composeNode`.
  43398. }
  43399. } else if (detected) {
  43400. throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');
  43401. } else {
  43402. state.tag = _tag;
  43403. state.anchor = _anchor;
  43404. return true; // Keep the result of `composeNode`.
  43405. }
  43406. }
  43407. //
  43408. // Common reading code for both explicit and implicit notations.
  43409. //
  43410. if (state.line === _line || state.lineIndent > nodeIndent) {
  43411. if (atExplicitKey) {
  43412. _keyLine = state.line;
  43413. _keyLineStart = state.lineStart;
  43414. _keyPos = state.position;
  43415. }
  43416. if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
  43417. if (atExplicitKey) {
  43418. keyNode = state.result;
  43419. } else {
  43420. valueNode = state.result;
  43421. }
  43422. }
  43423. if (!atExplicitKey) {
  43424. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
  43425. keyTag = keyNode = valueNode = null;
  43426. }
  43427. skipSeparationSpace(state, true, -1);
  43428. ch = state.input.charCodeAt(state.position);
  43429. }
  43430. if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
  43431. throwError(state, 'bad indentation of a mapping entry');
  43432. } else if (state.lineIndent < nodeIndent) {
  43433. break;
  43434. }
  43435. }
  43436. //
  43437. // Epilogue.
  43438. //
  43439. // Special case: last mapping's node contains only the key in explicit notation.
  43440. if (atExplicitKey) {
  43441. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  43442. }
  43443. // Expose the resulting mapping.
  43444. if (detected) {
  43445. state.tag = _tag;
  43446. state.anchor = _anchor;
  43447. state.kind = 'mapping';
  43448. state.result = _result;
  43449. }
  43450. return detected;
  43451. }
  43452. function readTagProperty(state) {
  43453. var _position,
  43454. isVerbatim = false,
  43455. isNamed = false,
  43456. tagHandle,
  43457. tagName,
  43458. ch;
  43459. ch = state.input.charCodeAt(state.position);
  43460. if (ch !== 0x21/* ! */) return false;
  43461. if (state.tag !== null) {
  43462. throwError(state, 'duplication of a tag property');
  43463. }
  43464. ch = state.input.charCodeAt(++state.position);
  43465. if (ch === 0x3C/* < */) {
  43466. isVerbatim = true;
  43467. ch = state.input.charCodeAt(++state.position);
  43468. } else if (ch === 0x21/* ! */) {
  43469. isNamed = true;
  43470. tagHandle = '!!';
  43471. ch = state.input.charCodeAt(++state.position);
  43472. } else {
  43473. tagHandle = '!';
  43474. }
  43475. _position = state.position;
  43476. if (isVerbatim) {
  43477. do { ch = state.input.charCodeAt(++state.position); }
  43478. while (ch !== 0 && ch !== 0x3E/* > */);
  43479. if (state.position < state.length) {
  43480. tagName = state.input.slice(_position, state.position);
  43481. ch = state.input.charCodeAt(++state.position);
  43482. } else {
  43483. throwError(state, 'unexpected end of the stream within a verbatim tag');
  43484. }
  43485. } else {
  43486. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  43487. if (ch === 0x21/* ! */) {
  43488. if (!isNamed) {
  43489. tagHandle = state.input.slice(_position - 1, state.position + 1);
  43490. if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
  43491. throwError(state, 'named tag handle cannot contain such characters');
  43492. }
  43493. isNamed = true;
  43494. _position = state.position + 1;
  43495. } else {
  43496. throwError(state, 'tag suffix cannot contain exclamation marks');
  43497. }
  43498. }
  43499. ch = state.input.charCodeAt(++state.position);
  43500. }
  43501. tagName = state.input.slice(_position, state.position);
  43502. if (PATTERN_FLOW_INDICATORS.test(tagName)) {
  43503. throwError(state, 'tag suffix cannot contain flow indicator characters');
  43504. }
  43505. }
  43506. if (tagName && !PATTERN_TAG_URI.test(tagName)) {
  43507. throwError(state, 'tag name cannot contain such characters: ' + tagName);
  43508. }
  43509. try {
  43510. tagName = decodeURIComponent(tagName);
  43511. } catch (err) {
  43512. throwError(state, 'tag name is malformed: ' + tagName);
  43513. }
  43514. if (isVerbatim) {
  43515. state.tag = tagName;
  43516. } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {
  43517. state.tag = state.tagMap[tagHandle] + tagName;
  43518. } else if (tagHandle === '!') {
  43519. state.tag = '!' + tagName;
  43520. } else if (tagHandle === '!!') {
  43521. state.tag = 'tag:yaml.org,2002:' + tagName;
  43522. } else {
  43523. throwError(state, 'undeclared tag handle "' + tagHandle + '"');
  43524. }
  43525. return true;
  43526. }
  43527. function readAnchorProperty(state) {
  43528. var _position,
  43529. ch;
  43530. ch = state.input.charCodeAt(state.position);
  43531. if (ch !== 0x26/* & */) return false;
  43532. if (state.anchor !== null) {
  43533. throwError(state, 'duplication of an anchor property');
  43534. }
  43535. ch = state.input.charCodeAt(++state.position);
  43536. _position = state.position;
  43537. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  43538. ch = state.input.charCodeAt(++state.position);
  43539. }
  43540. if (state.position === _position) {
  43541. throwError(state, 'name of an anchor node must contain at least one character');
  43542. }
  43543. state.anchor = state.input.slice(_position, state.position);
  43544. return true;
  43545. }
  43546. function readAlias(state) {
  43547. var _position, alias,
  43548. ch;
  43549. ch = state.input.charCodeAt(state.position);
  43550. if (ch !== 0x2A/* * */) return false;
  43551. ch = state.input.charCodeAt(++state.position);
  43552. _position = state.position;
  43553. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  43554. ch = state.input.charCodeAt(++state.position);
  43555. }
  43556. if (state.position === _position) {
  43557. throwError(state, 'name of an alias node must contain at least one character');
  43558. }
  43559. alias = state.input.slice(_position, state.position);
  43560. if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {
  43561. throwError(state, 'unidentified alias "' + alias + '"');
  43562. }
  43563. state.result = state.anchorMap[alias];
  43564. skipSeparationSpace(state, true, -1);
  43565. return true;
  43566. }
  43567. function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
  43568. var allowBlockStyles,
  43569. allowBlockScalars,
  43570. allowBlockCollections,
  43571. indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent
  43572. atNewLine = false,
  43573. hasContent = false,
  43574. typeIndex,
  43575. typeQuantity,
  43576. typeList,
  43577. type,
  43578. flowIndent,
  43579. blockIndent;
  43580. if (state.listener !== null) {
  43581. state.listener('open', state);
  43582. }
  43583. state.tag = null;
  43584. state.anchor = null;
  43585. state.kind = null;
  43586. state.result = null;
  43587. allowBlockStyles = allowBlockScalars = allowBlockCollections =
  43588. CONTEXT_BLOCK_OUT === nodeContext ||
  43589. CONTEXT_BLOCK_IN === nodeContext;
  43590. if (allowToSeek) {
  43591. if (skipSeparationSpace(state, true, -1)) {
  43592. atNewLine = true;
  43593. if (state.lineIndent > parentIndent) {
  43594. indentStatus = 1;
  43595. } else if (state.lineIndent === parentIndent) {
  43596. indentStatus = 0;
  43597. } else if (state.lineIndent < parentIndent) {
  43598. indentStatus = -1;
  43599. }
  43600. }
  43601. }
  43602. if (indentStatus === 1) {
  43603. while (readTagProperty(state) || readAnchorProperty(state)) {
  43604. if (skipSeparationSpace(state, true, -1)) {
  43605. atNewLine = true;
  43606. allowBlockCollections = allowBlockStyles;
  43607. if (state.lineIndent > parentIndent) {
  43608. indentStatus = 1;
  43609. } else if (state.lineIndent === parentIndent) {
  43610. indentStatus = 0;
  43611. } else if (state.lineIndent < parentIndent) {
  43612. indentStatus = -1;
  43613. }
  43614. } else {
  43615. allowBlockCollections = false;
  43616. }
  43617. }
  43618. }
  43619. if (allowBlockCollections) {
  43620. allowBlockCollections = atNewLine || allowCompact;
  43621. }
  43622. if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
  43623. if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
  43624. flowIndent = parentIndent;
  43625. } else {
  43626. flowIndent = parentIndent + 1;
  43627. }
  43628. blockIndent = state.position - state.lineStart;
  43629. if (indentStatus === 1) {
  43630. if (allowBlockCollections &&
  43631. (readBlockSequence(state, blockIndent) ||
  43632. readBlockMapping(state, blockIndent, flowIndent)) ||
  43633. readFlowCollection(state, flowIndent)) {
  43634. hasContent = true;
  43635. } else {
  43636. if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
  43637. readSingleQuotedScalar(state, flowIndent) ||
  43638. readDoubleQuotedScalar(state, flowIndent)) {
  43639. hasContent = true;
  43640. } else if (readAlias(state)) {
  43641. hasContent = true;
  43642. if (state.tag !== null || state.anchor !== null) {
  43643. throwError(state, 'alias node should not have any properties');
  43644. }
  43645. } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
  43646. hasContent = true;
  43647. if (state.tag === null) {
  43648. state.tag = '?';
  43649. }
  43650. }
  43651. if (state.anchor !== null) {
  43652. state.anchorMap[state.anchor] = state.result;
  43653. }
  43654. }
  43655. } else if (indentStatus === 0) {
  43656. // Special case: block sequences are allowed to have same indentation level as the parent.
  43657. // http://www.yaml.org/spec/1.2/spec.html#id2799784
  43658. hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
  43659. }
  43660. }
  43661. if (state.tag === null) {
  43662. if (state.anchor !== null) {
  43663. state.anchorMap[state.anchor] = state.result;
  43664. }
  43665. } else if (state.tag === '?') {
  43666. // Implicit resolving is not allowed for non-scalar types, and '?'
  43667. // non-specific tag is only automatically assigned to plain scalars.
  43668. //
  43669. // We only need to check kind conformity in case user explicitly assigns '?'
  43670. // tag, for example like this: "!<?> [0]"
  43671. //
  43672. if (state.result !== null && state.kind !== 'scalar') {
  43673. throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
  43674. }
  43675. for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
  43676. type = state.implicitTypes[typeIndex];
  43677. if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
  43678. state.result = type.construct(state.result);
  43679. state.tag = type.tag;
  43680. if (state.anchor !== null) {
  43681. state.anchorMap[state.anchor] = state.result;
  43682. }
  43683. break;
  43684. }
  43685. }
  43686. } else if (state.tag !== '!') {
  43687. if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
  43688. type = state.typeMap[state.kind || 'fallback'][state.tag];
  43689. } else {
  43690. // looking for multi type
  43691. type = null;
  43692. typeList = state.typeMap.multi[state.kind || 'fallback'];
  43693. for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
  43694. if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
  43695. type = typeList[typeIndex];
  43696. break;
  43697. }
  43698. }
  43699. }
  43700. if (!type) {
  43701. throwError(state, 'unknown tag !<' + state.tag + '>');
  43702. }
  43703. if (state.result !== null && type.kind !== state.kind) {
  43704. throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
  43705. }
  43706. if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched
  43707. throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');
  43708. } else {
  43709. state.result = type.construct(state.result, state.tag);
  43710. if (state.anchor !== null) {
  43711. state.anchorMap[state.anchor] = state.result;
  43712. }
  43713. }
  43714. }
  43715. if (state.listener !== null) {
  43716. state.listener('close', state);
  43717. }
  43718. return state.tag !== null || state.anchor !== null || hasContent;
  43719. }
  43720. function readDocument(state) {
  43721. var documentStart = state.position,
  43722. _position,
  43723. directiveName,
  43724. directiveArgs,
  43725. hasDirectives = false,
  43726. ch;
  43727. state.version = null;
  43728. state.checkLineBreaks = state.legacy;
  43729. state.tagMap = Object.create(null);
  43730. state.anchorMap = Object.create(null);
  43731. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  43732. skipSeparationSpace(state, true, -1);
  43733. ch = state.input.charCodeAt(state.position);
  43734. if (state.lineIndent > 0 || ch !== 0x25/* % */) {
  43735. break;
  43736. }
  43737. hasDirectives = true;
  43738. ch = state.input.charCodeAt(++state.position);
  43739. _position = state.position;
  43740. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  43741. ch = state.input.charCodeAt(++state.position);
  43742. }
  43743. directiveName = state.input.slice(_position, state.position);
  43744. directiveArgs = [];
  43745. if (directiveName.length < 1) {
  43746. throwError(state, 'directive name must not be less than one character in length');
  43747. }
  43748. while (ch !== 0) {
  43749. while (is_WHITE_SPACE(ch)) {
  43750. ch = state.input.charCodeAt(++state.position);
  43751. }
  43752. if (ch === 0x23/* # */) {
  43753. do { ch = state.input.charCodeAt(++state.position); }
  43754. while (ch !== 0 && !is_EOL(ch));
  43755. break;
  43756. }
  43757. if (is_EOL(ch)) break;
  43758. _position = state.position;
  43759. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  43760. ch = state.input.charCodeAt(++state.position);
  43761. }
  43762. directiveArgs.push(state.input.slice(_position, state.position));
  43763. }
  43764. if (ch !== 0) readLineBreak(state);
  43765. if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
  43766. directiveHandlers[directiveName](state, directiveName, directiveArgs);
  43767. } else {
  43768. throwWarning(state, 'unknown document directive "' + directiveName + '"');
  43769. }
  43770. }
  43771. skipSeparationSpace(state, true, -1);
  43772. if (state.lineIndent === 0 &&
  43773. state.input.charCodeAt(state.position) === 0x2D/* - */ &&
  43774. state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
  43775. state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
  43776. state.position += 3;
  43777. skipSeparationSpace(state, true, -1);
  43778. } else if (hasDirectives) {
  43779. throwError(state, 'directives end mark is expected');
  43780. }
  43781. composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
  43782. skipSeparationSpace(state, true, -1);
  43783. if (state.checkLineBreaks &&
  43784. PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
  43785. throwWarning(state, 'non-ASCII line breaks are interpreted as content');
  43786. }
  43787. state.documents.push(state.result);
  43788. if (state.position === state.lineStart && testDocumentSeparator(state)) {
  43789. if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
  43790. state.position += 3;
  43791. skipSeparationSpace(state, true, -1);
  43792. }
  43793. return;
  43794. }
  43795. if (state.position < (state.length - 1)) {
  43796. throwError(state, 'end of the stream or a document separator is expected');
  43797. } else {
  43798. return;
  43799. }
  43800. }
  43801. function loadDocuments(input, options) {
  43802. input = String(input);
  43803. options = options || {};
  43804. if (input.length !== 0) {
  43805. // Add tailing `\n` if not exists
  43806. if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
  43807. input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
  43808. input += '\n';
  43809. }
  43810. // Strip BOM
  43811. if (input.charCodeAt(0) === 0xFEFF) {
  43812. input = input.slice(1);
  43813. }
  43814. }
  43815. var state = new State$1(input, options);
  43816. var nullpos = input.indexOf('\0');
  43817. if (nullpos !== -1) {
  43818. state.position = nullpos;
  43819. throwError(state, 'null byte is not allowed in input');
  43820. }
  43821. // Use 0 as string terminator. That significantly simplifies bounds check.
  43822. state.input += '\0';
  43823. while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
  43824. state.lineIndent += 1;
  43825. state.position += 1;
  43826. }
  43827. while (state.position < (state.length - 1)) {
  43828. readDocument(state);
  43829. }
  43830. return state.documents;
  43831. }
  43832. function loadAll$1(input, iterator, options) {
  43833. if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {
  43834. options = iterator;
  43835. iterator = null;
  43836. }
  43837. var documents = loadDocuments(input, options);
  43838. if (typeof iterator !== 'function') {
  43839. return documents;
  43840. }
  43841. for (var index = 0, length = documents.length; index < length; index += 1) {
  43842. iterator(documents[index]);
  43843. }
  43844. }
  43845. function load$1(input, options) {
  43846. var documents = loadDocuments(input, options);
  43847. if (documents.length === 0) {
  43848. /*eslint-disable no-undefined*/
  43849. return undefined;
  43850. } else if (documents.length === 1) {
  43851. return documents[0];
  43852. }
  43853. throw new exception('expected a single document in the stream, but found more');
  43854. }
  43855. var loadAll_1 = loadAll$1;
  43856. var load_1 = load$1;
  43857. var loader = {
  43858. loadAll: loadAll_1,
  43859. load: load_1
  43860. };
  43861. /*eslint-disable no-use-before-define*/
  43862. var _toString = Object.prototype.toString;
  43863. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  43864. var CHAR_BOM = 0xFEFF;
  43865. var CHAR_TAB = 0x09; /* Tab */
  43866. var CHAR_LINE_FEED = 0x0A; /* LF */
  43867. var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */
  43868. var CHAR_SPACE = 0x20; /* Space */
  43869. var CHAR_EXCLAMATION = 0x21; /* ! */
  43870. var CHAR_DOUBLE_QUOTE = 0x22; /* " */
  43871. var CHAR_SHARP = 0x23; /* # */
  43872. var CHAR_PERCENT = 0x25; /* % */
  43873. var CHAR_AMPERSAND = 0x26; /* & */
  43874. var CHAR_SINGLE_QUOTE = 0x27; /* ' */
  43875. var CHAR_ASTERISK = 0x2A; /* * */
  43876. var CHAR_COMMA = 0x2C; /* , */
  43877. var CHAR_MINUS = 0x2D; /* - */
  43878. var CHAR_COLON = 0x3A; /* : */
  43879. var CHAR_EQUALS = 0x3D; /* = */
  43880. var CHAR_GREATER_THAN = 0x3E; /* > */
  43881. var CHAR_QUESTION = 0x3F; /* ? */
  43882. var CHAR_COMMERCIAL_AT = 0x40; /* @ */
  43883. var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
  43884. var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
  43885. var CHAR_GRAVE_ACCENT = 0x60; /* ` */
  43886. var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
  43887. var CHAR_VERTICAL_LINE = 0x7C; /* | */
  43888. var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
  43889. var ESCAPE_SEQUENCES = {};
  43890. ESCAPE_SEQUENCES[0x00] = '\\0';
  43891. ESCAPE_SEQUENCES[0x07] = '\\a';
  43892. ESCAPE_SEQUENCES[0x08] = '\\b';
  43893. ESCAPE_SEQUENCES[0x09] = '\\t';
  43894. ESCAPE_SEQUENCES[0x0A] = '\\n';
  43895. ESCAPE_SEQUENCES[0x0B] = '\\v';
  43896. ESCAPE_SEQUENCES[0x0C] = '\\f';
  43897. ESCAPE_SEQUENCES[0x0D] = '\\r';
  43898. ESCAPE_SEQUENCES[0x1B] = '\\e';
  43899. ESCAPE_SEQUENCES[0x22] = '\\"';
  43900. ESCAPE_SEQUENCES[0x5C] = '\\\\';
  43901. ESCAPE_SEQUENCES[0x85] = '\\N';
  43902. ESCAPE_SEQUENCES[0xA0] = '\\_';
  43903. ESCAPE_SEQUENCES[0x2028] = '\\L';
  43904. ESCAPE_SEQUENCES[0x2029] = '\\P';
  43905. var DEPRECATED_BOOLEANS_SYNTAX = [
  43906. 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
  43907. 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
  43908. ];
  43909. var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
  43910. function compileStyleMap(schema, map) {
  43911. var result, keys, index, length, tag, style, type;
  43912. if (map === null) return {};
  43913. result = {};
  43914. keys = Object.keys(map);
  43915. for (index = 0, length = keys.length; index < length; index += 1) {
  43916. tag = keys[index];
  43917. style = String(map[tag]);
  43918. if (tag.slice(0, 2) === '!!') {
  43919. tag = 'tag:yaml.org,2002:' + tag.slice(2);
  43920. }
  43921. type = schema.compiledTypeMap['fallback'][tag];
  43922. if (type && _hasOwnProperty.call(type.styleAliases, style)) {
  43923. style = type.styleAliases[style];
  43924. }
  43925. result[tag] = style;
  43926. }
  43927. return result;
  43928. }
  43929. function encodeHex(character) {
  43930. var string, handle, length;
  43931. string = character.toString(16).toUpperCase();
  43932. if (character <= 0xFF) {
  43933. handle = 'x';
  43934. length = 2;
  43935. } else if (character <= 0xFFFF) {
  43936. handle = 'u';
  43937. length = 4;
  43938. } else if (character <= 0xFFFFFFFF) {
  43939. handle = 'U';
  43940. length = 8;
  43941. } else {
  43942. throw new exception('code point within a string may not be greater than 0xFFFFFFFF');
  43943. }
  43944. return '\\' + handle + common.repeat('0', length - string.length) + string;
  43945. }
  43946. var QUOTING_TYPE_SINGLE = 1,
  43947. QUOTING_TYPE_DOUBLE = 2;
  43948. function State(options) {
  43949. this.schema = options['schema'] || _default;
  43950. this.indent = Math.max(1, (options['indent'] || 2));
  43951. this.noArrayIndent = options['noArrayIndent'] || false;
  43952. this.skipInvalid = options['skipInvalid'] || false;
  43953. this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
  43954. this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
  43955. this.sortKeys = options['sortKeys'] || false;
  43956. this.lineWidth = options['lineWidth'] || 80;
  43957. this.noRefs = options['noRefs'] || false;
  43958. this.noCompatMode = options['noCompatMode'] || false;
  43959. this.condenseFlow = options['condenseFlow'] || false;
  43960. this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
  43961. this.forceQuotes = options['forceQuotes'] || false;
  43962. this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;
  43963. this.implicitTypes = this.schema.compiledImplicit;
  43964. this.explicitTypes = this.schema.compiledExplicit;
  43965. this.tag = null;
  43966. this.result = '';
  43967. this.duplicates = [];
  43968. this.usedDuplicates = null;
  43969. }
  43970. // Indents every line in a string. Empty lines (\n only) are not indented.
  43971. function indentString(string, spaces) {
  43972. var ind = common.repeat(' ', spaces),
  43973. position = 0,
  43974. next = -1,
  43975. result = '',
  43976. line,
  43977. length = string.length;
  43978. while (position < length) {
  43979. next = string.indexOf('\n', position);
  43980. if (next === -1) {
  43981. line = string.slice(position);
  43982. position = length;
  43983. } else {
  43984. line = string.slice(position, next + 1);
  43985. position = next + 1;
  43986. }
  43987. if (line.length && line !== '\n') result += ind;
  43988. result += line;
  43989. }
  43990. return result;
  43991. }
  43992. function generateNextLine(state, level) {
  43993. return '\n' + common.repeat(' ', state.indent * level);
  43994. }
  43995. function testImplicitResolving(state, str) {
  43996. var index, length, type;
  43997. for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
  43998. type = state.implicitTypes[index];
  43999. if (type.resolve(str)) {
  44000. return true;
  44001. }
  44002. }
  44003. return false;
  44004. }
  44005. // [33] s-white ::= s-space | s-tab
  44006. function isWhitespace(c) {
  44007. return c === CHAR_SPACE || c === CHAR_TAB;
  44008. }
  44009. // Returns true if the character can be printed without escaping.
  44010. // From YAML 1.2: "any allowed characters known to be non-printable
  44011. // should also be escaped. [However,] This isn’t mandatory"
  44012. // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
  44013. function isPrintable(c) {
  44014. return (0x00020 <= c && c <= 0x00007E)
  44015. || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
  44016. || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)
  44017. || (0x10000 <= c && c <= 0x10FFFF);
  44018. }
  44019. // [34] ns-char ::= nb-char - s-white
  44020. // [27] nb-char ::= c-printable - b-char - c-byte-order-mark
  44021. // [26] b-char ::= b-line-feed | b-carriage-return
  44022. // Including s-white (for some reason, examples doesn't match specs in this aspect)
  44023. // ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark
  44024. function isNsCharOrWhitespace(c) {
  44025. return isPrintable(c)
  44026. && c !== CHAR_BOM
  44027. // - b-char
  44028. && c !== CHAR_CARRIAGE_RETURN
  44029. && c !== CHAR_LINE_FEED;
  44030. }
  44031. // [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out
  44032. // c = flow-in ⇒ ns-plain-safe-in
  44033. // c = block-key ⇒ ns-plain-safe-out
  44034. // c = flow-key ⇒ ns-plain-safe-in
  44035. // [128] ns-plain-safe-out ::= ns-char
  44036. // [129] ns-plain-safe-in ::= ns-char - c-flow-indicator
  44037. // [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
  44038. // | ( /* An ns-char preceding */ “#” )
  44039. // | ( “:” /* Followed by an ns-plain-safe(c) */ )
  44040. function isPlainSafe(c, prev, inblock) {
  44041. var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
  44042. var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
  44043. return (
  44044. // ns-plain-safe
  44045. inblock ? // c = flow-in
  44046. cIsNsCharOrWhitespace
  44047. : cIsNsCharOrWhitespace
  44048. // - c-flow-indicator
  44049. && c !== CHAR_COMMA
  44050. && c !== CHAR_LEFT_SQUARE_BRACKET
  44051. && c !== CHAR_RIGHT_SQUARE_BRACKET
  44052. && c !== CHAR_LEFT_CURLY_BRACKET
  44053. && c !== CHAR_RIGHT_CURLY_BRACKET
  44054. )
  44055. // ns-plain-char
  44056. && c !== CHAR_SHARP // false on '#'
  44057. && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '
  44058. || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'
  44059. || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'
  44060. }
  44061. // Simplified test for values allowed as the first character in plain style.
  44062. function isPlainSafeFirst(c) {
  44063. // Uses a subset of ns-char - c-indicator
  44064. // where ns-char = nb-char - s-white.
  44065. // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part
  44066. return isPrintable(c) && c !== CHAR_BOM
  44067. && !isWhitespace(c) // - s-white
  44068. // - (c-indicator ::=
  44069. // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
  44070. && c !== CHAR_MINUS
  44071. && c !== CHAR_QUESTION
  44072. && c !== CHAR_COLON
  44073. && c !== CHAR_COMMA
  44074. && c !== CHAR_LEFT_SQUARE_BRACKET
  44075. && c !== CHAR_RIGHT_SQUARE_BRACKET
  44076. && c !== CHAR_LEFT_CURLY_BRACKET
  44077. && c !== CHAR_RIGHT_CURLY_BRACKET
  44078. // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
  44079. && c !== CHAR_SHARP
  44080. && c !== CHAR_AMPERSAND
  44081. && c !== CHAR_ASTERISK
  44082. && c !== CHAR_EXCLAMATION
  44083. && c !== CHAR_VERTICAL_LINE
  44084. && c !== CHAR_EQUALS
  44085. && c !== CHAR_GREATER_THAN
  44086. && c !== CHAR_SINGLE_QUOTE
  44087. && c !== CHAR_DOUBLE_QUOTE
  44088. // | “%” | “@” | “`”)
  44089. && c !== CHAR_PERCENT
  44090. && c !== CHAR_COMMERCIAL_AT
  44091. && c !== CHAR_GRAVE_ACCENT;
  44092. }
  44093. // Simplified test for values allowed as the last character in plain style.
  44094. function isPlainSafeLast(c) {
  44095. // just not whitespace or colon, it will be checked to be plain character later
  44096. return !isWhitespace(c) && c !== CHAR_COLON;
  44097. }
  44098. // Same as 'string'.codePointAt(pos), but works in older browsers.
  44099. function codePointAt(string, pos) {
  44100. var first = string.charCodeAt(pos), second;
  44101. if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {
  44102. second = string.charCodeAt(pos + 1);
  44103. if (second >= 0xDC00 && second <= 0xDFFF) {
  44104. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  44105. return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  44106. }
  44107. }
  44108. return first;
  44109. }
  44110. // Determines whether block indentation indicator is required.
  44111. function needIndentIndicator(string) {
  44112. var leadingSpaceRe = /^\n* /;
  44113. return leadingSpaceRe.test(string);
  44114. }
  44115. var STYLE_PLAIN = 1,
  44116. STYLE_SINGLE = 2,
  44117. STYLE_LITERAL = 3,
  44118. STYLE_FOLDED = 4,
  44119. STYLE_DOUBLE = 5;
  44120. // Determines which scalar styles are possible and returns the preferred style.
  44121. // lineWidth = -1 => no limit.
  44122. // Pre-conditions: str.length > 0.
  44123. // Post-conditions:
  44124. // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
  44125. // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
  44126. // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
  44127. function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,
  44128. testAmbiguousType, quotingType, forceQuotes, inblock) {
  44129. var i;
  44130. var char = 0;
  44131. var prevChar = null;
  44132. var hasLineBreak = false;
  44133. var hasFoldableLine = false; // only checked if shouldTrackWidth
  44134. var shouldTrackWidth = lineWidth !== -1;
  44135. var previousLineBreak = -1; // count the first line correctly
  44136. var plain = isPlainSafeFirst(codePointAt(string, 0))
  44137. && isPlainSafeLast(codePointAt(string, string.length - 1));
  44138. if (singleLineOnly || forceQuotes) {
  44139. // Case: no block styles.
  44140. // Check for disallowed characters to rule out plain and single.
  44141. for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
  44142. char = codePointAt(string, i);
  44143. if (!isPrintable(char)) {
  44144. return STYLE_DOUBLE;
  44145. }
  44146. plain = plain && isPlainSafe(char, prevChar, inblock);
  44147. prevChar = char;
  44148. }
  44149. } else {
  44150. // Case: block styles permitted.
  44151. for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
  44152. char = codePointAt(string, i);
  44153. if (char === CHAR_LINE_FEED) {
  44154. hasLineBreak = true;
  44155. // Check if any line can be folded.
  44156. if (shouldTrackWidth) {
  44157. hasFoldableLine = hasFoldableLine ||
  44158. // Foldable line = too long, and not more-indented.
  44159. (i - previousLineBreak - 1 > lineWidth &&
  44160. string[previousLineBreak + 1] !== ' ');
  44161. previousLineBreak = i;
  44162. }
  44163. } else if (!isPrintable(char)) {
  44164. return STYLE_DOUBLE;
  44165. }
  44166. plain = plain && isPlainSafe(char, prevChar, inblock);
  44167. prevChar = char;
  44168. }
  44169. // in case the end is missing a \n
  44170. hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
  44171. (i - previousLineBreak - 1 > lineWidth &&
  44172. string[previousLineBreak + 1] !== ' '));
  44173. }
  44174. // Although every style can represent \n without escaping, prefer block styles
  44175. // for multiline, since they're more readable and they don't add empty lines.
  44176. // Also prefer folding a super-long line.
  44177. if (!hasLineBreak && !hasFoldableLine) {
  44178. // Strings interpretable as another type have to be quoted;
  44179. // e.g. the string 'true' vs. the boolean true.
  44180. if (plain && !forceQuotes && !testAmbiguousType(string)) {
  44181. return STYLE_PLAIN;
  44182. }
  44183. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  44184. }
  44185. // Edge case: block indentation indicator can only have one digit.
  44186. if (indentPerLevel > 9 && needIndentIndicator(string)) {
  44187. return STYLE_DOUBLE;
  44188. }
  44189. // At this point we know block styles are valid.
  44190. // Prefer literal style unless we want to fold.
  44191. if (!forceQuotes) {
  44192. return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
  44193. }
  44194. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  44195. }
  44196. // Note: line breaking/folding is implemented for only the folded style.
  44197. // NB. We drop the last trailing newline (if any) of a returned block scalar
  44198. // since the dumper adds its own newline. This always works:
  44199. // • No ending newline => unaffected; already using strip "-" chomping.
  44200. // • Ending newline => removed then restored.
  44201. // Importantly, this keeps the "+" chomp indicator from gaining an extra line.
  44202. function writeScalar(state, string, level, iskey, inblock) {
  44203. state.dump = (function () {
  44204. if (string.length === 0) {
  44205. return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
  44206. }
  44207. if (!state.noCompatMode) {
  44208. if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
  44209. return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'");
  44210. }
  44211. }
  44212. var indent = state.indent * Math.max(1, level); // no 0-indent scalars
  44213. // As indentation gets deeper, let the width decrease monotonically
  44214. // to the lower bound min(state.lineWidth, 40).
  44215. // Note that this implies
  44216. // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
  44217. // state.lineWidth > 40 + state.indent: width decreases until the lower bound.
  44218. // This behaves better than a constant minimum width which disallows narrower options,
  44219. // or an indent threshold which causes the width to suddenly increase.
  44220. var lineWidth = state.lineWidth === -1
  44221. ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
  44222. // Without knowing if keys are implicit/explicit, assume implicit for safety.
  44223. var singleLineOnly = iskey
  44224. // No block styles in flow mode.
  44225. || (state.flowLevel > -1 && level >= state.flowLevel);
  44226. function testAmbiguity(string) {
  44227. return testImplicitResolving(state, string);
  44228. }
  44229. switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,
  44230. testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {
  44231. case STYLE_PLAIN:
  44232. return string;
  44233. case STYLE_SINGLE:
  44234. return "'" + string.replace(/'/g, "''") + "'";
  44235. case STYLE_LITERAL:
  44236. return '|' + blockHeader(string, state.indent)
  44237. + dropEndingNewline(indentString(string, indent));
  44238. case STYLE_FOLDED:
  44239. return '>' + blockHeader(string, state.indent)
  44240. + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
  44241. case STYLE_DOUBLE:
  44242. return '"' + escapeString(string) + '"';
  44243. default:
  44244. throw new exception('impossible error: invalid scalar style');
  44245. }
  44246. }());
  44247. }
  44248. // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
  44249. function blockHeader(string, indentPerLevel) {
  44250. var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';
  44251. // note the special case: the string '\n' counts as a "trailing" empty line.
  44252. var clip = string[string.length - 1] === '\n';
  44253. var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
  44254. var chomp = keep ? '+' : (clip ? '' : '-');
  44255. return indentIndicator + chomp + '\n';
  44256. }
  44257. // (See the note for writeScalar.)
  44258. function dropEndingNewline(string) {
  44259. return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
  44260. }
  44261. // Note: a long line without a suitable break point will exceed the width limit.
  44262. // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
  44263. function foldString(string, width) {
  44264. // In folded style, $k$ consecutive newlines output as $k+1$ newlines—
  44265. // unless they're before or after a more-indented line, or at the very
  44266. // beginning or end, in which case $k$ maps to $k$.
  44267. // Therefore, parse each chunk as newline(s) followed by a content line.
  44268. var lineRe = /(\n+)([^\n]*)/g;
  44269. // first line (possibly an empty line)
  44270. var result = (function () {
  44271. var nextLF = string.indexOf('\n');
  44272. nextLF = nextLF !== -1 ? nextLF : string.length;
  44273. lineRe.lastIndex = nextLF;
  44274. return foldLine(string.slice(0, nextLF), width);
  44275. }());
  44276. // If we haven't reached the first content line yet, don't add an extra \n.
  44277. var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
  44278. var moreIndented;
  44279. // rest of the lines
  44280. var match;
  44281. while ((match = lineRe.exec(string))) {
  44282. var prefix = match[1], line = match[2];
  44283. moreIndented = (line[0] === ' ');
  44284. result += prefix
  44285. + (!prevMoreIndented && !moreIndented && line !== ''
  44286. ? '\n' : '')
  44287. + foldLine(line, width);
  44288. prevMoreIndented = moreIndented;
  44289. }
  44290. return result;
  44291. }
  44292. // Greedy line breaking.
  44293. // Picks the longest line under the limit each time,
  44294. // otherwise settles for the shortest line over the limit.
  44295. // NB. More-indented lines *cannot* be folded, as that would add an extra \n.
  44296. function foldLine(line, width) {
  44297. if (line === '' || line[0] === ' ') return line;
  44298. // Since a more-indented line adds a \n, breaks can't be followed by a space.
  44299. var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
  44300. var match;
  44301. // start is an inclusive index. end, curr, and next are exclusive.
  44302. var start = 0, end, curr = 0, next = 0;
  44303. var result = '';
  44304. // Invariants: 0 <= start <= length-1.
  44305. // 0 <= curr <= next <= max(0, length-2). curr - start <= width.
  44306. // Inside the loop:
  44307. // A match implies length >= 2, so curr and next are <= length-2.
  44308. while ((match = breakRe.exec(line))) {
  44309. next = match.index;
  44310. // maintain invariant: curr - start <= width
  44311. if (next - start > width) {
  44312. end = (curr > start) ? curr : next; // derive end <= length-2
  44313. result += '\n' + line.slice(start, end);
  44314. // skip the space that was output as \n
  44315. start = end + 1; // derive start <= length-1
  44316. }
  44317. curr = next;
  44318. }
  44319. // By the invariants, start <= length-1, so there is something left over.
  44320. // It is either the whole string or a part starting from non-whitespace.
  44321. result += '\n';
  44322. // Insert a break if the remainder is too long and there is a break available.
  44323. if (line.length - start > width && curr > start) {
  44324. result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
  44325. } else {
  44326. result += line.slice(start);
  44327. }
  44328. return result.slice(1); // drop extra \n joiner
  44329. }
  44330. // Escapes a double-quoted string.
  44331. function escapeString(string) {
  44332. var result = '';
  44333. var char = 0;
  44334. var escapeSeq;
  44335. for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
  44336. char = codePointAt(string, i);
  44337. escapeSeq = ESCAPE_SEQUENCES[char];
  44338. if (!escapeSeq && isPrintable(char)) {
  44339. result += string[i];
  44340. if (char >= 0x10000) result += string[i + 1];
  44341. } else {
  44342. result += escapeSeq || encodeHex(char);
  44343. }
  44344. }
  44345. return result;
  44346. }
  44347. function writeFlowSequence(state, level, object) {
  44348. var _result = '',
  44349. _tag = state.tag,
  44350. index,
  44351. length,
  44352. value;
  44353. for (index = 0, length = object.length; index < length; index += 1) {
  44354. value = object[index];
  44355. if (state.replacer) {
  44356. value = state.replacer.call(object, String(index), value);
  44357. }
  44358. // Write only valid elements, put null instead of invalid elements.
  44359. if (writeNode(state, level, value, false, false) ||
  44360. (typeof value === 'undefined' &&
  44361. writeNode(state, level, null, false, false))) {
  44362. if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');
  44363. _result += state.dump;
  44364. }
  44365. }
  44366. state.tag = _tag;
  44367. state.dump = '[' + _result + ']';
  44368. }
  44369. function writeBlockSequence(state, level, object, compact) {
  44370. var _result = '',
  44371. _tag = state.tag,
  44372. index,
  44373. length,
  44374. value;
  44375. for (index = 0, length = object.length; index < length; index += 1) {
  44376. value = object[index];
  44377. if (state.replacer) {
  44378. value = state.replacer.call(object, String(index), value);
  44379. }
  44380. // Write only valid elements, put null instead of invalid elements.
  44381. if (writeNode(state, level + 1, value, true, true, false, true) ||
  44382. (typeof value === 'undefined' &&
  44383. writeNode(state, level + 1, null, true, true, false, true))) {
  44384. if (!compact || _result !== '') {
  44385. _result += generateNextLine(state, level);
  44386. }
  44387. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  44388. _result += '-';
  44389. } else {
  44390. _result += '- ';
  44391. }
  44392. _result += state.dump;
  44393. }
  44394. }
  44395. state.tag = _tag;
  44396. state.dump = _result || '[]'; // Empty sequence if no valid values.
  44397. }
  44398. function writeFlowMapping(state, level, object) {
  44399. var _result = '',
  44400. _tag = state.tag,
  44401. objectKeyList = Object.keys(object),
  44402. index,
  44403. length,
  44404. objectKey,
  44405. objectValue,
  44406. pairBuffer;
  44407. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  44408. pairBuffer = '';
  44409. if (_result !== '') pairBuffer += ', ';
  44410. if (state.condenseFlow) pairBuffer += '"';
  44411. objectKey = objectKeyList[index];
  44412. objectValue = object[objectKey];
  44413. if (state.replacer) {
  44414. objectValue = state.replacer.call(object, objectKey, objectValue);
  44415. }
  44416. if (!writeNode(state, level, objectKey, false, false)) {
  44417. continue; // Skip this pair because of invalid key;
  44418. }
  44419. if (state.dump.length > 1024) pairBuffer += '? ';
  44420. pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
  44421. if (!writeNode(state, level, objectValue, false, false)) {
  44422. continue; // Skip this pair because of invalid value.
  44423. }
  44424. pairBuffer += state.dump;
  44425. // Both key and value are valid.
  44426. _result += pairBuffer;
  44427. }
  44428. state.tag = _tag;
  44429. state.dump = '{' + _result + '}';
  44430. }
  44431. function writeBlockMapping(state, level, object, compact) {
  44432. var _result = '',
  44433. _tag = state.tag,
  44434. objectKeyList = Object.keys(object),
  44435. index,
  44436. length,
  44437. objectKey,
  44438. objectValue,
  44439. explicitPair,
  44440. pairBuffer;
  44441. // Allow sorting keys so that the output file is deterministic
  44442. if (state.sortKeys === true) {
  44443. // Default sorting
  44444. objectKeyList.sort();
  44445. } else if (typeof state.sortKeys === 'function') {
  44446. // Custom sort function
  44447. objectKeyList.sort(state.sortKeys);
  44448. } else if (state.sortKeys) {
  44449. // Something is wrong
  44450. throw new exception('sortKeys must be a boolean or a function');
  44451. }
  44452. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  44453. pairBuffer = '';
  44454. if (!compact || _result !== '') {
  44455. pairBuffer += generateNextLine(state, level);
  44456. }
  44457. objectKey = objectKeyList[index];
  44458. objectValue = object[objectKey];
  44459. if (state.replacer) {
  44460. objectValue = state.replacer.call(object, objectKey, objectValue);
  44461. }
  44462. if (!writeNode(state, level + 1, objectKey, true, true, true)) {
  44463. continue; // Skip this pair because of invalid key.
  44464. }
  44465. explicitPair = (state.tag !== null && state.tag !== '?') ||
  44466. (state.dump && state.dump.length > 1024);
  44467. if (explicitPair) {
  44468. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  44469. pairBuffer += '?';
  44470. } else {
  44471. pairBuffer += '? ';
  44472. }
  44473. }
  44474. pairBuffer += state.dump;
  44475. if (explicitPair) {
  44476. pairBuffer += generateNextLine(state, level);
  44477. }
  44478. if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
  44479. continue; // Skip this pair because of invalid value.
  44480. }
  44481. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  44482. pairBuffer += ':';
  44483. } else {
  44484. pairBuffer += ': ';
  44485. }
  44486. pairBuffer += state.dump;
  44487. // Both key and value are valid.
  44488. _result += pairBuffer;
  44489. }
  44490. state.tag = _tag;
  44491. state.dump = _result || '{}'; // Empty mapping if no valid pairs.
  44492. }
  44493. function detectType(state, object, explicit) {
  44494. var _result, typeList, index, length, type, style;
  44495. typeList = explicit ? state.explicitTypes : state.implicitTypes;
  44496. for (index = 0, length = typeList.length; index < length; index += 1) {
  44497. type = typeList[index];
  44498. if ((type.instanceOf || type.predicate) &&
  44499. (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
  44500. (!type.predicate || type.predicate(object))) {
  44501. if (explicit) {
  44502. if (type.multi && type.representName) {
  44503. state.tag = type.representName(object);
  44504. } else {
  44505. state.tag = type.tag;
  44506. }
  44507. } else {
  44508. state.tag = '?';
  44509. }
  44510. if (type.represent) {
  44511. style = state.styleMap[type.tag] || type.defaultStyle;
  44512. if (_toString.call(type.represent) === '[object Function]') {
  44513. _result = type.represent(object, style);
  44514. } else if (_hasOwnProperty.call(type.represent, style)) {
  44515. _result = type.represent[style](object, style);
  44516. } else {
  44517. throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
  44518. }
  44519. state.dump = _result;
  44520. }
  44521. return true;
  44522. }
  44523. }
  44524. return false;
  44525. }
  44526. // Serializes `object` and writes it to global `result`.
  44527. // Returns true on success, or false on invalid object.
  44528. //
  44529. function writeNode(state, level, object, block, compact, iskey, isblockseq) {
  44530. state.tag = null;
  44531. state.dump = object;
  44532. if (!detectType(state, object, false)) {
  44533. detectType(state, object, true);
  44534. }
  44535. var type = _toString.call(state.dump);
  44536. var inblock = block;
  44537. var tagStr;
  44538. if (block) {
  44539. block = (state.flowLevel < 0 || state.flowLevel > level);
  44540. }
  44541. var objectOrArray = type === '[object Object]' || type === '[object Array]',
  44542. duplicateIndex,
  44543. duplicate;
  44544. if (objectOrArray) {
  44545. duplicateIndex = state.duplicates.indexOf(object);
  44546. duplicate = duplicateIndex !== -1;
  44547. }
  44548. if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
  44549. compact = false;
  44550. }
  44551. if (duplicate && state.usedDuplicates[duplicateIndex]) {
  44552. state.dump = '*ref_' + duplicateIndex;
  44553. } else {
  44554. if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
  44555. state.usedDuplicates[duplicateIndex] = true;
  44556. }
  44557. if (type === '[object Object]') {
  44558. if (block && (Object.keys(state.dump).length !== 0)) {
  44559. writeBlockMapping(state, level, state.dump, compact);
  44560. if (duplicate) {
  44561. state.dump = '&ref_' + duplicateIndex + state.dump;
  44562. }
  44563. } else {
  44564. writeFlowMapping(state, level, state.dump);
  44565. if (duplicate) {
  44566. state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
  44567. }
  44568. }
  44569. } else if (type === '[object Array]') {
  44570. if (block && (state.dump.length !== 0)) {
  44571. if (state.noArrayIndent && !isblockseq && level > 0) {
  44572. writeBlockSequence(state, level - 1, state.dump, compact);
  44573. } else {
  44574. writeBlockSequence(state, level, state.dump, compact);
  44575. }
  44576. if (duplicate) {
  44577. state.dump = '&ref_' + duplicateIndex + state.dump;
  44578. }
  44579. } else {
  44580. writeFlowSequence(state, level, state.dump);
  44581. if (duplicate) {
  44582. state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
  44583. }
  44584. }
  44585. } else if (type === '[object String]') {
  44586. if (state.tag !== '?') {
  44587. writeScalar(state, state.dump, level, iskey, inblock);
  44588. }
  44589. } else if (type === '[object Undefined]') {
  44590. return false;
  44591. } else {
  44592. if (state.skipInvalid) return false;
  44593. throw new exception('unacceptable kind of an object to dump ' + type);
  44594. }
  44595. if (state.tag !== null && state.tag !== '?') {
  44596. // Need to encode all characters except those allowed by the spec:
  44597. //
  44598. // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */
  44599. // [36] ns-hex-digit ::= ns-dec-digit
  44600. // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */
  44601. // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */
  44602. // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”
  44603. // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”
  44604. // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”
  44605. // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”
  44606. //
  44607. // Also need to encode '!' because it has special meaning (end of tag prefix).
  44608. //
  44609. tagStr = encodeURI(
  44610. state.tag[0] === '!' ? state.tag.slice(1) : state.tag
  44611. ).replace(/!/g, '%21');
  44612. if (state.tag[0] === '!') {
  44613. tagStr = '!' + tagStr;
  44614. } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {
  44615. tagStr = '!!' + tagStr.slice(18);
  44616. } else {
  44617. tagStr = '!<' + tagStr + '>';
  44618. }
  44619. state.dump = tagStr + ' ' + state.dump;
  44620. }
  44621. }
  44622. return true;
  44623. }
  44624. function getDuplicateReferences(object, state) {
  44625. var objects = [],
  44626. duplicatesIndexes = [],
  44627. index,
  44628. length;
  44629. inspectNode(object, objects, duplicatesIndexes);
  44630. for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
  44631. state.duplicates.push(objects[duplicatesIndexes[index]]);
  44632. }
  44633. state.usedDuplicates = new Array(length);
  44634. }
  44635. function inspectNode(object, objects, duplicatesIndexes) {
  44636. var objectKeyList,
  44637. index,
  44638. length;
  44639. if (object !== null && typeof object === 'object') {
  44640. index = objects.indexOf(object);
  44641. if (index !== -1) {
  44642. if (duplicatesIndexes.indexOf(index) === -1) {
  44643. duplicatesIndexes.push(index);
  44644. }
  44645. } else {
  44646. objects.push(object);
  44647. if (Array.isArray(object)) {
  44648. for (index = 0, length = object.length; index < length; index += 1) {
  44649. inspectNode(object[index], objects, duplicatesIndexes);
  44650. }
  44651. } else {
  44652. objectKeyList = Object.keys(object);
  44653. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  44654. inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
  44655. }
  44656. }
  44657. }
  44658. }
  44659. }
  44660. function dump$1(input, options) {
  44661. options = options || {};
  44662. var state = new State(options);
  44663. if (!state.noRefs) getDuplicateReferences(input, state);
  44664. var value = input;
  44665. if (state.replacer) {
  44666. value = state.replacer.call({ '': value }, '', value);
  44667. }
  44668. if (writeNode(state, 0, value, true, true)) return state.dump + '\n';
  44669. return '';
  44670. }
  44671. var dump_1 = dump$1;
  44672. var dumper = {
  44673. dump: dump_1
  44674. };
  44675. function renamed(from, to) {
  44676. return function () {
  44677. throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +
  44678. 'Use yaml.' + to + ' instead, which is now safe by default.');
  44679. };
  44680. }
  44681. var Type = type;
  44682. var Schema = schema;
  44683. var FAILSAFE_SCHEMA = failsafe;
  44684. var JSON_SCHEMA = json;
  44685. var CORE_SCHEMA = core;
  44686. var DEFAULT_SCHEMA = _default;
  44687. var load = loader.load;
  44688. var loadAll = loader.loadAll;
  44689. var dump = dumper.dump;
  44690. var YAMLException = exception;
  44691. // Re-export all types in case user wants to create custom schema
  44692. var types = {
  44693. binary: binary,
  44694. float: float,
  44695. map: map,
  44696. null: _null,
  44697. pairs: pairs,
  44698. set: set,
  44699. timestamp: timestamp,
  44700. bool: bool,
  44701. int: int,
  44702. merge: merge,
  44703. omap: omap,
  44704. seq: seq,
  44705. str: str
  44706. };
  44707. // Removed functions from JS-YAML 3.0.x
  44708. var safeLoad = renamed('safeLoad', 'load');
  44709. var safeLoadAll = renamed('safeLoadAll', 'loadAll');
  44710. var safeDump = renamed('safeDump', 'dump');
  44711. var jsYaml = {
  44712. Type: Type,
  44713. Schema: Schema,
  44714. FAILSAFE_SCHEMA: FAILSAFE_SCHEMA,
  44715. JSON_SCHEMA: JSON_SCHEMA,
  44716. CORE_SCHEMA: CORE_SCHEMA,
  44717. DEFAULT_SCHEMA: DEFAULT_SCHEMA,
  44718. load: load,
  44719. loadAll: loadAll,
  44720. dump: dump,
  44721. YAMLException: YAMLException,
  44722. types: types,
  44723. safeLoad: safeLoad,
  44724. safeLoadAll: safeLoadAll,
  44725. safeDump: safeDump
  44726. };
  44727. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jsYaml);
  44728. /***/ }),
  44729. /***/ 91296:
  44730. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  44731. /**
  44732. * lodash (Custom Build) <https://lodash.com/>
  44733. * Build: `lodash modularize exports="npm" -o ./`
  44734. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  44735. * Released under MIT license <https://lodash.com/license>
  44736. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  44737. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  44738. */
  44739. /** Used as the `TypeError` message for "Functions" methods. */
  44740. var FUNC_ERROR_TEXT = 'Expected a function';
  44741. /** Used as references for various `Number` constants. */
  44742. var NAN = 0 / 0;
  44743. /** `Object#toString` result references. */
  44744. var symbolTag = '[object Symbol]';
  44745. /** Used to match leading and trailing whitespace. */
  44746. var reTrim = /^\s+|\s+$/g;
  44747. /** Used to detect bad signed hexadecimal string values. */
  44748. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  44749. /** Used to detect binary string values. */
  44750. var reIsBinary = /^0b[01]+$/i;
  44751. /** Used to detect octal string values. */
  44752. var reIsOctal = /^0o[0-7]+$/i;
  44753. /** Built-in method references without a dependency on `root`. */
  44754. var freeParseInt = parseInt;
  44755. /** Detect free variable `global` from Node.js. */
  44756. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  44757. /** Detect free variable `self`. */
  44758. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  44759. /** Used as a reference to the global object. */
  44760. var root = freeGlobal || freeSelf || Function('return this')();
  44761. /** Used for built-in method references. */
  44762. var objectProto = Object.prototype;
  44763. /**
  44764. * Used to resolve the
  44765. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  44766. * of values.
  44767. */
  44768. var objectToString = objectProto.toString;
  44769. /* Built-in method references for those with the same name as other `lodash` methods. */
  44770. var nativeMax = Math.max,
  44771. nativeMin = Math.min;
  44772. /**
  44773. * Gets the timestamp of the number of milliseconds that have elapsed since
  44774. * the Unix epoch (1 January 1970 00:00:00 UTC).
  44775. *
  44776. * @static
  44777. * @memberOf _
  44778. * @since 2.4.0
  44779. * @category Date
  44780. * @returns {number} Returns the timestamp.
  44781. * @example
  44782. *
  44783. * _.defer(function(stamp) {
  44784. * console.log(_.now() - stamp);
  44785. * }, _.now());
  44786. * // => Logs the number of milliseconds it took for the deferred invocation.
  44787. */
  44788. var now = function() {
  44789. return root.Date.now();
  44790. };
  44791. /**
  44792. * Creates a debounced function that delays invoking `func` until after `wait`
  44793. * milliseconds have elapsed since the last time the debounced function was
  44794. * invoked. The debounced function comes with a `cancel` method to cancel
  44795. * delayed `func` invocations and a `flush` method to immediately invoke them.
  44796. * Provide `options` to indicate whether `func` should be invoked on the
  44797. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  44798. * with the last arguments provided to the debounced function. Subsequent
  44799. * calls to the debounced function return the result of the last `func`
  44800. * invocation.
  44801. *
  44802. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  44803. * invoked on the trailing edge of the timeout only if the debounced function
  44804. * is invoked more than once during the `wait` timeout.
  44805. *
  44806. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  44807. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  44808. *
  44809. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  44810. * for details over the differences between `_.debounce` and `_.throttle`.
  44811. *
  44812. * @static
  44813. * @memberOf _
  44814. * @since 0.1.0
  44815. * @category Function
  44816. * @param {Function} func The function to debounce.
  44817. * @param {number} [wait=0] The number of milliseconds to delay.
  44818. * @param {Object} [options={}] The options object.
  44819. * @param {boolean} [options.leading=false]
  44820. * Specify invoking on the leading edge of the timeout.
  44821. * @param {number} [options.maxWait]
  44822. * The maximum time `func` is allowed to be delayed before it's invoked.
  44823. * @param {boolean} [options.trailing=true]
  44824. * Specify invoking on the trailing edge of the timeout.
  44825. * @returns {Function} Returns the new debounced function.
  44826. * @example
  44827. *
  44828. * // Avoid costly calculations while the window size is in flux.
  44829. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  44830. *
  44831. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  44832. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  44833. * 'leading': true,
  44834. * 'trailing': false
  44835. * }));
  44836. *
  44837. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  44838. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  44839. * var source = new EventSource('/stream');
  44840. * jQuery(source).on('message', debounced);
  44841. *
  44842. * // Cancel the trailing debounced invocation.
  44843. * jQuery(window).on('popstate', debounced.cancel);
  44844. */
  44845. function debounce(func, wait, options) {
  44846. var lastArgs,
  44847. lastThis,
  44848. maxWait,
  44849. result,
  44850. timerId,
  44851. lastCallTime,
  44852. lastInvokeTime = 0,
  44853. leading = false,
  44854. maxing = false,
  44855. trailing = true;
  44856. if (typeof func != 'function') {
  44857. throw new TypeError(FUNC_ERROR_TEXT);
  44858. }
  44859. wait = toNumber(wait) || 0;
  44860. if (isObject(options)) {
  44861. leading = !!options.leading;
  44862. maxing = 'maxWait' in options;
  44863. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  44864. trailing = 'trailing' in options ? !!options.trailing : trailing;
  44865. }
  44866. function invokeFunc(time) {
  44867. var args = lastArgs,
  44868. thisArg = lastThis;
  44869. lastArgs = lastThis = undefined;
  44870. lastInvokeTime = time;
  44871. result = func.apply(thisArg, args);
  44872. return result;
  44873. }
  44874. function leadingEdge(time) {
  44875. // Reset any `maxWait` timer.
  44876. lastInvokeTime = time;
  44877. // Start the timer for the trailing edge.
  44878. timerId = setTimeout(timerExpired, wait);
  44879. // Invoke the leading edge.
  44880. return leading ? invokeFunc(time) : result;
  44881. }
  44882. function remainingWait(time) {
  44883. var timeSinceLastCall = time - lastCallTime,
  44884. timeSinceLastInvoke = time - lastInvokeTime,
  44885. result = wait - timeSinceLastCall;
  44886. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  44887. }
  44888. function shouldInvoke(time) {
  44889. var timeSinceLastCall = time - lastCallTime,
  44890. timeSinceLastInvoke = time - lastInvokeTime;
  44891. // Either this is the first call, activity has stopped and we're at the
  44892. // trailing edge, the system time has gone backwards and we're treating
  44893. // it as the trailing edge, or we've hit the `maxWait` limit.
  44894. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  44895. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  44896. }
  44897. function timerExpired() {
  44898. var time = now();
  44899. if (shouldInvoke(time)) {
  44900. return trailingEdge(time);
  44901. }
  44902. // Restart the timer.
  44903. timerId = setTimeout(timerExpired, remainingWait(time));
  44904. }
  44905. function trailingEdge(time) {
  44906. timerId = undefined;
  44907. // Only invoke if we have `lastArgs` which means `func` has been
  44908. // debounced at least once.
  44909. if (trailing && lastArgs) {
  44910. return invokeFunc(time);
  44911. }
  44912. lastArgs = lastThis = undefined;
  44913. return result;
  44914. }
  44915. function cancel() {
  44916. if (timerId !== undefined) {
  44917. clearTimeout(timerId);
  44918. }
  44919. lastInvokeTime = 0;
  44920. lastArgs = lastCallTime = lastThis = timerId = undefined;
  44921. }
  44922. function flush() {
  44923. return timerId === undefined ? result : trailingEdge(now());
  44924. }
  44925. function debounced() {
  44926. var time = now(),
  44927. isInvoking = shouldInvoke(time);
  44928. lastArgs = arguments;
  44929. lastThis = this;
  44930. lastCallTime = time;
  44931. if (isInvoking) {
  44932. if (timerId === undefined) {
  44933. return leadingEdge(lastCallTime);
  44934. }
  44935. if (maxing) {
  44936. // Handle invocations in a tight loop.
  44937. timerId = setTimeout(timerExpired, wait);
  44938. return invokeFunc(lastCallTime);
  44939. }
  44940. }
  44941. if (timerId === undefined) {
  44942. timerId = setTimeout(timerExpired, wait);
  44943. }
  44944. return result;
  44945. }
  44946. debounced.cancel = cancel;
  44947. debounced.flush = flush;
  44948. return debounced;
  44949. }
  44950. /**
  44951. * Checks if `value` is the
  44952. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  44953. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  44954. *
  44955. * @static
  44956. * @memberOf _
  44957. * @since 0.1.0
  44958. * @category Lang
  44959. * @param {*} value The value to check.
  44960. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  44961. * @example
  44962. *
  44963. * _.isObject({});
  44964. * // => true
  44965. *
  44966. * _.isObject([1, 2, 3]);
  44967. * // => true
  44968. *
  44969. * _.isObject(_.noop);
  44970. * // => true
  44971. *
  44972. * _.isObject(null);
  44973. * // => false
  44974. */
  44975. function isObject(value) {
  44976. var type = typeof value;
  44977. return !!value && (type == 'object' || type == 'function');
  44978. }
  44979. /**
  44980. * Checks if `value` is object-like. A value is object-like if it's not `null`
  44981. * and has a `typeof` result of "object".
  44982. *
  44983. * @static
  44984. * @memberOf _
  44985. * @since 4.0.0
  44986. * @category Lang
  44987. * @param {*} value The value to check.
  44988. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  44989. * @example
  44990. *
  44991. * _.isObjectLike({});
  44992. * // => true
  44993. *
  44994. * _.isObjectLike([1, 2, 3]);
  44995. * // => true
  44996. *
  44997. * _.isObjectLike(_.noop);
  44998. * // => false
  44999. *
  45000. * _.isObjectLike(null);
  45001. * // => false
  45002. */
  45003. function isObjectLike(value) {
  45004. return !!value && typeof value == 'object';
  45005. }
  45006. /**
  45007. * Checks if `value` is classified as a `Symbol` primitive or object.
  45008. *
  45009. * @static
  45010. * @memberOf _
  45011. * @since 4.0.0
  45012. * @category Lang
  45013. * @param {*} value The value to check.
  45014. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  45015. * @example
  45016. *
  45017. * _.isSymbol(Symbol.iterator);
  45018. * // => true
  45019. *
  45020. * _.isSymbol('abc');
  45021. * // => false
  45022. */
  45023. function isSymbol(value) {
  45024. return typeof value == 'symbol' ||
  45025. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  45026. }
  45027. /**
  45028. * Converts `value` to a number.
  45029. *
  45030. * @static
  45031. * @memberOf _
  45032. * @since 4.0.0
  45033. * @category Lang
  45034. * @param {*} value The value to process.
  45035. * @returns {number} Returns the number.
  45036. * @example
  45037. *
  45038. * _.toNumber(3.2);
  45039. * // => 3.2
  45040. *
  45041. * _.toNumber(Number.MIN_VALUE);
  45042. * // => 5e-324
  45043. *
  45044. * _.toNumber(Infinity);
  45045. * // => Infinity
  45046. *
  45047. * _.toNumber('3.2');
  45048. * // => 3.2
  45049. */
  45050. function toNumber(value) {
  45051. if (typeof value == 'number') {
  45052. return value;
  45053. }
  45054. if (isSymbol(value)) {
  45055. return NAN;
  45056. }
  45057. if (isObject(value)) {
  45058. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  45059. value = isObject(other) ? (other + '') : other;
  45060. }
  45061. if (typeof value != 'string') {
  45062. return value === 0 ? value : +value;
  45063. }
  45064. value = value.replace(reTrim, '');
  45065. var isBinary = reIsBinary.test(value);
  45066. return (isBinary || reIsOctal.test(value))
  45067. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  45068. : (reIsBadHex.test(value) ? NAN : +value);
  45069. }
  45070. module.exports = debounce;
  45071. /***/ }),
  45072. /***/ 20773:
  45073. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  45074. /**
  45075. * lodash (Custom Build) <https://lodash.com/>
  45076. * Build: `lodash modularize exports="npm" -o ./`
  45077. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  45078. * Released under MIT license <https://lodash.com/license>
  45079. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  45080. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  45081. */
  45082. /** Used as the `TypeError` message for "Functions" methods. */
  45083. var FUNC_ERROR_TEXT = 'Expected a function';
  45084. /** Used to stand-in for `undefined` hash values. */
  45085. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  45086. /** `Object#toString` result references. */
  45087. var funcTag = '[object Function]',
  45088. genTag = '[object GeneratorFunction]';
  45089. /**
  45090. * Used to match `RegExp`
  45091. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  45092. */
  45093. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  45094. /** Used to detect host constructors (Safari). */
  45095. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  45096. /** Detect free variable `global` from Node.js. */
  45097. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  45098. /** Detect free variable `self`. */
  45099. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  45100. /** Used as a reference to the global object. */
  45101. var root = freeGlobal || freeSelf || Function('return this')();
  45102. /**
  45103. * Gets the value at `key` of `object`.
  45104. *
  45105. * @private
  45106. * @param {Object} [object] The object to query.
  45107. * @param {string} key The key of the property to get.
  45108. * @returns {*} Returns the property value.
  45109. */
  45110. function getValue(object, key) {
  45111. return object == null ? undefined : object[key];
  45112. }
  45113. /**
  45114. * Checks if `value` is a host object in IE < 9.
  45115. *
  45116. * @private
  45117. * @param {*} value The value to check.
  45118. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  45119. */
  45120. function isHostObject(value) {
  45121. // Many host objects are `Object` objects that can coerce to strings
  45122. // despite having improperly defined `toString` methods.
  45123. var result = false;
  45124. if (value != null && typeof value.toString != 'function') {
  45125. try {
  45126. result = !!(value + '');
  45127. } catch (e) {}
  45128. }
  45129. return result;
  45130. }
  45131. /** Used for built-in method references. */
  45132. var arrayProto = Array.prototype,
  45133. funcProto = Function.prototype,
  45134. objectProto = Object.prototype;
  45135. /** Used to detect overreaching core-js shims. */
  45136. var coreJsData = root['__core-js_shared__'];
  45137. /** Used to detect methods masquerading as native. */
  45138. var maskSrcKey = (function() {
  45139. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  45140. return uid ? ('Symbol(src)_1.' + uid) : '';
  45141. }());
  45142. /** Used to resolve the decompiled source of functions. */
  45143. var funcToString = funcProto.toString;
  45144. /** Used to check objects for own properties. */
  45145. var hasOwnProperty = objectProto.hasOwnProperty;
  45146. /**
  45147. * Used to resolve the
  45148. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  45149. * of values.
  45150. */
  45151. var objectToString = objectProto.toString;
  45152. /** Used to detect if a method is native. */
  45153. var reIsNative = RegExp('^' +
  45154. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  45155. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  45156. );
  45157. /** Built-in value references. */
  45158. var splice = arrayProto.splice;
  45159. /* Built-in method references that are verified to be native. */
  45160. var Map = getNative(root, 'Map'),
  45161. nativeCreate = getNative(Object, 'create');
  45162. /**
  45163. * Creates a hash object.
  45164. *
  45165. * @private
  45166. * @constructor
  45167. * @param {Array} [entries] The key-value pairs to cache.
  45168. */
  45169. function Hash(entries) {
  45170. var index = -1,
  45171. length = entries ? entries.length : 0;
  45172. this.clear();
  45173. while (++index < length) {
  45174. var entry = entries[index];
  45175. this.set(entry[0], entry[1]);
  45176. }
  45177. }
  45178. /**
  45179. * Removes all key-value entries from the hash.
  45180. *
  45181. * @private
  45182. * @name clear
  45183. * @memberOf Hash
  45184. */
  45185. function hashClear() {
  45186. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  45187. }
  45188. /**
  45189. * Removes `key` and its value from the hash.
  45190. *
  45191. * @private
  45192. * @name delete
  45193. * @memberOf Hash
  45194. * @param {Object} hash The hash to modify.
  45195. * @param {string} key The key of the value to remove.
  45196. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  45197. */
  45198. function hashDelete(key) {
  45199. return this.has(key) && delete this.__data__[key];
  45200. }
  45201. /**
  45202. * Gets the hash value for `key`.
  45203. *
  45204. * @private
  45205. * @name get
  45206. * @memberOf Hash
  45207. * @param {string} key The key of the value to get.
  45208. * @returns {*} Returns the entry value.
  45209. */
  45210. function hashGet(key) {
  45211. var data = this.__data__;
  45212. if (nativeCreate) {
  45213. var result = data[key];
  45214. return result === HASH_UNDEFINED ? undefined : result;
  45215. }
  45216. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  45217. }
  45218. /**
  45219. * Checks if a hash value for `key` exists.
  45220. *
  45221. * @private
  45222. * @name has
  45223. * @memberOf Hash
  45224. * @param {string} key The key of the entry to check.
  45225. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  45226. */
  45227. function hashHas(key) {
  45228. var data = this.__data__;
  45229. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  45230. }
  45231. /**
  45232. * Sets the hash `key` to `value`.
  45233. *
  45234. * @private
  45235. * @name set
  45236. * @memberOf Hash
  45237. * @param {string} key The key of the value to set.
  45238. * @param {*} value The value to set.
  45239. * @returns {Object} Returns the hash instance.
  45240. */
  45241. function hashSet(key, value) {
  45242. var data = this.__data__;
  45243. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  45244. return this;
  45245. }
  45246. // Add methods to `Hash`.
  45247. Hash.prototype.clear = hashClear;
  45248. Hash.prototype['delete'] = hashDelete;
  45249. Hash.prototype.get = hashGet;
  45250. Hash.prototype.has = hashHas;
  45251. Hash.prototype.set = hashSet;
  45252. /**
  45253. * Creates an list cache object.
  45254. *
  45255. * @private
  45256. * @constructor
  45257. * @param {Array} [entries] The key-value pairs to cache.
  45258. */
  45259. function ListCache(entries) {
  45260. var index = -1,
  45261. length = entries ? entries.length : 0;
  45262. this.clear();
  45263. while (++index < length) {
  45264. var entry = entries[index];
  45265. this.set(entry[0], entry[1]);
  45266. }
  45267. }
  45268. /**
  45269. * Removes all key-value entries from the list cache.
  45270. *
  45271. * @private
  45272. * @name clear
  45273. * @memberOf ListCache
  45274. */
  45275. function listCacheClear() {
  45276. this.__data__ = [];
  45277. }
  45278. /**
  45279. * Removes `key` and its value from the list cache.
  45280. *
  45281. * @private
  45282. * @name delete
  45283. * @memberOf ListCache
  45284. * @param {string} key The key of the value to remove.
  45285. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  45286. */
  45287. function listCacheDelete(key) {
  45288. var data = this.__data__,
  45289. index = assocIndexOf(data, key);
  45290. if (index < 0) {
  45291. return false;
  45292. }
  45293. var lastIndex = data.length - 1;
  45294. if (index == lastIndex) {
  45295. data.pop();
  45296. } else {
  45297. splice.call(data, index, 1);
  45298. }
  45299. return true;
  45300. }
  45301. /**
  45302. * Gets the list cache value for `key`.
  45303. *
  45304. * @private
  45305. * @name get
  45306. * @memberOf ListCache
  45307. * @param {string} key The key of the value to get.
  45308. * @returns {*} Returns the entry value.
  45309. */
  45310. function listCacheGet(key) {
  45311. var data = this.__data__,
  45312. index = assocIndexOf(data, key);
  45313. return index < 0 ? undefined : data[index][1];
  45314. }
  45315. /**
  45316. * Checks if a list cache value for `key` exists.
  45317. *
  45318. * @private
  45319. * @name has
  45320. * @memberOf ListCache
  45321. * @param {string} key The key of the entry to check.
  45322. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  45323. */
  45324. function listCacheHas(key) {
  45325. return assocIndexOf(this.__data__, key) > -1;
  45326. }
  45327. /**
  45328. * Sets the list cache `key` to `value`.
  45329. *
  45330. * @private
  45331. * @name set
  45332. * @memberOf ListCache
  45333. * @param {string} key The key of the value to set.
  45334. * @param {*} value The value to set.
  45335. * @returns {Object} Returns the list cache instance.
  45336. */
  45337. function listCacheSet(key, value) {
  45338. var data = this.__data__,
  45339. index = assocIndexOf(data, key);
  45340. if (index < 0) {
  45341. data.push([key, value]);
  45342. } else {
  45343. data[index][1] = value;
  45344. }
  45345. return this;
  45346. }
  45347. // Add methods to `ListCache`.
  45348. ListCache.prototype.clear = listCacheClear;
  45349. ListCache.prototype['delete'] = listCacheDelete;
  45350. ListCache.prototype.get = listCacheGet;
  45351. ListCache.prototype.has = listCacheHas;
  45352. ListCache.prototype.set = listCacheSet;
  45353. /**
  45354. * Creates a map cache object to store key-value pairs.
  45355. *
  45356. * @private
  45357. * @constructor
  45358. * @param {Array} [entries] The key-value pairs to cache.
  45359. */
  45360. function MapCache(entries) {
  45361. var index = -1,
  45362. length = entries ? entries.length : 0;
  45363. this.clear();
  45364. while (++index < length) {
  45365. var entry = entries[index];
  45366. this.set(entry[0], entry[1]);
  45367. }
  45368. }
  45369. /**
  45370. * Removes all key-value entries from the map.
  45371. *
  45372. * @private
  45373. * @name clear
  45374. * @memberOf MapCache
  45375. */
  45376. function mapCacheClear() {
  45377. this.__data__ = {
  45378. 'hash': new Hash,
  45379. 'map': new (Map || ListCache),
  45380. 'string': new Hash
  45381. };
  45382. }
  45383. /**
  45384. * Removes `key` and its value from the map.
  45385. *
  45386. * @private
  45387. * @name delete
  45388. * @memberOf MapCache
  45389. * @param {string} key The key of the value to remove.
  45390. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  45391. */
  45392. function mapCacheDelete(key) {
  45393. return getMapData(this, key)['delete'](key);
  45394. }
  45395. /**
  45396. * Gets the map value for `key`.
  45397. *
  45398. * @private
  45399. * @name get
  45400. * @memberOf MapCache
  45401. * @param {string} key The key of the value to get.
  45402. * @returns {*} Returns the entry value.
  45403. */
  45404. function mapCacheGet(key) {
  45405. return getMapData(this, key).get(key);
  45406. }
  45407. /**
  45408. * Checks if a map value for `key` exists.
  45409. *
  45410. * @private
  45411. * @name has
  45412. * @memberOf MapCache
  45413. * @param {string} key The key of the entry to check.
  45414. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  45415. */
  45416. function mapCacheHas(key) {
  45417. return getMapData(this, key).has(key);
  45418. }
  45419. /**
  45420. * Sets the map `key` to `value`.
  45421. *
  45422. * @private
  45423. * @name set
  45424. * @memberOf MapCache
  45425. * @param {string} key The key of the value to set.
  45426. * @param {*} value The value to set.
  45427. * @returns {Object} Returns the map cache instance.
  45428. */
  45429. function mapCacheSet(key, value) {
  45430. getMapData(this, key).set(key, value);
  45431. return this;
  45432. }
  45433. // Add methods to `MapCache`.
  45434. MapCache.prototype.clear = mapCacheClear;
  45435. MapCache.prototype['delete'] = mapCacheDelete;
  45436. MapCache.prototype.get = mapCacheGet;
  45437. MapCache.prototype.has = mapCacheHas;
  45438. MapCache.prototype.set = mapCacheSet;
  45439. /**
  45440. * Gets the index at which the `key` is found in `array` of key-value pairs.
  45441. *
  45442. * @private
  45443. * @param {Array} array The array to inspect.
  45444. * @param {*} key The key to search for.
  45445. * @returns {number} Returns the index of the matched value, else `-1`.
  45446. */
  45447. function assocIndexOf(array, key) {
  45448. var length = array.length;
  45449. while (length--) {
  45450. if (eq(array[length][0], key)) {
  45451. return length;
  45452. }
  45453. }
  45454. return -1;
  45455. }
  45456. /**
  45457. * The base implementation of `_.isNative` without bad shim checks.
  45458. *
  45459. * @private
  45460. * @param {*} value The value to check.
  45461. * @returns {boolean} Returns `true` if `value` is a native function,
  45462. * else `false`.
  45463. */
  45464. function baseIsNative(value) {
  45465. if (!isObject(value) || isMasked(value)) {
  45466. return false;
  45467. }
  45468. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  45469. return pattern.test(toSource(value));
  45470. }
  45471. /**
  45472. * Gets the data for `map`.
  45473. *
  45474. * @private
  45475. * @param {Object} map The map to query.
  45476. * @param {string} key The reference key.
  45477. * @returns {*} Returns the map data.
  45478. */
  45479. function getMapData(map, key) {
  45480. var data = map.__data__;
  45481. return isKeyable(key)
  45482. ? data[typeof key == 'string' ? 'string' : 'hash']
  45483. : data.map;
  45484. }
  45485. /**
  45486. * Gets the native function at `key` of `object`.
  45487. *
  45488. * @private
  45489. * @param {Object} object The object to query.
  45490. * @param {string} key The key of the method to get.
  45491. * @returns {*} Returns the function if it's native, else `undefined`.
  45492. */
  45493. function getNative(object, key) {
  45494. var value = getValue(object, key);
  45495. return baseIsNative(value) ? value : undefined;
  45496. }
  45497. /**
  45498. * Checks if `value` is suitable for use as unique object key.
  45499. *
  45500. * @private
  45501. * @param {*} value The value to check.
  45502. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  45503. */
  45504. function isKeyable(value) {
  45505. var type = typeof value;
  45506. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  45507. ? (value !== '__proto__')
  45508. : (value === null);
  45509. }
  45510. /**
  45511. * Checks if `func` has its source masked.
  45512. *
  45513. * @private
  45514. * @param {Function} func The function to check.
  45515. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  45516. */
  45517. function isMasked(func) {
  45518. return !!maskSrcKey && (maskSrcKey in func);
  45519. }
  45520. /**
  45521. * Converts `func` to its source code.
  45522. *
  45523. * @private
  45524. * @param {Function} func The function to process.
  45525. * @returns {string} Returns the source code.
  45526. */
  45527. function toSource(func) {
  45528. if (func != null) {
  45529. try {
  45530. return funcToString.call(func);
  45531. } catch (e) {}
  45532. try {
  45533. return (func + '');
  45534. } catch (e) {}
  45535. }
  45536. return '';
  45537. }
  45538. /**
  45539. * Creates a function that memoizes the result of `func`. If `resolver` is
  45540. * provided, it determines the cache key for storing the result based on the
  45541. * arguments provided to the memoized function. By default, the first argument
  45542. * provided to the memoized function is used as the map cache key. The `func`
  45543. * is invoked with the `this` binding of the memoized function.
  45544. *
  45545. * **Note:** The cache is exposed as the `cache` property on the memoized
  45546. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  45547. * constructor with one whose instances implement the
  45548. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  45549. * method interface of `delete`, `get`, `has`, and `set`.
  45550. *
  45551. * @static
  45552. * @memberOf _
  45553. * @since 0.1.0
  45554. * @category Function
  45555. * @param {Function} func The function to have its output memoized.
  45556. * @param {Function} [resolver] The function to resolve the cache key.
  45557. * @returns {Function} Returns the new memoized function.
  45558. * @example
  45559. *
  45560. * var object = { 'a': 1, 'b': 2 };
  45561. * var other = { 'c': 3, 'd': 4 };
  45562. *
  45563. * var values = _.memoize(_.values);
  45564. * values(object);
  45565. * // => [1, 2]
  45566. *
  45567. * values(other);
  45568. * // => [3, 4]
  45569. *
  45570. * object.a = 2;
  45571. * values(object);
  45572. * // => [1, 2]
  45573. *
  45574. * // Modify the result cache.
  45575. * values.cache.set(object, ['a', 'b']);
  45576. * values(object);
  45577. * // => ['a', 'b']
  45578. *
  45579. * // Replace `_.memoize.Cache`.
  45580. * _.memoize.Cache = WeakMap;
  45581. */
  45582. function memoize(func, resolver) {
  45583. if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
  45584. throw new TypeError(FUNC_ERROR_TEXT);
  45585. }
  45586. var memoized = function() {
  45587. var args = arguments,
  45588. key = resolver ? resolver.apply(this, args) : args[0],
  45589. cache = memoized.cache;
  45590. if (cache.has(key)) {
  45591. return cache.get(key);
  45592. }
  45593. var result = func.apply(this, args);
  45594. memoized.cache = cache.set(key, result);
  45595. return result;
  45596. };
  45597. memoized.cache = new (memoize.Cache || MapCache);
  45598. return memoized;
  45599. }
  45600. // Assign cache to `_.memoize`.
  45601. memoize.Cache = MapCache;
  45602. /**
  45603. * Performs a
  45604. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  45605. * comparison between two values to determine if they are equivalent.
  45606. *
  45607. * @static
  45608. * @memberOf _
  45609. * @since 4.0.0
  45610. * @category Lang
  45611. * @param {*} value The value to compare.
  45612. * @param {*} other The other value to compare.
  45613. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  45614. * @example
  45615. *
  45616. * var object = { 'a': 1 };
  45617. * var other = { 'a': 1 };
  45618. *
  45619. * _.eq(object, object);
  45620. * // => true
  45621. *
  45622. * _.eq(object, other);
  45623. * // => false
  45624. *
  45625. * _.eq('a', 'a');
  45626. * // => true
  45627. *
  45628. * _.eq('a', Object('a'));
  45629. * // => false
  45630. *
  45631. * _.eq(NaN, NaN);
  45632. * // => true
  45633. */
  45634. function eq(value, other) {
  45635. return value === other || (value !== value && other !== other);
  45636. }
  45637. /**
  45638. * Checks if `value` is classified as a `Function` object.
  45639. *
  45640. * @static
  45641. * @memberOf _
  45642. * @since 0.1.0
  45643. * @category Lang
  45644. * @param {*} value The value to check.
  45645. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  45646. * @example
  45647. *
  45648. * _.isFunction(_);
  45649. * // => true
  45650. *
  45651. * _.isFunction(/abc/);
  45652. * // => false
  45653. */
  45654. function isFunction(value) {
  45655. // The use of `Object#toString` avoids issues with the `typeof` operator
  45656. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  45657. var tag = isObject(value) ? objectToString.call(value) : '';
  45658. return tag == funcTag || tag == genTag;
  45659. }
  45660. /**
  45661. * Checks if `value` is the
  45662. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  45663. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  45664. *
  45665. * @static
  45666. * @memberOf _
  45667. * @since 0.1.0
  45668. * @category Lang
  45669. * @param {*} value The value to check.
  45670. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  45671. * @example
  45672. *
  45673. * _.isObject({});
  45674. * // => true
  45675. *
  45676. * _.isObject([1, 2, 3]);
  45677. * // => true
  45678. *
  45679. * _.isObject(_.noop);
  45680. * // => true
  45681. *
  45682. * _.isObject(null);
  45683. * // => false
  45684. */
  45685. function isObject(value) {
  45686. var type = typeof value;
  45687. return !!value && (type == 'object' || type == 'function');
  45688. }
  45689. module.exports = memoize;
  45690. /***/ }),
  45691. /***/ 93096:
  45692. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  45693. /**
  45694. * lodash (Custom Build) <https://lodash.com/>
  45695. * Build: `lodash modularize exports="npm" -o ./`
  45696. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  45697. * Released under MIT license <https://lodash.com/license>
  45698. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  45699. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  45700. */
  45701. /** Used as the `TypeError` message for "Functions" methods. */
  45702. var FUNC_ERROR_TEXT = 'Expected a function';
  45703. /** Used as references for various `Number` constants. */
  45704. var NAN = 0 / 0;
  45705. /** `Object#toString` result references. */
  45706. var symbolTag = '[object Symbol]';
  45707. /** Used to match leading and trailing whitespace. */
  45708. var reTrim = /^\s+|\s+$/g;
  45709. /** Used to detect bad signed hexadecimal string values. */
  45710. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  45711. /** Used to detect binary string values. */
  45712. var reIsBinary = /^0b[01]+$/i;
  45713. /** Used to detect octal string values. */
  45714. var reIsOctal = /^0o[0-7]+$/i;
  45715. /** Built-in method references without a dependency on `root`. */
  45716. var freeParseInt = parseInt;
  45717. /** Detect free variable `global` from Node.js. */
  45718. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  45719. /** Detect free variable `self`. */
  45720. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  45721. /** Used as a reference to the global object. */
  45722. var root = freeGlobal || freeSelf || Function('return this')();
  45723. /** Used for built-in method references. */
  45724. var objectProto = Object.prototype;
  45725. /**
  45726. * Used to resolve the
  45727. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  45728. * of values.
  45729. */
  45730. var objectToString = objectProto.toString;
  45731. /* Built-in method references for those with the same name as other `lodash` methods. */
  45732. var nativeMax = Math.max,
  45733. nativeMin = Math.min;
  45734. /**
  45735. * Gets the timestamp of the number of milliseconds that have elapsed since
  45736. * the Unix epoch (1 January 1970 00:00:00 UTC).
  45737. *
  45738. * @static
  45739. * @memberOf _
  45740. * @since 2.4.0
  45741. * @category Date
  45742. * @returns {number} Returns the timestamp.
  45743. * @example
  45744. *
  45745. * _.defer(function(stamp) {
  45746. * console.log(_.now() - stamp);
  45747. * }, _.now());
  45748. * // => Logs the number of milliseconds it took for the deferred invocation.
  45749. */
  45750. var now = function() {
  45751. return root.Date.now();
  45752. };
  45753. /**
  45754. * Creates a debounced function that delays invoking `func` until after `wait`
  45755. * milliseconds have elapsed since the last time the debounced function was
  45756. * invoked. The debounced function comes with a `cancel` method to cancel
  45757. * delayed `func` invocations and a `flush` method to immediately invoke them.
  45758. * Provide `options` to indicate whether `func` should be invoked on the
  45759. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  45760. * with the last arguments provided to the debounced function. Subsequent
  45761. * calls to the debounced function return the result of the last `func`
  45762. * invocation.
  45763. *
  45764. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  45765. * invoked on the trailing edge of the timeout only if the debounced function
  45766. * is invoked more than once during the `wait` timeout.
  45767. *
  45768. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  45769. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  45770. *
  45771. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  45772. * for details over the differences between `_.debounce` and `_.throttle`.
  45773. *
  45774. * @static
  45775. * @memberOf _
  45776. * @since 0.1.0
  45777. * @category Function
  45778. * @param {Function} func The function to debounce.
  45779. * @param {number} [wait=0] The number of milliseconds to delay.
  45780. * @param {Object} [options={}] The options object.
  45781. * @param {boolean} [options.leading=false]
  45782. * Specify invoking on the leading edge of the timeout.
  45783. * @param {number} [options.maxWait]
  45784. * The maximum time `func` is allowed to be delayed before it's invoked.
  45785. * @param {boolean} [options.trailing=true]
  45786. * Specify invoking on the trailing edge of the timeout.
  45787. * @returns {Function} Returns the new debounced function.
  45788. * @example
  45789. *
  45790. * // Avoid costly calculations while the window size is in flux.
  45791. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  45792. *
  45793. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  45794. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  45795. * 'leading': true,
  45796. * 'trailing': false
  45797. * }));
  45798. *
  45799. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  45800. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  45801. * var source = new EventSource('/stream');
  45802. * jQuery(source).on('message', debounced);
  45803. *
  45804. * // Cancel the trailing debounced invocation.
  45805. * jQuery(window).on('popstate', debounced.cancel);
  45806. */
  45807. function debounce(func, wait, options) {
  45808. var lastArgs,
  45809. lastThis,
  45810. maxWait,
  45811. result,
  45812. timerId,
  45813. lastCallTime,
  45814. lastInvokeTime = 0,
  45815. leading = false,
  45816. maxing = false,
  45817. trailing = true;
  45818. if (typeof func != 'function') {
  45819. throw new TypeError(FUNC_ERROR_TEXT);
  45820. }
  45821. wait = toNumber(wait) || 0;
  45822. if (isObject(options)) {
  45823. leading = !!options.leading;
  45824. maxing = 'maxWait' in options;
  45825. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  45826. trailing = 'trailing' in options ? !!options.trailing : trailing;
  45827. }
  45828. function invokeFunc(time) {
  45829. var args = lastArgs,
  45830. thisArg = lastThis;
  45831. lastArgs = lastThis = undefined;
  45832. lastInvokeTime = time;
  45833. result = func.apply(thisArg, args);
  45834. return result;
  45835. }
  45836. function leadingEdge(time) {
  45837. // Reset any `maxWait` timer.
  45838. lastInvokeTime = time;
  45839. // Start the timer for the trailing edge.
  45840. timerId = setTimeout(timerExpired, wait);
  45841. // Invoke the leading edge.
  45842. return leading ? invokeFunc(time) : result;
  45843. }
  45844. function remainingWait(time) {
  45845. var timeSinceLastCall = time - lastCallTime,
  45846. timeSinceLastInvoke = time - lastInvokeTime,
  45847. result = wait - timeSinceLastCall;
  45848. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  45849. }
  45850. function shouldInvoke(time) {
  45851. var timeSinceLastCall = time - lastCallTime,
  45852. timeSinceLastInvoke = time - lastInvokeTime;
  45853. // Either this is the first call, activity has stopped and we're at the
  45854. // trailing edge, the system time has gone backwards and we're treating
  45855. // it as the trailing edge, or we've hit the `maxWait` limit.
  45856. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  45857. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  45858. }
  45859. function timerExpired() {
  45860. var time = now();
  45861. if (shouldInvoke(time)) {
  45862. return trailingEdge(time);
  45863. }
  45864. // Restart the timer.
  45865. timerId = setTimeout(timerExpired, remainingWait(time));
  45866. }
  45867. function trailingEdge(time) {
  45868. timerId = undefined;
  45869. // Only invoke if we have `lastArgs` which means `func` has been
  45870. // debounced at least once.
  45871. if (trailing && lastArgs) {
  45872. return invokeFunc(time);
  45873. }
  45874. lastArgs = lastThis = undefined;
  45875. return result;
  45876. }
  45877. function cancel() {
  45878. if (timerId !== undefined) {
  45879. clearTimeout(timerId);
  45880. }
  45881. lastInvokeTime = 0;
  45882. lastArgs = lastCallTime = lastThis = timerId = undefined;
  45883. }
  45884. function flush() {
  45885. return timerId === undefined ? result : trailingEdge(now());
  45886. }
  45887. function debounced() {
  45888. var time = now(),
  45889. isInvoking = shouldInvoke(time);
  45890. lastArgs = arguments;
  45891. lastThis = this;
  45892. lastCallTime = time;
  45893. if (isInvoking) {
  45894. if (timerId === undefined) {
  45895. return leadingEdge(lastCallTime);
  45896. }
  45897. if (maxing) {
  45898. // Handle invocations in a tight loop.
  45899. timerId = setTimeout(timerExpired, wait);
  45900. return invokeFunc(lastCallTime);
  45901. }
  45902. }
  45903. if (timerId === undefined) {
  45904. timerId = setTimeout(timerExpired, wait);
  45905. }
  45906. return result;
  45907. }
  45908. debounced.cancel = cancel;
  45909. debounced.flush = flush;
  45910. return debounced;
  45911. }
  45912. /**
  45913. * Creates a throttled function that only invokes `func` at most once per
  45914. * every `wait` milliseconds. The throttled function comes with a `cancel`
  45915. * method to cancel delayed `func` invocations and a `flush` method to
  45916. * immediately invoke them. Provide `options` to indicate whether `func`
  45917. * should be invoked on the leading and/or trailing edge of the `wait`
  45918. * timeout. The `func` is invoked with the last arguments provided to the
  45919. * throttled function. Subsequent calls to the throttled function return the
  45920. * result of the last `func` invocation.
  45921. *
  45922. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  45923. * invoked on the trailing edge of the timeout only if the throttled function
  45924. * is invoked more than once during the `wait` timeout.
  45925. *
  45926. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  45927. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  45928. *
  45929. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  45930. * for details over the differences between `_.throttle` and `_.debounce`.
  45931. *
  45932. * @static
  45933. * @memberOf _
  45934. * @since 0.1.0
  45935. * @category Function
  45936. * @param {Function} func The function to throttle.
  45937. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  45938. * @param {Object} [options={}] The options object.
  45939. * @param {boolean} [options.leading=true]
  45940. * Specify invoking on the leading edge of the timeout.
  45941. * @param {boolean} [options.trailing=true]
  45942. * Specify invoking on the trailing edge of the timeout.
  45943. * @returns {Function} Returns the new throttled function.
  45944. * @example
  45945. *
  45946. * // Avoid excessively updating the position while scrolling.
  45947. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  45948. *
  45949. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  45950. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  45951. * jQuery(element).on('click', throttled);
  45952. *
  45953. * // Cancel the trailing throttled invocation.
  45954. * jQuery(window).on('popstate', throttled.cancel);
  45955. */
  45956. function throttle(func, wait, options) {
  45957. var leading = true,
  45958. trailing = true;
  45959. if (typeof func != 'function') {
  45960. throw new TypeError(FUNC_ERROR_TEXT);
  45961. }
  45962. if (isObject(options)) {
  45963. leading = 'leading' in options ? !!options.leading : leading;
  45964. trailing = 'trailing' in options ? !!options.trailing : trailing;
  45965. }
  45966. return debounce(func, wait, {
  45967. 'leading': leading,
  45968. 'maxWait': wait,
  45969. 'trailing': trailing
  45970. });
  45971. }
  45972. /**
  45973. * Checks if `value` is the
  45974. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  45975. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  45976. *
  45977. * @static
  45978. * @memberOf _
  45979. * @since 0.1.0
  45980. * @category Lang
  45981. * @param {*} value The value to check.
  45982. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  45983. * @example
  45984. *
  45985. * _.isObject({});
  45986. * // => true
  45987. *
  45988. * _.isObject([1, 2, 3]);
  45989. * // => true
  45990. *
  45991. * _.isObject(_.noop);
  45992. * // => true
  45993. *
  45994. * _.isObject(null);
  45995. * // => false
  45996. */
  45997. function isObject(value) {
  45998. var type = typeof value;
  45999. return !!value && (type == 'object' || type == 'function');
  46000. }
  46001. /**
  46002. * Checks if `value` is object-like. A value is object-like if it's not `null`
  46003. * and has a `typeof` result of "object".
  46004. *
  46005. * @static
  46006. * @memberOf _
  46007. * @since 4.0.0
  46008. * @category Lang
  46009. * @param {*} value The value to check.
  46010. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  46011. * @example
  46012. *
  46013. * _.isObjectLike({});
  46014. * // => true
  46015. *
  46016. * _.isObjectLike([1, 2, 3]);
  46017. * // => true
  46018. *
  46019. * _.isObjectLike(_.noop);
  46020. * // => false
  46021. *
  46022. * _.isObjectLike(null);
  46023. * // => false
  46024. */
  46025. function isObjectLike(value) {
  46026. return !!value && typeof value == 'object';
  46027. }
  46028. /**
  46029. * Checks if `value` is classified as a `Symbol` primitive or object.
  46030. *
  46031. * @static
  46032. * @memberOf _
  46033. * @since 4.0.0
  46034. * @category Lang
  46035. * @param {*} value The value to check.
  46036. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  46037. * @example
  46038. *
  46039. * _.isSymbol(Symbol.iterator);
  46040. * // => true
  46041. *
  46042. * _.isSymbol('abc');
  46043. * // => false
  46044. */
  46045. function isSymbol(value) {
  46046. return typeof value == 'symbol' ||
  46047. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  46048. }
  46049. /**
  46050. * Converts `value` to a number.
  46051. *
  46052. * @static
  46053. * @memberOf _
  46054. * @since 4.0.0
  46055. * @category Lang
  46056. * @param {*} value The value to process.
  46057. * @returns {number} Returns the number.
  46058. * @example
  46059. *
  46060. * _.toNumber(3.2);
  46061. * // => 3.2
  46062. *
  46063. * _.toNumber(Number.MIN_VALUE);
  46064. * // => 5e-324
  46065. *
  46066. * _.toNumber(Infinity);
  46067. * // => Infinity
  46068. *
  46069. * _.toNumber('3.2');
  46070. * // => 3.2
  46071. */
  46072. function toNumber(value) {
  46073. if (typeof value == 'number') {
  46074. return value;
  46075. }
  46076. if (isSymbol(value)) {
  46077. return NAN;
  46078. }
  46079. if (isObject(value)) {
  46080. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  46081. value = isObject(other) ? (other + '') : other;
  46082. }
  46083. if (typeof value != 'string') {
  46084. return value === 0 ? value : +value;
  46085. }
  46086. value = value.replace(reTrim, '');
  46087. var isBinary = reIsBinary.test(value);
  46088. return (isBinary || reIsOctal.test(value))
  46089. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  46090. : (reIsBadHex.test(value) ? NAN : +value);
  46091. }
  46092. module.exports = throttle;
  46093. /***/ }),
  46094. /***/ 76252:
  46095. /***/ (function(module, exports, __webpack_require__) {
  46096. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  46097. * microplugin.js
  46098. * Copyright (c) 2013 Brian Reavis & contributors
  46099. *
  46100. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  46101. * file except in compliance with the License. You may obtain a copy of the License at:
  46102. * http://www.apache.org/licenses/LICENSE-2.0
  46103. *
  46104. * Unless required by applicable law or agreed to in writing, software distributed under
  46105. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  46106. * ANY KIND, either express or implied. See the License for the specific language
  46107. * governing permissions and limitations under the License.
  46108. *
  46109. * @author Brian Reavis <brian@thirdroute.com>
  46110. */
  46111. (function(root, factory) {
  46112. if (true) {
  46113. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  46114. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  46115. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  46116. __WEBPACK_AMD_DEFINE_FACTORY__),
  46117. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  46118. } else {}
  46119. }(this, function() {
  46120. var MicroPlugin = {};
  46121. MicroPlugin.mixin = function(Interface) {
  46122. Interface.plugins = {};
  46123. /**
  46124. * Initializes the listed plugins (with options).
  46125. * Acceptable formats:
  46126. *
  46127. * List (without options):
  46128. * ['a', 'b', 'c']
  46129. *
  46130. * List (with options):
  46131. * [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
  46132. *
  46133. * Hash (with options):
  46134. * {'a': { ... }, 'b': { ... }, 'c': { ... }}
  46135. *
  46136. * @param {mixed} plugins
  46137. */
  46138. Interface.prototype.initializePlugins = function(plugins) {
  46139. var i, n, key;
  46140. var self = this;
  46141. var queue = [];
  46142. self.plugins = {
  46143. names : [],
  46144. settings : {},
  46145. requested : {},
  46146. loaded : {}
  46147. };
  46148. if (utils.isArray(plugins)) {
  46149. for (i = 0, n = plugins.length; i < n; i++) {
  46150. if (typeof plugins[i] === 'string') {
  46151. queue.push(plugins[i]);
  46152. } else {
  46153. self.plugins.settings[plugins[i].name] = plugins[i].options;
  46154. queue.push(plugins[i].name);
  46155. }
  46156. }
  46157. } else if (plugins) {
  46158. for (key in plugins) {
  46159. if (plugins.hasOwnProperty(key)) {
  46160. self.plugins.settings[key] = plugins[key];
  46161. queue.push(key);
  46162. }
  46163. }
  46164. }
  46165. while (queue.length) {
  46166. self.require(queue.shift());
  46167. }
  46168. };
  46169. Interface.prototype.loadPlugin = function(name) {
  46170. var self = this;
  46171. var plugins = self.plugins;
  46172. var plugin = Interface.plugins[name];
  46173. if (!Interface.plugins.hasOwnProperty(name)) {
  46174. throw new Error('Unable to find "' + name + '" plugin');
  46175. }
  46176. plugins.requested[name] = true;
  46177. plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
  46178. plugins.names.push(name);
  46179. };
  46180. /**
  46181. * Initializes a plugin.
  46182. *
  46183. * @param {string} name
  46184. */
  46185. Interface.prototype.require = function(name) {
  46186. var self = this;
  46187. var plugins = self.plugins;
  46188. if (!self.plugins.loaded.hasOwnProperty(name)) {
  46189. if (plugins.requested[name]) {
  46190. throw new Error('Plugin has circular dependency ("' + name + '")');
  46191. }
  46192. self.loadPlugin(name);
  46193. }
  46194. return plugins.loaded[name];
  46195. };
  46196. /**
  46197. * Registers a plugin.
  46198. *
  46199. * @param {string} name
  46200. * @param {function} fn
  46201. */
  46202. Interface.define = function(name, fn) {
  46203. Interface.plugins[name] = {
  46204. 'name' : name,
  46205. 'fn' : fn
  46206. };
  46207. };
  46208. };
  46209. var utils = {
  46210. isArray: Array.isArray || function(vArg) {
  46211. return Object.prototype.toString.call(vArg) === '[object Array]';
  46212. }
  46213. };
  46214. return MicroPlugin;
  46215. }));
  46216. /***/ }),
  46217. /***/ 42786:
  46218. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46219. //! moment.js locale configuration
  46220. //! locale : Afrikaans [af]
  46221. //! author : Werner Mollentze : https://github.com/wernerm
  46222. ;(function (global, factory) {
  46223. true ? factory(__webpack_require__(30381)) :
  46224. 0
  46225. }(this, (function (moment) { 'use strict';
  46226. //! moment.js locale configuration
  46227. var af = moment.defineLocale('af', {
  46228. months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
  46229. '_'
  46230. ),
  46231. monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
  46232. weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
  46233. '_'
  46234. ),
  46235. weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
  46236. weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
  46237. meridiemParse: /vm|nm/i,
  46238. isPM: function (input) {
  46239. return /^nm$/i.test(input);
  46240. },
  46241. meridiem: function (hours, minutes, isLower) {
  46242. if (hours < 12) {
  46243. return isLower ? 'vm' : 'VM';
  46244. } else {
  46245. return isLower ? 'nm' : 'NM';
  46246. }
  46247. },
  46248. longDateFormat: {
  46249. LT: 'HH:mm',
  46250. LTS: 'HH:mm:ss',
  46251. L: 'DD/MM/YYYY',
  46252. LL: 'D MMMM YYYY',
  46253. LLL: 'D MMMM YYYY HH:mm',
  46254. LLLL: 'dddd, D MMMM YYYY HH:mm',
  46255. },
  46256. calendar: {
  46257. sameDay: '[Vandag om] LT',
  46258. nextDay: '[Môre om] LT',
  46259. nextWeek: 'dddd [om] LT',
  46260. lastDay: '[Gister om] LT',
  46261. lastWeek: '[Laas] dddd [om] LT',
  46262. sameElse: 'L',
  46263. },
  46264. relativeTime: {
  46265. future: 'oor %s',
  46266. past: '%s gelede',
  46267. s: "'n paar sekondes",
  46268. ss: '%d sekondes',
  46269. m: "'n minuut",
  46270. mm: '%d minute',
  46271. h: "'n uur",
  46272. hh: '%d ure',
  46273. d: "'n dag",
  46274. dd: '%d dae',
  46275. M: "'n maand",
  46276. MM: '%d maande',
  46277. y: "'n jaar",
  46278. yy: '%d jaar',
  46279. },
  46280. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  46281. ordinal: function (number) {
  46282. return (
  46283. number +
  46284. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  46285. ); // Thanks to Joris Röling : https://github.com/jjupiter
  46286. },
  46287. week: {
  46288. dow: 1, // Maandag is die eerste dag van die week.
  46289. doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
  46290. },
  46291. });
  46292. return af;
  46293. })));
  46294. /***/ }),
  46295. /***/ 14130:
  46296. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46297. //! moment.js locale configuration
  46298. //! locale : Arabic (Algeria) [ar-dz]
  46299. //! author : Amine Roukh: https://github.com/Amine27
  46300. //! author : Abdel Said: https://github.com/abdelsaid
  46301. //! author : Ahmed Elkhatib
  46302. //! author : forabi https://github.com/forabi
  46303. //! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
  46304. ;(function (global, factory) {
  46305. true ? factory(__webpack_require__(30381)) :
  46306. 0
  46307. }(this, (function (moment) { 'use strict';
  46308. //! moment.js locale configuration
  46309. var pluralForm = function (n) {
  46310. return n === 0
  46311. ? 0
  46312. : n === 1
  46313. ? 1
  46314. : n === 2
  46315. ? 2
  46316. : n % 100 >= 3 && n % 100 <= 10
  46317. ? 3
  46318. : n % 100 >= 11
  46319. ? 4
  46320. : 5;
  46321. },
  46322. plurals = {
  46323. s: [
  46324. 'أقل من ثانية',
  46325. 'ثانية واحدة',
  46326. ['ثانيتان', 'ثانيتين'],
  46327. '%d ثوان',
  46328. '%d ثانية',
  46329. '%d ثانية',
  46330. ],
  46331. m: [
  46332. 'أقل من دقيقة',
  46333. 'دقيقة واحدة',
  46334. ['دقيقتان', 'دقيقتين'],
  46335. '%d دقائق',
  46336. '%d دقيقة',
  46337. '%d دقيقة',
  46338. ],
  46339. h: [
  46340. 'أقل من ساعة',
  46341. 'ساعة واحدة',
  46342. ['ساعتان', 'ساعتين'],
  46343. '%d ساعات',
  46344. '%d ساعة',
  46345. '%d ساعة',
  46346. ],
  46347. d: [
  46348. 'أقل من يوم',
  46349. 'يوم واحد',
  46350. ['يومان', 'يومين'],
  46351. '%d أيام',
  46352. '%d يومًا',
  46353. '%d يوم',
  46354. ],
  46355. M: [
  46356. 'أقل من شهر',
  46357. 'شهر واحد',
  46358. ['شهران', 'شهرين'],
  46359. '%d أشهر',
  46360. '%d شهرا',
  46361. '%d شهر',
  46362. ],
  46363. y: [
  46364. 'أقل من عام',
  46365. 'عام واحد',
  46366. ['عامان', 'عامين'],
  46367. '%d أعوام',
  46368. '%d عامًا',
  46369. '%d عام',
  46370. ],
  46371. },
  46372. pluralize = function (u) {
  46373. return function (number, withoutSuffix, string, isFuture) {
  46374. var f = pluralForm(number),
  46375. str = plurals[u][pluralForm(number)];
  46376. if (f === 2) {
  46377. str = str[withoutSuffix ? 0 : 1];
  46378. }
  46379. return str.replace(/%d/i, number);
  46380. };
  46381. },
  46382. months = [
  46383. 'جانفي',
  46384. 'فيفري',
  46385. 'مارس',
  46386. 'أفريل',
  46387. 'ماي',
  46388. 'جوان',
  46389. 'جويلية',
  46390. 'أوت',
  46391. 'سبتمبر',
  46392. 'أكتوبر',
  46393. 'نوفمبر',
  46394. 'ديسمبر',
  46395. ];
  46396. var arDz = moment.defineLocale('ar-dz', {
  46397. months: months,
  46398. monthsShort: months,
  46399. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  46400. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  46401. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  46402. weekdaysParseExact: true,
  46403. longDateFormat: {
  46404. LT: 'HH:mm',
  46405. LTS: 'HH:mm:ss',
  46406. L: 'D/\u200FM/\u200FYYYY',
  46407. LL: 'D MMMM YYYY',
  46408. LLL: 'D MMMM YYYY HH:mm',
  46409. LLLL: 'dddd D MMMM YYYY HH:mm',
  46410. },
  46411. meridiemParse: /ص|م/,
  46412. isPM: function (input) {
  46413. return 'م' === input;
  46414. },
  46415. meridiem: function (hour, minute, isLower) {
  46416. if (hour < 12) {
  46417. return 'ص';
  46418. } else {
  46419. return 'م';
  46420. }
  46421. },
  46422. calendar: {
  46423. sameDay: '[اليوم عند الساعة] LT',
  46424. nextDay: '[غدًا عند الساعة] LT',
  46425. nextWeek: 'dddd [عند الساعة] LT',
  46426. lastDay: '[أمس عند الساعة] LT',
  46427. lastWeek: 'dddd [عند الساعة] LT',
  46428. sameElse: 'L',
  46429. },
  46430. relativeTime: {
  46431. future: 'بعد %s',
  46432. past: 'منذ %s',
  46433. s: pluralize('s'),
  46434. ss: pluralize('s'),
  46435. m: pluralize('m'),
  46436. mm: pluralize('m'),
  46437. h: pluralize('h'),
  46438. hh: pluralize('h'),
  46439. d: pluralize('d'),
  46440. dd: pluralize('d'),
  46441. M: pluralize('M'),
  46442. MM: pluralize('M'),
  46443. y: pluralize('y'),
  46444. yy: pluralize('y'),
  46445. },
  46446. postformat: function (string) {
  46447. return string.replace(/,/g, '،');
  46448. },
  46449. week: {
  46450. dow: 0, // Sunday is the first day of the week.
  46451. doy: 4, // The week that contains Jan 4th is the first week of the year.
  46452. },
  46453. });
  46454. return arDz;
  46455. })));
  46456. /***/ }),
  46457. /***/ 96135:
  46458. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46459. //! moment.js locale configuration
  46460. //! locale : Arabic (Kuwait) [ar-kw]
  46461. //! author : Nusret Parlak: https://github.com/nusretparlak
  46462. ;(function (global, factory) {
  46463. true ? factory(__webpack_require__(30381)) :
  46464. 0
  46465. }(this, (function (moment) { 'use strict';
  46466. //! moment.js locale configuration
  46467. var arKw = moment.defineLocale('ar-kw', {
  46468. months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  46469. '_'
  46470. ),
  46471. monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  46472. '_'
  46473. ),
  46474. weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  46475. weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  46476. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  46477. weekdaysParseExact: true,
  46478. longDateFormat: {
  46479. LT: 'HH:mm',
  46480. LTS: 'HH:mm:ss',
  46481. L: 'DD/MM/YYYY',
  46482. LL: 'D MMMM YYYY',
  46483. LLL: 'D MMMM YYYY HH:mm',
  46484. LLLL: 'dddd D MMMM YYYY HH:mm',
  46485. },
  46486. calendar: {
  46487. sameDay: '[اليوم على الساعة] LT',
  46488. nextDay: '[غدا على الساعة] LT',
  46489. nextWeek: 'dddd [على الساعة] LT',
  46490. lastDay: '[أمس على الساعة] LT',
  46491. lastWeek: 'dddd [على الساعة] LT',
  46492. sameElse: 'L',
  46493. },
  46494. relativeTime: {
  46495. future: 'في %s',
  46496. past: 'منذ %s',
  46497. s: 'ثوان',
  46498. ss: '%d ثانية',
  46499. m: 'دقيقة',
  46500. mm: '%d دقائق',
  46501. h: 'ساعة',
  46502. hh: '%d ساعات',
  46503. d: 'يوم',
  46504. dd: '%d أيام',
  46505. M: 'شهر',
  46506. MM: '%d أشهر',
  46507. y: 'سنة',
  46508. yy: '%d سنوات',
  46509. },
  46510. week: {
  46511. dow: 0, // Sunday is the first day of the week.
  46512. doy: 12, // The week that contains Jan 12th is the first week of the year.
  46513. },
  46514. });
  46515. return arKw;
  46516. })));
  46517. /***/ }),
  46518. /***/ 56440:
  46519. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46520. //! moment.js locale configuration
  46521. //! locale : Arabic (Lybia) [ar-ly]
  46522. //! author : Ali Hmer: https://github.com/kikoanis
  46523. ;(function (global, factory) {
  46524. true ? factory(__webpack_require__(30381)) :
  46525. 0
  46526. }(this, (function (moment) { 'use strict';
  46527. //! moment.js locale configuration
  46528. var symbolMap = {
  46529. 1: '1',
  46530. 2: '2',
  46531. 3: '3',
  46532. 4: '4',
  46533. 5: '5',
  46534. 6: '6',
  46535. 7: '7',
  46536. 8: '8',
  46537. 9: '9',
  46538. 0: '0',
  46539. },
  46540. pluralForm = function (n) {
  46541. return n === 0
  46542. ? 0
  46543. : n === 1
  46544. ? 1
  46545. : n === 2
  46546. ? 2
  46547. : n % 100 >= 3 && n % 100 <= 10
  46548. ? 3
  46549. : n % 100 >= 11
  46550. ? 4
  46551. : 5;
  46552. },
  46553. plurals = {
  46554. s: [
  46555. 'أقل من ثانية',
  46556. 'ثانية واحدة',
  46557. ['ثانيتان', 'ثانيتين'],
  46558. '%d ثوان',
  46559. '%d ثانية',
  46560. '%d ثانية',
  46561. ],
  46562. m: [
  46563. 'أقل من دقيقة',
  46564. 'دقيقة واحدة',
  46565. ['دقيقتان', 'دقيقتين'],
  46566. '%d دقائق',
  46567. '%d دقيقة',
  46568. '%d دقيقة',
  46569. ],
  46570. h: [
  46571. 'أقل من ساعة',
  46572. 'ساعة واحدة',
  46573. ['ساعتان', 'ساعتين'],
  46574. '%d ساعات',
  46575. '%d ساعة',
  46576. '%d ساعة',
  46577. ],
  46578. d: [
  46579. 'أقل من يوم',
  46580. 'يوم واحد',
  46581. ['يومان', 'يومين'],
  46582. '%d أيام',
  46583. '%d يومًا',
  46584. '%d يوم',
  46585. ],
  46586. M: [
  46587. 'أقل من شهر',
  46588. 'شهر واحد',
  46589. ['شهران', 'شهرين'],
  46590. '%d أشهر',
  46591. '%d شهرا',
  46592. '%d شهر',
  46593. ],
  46594. y: [
  46595. 'أقل من عام',
  46596. 'عام واحد',
  46597. ['عامان', 'عامين'],
  46598. '%d أعوام',
  46599. '%d عامًا',
  46600. '%d عام',
  46601. ],
  46602. },
  46603. pluralize = function (u) {
  46604. return function (number, withoutSuffix, string, isFuture) {
  46605. var f = pluralForm(number),
  46606. str = plurals[u][pluralForm(number)];
  46607. if (f === 2) {
  46608. str = str[withoutSuffix ? 0 : 1];
  46609. }
  46610. return str.replace(/%d/i, number);
  46611. };
  46612. },
  46613. months = [
  46614. 'يناير',
  46615. 'فبراير',
  46616. 'مارس',
  46617. 'أبريل',
  46618. 'مايو',
  46619. 'يونيو',
  46620. 'يوليو',
  46621. 'أغسطس',
  46622. 'سبتمبر',
  46623. 'أكتوبر',
  46624. 'نوفمبر',
  46625. 'ديسمبر',
  46626. ];
  46627. var arLy = moment.defineLocale('ar-ly', {
  46628. months: months,
  46629. monthsShort: months,
  46630. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  46631. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  46632. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  46633. weekdaysParseExact: true,
  46634. longDateFormat: {
  46635. LT: 'HH:mm',
  46636. LTS: 'HH:mm:ss',
  46637. L: 'D/\u200FM/\u200FYYYY',
  46638. LL: 'D MMMM YYYY',
  46639. LLL: 'D MMMM YYYY HH:mm',
  46640. LLLL: 'dddd D MMMM YYYY HH:mm',
  46641. },
  46642. meridiemParse: /ص|م/,
  46643. isPM: function (input) {
  46644. return 'م' === input;
  46645. },
  46646. meridiem: function (hour, minute, isLower) {
  46647. if (hour < 12) {
  46648. return 'ص';
  46649. } else {
  46650. return 'م';
  46651. }
  46652. },
  46653. calendar: {
  46654. sameDay: '[اليوم عند الساعة] LT',
  46655. nextDay: '[غدًا عند الساعة] LT',
  46656. nextWeek: 'dddd [عند الساعة] LT',
  46657. lastDay: '[أمس عند الساعة] LT',
  46658. lastWeek: 'dddd [عند الساعة] LT',
  46659. sameElse: 'L',
  46660. },
  46661. relativeTime: {
  46662. future: 'بعد %s',
  46663. past: 'منذ %s',
  46664. s: pluralize('s'),
  46665. ss: pluralize('s'),
  46666. m: pluralize('m'),
  46667. mm: pluralize('m'),
  46668. h: pluralize('h'),
  46669. hh: pluralize('h'),
  46670. d: pluralize('d'),
  46671. dd: pluralize('d'),
  46672. M: pluralize('M'),
  46673. MM: pluralize('M'),
  46674. y: pluralize('y'),
  46675. yy: pluralize('y'),
  46676. },
  46677. preparse: function (string) {
  46678. return string.replace(/،/g, ',');
  46679. },
  46680. postformat: function (string) {
  46681. return string
  46682. .replace(/\d/g, function (match) {
  46683. return symbolMap[match];
  46684. })
  46685. .replace(/,/g, '،');
  46686. },
  46687. week: {
  46688. dow: 6, // Saturday is the first day of the week.
  46689. doy: 12, // The week that contains Jan 12th is the first week of the year.
  46690. },
  46691. });
  46692. return arLy;
  46693. })));
  46694. /***/ }),
  46695. /***/ 47702:
  46696. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46697. //! moment.js locale configuration
  46698. //! locale : Arabic (Morocco) [ar-ma]
  46699. //! author : ElFadili Yassine : https://github.com/ElFadiliY
  46700. //! author : Abdel Said : https://github.com/abdelsaid
  46701. ;(function (global, factory) {
  46702. true ? factory(__webpack_require__(30381)) :
  46703. 0
  46704. }(this, (function (moment) { 'use strict';
  46705. //! moment.js locale configuration
  46706. var arMa = moment.defineLocale('ar-ma', {
  46707. months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  46708. '_'
  46709. ),
  46710. monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  46711. '_'
  46712. ),
  46713. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  46714. weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  46715. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  46716. weekdaysParseExact: true,
  46717. longDateFormat: {
  46718. LT: 'HH:mm',
  46719. LTS: 'HH:mm:ss',
  46720. L: 'DD/MM/YYYY',
  46721. LL: 'D MMMM YYYY',
  46722. LLL: 'D MMMM YYYY HH:mm',
  46723. LLLL: 'dddd D MMMM YYYY HH:mm',
  46724. },
  46725. calendar: {
  46726. sameDay: '[اليوم على الساعة] LT',
  46727. nextDay: '[غدا على الساعة] LT',
  46728. nextWeek: 'dddd [على الساعة] LT',
  46729. lastDay: '[أمس على الساعة] LT',
  46730. lastWeek: 'dddd [على الساعة] LT',
  46731. sameElse: 'L',
  46732. },
  46733. relativeTime: {
  46734. future: 'في %s',
  46735. past: 'منذ %s',
  46736. s: 'ثوان',
  46737. ss: '%d ثانية',
  46738. m: 'دقيقة',
  46739. mm: '%d دقائق',
  46740. h: 'ساعة',
  46741. hh: '%d ساعات',
  46742. d: 'يوم',
  46743. dd: '%d أيام',
  46744. M: 'شهر',
  46745. MM: '%d أشهر',
  46746. y: 'سنة',
  46747. yy: '%d سنوات',
  46748. },
  46749. week: {
  46750. dow: 1, // Monday is the first day of the week.
  46751. doy: 4, // The week that contains Jan 4th is the first week of the year.
  46752. },
  46753. });
  46754. return arMa;
  46755. })));
  46756. /***/ }),
  46757. /***/ 16040:
  46758. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46759. //! moment.js locale configuration
  46760. //! locale : Arabic (Saudi Arabia) [ar-sa]
  46761. //! author : Suhail Alkowaileet : https://github.com/xsoh
  46762. ;(function (global, factory) {
  46763. true ? factory(__webpack_require__(30381)) :
  46764. 0
  46765. }(this, (function (moment) { 'use strict';
  46766. //! moment.js locale configuration
  46767. var symbolMap = {
  46768. 1: '١',
  46769. 2: '٢',
  46770. 3: '٣',
  46771. 4: '٤',
  46772. 5: '٥',
  46773. 6: '٦',
  46774. 7: '٧',
  46775. 8: '٨',
  46776. 9: '٩',
  46777. 0: '٠',
  46778. },
  46779. numberMap = {
  46780. '١': '1',
  46781. '٢': '2',
  46782. '٣': '3',
  46783. '٤': '4',
  46784. '٥': '5',
  46785. '٦': '6',
  46786. '٧': '7',
  46787. '٨': '8',
  46788. '٩': '9',
  46789. '٠': '0',
  46790. };
  46791. var arSa = moment.defineLocale('ar-sa', {
  46792. months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  46793. '_'
  46794. ),
  46795. monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  46796. '_'
  46797. ),
  46798. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  46799. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  46800. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  46801. weekdaysParseExact: true,
  46802. longDateFormat: {
  46803. LT: 'HH:mm',
  46804. LTS: 'HH:mm:ss',
  46805. L: 'DD/MM/YYYY',
  46806. LL: 'D MMMM YYYY',
  46807. LLL: 'D MMMM YYYY HH:mm',
  46808. LLLL: 'dddd D MMMM YYYY HH:mm',
  46809. },
  46810. meridiemParse: /ص|م/,
  46811. isPM: function (input) {
  46812. return 'م' === input;
  46813. },
  46814. meridiem: function (hour, minute, isLower) {
  46815. if (hour < 12) {
  46816. return 'ص';
  46817. } else {
  46818. return 'م';
  46819. }
  46820. },
  46821. calendar: {
  46822. sameDay: '[اليوم على الساعة] LT',
  46823. nextDay: '[غدا على الساعة] LT',
  46824. nextWeek: 'dddd [على الساعة] LT',
  46825. lastDay: '[أمس على الساعة] LT',
  46826. lastWeek: 'dddd [على الساعة] LT',
  46827. sameElse: 'L',
  46828. },
  46829. relativeTime: {
  46830. future: 'في %s',
  46831. past: 'منذ %s',
  46832. s: 'ثوان',
  46833. ss: '%d ثانية',
  46834. m: 'دقيقة',
  46835. mm: '%d دقائق',
  46836. h: 'ساعة',
  46837. hh: '%d ساعات',
  46838. d: 'يوم',
  46839. dd: '%d أيام',
  46840. M: 'شهر',
  46841. MM: '%d أشهر',
  46842. y: 'سنة',
  46843. yy: '%d سنوات',
  46844. },
  46845. preparse: function (string) {
  46846. return string
  46847. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  46848. return numberMap[match];
  46849. })
  46850. .replace(/،/g, ',');
  46851. },
  46852. postformat: function (string) {
  46853. return string
  46854. .replace(/\d/g, function (match) {
  46855. return symbolMap[match];
  46856. })
  46857. .replace(/,/g, '،');
  46858. },
  46859. week: {
  46860. dow: 0, // Sunday is the first day of the week.
  46861. doy: 6, // The week that contains Jan 6th is the first week of the year.
  46862. },
  46863. });
  46864. return arSa;
  46865. })));
  46866. /***/ }),
  46867. /***/ 37100:
  46868. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46869. //! moment.js locale configuration
  46870. //! locale : Arabic (Tunisia) [ar-tn]
  46871. //! author : Nader Toukabri : https://github.com/naderio
  46872. ;(function (global, factory) {
  46873. true ? factory(__webpack_require__(30381)) :
  46874. 0
  46875. }(this, (function (moment) { 'use strict';
  46876. //! moment.js locale configuration
  46877. var arTn = moment.defineLocale('ar-tn', {
  46878. months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  46879. '_'
  46880. ),
  46881. monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  46882. '_'
  46883. ),
  46884. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  46885. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  46886. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  46887. weekdaysParseExact: true,
  46888. longDateFormat: {
  46889. LT: 'HH:mm',
  46890. LTS: 'HH:mm:ss',
  46891. L: 'DD/MM/YYYY',
  46892. LL: 'D MMMM YYYY',
  46893. LLL: 'D MMMM YYYY HH:mm',
  46894. LLLL: 'dddd D MMMM YYYY HH:mm',
  46895. },
  46896. calendar: {
  46897. sameDay: '[اليوم على الساعة] LT',
  46898. nextDay: '[غدا على الساعة] LT',
  46899. nextWeek: 'dddd [على الساعة] LT',
  46900. lastDay: '[أمس على الساعة] LT',
  46901. lastWeek: 'dddd [على الساعة] LT',
  46902. sameElse: 'L',
  46903. },
  46904. relativeTime: {
  46905. future: 'في %s',
  46906. past: 'منذ %s',
  46907. s: 'ثوان',
  46908. ss: '%d ثانية',
  46909. m: 'دقيقة',
  46910. mm: '%d دقائق',
  46911. h: 'ساعة',
  46912. hh: '%d ساعات',
  46913. d: 'يوم',
  46914. dd: '%d أيام',
  46915. M: 'شهر',
  46916. MM: '%d أشهر',
  46917. y: 'سنة',
  46918. yy: '%d سنوات',
  46919. },
  46920. week: {
  46921. dow: 1, // Monday is the first day of the week.
  46922. doy: 4, // The week that contains Jan 4th is the first week of the year.
  46923. },
  46924. });
  46925. return arTn;
  46926. })));
  46927. /***/ }),
  46928. /***/ 30867:
  46929. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46930. //! moment.js locale configuration
  46931. //! locale : Arabic [ar]
  46932. //! author : Abdel Said: https://github.com/abdelsaid
  46933. //! author : Ahmed Elkhatib
  46934. //! author : forabi https://github.com/forabi
  46935. ;(function (global, factory) {
  46936. true ? factory(__webpack_require__(30381)) :
  46937. 0
  46938. }(this, (function (moment) { 'use strict';
  46939. //! moment.js locale configuration
  46940. var symbolMap = {
  46941. 1: '١',
  46942. 2: '٢',
  46943. 3: '٣',
  46944. 4: '٤',
  46945. 5: '٥',
  46946. 6: '٦',
  46947. 7: '٧',
  46948. 8: '٨',
  46949. 9: '٩',
  46950. 0: '٠',
  46951. },
  46952. numberMap = {
  46953. '١': '1',
  46954. '٢': '2',
  46955. '٣': '3',
  46956. '٤': '4',
  46957. '٥': '5',
  46958. '٦': '6',
  46959. '٧': '7',
  46960. '٨': '8',
  46961. '٩': '9',
  46962. '٠': '0',
  46963. },
  46964. pluralForm = function (n) {
  46965. return n === 0
  46966. ? 0
  46967. : n === 1
  46968. ? 1
  46969. : n === 2
  46970. ? 2
  46971. : n % 100 >= 3 && n % 100 <= 10
  46972. ? 3
  46973. : n % 100 >= 11
  46974. ? 4
  46975. : 5;
  46976. },
  46977. plurals = {
  46978. s: [
  46979. 'أقل من ثانية',
  46980. 'ثانية واحدة',
  46981. ['ثانيتان', 'ثانيتين'],
  46982. '%d ثوان',
  46983. '%d ثانية',
  46984. '%d ثانية',
  46985. ],
  46986. m: [
  46987. 'أقل من دقيقة',
  46988. 'دقيقة واحدة',
  46989. ['دقيقتان', 'دقيقتين'],
  46990. '%d دقائق',
  46991. '%d دقيقة',
  46992. '%d دقيقة',
  46993. ],
  46994. h: [
  46995. 'أقل من ساعة',
  46996. 'ساعة واحدة',
  46997. ['ساعتان', 'ساعتين'],
  46998. '%d ساعات',
  46999. '%d ساعة',
  47000. '%d ساعة',
  47001. ],
  47002. d: [
  47003. 'أقل من يوم',
  47004. 'يوم واحد',
  47005. ['يومان', 'يومين'],
  47006. '%d أيام',
  47007. '%d يومًا',
  47008. '%d يوم',
  47009. ],
  47010. M: [
  47011. 'أقل من شهر',
  47012. 'شهر واحد',
  47013. ['شهران', 'شهرين'],
  47014. '%d أشهر',
  47015. '%d شهرا',
  47016. '%d شهر',
  47017. ],
  47018. y: [
  47019. 'أقل من عام',
  47020. 'عام واحد',
  47021. ['عامان', 'عامين'],
  47022. '%d أعوام',
  47023. '%d عامًا',
  47024. '%d عام',
  47025. ],
  47026. },
  47027. pluralize = function (u) {
  47028. return function (number, withoutSuffix, string, isFuture) {
  47029. var f = pluralForm(number),
  47030. str = plurals[u][pluralForm(number)];
  47031. if (f === 2) {
  47032. str = str[withoutSuffix ? 0 : 1];
  47033. }
  47034. return str.replace(/%d/i, number);
  47035. };
  47036. },
  47037. months = [
  47038. 'يناير',
  47039. 'فبراير',
  47040. 'مارس',
  47041. 'أبريل',
  47042. 'مايو',
  47043. 'يونيو',
  47044. 'يوليو',
  47045. 'أغسطس',
  47046. 'سبتمبر',
  47047. 'أكتوبر',
  47048. 'نوفمبر',
  47049. 'ديسمبر',
  47050. ];
  47051. var ar = moment.defineLocale('ar', {
  47052. months: months,
  47053. monthsShort: months,
  47054. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  47055. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  47056. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  47057. weekdaysParseExact: true,
  47058. longDateFormat: {
  47059. LT: 'HH:mm',
  47060. LTS: 'HH:mm:ss',
  47061. L: 'D/\u200FM/\u200FYYYY',
  47062. LL: 'D MMMM YYYY',
  47063. LLL: 'D MMMM YYYY HH:mm',
  47064. LLLL: 'dddd D MMMM YYYY HH:mm',
  47065. },
  47066. meridiemParse: /ص|م/,
  47067. isPM: function (input) {
  47068. return 'م' === input;
  47069. },
  47070. meridiem: function (hour, minute, isLower) {
  47071. if (hour < 12) {
  47072. return 'ص';
  47073. } else {
  47074. return 'م';
  47075. }
  47076. },
  47077. calendar: {
  47078. sameDay: '[اليوم عند الساعة] LT',
  47079. nextDay: '[غدًا عند الساعة] LT',
  47080. nextWeek: 'dddd [عند الساعة] LT',
  47081. lastDay: '[أمس عند الساعة] LT',
  47082. lastWeek: 'dddd [عند الساعة] LT',
  47083. sameElse: 'L',
  47084. },
  47085. relativeTime: {
  47086. future: 'بعد %s',
  47087. past: 'منذ %s',
  47088. s: pluralize('s'),
  47089. ss: pluralize('s'),
  47090. m: pluralize('m'),
  47091. mm: pluralize('m'),
  47092. h: pluralize('h'),
  47093. hh: pluralize('h'),
  47094. d: pluralize('d'),
  47095. dd: pluralize('d'),
  47096. M: pluralize('M'),
  47097. MM: pluralize('M'),
  47098. y: pluralize('y'),
  47099. yy: pluralize('y'),
  47100. },
  47101. preparse: function (string) {
  47102. return string
  47103. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  47104. return numberMap[match];
  47105. })
  47106. .replace(/،/g, ',');
  47107. },
  47108. postformat: function (string) {
  47109. return string
  47110. .replace(/\d/g, function (match) {
  47111. return symbolMap[match];
  47112. })
  47113. .replace(/,/g, '،');
  47114. },
  47115. week: {
  47116. dow: 6, // Saturday is the first day of the week.
  47117. doy: 12, // The week that contains Jan 12th is the first week of the year.
  47118. },
  47119. });
  47120. return ar;
  47121. })));
  47122. /***/ }),
  47123. /***/ 31083:
  47124. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47125. //! moment.js locale configuration
  47126. //! locale : Azerbaijani [az]
  47127. //! author : topchiyev : https://github.com/topchiyev
  47128. ;(function (global, factory) {
  47129. true ? factory(__webpack_require__(30381)) :
  47130. 0
  47131. }(this, (function (moment) { 'use strict';
  47132. //! moment.js locale configuration
  47133. var suffixes = {
  47134. 1: '-inci',
  47135. 5: '-inci',
  47136. 8: '-inci',
  47137. 70: '-inci',
  47138. 80: '-inci',
  47139. 2: '-nci',
  47140. 7: '-nci',
  47141. 20: '-nci',
  47142. 50: '-nci',
  47143. 3: '-üncü',
  47144. 4: '-üncü',
  47145. 100: '-üncü',
  47146. 6: '-ncı',
  47147. 9: '-uncu',
  47148. 10: '-uncu',
  47149. 30: '-uncu',
  47150. 60: '-ıncı',
  47151. 90: '-ıncı',
  47152. };
  47153. var az = moment.defineLocale('az', {
  47154. months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
  47155. '_'
  47156. ),
  47157. monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
  47158. weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
  47159. '_'
  47160. ),
  47161. weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
  47162. weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
  47163. weekdaysParseExact: true,
  47164. longDateFormat: {
  47165. LT: 'HH:mm',
  47166. LTS: 'HH:mm:ss',
  47167. L: 'DD.MM.YYYY',
  47168. LL: 'D MMMM YYYY',
  47169. LLL: 'D MMMM YYYY HH:mm',
  47170. LLLL: 'dddd, D MMMM YYYY HH:mm',
  47171. },
  47172. calendar: {
  47173. sameDay: '[bugün saat] LT',
  47174. nextDay: '[sabah saat] LT',
  47175. nextWeek: '[gələn həftə] dddd [saat] LT',
  47176. lastDay: '[dünən] LT',
  47177. lastWeek: '[keçən həftə] dddd [saat] LT',
  47178. sameElse: 'L',
  47179. },
  47180. relativeTime: {
  47181. future: '%s sonra',
  47182. past: '%s əvvəl',
  47183. s: 'bir neçə saniyə',
  47184. ss: '%d saniyə',
  47185. m: 'bir dəqiqə',
  47186. mm: '%d dəqiqə',
  47187. h: 'bir saat',
  47188. hh: '%d saat',
  47189. d: 'bir gün',
  47190. dd: '%d gün',
  47191. M: 'bir ay',
  47192. MM: '%d ay',
  47193. y: 'bir il',
  47194. yy: '%d il',
  47195. },
  47196. meridiemParse: /gecə|səhər|gündüz|axşam/,
  47197. isPM: function (input) {
  47198. return /^(gündüz|axşam)$/.test(input);
  47199. },
  47200. meridiem: function (hour, minute, isLower) {
  47201. if (hour < 4) {
  47202. return 'gecə';
  47203. } else if (hour < 12) {
  47204. return 'səhər';
  47205. } else if (hour < 17) {
  47206. return 'gündüz';
  47207. } else {
  47208. return 'axşam';
  47209. }
  47210. },
  47211. dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
  47212. ordinal: function (number) {
  47213. if (number === 0) {
  47214. // special case for zero
  47215. return number + '-ıncı';
  47216. }
  47217. var a = number % 10,
  47218. b = (number % 100) - a,
  47219. c = number >= 100 ? 100 : null;
  47220. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  47221. },
  47222. week: {
  47223. dow: 1, // Monday is the first day of the week.
  47224. doy: 7, // The week that contains Jan 7th is the first week of the year.
  47225. },
  47226. });
  47227. return az;
  47228. })));
  47229. /***/ }),
  47230. /***/ 9808:
  47231. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47232. //! moment.js locale configuration
  47233. //! locale : Belarusian [be]
  47234. //! author : Dmitry Demidov : https://github.com/demidov91
  47235. //! author: Praleska: http://praleska.pro/
  47236. //! Author : Menelion Elensúle : https://github.com/Oire
  47237. ;(function (global, factory) {
  47238. true ? factory(__webpack_require__(30381)) :
  47239. 0
  47240. }(this, (function (moment) { 'use strict';
  47241. //! moment.js locale configuration
  47242. function plural(word, num) {
  47243. var forms = word.split('_');
  47244. return num % 10 === 1 && num % 100 !== 11
  47245. ? forms[0]
  47246. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  47247. ? forms[1]
  47248. : forms[2];
  47249. }
  47250. function relativeTimeWithPlural(number, withoutSuffix, key) {
  47251. var format = {
  47252. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  47253. mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
  47254. hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
  47255. dd: 'дзень_дні_дзён',
  47256. MM: 'месяц_месяцы_месяцаў',
  47257. yy: 'год_гады_гадоў',
  47258. };
  47259. if (key === 'm') {
  47260. return withoutSuffix ? 'хвіліна' : 'хвіліну';
  47261. } else if (key === 'h') {
  47262. return withoutSuffix ? 'гадзіна' : 'гадзіну';
  47263. } else {
  47264. return number + ' ' + plural(format[key], +number);
  47265. }
  47266. }
  47267. var be = moment.defineLocale('be', {
  47268. months: {
  47269. format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
  47270. '_'
  47271. ),
  47272. standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
  47273. '_'
  47274. ),
  47275. },
  47276. monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split(
  47277. '_'
  47278. ),
  47279. weekdays: {
  47280. format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
  47281. '_'
  47282. ),
  47283. standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
  47284. '_'
  47285. ),
  47286. isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
  47287. },
  47288. weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  47289. weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  47290. longDateFormat: {
  47291. LT: 'HH:mm',
  47292. LTS: 'HH:mm:ss',
  47293. L: 'DD.MM.YYYY',
  47294. LL: 'D MMMM YYYY г.',
  47295. LLL: 'D MMMM YYYY г., HH:mm',
  47296. LLLL: 'dddd, D MMMM YYYY г., HH:mm',
  47297. },
  47298. calendar: {
  47299. sameDay: '[Сёння ў] LT',
  47300. nextDay: '[Заўтра ў] LT',
  47301. lastDay: '[Учора ў] LT',
  47302. nextWeek: function () {
  47303. return '[У] dddd [ў] LT';
  47304. },
  47305. lastWeek: function () {
  47306. switch (this.day()) {
  47307. case 0:
  47308. case 3:
  47309. case 5:
  47310. case 6:
  47311. return '[У мінулую] dddd [ў] LT';
  47312. case 1:
  47313. case 2:
  47314. case 4:
  47315. return '[У мінулы] dddd [ў] LT';
  47316. }
  47317. },
  47318. sameElse: 'L',
  47319. },
  47320. relativeTime: {
  47321. future: 'праз %s',
  47322. past: '%s таму',
  47323. s: 'некалькі секунд',
  47324. m: relativeTimeWithPlural,
  47325. mm: relativeTimeWithPlural,
  47326. h: relativeTimeWithPlural,
  47327. hh: relativeTimeWithPlural,
  47328. d: 'дзень',
  47329. dd: relativeTimeWithPlural,
  47330. M: 'месяц',
  47331. MM: relativeTimeWithPlural,
  47332. y: 'год',
  47333. yy: relativeTimeWithPlural,
  47334. },
  47335. meridiemParse: /ночы|раніцы|дня|вечара/,
  47336. isPM: function (input) {
  47337. return /^(дня|вечара)$/.test(input);
  47338. },
  47339. meridiem: function (hour, minute, isLower) {
  47340. if (hour < 4) {
  47341. return 'ночы';
  47342. } else if (hour < 12) {
  47343. return 'раніцы';
  47344. } else if (hour < 17) {
  47345. return 'дня';
  47346. } else {
  47347. return 'вечара';
  47348. }
  47349. },
  47350. dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
  47351. ordinal: function (number, period) {
  47352. switch (period) {
  47353. case 'M':
  47354. case 'd':
  47355. case 'DDD':
  47356. case 'w':
  47357. case 'W':
  47358. return (number % 10 === 2 || number % 10 === 3) &&
  47359. number % 100 !== 12 &&
  47360. number % 100 !== 13
  47361. ? number + '-і'
  47362. : number + '-ы';
  47363. case 'D':
  47364. return number + '-га';
  47365. default:
  47366. return number;
  47367. }
  47368. },
  47369. week: {
  47370. dow: 1, // Monday is the first day of the week.
  47371. doy: 7, // The week that contains Jan 7th is the first week of the year.
  47372. },
  47373. });
  47374. return be;
  47375. })));
  47376. /***/ }),
  47377. /***/ 68338:
  47378. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47379. //! moment.js locale configuration
  47380. //! locale : Bulgarian [bg]
  47381. //! author : Krasen Borisov : https://github.com/kraz
  47382. ;(function (global, factory) {
  47383. true ? factory(__webpack_require__(30381)) :
  47384. 0
  47385. }(this, (function (moment) { 'use strict';
  47386. //! moment.js locale configuration
  47387. var bg = moment.defineLocale('bg', {
  47388. months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
  47389. '_'
  47390. ),
  47391. monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  47392. weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
  47393. '_'
  47394. ),
  47395. weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  47396. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  47397. longDateFormat: {
  47398. LT: 'H:mm',
  47399. LTS: 'H:mm:ss',
  47400. L: 'D.MM.YYYY',
  47401. LL: 'D MMMM YYYY',
  47402. LLL: 'D MMMM YYYY H:mm',
  47403. LLLL: 'dddd, D MMMM YYYY H:mm',
  47404. },
  47405. calendar: {
  47406. sameDay: '[Днес в] LT',
  47407. nextDay: '[Утре в] LT',
  47408. nextWeek: 'dddd [в] LT',
  47409. lastDay: '[Вчера в] LT',
  47410. lastWeek: function () {
  47411. switch (this.day()) {
  47412. case 0:
  47413. case 3:
  47414. case 6:
  47415. return '[Миналата] dddd [в] LT';
  47416. case 1:
  47417. case 2:
  47418. case 4:
  47419. case 5:
  47420. return '[Миналия] dddd [в] LT';
  47421. }
  47422. },
  47423. sameElse: 'L',
  47424. },
  47425. relativeTime: {
  47426. future: 'след %s',
  47427. past: 'преди %s',
  47428. s: 'няколко секунди',
  47429. ss: '%d секунди',
  47430. m: 'минута',
  47431. mm: '%d минути',
  47432. h: 'час',
  47433. hh: '%d часа',
  47434. d: 'ден',
  47435. dd: '%d дена',
  47436. w: 'седмица',
  47437. ww: '%d седмици',
  47438. M: 'месец',
  47439. MM: '%d месеца',
  47440. y: 'година',
  47441. yy: '%d години',
  47442. },
  47443. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  47444. ordinal: function (number) {
  47445. var lastDigit = number % 10,
  47446. last2Digits = number % 100;
  47447. if (number === 0) {
  47448. return number + '-ев';
  47449. } else if (last2Digits === 0) {
  47450. return number + '-ен';
  47451. } else if (last2Digits > 10 && last2Digits < 20) {
  47452. return number + '-ти';
  47453. } else if (lastDigit === 1) {
  47454. return number + '-ви';
  47455. } else if (lastDigit === 2) {
  47456. return number + '-ри';
  47457. } else if (lastDigit === 7 || lastDigit === 8) {
  47458. return number + '-ми';
  47459. } else {
  47460. return number + '-ти';
  47461. }
  47462. },
  47463. week: {
  47464. dow: 1, // Monday is the first day of the week.
  47465. doy: 7, // The week that contains Jan 7th is the first week of the year.
  47466. },
  47467. });
  47468. return bg;
  47469. })));
  47470. /***/ }),
  47471. /***/ 67438:
  47472. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47473. //! moment.js locale configuration
  47474. //! locale : Bambara [bm]
  47475. //! author : Estelle Comment : https://github.com/estellecomment
  47476. ;(function (global, factory) {
  47477. true ? factory(__webpack_require__(30381)) :
  47478. 0
  47479. }(this, (function (moment) { 'use strict';
  47480. //! moment.js locale configuration
  47481. var bm = moment.defineLocale('bm', {
  47482. months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
  47483. '_'
  47484. ),
  47485. monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
  47486. weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
  47487. weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
  47488. weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
  47489. longDateFormat: {
  47490. LT: 'HH:mm',
  47491. LTS: 'HH:mm:ss',
  47492. L: 'DD/MM/YYYY',
  47493. LL: 'MMMM [tile] D [san] YYYY',
  47494. LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  47495. LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  47496. },
  47497. calendar: {
  47498. sameDay: '[Bi lɛrɛ] LT',
  47499. nextDay: '[Sini lɛrɛ] LT',
  47500. nextWeek: 'dddd [don lɛrɛ] LT',
  47501. lastDay: '[Kunu lɛrɛ] LT',
  47502. lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
  47503. sameElse: 'L',
  47504. },
  47505. relativeTime: {
  47506. future: '%s kɔnɔ',
  47507. past: 'a bɛ %s bɔ',
  47508. s: 'sanga dama dama',
  47509. ss: 'sekondi %d',
  47510. m: 'miniti kelen',
  47511. mm: 'miniti %d',
  47512. h: 'lɛrɛ kelen',
  47513. hh: 'lɛrɛ %d',
  47514. d: 'tile kelen',
  47515. dd: 'tile %d',
  47516. M: 'kalo kelen',
  47517. MM: 'kalo %d',
  47518. y: 'san kelen',
  47519. yy: 'san %d',
  47520. },
  47521. week: {
  47522. dow: 1, // Monday is the first day of the week.
  47523. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47524. },
  47525. });
  47526. return bm;
  47527. })));
  47528. /***/ }),
  47529. /***/ 76225:
  47530. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47531. //! moment.js locale configuration
  47532. //! locale : Bengali (Bangladesh) [bn-bd]
  47533. //! author : Asraf Hossain Patoary : https://github.com/ashwoolford
  47534. ;(function (global, factory) {
  47535. true ? factory(__webpack_require__(30381)) :
  47536. 0
  47537. }(this, (function (moment) { 'use strict';
  47538. //! moment.js locale configuration
  47539. var symbolMap = {
  47540. 1: '১',
  47541. 2: '২',
  47542. 3: '৩',
  47543. 4: '৪',
  47544. 5: '৫',
  47545. 6: '৬',
  47546. 7: '৭',
  47547. 8: '৮',
  47548. 9: '৯',
  47549. 0: '০',
  47550. },
  47551. numberMap = {
  47552. '১': '1',
  47553. '২': '2',
  47554. '৩': '3',
  47555. '৪': '4',
  47556. '৫': '5',
  47557. '৬': '6',
  47558. '৭': '7',
  47559. '৮': '8',
  47560. '৯': '9',
  47561. '০': '0',
  47562. };
  47563. var bnBd = moment.defineLocale('bn-bd', {
  47564. months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
  47565. '_'
  47566. ),
  47567. monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
  47568. '_'
  47569. ),
  47570. weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
  47571. '_'
  47572. ),
  47573. weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  47574. weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
  47575. longDateFormat: {
  47576. LT: 'A h:mm সময়',
  47577. LTS: 'A h:mm:ss সময়',
  47578. L: 'DD/MM/YYYY',
  47579. LL: 'D MMMM YYYY',
  47580. LLL: 'D MMMM YYYY, A h:mm সময়',
  47581. LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
  47582. },
  47583. calendar: {
  47584. sameDay: '[আজ] LT',
  47585. nextDay: '[আগামীকাল] LT',
  47586. nextWeek: 'dddd, LT',
  47587. lastDay: '[গতকাল] LT',
  47588. lastWeek: '[গত] dddd, LT',
  47589. sameElse: 'L',
  47590. },
  47591. relativeTime: {
  47592. future: '%s পরে',
  47593. past: '%s আগে',
  47594. s: 'কয়েক সেকেন্ড',
  47595. ss: '%d সেকেন্ড',
  47596. m: 'এক মিনিট',
  47597. mm: '%d মিনিট',
  47598. h: 'এক ঘন্টা',
  47599. hh: '%d ঘন্টা',
  47600. d: 'এক দিন',
  47601. dd: '%d দিন',
  47602. M: 'এক মাস',
  47603. MM: '%d মাস',
  47604. y: 'এক বছর',
  47605. yy: '%d বছর',
  47606. },
  47607. preparse: function (string) {
  47608. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  47609. return numberMap[match];
  47610. });
  47611. },
  47612. postformat: function (string) {
  47613. return string.replace(/\d/g, function (match) {
  47614. return symbolMap[match];
  47615. });
  47616. },
  47617. meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
  47618. meridiemHour: function (hour, meridiem) {
  47619. if (hour === 12) {
  47620. hour = 0;
  47621. }
  47622. if (meridiem === 'রাত') {
  47623. return hour < 4 ? hour : hour + 12;
  47624. } else if (meridiem === 'ভোর') {
  47625. return hour;
  47626. } else if (meridiem === 'সকাল') {
  47627. return hour;
  47628. } else if (meridiem === 'দুপুর') {
  47629. return hour >= 3 ? hour : hour + 12;
  47630. } else if (meridiem === 'বিকাল') {
  47631. return hour + 12;
  47632. } else if (meridiem === 'সন্ধ্যা') {
  47633. return hour + 12;
  47634. }
  47635. },
  47636. meridiem: function (hour, minute, isLower) {
  47637. if (hour < 4) {
  47638. return 'রাত';
  47639. } else if (hour < 6) {
  47640. return 'ভোর';
  47641. } else if (hour < 12) {
  47642. return 'সকাল';
  47643. } else if (hour < 15) {
  47644. return 'দুপুর';
  47645. } else if (hour < 18) {
  47646. return 'বিকাল';
  47647. } else if (hour < 20) {
  47648. return 'সন্ধ্যা';
  47649. } else {
  47650. return 'রাত';
  47651. }
  47652. },
  47653. week: {
  47654. dow: 0, // Sunday is the first day of the week.
  47655. doy: 6, // The week that contains Jan 6th is the first week of the year.
  47656. },
  47657. });
  47658. return bnBd;
  47659. })));
  47660. /***/ }),
  47661. /***/ 8905:
  47662. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47663. //! moment.js locale configuration
  47664. //! locale : Bengali [bn]
  47665. //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
  47666. ;(function (global, factory) {
  47667. true ? factory(__webpack_require__(30381)) :
  47668. 0
  47669. }(this, (function (moment) { 'use strict';
  47670. //! moment.js locale configuration
  47671. var symbolMap = {
  47672. 1: '১',
  47673. 2: '২',
  47674. 3: '৩',
  47675. 4: '৪',
  47676. 5: '৫',
  47677. 6: '৬',
  47678. 7: '৭',
  47679. 8: '৮',
  47680. 9: '৯',
  47681. 0: '০',
  47682. },
  47683. numberMap = {
  47684. '১': '1',
  47685. '২': '2',
  47686. '৩': '3',
  47687. '৪': '4',
  47688. '৫': '5',
  47689. '৬': '6',
  47690. '৭': '7',
  47691. '৮': '8',
  47692. '৯': '9',
  47693. '০': '0',
  47694. };
  47695. var bn = moment.defineLocale('bn', {
  47696. months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
  47697. '_'
  47698. ),
  47699. monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
  47700. '_'
  47701. ),
  47702. weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
  47703. '_'
  47704. ),
  47705. weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  47706. weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
  47707. longDateFormat: {
  47708. LT: 'A h:mm সময়',
  47709. LTS: 'A h:mm:ss সময়',
  47710. L: 'DD/MM/YYYY',
  47711. LL: 'D MMMM YYYY',
  47712. LLL: 'D MMMM YYYY, A h:mm সময়',
  47713. LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
  47714. },
  47715. calendar: {
  47716. sameDay: '[আজ] LT',
  47717. nextDay: '[আগামীকাল] LT',
  47718. nextWeek: 'dddd, LT',
  47719. lastDay: '[গতকাল] LT',
  47720. lastWeek: '[গত] dddd, LT',
  47721. sameElse: 'L',
  47722. },
  47723. relativeTime: {
  47724. future: '%s পরে',
  47725. past: '%s আগে',
  47726. s: 'কয়েক সেকেন্ড',
  47727. ss: '%d সেকেন্ড',
  47728. m: 'এক মিনিট',
  47729. mm: '%d মিনিট',
  47730. h: 'এক ঘন্টা',
  47731. hh: '%d ঘন্টা',
  47732. d: 'এক দিন',
  47733. dd: '%d দিন',
  47734. M: 'এক মাস',
  47735. MM: '%d মাস',
  47736. y: 'এক বছর',
  47737. yy: '%d বছর',
  47738. },
  47739. preparse: function (string) {
  47740. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  47741. return numberMap[match];
  47742. });
  47743. },
  47744. postformat: function (string) {
  47745. return string.replace(/\d/g, function (match) {
  47746. return symbolMap[match];
  47747. });
  47748. },
  47749. meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
  47750. meridiemHour: function (hour, meridiem) {
  47751. if (hour === 12) {
  47752. hour = 0;
  47753. }
  47754. if (
  47755. (meridiem === 'রাত' && hour >= 4) ||
  47756. (meridiem === 'দুপুর' && hour < 5) ||
  47757. meridiem === 'বিকাল'
  47758. ) {
  47759. return hour + 12;
  47760. } else {
  47761. return hour;
  47762. }
  47763. },
  47764. meridiem: function (hour, minute, isLower) {
  47765. if (hour < 4) {
  47766. return 'রাত';
  47767. } else if (hour < 10) {
  47768. return 'সকাল';
  47769. } else if (hour < 17) {
  47770. return 'দুপুর';
  47771. } else if (hour < 20) {
  47772. return 'বিকাল';
  47773. } else {
  47774. return 'রাত';
  47775. }
  47776. },
  47777. week: {
  47778. dow: 0, // Sunday is the first day of the week.
  47779. doy: 6, // The week that contains Jan 6th is the first week of the year.
  47780. },
  47781. });
  47782. return bn;
  47783. })));
  47784. /***/ }),
  47785. /***/ 11560:
  47786. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47787. //! moment.js locale configuration
  47788. //! locale : Tibetan [bo]
  47789. //! author : Thupten N. Chakrishar : https://github.com/vajradog
  47790. ;(function (global, factory) {
  47791. true ? factory(__webpack_require__(30381)) :
  47792. 0
  47793. }(this, (function (moment) { 'use strict';
  47794. //! moment.js locale configuration
  47795. var symbolMap = {
  47796. 1: '༡',
  47797. 2: '༢',
  47798. 3: '༣',
  47799. 4: '༤',
  47800. 5: '༥',
  47801. 6: '༦',
  47802. 7: '༧',
  47803. 8: '༨',
  47804. 9: '༩',
  47805. 0: '༠',
  47806. },
  47807. numberMap = {
  47808. '༡': '1',
  47809. '༢': '2',
  47810. '༣': '3',
  47811. '༤': '4',
  47812. '༥': '5',
  47813. '༦': '6',
  47814. '༧': '7',
  47815. '༨': '8',
  47816. '༩': '9',
  47817. '༠': '0',
  47818. };
  47819. var bo = moment.defineLocale('bo', {
  47820. months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
  47821. '_'
  47822. ),
  47823. monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
  47824. '_'
  47825. ),
  47826. monthsShortRegex: /^(ཟླ་\d{1,2})/,
  47827. monthsParseExact: true,
  47828. weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
  47829. '_'
  47830. ),
  47831. weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
  47832. '_'
  47833. ),
  47834. weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
  47835. longDateFormat: {
  47836. LT: 'A h:mm',
  47837. LTS: 'A h:mm:ss',
  47838. L: 'DD/MM/YYYY',
  47839. LL: 'D MMMM YYYY',
  47840. LLL: 'D MMMM YYYY, A h:mm',
  47841. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  47842. },
  47843. calendar: {
  47844. sameDay: '[དི་རིང] LT',
  47845. nextDay: '[སང་ཉིན] LT',
  47846. nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
  47847. lastDay: '[ཁ་སང] LT',
  47848. lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
  47849. sameElse: 'L',
  47850. },
  47851. relativeTime: {
  47852. future: '%s ལ་',
  47853. past: '%s སྔན་ལ',
  47854. s: 'ལམ་སང',
  47855. ss: '%d སྐར་ཆ།',
  47856. m: 'སྐར་མ་གཅིག',
  47857. mm: '%d སྐར་མ',
  47858. h: 'ཆུ་ཚོད་གཅིག',
  47859. hh: '%d ཆུ་ཚོད',
  47860. d: 'ཉིན་གཅིག',
  47861. dd: '%d ཉིན་',
  47862. M: 'ཟླ་བ་གཅིག',
  47863. MM: '%d ཟླ་བ',
  47864. y: 'ལོ་གཅིག',
  47865. yy: '%d ལོ',
  47866. },
  47867. preparse: function (string) {
  47868. return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
  47869. return numberMap[match];
  47870. });
  47871. },
  47872. postformat: function (string) {
  47873. return string.replace(/\d/g, function (match) {
  47874. return symbolMap[match];
  47875. });
  47876. },
  47877. meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
  47878. meridiemHour: function (hour, meridiem) {
  47879. if (hour === 12) {
  47880. hour = 0;
  47881. }
  47882. if (
  47883. (meridiem === 'མཚན་མོ' && hour >= 4) ||
  47884. (meridiem === 'ཉིན་གུང' && hour < 5) ||
  47885. meridiem === 'དགོང་དག'
  47886. ) {
  47887. return hour + 12;
  47888. } else {
  47889. return hour;
  47890. }
  47891. },
  47892. meridiem: function (hour, minute, isLower) {
  47893. if (hour < 4) {
  47894. return 'མཚན་མོ';
  47895. } else if (hour < 10) {
  47896. return 'ཞོགས་ཀས';
  47897. } else if (hour < 17) {
  47898. return 'ཉིན་གུང';
  47899. } else if (hour < 20) {
  47900. return 'དགོང་དག';
  47901. } else {
  47902. return 'མཚན་མོ';
  47903. }
  47904. },
  47905. week: {
  47906. dow: 0, // Sunday is the first day of the week.
  47907. doy: 6, // The week that contains Jan 6th is the first week of the year.
  47908. },
  47909. });
  47910. return bo;
  47911. })));
  47912. /***/ }),
  47913. /***/ 1278:
  47914. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47915. //! moment.js locale configuration
  47916. //! locale : Breton [br]
  47917. //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
  47918. ;(function (global, factory) {
  47919. true ? factory(__webpack_require__(30381)) :
  47920. 0
  47921. }(this, (function (moment) { 'use strict';
  47922. //! moment.js locale configuration
  47923. function relativeTimeWithMutation(number, withoutSuffix, key) {
  47924. var format = {
  47925. mm: 'munutenn',
  47926. MM: 'miz',
  47927. dd: 'devezh',
  47928. };
  47929. return number + ' ' + mutation(format[key], number);
  47930. }
  47931. function specialMutationForYears(number) {
  47932. switch (lastNumber(number)) {
  47933. case 1:
  47934. case 3:
  47935. case 4:
  47936. case 5:
  47937. case 9:
  47938. return number + ' bloaz';
  47939. default:
  47940. return number + ' vloaz';
  47941. }
  47942. }
  47943. function lastNumber(number) {
  47944. if (number > 9) {
  47945. return lastNumber(number % 10);
  47946. }
  47947. return number;
  47948. }
  47949. function mutation(text, number) {
  47950. if (number === 2) {
  47951. return softMutation(text);
  47952. }
  47953. return text;
  47954. }
  47955. function softMutation(text) {
  47956. var mutationTable = {
  47957. m: 'v',
  47958. b: 'v',
  47959. d: 'z',
  47960. };
  47961. if (mutationTable[text.charAt(0)] === undefined) {
  47962. return text;
  47963. }
  47964. return mutationTable[text.charAt(0)] + text.substring(1);
  47965. }
  47966. var monthsParse = [
  47967. /^gen/i,
  47968. /^c[ʼ\']hwe/i,
  47969. /^meu/i,
  47970. /^ebr/i,
  47971. /^mae/i,
  47972. /^(mez|eve)/i,
  47973. /^gou/i,
  47974. /^eos/i,
  47975. /^gwe/i,
  47976. /^her/i,
  47977. /^du/i,
  47978. /^ker/i,
  47979. ],
  47980. monthsRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
  47981. monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
  47982. monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
  47983. fullWeekdaysParse = [
  47984. /^sul/i,
  47985. /^lun/i,
  47986. /^meurzh/i,
  47987. /^merc[ʼ\']her/i,
  47988. /^yaou/i,
  47989. /^gwener/i,
  47990. /^sadorn/i,
  47991. ],
  47992. shortWeekdaysParse = [
  47993. /^Sul/i,
  47994. /^Lun/i,
  47995. /^Meu/i,
  47996. /^Mer/i,
  47997. /^Yao/i,
  47998. /^Gwe/i,
  47999. /^Sad/i,
  48000. ],
  48001. minWeekdaysParse = [
  48002. /^Su/i,
  48003. /^Lu/i,
  48004. /^Me([^r]|$)/i,
  48005. /^Mer/i,
  48006. /^Ya/i,
  48007. /^Gw/i,
  48008. /^Sa/i,
  48009. ];
  48010. var br = moment.defineLocale('br', {
  48011. months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
  48012. '_'
  48013. ),
  48014. monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
  48015. weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
  48016. weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
  48017. weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
  48018. weekdaysParse: minWeekdaysParse,
  48019. fullWeekdaysParse: fullWeekdaysParse,
  48020. shortWeekdaysParse: shortWeekdaysParse,
  48021. minWeekdaysParse: minWeekdaysParse,
  48022. monthsRegex: monthsRegex,
  48023. monthsShortRegex: monthsRegex,
  48024. monthsStrictRegex: monthsStrictRegex,
  48025. monthsShortStrictRegex: monthsShortStrictRegex,
  48026. monthsParse: monthsParse,
  48027. longMonthsParse: monthsParse,
  48028. shortMonthsParse: monthsParse,
  48029. longDateFormat: {
  48030. LT: 'HH:mm',
  48031. LTS: 'HH:mm:ss',
  48032. L: 'DD/MM/YYYY',
  48033. LL: 'D [a viz] MMMM YYYY',
  48034. LLL: 'D [a viz] MMMM YYYY HH:mm',
  48035. LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
  48036. },
  48037. calendar: {
  48038. sameDay: '[Hiziv da] LT',
  48039. nextDay: '[Warcʼhoazh da] LT',
  48040. nextWeek: 'dddd [da] LT',
  48041. lastDay: '[Decʼh da] LT',
  48042. lastWeek: 'dddd [paset da] LT',
  48043. sameElse: 'L',
  48044. },
  48045. relativeTime: {
  48046. future: 'a-benn %s',
  48047. past: '%s ʼzo',
  48048. s: 'un nebeud segondennoù',
  48049. ss: '%d eilenn',
  48050. m: 'ur vunutenn',
  48051. mm: relativeTimeWithMutation,
  48052. h: 'un eur',
  48053. hh: '%d eur',
  48054. d: 'un devezh',
  48055. dd: relativeTimeWithMutation,
  48056. M: 'ur miz',
  48057. MM: relativeTimeWithMutation,
  48058. y: 'ur bloaz',
  48059. yy: specialMutationForYears,
  48060. },
  48061. dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
  48062. ordinal: function (number) {
  48063. var output = number === 1 ? 'añ' : 'vet';
  48064. return number + output;
  48065. },
  48066. week: {
  48067. dow: 1, // Monday is the first day of the week.
  48068. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48069. },
  48070. meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
  48071. isPM: function (token) {
  48072. return token === 'g.m.';
  48073. },
  48074. meridiem: function (hour, minute, isLower) {
  48075. return hour < 12 ? 'a.m.' : 'g.m.';
  48076. },
  48077. });
  48078. return br;
  48079. })));
  48080. /***/ }),
  48081. /***/ 80622:
  48082. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48083. //! moment.js locale configuration
  48084. //! locale : Bosnian [bs]
  48085. //! author : Nedim Cholich : https://github.com/frontyard
  48086. //! based on (hr) translation by Bojan Marković
  48087. ;(function (global, factory) {
  48088. true ? factory(__webpack_require__(30381)) :
  48089. 0
  48090. }(this, (function (moment) { 'use strict';
  48091. //! moment.js locale configuration
  48092. function translate(number, withoutSuffix, key) {
  48093. var result = number + ' ';
  48094. switch (key) {
  48095. case 'ss':
  48096. if (number === 1) {
  48097. result += 'sekunda';
  48098. } else if (number === 2 || number === 3 || number === 4) {
  48099. result += 'sekunde';
  48100. } else {
  48101. result += 'sekundi';
  48102. }
  48103. return result;
  48104. case 'm':
  48105. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  48106. case 'mm':
  48107. if (number === 1) {
  48108. result += 'minuta';
  48109. } else if (number === 2 || number === 3 || number === 4) {
  48110. result += 'minute';
  48111. } else {
  48112. result += 'minuta';
  48113. }
  48114. return result;
  48115. case 'h':
  48116. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  48117. case 'hh':
  48118. if (number === 1) {
  48119. result += 'sat';
  48120. } else if (number === 2 || number === 3 || number === 4) {
  48121. result += 'sata';
  48122. } else {
  48123. result += 'sati';
  48124. }
  48125. return result;
  48126. case 'dd':
  48127. if (number === 1) {
  48128. result += 'dan';
  48129. } else {
  48130. result += 'dana';
  48131. }
  48132. return result;
  48133. case 'MM':
  48134. if (number === 1) {
  48135. result += 'mjesec';
  48136. } else if (number === 2 || number === 3 || number === 4) {
  48137. result += 'mjeseca';
  48138. } else {
  48139. result += 'mjeseci';
  48140. }
  48141. return result;
  48142. case 'yy':
  48143. if (number === 1) {
  48144. result += 'godina';
  48145. } else if (number === 2 || number === 3 || number === 4) {
  48146. result += 'godine';
  48147. } else {
  48148. result += 'godina';
  48149. }
  48150. return result;
  48151. }
  48152. }
  48153. var bs = moment.defineLocale('bs', {
  48154. months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
  48155. '_'
  48156. ),
  48157. monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
  48158. '_'
  48159. ),
  48160. monthsParseExact: true,
  48161. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  48162. '_'
  48163. ),
  48164. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  48165. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  48166. weekdaysParseExact: true,
  48167. longDateFormat: {
  48168. LT: 'H:mm',
  48169. LTS: 'H:mm:ss',
  48170. L: 'DD.MM.YYYY',
  48171. LL: 'D. MMMM YYYY',
  48172. LLL: 'D. MMMM YYYY H:mm',
  48173. LLLL: 'dddd, D. MMMM YYYY H:mm',
  48174. },
  48175. calendar: {
  48176. sameDay: '[danas u] LT',
  48177. nextDay: '[sutra u] LT',
  48178. nextWeek: function () {
  48179. switch (this.day()) {
  48180. case 0:
  48181. return '[u] [nedjelju] [u] LT';
  48182. case 3:
  48183. return '[u] [srijedu] [u] LT';
  48184. case 6:
  48185. return '[u] [subotu] [u] LT';
  48186. case 1:
  48187. case 2:
  48188. case 4:
  48189. case 5:
  48190. return '[u] dddd [u] LT';
  48191. }
  48192. },
  48193. lastDay: '[jučer u] LT',
  48194. lastWeek: function () {
  48195. switch (this.day()) {
  48196. case 0:
  48197. case 3:
  48198. return '[prošlu] dddd [u] LT';
  48199. case 6:
  48200. return '[prošle] [subote] [u] LT';
  48201. case 1:
  48202. case 2:
  48203. case 4:
  48204. case 5:
  48205. return '[prošli] dddd [u] LT';
  48206. }
  48207. },
  48208. sameElse: 'L',
  48209. },
  48210. relativeTime: {
  48211. future: 'za %s',
  48212. past: 'prije %s',
  48213. s: 'par sekundi',
  48214. ss: translate,
  48215. m: translate,
  48216. mm: translate,
  48217. h: translate,
  48218. hh: translate,
  48219. d: 'dan',
  48220. dd: translate,
  48221. M: 'mjesec',
  48222. MM: translate,
  48223. y: 'godinu',
  48224. yy: translate,
  48225. },
  48226. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48227. ordinal: '%d.',
  48228. week: {
  48229. dow: 1, // Monday is the first day of the week.
  48230. doy: 7, // The week that contains Jan 7th is the first week of the year.
  48231. },
  48232. });
  48233. return bs;
  48234. })));
  48235. /***/ }),
  48236. /***/ 2468:
  48237. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48238. //! moment.js locale configuration
  48239. //! locale : Catalan [ca]
  48240. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  48241. ;(function (global, factory) {
  48242. true ? factory(__webpack_require__(30381)) :
  48243. 0
  48244. }(this, (function (moment) { 'use strict';
  48245. //! moment.js locale configuration
  48246. var ca = moment.defineLocale('ca', {
  48247. months: {
  48248. standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
  48249. '_'
  48250. ),
  48251. format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
  48252. '_'
  48253. ),
  48254. isFormat: /D[oD]?(\s)+MMMM/,
  48255. },
  48256. monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
  48257. '_'
  48258. ),
  48259. monthsParseExact: true,
  48260. weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
  48261. '_'
  48262. ),
  48263. weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  48264. weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  48265. weekdaysParseExact: true,
  48266. longDateFormat: {
  48267. LT: 'H:mm',
  48268. LTS: 'H:mm:ss',
  48269. L: 'DD/MM/YYYY',
  48270. LL: 'D MMMM [de] YYYY',
  48271. ll: 'D MMM YYYY',
  48272. LLL: 'D MMMM [de] YYYY [a les] H:mm',
  48273. lll: 'D MMM YYYY, H:mm',
  48274. LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
  48275. llll: 'ddd D MMM YYYY, H:mm',
  48276. },
  48277. calendar: {
  48278. sameDay: function () {
  48279. return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  48280. },
  48281. nextDay: function () {
  48282. return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  48283. },
  48284. nextWeek: function () {
  48285. return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  48286. },
  48287. lastDay: function () {
  48288. return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  48289. },
  48290. lastWeek: function () {
  48291. return (
  48292. '[el] dddd [passat a ' +
  48293. (this.hours() !== 1 ? 'les' : 'la') +
  48294. '] LT'
  48295. );
  48296. },
  48297. sameElse: 'L',
  48298. },
  48299. relativeTime: {
  48300. future: "d'aquí %s",
  48301. past: 'fa %s',
  48302. s: 'uns segons',
  48303. ss: '%d segons',
  48304. m: 'un minut',
  48305. mm: '%d minuts',
  48306. h: 'una hora',
  48307. hh: '%d hores',
  48308. d: 'un dia',
  48309. dd: '%d dies',
  48310. M: 'un mes',
  48311. MM: '%d mesos',
  48312. y: 'un any',
  48313. yy: '%d anys',
  48314. },
  48315. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  48316. ordinal: function (number, period) {
  48317. var output =
  48318. number === 1
  48319. ? 'r'
  48320. : number === 2
  48321. ? 'n'
  48322. : number === 3
  48323. ? 'r'
  48324. : number === 4
  48325. ? 't'
  48326. : 'è';
  48327. if (period === 'w' || period === 'W') {
  48328. output = 'a';
  48329. }
  48330. return number + output;
  48331. },
  48332. week: {
  48333. dow: 1, // Monday is the first day of the week.
  48334. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48335. },
  48336. });
  48337. return ca;
  48338. })));
  48339. /***/ }),
  48340. /***/ 5822:
  48341. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48342. //! moment.js locale configuration
  48343. //! locale : Czech [cs]
  48344. //! author : petrbela : https://github.com/petrbela
  48345. ;(function (global, factory) {
  48346. true ? factory(__webpack_require__(30381)) :
  48347. 0
  48348. }(this, (function (moment) { 'use strict';
  48349. //! moment.js locale configuration
  48350. var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
  48351. '_'
  48352. ),
  48353. monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
  48354. monthsParse = [
  48355. /^led/i,
  48356. /^úno/i,
  48357. /^bře/i,
  48358. /^dub/i,
  48359. /^kvě/i,
  48360. /^(čvn|červen$|června)/i,
  48361. /^(čvc|červenec|července)/i,
  48362. /^srp/i,
  48363. /^zář/i,
  48364. /^říj/i,
  48365. /^lis/i,
  48366. /^pro/i,
  48367. ],
  48368. // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
  48369. // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
  48370. monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
  48371. function plural(n) {
  48372. return n > 1 && n < 5 && ~~(n / 10) !== 1;
  48373. }
  48374. function translate(number, withoutSuffix, key, isFuture) {
  48375. var result = number + ' ';
  48376. switch (key) {
  48377. case 's': // a few seconds / in a few seconds / a few seconds ago
  48378. return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
  48379. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  48380. if (withoutSuffix || isFuture) {
  48381. return result + (plural(number) ? 'sekundy' : 'sekund');
  48382. } else {
  48383. return result + 'sekundami';
  48384. }
  48385. case 'm': // a minute / in a minute / a minute ago
  48386. return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
  48387. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  48388. if (withoutSuffix || isFuture) {
  48389. return result + (plural(number) ? 'minuty' : 'minut');
  48390. } else {
  48391. return result + 'minutami';
  48392. }
  48393. case 'h': // an hour / in an hour / an hour ago
  48394. return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
  48395. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  48396. if (withoutSuffix || isFuture) {
  48397. return result + (plural(number) ? 'hodiny' : 'hodin');
  48398. } else {
  48399. return result + 'hodinami';
  48400. }
  48401. case 'd': // a day / in a day / a day ago
  48402. return withoutSuffix || isFuture ? 'den' : 'dnem';
  48403. case 'dd': // 9 days / in 9 days / 9 days ago
  48404. if (withoutSuffix || isFuture) {
  48405. return result + (plural(number) ? 'dny' : 'dní');
  48406. } else {
  48407. return result + 'dny';
  48408. }
  48409. case 'M': // a month / in a month / a month ago
  48410. return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
  48411. case 'MM': // 9 months / in 9 months / 9 months ago
  48412. if (withoutSuffix || isFuture) {
  48413. return result + (plural(number) ? 'měsíce' : 'měsíců');
  48414. } else {
  48415. return result + 'měsíci';
  48416. }
  48417. case 'y': // a year / in a year / a year ago
  48418. return withoutSuffix || isFuture ? 'rok' : 'rokem';
  48419. case 'yy': // 9 years / in 9 years / 9 years ago
  48420. if (withoutSuffix || isFuture) {
  48421. return result + (plural(number) ? 'roky' : 'let');
  48422. } else {
  48423. return result + 'lety';
  48424. }
  48425. }
  48426. }
  48427. var cs = moment.defineLocale('cs', {
  48428. months: months,
  48429. monthsShort: monthsShort,
  48430. monthsRegex: monthsRegex,
  48431. monthsShortRegex: monthsRegex,
  48432. // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
  48433. // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
  48434. monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
  48435. monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
  48436. monthsParse: monthsParse,
  48437. longMonthsParse: monthsParse,
  48438. shortMonthsParse: monthsParse,
  48439. weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  48440. weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
  48441. weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
  48442. longDateFormat: {
  48443. LT: 'H:mm',
  48444. LTS: 'H:mm:ss',
  48445. L: 'DD.MM.YYYY',
  48446. LL: 'D. MMMM YYYY',
  48447. LLL: 'D. MMMM YYYY H:mm',
  48448. LLLL: 'dddd D. MMMM YYYY H:mm',
  48449. l: 'D. M. YYYY',
  48450. },
  48451. calendar: {
  48452. sameDay: '[dnes v] LT',
  48453. nextDay: '[zítra v] LT',
  48454. nextWeek: function () {
  48455. switch (this.day()) {
  48456. case 0:
  48457. return '[v neděli v] LT';
  48458. case 1:
  48459. case 2:
  48460. return '[v] dddd [v] LT';
  48461. case 3:
  48462. return '[ve středu v] LT';
  48463. case 4:
  48464. return '[ve čtvrtek v] LT';
  48465. case 5:
  48466. return '[v pátek v] LT';
  48467. case 6:
  48468. return '[v sobotu v] LT';
  48469. }
  48470. },
  48471. lastDay: '[včera v] LT',
  48472. lastWeek: function () {
  48473. switch (this.day()) {
  48474. case 0:
  48475. return '[minulou neděli v] LT';
  48476. case 1:
  48477. case 2:
  48478. return '[minulé] dddd [v] LT';
  48479. case 3:
  48480. return '[minulou středu v] LT';
  48481. case 4:
  48482. case 5:
  48483. return '[minulý] dddd [v] LT';
  48484. case 6:
  48485. return '[minulou sobotu v] LT';
  48486. }
  48487. },
  48488. sameElse: 'L',
  48489. },
  48490. relativeTime: {
  48491. future: 'za %s',
  48492. past: 'před %s',
  48493. s: translate,
  48494. ss: translate,
  48495. m: translate,
  48496. mm: translate,
  48497. h: translate,
  48498. hh: translate,
  48499. d: translate,
  48500. dd: translate,
  48501. M: translate,
  48502. MM: translate,
  48503. y: translate,
  48504. yy: translate,
  48505. },
  48506. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48507. ordinal: '%d.',
  48508. week: {
  48509. dow: 1, // Monday is the first day of the week.
  48510. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48511. },
  48512. });
  48513. return cs;
  48514. })));
  48515. /***/ }),
  48516. /***/ 50877:
  48517. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48518. //! moment.js locale configuration
  48519. //! locale : Chuvash [cv]
  48520. //! author : Anatoly Mironov : https://github.com/mirontoli
  48521. ;(function (global, factory) {
  48522. true ? factory(__webpack_require__(30381)) :
  48523. 0
  48524. }(this, (function (moment) { 'use strict';
  48525. //! moment.js locale configuration
  48526. var cv = moment.defineLocale('cv', {
  48527. months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
  48528. '_'
  48529. ),
  48530. monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
  48531. weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
  48532. '_'
  48533. ),
  48534. weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
  48535. weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
  48536. longDateFormat: {
  48537. LT: 'HH:mm',
  48538. LTS: 'HH:mm:ss',
  48539. L: 'DD-MM-YYYY',
  48540. LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
  48541. LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  48542. LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  48543. },
  48544. calendar: {
  48545. sameDay: '[Паян] LT [сехетре]',
  48546. nextDay: '[Ыран] LT [сехетре]',
  48547. lastDay: '[Ӗнер] LT [сехетре]',
  48548. nextWeek: '[Ҫитес] dddd LT [сехетре]',
  48549. lastWeek: '[Иртнӗ] dddd LT [сехетре]',
  48550. sameElse: 'L',
  48551. },
  48552. relativeTime: {
  48553. future: function (output) {
  48554. var affix = /сехет$/i.exec(output)
  48555. ? 'рен'
  48556. : /ҫул$/i.exec(output)
  48557. ? 'тан'
  48558. : 'ран';
  48559. return output + affix;
  48560. },
  48561. past: '%s каялла',
  48562. s: 'пӗр-ик ҫеккунт',
  48563. ss: '%d ҫеккунт',
  48564. m: 'пӗр минут',
  48565. mm: '%d минут',
  48566. h: 'пӗр сехет',
  48567. hh: '%d сехет',
  48568. d: 'пӗр кун',
  48569. dd: '%d кун',
  48570. M: 'пӗр уйӑх',
  48571. MM: '%d уйӑх',
  48572. y: 'пӗр ҫул',
  48573. yy: '%d ҫул',
  48574. },
  48575. dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
  48576. ordinal: '%d-мӗш',
  48577. week: {
  48578. dow: 1, // Monday is the first day of the week.
  48579. doy: 7, // The week that contains Jan 7th is the first week of the year.
  48580. },
  48581. });
  48582. return cv;
  48583. })));
  48584. /***/ }),
  48585. /***/ 47373:
  48586. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48587. //! moment.js locale configuration
  48588. //! locale : Welsh [cy]
  48589. //! author : Robert Allen : https://github.com/robgallen
  48590. //! author : https://github.com/ryangreaves
  48591. ;(function (global, factory) {
  48592. true ? factory(__webpack_require__(30381)) :
  48593. 0
  48594. }(this, (function (moment) { 'use strict';
  48595. //! moment.js locale configuration
  48596. var cy = moment.defineLocale('cy', {
  48597. months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
  48598. '_'
  48599. ),
  48600. monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
  48601. '_'
  48602. ),
  48603. weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
  48604. '_'
  48605. ),
  48606. weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
  48607. weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
  48608. weekdaysParseExact: true,
  48609. // time formats are the same as en-gb
  48610. longDateFormat: {
  48611. LT: 'HH:mm',
  48612. LTS: 'HH:mm:ss',
  48613. L: 'DD/MM/YYYY',
  48614. LL: 'D MMMM YYYY',
  48615. LLL: 'D MMMM YYYY HH:mm',
  48616. LLLL: 'dddd, D MMMM YYYY HH:mm',
  48617. },
  48618. calendar: {
  48619. sameDay: '[Heddiw am] LT',
  48620. nextDay: '[Yfory am] LT',
  48621. nextWeek: 'dddd [am] LT',
  48622. lastDay: '[Ddoe am] LT',
  48623. lastWeek: 'dddd [diwethaf am] LT',
  48624. sameElse: 'L',
  48625. },
  48626. relativeTime: {
  48627. future: 'mewn %s',
  48628. past: '%s yn ôl',
  48629. s: 'ychydig eiliadau',
  48630. ss: '%d eiliad',
  48631. m: 'munud',
  48632. mm: '%d munud',
  48633. h: 'awr',
  48634. hh: '%d awr',
  48635. d: 'diwrnod',
  48636. dd: '%d diwrnod',
  48637. M: 'mis',
  48638. MM: '%d mis',
  48639. y: 'blwyddyn',
  48640. yy: '%d flynedd',
  48641. },
  48642. dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
  48643. // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  48644. ordinal: function (number) {
  48645. var b = number,
  48646. output = '',
  48647. lookup = [
  48648. '',
  48649. 'af',
  48650. 'il',
  48651. 'ydd',
  48652. 'ydd',
  48653. 'ed',
  48654. 'ed',
  48655. 'ed',
  48656. 'fed',
  48657. 'fed',
  48658. 'fed', // 1af to 10fed
  48659. 'eg',
  48660. 'fed',
  48661. 'eg',
  48662. 'eg',
  48663. 'fed',
  48664. 'eg',
  48665. 'eg',
  48666. 'fed',
  48667. 'eg',
  48668. 'fed', // 11eg to 20fed
  48669. ];
  48670. if (b > 20) {
  48671. if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  48672. output = 'fed'; // not 30ain, 70ain or 90ain
  48673. } else {
  48674. output = 'ain';
  48675. }
  48676. } else if (b > 0) {
  48677. output = lookup[b];
  48678. }
  48679. return number + output;
  48680. },
  48681. week: {
  48682. dow: 1, // Monday is the first day of the week.
  48683. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48684. },
  48685. });
  48686. return cy;
  48687. })));
  48688. /***/ }),
  48689. /***/ 24780:
  48690. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48691. //! moment.js locale configuration
  48692. //! locale : Danish [da]
  48693. //! author : Ulrik Nielsen : https://github.com/mrbase
  48694. ;(function (global, factory) {
  48695. true ? factory(__webpack_require__(30381)) :
  48696. 0
  48697. }(this, (function (moment) { 'use strict';
  48698. //! moment.js locale configuration
  48699. var da = moment.defineLocale('da', {
  48700. months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
  48701. '_'
  48702. ),
  48703. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  48704. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  48705. weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
  48706. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  48707. longDateFormat: {
  48708. LT: 'HH:mm',
  48709. LTS: 'HH:mm:ss',
  48710. L: 'DD.MM.YYYY',
  48711. LL: 'D. MMMM YYYY',
  48712. LLL: 'D. MMMM YYYY HH:mm',
  48713. LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
  48714. },
  48715. calendar: {
  48716. sameDay: '[i dag kl.] LT',
  48717. nextDay: '[i morgen kl.] LT',
  48718. nextWeek: 'på dddd [kl.] LT',
  48719. lastDay: '[i går kl.] LT',
  48720. lastWeek: '[i] dddd[s kl.] LT',
  48721. sameElse: 'L',
  48722. },
  48723. relativeTime: {
  48724. future: 'om %s',
  48725. past: '%s siden',
  48726. s: 'få sekunder',
  48727. ss: '%d sekunder',
  48728. m: 'et minut',
  48729. mm: '%d minutter',
  48730. h: 'en time',
  48731. hh: '%d timer',
  48732. d: 'en dag',
  48733. dd: '%d dage',
  48734. M: 'en måned',
  48735. MM: '%d måneder',
  48736. y: 'et år',
  48737. yy: '%d år',
  48738. },
  48739. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48740. ordinal: '%d.',
  48741. week: {
  48742. dow: 1, // Monday is the first day of the week.
  48743. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48744. },
  48745. });
  48746. return da;
  48747. })));
  48748. /***/ }),
  48749. /***/ 60217:
  48750. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48751. //! moment.js locale configuration
  48752. //! locale : German (Austria) [de-at]
  48753. //! author : lluchs : https://github.com/lluchs
  48754. //! author: Menelion Elensúle: https://github.com/Oire
  48755. //! author : Martin Groller : https://github.com/MadMG
  48756. //! author : Mikolaj Dadela : https://github.com/mik01aj
  48757. ;(function (global, factory) {
  48758. true ? factory(__webpack_require__(30381)) :
  48759. 0
  48760. }(this, (function (moment) { 'use strict';
  48761. //! moment.js locale configuration
  48762. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  48763. var format = {
  48764. m: ['eine Minute', 'einer Minute'],
  48765. h: ['eine Stunde', 'einer Stunde'],
  48766. d: ['ein Tag', 'einem Tag'],
  48767. dd: [number + ' Tage', number + ' Tagen'],
  48768. w: ['eine Woche', 'einer Woche'],
  48769. M: ['ein Monat', 'einem Monat'],
  48770. MM: [number + ' Monate', number + ' Monaten'],
  48771. y: ['ein Jahr', 'einem Jahr'],
  48772. yy: [number + ' Jahre', number + ' Jahren'],
  48773. };
  48774. return withoutSuffix ? format[key][0] : format[key][1];
  48775. }
  48776. var deAt = moment.defineLocale('de-at', {
  48777. months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  48778. '_'
  48779. ),
  48780. monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
  48781. '_'
  48782. ),
  48783. monthsParseExact: true,
  48784. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  48785. '_'
  48786. ),
  48787. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  48788. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  48789. weekdaysParseExact: true,
  48790. longDateFormat: {
  48791. LT: 'HH:mm',
  48792. LTS: 'HH:mm:ss',
  48793. L: 'DD.MM.YYYY',
  48794. LL: 'D. MMMM YYYY',
  48795. LLL: 'D. MMMM YYYY HH:mm',
  48796. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  48797. },
  48798. calendar: {
  48799. sameDay: '[heute um] LT [Uhr]',
  48800. sameElse: 'L',
  48801. nextDay: '[morgen um] LT [Uhr]',
  48802. nextWeek: 'dddd [um] LT [Uhr]',
  48803. lastDay: '[gestern um] LT [Uhr]',
  48804. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  48805. },
  48806. relativeTime: {
  48807. future: 'in %s',
  48808. past: 'vor %s',
  48809. s: 'ein paar Sekunden',
  48810. ss: '%d Sekunden',
  48811. m: processRelativeTime,
  48812. mm: '%d Minuten',
  48813. h: processRelativeTime,
  48814. hh: '%d Stunden',
  48815. d: processRelativeTime,
  48816. dd: processRelativeTime,
  48817. w: processRelativeTime,
  48818. ww: '%d Wochen',
  48819. M: processRelativeTime,
  48820. MM: processRelativeTime,
  48821. y: processRelativeTime,
  48822. yy: processRelativeTime,
  48823. },
  48824. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48825. ordinal: '%d.',
  48826. week: {
  48827. dow: 1, // Monday is the first day of the week.
  48828. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48829. },
  48830. });
  48831. return deAt;
  48832. })));
  48833. /***/ }),
  48834. /***/ 60894:
  48835. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48836. //! moment.js locale configuration
  48837. //! locale : German (Switzerland) [de-ch]
  48838. //! author : sschueller : https://github.com/sschueller
  48839. ;(function (global, factory) {
  48840. true ? factory(__webpack_require__(30381)) :
  48841. 0
  48842. }(this, (function (moment) { 'use strict';
  48843. //! moment.js locale configuration
  48844. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  48845. var format = {
  48846. m: ['eine Minute', 'einer Minute'],
  48847. h: ['eine Stunde', 'einer Stunde'],
  48848. d: ['ein Tag', 'einem Tag'],
  48849. dd: [number + ' Tage', number + ' Tagen'],
  48850. w: ['eine Woche', 'einer Woche'],
  48851. M: ['ein Monat', 'einem Monat'],
  48852. MM: [number + ' Monate', number + ' Monaten'],
  48853. y: ['ein Jahr', 'einem Jahr'],
  48854. yy: [number + ' Jahre', number + ' Jahren'],
  48855. };
  48856. return withoutSuffix ? format[key][0] : format[key][1];
  48857. }
  48858. var deCh = moment.defineLocale('de-ch', {
  48859. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  48860. '_'
  48861. ),
  48862. monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
  48863. '_'
  48864. ),
  48865. monthsParseExact: true,
  48866. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  48867. '_'
  48868. ),
  48869. weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  48870. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  48871. weekdaysParseExact: true,
  48872. longDateFormat: {
  48873. LT: 'HH:mm',
  48874. LTS: 'HH:mm:ss',
  48875. L: 'DD.MM.YYYY',
  48876. LL: 'D. MMMM YYYY',
  48877. LLL: 'D. MMMM YYYY HH:mm',
  48878. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  48879. },
  48880. calendar: {
  48881. sameDay: '[heute um] LT [Uhr]',
  48882. sameElse: 'L',
  48883. nextDay: '[morgen um] LT [Uhr]',
  48884. nextWeek: 'dddd [um] LT [Uhr]',
  48885. lastDay: '[gestern um] LT [Uhr]',
  48886. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  48887. },
  48888. relativeTime: {
  48889. future: 'in %s',
  48890. past: 'vor %s',
  48891. s: 'ein paar Sekunden',
  48892. ss: '%d Sekunden',
  48893. m: processRelativeTime,
  48894. mm: '%d Minuten',
  48895. h: processRelativeTime,
  48896. hh: '%d Stunden',
  48897. d: processRelativeTime,
  48898. dd: processRelativeTime,
  48899. w: processRelativeTime,
  48900. ww: '%d Wochen',
  48901. M: processRelativeTime,
  48902. MM: processRelativeTime,
  48903. y: processRelativeTime,
  48904. yy: processRelativeTime,
  48905. },
  48906. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48907. ordinal: '%d.',
  48908. week: {
  48909. dow: 1, // Monday is the first day of the week.
  48910. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48911. },
  48912. });
  48913. return deCh;
  48914. })));
  48915. /***/ }),
  48916. /***/ 59740:
  48917. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48918. //! moment.js locale configuration
  48919. //! locale : German [de]
  48920. //! author : lluchs : https://github.com/lluchs
  48921. //! author: Menelion Elensúle: https://github.com/Oire
  48922. //! author : Mikolaj Dadela : https://github.com/mik01aj
  48923. ;(function (global, factory) {
  48924. true ? factory(__webpack_require__(30381)) :
  48925. 0
  48926. }(this, (function (moment) { 'use strict';
  48927. //! moment.js locale configuration
  48928. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  48929. var format = {
  48930. m: ['eine Minute', 'einer Minute'],
  48931. h: ['eine Stunde', 'einer Stunde'],
  48932. d: ['ein Tag', 'einem Tag'],
  48933. dd: [number + ' Tage', number + ' Tagen'],
  48934. w: ['eine Woche', 'einer Woche'],
  48935. M: ['ein Monat', 'einem Monat'],
  48936. MM: [number + ' Monate', number + ' Monaten'],
  48937. y: ['ein Jahr', 'einem Jahr'],
  48938. yy: [number + ' Jahre', number + ' Jahren'],
  48939. };
  48940. return withoutSuffix ? format[key][0] : format[key][1];
  48941. }
  48942. var de = moment.defineLocale('de', {
  48943. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  48944. '_'
  48945. ),
  48946. monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
  48947. '_'
  48948. ),
  48949. monthsParseExact: true,
  48950. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  48951. '_'
  48952. ),
  48953. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  48954. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  48955. weekdaysParseExact: true,
  48956. longDateFormat: {
  48957. LT: 'HH:mm',
  48958. LTS: 'HH:mm:ss',
  48959. L: 'DD.MM.YYYY',
  48960. LL: 'D. MMMM YYYY',
  48961. LLL: 'D. MMMM YYYY HH:mm',
  48962. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  48963. },
  48964. calendar: {
  48965. sameDay: '[heute um] LT [Uhr]',
  48966. sameElse: 'L',
  48967. nextDay: '[morgen um] LT [Uhr]',
  48968. nextWeek: 'dddd [um] LT [Uhr]',
  48969. lastDay: '[gestern um] LT [Uhr]',
  48970. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  48971. },
  48972. relativeTime: {
  48973. future: 'in %s',
  48974. past: 'vor %s',
  48975. s: 'ein paar Sekunden',
  48976. ss: '%d Sekunden',
  48977. m: processRelativeTime,
  48978. mm: '%d Minuten',
  48979. h: processRelativeTime,
  48980. hh: '%d Stunden',
  48981. d: processRelativeTime,
  48982. dd: processRelativeTime,
  48983. w: processRelativeTime,
  48984. ww: '%d Wochen',
  48985. M: processRelativeTime,
  48986. MM: processRelativeTime,
  48987. y: processRelativeTime,
  48988. yy: processRelativeTime,
  48989. },
  48990. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48991. ordinal: '%d.',
  48992. week: {
  48993. dow: 1, // Monday is the first day of the week.
  48994. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48995. },
  48996. });
  48997. return de;
  48998. })));
  48999. /***/ }),
  49000. /***/ 5300:
  49001. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49002. //! moment.js locale configuration
  49003. //! locale : Maldivian [dv]
  49004. //! author : Jawish Hameed : https://github.com/jawish
  49005. ;(function (global, factory) {
  49006. true ? factory(__webpack_require__(30381)) :
  49007. 0
  49008. }(this, (function (moment) { 'use strict';
  49009. //! moment.js locale configuration
  49010. var months = [
  49011. 'ޖެނުއަރީ',
  49012. 'ފެބްރުއަރީ',
  49013. 'މާރިޗު',
  49014. 'އޭޕްރީލު',
  49015. 'މޭ',
  49016. 'ޖޫން',
  49017. 'ޖުލައި',
  49018. 'އޯގަސްޓު',
  49019. 'ސެޕްޓެމްބަރު',
  49020. 'އޮކްޓޯބަރު',
  49021. 'ނޮވެމްބަރު',
  49022. 'ޑިސެމްބަރު',
  49023. ],
  49024. weekdays = [
  49025. 'އާދިއްތަ',
  49026. 'ހޯމަ',
  49027. 'އަންގާރަ',
  49028. 'ބުދަ',
  49029. 'ބުރާސްފަތި',
  49030. 'ހުކުރު',
  49031. 'ހޮނިހިރު',
  49032. ];
  49033. var dv = moment.defineLocale('dv', {
  49034. months: months,
  49035. monthsShort: months,
  49036. weekdays: weekdays,
  49037. weekdaysShort: weekdays,
  49038. weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
  49039. longDateFormat: {
  49040. LT: 'HH:mm',
  49041. LTS: 'HH:mm:ss',
  49042. L: 'D/M/YYYY',
  49043. LL: 'D MMMM YYYY',
  49044. LLL: 'D MMMM YYYY HH:mm',
  49045. LLLL: 'dddd D MMMM YYYY HH:mm',
  49046. },
  49047. meridiemParse: /މކ|މފ/,
  49048. isPM: function (input) {
  49049. return 'މފ' === input;
  49050. },
  49051. meridiem: function (hour, minute, isLower) {
  49052. if (hour < 12) {
  49053. return 'މކ';
  49054. } else {
  49055. return 'މފ';
  49056. }
  49057. },
  49058. calendar: {
  49059. sameDay: '[މިއަދު] LT',
  49060. nextDay: '[މާދަމާ] LT',
  49061. nextWeek: 'dddd LT',
  49062. lastDay: '[އިއްޔެ] LT',
  49063. lastWeek: '[ފާއިތުވި] dddd LT',
  49064. sameElse: 'L',
  49065. },
  49066. relativeTime: {
  49067. future: 'ތެރޭގައި %s',
  49068. past: 'ކުރިން %s',
  49069. s: 'ސިކުންތުކޮޅެއް',
  49070. ss: 'd% ސިކުންތު',
  49071. m: 'މިނިޓެއް',
  49072. mm: 'މިނިޓު %d',
  49073. h: 'ގަޑިއިރެއް',
  49074. hh: 'ގަޑިއިރު %d',
  49075. d: 'ދުވަހެއް',
  49076. dd: 'ދުވަސް %d',
  49077. M: 'މަހެއް',
  49078. MM: 'މަސް %d',
  49079. y: 'އަހަރެއް',
  49080. yy: 'އަހަރު %d',
  49081. },
  49082. preparse: function (string) {
  49083. return string.replace(/،/g, ',');
  49084. },
  49085. postformat: function (string) {
  49086. return string.replace(/,/g, '،');
  49087. },
  49088. week: {
  49089. dow: 7, // Sunday is the first day of the week.
  49090. doy: 12, // The week that contains Jan 12th is the first week of the year.
  49091. },
  49092. });
  49093. return dv;
  49094. })));
  49095. /***/ }),
  49096. /***/ 50837:
  49097. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49098. //! moment.js locale configuration
  49099. //! locale : Greek [el]
  49100. //! author : Aggelos Karalias : https://github.com/mehiel
  49101. ;(function (global, factory) {
  49102. true ? factory(__webpack_require__(30381)) :
  49103. 0
  49104. }(this, (function (moment) { 'use strict';
  49105. //! moment.js locale configuration
  49106. function isFunction(input) {
  49107. return (
  49108. (typeof Function !== 'undefined' && input instanceof Function) ||
  49109. Object.prototype.toString.call(input) === '[object Function]'
  49110. );
  49111. }
  49112. var el = moment.defineLocale('el', {
  49113. monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
  49114. '_'
  49115. ),
  49116. monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
  49117. '_'
  49118. ),
  49119. months: function (momentToFormat, format) {
  49120. if (!momentToFormat) {
  49121. return this._monthsNominativeEl;
  49122. } else if (
  49123. typeof format === 'string' &&
  49124. /D/.test(format.substring(0, format.indexOf('MMMM')))
  49125. ) {
  49126. // if there is a day number before 'MMMM'
  49127. return this._monthsGenitiveEl[momentToFormat.month()];
  49128. } else {
  49129. return this._monthsNominativeEl[momentToFormat.month()];
  49130. }
  49131. },
  49132. monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
  49133. weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
  49134. '_'
  49135. ),
  49136. weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
  49137. weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
  49138. meridiem: function (hours, minutes, isLower) {
  49139. if (hours > 11) {
  49140. return isLower ? 'μμ' : 'ΜΜ';
  49141. } else {
  49142. return isLower ? 'πμ' : 'ΠΜ';
  49143. }
  49144. },
  49145. isPM: function (input) {
  49146. return (input + '').toLowerCase()[0] === 'μ';
  49147. },
  49148. meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
  49149. longDateFormat: {
  49150. LT: 'h:mm A',
  49151. LTS: 'h:mm:ss A',
  49152. L: 'DD/MM/YYYY',
  49153. LL: 'D MMMM YYYY',
  49154. LLL: 'D MMMM YYYY h:mm A',
  49155. LLLL: 'dddd, D MMMM YYYY h:mm A',
  49156. },
  49157. calendarEl: {
  49158. sameDay: '[Σήμερα {}] LT',
  49159. nextDay: '[Αύριο {}] LT',
  49160. nextWeek: 'dddd [{}] LT',
  49161. lastDay: '[Χθες {}] LT',
  49162. lastWeek: function () {
  49163. switch (this.day()) {
  49164. case 6:
  49165. return '[το προηγούμενο] dddd [{}] LT';
  49166. default:
  49167. return '[την προηγούμενη] dddd [{}] LT';
  49168. }
  49169. },
  49170. sameElse: 'L',
  49171. },
  49172. calendar: function (key, mom) {
  49173. var output = this._calendarEl[key],
  49174. hours = mom && mom.hours();
  49175. if (isFunction(output)) {
  49176. output = output.apply(mom);
  49177. }
  49178. return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
  49179. },
  49180. relativeTime: {
  49181. future: 'σε %s',
  49182. past: '%s πριν',
  49183. s: 'λίγα δευτερόλεπτα',
  49184. ss: '%d δευτερόλεπτα',
  49185. m: 'ένα λεπτό',
  49186. mm: '%d λεπτά',
  49187. h: 'μία ώρα',
  49188. hh: '%d ώρες',
  49189. d: 'μία μέρα',
  49190. dd: '%d μέρες',
  49191. M: 'ένας μήνας',
  49192. MM: '%d μήνες',
  49193. y: 'ένας χρόνος',
  49194. yy: '%d χρόνια',
  49195. },
  49196. dayOfMonthOrdinalParse: /\d{1,2}η/,
  49197. ordinal: '%dη',
  49198. week: {
  49199. dow: 1, // Monday is the first day of the week.
  49200. doy: 4, // The week that contains Jan 4st is the first week of the year.
  49201. },
  49202. });
  49203. return el;
  49204. })));
  49205. /***/ }),
  49206. /***/ 78348:
  49207. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49208. //! moment.js locale configuration
  49209. //! locale : English (Australia) [en-au]
  49210. //! author : Jared Morse : https://github.com/jarcoal
  49211. ;(function (global, factory) {
  49212. true ? factory(__webpack_require__(30381)) :
  49213. 0
  49214. }(this, (function (moment) { 'use strict';
  49215. //! moment.js locale configuration
  49216. var enAu = moment.defineLocale('en-au', {
  49217. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49218. '_'
  49219. ),
  49220. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49221. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49222. '_'
  49223. ),
  49224. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49225. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49226. longDateFormat: {
  49227. LT: 'h:mm A',
  49228. LTS: 'h:mm:ss A',
  49229. L: 'DD/MM/YYYY',
  49230. LL: 'D MMMM YYYY',
  49231. LLL: 'D MMMM YYYY h:mm A',
  49232. LLLL: 'dddd, D MMMM YYYY h:mm A',
  49233. },
  49234. calendar: {
  49235. sameDay: '[Today at] LT',
  49236. nextDay: '[Tomorrow at] LT',
  49237. nextWeek: 'dddd [at] LT',
  49238. lastDay: '[Yesterday at] LT',
  49239. lastWeek: '[Last] dddd [at] LT',
  49240. sameElse: 'L',
  49241. },
  49242. relativeTime: {
  49243. future: 'in %s',
  49244. past: '%s ago',
  49245. s: 'a few seconds',
  49246. ss: '%d seconds',
  49247. m: 'a minute',
  49248. mm: '%d minutes',
  49249. h: 'an hour',
  49250. hh: '%d hours',
  49251. d: 'a day',
  49252. dd: '%d days',
  49253. M: 'a month',
  49254. MM: '%d months',
  49255. y: 'a year',
  49256. yy: '%d years',
  49257. },
  49258. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49259. ordinal: function (number) {
  49260. var b = number % 10,
  49261. output =
  49262. ~~((number % 100) / 10) === 1
  49263. ? 'th'
  49264. : b === 1
  49265. ? 'st'
  49266. : b === 2
  49267. ? 'nd'
  49268. : b === 3
  49269. ? 'rd'
  49270. : 'th';
  49271. return number + output;
  49272. },
  49273. week: {
  49274. dow: 0, // Sunday is the first day of the week.
  49275. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49276. },
  49277. });
  49278. return enAu;
  49279. })));
  49280. /***/ }),
  49281. /***/ 77925:
  49282. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49283. //! moment.js locale configuration
  49284. //! locale : English (Canada) [en-ca]
  49285. //! author : Jonathan Abourbih : https://github.com/jonbca
  49286. ;(function (global, factory) {
  49287. true ? factory(__webpack_require__(30381)) :
  49288. 0
  49289. }(this, (function (moment) { 'use strict';
  49290. //! moment.js locale configuration
  49291. var enCa = moment.defineLocale('en-ca', {
  49292. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49293. '_'
  49294. ),
  49295. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49296. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49297. '_'
  49298. ),
  49299. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49300. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49301. longDateFormat: {
  49302. LT: 'h:mm A',
  49303. LTS: 'h:mm:ss A',
  49304. L: 'YYYY-MM-DD',
  49305. LL: 'MMMM D, YYYY',
  49306. LLL: 'MMMM D, YYYY h:mm A',
  49307. LLLL: 'dddd, MMMM D, YYYY h:mm A',
  49308. },
  49309. calendar: {
  49310. sameDay: '[Today at] LT',
  49311. nextDay: '[Tomorrow at] LT',
  49312. nextWeek: 'dddd [at] LT',
  49313. lastDay: '[Yesterday at] LT',
  49314. lastWeek: '[Last] dddd [at] LT',
  49315. sameElse: 'L',
  49316. },
  49317. relativeTime: {
  49318. future: 'in %s',
  49319. past: '%s ago',
  49320. s: 'a few seconds',
  49321. ss: '%d seconds',
  49322. m: 'a minute',
  49323. mm: '%d minutes',
  49324. h: 'an hour',
  49325. hh: '%d hours',
  49326. d: 'a day',
  49327. dd: '%d days',
  49328. M: 'a month',
  49329. MM: '%d months',
  49330. y: 'a year',
  49331. yy: '%d years',
  49332. },
  49333. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49334. ordinal: function (number) {
  49335. var b = number % 10,
  49336. output =
  49337. ~~((number % 100) / 10) === 1
  49338. ? 'th'
  49339. : b === 1
  49340. ? 'st'
  49341. : b === 2
  49342. ? 'nd'
  49343. : b === 3
  49344. ? 'rd'
  49345. : 'th';
  49346. return number + output;
  49347. },
  49348. });
  49349. return enCa;
  49350. })));
  49351. /***/ }),
  49352. /***/ 22243:
  49353. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49354. //! moment.js locale configuration
  49355. //! locale : English (United Kingdom) [en-gb]
  49356. //! author : Chris Gedrim : https://github.com/chrisgedrim
  49357. ;(function (global, factory) {
  49358. true ? factory(__webpack_require__(30381)) :
  49359. 0
  49360. }(this, (function (moment) { 'use strict';
  49361. //! moment.js locale configuration
  49362. var enGb = moment.defineLocale('en-gb', {
  49363. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49364. '_'
  49365. ),
  49366. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49367. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49368. '_'
  49369. ),
  49370. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49371. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49372. longDateFormat: {
  49373. LT: 'HH:mm',
  49374. LTS: 'HH:mm:ss',
  49375. L: 'DD/MM/YYYY',
  49376. LL: 'D MMMM YYYY',
  49377. LLL: 'D MMMM YYYY HH:mm',
  49378. LLLL: 'dddd, D MMMM YYYY HH:mm',
  49379. },
  49380. calendar: {
  49381. sameDay: '[Today at] LT',
  49382. nextDay: '[Tomorrow at] LT',
  49383. nextWeek: 'dddd [at] LT',
  49384. lastDay: '[Yesterday at] LT',
  49385. lastWeek: '[Last] dddd [at] LT',
  49386. sameElse: 'L',
  49387. },
  49388. relativeTime: {
  49389. future: 'in %s',
  49390. past: '%s ago',
  49391. s: 'a few seconds',
  49392. ss: '%d seconds',
  49393. m: 'a minute',
  49394. mm: '%d minutes',
  49395. h: 'an hour',
  49396. hh: '%d hours',
  49397. d: 'a day',
  49398. dd: '%d days',
  49399. M: 'a month',
  49400. MM: '%d months',
  49401. y: 'a year',
  49402. yy: '%d years',
  49403. },
  49404. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49405. ordinal: function (number) {
  49406. var b = number % 10,
  49407. output =
  49408. ~~((number % 100) / 10) === 1
  49409. ? 'th'
  49410. : b === 1
  49411. ? 'st'
  49412. : b === 2
  49413. ? 'nd'
  49414. : b === 3
  49415. ? 'rd'
  49416. : 'th';
  49417. return number + output;
  49418. },
  49419. week: {
  49420. dow: 1, // Monday is the first day of the week.
  49421. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49422. },
  49423. });
  49424. return enGb;
  49425. })));
  49426. /***/ }),
  49427. /***/ 46436:
  49428. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49429. //! moment.js locale configuration
  49430. //! locale : English (Ireland) [en-ie]
  49431. //! author : Chris Cartlidge : https://github.com/chriscartlidge
  49432. ;(function (global, factory) {
  49433. true ? factory(__webpack_require__(30381)) :
  49434. 0
  49435. }(this, (function (moment) { 'use strict';
  49436. //! moment.js locale configuration
  49437. var enIe = moment.defineLocale('en-ie', {
  49438. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49439. '_'
  49440. ),
  49441. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49442. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49443. '_'
  49444. ),
  49445. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49446. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49447. longDateFormat: {
  49448. LT: 'HH:mm',
  49449. LTS: 'HH:mm:ss',
  49450. L: 'DD/MM/YYYY',
  49451. LL: 'D MMMM YYYY',
  49452. LLL: 'D MMMM YYYY HH:mm',
  49453. LLLL: 'dddd D MMMM YYYY HH:mm',
  49454. },
  49455. calendar: {
  49456. sameDay: '[Today at] LT',
  49457. nextDay: '[Tomorrow at] LT',
  49458. nextWeek: 'dddd [at] LT',
  49459. lastDay: '[Yesterday at] LT',
  49460. lastWeek: '[Last] dddd [at] LT',
  49461. sameElse: 'L',
  49462. },
  49463. relativeTime: {
  49464. future: 'in %s',
  49465. past: '%s ago',
  49466. s: 'a few seconds',
  49467. ss: '%d seconds',
  49468. m: 'a minute',
  49469. mm: '%d minutes',
  49470. h: 'an hour',
  49471. hh: '%d hours',
  49472. d: 'a day',
  49473. dd: '%d days',
  49474. M: 'a month',
  49475. MM: '%d months',
  49476. y: 'a year',
  49477. yy: '%d years',
  49478. },
  49479. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49480. ordinal: function (number) {
  49481. var b = number % 10,
  49482. output =
  49483. ~~((number % 100) / 10) === 1
  49484. ? 'th'
  49485. : b === 1
  49486. ? 'st'
  49487. : b === 2
  49488. ? 'nd'
  49489. : b === 3
  49490. ? 'rd'
  49491. : 'th';
  49492. return number + output;
  49493. },
  49494. week: {
  49495. dow: 1, // Monday is the first day of the week.
  49496. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49497. },
  49498. });
  49499. return enIe;
  49500. })));
  49501. /***/ }),
  49502. /***/ 47207:
  49503. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49504. //! moment.js locale configuration
  49505. //! locale : English (Israel) [en-il]
  49506. //! author : Chris Gedrim : https://github.com/chrisgedrim
  49507. ;(function (global, factory) {
  49508. true ? factory(__webpack_require__(30381)) :
  49509. 0
  49510. }(this, (function (moment) { 'use strict';
  49511. //! moment.js locale configuration
  49512. var enIl = moment.defineLocale('en-il', {
  49513. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49514. '_'
  49515. ),
  49516. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49517. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49518. '_'
  49519. ),
  49520. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49521. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49522. longDateFormat: {
  49523. LT: 'HH:mm',
  49524. LTS: 'HH:mm:ss',
  49525. L: 'DD/MM/YYYY',
  49526. LL: 'D MMMM YYYY',
  49527. LLL: 'D MMMM YYYY HH:mm',
  49528. LLLL: 'dddd, D MMMM YYYY HH:mm',
  49529. },
  49530. calendar: {
  49531. sameDay: '[Today at] LT',
  49532. nextDay: '[Tomorrow at] LT',
  49533. nextWeek: 'dddd [at] LT',
  49534. lastDay: '[Yesterday at] LT',
  49535. lastWeek: '[Last] dddd [at] LT',
  49536. sameElse: 'L',
  49537. },
  49538. relativeTime: {
  49539. future: 'in %s',
  49540. past: '%s ago',
  49541. s: 'a few seconds',
  49542. ss: '%d seconds',
  49543. m: 'a minute',
  49544. mm: '%d minutes',
  49545. h: 'an hour',
  49546. hh: '%d hours',
  49547. d: 'a day',
  49548. dd: '%d days',
  49549. M: 'a month',
  49550. MM: '%d months',
  49551. y: 'a year',
  49552. yy: '%d years',
  49553. },
  49554. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49555. ordinal: function (number) {
  49556. var b = number % 10,
  49557. output =
  49558. ~~((number % 100) / 10) === 1
  49559. ? 'th'
  49560. : b === 1
  49561. ? 'st'
  49562. : b === 2
  49563. ? 'nd'
  49564. : b === 3
  49565. ? 'rd'
  49566. : 'th';
  49567. return number + output;
  49568. },
  49569. });
  49570. return enIl;
  49571. })));
  49572. /***/ }),
  49573. /***/ 44175:
  49574. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49575. //! moment.js locale configuration
  49576. //! locale : English (India) [en-in]
  49577. //! author : Jatin Agrawal : https://github.com/jatinag22
  49578. ;(function (global, factory) {
  49579. true ? factory(__webpack_require__(30381)) :
  49580. 0
  49581. }(this, (function (moment) { 'use strict';
  49582. //! moment.js locale configuration
  49583. var enIn = moment.defineLocale('en-in', {
  49584. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49585. '_'
  49586. ),
  49587. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49588. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49589. '_'
  49590. ),
  49591. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49592. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49593. longDateFormat: {
  49594. LT: 'h:mm A',
  49595. LTS: 'h:mm:ss A',
  49596. L: 'DD/MM/YYYY',
  49597. LL: 'D MMMM YYYY',
  49598. LLL: 'D MMMM YYYY h:mm A',
  49599. LLLL: 'dddd, D MMMM YYYY h:mm A',
  49600. },
  49601. calendar: {
  49602. sameDay: '[Today at] LT',
  49603. nextDay: '[Tomorrow at] LT',
  49604. nextWeek: 'dddd [at] LT',
  49605. lastDay: '[Yesterday at] LT',
  49606. lastWeek: '[Last] dddd [at] LT',
  49607. sameElse: 'L',
  49608. },
  49609. relativeTime: {
  49610. future: 'in %s',
  49611. past: '%s ago',
  49612. s: 'a few seconds',
  49613. ss: '%d seconds',
  49614. m: 'a minute',
  49615. mm: '%d minutes',
  49616. h: 'an hour',
  49617. hh: '%d hours',
  49618. d: 'a day',
  49619. dd: '%d days',
  49620. M: 'a month',
  49621. MM: '%d months',
  49622. y: 'a year',
  49623. yy: '%d years',
  49624. },
  49625. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49626. ordinal: function (number) {
  49627. var b = number % 10,
  49628. output =
  49629. ~~((number % 100) / 10) === 1
  49630. ? 'th'
  49631. : b === 1
  49632. ? 'st'
  49633. : b === 2
  49634. ? 'nd'
  49635. : b === 3
  49636. ? 'rd'
  49637. : 'th';
  49638. return number + output;
  49639. },
  49640. week: {
  49641. dow: 0, // Sunday is the first day of the week.
  49642. doy: 6, // The week that contains Jan 1st is the first week of the year.
  49643. },
  49644. });
  49645. return enIn;
  49646. })));
  49647. /***/ }),
  49648. /***/ 76319:
  49649. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49650. //! moment.js locale configuration
  49651. //! locale : English (New Zealand) [en-nz]
  49652. //! author : Luke McGregor : https://github.com/lukemcgregor
  49653. ;(function (global, factory) {
  49654. true ? factory(__webpack_require__(30381)) :
  49655. 0
  49656. }(this, (function (moment) { 'use strict';
  49657. //! moment.js locale configuration
  49658. var enNz = moment.defineLocale('en-nz', {
  49659. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49660. '_'
  49661. ),
  49662. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49663. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49664. '_'
  49665. ),
  49666. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49667. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49668. longDateFormat: {
  49669. LT: 'h:mm A',
  49670. LTS: 'h:mm:ss A',
  49671. L: 'DD/MM/YYYY',
  49672. LL: 'D MMMM YYYY',
  49673. LLL: 'D MMMM YYYY h:mm A',
  49674. LLLL: 'dddd, D MMMM YYYY h:mm A',
  49675. },
  49676. calendar: {
  49677. sameDay: '[Today at] LT',
  49678. nextDay: '[Tomorrow at] LT',
  49679. nextWeek: 'dddd [at] LT',
  49680. lastDay: '[Yesterday at] LT',
  49681. lastWeek: '[Last] dddd [at] LT',
  49682. sameElse: 'L',
  49683. },
  49684. relativeTime: {
  49685. future: 'in %s',
  49686. past: '%s ago',
  49687. s: 'a few seconds',
  49688. ss: '%d seconds',
  49689. m: 'a minute',
  49690. mm: '%d minutes',
  49691. h: 'an hour',
  49692. hh: '%d hours',
  49693. d: 'a day',
  49694. dd: '%d days',
  49695. M: 'a month',
  49696. MM: '%d months',
  49697. y: 'a year',
  49698. yy: '%d years',
  49699. },
  49700. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49701. ordinal: function (number) {
  49702. var b = number % 10,
  49703. output =
  49704. ~~((number % 100) / 10) === 1
  49705. ? 'th'
  49706. : b === 1
  49707. ? 'st'
  49708. : b === 2
  49709. ? 'nd'
  49710. : b === 3
  49711. ? 'rd'
  49712. : 'th';
  49713. return number + output;
  49714. },
  49715. week: {
  49716. dow: 1, // Monday is the first day of the week.
  49717. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49718. },
  49719. });
  49720. return enNz;
  49721. })));
  49722. /***/ }),
  49723. /***/ 31662:
  49724. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49725. //! moment.js locale configuration
  49726. //! locale : English (Singapore) [en-sg]
  49727. //! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
  49728. ;(function (global, factory) {
  49729. true ? factory(__webpack_require__(30381)) :
  49730. 0
  49731. }(this, (function (moment) { 'use strict';
  49732. //! moment.js locale configuration
  49733. var enSg = moment.defineLocale('en-sg', {
  49734. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  49735. '_'
  49736. ),
  49737. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  49738. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  49739. '_'
  49740. ),
  49741. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  49742. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  49743. longDateFormat: {
  49744. LT: 'HH:mm',
  49745. LTS: 'HH:mm:ss',
  49746. L: 'DD/MM/YYYY',
  49747. LL: 'D MMMM YYYY',
  49748. LLL: 'D MMMM YYYY HH:mm',
  49749. LLLL: 'dddd, D MMMM YYYY HH:mm',
  49750. },
  49751. calendar: {
  49752. sameDay: '[Today at] LT',
  49753. nextDay: '[Tomorrow at] LT',
  49754. nextWeek: 'dddd [at] LT',
  49755. lastDay: '[Yesterday at] LT',
  49756. lastWeek: '[Last] dddd [at] LT',
  49757. sameElse: 'L',
  49758. },
  49759. relativeTime: {
  49760. future: 'in %s',
  49761. past: '%s ago',
  49762. s: 'a few seconds',
  49763. ss: '%d seconds',
  49764. m: 'a minute',
  49765. mm: '%d minutes',
  49766. h: 'an hour',
  49767. hh: '%d hours',
  49768. d: 'a day',
  49769. dd: '%d days',
  49770. M: 'a month',
  49771. MM: '%d months',
  49772. y: 'a year',
  49773. yy: '%d years',
  49774. },
  49775. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  49776. ordinal: function (number) {
  49777. var b = number % 10,
  49778. output =
  49779. ~~((number % 100) / 10) === 1
  49780. ? 'th'
  49781. : b === 1
  49782. ? 'st'
  49783. : b === 2
  49784. ? 'nd'
  49785. : b === 3
  49786. ? 'rd'
  49787. : 'th';
  49788. return number + output;
  49789. },
  49790. week: {
  49791. dow: 1, // Monday is the first day of the week.
  49792. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49793. },
  49794. });
  49795. return enSg;
  49796. })));
  49797. /***/ }),
  49798. /***/ 92915:
  49799. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49800. //! moment.js locale configuration
  49801. //! locale : Esperanto [eo]
  49802. //! author : Colin Dean : https://github.com/colindean
  49803. //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
  49804. //! comment : miestasmia corrected the translation by colindean
  49805. //! comment : Vivakvo corrected the translation by colindean and miestasmia
  49806. ;(function (global, factory) {
  49807. true ? factory(__webpack_require__(30381)) :
  49808. 0
  49809. }(this, (function (moment) { 'use strict';
  49810. //! moment.js locale configuration
  49811. var eo = moment.defineLocale('eo', {
  49812. months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
  49813. '_'
  49814. ),
  49815. monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
  49816. weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
  49817. weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
  49818. weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
  49819. longDateFormat: {
  49820. LT: 'HH:mm',
  49821. LTS: 'HH:mm:ss',
  49822. L: 'YYYY-MM-DD',
  49823. LL: '[la] D[-an de] MMMM, YYYY',
  49824. LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
  49825. LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
  49826. llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
  49827. },
  49828. meridiemParse: /[ap]\.t\.m/i,
  49829. isPM: function (input) {
  49830. return input.charAt(0).toLowerCase() === 'p';
  49831. },
  49832. meridiem: function (hours, minutes, isLower) {
  49833. if (hours > 11) {
  49834. return isLower ? 'p.t.m.' : 'P.T.M.';
  49835. } else {
  49836. return isLower ? 'a.t.m.' : 'A.T.M.';
  49837. }
  49838. },
  49839. calendar: {
  49840. sameDay: '[Hodiaŭ je] LT',
  49841. nextDay: '[Morgaŭ je] LT',
  49842. nextWeek: 'dddd[n je] LT',
  49843. lastDay: '[Hieraŭ je] LT',
  49844. lastWeek: '[pasintan] dddd[n je] LT',
  49845. sameElse: 'L',
  49846. },
  49847. relativeTime: {
  49848. future: 'post %s',
  49849. past: 'antaŭ %s',
  49850. s: 'kelkaj sekundoj',
  49851. ss: '%d sekundoj',
  49852. m: 'unu minuto',
  49853. mm: '%d minutoj',
  49854. h: 'unu horo',
  49855. hh: '%d horoj',
  49856. d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
  49857. dd: '%d tagoj',
  49858. M: 'unu monato',
  49859. MM: '%d monatoj',
  49860. y: 'unu jaro',
  49861. yy: '%d jaroj',
  49862. },
  49863. dayOfMonthOrdinalParse: /\d{1,2}a/,
  49864. ordinal: '%da',
  49865. week: {
  49866. dow: 1, // Monday is the first day of the week.
  49867. doy: 7, // The week that contains Jan 7th is the first week of the year.
  49868. },
  49869. });
  49870. return eo;
  49871. })));
  49872. /***/ }),
  49873. /***/ 55251:
  49874. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49875. //! moment.js locale configuration
  49876. //! locale : Spanish (Dominican Republic) [es-do]
  49877. ;(function (global, factory) {
  49878. true ? factory(__webpack_require__(30381)) :
  49879. 0
  49880. }(this, (function (moment) { 'use strict';
  49881. //! moment.js locale configuration
  49882. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  49883. '_'
  49884. ),
  49885. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  49886. monthsParse = [
  49887. /^ene/i,
  49888. /^feb/i,
  49889. /^mar/i,
  49890. /^abr/i,
  49891. /^may/i,
  49892. /^jun/i,
  49893. /^jul/i,
  49894. /^ago/i,
  49895. /^sep/i,
  49896. /^oct/i,
  49897. /^nov/i,
  49898. /^dic/i,
  49899. ],
  49900. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  49901. var esDo = moment.defineLocale('es-do', {
  49902. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  49903. '_'
  49904. ),
  49905. monthsShort: function (m, format) {
  49906. if (!m) {
  49907. return monthsShortDot;
  49908. } else if (/-MMM-/.test(format)) {
  49909. return monthsShort[m.month()];
  49910. } else {
  49911. return monthsShortDot[m.month()];
  49912. }
  49913. },
  49914. monthsRegex: monthsRegex,
  49915. monthsShortRegex: monthsRegex,
  49916. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  49917. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  49918. monthsParse: monthsParse,
  49919. longMonthsParse: monthsParse,
  49920. shortMonthsParse: monthsParse,
  49921. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  49922. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  49923. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  49924. weekdaysParseExact: true,
  49925. longDateFormat: {
  49926. LT: 'h:mm A',
  49927. LTS: 'h:mm:ss A',
  49928. L: 'DD/MM/YYYY',
  49929. LL: 'D [de] MMMM [de] YYYY',
  49930. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  49931. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
  49932. },
  49933. calendar: {
  49934. sameDay: function () {
  49935. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  49936. },
  49937. nextDay: function () {
  49938. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  49939. },
  49940. nextWeek: function () {
  49941. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  49942. },
  49943. lastDay: function () {
  49944. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  49945. },
  49946. lastWeek: function () {
  49947. return (
  49948. '[el] dddd [pasado a la' +
  49949. (this.hours() !== 1 ? 's' : '') +
  49950. '] LT'
  49951. );
  49952. },
  49953. sameElse: 'L',
  49954. },
  49955. relativeTime: {
  49956. future: 'en %s',
  49957. past: 'hace %s',
  49958. s: 'unos segundos',
  49959. ss: '%d segundos',
  49960. m: 'un minuto',
  49961. mm: '%d minutos',
  49962. h: 'una hora',
  49963. hh: '%d horas',
  49964. d: 'un día',
  49965. dd: '%d días',
  49966. w: 'una semana',
  49967. ww: '%d semanas',
  49968. M: 'un mes',
  49969. MM: '%d meses',
  49970. y: 'un año',
  49971. yy: '%d años',
  49972. },
  49973. dayOfMonthOrdinalParse: /\d{1,2}º/,
  49974. ordinal: '%dº',
  49975. week: {
  49976. dow: 1, // Monday is the first day of the week.
  49977. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49978. },
  49979. });
  49980. return esDo;
  49981. })));
  49982. /***/ }),
  49983. /***/ 96112:
  49984. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49985. //! moment.js locale configuration
  49986. //! locale : Spanish (Mexico) [es-mx]
  49987. //! author : JC Franco : https://github.com/jcfranco
  49988. ;(function (global, factory) {
  49989. true ? factory(__webpack_require__(30381)) :
  49990. 0
  49991. }(this, (function (moment) { 'use strict';
  49992. //! moment.js locale configuration
  49993. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  49994. '_'
  49995. ),
  49996. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  49997. monthsParse = [
  49998. /^ene/i,
  49999. /^feb/i,
  50000. /^mar/i,
  50001. /^abr/i,
  50002. /^may/i,
  50003. /^jun/i,
  50004. /^jul/i,
  50005. /^ago/i,
  50006. /^sep/i,
  50007. /^oct/i,
  50008. /^nov/i,
  50009. /^dic/i,
  50010. ],
  50011. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  50012. var esMx = moment.defineLocale('es-mx', {
  50013. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  50014. '_'
  50015. ),
  50016. monthsShort: function (m, format) {
  50017. if (!m) {
  50018. return monthsShortDot;
  50019. } else if (/-MMM-/.test(format)) {
  50020. return monthsShort[m.month()];
  50021. } else {
  50022. return monthsShortDot[m.month()];
  50023. }
  50024. },
  50025. monthsRegex: monthsRegex,
  50026. monthsShortRegex: monthsRegex,
  50027. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  50028. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  50029. monthsParse: monthsParse,
  50030. longMonthsParse: monthsParse,
  50031. shortMonthsParse: monthsParse,
  50032. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  50033. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  50034. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  50035. weekdaysParseExact: true,
  50036. longDateFormat: {
  50037. LT: 'H:mm',
  50038. LTS: 'H:mm:ss',
  50039. L: 'DD/MM/YYYY',
  50040. LL: 'D [de] MMMM [de] YYYY',
  50041. LLL: 'D [de] MMMM [de] YYYY H:mm',
  50042. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  50043. },
  50044. calendar: {
  50045. sameDay: function () {
  50046. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50047. },
  50048. nextDay: function () {
  50049. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50050. },
  50051. nextWeek: function () {
  50052. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50053. },
  50054. lastDay: function () {
  50055. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50056. },
  50057. lastWeek: function () {
  50058. return (
  50059. '[el] dddd [pasado a la' +
  50060. (this.hours() !== 1 ? 's' : '') +
  50061. '] LT'
  50062. );
  50063. },
  50064. sameElse: 'L',
  50065. },
  50066. relativeTime: {
  50067. future: 'en %s',
  50068. past: 'hace %s',
  50069. s: 'unos segundos',
  50070. ss: '%d segundos',
  50071. m: 'un minuto',
  50072. mm: '%d minutos',
  50073. h: 'una hora',
  50074. hh: '%d horas',
  50075. d: 'un día',
  50076. dd: '%d días',
  50077. w: 'una semana',
  50078. ww: '%d semanas',
  50079. M: 'un mes',
  50080. MM: '%d meses',
  50081. y: 'un año',
  50082. yy: '%d años',
  50083. },
  50084. dayOfMonthOrdinalParse: /\d{1,2}º/,
  50085. ordinal: '%dº',
  50086. week: {
  50087. dow: 0, // Sunday is the first day of the week.
  50088. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50089. },
  50090. invalidDate: 'Fecha inválida',
  50091. });
  50092. return esMx;
  50093. })));
  50094. /***/ }),
  50095. /***/ 71146:
  50096. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50097. //! moment.js locale configuration
  50098. //! locale : Spanish (United States) [es-us]
  50099. //! author : bustta : https://github.com/bustta
  50100. //! author : chrisrodz : https://github.com/chrisrodz
  50101. ;(function (global, factory) {
  50102. true ? factory(__webpack_require__(30381)) :
  50103. 0
  50104. }(this, (function (moment) { 'use strict';
  50105. //! moment.js locale configuration
  50106. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  50107. '_'
  50108. ),
  50109. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  50110. monthsParse = [
  50111. /^ene/i,
  50112. /^feb/i,
  50113. /^mar/i,
  50114. /^abr/i,
  50115. /^may/i,
  50116. /^jun/i,
  50117. /^jul/i,
  50118. /^ago/i,
  50119. /^sep/i,
  50120. /^oct/i,
  50121. /^nov/i,
  50122. /^dic/i,
  50123. ],
  50124. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  50125. var esUs = moment.defineLocale('es-us', {
  50126. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  50127. '_'
  50128. ),
  50129. monthsShort: function (m, format) {
  50130. if (!m) {
  50131. return monthsShortDot;
  50132. } else if (/-MMM-/.test(format)) {
  50133. return monthsShort[m.month()];
  50134. } else {
  50135. return monthsShortDot[m.month()];
  50136. }
  50137. },
  50138. monthsRegex: monthsRegex,
  50139. monthsShortRegex: monthsRegex,
  50140. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  50141. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  50142. monthsParse: monthsParse,
  50143. longMonthsParse: monthsParse,
  50144. shortMonthsParse: monthsParse,
  50145. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  50146. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  50147. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  50148. weekdaysParseExact: true,
  50149. longDateFormat: {
  50150. LT: 'h:mm A',
  50151. LTS: 'h:mm:ss A',
  50152. L: 'MM/DD/YYYY',
  50153. LL: 'D [de] MMMM [de] YYYY',
  50154. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  50155. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
  50156. },
  50157. calendar: {
  50158. sameDay: function () {
  50159. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50160. },
  50161. nextDay: function () {
  50162. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50163. },
  50164. nextWeek: function () {
  50165. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50166. },
  50167. lastDay: function () {
  50168. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50169. },
  50170. lastWeek: function () {
  50171. return (
  50172. '[el] dddd [pasado a la' +
  50173. (this.hours() !== 1 ? 's' : '') +
  50174. '] LT'
  50175. );
  50176. },
  50177. sameElse: 'L',
  50178. },
  50179. relativeTime: {
  50180. future: 'en %s',
  50181. past: 'hace %s',
  50182. s: 'unos segundos',
  50183. ss: '%d segundos',
  50184. m: 'un minuto',
  50185. mm: '%d minutos',
  50186. h: 'una hora',
  50187. hh: '%d horas',
  50188. d: 'un día',
  50189. dd: '%d días',
  50190. w: 'una semana',
  50191. ww: '%d semanas',
  50192. M: 'un mes',
  50193. MM: '%d meses',
  50194. y: 'un año',
  50195. yy: '%d años',
  50196. },
  50197. dayOfMonthOrdinalParse: /\d{1,2}º/,
  50198. ordinal: '%dº',
  50199. week: {
  50200. dow: 0, // Sunday is the first day of the week.
  50201. doy: 6, // The week that contains Jan 6th is the first week of the year.
  50202. },
  50203. });
  50204. return esUs;
  50205. })));
  50206. /***/ }),
  50207. /***/ 55655:
  50208. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50209. //! moment.js locale configuration
  50210. //! locale : Spanish [es]
  50211. //! author : Julio Napurí : https://github.com/julionc
  50212. ;(function (global, factory) {
  50213. true ? factory(__webpack_require__(30381)) :
  50214. 0
  50215. }(this, (function (moment) { 'use strict';
  50216. //! moment.js locale configuration
  50217. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  50218. '_'
  50219. ),
  50220. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  50221. monthsParse = [
  50222. /^ene/i,
  50223. /^feb/i,
  50224. /^mar/i,
  50225. /^abr/i,
  50226. /^may/i,
  50227. /^jun/i,
  50228. /^jul/i,
  50229. /^ago/i,
  50230. /^sep/i,
  50231. /^oct/i,
  50232. /^nov/i,
  50233. /^dic/i,
  50234. ],
  50235. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  50236. var es = moment.defineLocale('es', {
  50237. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  50238. '_'
  50239. ),
  50240. monthsShort: function (m, format) {
  50241. if (!m) {
  50242. return monthsShortDot;
  50243. } else if (/-MMM-/.test(format)) {
  50244. return monthsShort[m.month()];
  50245. } else {
  50246. return monthsShortDot[m.month()];
  50247. }
  50248. },
  50249. monthsRegex: monthsRegex,
  50250. monthsShortRegex: monthsRegex,
  50251. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  50252. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  50253. monthsParse: monthsParse,
  50254. longMonthsParse: monthsParse,
  50255. shortMonthsParse: monthsParse,
  50256. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  50257. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  50258. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  50259. weekdaysParseExact: true,
  50260. longDateFormat: {
  50261. LT: 'H:mm',
  50262. LTS: 'H:mm:ss',
  50263. L: 'DD/MM/YYYY',
  50264. LL: 'D [de] MMMM [de] YYYY',
  50265. LLL: 'D [de] MMMM [de] YYYY H:mm',
  50266. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  50267. },
  50268. calendar: {
  50269. sameDay: function () {
  50270. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50271. },
  50272. nextDay: function () {
  50273. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50274. },
  50275. nextWeek: function () {
  50276. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50277. },
  50278. lastDay: function () {
  50279. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  50280. },
  50281. lastWeek: function () {
  50282. return (
  50283. '[el] dddd [pasado a la' +
  50284. (this.hours() !== 1 ? 's' : '') +
  50285. '] LT'
  50286. );
  50287. },
  50288. sameElse: 'L',
  50289. },
  50290. relativeTime: {
  50291. future: 'en %s',
  50292. past: 'hace %s',
  50293. s: 'unos segundos',
  50294. ss: '%d segundos',
  50295. m: 'un minuto',
  50296. mm: '%d minutos',
  50297. h: 'una hora',
  50298. hh: '%d horas',
  50299. d: 'un día',
  50300. dd: '%d días',
  50301. w: 'una semana',
  50302. ww: '%d semanas',
  50303. M: 'un mes',
  50304. MM: '%d meses',
  50305. y: 'un año',
  50306. yy: '%d años',
  50307. },
  50308. dayOfMonthOrdinalParse: /\d{1,2}º/,
  50309. ordinal: '%dº',
  50310. week: {
  50311. dow: 1, // Monday is the first day of the week.
  50312. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50313. },
  50314. invalidDate: 'Fecha inválida',
  50315. });
  50316. return es;
  50317. })));
  50318. /***/ }),
  50319. /***/ 5603:
  50320. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50321. //! moment.js locale configuration
  50322. //! locale : Estonian [et]
  50323. //! author : Henry Kehlmann : https://github.com/madhenry
  50324. //! improvements : Illimar Tambek : https://github.com/ragulka
  50325. ;(function (global, factory) {
  50326. true ? factory(__webpack_require__(30381)) :
  50327. 0
  50328. }(this, (function (moment) { 'use strict';
  50329. //! moment.js locale configuration
  50330. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  50331. var format = {
  50332. s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  50333. ss: [number + 'sekundi', number + 'sekundit'],
  50334. m: ['ühe minuti', 'üks minut'],
  50335. mm: [number + ' minuti', number + ' minutit'],
  50336. h: ['ühe tunni', 'tund aega', 'üks tund'],
  50337. hh: [number + ' tunni', number + ' tundi'],
  50338. d: ['ühe päeva', 'üks päev'],
  50339. M: ['kuu aja', 'kuu aega', 'üks kuu'],
  50340. MM: [number + ' kuu', number + ' kuud'],
  50341. y: ['ühe aasta', 'aasta', 'üks aasta'],
  50342. yy: [number + ' aasta', number + ' aastat'],
  50343. };
  50344. if (withoutSuffix) {
  50345. return format[key][2] ? format[key][2] : format[key][1];
  50346. }
  50347. return isFuture ? format[key][0] : format[key][1];
  50348. }
  50349. var et = moment.defineLocale('et', {
  50350. months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
  50351. '_'
  50352. ),
  50353. monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(
  50354. '_'
  50355. ),
  50356. weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
  50357. '_'
  50358. ),
  50359. weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
  50360. weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
  50361. longDateFormat: {
  50362. LT: 'H:mm',
  50363. LTS: 'H:mm:ss',
  50364. L: 'DD.MM.YYYY',
  50365. LL: 'D. MMMM YYYY',
  50366. LLL: 'D. MMMM YYYY H:mm',
  50367. LLLL: 'dddd, D. MMMM YYYY H:mm',
  50368. },
  50369. calendar: {
  50370. sameDay: '[Täna,] LT',
  50371. nextDay: '[Homme,] LT',
  50372. nextWeek: '[Järgmine] dddd LT',
  50373. lastDay: '[Eile,] LT',
  50374. lastWeek: '[Eelmine] dddd LT',
  50375. sameElse: 'L',
  50376. },
  50377. relativeTime: {
  50378. future: '%s pärast',
  50379. past: '%s tagasi',
  50380. s: processRelativeTime,
  50381. ss: processRelativeTime,
  50382. m: processRelativeTime,
  50383. mm: processRelativeTime,
  50384. h: processRelativeTime,
  50385. hh: processRelativeTime,
  50386. d: processRelativeTime,
  50387. dd: '%d päeva',
  50388. M: processRelativeTime,
  50389. MM: processRelativeTime,
  50390. y: processRelativeTime,
  50391. yy: processRelativeTime,
  50392. },
  50393. dayOfMonthOrdinalParse: /\d{1,2}\./,
  50394. ordinal: '%d.',
  50395. week: {
  50396. dow: 1, // Monday is the first day of the week.
  50397. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50398. },
  50399. });
  50400. return et;
  50401. })));
  50402. /***/ }),
  50403. /***/ 77763:
  50404. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50405. //! moment.js locale configuration
  50406. //! locale : Basque [eu]
  50407. //! author : Eneko Illarramendi : https://github.com/eillarra
  50408. ;(function (global, factory) {
  50409. true ? factory(__webpack_require__(30381)) :
  50410. 0
  50411. }(this, (function (moment) { 'use strict';
  50412. //! moment.js locale configuration
  50413. var eu = moment.defineLocale('eu', {
  50414. months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
  50415. '_'
  50416. ),
  50417. monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
  50418. '_'
  50419. ),
  50420. monthsParseExact: true,
  50421. weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
  50422. '_'
  50423. ),
  50424. weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
  50425. weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
  50426. weekdaysParseExact: true,
  50427. longDateFormat: {
  50428. LT: 'HH:mm',
  50429. LTS: 'HH:mm:ss',
  50430. L: 'YYYY-MM-DD',
  50431. LL: 'YYYY[ko] MMMM[ren] D[a]',
  50432. LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
  50433. LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
  50434. l: 'YYYY-M-D',
  50435. ll: 'YYYY[ko] MMM D[a]',
  50436. lll: 'YYYY[ko] MMM D[a] HH:mm',
  50437. llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
  50438. },
  50439. calendar: {
  50440. sameDay: '[gaur] LT[etan]',
  50441. nextDay: '[bihar] LT[etan]',
  50442. nextWeek: 'dddd LT[etan]',
  50443. lastDay: '[atzo] LT[etan]',
  50444. lastWeek: '[aurreko] dddd LT[etan]',
  50445. sameElse: 'L',
  50446. },
  50447. relativeTime: {
  50448. future: '%s barru',
  50449. past: 'duela %s',
  50450. s: 'segundo batzuk',
  50451. ss: '%d segundo',
  50452. m: 'minutu bat',
  50453. mm: '%d minutu',
  50454. h: 'ordu bat',
  50455. hh: '%d ordu',
  50456. d: 'egun bat',
  50457. dd: '%d egun',
  50458. M: 'hilabete bat',
  50459. MM: '%d hilabete',
  50460. y: 'urte bat',
  50461. yy: '%d urte',
  50462. },
  50463. dayOfMonthOrdinalParse: /\d{1,2}\./,
  50464. ordinal: '%d.',
  50465. week: {
  50466. dow: 1, // Monday is the first day of the week.
  50467. doy: 7, // The week that contains Jan 7th is the first week of the year.
  50468. },
  50469. });
  50470. return eu;
  50471. })));
  50472. /***/ }),
  50473. /***/ 76959:
  50474. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50475. //! moment.js locale configuration
  50476. //! locale : Persian [fa]
  50477. //! author : Ebrahim Byagowi : https://github.com/ebraminio
  50478. ;(function (global, factory) {
  50479. true ? factory(__webpack_require__(30381)) :
  50480. 0
  50481. }(this, (function (moment) { 'use strict';
  50482. //! moment.js locale configuration
  50483. var symbolMap = {
  50484. 1: '۱',
  50485. 2: '۲',
  50486. 3: '۳',
  50487. 4: '۴',
  50488. 5: '۵',
  50489. 6: '۶',
  50490. 7: '۷',
  50491. 8: '۸',
  50492. 9: '۹',
  50493. 0: '۰',
  50494. },
  50495. numberMap = {
  50496. '۱': '1',
  50497. '۲': '2',
  50498. '۳': '3',
  50499. '۴': '4',
  50500. '۵': '5',
  50501. '۶': '6',
  50502. '۷': '7',
  50503. '۸': '8',
  50504. '۹': '9',
  50505. '۰': '0',
  50506. };
  50507. var fa = moment.defineLocale('fa', {
  50508. months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
  50509. '_'
  50510. ),
  50511. monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
  50512. '_'
  50513. ),
  50514. weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
  50515. '_'
  50516. ),
  50517. weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
  50518. '_'
  50519. ),
  50520. weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
  50521. weekdaysParseExact: true,
  50522. longDateFormat: {
  50523. LT: 'HH:mm',
  50524. LTS: 'HH:mm:ss',
  50525. L: 'DD/MM/YYYY',
  50526. LL: 'D MMMM YYYY',
  50527. LLL: 'D MMMM YYYY HH:mm',
  50528. LLLL: 'dddd, D MMMM YYYY HH:mm',
  50529. },
  50530. meridiemParse: /قبل از ظهر|بعد از ظهر/,
  50531. isPM: function (input) {
  50532. return /بعد از ظهر/.test(input);
  50533. },
  50534. meridiem: function (hour, minute, isLower) {
  50535. if (hour < 12) {
  50536. return 'قبل از ظهر';
  50537. } else {
  50538. return 'بعد از ظهر';
  50539. }
  50540. },
  50541. calendar: {
  50542. sameDay: '[امروز ساعت] LT',
  50543. nextDay: '[فردا ساعت] LT',
  50544. nextWeek: 'dddd [ساعت] LT',
  50545. lastDay: '[دیروز ساعت] LT',
  50546. lastWeek: 'dddd [پیش] [ساعت] LT',
  50547. sameElse: 'L',
  50548. },
  50549. relativeTime: {
  50550. future: 'در %s',
  50551. past: '%s پیش',
  50552. s: 'چند ثانیه',
  50553. ss: '%d ثانیه',
  50554. m: 'یک دقیقه',
  50555. mm: '%d دقیقه',
  50556. h: 'یک ساعت',
  50557. hh: '%d ساعت',
  50558. d: 'یک روز',
  50559. dd: '%d روز',
  50560. M: 'یک ماه',
  50561. MM: '%d ماه',
  50562. y: 'یک سال',
  50563. yy: '%d سال',
  50564. },
  50565. preparse: function (string) {
  50566. return string
  50567. .replace(/[۰-۹]/g, function (match) {
  50568. return numberMap[match];
  50569. })
  50570. .replace(/،/g, ',');
  50571. },
  50572. postformat: function (string) {
  50573. return string
  50574. .replace(/\d/g, function (match) {
  50575. return symbolMap[match];
  50576. })
  50577. .replace(/,/g, '،');
  50578. },
  50579. dayOfMonthOrdinalParse: /\d{1,2}م/,
  50580. ordinal: '%dم',
  50581. week: {
  50582. dow: 6, // Saturday is the first day of the week.
  50583. doy: 12, // The week that contains Jan 12th is the first week of the year.
  50584. },
  50585. });
  50586. return fa;
  50587. })));
  50588. /***/ }),
  50589. /***/ 11897:
  50590. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50591. //! moment.js locale configuration
  50592. //! locale : Finnish [fi]
  50593. //! author : Tarmo Aidantausta : https://github.com/bleadof
  50594. ;(function (global, factory) {
  50595. true ? factory(__webpack_require__(30381)) :
  50596. 0
  50597. }(this, (function (moment) { 'use strict';
  50598. //! moment.js locale configuration
  50599. var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
  50600. ' '
  50601. ),
  50602. numbersFuture = [
  50603. 'nolla',
  50604. 'yhden',
  50605. 'kahden',
  50606. 'kolmen',
  50607. 'neljän',
  50608. 'viiden',
  50609. 'kuuden',
  50610. numbersPast[7],
  50611. numbersPast[8],
  50612. numbersPast[9],
  50613. ];
  50614. function translate(number, withoutSuffix, key, isFuture) {
  50615. var result = '';
  50616. switch (key) {
  50617. case 's':
  50618. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  50619. case 'ss':
  50620. result = isFuture ? 'sekunnin' : 'sekuntia';
  50621. break;
  50622. case 'm':
  50623. return isFuture ? 'minuutin' : 'minuutti';
  50624. case 'mm':
  50625. result = isFuture ? 'minuutin' : 'minuuttia';
  50626. break;
  50627. case 'h':
  50628. return isFuture ? 'tunnin' : 'tunti';
  50629. case 'hh':
  50630. result = isFuture ? 'tunnin' : 'tuntia';
  50631. break;
  50632. case 'd':
  50633. return isFuture ? 'päivän' : 'päivä';
  50634. case 'dd':
  50635. result = isFuture ? 'päivän' : 'päivää';
  50636. break;
  50637. case 'M':
  50638. return isFuture ? 'kuukauden' : 'kuukausi';
  50639. case 'MM':
  50640. result = isFuture ? 'kuukauden' : 'kuukautta';
  50641. break;
  50642. case 'y':
  50643. return isFuture ? 'vuoden' : 'vuosi';
  50644. case 'yy':
  50645. result = isFuture ? 'vuoden' : 'vuotta';
  50646. break;
  50647. }
  50648. result = verbalNumber(number, isFuture) + ' ' + result;
  50649. return result;
  50650. }
  50651. function verbalNumber(number, isFuture) {
  50652. return number < 10
  50653. ? isFuture
  50654. ? numbersFuture[number]
  50655. : numbersPast[number]
  50656. : number;
  50657. }
  50658. var fi = moment.defineLocale('fi', {
  50659. months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
  50660. '_'
  50661. ),
  50662. monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
  50663. '_'
  50664. ),
  50665. weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
  50666. '_'
  50667. ),
  50668. weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
  50669. weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
  50670. longDateFormat: {
  50671. LT: 'HH.mm',
  50672. LTS: 'HH.mm.ss',
  50673. L: 'DD.MM.YYYY',
  50674. LL: 'Do MMMM[ta] YYYY',
  50675. LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
  50676. LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  50677. l: 'D.M.YYYY',
  50678. ll: 'Do MMM YYYY',
  50679. lll: 'Do MMM YYYY, [klo] HH.mm',
  50680. llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
  50681. },
  50682. calendar: {
  50683. sameDay: '[tänään] [klo] LT',
  50684. nextDay: '[huomenna] [klo] LT',
  50685. nextWeek: 'dddd [klo] LT',
  50686. lastDay: '[eilen] [klo] LT',
  50687. lastWeek: '[viime] dddd[na] [klo] LT',
  50688. sameElse: 'L',
  50689. },
  50690. relativeTime: {
  50691. future: '%s päästä',
  50692. past: '%s sitten',
  50693. s: translate,
  50694. ss: translate,
  50695. m: translate,
  50696. mm: translate,
  50697. h: translate,
  50698. hh: translate,
  50699. d: translate,
  50700. dd: translate,
  50701. M: translate,
  50702. MM: translate,
  50703. y: translate,
  50704. yy: translate,
  50705. },
  50706. dayOfMonthOrdinalParse: /\d{1,2}\./,
  50707. ordinal: '%d.',
  50708. week: {
  50709. dow: 1, // Monday is the first day of the week.
  50710. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50711. },
  50712. });
  50713. return fi;
  50714. })));
  50715. /***/ }),
  50716. /***/ 42549:
  50717. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50718. //! moment.js locale configuration
  50719. //! locale : Filipino [fil]
  50720. //! author : Dan Hagman : https://github.com/hagmandan
  50721. //! author : Matthew Co : https://github.com/matthewdeeco
  50722. ;(function (global, factory) {
  50723. true ? factory(__webpack_require__(30381)) :
  50724. 0
  50725. }(this, (function (moment) { 'use strict';
  50726. //! moment.js locale configuration
  50727. var fil = moment.defineLocale('fil', {
  50728. months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
  50729. '_'
  50730. ),
  50731. monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  50732. weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
  50733. '_'
  50734. ),
  50735. weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  50736. weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  50737. longDateFormat: {
  50738. LT: 'HH:mm',
  50739. LTS: 'HH:mm:ss',
  50740. L: 'MM/D/YYYY',
  50741. LL: 'MMMM D, YYYY',
  50742. LLL: 'MMMM D, YYYY HH:mm',
  50743. LLLL: 'dddd, MMMM DD, YYYY HH:mm',
  50744. },
  50745. calendar: {
  50746. sameDay: 'LT [ngayong araw]',
  50747. nextDay: '[Bukas ng] LT',
  50748. nextWeek: 'LT [sa susunod na] dddd',
  50749. lastDay: 'LT [kahapon]',
  50750. lastWeek: 'LT [noong nakaraang] dddd',
  50751. sameElse: 'L',
  50752. },
  50753. relativeTime: {
  50754. future: 'sa loob ng %s',
  50755. past: '%s ang nakalipas',
  50756. s: 'ilang segundo',
  50757. ss: '%d segundo',
  50758. m: 'isang minuto',
  50759. mm: '%d minuto',
  50760. h: 'isang oras',
  50761. hh: '%d oras',
  50762. d: 'isang araw',
  50763. dd: '%d araw',
  50764. M: 'isang buwan',
  50765. MM: '%d buwan',
  50766. y: 'isang taon',
  50767. yy: '%d taon',
  50768. },
  50769. dayOfMonthOrdinalParse: /\d{1,2}/,
  50770. ordinal: function (number) {
  50771. return number;
  50772. },
  50773. week: {
  50774. dow: 1, // Monday is the first day of the week.
  50775. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50776. },
  50777. });
  50778. return fil;
  50779. })));
  50780. /***/ }),
  50781. /***/ 94694:
  50782. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50783. //! moment.js locale configuration
  50784. //! locale : Faroese [fo]
  50785. //! author : Ragnar Johannesen : https://github.com/ragnar123
  50786. //! author : Kristian Sakarisson : https://github.com/sakarisson
  50787. ;(function (global, factory) {
  50788. true ? factory(__webpack_require__(30381)) :
  50789. 0
  50790. }(this, (function (moment) { 'use strict';
  50791. //! moment.js locale configuration
  50792. var fo = moment.defineLocale('fo', {
  50793. months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
  50794. '_'
  50795. ),
  50796. monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  50797. weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
  50798. '_'
  50799. ),
  50800. weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
  50801. weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
  50802. longDateFormat: {
  50803. LT: 'HH:mm',
  50804. LTS: 'HH:mm:ss',
  50805. L: 'DD/MM/YYYY',
  50806. LL: 'D MMMM YYYY',
  50807. LLL: 'D MMMM YYYY HH:mm',
  50808. LLLL: 'dddd D. MMMM, YYYY HH:mm',
  50809. },
  50810. calendar: {
  50811. sameDay: '[Í dag kl.] LT',
  50812. nextDay: '[Í morgin kl.] LT',
  50813. nextWeek: 'dddd [kl.] LT',
  50814. lastDay: '[Í gjár kl.] LT',
  50815. lastWeek: '[síðstu] dddd [kl] LT',
  50816. sameElse: 'L',
  50817. },
  50818. relativeTime: {
  50819. future: 'um %s',
  50820. past: '%s síðani',
  50821. s: 'fá sekund',
  50822. ss: '%d sekundir',
  50823. m: 'ein minuttur',
  50824. mm: '%d minuttir',
  50825. h: 'ein tími',
  50826. hh: '%d tímar',
  50827. d: 'ein dagur',
  50828. dd: '%d dagar',
  50829. M: 'ein mánaður',
  50830. MM: '%d mánaðir',
  50831. y: 'eitt ár',
  50832. yy: '%d ár',
  50833. },
  50834. dayOfMonthOrdinalParse: /\d{1,2}\./,
  50835. ordinal: '%d.',
  50836. week: {
  50837. dow: 1, // Monday is the first day of the week.
  50838. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50839. },
  50840. });
  50841. return fo;
  50842. })));
  50843. /***/ }),
  50844. /***/ 63049:
  50845. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50846. //! moment.js locale configuration
  50847. //! locale : French (Canada) [fr-ca]
  50848. //! author : Jonathan Abourbih : https://github.com/jonbca
  50849. ;(function (global, factory) {
  50850. true ? factory(__webpack_require__(30381)) :
  50851. 0
  50852. }(this, (function (moment) { 'use strict';
  50853. //! moment.js locale configuration
  50854. var frCa = moment.defineLocale('fr-ca', {
  50855. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  50856. '_'
  50857. ),
  50858. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  50859. '_'
  50860. ),
  50861. monthsParseExact: true,
  50862. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  50863. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  50864. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  50865. weekdaysParseExact: true,
  50866. longDateFormat: {
  50867. LT: 'HH:mm',
  50868. LTS: 'HH:mm:ss',
  50869. L: 'YYYY-MM-DD',
  50870. LL: 'D MMMM YYYY',
  50871. LLL: 'D MMMM YYYY HH:mm',
  50872. LLLL: 'dddd D MMMM YYYY HH:mm',
  50873. },
  50874. calendar: {
  50875. sameDay: '[Aujourd’hui à] LT',
  50876. nextDay: '[Demain à] LT',
  50877. nextWeek: 'dddd [à] LT',
  50878. lastDay: '[Hier à] LT',
  50879. lastWeek: 'dddd [dernier à] LT',
  50880. sameElse: 'L',
  50881. },
  50882. relativeTime: {
  50883. future: 'dans %s',
  50884. past: 'il y a %s',
  50885. s: 'quelques secondes',
  50886. ss: '%d secondes',
  50887. m: 'une minute',
  50888. mm: '%d minutes',
  50889. h: 'une heure',
  50890. hh: '%d heures',
  50891. d: 'un jour',
  50892. dd: '%d jours',
  50893. M: 'un mois',
  50894. MM: '%d mois',
  50895. y: 'un an',
  50896. yy: '%d ans',
  50897. },
  50898. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  50899. ordinal: function (number, period) {
  50900. switch (period) {
  50901. // Words with masculine grammatical gender: mois, trimestre, jour
  50902. default:
  50903. case 'M':
  50904. case 'Q':
  50905. case 'D':
  50906. case 'DDD':
  50907. case 'd':
  50908. return number + (number === 1 ? 'er' : 'e');
  50909. // Words with feminine grammatical gender: semaine
  50910. case 'w':
  50911. case 'W':
  50912. return number + (number === 1 ? 're' : 'e');
  50913. }
  50914. },
  50915. });
  50916. return frCa;
  50917. })));
  50918. /***/ }),
  50919. /***/ 52330:
  50920. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50921. //! moment.js locale configuration
  50922. //! locale : French (Switzerland) [fr-ch]
  50923. //! author : Gaspard Bucher : https://github.com/gaspard
  50924. ;(function (global, factory) {
  50925. true ? factory(__webpack_require__(30381)) :
  50926. 0
  50927. }(this, (function (moment) { 'use strict';
  50928. //! moment.js locale configuration
  50929. var frCh = moment.defineLocale('fr-ch', {
  50930. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  50931. '_'
  50932. ),
  50933. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  50934. '_'
  50935. ),
  50936. monthsParseExact: true,
  50937. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  50938. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  50939. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  50940. weekdaysParseExact: true,
  50941. longDateFormat: {
  50942. LT: 'HH:mm',
  50943. LTS: 'HH:mm:ss',
  50944. L: 'DD.MM.YYYY',
  50945. LL: 'D MMMM YYYY',
  50946. LLL: 'D MMMM YYYY HH:mm',
  50947. LLLL: 'dddd D MMMM YYYY HH:mm',
  50948. },
  50949. calendar: {
  50950. sameDay: '[Aujourd’hui à] LT',
  50951. nextDay: '[Demain à] LT',
  50952. nextWeek: 'dddd [à] LT',
  50953. lastDay: '[Hier à] LT',
  50954. lastWeek: 'dddd [dernier à] LT',
  50955. sameElse: 'L',
  50956. },
  50957. relativeTime: {
  50958. future: 'dans %s',
  50959. past: 'il y a %s',
  50960. s: 'quelques secondes',
  50961. ss: '%d secondes',
  50962. m: 'une minute',
  50963. mm: '%d minutes',
  50964. h: 'une heure',
  50965. hh: '%d heures',
  50966. d: 'un jour',
  50967. dd: '%d jours',
  50968. M: 'un mois',
  50969. MM: '%d mois',
  50970. y: 'un an',
  50971. yy: '%d ans',
  50972. },
  50973. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  50974. ordinal: function (number, period) {
  50975. switch (period) {
  50976. // Words with masculine grammatical gender: mois, trimestre, jour
  50977. default:
  50978. case 'M':
  50979. case 'Q':
  50980. case 'D':
  50981. case 'DDD':
  50982. case 'd':
  50983. return number + (number === 1 ? 'er' : 'e');
  50984. // Words with feminine grammatical gender: semaine
  50985. case 'w':
  50986. case 'W':
  50987. return number + (number === 1 ? 're' : 'e');
  50988. }
  50989. },
  50990. week: {
  50991. dow: 1, // Monday is the first day of the week.
  50992. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50993. },
  50994. });
  50995. return frCh;
  50996. })));
  50997. /***/ }),
  50998. /***/ 94470:
  50999. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51000. //! moment.js locale configuration
  51001. //! locale : French [fr]
  51002. //! author : John Fischer : https://github.com/jfroffice
  51003. ;(function (global, factory) {
  51004. true ? factory(__webpack_require__(30381)) :
  51005. 0
  51006. }(this, (function (moment) { 'use strict';
  51007. //! moment.js locale configuration
  51008. var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
  51009. monthsShortStrictRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
  51010. monthsRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
  51011. monthsParse = [
  51012. /^janv/i,
  51013. /^févr/i,
  51014. /^mars/i,
  51015. /^avr/i,
  51016. /^mai/i,
  51017. /^juin/i,
  51018. /^juil/i,
  51019. /^août/i,
  51020. /^sept/i,
  51021. /^oct/i,
  51022. /^nov/i,
  51023. /^déc/i,
  51024. ];
  51025. var fr = moment.defineLocale('fr', {
  51026. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  51027. '_'
  51028. ),
  51029. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  51030. '_'
  51031. ),
  51032. monthsRegex: monthsRegex,
  51033. monthsShortRegex: monthsRegex,
  51034. monthsStrictRegex: monthsStrictRegex,
  51035. monthsShortStrictRegex: monthsShortStrictRegex,
  51036. monthsParse: monthsParse,
  51037. longMonthsParse: monthsParse,
  51038. shortMonthsParse: monthsParse,
  51039. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  51040. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  51041. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  51042. weekdaysParseExact: true,
  51043. longDateFormat: {
  51044. LT: 'HH:mm',
  51045. LTS: 'HH:mm:ss',
  51046. L: 'DD/MM/YYYY',
  51047. LL: 'D MMMM YYYY',
  51048. LLL: 'D MMMM YYYY HH:mm',
  51049. LLLL: 'dddd D MMMM YYYY HH:mm',
  51050. },
  51051. calendar: {
  51052. sameDay: '[Aujourd’hui à] LT',
  51053. nextDay: '[Demain à] LT',
  51054. nextWeek: 'dddd [à] LT',
  51055. lastDay: '[Hier à] LT',
  51056. lastWeek: 'dddd [dernier à] LT',
  51057. sameElse: 'L',
  51058. },
  51059. relativeTime: {
  51060. future: 'dans %s',
  51061. past: 'il y a %s',
  51062. s: 'quelques secondes',
  51063. ss: '%d secondes',
  51064. m: 'une minute',
  51065. mm: '%d minutes',
  51066. h: 'une heure',
  51067. hh: '%d heures',
  51068. d: 'un jour',
  51069. dd: '%d jours',
  51070. w: 'une semaine',
  51071. ww: '%d semaines',
  51072. M: 'un mois',
  51073. MM: '%d mois',
  51074. y: 'un an',
  51075. yy: '%d ans',
  51076. },
  51077. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  51078. ordinal: function (number, period) {
  51079. switch (period) {
  51080. // TODO: Return 'e' when day of month > 1. Move this case inside
  51081. // block for masculine words below.
  51082. // See https://github.com/moment/moment/issues/3375
  51083. case 'D':
  51084. return number + (number === 1 ? 'er' : '');
  51085. // Words with masculine grammatical gender: mois, trimestre, jour
  51086. default:
  51087. case 'M':
  51088. case 'Q':
  51089. case 'DDD':
  51090. case 'd':
  51091. return number + (number === 1 ? 'er' : 'e');
  51092. // Words with feminine grammatical gender: semaine
  51093. case 'w':
  51094. case 'W':
  51095. return number + (number === 1 ? 're' : 'e');
  51096. }
  51097. },
  51098. week: {
  51099. dow: 1, // Monday is the first day of the week.
  51100. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51101. },
  51102. });
  51103. return fr;
  51104. })));
  51105. /***/ }),
  51106. /***/ 5044:
  51107. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51108. //! moment.js locale configuration
  51109. //! locale : Frisian [fy]
  51110. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  51111. ;(function (global, factory) {
  51112. true ? factory(__webpack_require__(30381)) :
  51113. 0
  51114. }(this, (function (moment) { 'use strict';
  51115. //! moment.js locale configuration
  51116. var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(
  51117. '_'
  51118. ),
  51119. monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(
  51120. '_'
  51121. );
  51122. var fy = moment.defineLocale('fy', {
  51123. months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
  51124. '_'
  51125. ),
  51126. monthsShort: function (m, format) {
  51127. if (!m) {
  51128. return monthsShortWithDots;
  51129. } else if (/-MMM-/.test(format)) {
  51130. return monthsShortWithoutDots[m.month()];
  51131. } else {
  51132. return monthsShortWithDots[m.month()];
  51133. }
  51134. },
  51135. monthsParseExact: true,
  51136. weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
  51137. '_'
  51138. ),
  51139. weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
  51140. weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
  51141. weekdaysParseExact: true,
  51142. longDateFormat: {
  51143. LT: 'HH:mm',
  51144. LTS: 'HH:mm:ss',
  51145. L: 'DD-MM-YYYY',
  51146. LL: 'D MMMM YYYY',
  51147. LLL: 'D MMMM YYYY HH:mm',
  51148. LLLL: 'dddd D MMMM YYYY HH:mm',
  51149. },
  51150. calendar: {
  51151. sameDay: '[hjoed om] LT',
  51152. nextDay: '[moarn om] LT',
  51153. nextWeek: 'dddd [om] LT',
  51154. lastDay: '[juster om] LT',
  51155. lastWeek: '[ôfrûne] dddd [om] LT',
  51156. sameElse: 'L',
  51157. },
  51158. relativeTime: {
  51159. future: 'oer %s',
  51160. past: '%s lyn',
  51161. s: 'in pear sekonden',
  51162. ss: '%d sekonden',
  51163. m: 'ien minút',
  51164. mm: '%d minuten',
  51165. h: 'ien oere',
  51166. hh: '%d oeren',
  51167. d: 'ien dei',
  51168. dd: '%d dagen',
  51169. M: 'ien moanne',
  51170. MM: '%d moannen',
  51171. y: 'ien jier',
  51172. yy: '%d jierren',
  51173. },
  51174. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  51175. ordinal: function (number) {
  51176. return (
  51177. number +
  51178. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  51179. );
  51180. },
  51181. week: {
  51182. dow: 1, // Monday is the first day of the week.
  51183. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51184. },
  51185. });
  51186. return fy;
  51187. })));
  51188. /***/ }),
  51189. /***/ 29295:
  51190. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51191. //! moment.js locale configuration
  51192. //! locale : Irish or Irish Gaelic [ga]
  51193. //! author : André Silva : https://github.com/askpt
  51194. ;(function (global, factory) {
  51195. true ? factory(__webpack_require__(30381)) :
  51196. 0
  51197. }(this, (function (moment) { 'use strict';
  51198. //! moment.js locale configuration
  51199. var months = [
  51200. 'Eanáir',
  51201. 'Feabhra',
  51202. 'Márta',
  51203. 'Aibreán',
  51204. 'Bealtaine',
  51205. 'Meitheamh',
  51206. 'Iúil',
  51207. 'Lúnasa',
  51208. 'Meán Fómhair',
  51209. 'Deireadh Fómhair',
  51210. 'Samhain',
  51211. 'Nollaig',
  51212. ],
  51213. monthsShort = [
  51214. 'Ean',
  51215. 'Feabh',
  51216. 'Márt',
  51217. 'Aib',
  51218. 'Beal',
  51219. 'Meith',
  51220. 'Iúil',
  51221. 'Lún',
  51222. 'M.F.',
  51223. 'D.F.',
  51224. 'Samh',
  51225. 'Noll',
  51226. ],
  51227. weekdays = [
  51228. 'Dé Domhnaigh',
  51229. 'Dé Luain',
  51230. 'Dé Máirt',
  51231. 'Dé Céadaoin',
  51232. 'Déardaoin',
  51233. 'Dé hAoine',
  51234. 'Dé Sathairn',
  51235. ],
  51236. weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
  51237. weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
  51238. var ga = moment.defineLocale('ga', {
  51239. months: months,
  51240. monthsShort: monthsShort,
  51241. monthsParseExact: true,
  51242. weekdays: weekdays,
  51243. weekdaysShort: weekdaysShort,
  51244. weekdaysMin: weekdaysMin,
  51245. longDateFormat: {
  51246. LT: 'HH:mm',
  51247. LTS: 'HH:mm:ss',
  51248. L: 'DD/MM/YYYY',
  51249. LL: 'D MMMM YYYY',
  51250. LLL: 'D MMMM YYYY HH:mm',
  51251. LLLL: 'dddd, D MMMM YYYY HH:mm',
  51252. },
  51253. calendar: {
  51254. sameDay: '[Inniu ag] LT',
  51255. nextDay: '[Amárach ag] LT',
  51256. nextWeek: 'dddd [ag] LT',
  51257. lastDay: '[Inné ag] LT',
  51258. lastWeek: 'dddd [seo caite] [ag] LT',
  51259. sameElse: 'L',
  51260. },
  51261. relativeTime: {
  51262. future: 'i %s',
  51263. past: '%s ó shin',
  51264. s: 'cúpla soicind',
  51265. ss: '%d soicind',
  51266. m: 'nóiméad',
  51267. mm: '%d nóiméad',
  51268. h: 'uair an chloig',
  51269. hh: '%d uair an chloig',
  51270. d: 'lá',
  51271. dd: '%d lá',
  51272. M: 'mí',
  51273. MM: '%d míonna',
  51274. y: 'bliain',
  51275. yy: '%d bliain',
  51276. },
  51277. dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
  51278. ordinal: function (number) {
  51279. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  51280. return number + output;
  51281. },
  51282. week: {
  51283. dow: 1, // Monday is the first day of the week.
  51284. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51285. },
  51286. });
  51287. return ga;
  51288. })));
  51289. /***/ }),
  51290. /***/ 2101:
  51291. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51292. //! moment.js locale configuration
  51293. //! locale : Scottish Gaelic [gd]
  51294. //! author : Jon Ashdown : https://github.com/jonashdown
  51295. ;(function (global, factory) {
  51296. true ? factory(__webpack_require__(30381)) :
  51297. 0
  51298. }(this, (function (moment) { 'use strict';
  51299. //! moment.js locale configuration
  51300. var months = [
  51301. 'Am Faoilleach',
  51302. 'An Gearran',
  51303. 'Am Màrt',
  51304. 'An Giblean',
  51305. 'An Cèitean',
  51306. 'An t-Ògmhios',
  51307. 'An t-Iuchar',
  51308. 'An Lùnastal',
  51309. 'An t-Sultain',
  51310. 'An Dàmhair',
  51311. 'An t-Samhain',
  51312. 'An Dùbhlachd',
  51313. ],
  51314. monthsShort = [
  51315. 'Faoi',
  51316. 'Gear',
  51317. 'Màrt',
  51318. 'Gibl',
  51319. 'Cèit',
  51320. 'Ògmh',
  51321. 'Iuch',
  51322. 'Lùn',
  51323. 'Sult',
  51324. 'Dàmh',
  51325. 'Samh',
  51326. 'Dùbh',
  51327. ],
  51328. weekdays = [
  51329. 'Didòmhnaich',
  51330. 'Diluain',
  51331. 'Dimàirt',
  51332. 'Diciadain',
  51333. 'Diardaoin',
  51334. 'Dihaoine',
  51335. 'Disathairne',
  51336. ],
  51337. weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
  51338. weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
  51339. var gd = moment.defineLocale('gd', {
  51340. months: months,
  51341. monthsShort: monthsShort,
  51342. monthsParseExact: true,
  51343. weekdays: weekdays,
  51344. weekdaysShort: weekdaysShort,
  51345. weekdaysMin: weekdaysMin,
  51346. longDateFormat: {
  51347. LT: 'HH:mm',
  51348. LTS: 'HH:mm:ss',
  51349. L: 'DD/MM/YYYY',
  51350. LL: 'D MMMM YYYY',
  51351. LLL: 'D MMMM YYYY HH:mm',
  51352. LLLL: 'dddd, D MMMM YYYY HH:mm',
  51353. },
  51354. calendar: {
  51355. sameDay: '[An-diugh aig] LT',
  51356. nextDay: '[A-màireach aig] LT',
  51357. nextWeek: 'dddd [aig] LT',
  51358. lastDay: '[An-dè aig] LT',
  51359. lastWeek: 'dddd [seo chaidh] [aig] LT',
  51360. sameElse: 'L',
  51361. },
  51362. relativeTime: {
  51363. future: 'ann an %s',
  51364. past: 'bho chionn %s',
  51365. s: 'beagan diogan',
  51366. ss: '%d diogan',
  51367. m: 'mionaid',
  51368. mm: '%d mionaidean',
  51369. h: 'uair',
  51370. hh: '%d uairean',
  51371. d: 'latha',
  51372. dd: '%d latha',
  51373. M: 'mìos',
  51374. MM: '%d mìosan',
  51375. y: 'bliadhna',
  51376. yy: '%d bliadhna',
  51377. },
  51378. dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
  51379. ordinal: function (number) {
  51380. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  51381. return number + output;
  51382. },
  51383. week: {
  51384. dow: 1, // Monday is the first day of the week.
  51385. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51386. },
  51387. });
  51388. return gd;
  51389. })));
  51390. /***/ }),
  51391. /***/ 38794:
  51392. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51393. //! moment.js locale configuration
  51394. //! locale : Galician [gl]
  51395. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  51396. ;(function (global, factory) {
  51397. true ? factory(__webpack_require__(30381)) :
  51398. 0
  51399. }(this, (function (moment) { 'use strict';
  51400. //! moment.js locale configuration
  51401. var gl = moment.defineLocale('gl', {
  51402. months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
  51403. '_'
  51404. ),
  51405. monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
  51406. '_'
  51407. ),
  51408. monthsParseExact: true,
  51409. weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  51410. weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  51411. weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  51412. weekdaysParseExact: true,
  51413. longDateFormat: {
  51414. LT: 'H:mm',
  51415. LTS: 'H:mm:ss',
  51416. L: 'DD/MM/YYYY',
  51417. LL: 'D [de] MMMM [de] YYYY',
  51418. LLL: 'D [de] MMMM [de] YYYY H:mm',
  51419. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  51420. },
  51421. calendar: {
  51422. sameDay: function () {
  51423. return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  51424. },
  51425. nextDay: function () {
  51426. return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  51427. },
  51428. nextWeek: function () {
  51429. return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
  51430. },
  51431. lastDay: function () {
  51432. return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
  51433. },
  51434. lastWeek: function () {
  51435. return (
  51436. '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
  51437. );
  51438. },
  51439. sameElse: 'L',
  51440. },
  51441. relativeTime: {
  51442. future: function (str) {
  51443. if (str.indexOf('un') === 0) {
  51444. return 'n' + str;
  51445. }
  51446. return 'en ' + str;
  51447. },
  51448. past: 'hai %s',
  51449. s: 'uns segundos',
  51450. ss: '%d segundos',
  51451. m: 'un minuto',
  51452. mm: '%d minutos',
  51453. h: 'unha hora',
  51454. hh: '%d horas',
  51455. d: 'un día',
  51456. dd: '%d días',
  51457. M: 'un mes',
  51458. MM: '%d meses',
  51459. y: 'un ano',
  51460. yy: '%d anos',
  51461. },
  51462. dayOfMonthOrdinalParse: /\d{1,2}º/,
  51463. ordinal: '%dº',
  51464. week: {
  51465. dow: 1, // Monday is the first day of the week.
  51466. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51467. },
  51468. });
  51469. return gl;
  51470. })));
  51471. /***/ }),
  51472. /***/ 27884:
  51473. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51474. //! moment.js locale configuration
  51475. //! locale : Konkani Devanagari script [gom-deva]
  51476. //! author : The Discoverer : https://github.com/WikiDiscoverer
  51477. ;(function (global, factory) {
  51478. true ? factory(__webpack_require__(30381)) :
  51479. 0
  51480. }(this, (function (moment) { 'use strict';
  51481. //! moment.js locale configuration
  51482. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  51483. var format = {
  51484. s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
  51485. ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
  51486. m: ['एका मिणटान', 'एक मिनूट'],
  51487. mm: [number + ' मिणटांनी', number + ' मिणटां'],
  51488. h: ['एका वरान', 'एक वर'],
  51489. hh: [number + ' वरांनी', number + ' वरां'],
  51490. d: ['एका दिसान', 'एक दीस'],
  51491. dd: [number + ' दिसांनी', number + ' दीस'],
  51492. M: ['एका म्हयन्यान', 'एक म्हयनो'],
  51493. MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
  51494. y: ['एका वर्सान', 'एक वर्स'],
  51495. yy: [number + ' वर्सांनी', number + ' वर्सां'],
  51496. };
  51497. return isFuture ? format[key][0] : format[key][1];
  51498. }
  51499. var gomDeva = moment.defineLocale('gom-deva', {
  51500. months: {
  51501. standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
  51502. '_'
  51503. ),
  51504. format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
  51505. '_'
  51506. ),
  51507. isFormat: /MMMM(\s)+D[oD]?/,
  51508. },
  51509. monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
  51510. '_'
  51511. ),
  51512. monthsParseExact: true,
  51513. weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
  51514. weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
  51515. weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
  51516. weekdaysParseExact: true,
  51517. longDateFormat: {
  51518. LT: 'A h:mm [वाजतां]',
  51519. LTS: 'A h:mm:ss [वाजतां]',
  51520. L: 'DD-MM-YYYY',
  51521. LL: 'D MMMM YYYY',
  51522. LLL: 'D MMMM YYYY A h:mm [वाजतां]',
  51523. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
  51524. llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
  51525. },
  51526. calendar: {
  51527. sameDay: '[आयज] LT',
  51528. nextDay: '[फाल्यां] LT',
  51529. nextWeek: '[फुडलो] dddd[,] LT',
  51530. lastDay: '[काल] LT',
  51531. lastWeek: '[फाटलो] dddd[,] LT',
  51532. sameElse: 'L',
  51533. },
  51534. relativeTime: {
  51535. future: '%s',
  51536. past: '%s आदीं',
  51537. s: processRelativeTime,
  51538. ss: processRelativeTime,
  51539. m: processRelativeTime,
  51540. mm: processRelativeTime,
  51541. h: processRelativeTime,
  51542. hh: processRelativeTime,
  51543. d: processRelativeTime,
  51544. dd: processRelativeTime,
  51545. M: processRelativeTime,
  51546. MM: processRelativeTime,
  51547. y: processRelativeTime,
  51548. yy: processRelativeTime,
  51549. },
  51550. dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
  51551. ordinal: function (number, period) {
  51552. switch (period) {
  51553. // the ordinal 'वेर' only applies to day of the month
  51554. case 'D':
  51555. return number + 'वेर';
  51556. default:
  51557. case 'M':
  51558. case 'Q':
  51559. case 'DDD':
  51560. case 'd':
  51561. case 'w':
  51562. case 'W':
  51563. return number;
  51564. }
  51565. },
  51566. week: {
  51567. dow: 0, // Sunday is the first day of the week
  51568. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  51569. },
  51570. meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
  51571. meridiemHour: function (hour, meridiem) {
  51572. if (hour === 12) {
  51573. hour = 0;
  51574. }
  51575. if (meridiem === 'राती') {
  51576. return hour < 4 ? hour : hour + 12;
  51577. } else if (meridiem === 'सकाळीं') {
  51578. return hour;
  51579. } else if (meridiem === 'दनपारां') {
  51580. return hour > 12 ? hour : hour + 12;
  51581. } else if (meridiem === 'सांजे') {
  51582. return hour + 12;
  51583. }
  51584. },
  51585. meridiem: function (hour, minute, isLower) {
  51586. if (hour < 4) {
  51587. return 'राती';
  51588. } else if (hour < 12) {
  51589. return 'सकाळीं';
  51590. } else if (hour < 16) {
  51591. return 'दनपारां';
  51592. } else if (hour < 20) {
  51593. return 'सांजे';
  51594. } else {
  51595. return 'राती';
  51596. }
  51597. },
  51598. });
  51599. return gomDeva;
  51600. })));
  51601. /***/ }),
  51602. /***/ 23168:
  51603. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51604. //! moment.js locale configuration
  51605. //! locale : Konkani Latin script [gom-latn]
  51606. //! author : The Discoverer : https://github.com/WikiDiscoverer
  51607. ;(function (global, factory) {
  51608. true ? factory(__webpack_require__(30381)) :
  51609. 0
  51610. }(this, (function (moment) { 'use strict';
  51611. //! moment.js locale configuration
  51612. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  51613. var format = {
  51614. s: ['thoddea sekondamni', 'thodde sekond'],
  51615. ss: [number + ' sekondamni', number + ' sekond'],
  51616. m: ['eka mintan', 'ek minut'],
  51617. mm: [number + ' mintamni', number + ' mintam'],
  51618. h: ['eka voran', 'ek vor'],
  51619. hh: [number + ' voramni', number + ' voram'],
  51620. d: ['eka disan', 'ek dis'],
  51621. dd: [number + ' disamni', number + ' dis'],
  51622. M: ['eka mhoinean', 'ek mhoino'],
  51623. MM: [number + ' mhoineamni', number + ' mhoine'],
  51624. y: ['eka vorsan', 'ek voros'],
  51625. yy: [number + ' vorsamni', number + ' vorsam'],
  51626. };
  51627. return isFuture ? format[key][0] : format[key][1];
  51628. }
  51629. var gomLatn = moment.defineLocale('gom-latn', {
  51630. months: {
  51631. standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
  51632. '_'
  51633. ),
  51634. format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
  51635. '_'
  51636. ),
  51637. isFormat: /MMMM(\s)+D[oD]?/,
  51638. },
  51639. monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(
  51640. '_'
  51641. ),
  51642. monthsParseExact: true,
  51643. weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
  51644. weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
  51645. weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
  51646. weekdaysParseExact: true,
  51647. longDateFormat: {
  51648. LT: 'A h:mm [vazta]',
  51649. LTS: 'A h:mm:ss [vazta]',
  51650. L: 'DD-MM-YYYY',
  51651. LL: 'D MMMM YYYY',
  51652. LLL: 'D MMMM YYYY A h:mm [vazta]',
  51653. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
  51654. llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
  51655. },
  51656. calendar: {
  51657. sameDay: '[Aiz] LT',
  51658. nextDay: '[Faleam] LT',
  51659. nextWeek: '[Fuddlo] dddd[,] LT',
  51660. lastDay: '[Kal] LT',
  51661. lastWeek: '[Fattlo] dddd[,] LT',
  51662. sameElse: 'L',
  51663. },
  51664. relativeTime: {
  51665. future: '%s',
  51666. past: '%s adim',
  51667. s: processRelativeTime,
  51668. ss: processRelativeTime,
  51669. m: processRelativeTime,
  51670. mm: processRelativeTime,
  51671. h: processRelativeTime,
  51672. hh: processRelativeTime,
  51673. d: processRelativeTime,
  51674. dd: processRelativeTime,
  51675. M: processRelativeTime,
  51676. MM: processRelativeTime,
  51677. y: processRelativeTime,
  51678. yy: processRelativeTime,
  51679. },
  51680. dayOfMonthOrdinalParse: /\d{1,2}(er)/,
  51681. ordinal: function (number, period) {
  51682. switch (period) {
  51683. // the ordinal 'er' only applies to day of the month
  51684. case 'D':
  51685. return number + 'er';
  51686. default:
  51687. case 'M':
  51688. case 'Q':
  51689. case 'DDD':
  51690. case 'd':
  51691. case 'w':
  51692. case 'W':
  51693. return number;
  51694. }
  51695. },
  51696. week: {
  51697. dow: 0, // Sunday is the first day of the week
  51698. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  51699. },
  51700. meridiemParse: /rati|sokallim|donparam|sanje/,
  51701. meridiemHour: function (hour, meridiem) {
  51702. if (hour === 12) {
  51703. hour = 0;
  51704. }
  51705. if (meridiem === 'rati') {
  51706. return hour < 4 ? hour : hour + 12;
  51707. } else if (meridiem === 'sokallim') {
  51708. return hour;
  51709. } else if (meridiem === 'donparam') {
  51710. return hour > 12 ? hour : hour + 12;
  51711. } else if (meridiem === 'sanje') {
  51712. return hour + 12;
  51713. }
  51714. },
  51715. meridiem: function (hour, minute, isLower) {
  51716. if (hour < 4) {
  51717. return 'rati';
  51718. } else if (hour < 12) {
  51719. return 'sokallim';
  51720. } else if (hour < 16) {
  51721. return 'donparam';
  51722. } else if (hour < 20) {
  51723. return 'sanje';
  51724. } else {
  51725. return 'rati';
  51726. }
  51727. },
  51728. });
  51729. return gomLatn;
  51730. })));
  51731. /***/ }),
  51732. /***/ 95349:
  51733. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51734. //! moment.js locale configuration
  51735. //! locale : Gujarati [gu]
  51736. //! author : Kaushik Thanki : https://github.com/Kaushik1987
  51737. ;(function (global, factory) {
  51738. true ? factory(__webpack_require__(30381)) :
  51739. 0
  51740. }(this, (function (moment) { 'use strict';
  51741. //! moment.js locale configuration
  51742. var symbolMap = {
  51743. 1: '૧',
  51744. 2: '૨',
  51745. 3: '૩',
  51746. 4: '૪',
  51747. 5: '૫',
  51748. 6: '૬',
  51749. 7: '૭',
  51750. 8: '૮',
  51751. 9: '૯',
  51752. 0: '૦',
  51753. },
  51754. numberMap = {
  51755. '૧': '1',
  51756. '૨': '2',
  51757. '૩': '3',
  51758. '૪': '4',
  51759. '૫': '5',
  51760. '૬': '6',
  51761. '૭': '7',
  51762. '૮': '8',
  51763. '૯': '9',
  51764. '૦': '0',
  51765. };
  51766. var gu = moment.defineLocale('gu', {
  51767. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
  51768. '_'
  51769. ),
  51770. monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
  51771. '_'
  51772. ),
  51773. monthsParseExact: true,
  51774. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
  51775. '_'
  51776. ),
  51777. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  51778. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  51779. longDateFormat: {
  51780. LT: 'A h:mm વાગ્યે',
  51781. LTS: 'A h:mm:ss વાગ્યે',
  51782. L: 'DD/MM/YYYY',
  51783. LL: 'D MMMM YYYY',
  51784. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  51785. LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
  51786. },
  51787. calendar: {
  51788. sameDay: '[આજ] LT',
  51789. nextDay: '[કાલે] LT',
  51790. nextWeek: 'dddd, LT',
  51791. lastDay: '[ગઇકાલે] LT',
  51792. lastWeek: '[પાછલા] dddd, LT',
  51793. sameElse: 'L',
  51794. },
  51795. relativeTime: {
  51796. future: '%s મા',
  51797. past: '%s પહેલા',
  51798. s: 'અમુક પળો',
  51799. ss: '%d સેકંડ',
  51800. m: 'એક મિનિટ',
  51801. mm: '%d મિનિટ',
  51802. h: 'એક કલાક',
  51803. hh: '%d કલાક',
  51804. d: 'એક દિવસ',
  51805. dd: '%d દિવસ',
  51806. M: 'એક મહિનો',
  51807. MM: '%d મહિનો',
  51808. y: 'એક વર્ષ',
  51809. yy: '%d વર્ષ',
  51810. },
  51811. preparse: function (string) {
  51812. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  51813. return numberMap[match];
  51814. });
  51815. },
  51816. postformat: function (string) {
  51817. return string.replace(/\d/g, function (match) {
  51818. return symbolMap[match];
  51819. });
  51820. },
  51821. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  51822. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  51823. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  51824. meridiemHour: function (hour, meridiem) {
  51825. if (hour === 12) {
  51826. hour = 0;
  51827. }
  51828. if (meridiem === 'રાત') {
  51829. return hour < 4 ? hour : hour + 12;
  51830. } else if (meridiem === 'સવાર') {
  51831. return hour;
  51832. } else if (meridiem === 'બપોર') {
  51833. return hour >= 10 ? hour : hour + 12;
  51834. } else if (meridiem === 'સાંજ') {
  51835. return hour + 12;
  51836. }
  51837. },
  51838. meridiem: function (hour, minute, isLower) {
  51839. if (hour < 4) {
  51840. return 'રાત';
  51841. } else if (hour < 10) {
  51842. return 'સવાર';
  51843. } else if (hour < 17) {
  51844. return 'બપોર';
  51845. } else if (hour < 20) {
  51846. return 'સાંજ';
  51847. } else {
  51848. return 'રાત';
  51849. }
  51850. },
  51851. week: {
  51852. dow: 0, // Sunday is the first day of the week.
  51853. doy: 6, // The week that contains Jan 6th is the first week of the year.
  51854. },
  51855. });
  51856. return gu;
  51857. })));
  51858. /***/ }),
  51859. /***/ 24206:
  51860. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51861. //! moment.js locale configuration
  51862. //! locale : Hebrew [he]
  51863. //! author : Tomer Cohen : https://github.com/tomer
  51864. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  51865. //! author : Tal Ater : https://github.com/TalAter
  51866. ;(function (global, factory) {
  51867. true ? factory(__webpack_require__(30381)) :
  51868. 0
  51869. }(this, (function (moment) { 'use strict';
  51870. //! moment.js locale configuration
  51871. var he = moment.defineLocale('he', {
  51872. months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
  51873. '_'
  51874. ),
  51875. monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split(
  51876. '_'
  51877. ),
  51878. weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  51879. weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  51880. weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  51881. longDateFormat: {
  51882. LT: 'HH:mm',
  51883. LTS: 'HH:mm:ss',
  51884. L: 'DD/MM/YYYY',
  51885. LL: 'D [ב]MMMM YYYY',
  51886. LLL: 'D [ב]MMMM YYYY HH:mm',
  51887. LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
  51888. l: 'D/M/YYYY',
  51889. ll: 'D MMM YYYY',
  51890. lll: 'D MMM YYYY HH:mm',
  51891. llll: 'ddd, D MMM YYYY HH:mm',
  51892. },
  51893. calendar: {
  51894. sameDay: '[היום ב־]LT',
  51895. nextDay: '[מחר ב־]LT',
  51896. nextWeek: 'dddd [בשעה] LT',
  51897. lastDay: '[אתמול ב־]LT',
  51898. lastWeek: '[ביום] dddd [האחרון בשעה] LT',
  51899. sameElse: 'L',
  51900. },
  51901. relativeTime: {
  51902. future: 'בעוד %s',
  51903. past: 'לפני %s',
  51904. s: 'מספר שניות',
  51905. ss: '%d שניות',
  51906. m: 'דקה',
  51907. mm: '%d דקות',
  51908. h: 'שעה',
  51909. hh: function (number) {
  51910. if (number === 2) {
  51911. return 'שעתיים';
  51912. }
  51913. return number + ' שעות';
  51914. },
  51915. d: 'יום',
  51916. dd: function (number) {
  51917. if (number === 2) {
  51918. return 'יומיים';
  51919. }
  51920. return number + ' ימים';
  51921. },
  51922. M: 'חודש',
  51923. MM: function (number) {
  51924. if (number === 2) {
  51925. return 'חודשיים';
  51926. }
  51927. return number + ' חודשים';
  51928. },
  51929. y: 'שנה',
  51930. yy: function (number) {
  51931. if (number === 2) {
  51932. return 'שנתיים';
  51933. } else if (number % 10 === 0 && number !== 10) {
  51934. return number + ' שנה';
  51935. }
  51936. return number + ' שנים';
  51937. },
  51938. },
  51939. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  51940. isPM: function (input) {
  51941. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  51942. },
  51943. meridiem: function (hour, minute, isLower) {
  51944. if (hour < 5) {
  51945. return 'לפנות בוקר';
  51946. } else if (hour < 10) {
  51947. return 'בבוקר';
  51948. } else if (hour < 12) {
  51949. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  51950. } else if (hour < 18) {
  51951. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  51952. } else {
  51953. return 'בערב';
  51954. }
  51955. },
  51956. });
  51957. return he;
  51958. })));
  51959. /***/ }),
  51960. /***/ 30094:
  51961. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51962. //! moment.js locale configuration
  51963. //! locale : Hindi [hi]
  51964. //! author : Mayank Singhal : https://github.com/mayanksinghal
  51965. ;(function (global, factory) {
  51966. true ? factory(__webpack_require__(30381)) :
  51967. 0
  51968. }(this, (function (moment) { 'use strict';
  51969. //! moment.js locale configuration
  51970. var symbolMap = {
  51971. 1: '१',
  51972. 2: '२',
  51973. 3: '३',
  51974. 4: '४',
  51975. 5: '५',
  51976. 6: '६',
  51977. 7: '७',
  51978. 8: '८',
  51979. 9: '९',
  51980. 0: '०',
  51981. },
  51982. numberMap = {
  51983. '१': '1',
  51984. '२': '2',
  51985. '३': '3',
  51986. '४': '4',
  51987. '५': '5',
  51988. '६': '6',
  51989. '७': '7',
  51990. '८': '8',
  51991. '९': '9',
  51992. '०': '0',
  51993. },
  51994. monthsParse = [
  51995. /^जन/i,
  51996. /^फ़र|फर/i,
  51997. /^मार्च/i,
  51998. /^अप्रै/i,
  51999. /^मई/i,
  52000. /^जून/i,
  52001. /^जुल/i,
  52002. /^अग/i,
  52003. /^सितं|सित/i,
  52004. /^अक्टू/i,
  52005. /^नव|नवं/i,
  52006. /^दिसं|दिस/i,
  52007. ],
  52008. shortMonthsParse = [
  52009. /^जन/i,
  52010. /^फ़र/i,
  52011. /^मार्च/i,
  52012. /^अप्रै/i,
  52013. /^मई/i,
  52014. /^जून/i,
  52015. /^जुल/i,
  52016. /^अग/i,
  52017. /^सित/i,
  52018. /^अक्टू/i,
  52019. /^नव/i,
  52020. /^दिस/i,
  52021. ];
  52022. var hi = moment.defineLocale('hi', {
  52023. months: {
  52024. format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
  52025. '_'
  52026. ),
  52027. standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
  52028. '_'
  52029. ),
  52030. },
  52031. monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split(
  52032. '_'
  52033. ),
  52034. weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  52035. weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  52036. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  52037. longDateFormat: {
  52038. LT: 'A h:mm बजे',
  52039. LTS: 'A h:mm:ss बजे',
  52040. L: 'DD/MM/YYYY',
  52041. LL: 'D MMMM YYYY',
  52042. LLL: 'D MMMM YYYY, A h:mm बजे',
  52043. LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
  52044. },
  52045. monthsParse: monthsParse,
  52046. longMonthsParse: monthsParse,
  52047. shortMonthsParse: shortMonthsParse,
  52048. monthsRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
  52049. monthsShortRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
  52050. monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
  52051. monthsShortStrictRegex: /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
  52052. calendar: {
  52053. sameDay: '[आज] LT',
  52054. nextDay: '[कल] LT',
  52055. nextWeek: 'dddd, LT',
  52056. lastDay: '[कल] LT',
  52057. lastWeek: '[पिछले] dddd, LT',
  52058. sameElse: 'L',
  52059. },
  52060. relativeTime: {
  52061. future: '%s में',
  52062. past: '%s पहले',
  52063. s: 'कुछ ही क्षण',
  52064. ss: '%d सेकंड',
  52065. m: 'एक मिनट',
  52066. mm: '%d मिनट',
  52067. h: 'एक घंटा',
  52068. hh: '%d घंटे',
  52069. d: 'एक दिन',
  52070. dd: '%d दिन',
  52071. M: 'एक महीने',
  52072. MM: '%d महीने',
  52073. y: 'एक वर्ष',
  52074. yy: '%d वर्ष',
  52075. },
  52076. preparse: function (string) {
  52077. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  52078. return numberMap[match];
  52079. });
  52080. },
  52081. postformat: function (string) {
  52082. return string.replace(/\d/g, function (match) {
  52083. return symbolMap[match];
  52084. });
  52085. },
  52086. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  52087. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  52088. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  52089. meridiemHour: function (hour, meridiem) {
  52090. if (hour === 12) {
  52091. hour = 0;
  52092. }
  52093. if (meridiem === 'रात') {
  52094. return hour < 4 ? hour : hour + 12;
  52095. } else if (meridiem === 'सुबह') {
  52096. return hour;
  52097. } else if (meridiem === 'दोपहर') {
  52098. return hour >= 10 ? hour : hour + 12;
  52099. } else if (meridiem === 'शाम') {
  52100. return hour + 12;
  52101. }
  52102. },
  52103. meridiem: function (hour, minute, isLower) {
  52104. if (hour < 4) {
  52105. return 'रात';
  52106. } else if (hour < 10) {
  52107. return 'सुबह';
  52108. } else if (hour < 17) {
  52109. return 'दोपहर';
  52110. } else if (hour < 20) {
  52111. return 'शाम';
  52112. } else {
  52113. return 'रात';
  52114. }
  52115. },
  52116. week: {
  52117. dow: 0, // Sunday is the first day of the week.
  52118. doy: 6, // The week that contains Jan 6th is the first week of the year.
  52119. },
  52120. });
  52121. return hi;
  52122. })));
  52123. /***/ }),
  52124. /***/ 30316:
  52125. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52126. //! moment.js locale configuration
  52127. //! locale : Croatian [hr]
  52128. //! author : Bojan Marković : https://github.com/bmarkovic
  52129. ;(function (global, factory) {
  52130. true ? factory(__webpack_require__(30381)) :
  52131. 0
  52132. }(this, (function (moment) { 'use strict';
  52133. //! moment.js locale configuration
  52134. function translate(number, withoutSuffix, key) {
  52135. var result = number + ' ';
  52136. switch (key) {
  52137. case 'ss':
  52138. if (number === 1) {
  52139. result += 'sekunda';
  52140. } else if (number === 2 || number === 3 || number === 4) {
  52141. result += 'sekunde';
  52142. } else {
  52143. result += 'sekundi';
  52144. }
  52145. return result;
  52146. case 'm':
  52147. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  52148. case 'mm':
  52149. if (number === 1) {
  52150. result += 'minuta';
  52151. } else if (number === 2 || number === 3 || number === 4) {
  52152. result += 'minute';
  52153. } else {
  52154. result += 'minuta';
  52155. }
  52156. return result;
  52157. case 'h':
  52158. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  52159. case 'hh':
  52160. if (number === 1) {
  52161. result += 'sat';
  52162. } else if (number === 2 || number === 3 || number === 4) {
  52163. result += 'sata';
  52164. } else {
  52165. result += 'sati';
  52166. }
  52167. return result;
  52168. case 'dd':
  52169. if (number === 1) {
  52170. result += 'dan';
  52171. } else {
  52172. result += 'dana';
  52173. }
  52174. return result;
  52175. case 'MM':
  52176. if (number === 1) {
  52177. result += 'mjesec';
  52178. } else if (number === 2 || number === 3 || number === 4) {
  52179. result += 'mjeseca';
  52180. } else {
  52181. result += 'mjeseci';
  52182. }
  52183. return result;
  52184. case 'yy':
  52185. if (number === 1) {
  52186. result += 'godina';
  52187. } else if (number === 2 || number === 3 || number === 4) {
  52188. result += 'godine';
  52189. } else {
  52190. result += 'godina';
  52191. }
  52192. return result;
  52193. }
  52194. }
  52195. var hr = moment.defineLocale('hr', {
  52196. months: {
  52197. format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
  52198. '_'
  52199. ),
  52200. standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
  52201. '_'
  52202. ),
  52203. },
  52204. monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
  52205. '_'
  52206. ),
  52207. monthsParseExact: true,
  52208. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  52209. '_'
  52210. ),
  52211. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  52212. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  52213. weekdaysParseExact: true,
  52214. longDateFormat: {
  52215. LT: 'H:mm',
  52216. LTS: 'H:mm:ss',
  52217. L: 'DD.MM.YYYY',
  52218. LL: 'Do MMMM YYYY',
  52219. LLL: 'Do MMMM YYYY H:mm',
  52220. LLLL: 'dddd, Do MMMM YYYY H:mm',
  52221. },
  52222. calendar: {
  52223. sameDay: '[danas u] LT',
  52224. nextDay: '[sutra u] LT',
  52225. nextWeek: function () {
  52226. switch (this.day()) {
  52227. case 0:
  52228. return '[u] [nedjelju] [u] LT';
  52229. case 3:
  52230. return '[u] [srijedu] [u] LT';
  52231. case 6:
  52232. return '[u] [subotu] [u] LT';
  52233. case 1:
  52234. case 2:
  52235. case 4:
  52236. case 5:
  52237. return '[u] dddd [u] LT';
  52238. }
  52239. },
  52240. lastDay: '[jučer u] LT',
  52241. lastWeek: function () {
  52242. switch (this.day()) {
  52243. case 0:
  52244. return '[prošlu] [nedjelju] [u] LT';
  52245. case 3:
  52246. return '[prošlu] [srijedu] [u] LT';
  52247. case 6:
  52248. return '[prošle] [subote] [u] LT';
  52249. case 1:
  52250. case 2:
  52251. case 4:
  52252. case 5:
  52253. return '[prošli] dddd [u] LT';
  52254. }
  52255. },
  52256. sameElse: 'L',
  52257. },
  52258. relativeTime: {
  52259. future: 'za %s',
  52260. past: 'prije %s',
  52261. s: 'par sekundi',
  52262. ss: translate,
  52263. m: translate,
  52264. mm: translate,
  52265. h: translate,
  52266. hh: translate,
  52267. d: 'dan',
  52268. dd: translate,
  52269. M: 'mjesec',
  52270. MM: translate,
  52271. y: 'godinu',
  52272. yy: translate,
  52273. },
  52274. dayOfMonthOrdinalParse: /\d{1,2}\./,
  52275. ordinal: '%d.',
  52276. week: {
  52277. dow: 1, // Monday is the first day of the week.
  52278. doy: 7, // The week that contains Jan 7th is the first week of the year.
  52279. },
  52280. });
  52281. return hr;
  52282. })));
  52283. /***/ }),
  52284. /***/ 22138:
  52285. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52286. //! moment.js locale configuration
  52287. //! locale : Hungarian [hu]
  52288. //! author : Adam Brunner : https://github.com/adambrunner
  52289. //! author : Peter Viszt : https://github.com/passatgt
  52290. ;(function (global, factory) {
  52291. true ? factory(__webpack_require__(30381)) :
  52292. 0
  52293. }(this, (function (moment) { 'use strict';
  52294. //! moment.js locale configuration
  52295. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(
  52296. ' '
  52297. );
  52298. function translate(number, withoutSuffix, key, isFuture) {
  52299. var num = number;
  52300. switch (key) {
  52301. case 's':
  52302. return isFuture || withoutSuffix
  52303. ? 'néhány másodperc'
  52304. : 'néhány másodperce';
  52305. case 'ss':
  52306. return num + (isFuture || withoutSuffix)
  52307. ? ' másodperc'
  52308. : ' másodperce';
  52309. case 'm':
  52310. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  52311. case 'mm':
  52312. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  52313. case 'h':
  52314. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  52315. case 'hh':
  52316. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  52317. case 'd':
  52318. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  52319. case 'dd':
  52320. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  52321. case 'M':
  52322. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  52323. case 'MM':
  52324. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  52325. case 'y':
  52326. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  52327. case 'yy':
  52328. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  52329. }
  52330. return '';
  52331. }
  52332. function week(isFuture) {
  52333. return (
  52334. (isFuture ? '' : '[múlt] ') +
  52335. '[' +
  52336. weekEndings[this.day()] +
  52337. '] LT[-kor]'
  52338. );
  52339. }
  52340. var hu = moment.defineLocale('hu', {
  52341. months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
  52342. '_'
  52343. ),
  52344. monthsShort: 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
  52345. '_'
  52346. ),
  52347. monthsParseExact: true,
  52348. weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  52349. weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  52350. weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
  52351. longDateFormat: {
  52352. LT: 'H:mm',
  52353. LTS: 'H:mm:ss',
  52354. L: 'YYYY.MM.DD.',
  52355. LL: 'YYYY. MMMM D.',
  52356. LLL: 'YYYY. MMMM D. H:mm',
  52357. LLLL: 'YYYY. MMMM D., dddd H:mm',
  52358. },
  52359. meridiemParse: /de|du/i,
  52360. isPM: function (input) {
  52361. return input.charAt(1).toLowerCase() === 'u';
  52362. },
  52363. meridiem: function (hours, minutes, isLower) {
  52364. if (hours < 12) {
  52365. return isLower === true ? 'de' : 'DE';
  52366. } else {
  52367. return isLower === true ? 'du' : 'DU';
  52368. }
  52369. },
  52370. calendar: {
  52371. sameDay: '[ma] LT[-kor]',
  52372. nextDay: '[holnap] LT[-kor]',
  52373. nextWeek: function () {
  52374. return week.call(this, true);
  52375. },
  52376. lastDay: '[tegnap] LT[-kor]',
  52377. lastWeek: function () {
  52378. return week.call(this, false);
  52379. },
  52380. sameElse: 'L',
  52381. },
  52382. relativeTime: {
  52383. future: '%s múlva',
  52384. past: '%s',
  52385. s: translate,
  52386. ss: translate,
  52387. m: translate,
  52388. mm: translate,
  52389. h: translate,
  52390. hh: translate,
  52391. d: translate,
  52392. dd: translate,
  52393. M: translate,
  52394. MM: translate,
  52395. y: translate,
  52396. yy: translate,
  52397. },
  52398. dayOfMonthOrdinalParse: /\d{1,2}\./,
  52399. ordinal: '%d.',
  52400. week: {
  52401. dow: 1, // Monday is the first day of the week.
  52402. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52403. },
  52404. });
  52405. return hu;
  52406. })));
  52407. /***/ }),
  52408. /***/ 11423:
  52409. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52410. //! moment.js locale configuration
  52411. //! locale : Armenian [hy-am]
  52412. //! author : Armendarabyan : https://github.com/armendarabyan
  52413. ;(function (global, factory) {
  52414. true ? factory(__webpack_require__(30381)) :
  52415. 0
  52416. }(this, (function (moment) { 'use strict';
  52417. //! moment.js locale configuration
  52418. var hyAm = moment.defineLocale('hy-am', {
  52419. months: {
  52420. format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
  52421. '_'
  52422. ),
  52423. standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
  52424. '_'
  52425. ),
  52426. },
  52427. monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
  52428. weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
  52429. '_'
  52430. ),
  52431. weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  52432. weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  52433. longDateFormat: {
  52434. LT: 'HH:mm',
  52435. LTS: 'HH:mm:ss',
  52436. L: 'DD.MM.YYYY',
  52437. LL: 'D MMMM YYYY թ.',
  52438. LLL: 'D MMMM YYYY թ., HH:mm',
  52439. LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
  52440. },
  52441. calendar: {
  52442. sameDay: '[այսօր] LT',
  52443. nextDay: '[վաղը] LT',
  52444. lastDay: '[երեկ] LT',
  52445. nextWeek: function () {
  52446. return 'dddd [օրը ժամը] LT';
  52447. },
  52448. lastWeek: function () {
  52449. return '[անցած] dddd [օրը ժամը] LT';
  52450. },
  52451. sameElse: 'L',
  52452. },
  52453. relativeTime: {
  52454. future: '%s հետո',
  52455. past: '%s առաջ',
  52456. s: 'մի քանի վայրկյան',
  52457. ss: '%d վայրկյան',
  52458. m: 'րոպե',
  52459. mm: '%d րոպե',
  52460. h: 'ժամ',
  52461. hh: '%d ժամ',
  52462. d: 'օր',
  52463. dd: '%d օր',
  52464. M: 'ամիս',
  52465. MM: '%d ամիս',
  52466. y: 'տարի',
  52467. yy: '%d տարի',
  52468. },
  52469. meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
  52470. isPM: function (input) {
  52471. return /^(ցերեկվա|երեկոյան)$/.test(input);
  52472. },
  52473. meridiem: function (hour) {
  52474. if (hour < 4) {
  52475. return 'գիշերվա';
  52476. } else if (hour < 12) {
  52477. return 'առավոտվա';
  52478. } else if (hour < 17) {
  52479. return 'ցերեկվա';
  52480. } else {
  52481. return 'երեկոյան';
  52482. }
  52483. },
  52484. dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
  52485. ordinal: function (number, period) {
  52486. switch (period) {
  52487. case 'DDD':
  52488. case 'w':
  52489. case 'W':
  52490. case 'DDDo':
  52491. if (number === 1) {
  52492. return number + '-ին';
  52493. }
  52494. return number + '-րդ';
  52495. default:
  52496. return number;
  52497. }
  52498. },
  52499. week: {
  52500. dow: 1, // Monday is the first day of the week.
  52501. doy: 7, // The week that contains Jan 7th is the first week of the year.
  52502. },
  52503. });
  52504. return hyAm;
  52505. })));
  52506. /***/ }),
  52507. /***/ 29218:
  52508. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52509. //! moment.js locale configuration
  52510. //! locale : Indonesian [id]
  52511. //! author : Mohammad Satrio Utomo : https://github.com/tyok
  52512. //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
  52513. ;(function (global, factory) {
  52514. true ? factory(__webpack_require__(30381)) :
  52515. 0
  52516. }(this, (function (moment) { 'use strict';
  52517. //! moment.js locale configuration
  52518. var id = moment.defineLocale('id', {
  52519. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
  52520. '_'
  52521. ),
  52522. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
  52523. weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  52524. weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  52525. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  52526. longDateFormat: {
  52527. LT: 'HH.mm',
  52528. LTS: 'HH.mm.ss',
  52529. L: 'DD/MM/YYYY',
  52530. LL: 'D MMMM YYYY',
  52531. LLL: 'D MMMM YYYY [pukul] HH.mm',
  52532. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  52533. },
  52534. meridiemParse: /pagi|siang|sore|malam/,
  52535. meridiemHour: function (hour, meridiem) {
  52536. if (hour === 12) {
  52537. hour = 0;
  52538. }
  52539. if (meridiem === 'pagi') {
  52540. return hour;
  52541. } else if (meridiem === 'siang') {
  52542. return hour >= 11 ? hour : hour + 12;
  52543. } else if (meridiem === 'sore' || meridiem === 'malam') {
  52544. return hour + 12;
  52545. }
  52546. },
  52547. meridiem: function (hours, minutes, isLower) {
  52548. if (hours < 11) {
  52549. return 'pagi';
  52550. } else if (hours < 15) {
  52551. return 'siang';
  52552. } else if (hours < 19) {
  52553. return 'sore';
  52554. } else {
  52555. return 'malam';
  52556. }
  52557. },
  52558. calendar: {
  52559. sameDay: '[Hari ini pukul] LT',
  52560. nextDay: '[Besok pukul] LT',
  52561. nextWeek: 'dddd [pukul] LT',
  52562. lastDay: '[Kemarin pukul] LT',
  52563. lastWeek: 'dddd [lalu pukul] LT',
  52564. sameElse: 'L',
  52565. },
  52566. relativeTime: {
  52567. future: 'dalam %s',
  52568. past: '%s yang lalu',
  52569. s: 'beberapa detik',
  52570. ss: '%d detik',
  52571. m: 'semenit',
  52572. mm: '%d menit',
  52573. h: 'sejam',
  52574. hh: '%d jam',
  52575. d: 'sehari',
  52576. dd: '%d hari',
  52577. M: 'sebulan',
  52578. MM: '%d bulan',
  52579. y: 'setahun',
  52580. yy: '%d tahun',
  52581. },
  52582. week: {
  52583. dow: 0, // Sunday is the first day of the week.
  52584. doy: 6, // The week that contains Jan 6th is the first week of the year.
  52585. },
  52586. });
  52587. return id;
  52588. })));
  52589. /***/ }),
  52590. /***/ 90135:
  52591. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52592. //! moment.js locale configuration
  52593. //! locale : Icelandic [is]
  52594. //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
  52595. ;(function (global, factory) {
  52596. true ? factory(__webpack_require__(30381)) :
  52597. 0
  52598. }(this, (function (moment) { 'use strict';
  52599. //! moment.js locale configuration
  52600. function plural(n) {
  52601. if (n % 100 === 11) {
  52602. return true;
  52603. } else if (n % 10 === 1) {
  52604. return false;
  52605. }
  52606. return true;
  52607. }
  52608. function translate(number, withoutSuffix, key, isFuture) {
  52609. var result = number + ' ';
  52610. switch (key) {
  52611. case 's':
  52612. return withoutSuffix || isFuture
  52613. ? 'nokkrar sekúndur'
  52614. : 'nokkrum sekúndum';
  52615. case 'ss':
  52616. if (plural(number)) {
  52617. return (
  52618. result +
  52619. (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
  52620. );
  52621. }
  52622. return result + 'sekúnda';
  52623. case 'm':
  52624. return withoutSuffix ? 'mínúta' : 'mínútu';
  52625. case 'mm':
  52626. if (plural(number)) {
  52627. return (
  52628. result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
  52629. );
  52630. } else if (withoutSuffix) {
  52631. return result + 'mínúta';
  52632. }
  52633. return result + 'mínútu';
  52634. case 'hh':
  52635. if (plural(number)) {
  52636. return (
  52637. result +
  52638. (withoutSuffix || isFuture
  52639. ? 'klukkustundir'
  52640. : 'klukkustundum')
  52641. );
  52642. }
  52643. return result + 'klukkustund';
  52644. case 'd':
  52645. if (withoutSuffix) {
  52646. return 'dagur';
  52647. }
  52648. return isFuture ? 'dag' : 'degi';
  52649. case 'dd':
  52650. if (plural(number)) {
  52651. if (withoutSuffix) {
  52652. return result + 'dagar';
  52653. }
  52654. return result + (isFuture ? 'daga' : 'dögum');
  52655. } else if (withoutSuffix) {
  52656. return result + 'dagur';
  52657. }
  52658. return result + (isFuture ? 'dag' : 'degi');
  52659. case 'M':
  52660. if (withoutSuffix) {
  52661. return 'mánuður';
  52662. }
  52663. return isFuture ? 'mánuð' : 'mánuði';
  52664. case 'MM':
  52665. if (plural(number)) {
  52666. if (withoutSuffix) {
  52667. return result + 'mánuðir';
  52668. }
  52669. return result + (isFuture ? 'mánuði' : 'mánuðum');
  52670. } else if (withoutSuffix) {
  52671. return result + 'mánuður';
  52672. }
  52673. return result + (isFuture ? 'mánuð' : 'mánuði');
  52674. case 'y':
  52675. return withoutSuffix || isFuture ? 'ár' : 'ári';
  52676. case 'yy':
  52677. if (plural(number)) {
  52678. return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  52679. }
  52680. return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  52681. }
  52682. }
  52683. var is = moment.defineLocale('is', {
  52684. months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
  52685. '_'
  52686. ),
  52687. monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  52688. weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
  52689. '_'
  52690. ),
  52691. weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  52692. weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  52693. longDateFormat: {
  52694. LT: 'H:mm',
  52695. LTS: 'H:mm:ss',
  52696. L: 'DD.MM.YYYY',
  52697. LL: 'D. MMMM YYYY',
  52698. LLL: 'D. MMMM YYYY [kl.] H:mm',
  52699. LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
  52700. },
  52701. calendar: {
  52702. sameDay: '[í dag kl.] LT',
  52703. nextDay: '[á morgun kl.] LT',
  52704. nextWeek: 'dddd [kl.] LT',
  52705. lastDay: '[í gær kl.] LT',
  52706. lastWeek: '[síðasta] dddd [kl.] LT',
  52707. sameElse: 'L',
  52708. },
  52709. relativeTime: {
  52710. future: 'eftir %s',
  52711. past: 'fyrir %s síðan',
  52712. s: translate,
  52713. ss: translate,
  52714. m: translate,
  52715. mm: translate,
  52716. h: 'klukkustund',
  52717. hh: translate,
  52718. d: translate,
  52719. dd: translate,
  52720. M: translate,
  52721. MM: translate,
  52722. y: translate,
  52723. yy: translate,
  52724. },
  52725. dayOfMonthOrdinalParse: /\d{1,2}\./,
  52726. ordinal: '%d.',
  52727. week: {
  52728. dow: 1, // Monday is the first day of the week.
  52729. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52730. },
  52731. });
  52732. return is;
  52733. })));
  52734. /***/ }),
  52735. /***/ 10150:
  52736. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52737. //! moment.js locale configuration
  52738. //! locale : Italian (Switzerland) [it-ch]
  52739. //! author : xfh : https://github.com/xfh
  52740. ;(function (global, factory) {
  52741. true ? factory(__webpack_require__(30381)) :
  52742. 0
  52743. }(this, (function (moment) { 'use strict';
  52744. //! moment.js locale configuration
  52745. var itCh = moment.defineLocale('it-ch', {
  52746. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  52747. '_'
  52748. ),
  52749. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  52750. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  52751. '_'
  52752. ),
  52753. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  52754. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  52755. longDateFormat: {
  52756. LT: 'HH:mm',
  52757. LTS: 'HH:mm:ss',
  52758. L: 'DD.MM.YYYY',
  52759. LL: 'D MMMM YYYY',
  52760. LLL: 'D MMMM YYYY HH:mm',
  52761. LLLL: 'dddd D MMMM YYYY HH:mm',
  52762. },
  52763. calendar: {
  52764. sameDay: '[Oggi alle] LT',
  52765. nextDay: '[Domani alle] LT',
  52766. nextWeek: 'dddd [alle] LT',
  52767. lastDay: '[Ieri alle] LT',
  52768. lastWeek: function () {
  52769. switch (this.day()) {
  52770. case 0:
  52771. return '[la scorsa] dddd [alle] LT';
  52772. default:
  52773. return '[lo scorso] dddd [alle] LT';
  52774. }
  52775. },
  52776. sameElse: 'L',
  52777. },
  52778. relativeTime: {
  52779. future: function (s) {
  52780. return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
  52781. },
  52782. past: '%s fa',
  52783. s: 'alcuni secondi',
  52784. ss: '%d secondi',
  52785. m: 'un minuto',
  52786. mm: '%d minuti',
  52787. h: "un'ora",
  52788. hh: '%d ore',
  52789. d: 'un giorno',
  52790. dd: '%d giorni',
  52791. M: 'un mese',
  52792. MM: '%d mesi',
  52793. y: 'un anno',
  52794. yy: '%d anni',
  52795. },
  52796. dayOfMonthOrdinalParse: /\d{1,2}º/,
  52797. ordinal: '%dº',
  52798. week: {
  52799. dow: 1, // Monday is the first day of the week.
  52800. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52801. },
  52802. });
  52803. return itCh;
  52804. })));
  52805. /***/ }),
  52806. /***/ 90626:
  52807. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52808. //! moment.js locale configuration
  52809. //! locale : Italian [it]
  52810. //! author : Lorenzo : https://github.com/aliem
  52811. //! author: Mattia Larentis: https://github.com/nostalgiaz
  52812. //! author: Marco : https://github.com/Manfre98
  52813. ;(function (global, factory) {
  52814. true ? factory(__webpack_require__(30381)) :
  52815. 0
  52816. }(this, (function (moment) { 'use strict';
  52817. //! moment.js locale configuration
  52818. var it = moment.defineLocale('it', {
  52819. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  52820. '_'
  52821. ),
  52822. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  52823. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  52824. '_'
  52825. ),
  52826. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  52827. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  52828. longDateFormat: {
  52829. LT: 'HH:mm',
  52830. LTS: 'HH:mm:ss',
  52831. L: 'DD/MM/YYYY',
  52832. LL: 'D MMMM YYYY',
  52833. LLL: 'D MMMM YYYY HH:mm',
  52834. LLLL: 'dddd D MMMM YYYY HH:mm',
  52835. },
  52836. calendar: {
  52837. sameDay: function () {
  52838. return (
  52839. '[Oggi a' +
  52840. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  52841. ']LT'
  52842. );
  52843. },
  52844. nextDay: function () {
  52845. return (
  52846. '[Domani a' +
  52847. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  52848. ']LT'
  52849. );
  52850. },
  52851. nextWeek: function () {
  52852. return (
  52853. 'dddd [a' +
  52854. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  52855. ']LT'
  52856. );
  52857. },
  52858. lastDay: function () {
  52859. return (
  52860. '[Ieri a' +
  52861. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  52862. ']LT'
  52863. );
  52864. },
  52865. lastWeek: function () {
  52866. switch (this.day()) {
  52867. case 0:
  52868. return (
  52869. '[La scorsa] dddd [a' +
  52870. (this.hours() > 1
  52871. ? 'lle '
  52872. : this.hours() === 0
  52873. ? ' '
  52874. : "ll'") +
  52875. ']LT'
  52876. );
  52877. default:
  52878. return (
  52879. '[Lo scorso] dddd [a' +
  52880. (this.hours() > 1
  52881. ? 'lle '
  52882. : this.hours() === 0
  52883. ? ' '
  52884. : "ll'") +
  52885. ']LT'
  52886. );
  52887. }
  52888. },
  52889. sameElse: 'L',
  52890. },
  52891. relativeTime: {
  52892. future: 'tra %s',
  52893. past: '%s fa',
  52894. s: 'alcuni secondi',
  52895. ss: '%d secondi',
  52896. m: 'un minuto',
  52897. mm: '%d minuti',
  52898. h: "un'ora",
  52899. hh: '%d ore',
  52900. d: 'un giorno',
  52901. dd: '%d giorni',
  52902. w: 'una settimana',
  52903. ww: '%d settimane',
  52904. M: 'un mese',
  52905. MM: '%d mesi',
  52906. y: 'un anno',
  52907. yy: '%d anni',
  52908. },
  52909. dayOfMonthOrdinalParse: /\d{1,2}º/,
  52910. ordinal: '%dº',
  52911. week: {
  52912. dow: 1, // Monday is the first day of the week.
  52913. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52914. },
  52915. });
  52916. return it;
  52917. })));
  52918. /***/ }),
  52919. /***/ 39183:
  52920. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52921. //! moment.js locale configuration
  52922. //! locale : Japanese [ja]
  52923. //! author : LI Long : https://github.com/baryon
  52924. ;(function (global, factory) {
  52925. true ? factory(__webpack_require__(30381)) :
  52926. 0
  52927. }(this, (function (moment) { 'use strict';
  52928. //! moment.js locale configuration
  52929. var ja = moment.defineLocale('ja', {
  52930. eras: [
  52931. {
  52932. since: '2019-05-01',
  52933. offset: 1,
  52934. name: '令和',
  52935. narrow: '㋿',
  52936. abbr: 'R',
  52937. },
  52938. {
  52939. since: '1989-01-08',
  52940. until: '2019-04-30',
  52941. offset: 1,
  52942. name: '平成',
  52943. narrow: '㍻',
  52944. abbr: 'H',
  52945. },
  52946. {
  52947. since: '1926-12-25',
  52948. until: '1989-01-07',
  52949. offset: 1,
  52950. name: '昭和',
  52951. narrow: '㍼',
  52952. abbr: 'S',
  52953. },
  52954. {
  52955. since: '1912-07-30',
  52956. until: '1926-12-24',
  52957. offset: 1,
  52958. name: '大正',
  52959. narrow: '㍽',
  52960. abbr: 'T',
  52961. },
  52962. {
  52963. since: '1873-01-01',
  52964. until: '1912-07-29',
  52965. offset: 6,
  52966. name: '明治',
  52967. narrow: '㍾',
  52968. abbr: 'M',
  52969. },
  52970. {
  52971. since: '0001-01-01',
  52972. until: '1873-12-31',
  52973. offset: 1,
  52974. name: '西暦',
  52975. narrow: 'AD',
  52976. abbr: 'AD',
  52977. },
  52978. {
  52979. since: '0000-12-31',
  52980. until: -Infinity,
  52981. offset: 1,
  52982. name: '紀元前',
  52983. narrow: 'BC',
  52984. abbr: 'BC',
  52985. },
  52986. ],
  52987. eraYearOrdinalRegex: /(元|\d+)年/,
  52988. eraYearOrdinalParse: function (input, match) {
  52989. return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
  52990. },
  52991. months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  52992. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  52993. '_'
  52994. ),
  52995. weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  52996. weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
  52997. weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
  52998. longDateFormat: {
  52999. LT: 'HH:mm',
  53000. LTS: 'HH:mm:ss',
  53001. L: 'YYYY/MM/DD',
  53002. LL: 'YYYY年M月D日',
  53003. LLL: 'YYYY年M月D日 HH:mm',
  53004. LLLL: 'YYYY年M月D日 dddd HH:mm',
  53005. l: 'YYYY/MM/DD',
  53006. ll: 'YYYY年M月D日',
  53007. lll: 'YYYY年M月D日 HH:mm',
  53008. llll: 'YYYY年M月D日(ddd) HH:mm',
  53009. },
  53010. meridiemParse: /午前|午後/i,
  53011. isPM: function (input) {
  53012. return input === '午後';
  53013. },
  53014. meridiem: function (hour, minute, isLower) {
  53015. if (hour < 12) {
  53016. return '午前';
  53017. } else {
  53018. return '午後';
  53019. }
  53020. },
  53021. calendar: {
  53022. sameDay: '[今日] LT',
  53023. nextDay: '[明日] LT',
  53024. nextWeek: function (now) {
  53025. if (now.week() !== this.week()) {
  53026. return '[来週]dddd LT';
  53027. } else {
  53028. return 'dddd LT';
  53029. }
  53030. },
  53031. lastDay: '[昨日] LT',
  53032. lastWeek: function (now) {
  53033. if (this.week() !== now.week()) {
  53034. return '[先週]dddd LT';
  53035. } else {
  53036. return 'dddd LT';
  53037. }
  53038. },
  53039. sameElse: 'L',
  53040. },
  53041. dayOfMonthOrdinalParse: /\d{1,2}日/,
  53042. ordinal: function (number, period) {
  53043. switch (period) {
  53044. case 'y':
  53045. return number === 1 ? '元年' : number + '年';
  53046. case 'd':
  53047. case 'D':
  53048. case 'DDD':
  53049. return number + '日';
  53050. default:
  53051. return number;
  53052. }
  53053. },
  53054. relativeTime: {
  53055. future: '%s後',
  53056. past: '%s前',
  53057. s: '数秒',
  53058. ss: '%d秒',
  53059. m: '1分',
  53060. mm: '%d分',
  53061. h: '1時間',
  53062. hh: '%d時間',
  53063. d: '1日',
  53064. dd: '%d日',
  53065. M: '1ヶ月',
  53066. MM: '%dヶ月',
  53067. y: '1年',
  53068. yy: '%d年',
  53069. },
  53070. });
  53071. return ja;
  53072. })));
  53073. /***/ }),
  53074. /***/ 24286:
  53075. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53076. //! moment.js locale configuration
  53077. //! locale : Javanese [jv]
  53078. //! author : Rony Lantip : https://github.com/lantip
  53079. //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
  53080. ;(function (global, factory) {
  53081. true ? factory(__webpack_require__(30381)) :
  53082. 0
  53083. }(this, (function (moment) { 'use strict';
  53084. //! moment.js locale configuration
  53085. var jv = moment.defineLocale('jv', {
  53086. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
  53087. '_'
  53088. ),
  53089. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
  53090. weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
  53091. weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
  53092. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
  53093. longDateFormat: {
  53094. LT: 'HH.mm',
  53095. LTS: 'HH.mm.ss',
  53096. L: 'DD/MM/YYYY',
  53097. LL: 'D MMMM YYYY',
  53098. LLL: 'D MMMM YYYY [pukul] HH.mm',
  53099. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  53100. },
  53101. meridiemParse: /enjing|siyang|sonten|ndalu/,
  53102. meridiemHour: function (hour, meridiem) {
  53103. if (hour === 12) {
  53104. hour = 0;
  53105. }
  53106. if (meridiem === 'enjing') {
  53107. return hour;
  53108. } else if (meridiem === 'siyang') {
  53109. return hour >= 11 ? hour : hour + 12;
  53110. } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
  53111. return hour + 12;
  53112. }
  53113. },
  53114. meridiem: function (hours, minutes, isLower) {
  53115. if (hours < 11) {
  53116. return 'enjing';
  53117. } else if (hours < 15) {
  53118. return 'siyang';
  53119. } else if (hours < 19) {
  53120. return 'sonten';
  53121. } else {
  53122. return 'ndalu';
  53123. }
  53124. },
  53125. calendar: {
  53126. sameDay: '[Dinten puniko pukul] LT',
  53127. nextDay: '[Mbenjang pukul] LT',
  53128. nextWeek: 'dddd [pukul] LT',
  53129. lastDay: '[Kala wingi pukul] LT',
  53130. lastWeek: 'dddd [kepengker pukul] LT',
  53131. sameElse: 'L',
  53132. },
  53133. relativeTime: {
  53134. future: 'wonten ing %s',
  53135. past: '%s ingkang kepengker',
  53136. s: 'sawetawis detik',
  53137. ss: '%d detik',
  53138. m: 'setunggal menit',
  53139. mm: '%d menit',
  53140. h: 'setunggal jam',
  53141. hh: '%d jam',
  53142. d: 'sedinten',
  53143. dd: '%d dinten',
  53144. M: 'sewulan',
  53145. MM: '%d wulan',
  53146. y: 'setaun',
  53147. yy: '%d taun',
  53148. },
  53149. week: {
  53150. dow: 1, // Monday is the first day of the week.
  53151. doy: 7, // The week that contains Jan 7th is the first week of the year.
  53152. },
  53153. });
  53154. return jv;
  53155. })));
  53156. /***/ }),
  53157. /***/ 12105:
  53158. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53159. //! moment.js locale configuration
  53160. //! locale : Georgian [ka]
  53161. //! author : Irakli Janiashvili : https://github.com/IrakliJani
  53162. ;(function (global, factory) {
  53163. true ? factory(__webpack_require__(30381)) :
  53164. 0
  53165. }(this, (function (moment) { 'use strict';
  53166. //! moment.js locale configuration
  53167. var ka = moment.defineLocale('ka', {
  53168. months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
  53169. '_'
  53170. ),
  53171. monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
  53172. weekdays: {
  53173. standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
  53174. '_'
  53175. ),
  53176. format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
  53177. '_'
  53178. ),
  53179. isFormat: /(წინა|შემდეგ)/,
  53180. },
  53181. weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
  53182. weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
  53183. longDateFormat: {
  53184. LT: 'HH:mm',
  53185. LTS: 'HH:mm:ss',
  53186. L: 'DD/MM/YYYY',
  53187. LL: 'D MMMM YYYY',
  53188. LLL: 'D MMMM YYYY HH:mm',
  53189. LLLL: 'dddd, D MMMM YYYY HH:mm',
  53190. },
  53191. calendar: {
  53192. sameDay: '[დღეს] LT[-ზე]',
  53193. nextDay: '[ხვალ] LT[-ზე]',
  53194. lastDay: '[გუშინ] LT[-ზე]',
  53195. nextWeek: '[შემდეგ] dddd LT[-ზე]',
  53196. lastWeek: '[წინა] dddd LT-ზე',
  53197. sameElse: 'L',
  53198. },
  53199. relativeTime: {
  53200. future: function (s) {
  53201. return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function (
  53202. $0,
  53203. $1,
  53204. $2
  53205. ) {
  53206. return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
  53207. });
  53208. },
  53209. past: function (s) {
  53210. if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
  53211. return s.replace(/(ი|ე)$/, 'ის წინ');
  53212. }
  53213. if (/წელი/.test(s)) {
  53214. return s.replace(/წელი$/, 'წლის წინ');
  53215. }
  53216. return s;
  53217. },
  53218. s: 'რამდენიმე წამი',
  53219. ss: '%d წამი',
  53220. m: 'წუთი',
  53221. mm: '%d წუთი',
  53222. h: 'საათი',
  53223. hh: '%d საათი',
  53224. d: 'დღე',
  53225. dd: '%d დღე',
  53226. M: 'თვე',
  53227. MM: '%d თვე',
  53228. y: 'წელი',
  53229. yy: '%d წელი',
  53230. },
  53231. dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
  53232. ordinal: function (number) {
  53233. if (number === 0) {
  53234. return number;
  53235. }
  53236. if (number === 1) {
  53237. return number + '-ლი';
  53238. }
  53239. if (
  53240. number < 20 ||
  53241. (number <= 100 && number % 20 === 0) ||
  53242. number % 100 === 0
  53243. ) {
  53244. return 'მე-' + number;
  53245. }
  53246. return number + '-ე';
  53247. },
  53248. week: {
  53249. dow: 1,
  53250. doy: 7,
  53251. },
  53252. });
  53253. return ka;
  53254. })));
  53255. /***/ }),
  53256. /***/ 47772:
  53257. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53258. //! moment.js locale configuration
  53259. //! locale : Kazakh [kk]
  53260. //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
  53261. ;(function (global, factory) {
  53262. true ? factory(__webpack_require__(30381)) :
  53263. 0
  53264. }(this, (function (moment) { 'use strict';
  53265. //! moment.js locale configuration
  53266. var suffixes = {
  53267. 0: '-ші',
  53268. 1: '-ші',
  53269. 2: '-ші',
  53270. 3: '-ші',
  53271. 4: '-ші',
  53272. 5: '-ші',
  53273. 6: '-шы',
  53274. 7: '-ші',
  53275. 8: '-ші',
  53276. 9: '-шы',
  53277. 10: '-шы',
  53278. 20: '-шы',
  53279. 30: '-шы',
  53280. 40: '-шы',
  53281. 50: '-ші',
  53282. 60: '-шы',
  53283. 70: '-ші',
  53284. 80: '-ші',
  53285. 90: '-шы',
  53286. 100: '-ші',
  53287. };
  53288. var kk = moment.defineLocale('kk', {
  53289. months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
  53290. '_'
  53291. ),
  53292. monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
  53293. weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
  53294. '_'
  53295. ),
  53296. weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
  53297. weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
  53298. longDateFormat: {
  53299. LT: 'HH:mm',
  53300. LTS: 'HH:mm:ss',
  53301. L: 'DD.MM.YYYY',
  53302. LL: 'D MMMM YYYY',
  53303. LLL: 'D MMMM YYYY HH:mm',
  53304. LLLL: 'dddd, D MMMM YYYY HH:mm',
  53305. },
  53306. calendar: {
  53307. sameDay: '[Бүгін сағат] LT',
  53308. nextDay: '[Ертең сағат] LT',
  53309. nextWeek: 'dddd [сағат] LT',
  53310. lastDay: '[Кеше сағат] LT',
  53311. lastWeek: '[Өткен аптаның] dddd [сағат] LT',
  53312. sameElse: 'L',
  53313. },
  53314. relativeTime: {
  53315. future: '%s ішінде',
  53316. past: '%s бұрын',
  53317. s: 'бірнеше секунд',
  53318. ss: '%d секунд',
  53319. m: 'бір минут',
  53320. mm: '%d минут',
  53321. h: 'бір сағат',
  53322. hh: '%d сағат',
  53323. d: 'бір күн',
  53324. dd: '%d күн',
  53325. M: 'бір ай',
  53326. MM: '%d ай',
  53327. y: 'бір жыл',
  53328. yy: '%d жыл',
  53329. },
  53330. dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
  53331. ordinal: function (number) {
  53332. var a = number % 10,
  53333. b = number >= 100 ? 100 : null;
  53334. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  53335. },
  53336. week: {
  53337. dow: 1, // Monday is the first day of the week.
  53338. doy: 7, // The week that contains Jan 7th is the first week of the year.
  53339. },
  53340. });
  53341. return kk;
  53342. })));
  53343. /***/ }),
  53344. /***/ 18758:
  53345. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53346. //! moment.js locale configuration
  53347. //! locale : Cambodian [km]
  53348. //! author : Kruy Vanna : https://github.com/kruyvanna
  53349. ;(function (global, factory) {
  53350. true ? factory(__webpack_require__(30381)) :
  53351. 0
  53352. }(this, (function (moment) { 'use strict';
  53353. //! moment.js locale configuration
  53354. var symbolMap = {
  53355. 1: '១',
  53356. 2: '២',
  53357. 3: '៣',
  53358. 4: '៤',
  53359. 5: '៥',
  53360. 6: '៦',
  53361. 7: '៧',
  53362. 8: '៨',
  53363. 9: '៩',
  53364. 0: '០',
  53365. },
  53366. numberMap = {
  53367. '១': '1',
  53368. '២': '2',
  53369. '៣': '3',
  53370. '៤': '4',
  53371. '៥': '5',
  53372. '៦': '6',
  53373. '៧': '7',
  53374. '៨': '8',
  53375. '៩': '9',
  53376. '០': '0',
  53377. };
  53378. var km = moment.defineLocale('km', {
  53379. months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
  53380. '_'
  53381. ),
  53382. monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
  53383. '_'
  53384. ),
  53385. weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  53386. weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
  53387. weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
  53388. weekdaysParseExact: true,
  53389. longDateFormat: {
  53390. LT: 'HH:mm',
  53391. LTS: 'HH:mm:ss',
  53392. L: 'DD/MM/YYYY',
  53393. LL: 'D MMMM YYYY',
  53394. LLL: 'D MMMM YYYY HH:mm',
  53395. LLLL: 'dddd, D MMMM YYYY HH:mm',
  53396. },
  53397. meridiemParse: /ព្រឹក|ល្ងាច/,
  53398. isPM: function (input) {
  53399. return input === 'ល្ងាច';
  53400. },
  53401. meridiem: function (hour, minute, isLower) {
  53402. if (hour < 12) {
  53403. return 'ព្រឹក';
  53404. } else {
  53405. return 'ល្ងាច';
  53406. }
  53407. },
  53408. calendar: {
  53409. sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
  53410. nextDay: '[ស្អែក ម៉ោង] LT',
  53411. nextWeek: 'dddd [ម៉ោង] LT',
  53412. lastDay: '[ម្សិលមិញ ម៉ោង] LT',
  53413. lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
  53414. sameElse: 'L',
  53415. },
  53416. relativeTime: {
  53417. future: '%sទៀត',
  53418. past: '%sមុន',
  53419. s: 'ប៉ុន្មានវិនាទី',
  53420. ss: '%d វិនាទី',
  53421. m: 'មួយនាទី',
  53422. mm: '%d នាទី',
  53423. h: 'មួយម៉ោង',
  53424. hh: '%d ម៉ោង',
  53425. d: 'មួយថ្ងៃ',
  53426. dd: '%d ថ្ងៃ',
  53427. M: 'មួយខែ',
  53428. MM: '%d ខែ',
  53429. y: 'មួយឆ្នាំ',
  53430. yy: '%d ឆ្នាំ',
  53431. },
  53432. dayOfMonthOrdinalParse: /ទី\d{1,2}/,
  53433. ordinal: 'ទី%d',
  53434. preparse: function (string) {
  53435. return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
  53436. return numberMap[match];
  53437. });
  53438. },
  53439. postformat: function (string) {
  53440. return string.replace(/\d/g, function (match) {
  53441. return symbolMap[match];
  53442. });
  53443. },
  53444. week: {
  53445. dow: 1, // Monday is the first day of the week.
  53446. doy: 4, // The week that contains Jan 4th is the first week of the year.
  53447. },
  53448. });
  53449. return km;
  53450. })));
  53451. /***/ }),
  53452. /***/ 79282:
  53453. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53454. //! moment.js locale configuration
  53455. //! locale : Kannada [kn]
  53456. //! author : Rajeev Naik : https://github.com/rajeevnaikte
  53457. ;(function (global, factory) {
  53458. true ? factory(__webpack_require__(30381)) :
  53459. 0
  53460. }(this, (function (moment) { 'use strict';
  53461. //! moment.js locale configuration
  53462. var symbolMap = {
  53463. 1: '೧',
  53464. 2: '೨',
  53465. 3: '೩',
  53466. 4: '೪',
  53467. 5: '೫',
  53468. 6: '೬',
  53469. 7: '೭',
  53470. 8: '೮',
  53471. 9: '೯',
  53472. 0: '೦',
  53473. },
  53474. numberMap = {
  53475. '೧': '1',
  53476. '೨': '2',
  53477. '೩': '3',
  53478. '೪': '4',
  53479. '೫': '5',
  53480. '೬': '6',
  53481. '೭': '7',
  53482. '೮': '8',
  53483. '೯': '9',
  53484. '೦': '0',
  53485. };
  53486. var kn = moment.defineLocale('kn', {
  53487. months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
  53488. '_'
  53489. ),
  53490. monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
  53491. '_'
  53492. ),
  53493. monthsParseExact: true,
  53494. weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
  53495. '_'
  53496. ),
  53497. weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
  53498. weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
  53499. longDateFormat: {
  53500. LT: 'A h:mm',
  53501. LTS: 'A h:mm:ss',
  53502. L: 'DD/MM/YYYY',
  53503. LL: 'D MMMM YYYY',
  53504. LLL: 'D MMMM YYYY, A h:mm',
  53505. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  53506. },
  53507. calendar: {
  53508. sameDay: '[ಇಂದು] LT',
  53509. nextDay: '[ನಾಳೆ] LT',
  53510. nextWeek: 'dddd, LT',
  53511. lastDay: '[ನಿನ್ನೆ] LT',
  53512. lastWeek: '[ಕೊನೆಯ] dddd, LT',
  53513. sameElse: 'L',
  53514. },
  53515. relativeTime: {
  53516. future: '%s ನಂತರ',
  53517. past: '%s ಹಿಂದೆ',
  53518. s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
  53519. ss: '%d ಸೆಕೆಂಡುಗಳು',
  53520. m: 'ಒಂದು ನಿಮಿಷ',
  53521. mm: '%d ನಿಮಿಷ',
  53522. h: 'ಒಂದು ಗಂಟೆ',
  53523. hh: '%d ಗಂಟೆ',
  53524. d: 'ಒಂದು ದಿನ',
  53525. dd: '%d ದಿನ',
  53526. M: 'ಒಂದು ತಿಂಗಳು',
  53527. MM: '%d ತಿಂಗಳು',
  53528. y: 'ಒಂದು ವರ್ಷ',
  53529. yy: '%d ವರ್ಷ',
  53530. },
  53531. preparse: function (string) {
  53532. return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
  53533. return numberMap[match];
  53534. });
  53535. },
  53536. postformat: function (string) {
  53537. return string.replace(/\d/g, function (match) {
  53538. return symbolMap[match];
  53539. });
  53540. },
  53541. meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
  53542. meridiemHour: function (hour, meridiem) {
  53543. if (hour === 12) {
  53544. hour = 0;
  53545. }
  53546. if (meridiem === 'ರಾತ್ರಿ') {
  53547. return hour < 4 ? hour : hour + 12;
  53548. } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
  53549. return hour;
  53550. } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
  53551. return hour >= 10 ? hour : hour + 12;
  53552. } else if (meridiem === 'ಸಂಜೆ') {
  53553. return hour + 12;
  53554. }
  53555. },
  53556. meridiem: function (hour, minute, isLower) {
  53557. if (hour < 4) {
  53558. return 'ರಾತ್ರಿ';
  53559. } else if (hour < 10) {
  53560. return 'ಬೆಳಿಗ್ಗೆ';
  53561. } else if (hour < 17) {
  53562. return 'ಮಧ್ಯಾಹ್ನ';
  53563. } else if (hour < 20) {
  53564. return 'ಸಂಜೆ';
  53565. } else {
  53566. return 'ರಾತ್ರಿ';
  53567. }
  53568. },
  53569. dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
  53570. ordinal: function (number) {
  53571. return number + 'ನೇ';
  53572. },
  53573. week: {
  53574. dow: 0, // Sunday is the first day of the week.
  53575. doy: 6, // The week that contains Jan 6th is the first week of the year.
  53576. },
  53577. });
  53578. return kn;
  53579. })));
  53580. /***/ }),
  53581. /***/ 33730:
  53582. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53583. //! moment.js locale configuration
  53584. //! locale : Korean [ko]
  53585. //! author : Kyungwook, Park : https://github.com/kyungw00k
  53586. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  53587. ;(function (global, factory) {
  53588. true ? factory(__webpack_require__(30381)) :
  53589. 0
  53590. }(this, (function (moment) { 'use strict';
  53591. //! moment.js locale configuration
  53592. var ko = moment.defineLocale('ko', {
  53593. months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  53594. monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
  53595. '_'
  53596. ),
  53597. weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  53598. weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
  53599. weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
  53600. longDateFormat: {
  53601. LT: 'A h:mm',
  53602. LTS: 'A h:mm:ss',
  53603. L: 'YYYY.MM.DD.',
  53604. LL: 'YYYY년 MMMM D일',
  53605. LLL: 'YYYY년 MMMM D일 A h:mm',
  53606. LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
  53607. l: 'YYYY.MM.DD.',
  53608. ll: 'YYYY년 MMMM D일',
  53609. lll: 'YYYY년 MMMM D일 A h:mm',
  53610. llll: 'YYYY년 MMMM D일 dddd A h:mm',
  53611. },
  53612. calendar: {
  53613. sameDay: '오늘 LT',
  53614. nextDay: '내일 LT',
  53615. nextWeek: 'dddd LT',
  53616. lastDay: '어제 LT',
  53617. lastWeek: '지난주 dddd LT',
  53618. sameElse: 'L',
  53619. },
  53620. relativeTime: {
  53621. future: '%s 후',
  53622. past: '%s 전',
  53623. s: '몇 초',
  53624. ss: '%d초',
  53625. m: '1분',
  53626. mm: '%d분',
  53627. h: '한 시간',
  53628. hh: '%d시간',
  53629. d: '하루',
  53630. dd: '%d일',
  53631. M: '한 달',
  53632. MM: '%d달',
  53633. y: '일 년',
  53634. yy: '%d년',
  53635. },
  53636. dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
  53637. ordinal: function (number, period) {
  53638. switch (period) {
  53639. case 'd':
  53640. case 'D':
  53641. case 'DDD':
  53642. return number + '일';
  53643. case 'M':
  53644. return number + '월';
  53645. case 'w':
  53646. case 'W':
  53647. return number + '주';
  53648. default:
  53649. return number;
  53650. }
  53651. },
  53652. meridiemParse: /오전|오후/,
  53653. isPM: function (token) {
  53654. return token === '오후';
  53655. },
  53656. meridiem: function (hour, minute, isUpper) {
  53657. return hour < 12 ? '오전' : '오후';
  53658. },
  53659. });
  53660. return ko;
  53661. })));
  53662. /***/ }),
  53663. /***/ 1408:
  53664. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53665. //! moment.js locale configuration
  53666. //! locale : Kurdish [ku]
  53667. //! author : Shahram Mebashar : https://github.com/ShahramMebashar
  53668. ;(function (global, factory) {
  53669. true ? factory(__webpack_require__(30381)) :
  53670. 0
  53671. }(this, (function (moment) { 'use strict';
  53672. //! moment.js locale configuration
  53673. var symbolMap = {
  53674. 1: '١',
  53675. 2: '٢',
  53676. 3: '٣',
  53677. 4: '٤',
  53678. 5: '٥',
  53679. 6: '٦',
  53680. 7: '٧',
  53681. 8: '٨',
  53682. 9: '٩',
  53683. 0: '٠',
  53684. },
  53685. numberMap = {
  53686. '١': '1',
  53687. '٢': '2',
  53688. '٣': '3',
  53689. '٤': '4',
  53690. '٥': '5',
  53691. '٦': '6',
  53692. '٧': '7',
  53693. '٨': '8',
  53694. '٩': '9',
  53695. '٠': '0',
  53696. },
  53697. months = [
  53698. 'کانونی دووەم',
  53699. 'شوبات',
  53700. 'ئازار',
  53701. 'نیسان',
  53702. 'ئایار',
  53703. 'حوزەیران',
  53704. 'تەمموز',
  53705. 'ئاب',
  53706. 'ئەیلوول',
  53707. 'تشرینی یەكەم',
  53708. 'تشرینی دووەم',
  53709. 'كانونی یەکەم',
  53710. ];
  53711. var ku = moment.defineLocale('ku', {
  53712. months: months,
  53713. monthsShort: months,
  53714. weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(
  53715. '_'
  53716. ),
  53717. weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split(
  53718. '_'
  53719. ),
  53720. weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
  53721. weekdaysParseExact: true,
  53722. longDateFormat: {
  53723. LT: 'HH:mm',
  53724. LTS: 'HH:mm:ss',
  53725. L: 'DD/MM/YYYY',
  53726. LL: 'D MMMM YYYY',
  53727. LLL: 'D MMMM YYYY HH:mm',
  53728. LLLL: 'dddd, D MMMM YYYY HH:mm',
  53729. },
  53730. meridiemParse: /ئێواره‌|به‌یانی/,
  53731. isPM: function (input) {
  53732. return /ئێواره‌/.test(input);
  53733. },
  53734. meridiem: function (hour, minute, isLower) {
  53735. if (hour < 12) {
  53736. return 'به‌یانی';
  53737. } else {
  53738. return 'ئێواره‌';
  53739. }
  53740. },
  53741. calendar: {
  53742. sameDay: '[ئه‌مرۆ كاتژمێر] LT',
  53743. nextDay: '[به‌یانی كاتژمێر] LT',
  53744. nextWeek: 'dddd [كاتژمێر] LT',
  53745. lastDay: '[دوێنێ كاتژمێر] LT',
  53746. lastWeek: 'dddd [كاتژمێر] LT',
  53747. sameElse: 'L',
  53748. },
  53749. relativeTime: {
  53750. future: 'له‌ %s',
  53751. past: '%s',
  53752. s: 'چه‌ند چركه‌یه‌ك',
  53753. ss: 'چركه‌ %d',
  53754. m: 'یه‌ك خوله‌ك',
  53755. mm: '%d خوله‌ك',
  53756. h: 'یه‌ك كاتژمێر',
  53757. hh: '%d كاتژمێر',
  53758. d: 'یه‌ك ڕۆژ',
  53759. dd: '%d ڕۆژ',
  53760. M: 'یه‌ك مانگ',
  53761. MM: '%d مانگ',
  53762. y: 'یه‌ك ساڵ',
  53763. yy: '%d ساڵ',
  53764. },
  53765. preparse: function (string) {
  53766. return string
  53767. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  53768. return numberMap[match];
  53769. })
  53770. .replace(/،/g, ',');
  53771. },
  53772. postformat: function (string) {
  53773. return string
  53774. .replace(/\d/g, function (match) {
  53775. return symbolMap[match];
  53776. })
  53777. .replace(/,/g, '،');
  53778. },
  53779. week: {
  53780. dow: 6, // Saturday is the first day of the week.
  53781. doy: 12, // The week that contains Jan 12th is the first week of the year.
  53782. },
  53783. });
  53784. return ku;
  53785. })));
  53786. /***/ }),
  53787. /***/ 33291:
  53788. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53789. //! moment.js locale configuration
  53790. //! locale : Kyrgyz [ky]
  53791. //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
  53792. ;(function (global, factory) {
  53793. true ? factory(__webpack_require__(30381)) :
  53794. 0
  53795. }(this, (function (moment) { 'use strict';
  53796. //! moment.js locale configuration
  53797. var suffixes = {
  53798. 0: '-чү',
  53799. 1: '-чи',
  53800. 2: '-чи',
  53801. 3: '-чү',
  53802. 4: '-чү',
  53803. 5: '-чи',
  53804. 6: '-чы',
  53805. 7: '-чи',
  53806. 8: '-чи',
  53807. 9: '-чу',
  53808. 10: '-чу',
  53809. 20: '-чы',
  53810. 30: '-чу',
  53811. 40: '-чы',
  53812. 50: '-чү',
  53813. 60: '-чы',
  53814. 70: '-чи',
  53815. 80: '-чи',
  53816. 90: '-чу',
  53817. 100: '-чү',
  53818. };
  53819. var ky = moment.defineLocale('ky', {
  53820. months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
  53821. '_'
  53822. ),
  53823. monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
  53824. '_'
  53825. ),
  53826. weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
  53827. '_'
  53828. ),
  53829. weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
  53830. weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
  53831. longDateFormat: {
  53832. LT: 'HH:mm',
  53833. LTS: 'HH:mm:ss',
  53834. L: 'DD.MM.YYYY',
  53835. LL: 'D MMMM YYYY',
  53836. LLL: 'D MMMM YYYY HH:mm',
  53837. LLLL: 'dddd, D MMMM YYYY HH:mm',
  53838. },
  53839. calendar: {
  53840. sameDay: '[Бүгүн саат] LT',
  53841. nextDay: '[Эртең саат] LT',
  53842. nextWeek: 'dddd [саат] LT',
  53843. lastDay: '[Кечээ саат] LT',
  53844. lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
  53845. sameElse: 'L',
  53846. },
  53847. relativeTime: {
  53848. future: '%s ичинде',
  53849. past: '%s мурун',
  53850. s: 'бирнече секунд',
  53851. ss: '%d секунд',
  53852. m: 'бир мүнөт',
  53853. mm: '%d мүнөт',
  53854. h: 'бир саат',
  53855. hh: '%d саат',
  53856. d: 'бир күн',
  53857. dd: '%d күн',
  53858. M: 'бир ай',
  53859. MM: '%d ай',
  53860. y: 'бир жыл',
  53861. yy: '%d жыл',
  53862. },
  53863. dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
  53864. ordinal: function (number) {
  53865. var a = number % 10,
  53866. b = number >= 100 ? 100 : null;
  53867. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  53868. },
  53869. week: {
  53870. dow: 1, // Monday is the first day of the week.
  53871. doy: 7, // The week that contains Jan 7th is the first week of the year.
  53872. },
  53873. });
  53874. return ky;
  53875. })));
  53876. /***/ }),
  53877. /***/ 36841:
  53878. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53879. //! moment.js locale configuration
  53880. //! locale : Luxembourgish [lb]
  53881. //! author : mweimerskirch : https://github.com/mweimerskirch
  53882. //! author : David Raison : https://github.com/kwisatz
  53883. ;(function (global, factory) {
  53884. true ? factory(__webpack_require__(30381)) :
  53885. 0
  53886. }(this, (function (moment) { 'use strict';
  53887. //! moment.js locale configuration
  53888. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  53889. var format = {
  53890. m: ['eng Minutt', 'enger Minutt'],
  53891. h: ['eng Stonn', 'enger Stonn'],
  53892. d: ['een Dag', 'engem Dag'],
  53893. M: ['ee Mount', 'engem Mount'],
  53894. y: ['ee Joer', 'engem Joer'],
  53895. };
  53896. return withoutSuffix ? format[key][0] : format[key][1];
  53897. }
  53898. function processFutureTime(string) {
  53899. var number = string.substr(0, string.indexOf(' '));
  53900. if (eifelerRegelAppliesToNumber(number)) {
  53901. return 'a ' + string;
  53902. }
  53903. return 'an ' + string;
  53904. }
  53905. function processPastTime(string) {
  53906. var number = string.substr(0, string.indexOf(' '));
  53907. if (eifelerRegelAppliesToNumber(number)) {
  53908. return 'viru ' + string;
  53909. }
  53910. return 'virun ' + string;
  53911. }
  53912. /**
  53913. * Returns true if the word before the given number loses the '-n' ending.
  53914. * e.g. 'an 10 Deeg' but 'a 5 Deeg'
  53915. *
  53916. * @param number {integer}
  53917. * @returns {boolean}
  53918. */
  53919. function eifelerRegelAppliesToNumber(number) {
  53920. number = parseInt(number, 10);
  53921. if (isNaN(number)) {
  53922. return false;
  53923. }
  53924. if (number < 0) {
  53925. // Negative Number --> always true
  53926. return true;
  53927. } else if (number < 10) {
  53928. // Only 1 digit
  53929. if (4 <= number && number <= 7) {
  53930. return true;
  53931. }
  53932. return false;
  53933. } else if (number < 100) {
  53934. // 2 digits
  53935. var lastDigit = number % 10,
  53936. firstDigit = number / 10;
  53937. if (lastDigit === 0) {
  53938. return eifelerRegelAppliesToNumber(firstDigit);
  53939. }
  53940. return eifelerRegelAppliesToNumber(lastDigit);
  53941. } else if (number < 10000) {
  53942. // 3 or 4 digits --> recursively check first digit
  53943. while (number >= 10) {
  53944. number = number / 10;
  53945. }
  53946. return eifelerRegelAppliesToNumber(number);
  53947. } else {
  53948. // Anything larger than 4 digits: recursively check first n-3 digits
  53949. number = number / 1000;
  53950. return eifelerRegelAppliesToNumber(number);
  53951. }
  53952. }
  53953. var lb = moment.defineLocale('lb', {
  53954. months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  53955. '_'
  53956. ),
  53957. monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
  53958. '_'
  53959. ),
  53960. monthsParseExact: true,
  53961. weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
  53962. '_'
  53963. ),
  53964. weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
  53965. weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
  53966. weekdaysParseExact: true,
  53967. longDateFormat: {
  53968. LT: 'H:mm [Auer]',
  53969. LTS: 'H:mm:ss [Auer]',
  53970. L: 'DD.MM.YYYY',
  53971. LL: 'D. MMMM YYYY',
  53972. LLL: 'D. MMMM YYYY H:mm [Auer]',
  53973. LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
  53974. },
  53975. calendar: {
  53976. sameDay: '[Haut um] LT',
  53977. sameElse: 'L',
  53978. nextDay: '[Muer um] LT',
  53979. nextWeek: 'dddd [um] LT',
  53980. lastDay: '[Gëschter um] LT',
  53981. lastWeek: function () {
  53982. // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
  53983. switch (this.day()) {
  53984. case 2:
  53985. case 4:
  53986. return '[Leschten] dddd [um] LT';
  53987. default:
  53988. return '[Leschte] dddd [um] LT';
  53989. }
  53990. },
  53991. },
  53992. relativeTime: {
  53993. future: processFutureTime,
  53994. past: processPastTime,
  53995. s: 'e puer Sekonnen',
  53996. ss: '%d Sekonnen',
  53997. m: processRelativeTime,
  53998. mm: '%d Minutten',
  53999. h: processRelativeTime,
  54000. hh: '%d Stonnen',
  54001. d: processRelativeTime,
  54002. dd: '%d Deeg',
  54003. M: processRelativeTime,
  54004. MM: '%d Méint',
  54005. y: processRelativeTime,
  54006. yy: '%d Joer',
  54007. },
  54008. dayOfMonthOrdinalParse: /\d{1,2}\./,
  54009. ordinal: '%d.',
  54010. week: {
  54011. dow: 1, // Monday is the first day of the week.
  54012. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54013. },
  54014. });
  54015. return lb;
  54016. })));
  54017. /***/ }),
  54018. /***/ 55466:
  54019. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54020. //! moment.js locale configuration
  54021. //! locale : Lao [lo]
  54022. //! author : Ryan Hart : https://github.com/ryanhart2
  54023. ;(function (global, factory) {
  54024. true ? factory(__webpack_require__(30381)) :
  54025. 0
  54026. }(this, (function (moment) { 'use strict';
  54027. //! moment.js locale configuration
  54028. var lo = moment.defineLocale('lo', {
  54029. months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
  54030. '_'
  54031. ),
  54032. monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
  54033. '_'
  54034. ),
  54035. weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  54036. weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  54037. weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
  54038. weekdaysParseExact: true,
  54039. longDateFormat: {
  54040. LT: 'HH:mm',
  54041. LTS: 'HH:mm:ss',
  54042. L: 'DD/MM/YYYY',
  54043. LL: 'D MMMM YYYY',
  54044. LLL: 'D MMMM YYYY HH:mm',
  54045. LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
  54046. },
  54047. meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
  54048. isPM: function (input) {
  54049. return input === 'ຕອນແລງ';
  54050. },
  54051. meridiem: function (hour, minute, isLower) {
  54052. if (hour < 12) {
  54053. return 'ຕອນເຊົ້າ';
  54054. } else {
  54055. return 'ຕອນແລງ';
  54056. }
  54057. },
  54058. calendar: {
  54059. sameDay: '[ມື້ນີ້ເວລາ] LT',
  54060. nextDay: '[ມື້ອື່ນເວລາ] LT',
  54061. nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
  54062. lastDay: '[ມື້ວານນີ້ເວລາ] LT',
  54063. lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
  54064. sameElse: 'L',
  54065. },
  54066. relativeTime: {
  54067. future: 'ອີກ %s',
  54068. past: '%sຜ່ານມາ',
  54069. s: 'ບໍ່ເທົ່າໃດວິນາທີ',
  54070. ss: '%d ວິນາທີ',
  54071. m: '1 ນາທີ',
  54072. mm: '%d ນາທີ',
  54073. h: '1 ຊົ່ວໂມງ',
  54074. hh: '%d ຊົ່ວໂມງ',
  54075. d: '1 ມື້',
  54076. dd: '%d ມື້',
  54077. M: '1 ເດືອນ',
  54078. MM: '%d ເດືອນ',
  54079. y: '1 ປີ',
  54080. yy: '%d ປີ',
  54081. },
  54082. dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
  54083. ordinal: function (number) {
  54084. return 'ທີ່' + number;
  54085. },
  54086. });
  54087. return lo;
  54088. })));
  54089. /***/ }),
  54090. /***/ 57010:
  54091. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54092. //! moment.js locale configuration
  54093. //! locale : Lithuanian [lt]
  54094. //! author : Mindaugas Mozūras : https://github.com/mmozuras
  54095. ;(function (global, factory) {
  54096. true ? factory(__webpack_require__(30381)) :
  54097. 0
  54098. }(this, (function (moment) { 'use strict';
  54099. //! moment.js locale configuration
  54100. var units = {
  54101. ss: 'sekundė_sekundžių_sekundes',
  54102. m: 'minutė_minutės_minutę',
  54103. mm: 'minutės_minučių_minutes',
  54104. h: 'valanda_valandos_valandą',
  54105. hh: 'valandos_valandų_valandas',
  54106. d: 'diena_dienos_dieną',
  54107. dd: 'dienos_dienų_dienas',
  54108. M: 'mėnuo_mėnesio_mėnesį',
  54109. MM: 'mėnesiai_mėnesių_mėnesius',
  54110. y: 'metai_metų_metus',
  54111. yy: 'metai_metų_metus',
  54112. };
  54113. function translateSeconds(number, withoutSuffix, key, isFuture) {
  54114. if (withoutSuffix) {
  54115. return 'kelios sekundės';
  54116. } else {
  54117. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  54118. }
  54119. }
  54120. function translateSingular(number, withoutSuffix, key, isFuture) {
  54121. return withoutSuffix
  54122. ? forms(key)[0]
  54123. : isFuture
  54124. ? forms(key)[1]
  54125. : forms(key)[2];
  54126. }
  54127. function special(number) {
  54128. return number % 10 === 0 || (number > 10 && number < 20);
  54129. }
  54130. function forms(key) {
  54131. return units[key].split('_');
  54132. }
  54133. function translate(number, withoutSuffix, key, isFuture) {
  54134. var result = number + ' ';
  54135. if (number === 1) {
  54136. return (
  54137. result + translateSingular(number, withoutSuffix, key[0], isFuture)
  54138. );
  54139. } else if (withoutSuffix) {
  54140. return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  54141. } else {
  54142. if (isFuture) {
  54143. return result + forms(key)[1];
  54144. } else {
  54145. return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  54146. }
  54147. }
  54148. }
  54149. var lt = moment.defineLocale('lt', {
  54150. months: {
  54151. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
  54152. '_'
  54153. ),
  54154. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
  54155. '_'
  54156. ),
  54157. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
  54158. },
  54159. monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  54160. weekdays: {
  54161. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
  54162. '_'
  54163. ),
  54164. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
  54165. '_'
  54166. ),
  54167. isFormat: /dddd HH:mm/,
  54168. },
  54169. weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  54170. weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
  54171. weekdaysParseExact: true,
  54172. longDateFormat: {
  54173. LT: 'HH:mm',
  54174. LTS: 'HH:mm:ss',
  54175. L: 'YYYY-MM-DD',
  54176. LL: 'YYYY [m.] MMMM D [d.]',
  54177. LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  54178. LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  54179. l: 'YYYY-MM-DD',
  54180. ll: 'YYYY [m.] MMMM D [d.]',
  54181. lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  54182. llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
  54183. },
  54184. calendar: {
  54185. sameDay: '[Šiandien] LT',
  54186. nextDay: '[Rytoj] LT',
  54187. nextWeek: 'dddd LT',
  54188. lastDay: '[Vakar] LT',
  54189. lastWeek: '[Praėjusį] dddd LT',
  54190. sameElse: 'L',
  54191. },
  54192. relativeTime: {
  54193. future: 'po %s',
  54194. past: 'prieš %s',
  54195. s: translateSeconds,
  54196. ss: translate,
  54197. m: translateSingular,
  54198. mm: translate,
  54199. h: translateSingular,
  54200. hh: translate,
  54201. d: translateSingular,
  54202. dd: translate,
  54203. M: translateSingular,
  54204. MM: translate,
  54205. y: translateSingular,
  54206. yy: translate,
  54207. },
  54208. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  54209. ordinal: function (number) {
  54210. return number + '-oji';
  54211. },
  54212. week: {
  54213. dow: 1, // Monday is the first day of the week.
  54214. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54215. },
  54216. });
  54217. return lt;
  54218. })));
  54219. /***/ }),
  54220. /***/ 37595:
  54221. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54222. //! moment.js locale configuration
  54223. //! locale : Latvian [lv]
  54224. //! author : Kristaps Karlsons : https://github.com/skakri
  54225. //! author : Jānis Elmeris : https://github.com/JanisE
  54226. ;(function (global, factory) {
  54227. true ? factory(__webpack_require__(30381)) :
  54228. 0
  54229. }(this, (function (moment) { 'use strict';
  54230. //! moment.js locale configuration
  54231. var units = {
  54232. ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
  54233. m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  54234. mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  54235. h: 'stundas_stundām_stunda_stundas'.split('_'),
  54236. hh: 'stundas_stundām_stunda_stundas'.split('_'),
  54237. d: 'dienas_dienām_diena_dienas'.split('_'),
  54238. dd: 'dienas_dienām_diena_dienas'.split('_'),
  54239. M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  54240. MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  54241. y: 'gada_gadiem_gads_gadi'.split('_'),
  54242. yy: 'gada_gadiem_gads_gadi'.split('_'),
  54243. };
  54244. /**
  54245. * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
  54246. */
  54247. function format(forms, number, withoutSuffix) {
  54248. if (withoutSuffix) {
  54249. // E.g. "21 minūte", "3 minūtes".
  54250. return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
  54251. } else {
  54252. // E.g. "21 minūtes" as in "pēc 21 minūtes".
  54253. // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
  54254. return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
  54255. }
  54256. }
  54257. function relativeTimeWithPlural(number, withoutSuffix, key) {
  54258. return number + ' ' + format(units[key], number, withoutSuffix);
  54259. }
  54260. function relativeTimeWithSingular(number, withoutSuffix, key) {
  54261. return format(units[key], number, withoutSuffix);
  54262. }
  54263. function relativeSeconds(number, withoutSuffix) {
  54264. return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
  54265. }
  54266. var lv = moment.defineLocale('lv', {
  54267. months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
  54268. '_'
  54269. ),
  54270. monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
  54271. weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
  54272. '_'
  54273. ),
  54274. weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
  54275. weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
  54276. weekdaysParseExact: true,
  54277. longDateFormat: {
  54278. LT: 'HH:mm',
  54279. LTS: 'HH:mm:ss',
  54280. L: 'DD.MM.YYYY.',
  54281. LL: 'YYYY. [gada] D. MMMM',
  54282. LLL: 'YYYY. [gada] D. MMMM, HH:mm',
  54283. LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
  54284. },
  54285. calendar: {
  54286. sameDay: '[Šodien pulksten] LT',
  54287. nextDay: '[Rīt pulksten] LT',
  54288. nextWeek: 'dddd [pulksten] LT',
  54289. lastDay: '[Vakar pulksten] LT',
  54290. lastWeek: '[Pagājušā] dddd [pulksten] LT',
  54291. sameElse: 'L',
  54292. },
  54293. relativeTime: {
  54294. future: 'pēc %s',
  54295. past: 'pirms %s',
  54296. s: relativeSeconds,
  54297. ss: relativeTimeWithPlural,
  54298. m: relativeTimeWithSingular,
  54299. mm: relativeTimeWithPlural,
  54300. h: relativeTimeWithSingular,
  54301. hh: relativeTimeWithPlural,
  54302. d: relativeTimeWithSingular,
  54303. dd: relativeTimeWithPlural,
  54304. M: relativeTimeWithSingular,
  54305. MM: relativeTimeWithPlural,
  54306. y: relativeTimeWithSingular,
  54307. yy: relativeTimeWithPlural,
  54308. },
  54309. dayOfMonthOrdinalParse: /\d{1,2}\./,
  54310. ordinal: '%d.',
  54311. week: {
  54312. dow: 1, // Monday is the first day of the week.
  54313. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54314. },
  54315. });
  54316. return lv;
  54317. })));
  54318. /***/ }),
  54319. /***/ 39861:
  54320. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54321. //! moment.js locale configuration
  54322. //! locale : Montenegrin [me]
  54323. //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
  54324. ;(function (global, factory) {
  54325. true ? factory(__webpack_require__(30381)) :
  54326. 0
  54327. }(this, (function (moment) { 'use strict';
  54328. //! moment.js locale configuration
  54329. var translator = {
  54330. words: {
  54331. //Different grammatical cases
  54332. ss: ['sekund', 'sekunda', 'sekundi'],
  54333. m: ['jedan minut', 'jednog minuta'],
  54334. mm: ['minut', 'minuta', 'minuta'],
  54335. h: ['jedan sat', 'jednog sata'],
  54336. hh: ['sat', 'sata', 'sati'],
  54337. dd: ['dan', 'dana', 'dana'],
  54338. MM: ['mjesec', 'mjeseca', 'mjeseci'],
  54339. yy: ['godina', 'godine', 'godina'],
  54340. },
  54341. correctGrammaticalCase: function (number, wordKey) {
  54342. return number === 1
  54343. ? wordKey[0]
  54344. : number >= 2 && number <= 4
  54345. ? wordKey[1]
  54346. : wordKey[2];
  54347. },
  54348. translate: function (number, withoutSuffix, key) {
  54349. var wordKey = translator.words[key];
  54350. if (key.length === 1) {
  54351. return withoutSuffix ? wordKey[0] : wordKey[1];
  54352. } else {
  54353. return (
  54354. number +
  54355. ' ' +
  54356. translator.correctGrammaticalCase(number, wordKey)
  54357. );
  54358. }
  54359. },
  54360. };
  54361. var me = moment.defineLocale('me', {
  54362. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
  54363. '_'
  54364. ),
  54365. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
  54366. '_'
  54367. ),
  54368. monthsParseExact: true,
  54369. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  54370. '_'
  54371. ),
  54372. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  54373. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  54374. weekdaysParseExact: true,
  54375. longDateFormat: {
  54376. LT: 'H:mm',
  54377. LTS: 'H:mm:ss',
  54378. L: 'DD.MM.YYYY',
  54379. LL: 'D. MMMM YYYY',
  54380. LLL: 'D. MMMM YYYY H:mm',
  54381. LLLL: 'dddd, D. MMMM YYYY H:mm',
  54382. },
  54383. calendar: {
  54384. sameDay: '[danas u] LT',
  54385. nextDay: '[sjutra u] LT',
  54386. nextWeek: function () {
  54387. switch (this.day()) {
  54388. case 0:
  54389. return '[u] [nedjelju] [u] LT';
  54390. case 3:
  54391. return '[u] [srijedu] [u] LT';
  54392. case 6:
  54393. return '[u] [subotu] [u] LT';
  54394. case 1:
  54395. case 2:
  54396. case 4:
  54397. case 5:
  54398. return '[u] dddd [u] LT';
  54399. }
  54400. },
  54401. lastDay: '[juče u] LT',
  54402. lastWeek: function () {
  54403. var lastWeekDays = [
  54404. '[prošle] [nedjelje] [u] LT',
  54405. '[prošlog] [ponedjeljka] [u] LT',
  54406. '[prošlog] [utorka] [u] LT',
  54407. '[prošle] [srijede] [u] LT',
  54408. '[prošlog] [četvrtka] [u] LT',
  54409. '[prošlog] [petka] [u] LT',
  54410. '[prošle] [subote] [u] LT',
  54411. ];
  54412. return lastWeekDays[this.day()];
  54413. },
  54414. sameElse: 'L',
  54415. },
  54416. relativeTime: {
  54417. future: 'za %s',
  54418. past: 'prije %s',
  54419. s: 'nekoliko sekundi',
  54420. ss: translator.translate,
  54421. m: translator.translate,
  54422. mm: translator.translate,
  54423. h: translator.translate,
  54424. hh: translator.translate,
  54425. d: 'dan',
  54426. dd: translator.translate,
  54427. M: 'mjesec',
  54428. MM: translator.translate,
  54429. y: 'godinu',
  54430. yy: translator.translate,
  54431. },
  54432. dayOfMonthOrdinalParse: /\d{1,2}\./,
  54433. ordinal: '%d.',
  54434. week: {
  54435. dow: 1, // Monday is the first day of the week.
  54436. doy: 7, // The week that contains Jan 7th is the first week of the year.
  54437. },
  54438. });
  54439. return me;
  54440. })));
  54441. /***/ }),
  54442. /***/ 35493:
  54443. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54444. //! moment.js locale configuration
  54445. //! locale : Maori [mi]
  54446. //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
  54447. ;(function (global, factory) {
  54448. true ? factory(__webpack_require__(30381)) :
  54449. 0
  54450. }(this, (function (moment) { 'use strict';
  54451. //! moment.js locale configuration
  54452. var mi = moment.defineLocale('mi', {
  54453. months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
  54454. '_'
  54455. ),
  54456. monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
  54457. '_'
  54458. ),
  54459. monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  54460. monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  54461. monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  54462. monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
  54463. weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
  54464. weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  54465. weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  54466. longDateFormat: {
  54467. LT: 'HH:mm',
  54468. LTS: 'HH:mm:ss',
  54469. L: 'DD/MM/YYYY',
  54470. LL: 'D MMMM YYYY',
  54471. LLL: 'D MMMM YYYY [i] HH:mm',
  54472. LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
  54473. },
  54474. calendar: {
  54475. sameDay: '[i teie mahana, i] LT',
  54476. nextDay: '[apopo i] LT',
  54477. nextWeek: 'dddd [i] LT',
  54478. lastDay: '[inanahi i] LT',
  54479. lastWeek: 'dddd [whakamutunga i] LT',
  54480. sameElse: 'L',
  54481. },
  54482. relativeTime: {
  54483. future: 'i roto i %s',
  54484. past: '%s i mua',
  54485. s: 'te hēkona ruarua',
  54486. ss: '%d hēkona',
  54487. m: 'he meneti',
  54488. mm: '%d meneti',
  54489. h: 'te haora',
  54490. hh: '%d haora',
  54491. d: 'he ra',
  54492. dd: '%d ra',
  54493. M: 'he marama',
  54494. MM: '%d marama',
  54495. y: 'he tau',
  54496. yy: '%d tau',
  54497. },
  54498. dayOfMonthOrdinalParse: /\d{1,2}º/,
  54499. ordinal: '%dº',
  54500. week: {
  54501. dow: 1, // Monday is the first day of the week.
  54502. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54503. },
  54504. });
  54505. return mi;
  54506. })));
  54507. /***/ }),
  54508. /***/ 95966:
  54509. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54510. //! moment.js locale configuration
  54511. //! locale : Macedonian [mk]
  54512. //! author : Borislav Mickov : https://github.com/B0k0
  54513. //! author : Sashko Todorov : https://github.com/bkyceh
  54514. ;(function (global, factory) {
  54515. true ? factory(__webpack_require__(30381)) :
  54516. 0
  54517. }(this, (function (moment) { 'use strict';
  54518. //! moment.js locale configuration
  54519. var mk = moment.defineLocale('mk', {
  54520. months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
  54521. '_'
  54522. ),
  54523. monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
  54524. weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
  54525. '_'
  54526. ),
  54527. weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
  54528. weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
  54529. longDateFormat: {
  54530. LT: 'H:mm',
  54531. LTS: 'H:mm:ss',
  54532. L: 'D.MM.YYYY',
  54533. LL: 'D MMMM YYYY',
  54534. LLL: 'D MMMM YYYY H:mm',
  54535. LLLL: 'dddd, D MMMM YYYY H:mm',
  54536. },
  54537. calendar: {
  54538. sameDay: '[Денес во] LT',
  54539. nextDay: '[Утре во] LT',
  54540. nextWeek: '[Во] dddd [во] LT',
  54541. lastDay: '[Вчера во] LT',
  54542. lastWeek: function () {
  54543. switch (this.day()) {
  54544. case 0:
  54545. case 3:
  54546. case 6:
  54547. return '[Изминатата] dddd [во] LT';
  54548. case 1:
  54549. case 2:
  54550. case 4:
  54551. case 5:
  54552. return '[Изминатиот] dddd [во] LT';
  54553. }
  54554. },
  54555. sameElse: 'L',
  54556. },
  54557. relativeTime: {
  54558. future: 'за %s',
  54559. past: 'пред %s',
  54560. s: 'неколку секунди',
  54561. ss: '%d секунди',
  54562. m: 'една минута',
  54563. mm: '%d минути',
  54564. h: 'еден час',
  54565. hh: '%d часа',
  54566. d: 'еден ден',
  54567. dd: '%d дена',
  54568. M: 'еден месец',
  54569. MM: '%d месеци',
  54570. y: 'една година',
  54571. yy: '%d години',
  54572. },
  54573. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  54574. ordinal: function (number) {
  54575. var lastDigit = number % 10,
  54576. last2Digits = number % 100;
  54577. if (number === 0) {
  54578. return number + '-ев';
  54579. } else if (last2Digits === 0) {
  54580. return number + '-ен';
  54581. } else if (last2Digits > 10 && last2Digits < 20) {
  54582. return number + '-ти';
  54583. } else if (lastDigit === 1) {
  54584. return number + '-ви';
  54585. } else if (lastDigit === 2) {
  54586. return number + '-ри';
  54587. } else if (lastDigit === 7 || lastDigit === 8) {
  54588. return number + '-ми';
  54589. } else {
  54590. return number + '-ти';
  54591. }
  54592. },
  54593. week: {
  54594. dow: 1, // Monday is the first day of the week.
  54595. doy: 7, // The week that contains Jan 7th is the first week of the year.
  54596. },
  54597. });
  54598. return mk;
  54599. })));
  54600. /***/ }),
  54601. /***/ 87341:
  54602. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54603. //! moment.js locale configuration
  54604. //! locale : Malayalam [ml]
  54605. //! author : Floyd Pink : https://github.com/floydpink
  54606. ;(function (global, factory) {
  54607. true ? factory(__webpack_require__(30381)) :
  54608. 0
  54609. }(this, (function (moment) { 'use strict';
  54610. //! moment.js locale configuration
  54611. var ml = moment.defineLocale('ml', {
  54612. months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
  54613. '_'
  54614. ),
  54615. monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
  54616. '_'
  54617. ),
  54618. monthsParseExact: true,
  54619. weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
  54620. '_'
  54621. ),
  54622. weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
  54623. weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
  54624. longDateFormat: {
  54625. LT: 'A h:mm -നു',
  54626. LTS: 'A h:mm:ss -നു',
  54627. L: 'DD/MM/YYYY',
  54628. LL: 'D MMMM YYYY',
  54629. LLL: 'D MMMM YYYY, A h:mm -നു',
  54630. LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
  54631. },
  54632. calendar: {
  54633. sameDay: '[ഇന്ന്] LT',
  54634. nextDay: '[നാളെ] LT',
  54635. nextWeek: 'dddd, LT',
  54636. lastDay: '[ഇന്നലെ] LT',
  54637. lastWeek: '[കഴിഞ്ഞ] dddd, LT',
  54638. sameElse: 'L',
  54639. },
  54640. relativeTime: {
  54641. future: '%s കഴിഞ്ഞ്',
  54642. past: '%s മുൻപ്',
  54643. s: 'അൽപ നിമിഷങ്ങൾ',
  54644. ss: '%d സെക്കൻഡ്',
  54645. m: 'ഒരു മിനിറ്റ്',
  54646. mm: '%d മിനിറ്റ്',
  54647. h: 'ഒരു മണിക്കൂർ',
  54648. hh: '%d മണിക്കൂർ',
  54649. d: 'ഒരു ദിവസം',
  54650. dd: '%d ദിവസം',
  54651. M: 'ഒരു മാസം',
  54652. MM: '%d മാസം',
  54653. y: 'ഒരു വർഷം',
  54654. yy: '%d വർഷം',
  54655. },
  54656. meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
  54657. meridiemHour: function (hour, meridiem) {
  54658. if (hour === 12) {
  54659. hour = 0;
  54660. }
  54661. if (
  54662. (meridiem === 'രാത്രി' && hour >= 4) ||
  54663. meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
  54664. meridiem === 'വൈകുന്നേരം'
  54665. ) {
  54666. return hour + 12;
  54667. } else {
  54668. return hour;
  54669. }
  54670. },
  54671. meridiem: function (hour, minute, isLower) {
  54672. if (hour < 4) {
  54673. return 'രാത്രി';
  54674. } else if (hour < 12) {
  54675. return 'രാവിലെ';
  54676. } else if (hour < 17) {
  54677. return 'ഉച്ച കഴിഞ്ഞ്';
  54678. } else if (hour < 20) {
  54679. return 'വൈകുന്നേരം';
  54680. } else {
  54681. return 'രാത്രി';
  54682. }
  54683. },
  54684. });
  54685. return ml;
  54686. })));
  54687. /***/ }),
  54688. /***/ 5115:
  54689. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54690. //! moment.js locale configuration
  54691. //! locale : Mongolian [mn]
  54692. //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
  54693. ;(function (global, factory) {
  54694. true ? factory(__webpack_require__(30381)) :
  54695. 0
  54696. }(this, (function (moment) { 'use strict';
  54697. //! moment.js locale configuration
  54698. function translate(number, withoutSuffix, key, isFuture) {
  54699. switch (key) {
  54700. case 's':
  54701. return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
  54702. case 'ss':
  54703. return number + (withoutSuffix ? ' секунд' : ' секундын');
  54704. case 'm':
  54705. case 'mm':
  54706. return number + (withoutSuffix ? ' минут' : ' минутын');
  54707. case 'h':
  54708. case 'hh':
  54709. return number + (withoutSuffix ? ' цаг' : ' цагийн');
  54710. case 'd':
  54711. case 'dd':
  54712. return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
  54713. case 'M':
  54714. case 'MM':
  54715. return number + (withoutSuffix ? ' сар' : ' сарын');
  54716. case 'y':
  54717. case 'yy':
  54718. return number + (withoutSuffix ? ' жил' : ' жилийн');
  54719. default:
  54720. return number;
  54721. }
  54722. }
  54723. var mn = moment.defineLocale('mn', {
  54724. months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
  54725. '_'
  54726. ),
  54727. monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
  54728. '_'
  54729. ),
  54730. monthsParseExact: true,
  54731. weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
  54732. weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
  54733. weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
  54734. weekdaysParseExact: true,
  54735. longDateFormat: {
  54736. LT: 'HH:mm',
  54737. LTS: 'HH:mm:ss',
  54738. L: 'YYYY-MM-DD',
  54739. LL: 'YYYY оны MMMMын D',
  54740. LLL: 'YYYY оны MMMMын D HH:mm',
  54741. LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
  54742. },
  54743. meridiemParse: /ҮӨ|ҮХ/i,
  54744. isPM: function (input) {
  54745. return input === 'ҮХ';
  54746. },
  54747. meridiem: function (hour, minute, isLower) {
  54748. if (hour < 12) {
  54749. return 'ҮӨ';
  54750. } else {
  54751. return 'ҮХ';
  54752. }
  54753. },
  54754. calendar: {
  54755. sameDay: '[Өнөөдөр] LT',
  54756. nextDay: '[Маргааш] LT',
  54757. nextWeek: '[Ирэх] dddd LT',
  54758. lastDay: '[Өчигдөр] LT',
  54759. lastWeek: '[Өнгөрсөн] dddd LT',
  54760. sameElse: 'L',
  54761. },
  54762. relativeTime: {
  54763. future: '%s дараа',
  54764. past: '%s өмнө',
  54765. s: translate,
  54766. ss: translate,
  54767. m: translate,
  54768. mm: translate,
  54769. h: translate,
  54770. hh: translate,
  54771. d: translate,
  54772. dd: translate,
  54773. M: translate,
  54774. MM: translate,
  54775. y: translate,
  54776. yy: translate,
  54777. },
  54778. dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
  54779. ordinal: function (number, period) {
  54780. switch (period) {
  54781. case 'd':
  54782. case 'D':
  54783. case 'DDD':
  54784. return number + ' өдөр';
  54785. default:
  54786. return number;
  54787. }
  54788. },
  54789. });
  54790. return mn;
  54791. })));
  54792. /***/ }),
  54793. /***/ 10370:
  54794. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54795. //! moment.js locale configuration
  54796. //! locale : Marathi [mr]
  54797. //! author : Harshad Kale : https://github.com/kalehv
  54798. //! author : Vivek Athalye : https://github.com/vnathalye
  54799. ;(function (global, factory) {
  54800. true ? factory(__webpack_require__(30381)) :
  54801. 0
  54802. }(this, (function (moment) { 'use strict';
  54803. //! moment.js locale configuration
  54804. var symbolMap = {
  54805. 1: '१',
  54806. 2: '२',
  54807. 3: '३',
  54808. 4: '४',
  54809. 5: '५',
  54810. 6: '६',
  54811. 7: '७',
  54812. 8: '८',
  54813. 9: '९',
  54814. 0: '०',
  54815. },
  54816. numberMap = {
  54817. '१': '1',
  54818. '२': '2',
  54819. '३': '3',
  54820. '४': '4',
  54821. '५': '5',
  54822. '६': '6',
  54823. '७': '7',
  54824. '८': '8',
  54825. '९': '9',
  54826. '०': '0',
  54827. };
  54828. function relativeTimeMr(number, withoutSuffix, string, isFuture) {
  54829. var output = '';
  54830. if (withoutSuffix) {
  54831. switch (string) {
  54832. case 's':
  54833. output = 'काही सेकंद';
  54834. break;
  54835. case 'ss':
  54836. output = '%d सेकंद';
  54837. break;
  54838. case 'm':
  54839. output = 'एक मिनिट';
  54840. break;
  54841. case 'mm':
  54842. output = '%d मिनिटे';
  54843. break;
  54844. case 'h':
  54845. output = 'एक तास';
  54846. break;
  54847. case 'hh':
  54848. output = '%d तास';
  54849. break;
  54850. case 'd':
  54851. output = 'एक दिवस';
  54852. break;
  54853. case 'dd':
  54854. output = '%d दिवस';
  54855. break;
  54856. case 'M':
  54857. output = 'एक महिना';
  54858. break;
  54859. case 'MM':
  54860. output = '%d महिने';
  54861. break;
  54862. case 'y':
  54863. output = 'एक वर्ष';
  54864. break;
  54865. case 'yy':
  54866. output = '%d वर्षे';
  54867. break;
  54868. }
  54869. } else {
  54870. switch (string) {
  54871. case 's':
  54872. output = 'काही सेकंदां';
  54873. break;
  54874. case 'ss':
  54875. output = '%d सेकंदां';
  54876. break;
  54877. case 'm':
  54878. output = 'एका मिनिटा';
  54879. break;
  54880. case 'mm':
  54881. output = '%d मिनिटां';
  54882. break;
  54883. case 'h':
  54884. output = 'एका तासा';
  54885. break;
  54886. case 'hh':
  54887. output = '%d तासां';
  54888. break;
  54889. case 'd':
  54890. output = 'एका दिवसा';
  54891. break;
  54892. case 'dd':
  54893. output = '%d दिवसां';
  54894. break;
  54895. case 'M':
  54896. output = 'एका महिन्या';
  54897. break;
  54898. case 'MM':
  54899. output = '%d महिन्यां';
  54900. break;
  54901. case 'y':
  54902. output = 'एका वर्षा';
  54903. break;
  54904. case 'yy':
  54905. output = '%d वर्षां';
  54906. break;
  54907. }
  54908. }
  54909. return output.replace(/%d/i, number);
  54910. }
  54911. var mr = moment.defineLocale('mr', {
  54912. months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
  54913. '_'
  54914. ),
  54915. monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
  54916. '_'
  54917. ),
  54918. monthsParseExact: true,
  54919. weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  54920. weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
  54921. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  54922. longDateFormat: {
  54923. LT: 'A h:mm वाजता',
  54924. LTS: 'A h:mm:ss वाजता',
  54925. L: 'DD/MM/YYYY',
  54926. LL: 'D MMMM YYYY',
  54927. LLL: 'D MMMM YYYY, A h:mm वाजता',
  54928. LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
  54929. },
  54930. calendar: {
  54931. sameDay: '[आज] LT',
  54932. nextDay: '[उद्या] LT',
  54933. nextWeek: 'dddd, LT',
  54934. lastDay: '[काल] LT',
  54935. lastWeek: '[मागील] dddd, LT',
  54936. sameElse: 'L',
  54937. },
  54938. relativeTime: {
  54939. future: '%sमध्ये',
  54940. past: '%sपूर्वी',
  54941. s: relativeTimeMr,
  54942. ss: relativeTimeMr,
  54943. m: relativeTimeMr,
  54944. mm: relativeTimeMr,
  54945. h: relativeTimeMr,
  54946. hh: relativeTimeMr,
  54947. d: relativeTimeMr,
  54948. dd: relativeTimeMr,
  54949. M: relativeTimeMr,
  54950. MM: relativeTimeMr,
  54951. y: relativeTimeMr,
  54952. yy: relativeTimeMr,
  54953. },
  54954. preparse: function (string) {
  54955. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  54956. return numberMap[match];
  54957. });
  54958. },
  54959. postformat: function (string) {
  54960. return string.replace(/\d/g, function (match) {
  54961. return symbolMap[match];
  54962. });
  54963. },
  54964. meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
  54965. meridiemHour: function (hour, meridiem) {
  54966. if (hour === 12) {
  54967. hour = 0;
  54968. }
  54969. if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
  54970. return hour;
  54971. } else if (
  54972. meridiem === 'दुपारी' ||
  54973. meridiem === 'सायंकाळी' ||
  54974. meridiem === 'रात्री'
  54975. ) {
  54976. return hour >= 12 ? hour : hour + 12;
  54977. }
  54978. },
  54979. meridiem: function (hour, minute, isLower) {
  54980. if (hour >= 0 && hour < 6) {
  54981. return 'पहाटे';
  54982. } else if (hour < 12) {
  54983. return 'सकाळी';
  54984. } else if (hour < 17) {
  54985. return 'दुपारी';
  54986. } else if (hour < 20) {
  54987. return 'सायंकाळी';
  54988. } else {
  54989. return 'रात्री';
  54990. }
  54991. },
  54992. week: {
  54993. dow: 0, // Sunday is the first day of the week.
  54994. doy: 6, // The week that contains Jan 6th is the first week of the year.
  54995. },
  54996. });
  54997. return mr;
  54998. })));
  54999. /***/ }),
  55000. /***/ 41237:
  55001. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55002. //! moment.js locale configuration
  55003. //! locale : Malay [ms-my]
  55004. //! note : DEPRECATED, the correct one is [ms]
  55005. //! author : Weldan Jamili : https://github.com/weldan
  55006. ;(function (global, factory) {
  55007. true ? factory(__webpack_require__(30381)) :
  55008. 0
  55009. }(this, (function (moment) { 'use strict';
  55010. //! moment.js locale configuration
  55011. var msMy = moment.defineLocale('ms-my', {
  55012. months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
  55013. '_'
  55014. ),
  55015. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  55016. weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  55017. weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  55018. weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  55019. longDateFormat: {
  55020. LT: 'HH.mm',
  55021. LTS: 'HH.mm.ss',
  55022. L: 'DD/MM/YYYY',
  55023. LL: 'D MMMM YYYY',
  55024. LLL: 'D MMMM YYYY [pukul] HH.mm',
  55025. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  55026. },
  55027. meridiemParse: /pagi|tengahari|petang|malam/,
  55028. meridiemHour: function (hour, meridiem) {
  55029. if (hour === 12) {
  55030. hour = 0;
  55031. }
  55032. if (meridiem === 'pagi') {
  55033. return hour;
  55034. } else if (meridiem === 'tengahari') {
  55035. return hour >= 11 ? hour : hour + 12;
  55036. } else if (meridiem === 'petang' || meridiem === 'malam') {
  55037. return hour + 12;
  55038. }
  55039. },
  55040. meridiem: function (hours, minutes, isLower) {
  55041. if (hours < 11) {
  55042. return 'pagi';
  55043. } else if (hours < 15) {
  55044. return 'tengahari';
  55045. } else if (hours < 19) {
  55046. return 'petang';
  55047. } else {
  55048. return 'malam';
  55049. }
  55050. },
  55051. calendar: {
  55052. sameDay: '[Hari ini pukul] LT',
  55053. nextDay: '[Esok pukul] LT',
  55054. nextWeek: 'dddd [pukul] LT',
  55055. lastDay: '[Kelmarin pukul] LT',
  55056. lastWeek: 'dddd [lepas pukul] LT',
  55057. sameElse: 'L',
  55058. },
  55059. relativeTime: {
  55060. future: 'dalam %s',
  55061. past: '%s yang lepas',
  55062. s: 'beberapa saat',
  55063. ss: '%d saat',
  55064. m: 'seminit',
  55065. mm: '%d minit',
  55066. h: 'sejam',
  55067. hh: '%d jam',
  55068. d: 'sehari',
  55069. dd: '%d hari',
  55070. M: 'sebulan',
  55071. MM: '%d bulan',
  55072. y: 'setahun',
  55073. yy: '%d tahun',
  55074. },
  55075. week: {
  55076. dow: 1, // Monday is the first day of the week.
  55077. doy: 7, // The week that contains Jan 7th is the first week of the year.
  55078. },
  55079. });
  55080. return msMy;
  55081. })));
  55082. /***/ }),
  55083. /***/ 9847:
  55084. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55085. //! moment.js locale configuration
  55086. //! locale : Malay [ms]
  55087. //! author : Weldan Jamili : https://github.com/weldan
  55088. ;(function (global, factory) {
  55089. true ? factory(__webpack_require__(30381)) :
  55090. 0
  55091. }(this, (function (moment) { 'use strict';
  55092. //! moment.js locale configuration
  55093. var ms = moment.defineLocale('ms', {
  55094. months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
  55095. '_'
  55096. ),
  55097. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  55098. weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  55099. weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  55100. weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  55101. longDateFormat: {
  55102. LT: 'HH.mm',
  55103. LTS: 'HH.mm.ss',
  55104. L: 'DD/MM/YYYY',
  55105. LL: 'D MMMM YYYY',
  55106. LLL: 'D MMMM YYYY [pukul] HH.mm',
  55107. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  55108. },
  55109. meridiemParse: /pagi|tengahari|petang|malam/,
  55110. meridiemHour: function (hour, meridiem) {
  55111. if (hour === 12) {
  55112. hour = 0;
  55113. }
  55114. if (meridiem === 'pagi') {
  55115. return hour;
  55116. } else if (meridiem === 'tengahari') {
  55117. return hour >= 11 ? hour : hour + 12;
  55118. } else if (meridiem === 'petang' || meridiem === 'malam') {
  55119. return hour + 12;
  55120. }
  55121. },
  55122. meridiem: function (hours, minutes, isLower) {
  55123. if (hours < 11) {
  55124. return 'pagi';
  55125. } else if (hours < 15) {
  55126. return 'tengahari';
  55127. } else if (hours < 19) {
  55128. return 'petang';
  55129. } else {
  55130. return 'malam';
  55131. }
  55132. },
  55133. calendar: {
  55134. sameDay: '[Hari ini pukul] LT',
  55135. nextDay: '[Esok pukul] LT',
  55136. nextWeek: 'dddd [pukul] LT',
  55137. lastDay: '[Kelmarin pukul] LT',
  55138. lastWeek: 'dddd [lepas pukul] LT',
  55139. sameElse: 'L',
  55140. },
  55141. relativeTime: {
  55142. future: 'dalam %s',
  55143. past: '%s yang lepas',
  55144. s: 'beberapa saat',
  55145. ss: '%d saat',
  55146. m: 'seminit',
  55147. mm: '%d minit',
  55148. h: 'sejam',
  55149. hh: '%d jam',
  55150. d: 'sehari',
  55151. dd: '%d hari',
  55152. M: 'sebulan',
  55153. MM: '%d bulan',
  55154. y: 'setahun',
  55155. yy: '%d tahun',
  55156. },
  55157. week: {
  55158. dow: 1, // Monday is the first day of the week.
  55159. doy: 7, // The week that contains Jan 7th is the first week of the year.
  55160. },
  55161. });
  55162. return ms;
  55163. })));
  55164. /***/ }),
  55165. /***/ 72126:
  55166. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55167. //! moment.js locale configuration
  55168. //! locale : Maltese (Malta) [mt]
  55169. //! author : Alessandro Maruccia : https://github.com/alesma
  55170. ;(function (global, factory) {
  55171. true ? factory(__webpack_require__(30381)) :
  55172. 0
  55173. }(this, (function (moment) { 'use strict';
  55174. //! moment.js locale configuration
  55175. var mt = moment.defineLocale('mt', {
  55176. months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
  55177. '_'
  55178. ),
  55179. monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
  55180. weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
  55181. '_'
  55182. ),
  55183. weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
  55184. weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
  55185. longDateFormat: {
  55186. LT: 'HH:mm',
  55187. LTS: 'HH:mm:ss',
  55188. L: 'DD/MM/YYYY',
  55189. LL: 'D MMMM YYYY',
  55190. LLL: 'D MMMM YYYY HH:mm',
  55191. LLLL: 'dddd, D MMMM YYYY HH:mm',
  55192. },
  55193. calendar: {
  55194. sameDay: '[Illum fil-]LT',
  55195. nextDay: '[Għada fil-]LT',
  55196. nextWeek: 'dddd [fil-]LT',
  55197. lastDay: '[Il-bieraħ fil-]LT',
  55198. lastWeek: 'dddd [li għadda] [fil-]LT',
  55199. sameElse: 'L',
  55200. },
  55201. relativeTime: {
  55202. future: 'f’ %s',
  55203. past: '%s ilu',
  55204. s: 'ftit sekondi',
  55205. ss: '%d sekondi',
  55206. m: 'minuta',
  55207. mm: '%d minuti',
  55208. h: 'siegħa',
  55209. hh: '%d siegħat',
  55210. d: 'ġurnata',
  55211. dd: '%d ġranet',
  55212. M: 'xahar',
  55213. MM: '%d xhur',
  55214. y: 'sena',
  55215. yy: '%d sni',
  55216. },
  55217. dayOfMonthOrdinalParse: /\d{1,2}º/,
  55218. ordinal: '%dº',
  55219. week: {
  55220. dow: 1, // Monday is the first day of the week.
  55221. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55222. },
  55223. });
  55224. return mt;
  55225. })));
  55226. /***/ }),
  55227. /***/ 56165:
  55228. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55229. //! moment.js locale configuration
  55230. //! locale : Burmese [my]
  55231. //! author : Squar team, mysquar.com
  55232. //! author : David Rossellat : https://github.com/gholadr
  55233. //! author : Tin Aung Lin : https://github.com/thanyawzinmin
  55234. ;(function (global, factory) {
  55235. true ? factory(__webpack_require__(30381)) :
  55236. 0
  55237. }(this, (function (moment) { 'use strict';
  55238. //! moment.js locale configuration
  55239. var symbolMap = {
  55240. 1: '၁',
  55241. 2: '၂',
  55242. 3: '၃',
  55243. 4: '၄',
  55244. 5: '၅',
  55245. 6: '၆',
  55246. 7: '၇',
  55247. 8: '၈',
  55248. 9: '၉',
  55249. 0: '၀',
  55250. },
  55251. numberMap = {
  55252. '၁': '1',
  55253. '၂': '2',
  55254. '၃': '3',
  55255. '၄': '4',
  55256. '၅': '5',
  55257. '၆': '6',
  55258. '၇': '7',
  55259. '၈': '8',
  55260. '၉': '9',
  55261. '၀': '0',
  55262. };
  55263. var my = moment.defineLocale('my', {
  55264. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
  55265. '_'
  55266. ),
  55267. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  55268. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
  55269. '_'
  55270. ),
  55271. weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  55272. weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  55273. longDateFormat: {
  55274. LT: 'HH:mm',
  55275. LTS: 'HH:mm:ss',
  55276. L: 'DD/MM/YYYY',
  55277. LL: 'D MMMM YYYY',
  55278. LLL: 'D MMMM YYYY HH:mm',
  55279. LLLL: 'dddd D MMMM YYYY HH:mm',
  55280. },
  55281. calendar: {
  55282. sameDay: '[ယနေ.] LT [မှာ]',
  55283. nextDay: '[မနက်ဖြန်] LT [မှာ]',
  55284. nextWeek: 'dddd LT [မှာ]',
  55285. lastDay: '[မနေ.က] LT [မှာ]',
  55286. lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
  55287. sameElse: 'L',
  55288. },
  55289. relativeTime: {
  55290. future: 'လာမည့် %s မှာ',
  55291. past: 'လွန်ခဲ့သော %s က',
  55292. s: 'စက္ကန်.အနည်းငယ်',
  55293. ss: '%d စက္ကန့်',
  55294. m: 'တစ်မိနစ်',
  55295. mm: '%d မိနစ်',
  55296. h: 'တစ်နာရီ',
  55297. hh: '%d နာရီ',
  55298. d: 'တစ်ရက်',
  55299. dd: '%d ရက်',
  55300. M: 'တစ်လ',
  55301. MM: '%d လ',
  55302. y: 'တစ်နှစ်',
  55303. yy: '%d နှစ်',
  55304. },
  55305. preparse: function (string) {
  55306. return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
  55307. return numberMap[match];
  55308. });
  55309. },
  55310. postformat: function (string) {
  55311. return string.replace(/\d/g, function (match) {
  55312. return symbolMap[match];
  55313. });
  55314. },
  55315. week: {
  55316. dow: 1, // Monday is the first day of the week.
  55317. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55318. },
  55319. });
  55320. return my;
  55321. })));
  55322. /***/ }),
  55323. /***/ 64924:
  55324. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55325. //! moment.js locale configuration
  55326. //! locale : Norwegian Bokmål [nb]
  55327. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  55328. //! Sigurd Gartmann : https://github.com/sigurdga
  55329. //! Stephen Ramthun : https://github.com/stephenramthun
  55330. ;(function (global, factory) {
  55331. true ? factory(__webpack_require__(30381)) :
  55332. 0
  55333. }(this, (function (moment) { 'use strict';
  55334. //! moment.js locale configuration
  55335. var nb = moment.defineLocale('nb', {
  55336. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
  55337. '_'
  55338. ),
  55339. monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
  55340. '_'
  55341. ),
  55342. monthsParseExact: true,
  55343. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  55344. weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  55345. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  55346. weekdaysParseExact: true,
  55347. longDateFormat: {
  55348. LT: 'HH:mm',
  55349. LTS: 'HH:mm:ss',
  55350. L: 'DD.MM.YYYY',
  55351. LL: 'D. MMMM YYYY',
  55352. LLL: 'D. MMMM YYYY [kl.] HH:mm',
  55353. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
  55354. },
  55355. calendar: {
  55356. sameDay: '[i dag kl.] LT',
  55357. nextDay: '[i morgen kl.] LT',
  55358. nextWeek: 'dddd [kl.] LT',
  55359. lastDay: '[i går kl.] LT',
  55360. lastWeek: '[forrige] dddd [kl.] LT',
  55361. sameElse: 'L',
  55362. },
  55363. relativeTime: {
  55364. future: 'om %s',
  55365. past: '%s siden',
  55366. s: 'noen sekunder',
  55367. ss: '%d sekunder',
  55368. m: 'ett minutt',
  55369. mm: '%d minutter',
  55370. h: 'en time',
  55371. hh: '%d timer',
  55372. d: 'en dag',
  55373. dd: '%d dager',
  55374. w: 'en uke',
  55375. ww: '%d uker',
  55376. M: 'en måned',
  55377. MM: '%d måneder',
  55378. y: 'ett år',
  55379. yy: '%d år',
  55380. },
  55381. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55382. ordinal: '%d.',
  55383. week: {
  55384. dow: 1, // Monday is the first day of the week.
  55385. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55386. },
  55387. });
  55388. return nb;
  55389. })));
  55390. /***/ }),
  55391. /***/ 16744:
  55392. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55393. //! moment.js locale configuration
  55394. //! locale : Nepalese [ne]
  55395. //! author : suvash : https://github.com/suvash
  55396. ;(function (global, factory) {
  55397. true ? factory(__webpack_require__(30381)) :
  55398. 0
  55399. }(this, (function (moment) { 'use strict';
  55400. //! moment.js locale configuration
  55401. var symbolMap = {
  55402. 1: '१',
  55403. 2: '२',
  55404. 3: '३',
  55405. 4: '४',
  55406. 5: '५',
  55407. 6: '६',
  55408. 7: '७',
  55409. 8: '८',
  55410. 9: '९',
  55411. 0: '०',
  55412. },
  55413. numberMap = {
  55414. '१': '1',
  55415. '२': '2',
  55416. '३': '3',
  55417. '४': '4',
  55418. '५': '5',
  55419. '६': '6',
  55420. '७': '7',
  55421. '८': '8',
  55422. '९': '9',
  55423. '०': '0',
  55424. };
  55425. var ne = moment.defineLocale('ne', {
  55426. months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
  55427. '_'
  55428. ),
  55429. monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
  55430. '_'
  55431. ),
  55432. monthsParseExact: true,
  55433. weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
  55434. '_'
  55435. ),
  55436. weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
  55437. weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
  55438. weekdaysParseExact: true,
  55439. longDateFormat: {
  55440. LT: 'Aको h:mm बजे',
  55441. LTS: 'Aको h:mm:ss बजे',
  55442. L: 'DD/MM/YYYY',
  55443. LL: 'D MMMM YYYY',
  55444. LLL: 'D MMMM YYYY, Aको h:mm बजे',
  55445. LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
  55446. },
  55447. preparse: function (string) {
  55448. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  55449. return numberMap[match];
  55450. });
  55451. },
  55452. postformat: function (string) {
  55453. return string.replace(/\d/g, function (match) {
  55454. return symbolMap[match];
  55455. });
  55456. },
  55457. meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
  55458. meridiemHour: function (hour, meridiem) {
  55459. if (hour === 12) {
  55460. hour = 0;
  55461. }
  55462. if (meridiem === 'राति') {
  55463. return hour < 4 ? hour : hour + 12;
  55464. } else if (meridiem === 'बिहान') {
  55465. return hour;
  55466. } else if (meridiem === 'दिउँसो') {
  55467. return hour >= 10 ? hour : hour + 12;
  55468. } else if (meridiem === 'साँझ') {
  55469. return hour + 12;
  55470. }
  55471. },
  55472. meridiem: function (hour, minute, isLower) {
  55473. if (hour < 3) {
  55474. return 'राति';
  55475. } else if (hour < 12) {
  55476. return 'बिहान';
  55477. } else if (hour < 16) {
  55478. return 'दिउँसो';
  55479. } else if (hour < 20) {
  55480. return 'साँझ';
  55481. } else {
  55482. return 'राति';
  55483. }
  55484. },
  55485. calendar: {
  55486. sameDay: '[आज] LT',
  55487. nextDay: '[भोलि] LT',
  55488. nextWeek: '[आउँदो] dddd[,] LT',
  55489. lastDay: '[हिजो] LT',
  55490. lastWeek: '[गएको] dddd[,] LT',
  55491. sameElse: 'L',
  55492. },
  55493. relativeTime: {
  55494. future: '%sमा',
  55495. past: '%s अगाडि',
  55496. s: 'केही क्षण',
  55497. ss: '%d सेकेण्ड',
  55498. m: 'एक मिनेट',
  55499. mm: '%d मिनेट',
  55500. h: 'एक घण्टा',
  55501. hh: '%d घण्टा',
  55502. d: 'एक दिन',
  55503. dd: '%d दिन',
  55504. M: 'एक महिना',
  55505. MM: '%d महिना',
  55506. y: 'एक बर्ष',
  55507. yy: '%d बर्ष',
  55508. },
  55509. week: {
  55510. dow: 0, // Sunday is the first day of the week.
  55511. doy: 6, // The week that contains Jan 6th is the first week of the year.
  55512. },
  55513. });
  55514. return ne;
  55515. })));
  55516. /***/ }),
  55517. /***/ 59814:
  55518. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55519. //! moment.js locale configuration
  55520. //! locale : Dutch (Belgium) [nl-be]
  55521. //! author : Joris Röling : https://github.com/jorisroling
  55522. //! author : Jacob Middag : https://github.com/middagj
  55523. ;(function (global, factory) {
  55524. true ? factory(__webpack_require__(30381)) :
  55525. 0
  55526. }(this, (function (moment) { 'use strict';
  55527. //! moment.js locale configuration
  55528. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
  55529. '_'
  55530. ),
  55531. monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
  55532. '_'
  55533. ),
  55534. monthsParse = [
  55535. /^jan/i,
  55536. /^feb/i,
  55537. /^maart|mrt.?$/i,
  55538. /^apr/i,
  55539. /^mei$/i,
  55540. /^jun[i.]?$/i,
  55541. /^jul[i.]?$/i,
  55542. /^aug/i,
  55543. /^sep/i,
  55544. /^okt/i,
  55545. /^nov/i,
  55546. /^dec/i,
  55547. ],
  55548. monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  55549. var nlBe = moment.defineLocale('nl-be', {
  55550. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  55551. '_'
  55552. ),
  55553. monthsShort: function (m, format) {
  55554. if (!m) {
  55555. return monthsShortWithDots;
  55556. } else if (/-MMM-/.test(format)) {
  55557. return monthsShortWithoutDots[m.month()];
  55558. } else {
  55559. return monthsShortWithDots[m.month()];
  55560. }
  55561. },
  55562. monthsRegex: monthsRegex,
  55563. monthsShortRegex: monthsRegex,
  55564. monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  55565. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  55566. monthsParse: monthsParse,
  55567. longMonthsParse: monthsParse,
  55568. shortMonthsParse: monthsParse,
  55569. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
  55570. '_'
  55571. ),
  55572. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  55573. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  55574. weekdaysParseExact: true,
  55575. longDateFormat: {
  55576. LT: 'HH:mm',
  55577. LTS: 'HH:mm:ss',
  55578. L: 'DD/MM/YYYY',
  55579. LL: 'D MMMM YYYY',
  55580. LLL: 'D MMMM YYYY HH:mm',
  55581. LLLL: 'dddd D MMMM YYYY HH:mm',
  55582. },
  55583. calendar: {
  55584. sameDay: '[vandaag om] LT',
  55585. nextDay: '[morgen om] LT',
  55586. nextWeek: 'dddd [om] LT',
  55587. lastDay: '[gisteren om] LT',
  55588. lastWeek: '[afgelopen] dddd [om] LT',
  55589. sameElse: 'L',
  55590. },
  55591. relativeTime: {
  55592. future: 'over %s',
  55593. past: '%s geleden',
  55594. s: 'een paar seconden',
  55595. ss: '%d seconden',
  55596. m: 'één minuut',
  55597. mm: '%d minuten',
  55598. h: 'één uur',
  55599. hh: '%d uur',
  55600. d: 'één dag',
  55601. dd: '%d dagen',
  55602. M: 'één maand',
  55603. MM: '%d maanden',
  55604. y: 'één jaar',
  55605. yy: '%d jaar',
  55606. },
  55607. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  55608. ordinal: function (number) {
  55609. return (
  55610. number +
  55611. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  55612. );
  55613. },
  55614. week: {
  55615. dow: 1, // Monday is the first day of the week.
  55616. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55617. },
  55618. });
  55619. return nlBe;
  55620. })));
  55621. /***/ }),
  55622. /***/ 93901:
  55623. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55624. //! moment.js locale configuration
  55625. //! locale : Dutch [nl]
  55626. //! author : Joris Röling : https://github.com/jorisroling
  55627. //! author : Jacob Middag : https://github.com/middagj
  55628. ;(function (global, factory) {
  55629. true ? factory(__webpack_require__(30381)) :
  55630. 0
  55631. }(this, (function (moment) { 'use strict';
  55632. //! moment.js locale configuration
  55633. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
  55634. '_'
  55635. ),
  55636. monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
  55637. '_'
  55638. ),
  55639. monthsParse = [
  55640. /^jan/i,
  55641. /^feb/i,
  55642. /^maart|mrt.?$/i,
  55643. /^apr/i,
  55644. /^mei$/i,
  55645. /^jun[i.]?$/i,
  55646. /^jul[i.]?$/i,
  55647. /^aug/i,
  55648. /^sep/i,
  55649. /^okt/i,
  55650. /^nov/i,
  55651. /^dec/i,
  55652. ],
  55653. monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  55654. var nl = moment.defineLocale('nl', {
  55655. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  55656. '_'
  55657. ),
  55658. monthsShort: function (m, format) {
  55659. if (!m) {
  55660. return monthsShortWithDots;
  55661. } else if (/-MMM-/.test(format)) {
  55662. return monthsShortWithoutDots[m.month()];
  55663. } else {
  55664. return monthsShortWithDots[m.month()];
  55665. }
  55666. },
  55667. monthsRegex: monthsRegex,
  55668. monthsShortRegex: monthsRegex,
  55669. monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  55670. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  55671. monthsParse: monthsParse,
  55672. longMonthsParse: monthsParse,
  55673. shortMonthsParse: monthsParse,
  55674. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
  55675. '_'
  55676. ),
  55677. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  55678. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  55679. weekdaysParseExact: true,
  55680. longDateFormat: {
  55681. LT: 'HH:mm',
  55682. LTS: 'HH:mm:ss',
  55683. L: 'DD-MM-YYYY',
  55684. LL: 'D MMMM YYYY',
  55685. LLL: 'D MMMM YYYY HH:mm',
  55686. LLLL: 'dddd D MMMM YYYY HH:mm',
  55687. },
  55688. calendar: {
  55689. sameDay: '[vandaag om] LT',
  55690. nextDay: '[morgen om] LT',
  55691. nextWeek: 'dddd [om] LT',
  55692. lastDay: '[gisteren om] LT',
  55693. lastWeek: '[afgelopen] dddd [om] LT',
  55694. sameElse: 'L',
  55695. },
  55696. relativeTime: {
  55697. future: 'over %s',
  55698. past: '%s geleden',
  55699. s: 'een paar seconden',
  55700. ss: '%d seconden',
  55701. m: 'één minuut',
  55702. mm: '%d minuten',
  55703. h: 'één uur',
  55704. hh: '%d uur',
  55705. d: 'één dag',
  55706. dd: '%d dagen',
  55707. w: 'één week',
  55708. ww: '%d weken',
  55709. M: 'één maand',
  55710. MM: '%d maanden',
  55711. y: 'één jaar',
  55712. yy: '%d jaar',
  55713. },
  55714. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  55715. ordinal: function (number) {
  55716. return (
  55717. number +
  55718. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  55719. );
  55720. },
  55721. week: {
  55722. dow: 1, // Monday is the first day of the week.
  55723. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55724. },
  55725. });
  55726. return nl;
  55727. })));
  55728. /***/ }),
  55729. /***/ 83877:
  55730. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55731. //! moment.js locale configuration
  55732. //! locale : Nynorsk [nn]
  55733. //! authors : https://github.com/mechuwind
  55734. //! Stephen Ramthun : https://github.com/stephenramthun
  55735. ;(function (global, factory) {
  55736. true ? factory(__webpack_require__(30381)) :
  55737. 0
  55738. }(this, (function (moment) { 'use strict';
  55739. //! moment.js locale configuration
  55740. var nn = moment.defineLocale('nn', {
  55741. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
  55742. '_'
  55743. ),
  55744. monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
  55745. '_'
  55746. ),
  55747. monthsParseExact: true,
  55748. weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
  55749. weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
  55750. weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
  55751. weekdaysParseExact: true,
  55752. longDateFormat: {
  55753. LT: 'HH:mm',
  55754. LTS: 'HH:mm:ss',
  55755. L: 'DD.MM.YYYY',
  55756. LL: 'D. MMMM YYYY',
  55757. LLL: 'D. MMMM YYYY [kl.] H:mm',
  55758. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
  55759. },
  55760. calendar: {
  55761. sameDay: '[I dag klokka] LT',
  55762. nextDay: '[I morgon klokka] LT',
  55763. nextWeek: 'dddd [klokka] LT',
  55764. lastDay: '[I går klokka] LT',
  55765. lastWeek: '[Føregåande] dddd [klokka] LT',
  55766. sameElse: 'L',
  55767. },
  55768. relativeTime: {
  55769. future: 'om %s',
  55770. past: '%s sidan',
  55771. s: 'nokre sekund',
  55772. ss: '%d sekund',
  55773. m: 'eit minutt',
  55774. mm: '%d minutt',
  55775. h: 'ein time',
  55776. hh: '%d timar',
  55777. d: 'ein dag',
  55778. dd: '%d dagar',
  55779. w: 'ei veke',
  55780. ww: '%d veker',
  55781. M: 'ein månad',
  55782. MM: '%d månader',
  55783. y: 'eit år',
  55784. yy: '%d år',
  55785. },
  55786. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55787. ordinal: '%d.',
  55788. week: {
  55789. dow: 1, // Monday is the first day of the week.
  55790. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55791. },
  55792. });
  55793. return nn;
  55794. })));
  55795. /***/ }),
  55796. /***/ 92135:
  55797. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55798. //! moment.js locale configuration
  55799. //! locale : Occitan, lengadocian dialecte [oc-lnc]
  55800. //! author : Quentin PAGÈS : https://github.com/Quenty31
  55801. ;(function (global, factory) {
  55802. true ? factory(__webpack_require__(30381)) :
  55803. 0
  55804. }(this, (function (moment) { 'use strict';
  55805. //! moment.js locale configuration
  55806. var ocLnc = moment.defineLocale('oc-lnc', {
  55807. months: {
  55808. standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
  55809. '_'
  55810. ),
  55811. format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
  55812. '_'
  55813. ),
  55814. isFormat: /D[oD]?(\s)+MMMM/,
  55815. },
  55816. monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
  55817. '_'
  55818. ),
  55819. monthsParseExact: true,
  55820. weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
  55821. '_'
  55822. ),
  55823. weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
  55824. weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
  55825. weekdaysParseExact: true,
  55826. longDateFormat: {
  55827. LT: 'H:mm',
  55828. LTS: 'H:mm:ss',
  55829. L: 'DD/MM/YYYY',
  55830. LL: 'D MMMM [de] YYYY',
  55831. ll: 'D MMM YYYY',
  55832. LLL: 'D MMMM [de] YYYY [a] H:mm',
  55833. lll: 'D MMM YYYY, H:mm',
  55834. LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
  55835. llll: 'ddd D MMM YYYY, H:mm',
  55836. },
  55837. calendar: {
  55838. sameDay: '[uèi a] LT',
  55839. nextDay: '[deman a] LT',
  55840. nextWeek: 'dddd [a] LT',
  55841. lastDay: '[ièr a] LT',
  55842. lastWeek: 'dddd [passat a] LT',
  55843. sameElse: 'L',
  55844. },
  55845. relativeTime: {
  55846. future: "d'aquí %s",
  55847. past: 'fa %s',
  55848. s: 'unas segondas',
  55849. ss: '%d segondas',
  55850. m: 'una minuta',
  55851. mm: '%d minutas',
  55852. h: 'una ora',
  55853. hh: '%d oras',
  55854. d: 'un jorn',
  55855. dd: '%d jorns',
  55856. M: 'un mes',
  55857. MM: '%d meses',
  55858. y: 'un an',
  55859. yy: '%d ans',
  55860. },
  55861. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  55862. ordinal: function (number, period) {
  55863. var output =
  55864. number === 1
  55865. ? 'r'
  55866. : number === 2
  55867. ? 'n'
  55868. : number === 3
  55869. ? 'r'
  55870. : number === 4
  55871. ? 't'
  55872. : 'è';
  55873. if (period === 'w' || period === 'W') {
  55874. output = 'a';
  55875. }
  55876. return number + output;
  55877. },
  55878. week: {
  55879. dow: 1, // Monday is the first day of the week.
  55880. doy: 4,
  55881. },
  55882. });
  55883. return ocLnc;
  55884. })));
  55885. /***/ }),
  55886. /***/ 15858:
  55887. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55888. //! moment.js locale configuration
  55889. //! locale : Punjabi (India) [pa-in]
  55890. //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
  55891. ;(function (global, factory) {
  55892. true ? factory(__webpack_require__(30381)) :
  55893. 0
  55894. }(this, (function (moment) { 'use strict';
  55895. //! moment.js locale configuration
  55896. var symbolMap = {
  55897. 1: '੧',
  55898. 2: '੨',
  55899. 3: '੩',
  55900. 4: '੪',
  55901. 5: '੫',
  55902. 6: '੬',
  55903. 7: '੭',
  55904. 8: '੮',
  55905. 9: '੯',
  55906. 0: '੦',
  55907. },
  55908. numberMap = {
  55909. '੧': '1',
  55910. '੨': '2',
  55911. '੩': '3',
  55912. '੪': '4',
  55913. '੫': '5',
  55914. '੬': '6',
  55915. '੭': '7',
  55916. '੮': '8',
  55917. '੯': '9',
  55918. '੦': '0',
  55919. };
  55920. var paIn = moment.defineLocale('pa-in', {
  55921. // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
  55922. months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
  55923. '_'
  55924. ),
  55925. monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
  55926. '_'
  55927. ),
  55928. weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
  55929. '_'
  55930. ),
  55931. weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  55932. weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  55933. longDateFormat: {
  55934. LT: 'A h:mm ਵਜੇ',
  55935. LTS: 'A h:mm:ss ਵਜੇ',
  55936. L: 'DD/MM/YYYY',
  55937. LL: 'D MMMM YYYY',
  55938. LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
  55939. LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
  55940. },
  55941. calendar: {
  55942. sameDay: '[ਅਜ] LT',
  55943. nextDay: '[ਕਲ] LT',
  55944. nextWeek: '[ਅਗਲਾ] dddd, LT',
  55945. lastDay: '[ਕਲ] LT',
  55946. lastWeek: '[ਪਿਛਲੇ] dddd, LT',
  55947. sameElse: 'L',
  55948. },
  55949. relativeTime: {
  55950. future: '%s ਵਿੱਚ',
  55951. past: '%s ਪਿਛਲੇ',
  55952. s: 'ਕੁਝ ਸਕਿੰਟ',
  55953. ss: '%d ਸਕਿੰਟ',
  55954. m: 'ਇਕ ਮਿੰਟ',
  55955. mm: '%d ਮਿੰਟ',
  55956. h: 'ਇੱਕ ਘੰਟਾ',
  55957. hh: '%d ਘੰਟੇ',
  55958. d: 'ਇੱਕ ਦਿਨ',
  55959. dd: '%d ਦਿਨ',
  55960. M: 'ਇੱਕ ਮਹੀਨਾ',
  55961. MM: '%d ਮਹੀਨੇ',
  55962. y: 'ਇੱਕ ਸਾਲ',
  55963. yy: '%d ਸਾਲ',
  55964. },
  55965. preparse: function (string) {
  55966. return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
  55967. return numberMap[match];
  55968. });
  55969. },
  55970. postformat: function (string) {
  55971. return string.replace(/\d/g, function (match) {
  55972. return symbolMap[match];
  55973. });
  55974. },
  55975. // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
  55976. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
  55977. meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
  55978. meridiemHour: function (hour, meridiem) {
  55979. if (hour === 12) {
  55980. hour = 0;
  55981. }
  55982. if (meridiem === 'ਰਾਤ') {
  55983. return hour < 4 ? hour : hour + 12;
  55984. } else if (meridiem === 'ਸਵੇਰ') {
  55985. return hour;
  55986. } else if (meridiem === 'ਦੁਪਹਿਰ') {
  55987. return hour >= 10 ? hour : hour + 12;
  55988. } else if (meridiem === 'ਸ਼ਾਮ') {
  55989. return hour + 12;
  55990. }
  55991. },
  55992. meridiem: function (hour, minute, isLower) {
  55993. if (hour < 4) {
  55994. return 'ਰਾਤ';
  55995. } else if (hour < 10) {
  55996. return 'ਸਵੇਰ';
  55997. } else if (hour < 17) {
  55998. return 'ਦੁਪਹਿਰ';
  55999. } else if (hour < 20) {
  56000. return 'ਸ਼ਾਮ';
  56001. } else {
  56002. return 'ਰਾਤ';
  56003. }
  56004. },
  56005. week: {
  56006. dow: 0, // Sunday is the first day of the week.
  56007. doy: 6, // The week that contains Jan 6th is the first week of the year.
  56008. },
  56009. });
  56010. return paIn;
  56011. })));
  56012. /***/ }),
  56013. /***/ 64495:
  56014. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56015. //! moment.js locale configuration
  56016. //! locale : Polish [pl]
  56017. //! author : Rafal Hirsz : https://github.com/evoL
  56018. ;(function (global, factory) {
  56019. true ? factory(__webpack_require__(30381)) :
  56020. 0
  56021. }(this, (function (moment) { 'use strict';
  56022. //! moment.js locale configuration
  56023. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
  56024. '_'
  56025. ),
  56026. monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
  56027. '_'
  56028. ),
  56029. monthsParse = [
  56030. /^sty/i,
  56031. /^lut/i,
  56032. /^mar/i,
  56033. /^kwi/i,
  56034. /^maj/i,
  56035. /^cze/i,
  56036. /^lip/i,
  56037. /^sie/i,
  56038. /^wrz/i,
  56039. /^paź/i,
  56040. /^lis/i,
  56041. /^gru/i,
  56042. ];
  56043. function plural(n) {
  56044. return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
  56045. }
  56046. function translate(number, withoutSuffix, key) {
  56047. var result = number + ' ';
  56048. switch (key) {
  56049. case 'ss':
  56050. return result + (plural(number) ? 'sekundy' : 'sekund');
  56051. case 'm':
  56052. return withoutSuffix ? 'minuta' : 'minutę';
  56053. case 'mm':
  56054. return result + (plural(number) ? 'minuty' : 'minut');
  56055. case 'h':
  56056. return withoutSuffix ? 'godzina' : 'godzinę';
  56057. case 'hh':
  56058. return result + (plural(number) ? 'godziny' : 'godzin');
  56059. case 'ww':
  56060. return result + (plural(number) ? 'tygodnie' : 'tygodni');
  56061. case 'MM':
  56062. return result + (plural(number) ? 'miesiące' : 'miesięcy');
  56063. case 'yy':
  56064. return result + (plural(number) ? 'lata' : 'lat');
  56065. }
  56066. }
  56067. var pl = moment.defineLocale('pl', {
  56068. months: function (momentToFormat, format) {
  56069. if (!momentToFormat) {
  56070. return monthsNominative;
  56071. } else if (/D MMMM/.test(format)) {
  56072. return monthsSubjective[momentToFormat.month()];
  56073. } else {
  56074. return monthsNominative[momentToFormat.month()];
  56075. }
  56076. },
  56077. monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  56078. monthsParse: monthsParse,
  56079. longMonthsParse: monthsParse,
  56080. shortMonthsParse: monthsParse,
  56081. weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(
  56082. '_'
  56083. ),
  56084. weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  56085. weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  56086. longDateFormat: {
  56087. LT: 'HH:mm',
  56088. LTS: 'HH:mm:ss',
  56089. L: 'DD.MM.YYYY',
  56090. LL: 'D MMMM YYYY',
  56091. LLL: 'D MMMM YYYY HH:mm',
  56092. LLLL: 'dddd, D MMMM YYYY HH:mm',
  56093. },
  56094. calendar: {
  56095. sameDay: '[Dziś o] LT',
  56096. nextDay: '[Jutro o] LT',
  56097. nextWeek: function () {
  56098. switch (this.day()) {
  56099. case 0:
  56100. return '[W niedzielę o] LT';
  56101. case 2:
  56102. return '[We wtorek o] LT';
  56103. case 3:
  56104. return '[W środę o] LT';
  56105. case 6:
  56106. return '[W sobotę o] LT';
  56107. default:
  56108. return '[W] dddd [o] LT';
  56109. }
  56110. },
  56111. lastDay: '[Wczoraj o] LT',
  56112. lastWeek: function () {
  56113. switch (this.day()) {
  56114. case 0:
  56115. return '[W zeszłą niedzielę o] LT';
  56116. case 3:
  56117. return '[W zeszłą środę o] LT';
  56118. case 6:
  56119. return '[W zeszłą sobotę o] LT';
  56120. default:
  56121. return '[W zeszły] dddd [o] LT';
  56122. }
  56123. },
  56124. sameElse: 'L',
  56125. },
  56126. relativeTime: {
  56127. future: 'za %s',
  56128. past: '%s temu',
  56129. s: 'kilka sekund',
  56130. ss: translate,
  56131. m: translate,
  56132. mm: translate,
  56133. h: translate,
  56134. hh: translate,
  56135. d: '1 dzień',
  56136. dd: '%d dni',
  56137. w: 'tydzień',
  56138. ww: translate,
  56139. M: 'miesiąc',
  56140. MM: translate,
  56141. y: 'rok',
  56142. yy: translate,
  56143. },
  56144. dayOfMonthOrdinalParse: /\d{1,2}\./,
  56145. ordinal: '%d.',
  56146. week: {
  56147. dow: 1, // Monday is the first day of the week.
  56148. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56149. },
  56150. });
  56151. return pl;
  56152. })));
  56153. /***/ }),
  56154. /***/ 57971:
  56155. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56156. //! moment.js locale configuration
  56157. //! locale : Portuguese (Brazil) [pt-br]
  56158. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  56159. ;(function (global, factory) {
  56160. true ? factory(__webpack_require__(30381)) :
  56161. 0
  56162. }(this, (function (moment) { 'use strict';
  56163. //! moment.js locale configuration
  56164. var ptBr = moment.defineLocale('pt-br', {
  56165. months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
  56166. '_'
  56167. ),
  56168. monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  56169. weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
  56170. '_'
  56171. ),
  56172. weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
  56173. weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
  56174. weekdaysParseExact: true,
  56175. longDateFormat: {
  56176. LT: 'HH:mm',
  56177. LTS: 'HH:mm:ss',
  56178. L: 'DD/MM/YYYY',
  56179. LL: 'D [de] MMMM [de] YYYY',
  56180. LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
  56181. LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
  56182. },
  56183. calendar: {
  56184. sameDay: '[Hoje às] LT',
  56185. nextDay: '[Amanhã às] LT',
  56186. nextWeek: 'dddd [às] LT',
  56187. lastDay: '[Ontem às] LT',
  56188. lastWeek: function () {
  56189. return this.day() === 0 || this.day() === 6
  56190. ? '[Último] dddd [às] LT' // Saturday + Sunday
  56191. : '[Última] dddd [às] LT'; // Monday - Friday
  56192. },
  56193. sameElse: 'L',
  56194. },
  56195. relativeTime: {
  56196. future: 'em %s',
  56197. past: 'há %s',
  56198. s: 'poucos segundos',
  56199. ss: '%d segundos',
  56200. m: 'um minuto',
  56201. mm: '%d minutos',
  56202. h: 'uma hora',
  56203. hh: '%d horas',
  56204. d: 'um dia',
  56205. dd: '%d dias',
  56206. M: 'um mês',
  56207. MM: '%d meses',
  56208. y: 'um ano',
  56209. yy: '%d anos',
  56210. },
  56211. dayOfMonthOrdinalParse: /\d{1,2}º/,
  56212. ordinal: '%dº',
  56213. invalidDate: 'Data inválida',
  56214. });
  56215. return ptBr;
  56216. })));
  56217. /***/ }),
  56218. /***/ 89520:
  56219. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56220. //! moment.js locale configuration
  56221. //! locale : Portuguese [pt]
  56222. //! author : Jefferson : https://github.com/jalex79
  56223. ;(function (global, factory) {
  56224. true ? factory(__webpack_require__(30381)) :
  56225. 0
  56226. }(this, (function (moment) { 'use strict';
  56227. //! moment.js locale configuration
  56228. var pt = moment.defineLocale('pt', {
  56229. months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
  56230. '_'
  56231. ),
  56232. monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  56233. weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
  56234. '_'
  56235. ),
  56236. weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  56237. weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  56238. weekdaysParseExact: true,
  56239. longDateFormat: {
  56240. LT: 'HH:mm',
  56241. LTS: 'HH:mm:ss',
  56242. L: 'DD/MM/YYYY',
  56243. LL: 'D [de] MMMM [de] YYYY',
  56244. LLL: 'D [de] MMMM [de] YYYY HH:mm',
  56245. LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
  56246. },
  56247. calendar: {
  56248. sameDay: '[Hoje às] LT',
  56249. nextDay: '[Amanhã às] LT',
  56250. nextWeek: 'dddd [às] LT',
  56251. lastDay: '[Ontem às] LT',
  56252. lastWeek: function () {
  56253. return this.day() === 0 || this.day() === 6
  56254. ? '[Último] dddd [às] LT' // Saturday + Sunday
  56255. : '[Última] dddd [às] LT'; // Monday - Friday
  56256. },
  56257. sameElse: 'L',
  56258. },
  56259. relativeTime: {
  56260. future: 'em %s',
  56261. past: 'há %s',
  56262. s: 'segundos',
  56263. ss: '%d segundos',
  56264. m: 'um minuto',
  56265. mm: '%d minutos',
  56266. h: 'uma hora',
  56267. hh: '%d horas',
  56268. d: 'um dia',
  56269. dd: '%d dias',
  56270. w: 'uma semana',
  56271. ww: '%d semanas',
  56272. M: 'um mês',
  56273. MM: '%d meses',
  56274. y: 'um ano',
  56275. yy: '%d anos',
  56276. },
  56277. dayOfMonthOrdinalParse: /\d{1,2}º/,
  56278. ordinal: '%dº',
  56279. week: {
  56280. dow: 1, // Monday is the first day of the week.
  56281. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56282. },
  56283. });
  56284. return pt;
  56285. })));
  56286. /***/ }),
  56287. /***/ 96459:
  56288. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56289. //! moment.js locale configuration
  56290. //! locale : Romanian [ro]
  56291. //! author : Vlad Gurdiga : https://github.com/gurdiga
  56292. //! author : Valentin Agachi : https://github.com/avaly
  56293. //! author : Emanuel Cepoi : https://github.com/cepem
  56294. ;(function (global, factory) {
  56295. true ? factory(__webpack_require__(30381)) :
  56296. 0
  56297. }(this, (function (moment) { 'use strict';
  56298. //! moment.js locale configuration
  56299. function relativeTimeWithPlural(number, withoutSuffix, key) {
  56300. var format = {
  56301. ss: 'secunde',
  56302. mm: 'minute',
  56303. hh: 'ore',
  56304. dd: 'zile',
  56305. ww: 'săptămâni',
  56306. MM: 'luni',
  56307. yy: 'ani',
  56308. },
  56309. separator = ' ';
  56310. if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
  56311. separator = ' de ';
  56312. }
  56313. return number + separator + format[key];
  56314. }
  56315. var ro = moment.defineLocale('ro', {
  56316. months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
  56317. '_'
  56318. ),
  56319. monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
  56320. '_'
  56321. ),
  56322. monthsParseExact: true,
  56323. weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  56324. weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  56325. weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  56326. longDateFormat: {
  56327. LT: 'H:mm',
  56328. LTS: 'H:mm:ss',
  56329. L: 'DD.MM.YYYY',
  56330. LL: 'D MMMM YYYY',
  56331. LLL: 'D MMMM YYYY H:mm',
  56332. LLLL: 'dddd, D MMMM YYYY H:mm',
  56333. },
  56334. calendar: {
  56335. sameDay: '[azi la] LT',
  56336. nextDay: '[mâine la] LT',
  56337. nextWeek: 'dddd [la] LT',
  56338. lastDay: '[ieri la] LT',
  56339. lastWeek: '[fosta] dddd [la] LT',
  56340. sameElse: 'L',
  56341. },
  56342. relativeTime: {
  56343. future: 'peste %s',
  56344. past: '%s în urmă',
  56345. s: 'câteva secunde',
  56346. ss: relativeTimeWithPlural,
  56347. m: 'un minut',
  56348. mm: relativeTimeWithPlural,
  56349. h: 'o oră',
  56350. hh: relativeTimeWithPlural,
  56351. d: 'o zi',
  56352. dd: relativeTimeWithPlural,
  56353. w: 'o săptămână',
  56354. ww: relativeTimeWithPlural,
  56355. M: 'o lună',
  56356. MM: relativeTimeWithPlural,
  56357. y: 'un an',
  56358. yy: relativeTimeWithPlural,
  56359. },
  56360. week: {
  56361. dow: 1, // Monday is the first day of the week.
  56362. doy: 7, // The week that contains Jan 7th is the first week of the year.
  56363. },
  56364. });
  56365. return ro;
  56366. })));
  56367. /***/ }),
  56368. /***/ 21793:
  56369. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56370. //! moment.js locale configuration
  56371. //! locale : Russian [ru]
  56372. //! author : Viktorminator : https://github.com/Viktorminator
  56373. //! author : Menelion Elensúle : https://github.com/Oire
  56374. //! author : Коренберг Марк : https://github.com/socketpair
  56375. ;(function (global, factory) {
  56376. true ? factory(__webpack_require__(30381)) :
  56377. 0
  56378. }(this, (function (moment) { 'use strict';
  56379. //! moment.js locale configuration
  56380. function plural(word, num) {
  56381. var forms = word.split('_');
  56382. return num % 10 === 1 && num % 100 !== 11
  56383. ? forms[0]
  56384. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  56385. ? forms[1]
  56386. : forms[2];
  56387. }
  56388. function relativeTimeWithPlural(number, withoutSuffix, key) {
  56389. var format = {
  56390. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  56391. mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  56392. hh: 'час_часа_часов',
  56393. dd: 'день_дня_дней',
  56394. ww: 'неделя_недели_недель',
  56395. MM: 'месяц_месяца_месяцев',
  56396. yy: 'год_года_лет',
  56397. };
  56398. if (key === 'm') {
  56399. return withoutSuffix ? 'минута' : 'минуту';
  56400. } else {
  56401. return number + ' ' + plural(format[key], +number);
  56402. }
  56403. }
  56404. var monthsParse = [
  56405. /^янв/i,
  56406. /^фев/i,
  56407. /^мар/i,
  56408. /^апр/i,
  56409. /^ма[йя]/i,
  56410. /^июн/i,
  56411. /^июл/i,
  56412. /^авг/i,
  56413. /^сен/i,
  56414. /^окт/i,
  56415. /^ноя/i,
  56416. /^дек/i,
  56417. ];
  56418. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  56419. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  56420. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  56421. var ru = moment.defineLocale('ru', {
  56422. months: {
  56423. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
  56424. '_'
  56425. ),
  56426. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
  56427. '_'
  56428. ),
  56429. },
  56430. monthsShort: {
  56431. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
  56432. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
  56433. '_'
  56434. ),
  56435. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
  56436. '_'
  56437. ),
  56438. },
  56439. weekdays: {
  56440. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
  56441. '_'
  56442. ),
  56443. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
  56444. '_'
  56445. ),
  56446. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
  56447. },
  56448. weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  56449. weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  56450. monthsParse: monthsParse,
  56451. longMonthsParse: monthsParse,
  56452. shortMonthsParse: monthsParse,
  56453. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  56454. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  56455. // копия предыдущего
  56456. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  56457. // полные названия с падежами
  56458. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  56459. // Выражение, которое соответствует только сокращённым формам
  56460. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  56461. longDateFormat: {
  56462. LT: 'H:mm',
  56463. LTS: 'H:mm:ss',
  56464. L: 'DD.MM.YYYY',
  56465. LL: 'D MMMM YYYY г.',
  56466. LLL: 'D MMMM YYYY г., H:mm',
  56467. LLLL: 'dddd, D MMMM YYYY г., H:mm',
  56468. },
  56469. calendar: {
  56470. sameDay: '[Сегодня, в] LT',
  56471. nextDay: '[Завтра, в] LT',
  56472. lastDay: '[Вчера, в] LT',
  56473. nextWeek: function (now) {
  56474. if (now.week() !== this.week()) {
  56475. switch (this.day()) {
  56476. case 0:
  56477. return '[В следующее] dddd, [в] LT';
  56478. case 1:
  56479. case 2:
  56480. case 4:
  56481. return '[В следующий] dddd, [в] LT';
  56482. case 3:
  56483. case 5:
  56484. case 6:
  56485. return '[В следующую] dddd, [в] LT';
  56486. }
  56487. } else {
  56488. if (this.day() === 2) {
  56489. return '[Во] dddd, [в] LT';
  56490. } else {
  56491. return '[В] dddd, [в] LT';
  56492. }
  56493. }
  56494. },
  56495. lastWeek: function (now) {
  56496. if (now.week() !== this.week()) {
  56497. switch (this.day()) {
  56498. case 0:
  56499. return '[В прошлое] dddd, [в] LT';
  56500. case 1:
  56501. case 2:
  56502. case 4:
  56503. return '[В прошлый] dddd, [в] LT';
  56504. case 3:
  56505. case 5:
  56506. case 6:
  56507. return '[В прошлую] dddd, [в] LT';
  56508. }
  56509. } else {
  56510. if (this.day() === 2) {
  56511. return '[Во] dddd, [в] LT';
  56512. } else {
  56513. return '[В] dddd, [в] LT';
  56514. }
  56515. }
  56516. },
  56517. sameElse: 'L',
  56518. },
  56519. relativeTime: {
  56520. future: 'через %s',
  56521. past: '%s назад',
  56522. s: 'несколько секунд',
  56523. ss: relativeTimeWithPlural,
  56524. m: relativeTimeWithPlural,
  56525. mm: relativeTimeWithPlural,
  56526. h: 'час',
  56527. hh: relativeTimeWithPlural,
  56528. d: 'день',
  56529. dd: relativeTimeWithPlural,
  56530. w: 'неделя',
  56531. ww: relativeTimeWithPlural,
  56532. M: 'месяц',
  56533. MM: relativeTimeWithPlural,
  56534. y: 'год',
  56535. yy: relativeTimeWithPlural,
  56536. },
  56537. meridiemParse: /ночи|утра|дня|вечера/i,
  56538. isPM: function (input) {
  56539. return /^(дня|вечера)$/.test(input);
  56540. },
  56541. meridiem: function (hour, minute, isLower) {
  56542. if (hour < 4) {
  56543. return 'ночи';
  56544. } else if (hour < 12) {
  56545. return 'утра';
  56546. } else if (hour < 17) {
  56547. return 'дня';
  56548. } else {
  56549. return 'вечера';
  56550. }
  56551. },
  56552. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  56553. ordinal: function (number, period) {
  56554. switch (period) {
  56555. case 'M':
  56556. case 'd':
  56557. case 'DDD':
  56558. return number + '-й';
  56559. case 'D':
  56560. return number + '-го';
  56561. case 'w':
  56562. case 'W':
  56563. return number + '-я';
  56564. default:
  56565. return number;
  56566. }
  56567. },
  56568. week: {
  56569. dow: 1, // Monday is the first day of the week.
  56570. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56571. },
  56572. });
  56573. return ru;
  56574. })));
  56575. /***/ }),
  56576. /***/ 40950:
  56577. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56578. //! moment.js locale configuration
  56579. //! locale : Sindhi [sd]
  56580. //! author : Narain Sagar : https://github.com/narainsagar
  56581. ;(function (global, factory) {
  56582. true ? factory(__webpack_require__(30381)) :
  56583. 0
  56584. }(this, (function (moment) { 'use strict';
  56585. //! moment.js locale configuration
  56586. var months = [
  56587. 'جنوري',
  56588. 'فيبروري',
  56589. 'مارچ',
  56590. 'اپريل',
  56591. 'مئي',
  56592. 'جون',
  56593. 'جولاءِ',
  56594. 'آگسٽ',
  56595. 'سيپٽمبر',
  56596. 'آڪٽوبر',
  56597. 'نومبر',
  56598. 'ڊسمبر',
  56599. ],
  56600. days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
  56601. var sd = moment.defineLocale('sd', {
  56602. months: months,
  56603. monthsShort: months,
  56604. weekdays: days,
  56605. weekdaysShort: days,
  56606. weekdaysMin: days,
  56607. longDateFormat: {
  56608. LT: 'HH:mm',
  56609. LTS: 'HH:mm:ss',
  56610. L: 'DD/MM/YYYY',
  56611. LL: 'D MMMM YYYY',
  56612. LLL: 'D MMMM YYYY HH:mm',
  56613. LLLL: 'dddd، D MMMM YYYY HH:mm',
  56614. },
  56615. meridiemParse: /صبح|شام/,
  56616. isPM: function (input) {
  56617. return 'شام' === input;
  56618. },
  56619. meridiem: function (hour, minute, isLower) {
  56620. if (hour < 12) {
  56621. return 'صبح';
  56622. }
  56623. return 'شام';
  56624. },
  56625. calendar: {
  56626. sameDay: '[اڄ] LT',
  56627. nextDay: '[سڀاڻي] LT',
  56628. nextWeek: 'dddd [اڳين هفتي تي] LT',
  56629. lastDay: '[ڪالهه] LT',
  56630. lastWeek: '[گزريل هفتي] dddd [تي] LT',
  56631. sameElse: 'L',
  56632. },
  56633. relativeTime: {
  56634. future: '%s پوء',
  56635. past: '%s اڳ',
  56636. s: 'چند سيڪنڊ',
  56637. ss: '%d سيڪنڊ',
  56638. m: 'هڪ منٽ',
  56639. mm: '%d منٽ',
  56640. h: 'هڪ ڪلاڪ',
  56641. hh: '%d ڪلاڪ',
  56642. d: 'هڪ ڏينهن',
  56643. dd: '%d ڏينهن',
  56644. M: 'هڪ مهينو',
  56645. MM: '%d مهينا',
  56646. y: 'هڪ سال',
  56647. yy: '%d سال',
  56648. },
  56649. preparse: function (string) {
  56650. return string.replace(/،/g, ',');
  56651. },
  56652. postformat: function (string) {
  56653. return string.replace(/,/g, '،');
  56654. },
  56655. week: {
  56656. dow: 1, // Monday is the first day of the week.
  56657. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56658. },
  56659. });
  56660. return sd;
  56661. })));
  56662. /***/ }),
  56663. /***/ 10490:
  56664. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56665. //! moment.js locale configuration
  56666. //! locale : Northern Sami [se]
  56667. //! authors : Bård Rolstad Henriksen : https://github.com/karamell
  56668. ;(function (global, factory) {
  56669. true ? factory(__webpack_require__(30381)) :
  56670. 0
  56671. }(this, (function (moment) { 'use strict';
  56672. //! moment.js locale configuration
  56673. var se = moment.defineLocale('se', {
  56674. months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
  56675. '_'
  56676. ),
  56677. monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split(
  56678. '_'
  56679. ),
  56680. weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
  56681. '_'
  56682. ),
  56683. weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
  56684. weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
  56685. longDateFormat: {
  56686. LT: 'HH:mm',
  56687. LTS: 'HH:mm:ss',
  56688. L: 'DD.MM.YYYY',
  56689. LL: 'MMMM D. [b.] YYYY',
  56690. LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
  56691. LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
  56692. },
  56693. calendar: {
  56694. sameDay: '[otne ti] LT',
  56695. nextDay: '[ihttin ti] LT',
  56696. nextWeek: 'dddd [ti] LT',
  56697. lastDay: '[ikte ti] LT',
  56698. lastWeek: '[ovddit] dddd [ti] LT',
  56699. sameElse: 'L',
  56700. },
  56701. relativeTime: {
  56702. future: '%s geažes',
  56703. past: 'maŋit %s',
  56704. s: 'moadde sekunddat',
  56705. ss: '%d sekunddat',
  56706. m: 'okta minuhta',
  56707. mm: '%d minuhtat',
  56708. h: 'okta diimmu',
  56709. hh: '%d diimmut',
  56710. d: 'okta beaivi',
  56711. dd: '%d beaivvit',
  56712. M: 'okta mánnu',
  56713. MM: '%d mánut',
  56714. y: 'okta jahki',
  56715. yy: '%d jagit',
  56716. },
  56717. dayOfMonthOrdinalParse: /\d{1,2}\./,
  56718. ordinal: '%d.',
  56719. week: {
  56720. dow: 1, // Monday is the first day of the week.
  56721. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56722. },
  56723. });
  56724. return se;
  56725. })));
  56726. /***/ }),
  56727. /***/ 90124:
  56728. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56729. //! moment.js locale configuration
  56730. //! locale : Sinhalese [si]
  56731. //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
  56732. ;(function (global, factory) {
  56733. true ? factory(__webpack_require__(30381)) :
  56734. 0
  56735. }(this, (function (moment) { 'use strict';
  56736. //! moment.js locale configuration
  56737. /*jshint -W100*/
  56738. var si = moment.defineLocale('si', {
  56739. months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
  56740. '_'
  56741. ),
  56742. monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
  56743. '_'
  56744. ),
  56745. weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
  56746. '_'
  56747. ),
  56748. weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
  56749. weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
  56750. weekdaysParseExact: true,
  56751. longDateFormat: {
  56752. LT: 'a h:mm',
  56753. LTS: 'a h:mm:ss',
  56754. L: 'YYYY/MM/DD',
  56755. LL: 'YYYY MMMM D',
  56756. LLL: 'YYYY MMMM D, a h:mm',
  56757. LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
  56758. },
  56759. calendar: {
  56760. sameDay: '[අද] LT[ට]',
  56761. nextDay: '[හෙට] LT[ට]',
  56762. nextWeek: 'dddd LT[ට]',
  56763. lastDay: '[ඊයේ] LT[ට]',
  56764. lastWeek: '[පසුගිය] dddd LT[ට]',
  56765. sameElse: 'L',
  56766. },
  56767. relativeTime: {
  56768. future: '%sකින්',
  56769. past: '%sකට පෙර',
  56770. s: 'තත්පර කිහිපය',
  56771. ss: 'තත්පර %d',
  56772. m: 'මිනිත්තුව',
  56773. mm: 'මිනිත්තු %d',
  56774. h: 'පැය',
  56775. hh: 'පැය %d',
  56776. d: 'දිනය',
  56777. dd: 'දින %d',
  56778. M: 'මාසය',
  56779. MM: 'මාස %d',
  56780. y: 'වසර',
  56781. yy: 'වසර %d',
  56782. },
  56783. dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
  56784. ordinal: function (number) {
  56785. return number + ' වැනි';
  56786. },
  56787. meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
  56788. isPM: function (input) {
  56789. return input === 'ප.ව.' || input === 'පස් වරු';
  56790. },
  56791. meridiem: function (hours, minutes, isLower) {
  56792. if (hours > 11) {
  56793. return isLower ? 'ප.ව.' : 'පස් වරු';
  56794. } else {
  56795. return isLower ? 'පෙ.ව.' : 'පෙර වරු';
  56796. }
  56797. },
  56798. });
  56799. return si;
  56800. })));
  56801. /***/ }),
  56802. /***/ 64249:
  56803. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56804. //! moment.js locale configuration
  56805. //! locale : Slovak [sk]
  56806. //! author : Martin Minka : https://github.com/k2s
  56807. //! based on work of petrbela : https://github.com/petrbela
  56808. ;(function (global, factory) {
  56809. true ? factory(__webpack_require__(30381)) :
  56810. 0
  56811. }(this, (function (moment) { 'use strict';
  56812. //! moment.js locale configuration
  56813. var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
  56814. '_'
  56815. ),
  56816. monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  56817. function plural(n) {
  56818. return n > 1 && n < 5;
  56819. }
  56820. function translate(number, withoutSuffix, key, isFuture) {
  56821. var result = number + ' ';
  56822. switch (key) {
  56823. case 's': // a few seconds / in a few seconds / a few seconds ago
  56824. return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
  56825. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  56826. if (withoutSuffix || isFuture) {
  56827. return result + (plural(number) ? 'sekundy' : 'sekúnd');
  56828. } else {
  56829. return result + 'sekundami';
  56830. }
  56831. case 'm': // a minute / in a minute / a minute ago
  56832. return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
  56833. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  56834. if (withoutSuffix || isFuture) {
  56835. return result + (plural(number) ? 'minúty' : 'minút');
  56836. } else {
  56837. return result + 'minútami';
  56838. }
  56839. case 'h': // an hour / in an hour / an hour ago
  56840. return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
  56841. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  56842. if (withoutSuffix || isFuture) {
  56843. return result + (plural(number) ? 'hodiny' : 'hodín');
  56844. } else {
  56845. return result + 'hodinami';
  56846. }
  56847. case 'd': // a day / in a day / a day ago
  56848. return withoutSuffix || isFuture ? 'deň' : 'dňom';
  56849. case 'dd': // 9 days / in 9 days / 9 days ago
  56850. if (withoutSuffix || isFuture) {
  56851. return result + (plural(number) ? 'dni' : 'dní');
  56852. } else {
  56853. return result + 'dňami';
  56854. }
  56855. case 'M': // a month / in a month / a month ago
  56856. return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
  56857. case 'MM': // 9 months / in 9 months / 9 months ago
  56858. if (withoutSuffix || isFuture) {
  56859. return result + (plural(number) ? 'mesiace' : 'mesiacov');
  56860. } else {
  56861. return result + 'mesiacmi';
  56862. }
  56863. case 'y': // a year / in a year / a year ago
  56864. return withoutSuffix || isFuture ? 'rok' : 'rokom';
  56865. case 'yy': // 9 years / in 9 years / 9 years ago
  56866. if (withoutSuffix || isFuture) {
  56867. return result + (plural(number) ? 'roky' : 'rokov');
  56868. } else {
  56869. return result + 'rokmi';
  56870. }
  56871. }
  56872. }
  56873. var sk = moment.defineLocale('sk', {
  56874. months: months,
  56875. monthsShort: monthsShort,
  56876. weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  56877. weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
  56878. weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
  56879. longDateFormat: {
  56880. LT: 'H:mm',
  56881. LTS: 'H:mm:ss',
  56882. L: 'DD.MM.YYYY',
  56883. LL: 'D. MMMM YYYY',
  56884. LLL: 'D. MMMM YYYY H:mm',
  56885. LLLL: 'dddd D. MMMM YYYY H:mm',
  56886. },
  56887. calendar: {
  56888. sameDay: '[dnes o] LT',
  56889. nextDay: '[zajtra o] LT',
  56890. nextWeek: function () {
  56891. switch (this.day()) {
  56892. case 0:
  56893. return '[v nedeľu o] LT';
  56894. case 1:
  56895. case 2:
  56896. return '[v] dddd [o] LT';
  56897. case 3:
  56898. return '[v stredu o] LT';
  56899. case 4:
  56900. return '[vo štvrtok o] LT';
  56901. case 5:
  56902. return '[v piatok o] LT';
  56903. case 6:
  56904. return '[v sobotu o] LT';
  56905. }
  56906. },
  56907. lastDay: '[včera o] LT',
  56908. lastWeek: function () {
  56909. switch (this.day()) {
  56910. case 0:
  56911. return '[minulú nedeľu o] LT';
  56912. case 1:
  56913. case 2:
  56914. return '[minulý] dddd [o] LT';
  56915. case 3:
  56916. return '[minulú stredu o] LT';
  56917. case 4:
  56918. case 5:
  56919. return '[minulý] dddd [o] LT';
  56920. case 6:
  56921. return '[minulú sobotu o] LT';
  56922. }
  56923. },
  56924. sameElse: 'L',
  56925. },
  56926. relativeTime: {
  56927. future: 'za %s',
  56928. past: 'pred %s',
  56929. s: translate,
  56930. ss: translate,
  56931. m: translate,
  56932. mm: translate,
  56933. h: translate,
  56934. hh: translate,
  56935. d: translate,
  56936. dd: translate,
  56937. M: translate,
  56938. MM: translate,
  56939. y: translate,
  56940. yy: translate,
  56941. },
  56942. dayOfMonthOrdinalParse: /\d{1,2}\./,
  56943. ordinal: '%d.',
  56944. week: {
  56945. dow: 1, // Monday is the first day of the week.
  56946. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56947. },
  56948. });
  56949. return sk;
  56950. })));
  56951. /***/ }),
  56952. /***/ 34082:
  56953. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56954. //! moment.js locale configuration
  56955. //! locale : Slovenian [sl]
  56956. //! author : Robert Sedovšek : https://github.com/sedovsek
  56957. ;(function (global, factory) {
  56958. true ? factory(__webpack_require__(30381)) :
  56959. 0
  56960. }(this, (function (moment) { 'use strict';
  56961. //! moment.js locale configuration
  56962. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  56963. var result = number + ' ';
  56964. switch (key) {
  56965. case 's':
  56966. return withoutSuffix || isFuture
  56967. ? 'nekaj sekund'
  56968. : 'nekaj sekundami';
  56969. case 'ss':
  56970. if (number === 1) {
  56971. result += withoutSuffix ? 'sekundo' : 'sekundi';
  56972. } else if (number === 2) {
  56973. result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
  56974. } else if (number < 5) {
  56975. result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
  56976. } else {
  56977. result += 'sekund';
  56978. }
  56979. return result;
  56980. case 'm':
  56981. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  56982. case 'mm':
  56983. if (number === 1) {
  56984. result += withoutSuffix ? 'minuta' : 'minuto';
  56985. } else if (number === 2) {
  56986. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  56987. } else if (number < 5) {
  56988. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  56989. } else {
  56990. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  56991. }
  56992. return result;
  56993. case 'h':
  56994. return withoutSuffix ? 'ena ura' : 'eno uro';
  56995. case 'hh':
  56996. if (number === 1) {
  56997. result += withoutSuffix ? 'ura' : 'uro';
  56998. } else if (number === 2) {
  56999. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  57000. } else if (number < 5) {
  57001. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  57002. } else {
  57003. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  57004. }
  57005. return result;
  57006. case 'd':
  57007. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  57008. case 'dd':
  57009. if (number === 1) {
  57010. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  57011. } else if (number === 2) {
  57012. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  57013. } else {
  57014. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  57015. }
  57016. return result;
  57017. case 'M':
  57018. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  57019. case 'MM':
  57020. if (number === 1) {
  57021. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  57022. } else if (number === 2) {
  57023. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  57024. } else if (number < 5) {
  57025. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  57026. } else {
  57027. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  57028. }
  57029. return result;
  57030. case 'y':
  57031. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  57032. case 'yy':
  57033. if (number === 1) {
  57034. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  57035. } else if (number === 2) {
  57036. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  57037. } else if (number < 5) {
  57038. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  57039. } else {
  57040. result += withoutSuffix || isFuture ? 'let' : 'leti';
  57041. }
  57042. return result;
  57043. }
  57044. }
  57045. var sl = moment.defineLocale('sl', {
  57046. months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
  57047. '_'
  57048. ),
  57049. monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
  57050. '_'
  57051. ),
  57052. monthsParseExact: true,
  57053. weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  57054. weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  57055. weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
  57056. weekdaysParseExact: true,
  57057. longDateFormat: {
  57058. LT: 'H:mm',
  57059. LTS: 'H:mm:ss',
  57060. L: 'DD. MM. YYYY',
  57061. LL: 'D. MMMM YYYY',
  57062. LLL: 'D. MMMM YYYY H:mm',
  57063. LLLL: 'dddd, D. MMMM YYYY H:mm',
  57064. },
  57065. calendar: {
  57066. sameDay: '[danes ob] LT',
  57067. nextDay: '[jutri ob] LT',
  57068. nextWeek: function () {
  57069. switch (this.day()) {
  57070. case 0:
  57071. return '[v] [nedeljo] [ob] LT';
  57072. case 3:
  57073. return '[v] [sredo] [ob] LT';
  57074. case 6:
  57075. return '[v] [soboto] [ob] LT';
  57076. case 1:
  57077. case 2:
  57078. case 4:
  57079. case 5:
  57080. return '[v] dddd [ob] LT';
  57081. }
  57082. },
  57083. lastDay: '[včeraj ob] LT',
  57084. lastWeek: function () {
  57085. switch (this.day()) {
  57086. case 0:
  57087. return '[prejšnjo] [nedeljo] [ob] LT';
  57088. case 3:
  57089. return '[prejšnjo] [sredo] [ob] LT';
  57090. case 6:
  57091. return '[prejšnjo] [soboto] [ob] LT';
  57092. case 1:
  57093. case 2:
  57094. case 4:
  57095. case 5:
  57096. return '[prejšnji] dddd [ob] LT';
  57097. }
  57098. },
  57099. sameElse: 'L',
  57100. },
  57101. relativeTime: {
  57102. future: 'čez %s',
  57103. past: 'pred %s',
  57104. s: processRelativeTime,
  57105. ss: processRelativeTime,
  57106. m: processRelativeTime,
  57107. mm: processRelativeTime,
  57108. h: processRelativeTime,
  57109. hh: processRelativeTime,
  57110. d: processRelativeTime,
  57111. dd: processRelativeTime,
  57112. M: processRelativeTime,
  57113. MM: processRelativeTime,
  57114. y: processRelativeTime,
  57115. yy: processRelativeTime,
  57116. },
  57117. dayOfMonthOrdinalParse: /\d{1,2}\./,
  57118. ordinal: '%d.',
  57119. week: {
  57120. dow: 1, // Monday is the first day of the week.
  57121. doy: 7, // The week that contains Jan 7th is the first week of the year.
  57122. },
  57123. });
  57124. return sl;
  57125. })));
  57126. /***/ }),
  57127. /***/ 51104:
  57128. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57129. //! moment.js locale configuration
  57130. //! locale : Albanian [sq]
  57131. //! author : Flakërim Ismani : https://github.com/flakerimi
  57132. //! author : Menelion Elensúle : https://github.com/Oire
  57133. //! author : Oerd Cukalla : https://github.com/oerd
  57134. ;(function (global, factory) {
  57135. true ? factory(__webpack_require__(30381)) :
  57136. 0
  57137. }(this, (function (moment) { 'use strict';
  57138. //! moment.js locale configuration
  57139. var sq = moment.defineLocale('sq', {
  57140. months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
  57141. '_'
  57142. ),
  57143. monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
  57144. weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
  57145. '_'
  57146. ),
  57147. weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
  57148. weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
  57149. weekdaysParseExact: true,
  57150. meridiemParse: /PD|MD/,
  57151. isPM: function (input) {
  57152. return input.charAt(0) === 'M';
  57153. },
  57154. meridiem: function (hours, minutes, isLower) {
  57155. return hours < 12 ? 'PD' : 'MD';
  57156. },
  57157. longDateFormat: {
  57158. LT: 'HH:mm',
  57159. LTS: 'HH:mm:ss',
  57160. L: 'DD/MM/YYYY',
  57161. LL: 'D MMMM YYYY',
  57162. LLL: 'D MMMM YYYY HH:mm',
  57163. LLLL: 'dddd, D MMMM YYYY HH:mm',
  57164. },
  57165. calendar: {
  57166. sameDay: '[Sot në] LT',
  57167. nextDay: '[Nesër në] LT',
  57168. nextWeek: 'dddd [në] LT',
  57169. lastDay: '[Dje në] LT',
  57170. lastWeek: 'dddd [e kaluar në] LT',
  57171. sameElse: 'L',
  57172. },
  57173. relativeTime: {
  57174. future: 'në %s',
  57175. past: '%s më parë',
  57176. s: 'disa sekonda',
  57177. ss: '%d sekonda',
  57178. m: 'një minutë',
  57179. mm: '%d minuta',
  57180. h: 'një orë',
  57181. hh: '%d orë',
  57182. d: 'një ditë',
  57183. dd: '%d ditë',
  57184. M: 'një muaj',
  57185. MM: '%d muaj',
  57186. y: 'një vit',
  57187. yy: '%d vite',
  57188. },
  57189. dayOfMonthOrdinalParse: /\d{1,2}\./,
  57190. ordinal: '%d.',
  57191. week: {
  57192. dow: 1, // Monday is the first day of the week.
  57193. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57194. },
  57195. });
  57196. return sq;
  57197. })));
  57198. /***/ }),
  57199. /***/ 79915:
  57200. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57201. //! moment.js locale configuration
  57202. //! locale : Serbian Cyrillic [sr-cyrl]
  57203. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  57204. //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
  57205. ;(function (global, factory) {
  57206. true ? factory(__webpack_require__(30381)) :
  57207. 0
  57208. }(this, (function (moment) { 'use strict';
  57209. //! moment.js locale configuration
  57210. var translator = {
  57211. words: {
  57212. //Different grammatical cases
  57213. ss: ['секунда', 'секунде', 'секунди'],
  57214. m: ['један минут', 'једне минуте'],
  57215. mm: ['минут', 'минуте', 'минута'],
  57216. h: ['један сат', 'једног сата'],
  57217. hh: ['сат', 'сата', 'сати'],
  57218. dd: ['дан', 'дана', 'дана'],
  57219. MM: ['месец', 'месеца', 'месеци'],
  57220. yy: ['година', 'године', 'година'],
  57221. },
  57222. correctGrammaticalCase: function (number, wordKey) {
  57223. return number === 1
  57224. ? wordKey[0]
  57225. : number >= 2 && number <= 4
  57226. ? wordKey[1]
  57227. : wordKey[2];
  57228. },
  57229. translate: function (number, withoutSuffix, key) {
  57230. var wordKey = translator.words[key];
  57231. if (key.length === 1) {
  57232. return withoutSuffix ? wordKey[0] : wordKey[1];
  57233. } else {
  57234. return (
  57235. number +
  57236. ' ' +
  57237. translator.correctGrammaticalCase(number, wordKey)
  57238. );
  57239. }
  57240. },
  57241. };
  57242. var srCyrl = moment.defineLocale('sr-cyrl', {
  57243. months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
  57244. '_'
  57245. ),
  57246. monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
  57247. '_'
  57248. ),
  57249. monthsParseExact: true,
  57250. weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
  57251. weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
  57252. weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
  57253. weekdaysParseExact: true,
  57254. longDateFormat: {
  57255. LT: 'H:mm',
  57256. LTS: 'H:mm:ss',
  57257. L: 'D. M. YYYY.',
  57258. LL: 'D. MMMM YYYY.',
  57259. LLL: 'D. MMMM YYYY. H:mm',
  57260. LLLL: 'dddd, D. MMMM YYYY. H:mm',
  57261. },
  57262. calendar: {
  57263. sameDay: '[данас у] LT',
  57264. nextDay: '[сутра у] LT',
  57265. nextWeek: function () {
  57266. switch (this.day()) {
  57267. case 0:
  57268. return '[у] [недељу] [у] LT';
  57269. case 3:
  57270. return '[у] [среду] [у] LT';
  57271. case 6:
  57272. return '[у] [суботу] [у] LT';
  57273. case 1:
  57274. case 2:
  57275. case 4:
  57276. case 5:
  57277. return '[у] dddd [у] LT';
  57278. }
  57279. },
  57280. lastDay: '[јуче у] LT',
  57281. lastWeek: function () {
  57282. var lastWeekDays = [
  57283. '[прошле] [недеље] [у] LT',
  57284. '[прошлог] [понедељка] [у] LT',
  57285. '[прошлог] [уторка] [у] LT',
  57286. '[прошле] [среде] [у] LT',
  57287. '[прошлог] [четвртка] [у] LT',
  57288. '[прошлог] [петка] [у] LT',
  57289. '[прошле] [суботе] [у] LT',
  57290. ];
  57291. return lastWeekDays[this.day()];
  57292. },
  57293. sameElse: 'L',
  57294. },
  57295. relativeTime: {
  57296. future: 'за %s',
  57297. past: 'пре %s',
  57298. s: 'неколико секунди',
  57299. ss: translator.translate,
  57300. m: translator.translate,
  57301. mm: translator.translate,
  57302. h: translator.translate,
  57303. hh: translator.translate,
  57304. d: 'дан',
  57305. dd: translator.translate,
  57306. M: 'месец',
  57307. MM: translator.translate,
  57308. y: 'годину',
  57309. yy: translator.translate,
  57310. },
  57311. dayOfMonthOrdinalParse: /\d{1,2}\./,
  57312. ordinal: '%d.',
  57313. week: {
  57314. dow: 1, // Monday is the first day of the week.
  57315. doy: 7, // The week that contains Jan 1st is the first week of the year.
  57316. },
  57317. });
  57318. return srCyrl;
  57319. })));
  57320. /***/ }),
  57321. /***/ 49131:
  57322. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57323. //! moment.js locale configuration
  57324. //! locale : Serbian [sr]
  57325. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  57326. //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
  57327. ;(function (global, factory) {
  57328. true ? factory(__webpack_require__(30381)) :
  57329. 0
  57330. }(this, (function (moment) { 'use strict';
  57331. //! moment.js locale configuration
  57332. var translator = {
  57333. words: {
  57334. //Different grammatical cases
  57335. ss: ['sekunda', 'sekunde', 'sekundi'],
  57336. m: ['jedan minut', 'jedne minute'],
  57337. mm: ['minut', 'minute', 'minuta'],
  57338. h: ['jedan sat', 'jednog sata'],
  57339. hh: ['sat', 'sata', 'sati'],
  57340. dd: ['dan', 'dana', 'dana'],
  57341. MM: ['mesec', 'meseca', 'meseci'],
  57342. yy: ['godina', 'godine', 'godina'],
  57343. },
  57344. correctGrammaticalCase: function (number, wordKey) {
  57345. return number === 1
  57346. ? wordKey[0]
  57347. : number >= 2 && number <= 4
  57348. ? wordKey[1]
  57349. : wordKey[2];
  57350. },
  57351. translate: function (number, withoutSuffix, key) {
  57352. var wordKey = translator.words[key];
  57353. if (key.length === 1) {
  57354. return withoutSuffix ? wordKey[0] : wordKey[1];
  57355. } else {
  57356. return (
  57357. number +
  57358. ' ' +
  57359. translator.correctGrammaticalCase(number, wordKey)
  57360. );
  57361. }
  57362. },
  57363. };
  57364. var sr = moment.defineLocale('sr', {
  57365. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
  57366. '_'
  57367. ),
  57368. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
  57369. '_'
  57370. ),
  57371. monthsParseExact: true,
  57372. weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
  57373. '_'
  57374. ),
  57375. weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
  57376. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  57377. weekdaysParseExact: true,
  57378. longDateFormat: {
  57379. LT: 'H:mm',
  57380. LTS: 'H:mm:ss',
  57381. L: 'D. M. YYYY.',
  57382. LL: 'D. MMMM YYYY.',
  57383. LLL: 'D. MMMM YYYY. H:mm',
  57384. LLLL: 'dddd, D. MMMM YYYY. H:mm',
  57385. },
  57386. calendar: {
  57387. sameDay: '[danas u] LT',
  57388. nextDay: '[sutra u] LT',
  57389. nextWeek: function () {
  57390. switch (this.day()) {
  57391. case 0:
  57392. return '[u] [nedelju] [u] LT';
  57393. case 3:
  57394. return '[u] [sredu] [u] LT';
  57395. case 6:
  57396. return '[u] [subotu] [u] LT';
  57397. case 1:
  57398. case 2:
  57399. case 4:
  57400. case 5:
  57401. return '[u] dddd [u] LT';
  57402. }
  57403. },
  57404. lastDay: '[juče u] LT',
  57405. lastWeek: function () {
  57406. var lastWeekDays = [
  57407. '[prošle] [nedelje] [u] LT',
  57408. '[prošlog] [ponedeljka] [u] LT',
  57409. '[prošlog] [utorka] [u] LT',
  57410. '[prošle] [srede] [u] LT',
  57411. '[prošlog] [četvrtka] [u] LT',
  57412. '[prošlog] [petka] [u] LT',
  57413. '[prošle] [subote] [u] LT',
  57414. ];
  57415. return lastWeekDays[this.day()];
  57416. },
  57417. sameElse: 'L',
  57418. },
  57419. relativeTime: {
  57420. future: 'za %s',
  57421. past: 'pre %s',
  57422. s: 'nekoliko sekundi',
  57423. ss: translator.translate,
  57424. m: translator.translate,
  57425. mm: translator.translate,
  57426. h: translator.translate,
  57427. hh: translator.translate,
  57428. d: 'dan',
  57429. dd: translator.translate,
  57430. M: 'mesec',
  57431. MM: translator.translate,
  57432. y: 'godinu',
  57433. yy: translator.translate,
  57434. },
  57435. dayOfMonthOrdinalParse: /\d{1,2}\./,
  57436. ordinal: '%d.',
  57437. week: {
  57438. dow: 1, // Monday is the first day of the week.
  57439. doy: 7, // The week that contains Jan 7th is the first week of the year.
  57440. },
  57441. });
  57442. return sr;
  57443. })));
  57444. /***/ }),
  57445. /***/ 85893:
  57446. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57447. //! moment.js locale configuration
  57448. //! locale : siSwati [ss]
  57449. //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
  57450. ;(function (global, factory) {
  57451. true ? factory(__webpack_require__(30381)) :
  57452. 0
  57453. }(this, (function (moment) { 'use strict';
  57454. //! moment.js locale configuration
  57455. var ss = moment.defineLocale('ss', {
  57456. months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
  57457. '_'
  57458. ),
  57459. monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
  57460. weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
  57461. '_'
  57462. ),
  57463. weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
  57464. weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
  57465. weekdaysParseExact: true,
  57466. longDateFormat: {
  57467. LT: 'h:mm A',
  57468. LTS: 'h:mm:ss A',
  57469. L: 'DD/MM/YYYY',
  57470. LL: 'D MMMM YYYY',
  57471. LLL: 'D MMMM YYYY h:mm A',
  57472. LLLL: 'dddd, D MMMM YYYY h:mm A',
  57473. },
  57474. calendar: {
  57475. sameDay: '[Namuhla nga] LT',
  57476. nextDay: '[Kusasa nga] LT',
  57477. nextWeek: 'dddd [nga] LT',
  57478. lastDay: '[Itolo nga] LT',
  57479. lastWeek: 'dddd [leliphelile] [nga] LT',
  57480. sameElse: 'L',
  57481. },
  57482. relativeTime: {
  57483. future: 'nga %s',
  57484. past: 'wenteka nga %s',
  57485. s: 'emizuzwana lomcane',
  57486. ss: '%d mzuzwana',
  57487. m: 'umzuzu',
  57488. mm: '%d emizuzu',
  57489. h: 'lihora',
  57490. hh: '%d emahora',
  57491. d: 'lilanga',
  57492. dd: '%d emalanga',
  57493. M: 'inyanga',
  57494. MM: '%d tinyanga',
  57495. y: 'umnyaka',
  57496. yy: '%d iminyaka',
  57497. },
  57498. meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
  57499. meridiem: function (hours, minutes, isLower) {
  57500. if (hours < 11) {
  57501. return 'ekuseni';
  57502. } else if (hours < 15) {
  57503. return 'emini';
  57504. } else if (hours < 19) {
  57505. return 'entsambama';
  57506. } else {
  57507. return 'ebusuku';
  57508. }
  57509. },
  57510. meridiemHour: function (hour, meridiem) {
  57511. if (hour === 12) {
  57512. hour = 0;
  57513. }
  57514. if (meridiem === 'ekuseni') {
  57515. return hour;
  57516. } else if (meridiem === 'emini') {
  57517. return hour >= 11 ? hour : hour + 12;
  57518. } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
  57519. if (hour === 0) {
  57520. return 0;
  57521. }
  57522. return hour + 12;
  57523. }
  57524. },
  57525. dayOfMonthOrdinalParse: /\d{1,2}/,
  57526. ordinal: '%d',
  57527. week: {
  57528. dow: 1, // Monday is the first day of the week.
  57529. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57530. },
  57531. });
  57532. return ss;
  57533. })));
  57534. /***/ }),
  57535. /***/ 98760:
  57536. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57537. //! moment.js locale configuration
  57538. //! locale : Swedish [sv]
  57539. //! author : Jens Alm : https://github.com/ulmus
  57540. ;(function (global, factory) {
  57541. true ? factory(__webpack_require__(30381)) :
  57542. 0
  57543. }(this, (function (moment) { 'use strict';
  57544. //! moment.js locale configuration
  57545. var sv = moment.defineLocale('sv', {
  57546. months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
  57547. '_'
  57548. ),
  57549. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  57550. weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  57551. weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  57552. weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
  57553. longDateFormat: {
  57554. LT: 'HH:mm',
  57555. LTS: 'HH:mm:ss',
  57556. L: 'YYYY-MM-DD',
  57557. LL: 'D MMMM YYYY',
  57558. LLL: 'D MMMM YYYY [kl.] HH:mm',
  57559. LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
  57560. lll: 'D MMM YYYY HH:mm',
  57561. llll: 'ddd D MMM YYYY HH:mm',
  57562. },
  57563. calendar: {
  57564. sameDay: '[Idag] LT',
  57565. nextDay: '[Imorgon] LT',
  57566. lastDay: '[Igår] LT',
  57567. nextWeek: '[På] dddd LT',
  57568. lastWeek: '[I] dddd[s] LT',
  57569. sameElse: 'L',
  57570. },
  57571. relativeTime: {
  57572. future: 'om %s',
  57573. past: 'för %s sedan',
  57574. s: 'några sekunder',
  57575. ss: '%d sekunder',
  57576. m: 'en minut',
  57577. mm: '%d minuter',
  57578. h: 'en timme',
  57579. hh: '%d timmar',
  57580. d: 'en dag',
  57581. dd: '%d dagar',
  57582. M: 'en månad',
  57583. MM: '%d månader',
  57584. y: 'ett år',
  57585. yy: '%d år',
  57586. },
  57587. dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
  57588. ordinal: function (number) {
  57589. var b = number % 10,
  57590. output =
  57591. ~~((number % 100) / 10) === 1
  57592. ? ':e'
  57593. : b === 1
  57594. ? ':a'
  57595. : b === 2
  57596. ? ':a'
  57597. : b === 3
  57598. ? ':e'
  57599. : ':e';
  57600. return number + output;
  57601. },
  57602. week: {
  57603. dow: 1, // Monday is the first day of the week.
  57604. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57605. },
  57606. });
  57607. return sv;
  57608. })));
  57609. /***/ }),
  57610. /***/ 91172:
  57611. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57612. //! moment.js locale configuration
  57613. //! locale : Swahili [sw]
  57614. //! author : Fahad Kassim : https://github.com/fadsel
  57615. ;(function (global, factory) {
  57616. true ? factory(__webpack_require__(30381)) :
  57617. 0
  57618. }(this, (function (moment) { 'use strict';
  57619. //! moment.js locale configuration
  57620. var sw = moment.defineLocale('sw', {
  57621. months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
  57622. '_'
  57623. ),
  57624. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
  57625. weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
  57626. '_'
  57627. ),
  57628. weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
  57629. weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
  57630. weekdaysParseExact: true,
  57631. longDateFormat: {
  57632. LT: 'hh:mm A',
  57633. LTS: 'HH:mm:ss',
  57634. L: 'DD.MM.YYYY',
  57635. LL: 'D MMMM YYYY',
  57636. LLL: 'D MMMM YYYY HH:mm',
  57637. LLLL: 'dddd, D MMMM YYYY HH:mm',
  57638. },
  57639. calendar: {
  57640. sameDay: '[leo saa] LT',
  57641. nextDay: '[kesho saa] LT',
  57642. nextWeek: '[wiki ijayo] dddd [saat] LT',
  57643. lastDay: '[jana] LT',
  57644. lastWeek: '[wiki iliyopita] dddd [saat] LT',
  57645. sameElse: 'L',
  57646. },
  57647. relativeTime: {
  57648. future: '%s baadaye',
  57649. past: 'tokea %s',
  57650. s: 'hivi punde',
  57651. ss: 'sekunde %d',
  57652. m: 'dakika moja',
  57653. mm: 'dakika %d',
  57654. h: 'saa limoja',
  57655. hh: 'masaa %d',
  57656. d: 'siku moja',
  57657. dd: 'siku %d',
  57658. M: 'mwezi mmoja',
  57659. MM: 'miezi %d',
  57660. y: 'mwaka mmoja',
  57661. yy: 'miaka %d',
  57662. },
  57663. week: {
  57664. dow: 1, // Monday is the first day of the week.
  57665. doy: 7, // The week that contains Jan 7th is the first week of the year.
  57666. },
  57667. });
  57668. return sw;
  57669. })));
  57670. /***/ }),
  57671. /***/ 27333:
  57672. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57673. //! moment.js locale configuration
  57674. //! locale : Tamil [ta]
  57675. //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
  57676. ;(function (global, factory) {
  57677. true ? factory(__webpack_require__(30381)) :
  57678. 0
  57679. }(this, (function (moment) { 'use strict';
  57680. //! moment.js locale configuration
  57681. var symbolMap = {
  57682. 1: '௧',
  57683. 2: '௨',
  57684. 3: '௩',
  57685. 4: '௪',
  57686. 5: '௫',
  57687. 6: '௬',
  57688. 7: '௭',
  57689. 8: '௮',
  57690. 9: '௯',
  57691. 0: '௦',
  57692. },
  57693. numberMap = {
  57694. '௧': '1',
  57695. '௨': '2',
  57696. '௩': '3',
  57697. '௪': '4',
  57698. '௫': '5',
  57699. '௬': '6',
  57700. '௭': '7',
  57701. '௮': '8',
  57702. '௯': '9',
  57703. '௦': '0',
  57704. };
  57705. var ta = moment.defineLocale('ta', {
  57706. months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
  57707. '_'
  57708. ),
  57709. monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
  57710. '_'
  57711. ),
  57712. weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
  57713. '_'
  57714. ),
  57715. weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
  57716. '_'
  57717. ),
  57718. weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
  57719. longDateFormat: {
  57720. LT: 'HH:mm',
  57721. LTS: 'HH:mm:ss',
  57722. L: 'DD/MM/YYYY',
  57723. LL: 'D MMMM YYYY',
  57724. LLL: 'D MMMM YYYY, HH:mm',
  57725. LLLL: 'dddd, D MMMM YYYY, HH:mm',
  57726. },
  57727. calendar: {
  57728. sameDay: '[இன்று] LT',
  57729. nextDay: '[நாளை] LT',
  57730. nextWeek: 'dddd, LT',
  57731. lastDay: '[நேற்று] LT',
  57732. lastWeek: '[கடந்த வாரம்] dddd, LT',
  57733. sameElse: 'L',
  57734. },
  57735. relativeTime: {
  57736. future: '%s இல்',
  57737. past: '%s முன்',
  57738. s: 'ஒரு சில விநாடிகள்',
  57739. ss: '%d விநாடிகள்',
  57740. m: 'ஒரு நிமிடம்',
  57741. mm: '%d நிமிடங்கள்',
  57742. h: 'ஒரு மணி நேரம்',
  57743. hh: '%d மணி நேரம்',
  57744. d: 'ஒரு நாள்',
  57745. dd: '%d நாட்கள்',
  57746. M: 'ஒரு மாதம்',
  57747. MM: '%d மாதங்கள்',
  57748. y: 'ஒரு வருடம்',
  57749. yy: '%d ஆண்டுகள்',
  57750. },
  57751. dayOfMonthOrdinalParse: /\d{1,2}வது/,
  57752. ordinal: function (number) {
  57753. return number + 'வது';
  57754. },
  57755. preparse: function (string) {
  57756. return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
  57757. return numberMap[match];
  57758. });
  57759. },
  57760. postformat: function (string) {
  57761. return string.replace(/\d/g, function (match) {
  57762. return symbolMap[match];
  57763. });
  57764. },
  57765. // refer http://ta.wikipedia.org/s/1er1
  57766. meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
  57767. meridiem: function (hour, minute, isLower) {
  57768. if (hour < 2) {
  57769. return ' யாமம்';
  57770. } else if (hour < 6) {
  57771. return ' வைகறை'; // வைகறை
  57772. } else if (hour < 10) {
  57773. return ' காலை'; // காலை
  57774. } else if (hour < 14) {
  57775. return ' நண்பகல்'; // நண்பகல்
  57776. } else if (hour < 18) {
  57777. return ' எற்பாடு'; // எற்பாடு
  57778. } else if (hour < 22) {
  57779. return ' மாலை'; // மாலை
  57780. } else {
  57781. return ' யாமம்';
  57782. }
  57783. },
  57784. meridiemHour: function (hour, meridiem) {
  57785. if (hour === 12) {
  57786. hour = 0;
  57787. }
  57788. if (meridiem === 'யாமம்') {
  57789. return hour < 2 ? hour : hour + 12;
  57790. } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
  57791. return hour;
  57792. } else if (meridiem === 'நண்பகல்') {
  57793. return hour >= 10 ? hour : hour + 12;
  57794. } else {
  57795. return hour + 12;
  57796. }
  57797. },
  57798. week: {
  57799. dow: 0, // Sunday is the first day of the week.
  57800. doy: 6, // The week that contains Jan 6th is the first week of the year.
  57801. },
  57802. });
  57803. return ta;
  57804. })));
  57805. /***/ }),
  57806. /***/ 23110:
  57807. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57808. //! moment.js locale configuration
  57809. //! locale : Telugu [te]
  57810. //! author : Krishna Chaitanya Thota : https://github.com/kcthota
  57811. ;(function (global, factory) {
  57812. true ? factory(__webpack_require__(30381)) :
  57813. 0
  57814. }(this, (function (moment) { 'use strict';
  57815. //! moment.js locale configuration
  57816. var te = moment.defineLocale('te', {
  57817. months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
  57818. '_'
  57819. ),
  57820. monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
  57821. '_'
  57822. ),
  57823. monthsParseExact: true,
  57824. weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
  57825. '_'
  57826. ),
  57827. weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
  57828. weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
  57829. longDateFormat: {
  57830. LT: 'A h:mm',
  57831. LTS: 'A h:mm:ss',
  57832. L: 'DD/MM/YYYY',
  57833. LL: 'D MMMM YYYY',
  57834. LLL: 'D MMMM YYYY, A h:mm',
  57835. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  57836. },
  57837. calendar: {
  57838. sameDay: '[నేడు] LT',
  57839. nextDay: '[రేపు] LT',
  57840. nextWeek: 'dddd, LT',
  57841. lastDay: '[నిన్న] LT',
  57842. lastWeek: '[గత] dddd, LT',
  57843. sameElse: 'L',
  57844. },
  57845. relativeTime: {
  57846. future: '%s లో',
  57847. past: '%s క్రితం',
  57848. s: 'కొన్ని క్షణాలు',
  57849. ss: '%d సెకన్లు',
  57850. m: 'ఒక నిమిషం',
  57851. mm: '%d నిమిషాలు',
  57852. h: 'ఒక గంట',
  57853. hh: '%d గంటలు',
  57854. d: 'ఒక రోజు',
  57855. dd: '%d రోజులు',
  57856. M: 'ఒక నెల',
  57857. MM: '%d నెలలు',
  57858. y: 'ఒక సంవత్సరం',
  57859. yy: '%d సంవత్సరాలు',
  57860. },
  57861. dayOfMonthOrdinalParse: /\d{1,2}వ/,
  57862. ordinal: '%dవ',
  57863. meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
  57864. meridiemHour: function (hour, meridiem) {
  57865. if (hour === 12) {
  57866. hour = 0;
  57867. }
  57868. if (meridiem === 'రాత్రి') {
  57869. return hour < 4 ? hour : hour + 12;
  57870. } else if (meridiem === 'ఉదయం') {
  57871. return hour;
  57872. } else if (meridiem === 'మధ్యాహ్నం') {
  57873. return hour >= 10 ? hour : hour + 12;
  57874. } else if (meridiem === 'సాయంత్రం') {
  57875. return hour + 12;
  57876. }
  57877. },
  57878. meridiem: function (hour, minute, isLower) {
  57879. if (hour < 4) {
  57880. return 'రాత్రి';
  57881. } else if (hour < 10) {
  57882. return 'ఉదయం';
  57883. } else if (hour < 17) {
  57884. return 'మధ్యాహ్నం';
  57885. } else if (hour < 20) {
  57886. return 'సాయంత్రం';
  57887. } else {
  57888. return 'రాత్రి';
  57889. }
  57890. },
  57891. week: {
  57892. dow: 0, // Sunday is the first day of the week.
  57893. doy: 6, // The week that contains Jan 6th is the first week of the year.
  57894. },
  57895. });
  57896. return te;
  57897. })));
  57898. /***/ }),
  57899. /***/ 52095:
  57900. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57901. //! moment.js locale configuration
  57902. //! locale : Tetun Dili (East Timor) [tet]
  57903. //! author : Joshua Brooks : https://github.com/joshbrooks
  57904. //! author : Onorio De J. Afonso : https://github.com/marobo
  57905. //! author : Sonia Simoes : https://github.com/soniasimoes
  57906. ;(function (global, factory) {
  57907. true ? factory(__webpack_require__(30381)) :
  57908. 0
  57909. }(this, (function (moment) { 'use strict';
  57910. //! moment.js locale configuration
  57911. var tet = moment.defineLocale('tet', {
  57912. months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
  57913. '_'
  57914. ),
  57915. monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
  57916. weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
  57917. weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
  57918. weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
  57919. longDateFormat: {
  57920. LT: 'HH:mm',
  57921. LTS: 'HH:mm:ss',
  57922. L: 'DD/MM/YYYY',
  57923. LL: 'D MMMM YYYY',
  57924. LLL: 'D MMMM YYYY HH:mm',
  57925. LLLL: 'dddd, D MMMM YYYY HH:mm',
  57926. },
  57927. calendar: {
  57928. sameDay: '[Ohin iha] LT',
  57929. nextDay: '[Aban iha] LT',
  57930. nextWeek: 'dddd [iha] LT',
  57931. lastDay: '[Horiseik iha] LT',
  57932. lastWeek: 'dddd [semana kotuk] [iha] LT',
  57933. sameElse: 'L',
  57934. },
  57935. relativeTime: {
  57936. future: 'iha %s',
  57937. past: '%s liuba',
  57938. s: 'segundu balun',
  57939. ss: 'segundu %d',
  57940. m: 'minutu ida',
  57941. mm: 'minutu %d',
  57942. h: 'oras ida',
  57943. hh: 'oras %d',
  57944. d: 'loron ida',
  57945. dd: 'loron %d',
  57946. M: 'fulan ida',
  57947. MM: 'fulan %d',
  57948. y: 'tinan ida',
  57949. yy: 'tinan %d',
  57950. },
  57951. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  57952. ordinal: function (number) {
  57953. var b = number % 10,
  57954. output =
  57955. ~~((number % 100) / 10) === 1
  57956. ? 'th'
  57957. : b === 1
  57958. ? 'st'
  57959. : b === 2
  57960. ? 'nd'
  57961. : b === 3
  57962. ? 'rd'
  57963. : 'th';
  57964. return number + output;
  57965. },
  57966. week: {
  57967. dow: 1, // Monday is the first day of the week.
  57968. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57969. },
  57970. });
  57971. return tet;
  57972. })));
  57973. /***/ }),
  57974. /***/ 44257:
  57975. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57976. //! moment.js locale configuration
  57977. //! locale : Tajik [tg]
  57978. //! author : Orif N. Jr. : https://github.com/orif-jr
  57979. ;(function (global, factory) {
  57980. true ? factory(__webpack_require__(30381)) :
  57981. 0
  57982. }(this, (function (moment) { 'use strict';
  57983. //! moment.js locale configuration
  57984. var suffixes = {
  57985. 0: '-ум',
  57986. 1: '-ум',
  57987. 2: '-юм',
  57988. 3: '-юм',
  57989. 4: '-ум',
  57990. 5: '-ум',
  57991. 6: '-ум',
  57992. 7: '-ум',
  57993. 8: '-ум',
  57994. 9: '-ум',
  57995. 10: '-ум',
  57996. 12: '-ум',
  57997. 13: '-ум',
  57998. 20: '-ум',
  57999. 30: '-юм',
  58000. 40: '-ум',
  58001. 50: '-ум',
  58002. 60: '-ум',
  58003. 70: '-ум',
  58004. 80: '-ум',
  58005. 90: '-ум',
  58006. 100: '-ум',
  58007. };
  58008. var tg = moment.defineLocale('tg', {
  58009. months: {
  58010. format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
  58011. '_'
  58012. ),
  58013. standalone: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
  58014. '_'
  58015. ),
  58016. },
  58017. monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  58018. weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
  58019. '_'
  58020. ),
  58021. weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
  58022. weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
  58023. longDateFormat: {
  58024. LT: 'HH:mm',
  58025. LTS: 'HH:mm:ss',
  58026. L: 'DD.MM.YYYY',
  58027. LL: 'D MMMM YYYY',
  58028. LLL: 'D MMMM YYYY HH:mm',
  58029. LLLL: 'dddd, D MMMM YYYY HH:mm',
  58030. },
  58031. calendar: {
  58032. sameDay: '[Имрӯз соати] LT',
  58033. nextDay: '[Фардо соати] LT',
  58034. lastDay: '[Дирӯз соати] LT',
  58035. nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
  58036. lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
  58037. sameElse: 'L',
  58038. },
  58039. relativeTime: {
  58040. future: 'баъди %s',
  58041. past: '%s пеш',
  58042. s: 'якчанд сония',
  58043. m: 'як дақиқа',
  58044. mm: '%d дақиқа',
  58045. h: 'як соат',
  58046. hh: '%d соат',
  58047. d: 'як рӯз',
  58048. dd: '%d рӯз',
  58049. M: 'як моҳ',
  58050. MM: '%d моҳ',
  58051. y: 'як сол',
  58052. yy: '%d сол',
  58053. },
  58054. meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
  58055. meridiemHour: function (hour, meridiem) {
  58056. if (hour === 12) {
  58057. hour = 0;
  58058. }
  58059. if (meridiem === 'шаб') {
  58060. return hour < 4 ? hour : hour + 12;
  58061. } else if (meridiem === 'субҳ') {
  58062. return hour;
  58063. } else if (meridiem === 'рӯз') {
  58064. return hour >= 11 ? hour : hour + 12;
  58065. } else if (meridiem === 'бегоҳ') {
  58066. return hour + 12;
  58067. }
  58068. },
  58069. meridiem: function (hour, minute, isLower) {
  58070. if (hour < 4) {
  58071. return 'шаб';
  58072. } else if (hour < 11) {
  58073. return 'субҳ';
  58074. } else if (hour < 16) {
  58075. return 'рӯз';
  58076. } else if (hour < 19) {
  58077. return 'бегоҳ';
  58078. } else {
  58079. return 'шаб';
  58080. }
  58081. },
  58082. dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
  58083. ordinal: function (number) {
  58084. var a = number % 10,
  58085. b = number >= 100 ? 100 : null;
  58086. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  58087. },
  58088. week: {
  58089. dow: 1, // Monday is the first day of the week.
  58090. doy: 7, // The week that contains Jan 1th is the first week of the year.
  58091. },
  58092. });
  58093. return tg;
  58094. })));
  58095. /***/ }),
  58096. /***/ 9041:
  58097. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58098. //! moment.js locale configuration
  58099. //! locale : Thai [th]
  58100. //! author : Kridsada Thanabulpong : https://github.com/sirn
  58101. ;(function (global, factory) {
  58102. true ? factory(__webpack_require__(30381)) :
  58103. 0
  58104. }(this, (function (moment) { 'use strict';
  58105. //! moment.js locale configuration
  58106. var th = moment.defineLocale('th', {
  58107. months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
  58108. '_'
  58109. ),
  58110. monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
  58111. '_'
  58112. ),
  58113. monthsParseExact: true,
  58114. weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  58115. weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
  58116. weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  58117. weekdaysParseExact: true,
  58118. longDateFormat: {
  58119. LT: 'H:mm',
  58120. LTS: 'H:mm:ss',
  58121. L: 'DD/MM/YYYY',
  58122. LL: 'D MMMM YYYY',
  58123. LLL: 'D MMMM YYYY เวลา H:mm',
  58124. LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
  58125. },
  58126. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  58127. isPM: function (input) {
  58128. return input === 'หลังเที่ยง';
  58129. },
  58130. meridiem: function (hour, minute, isLower) {
  58131. if (hour < 12) {
  58132. return 'ก่อนเที่ยง';
  58133. } else {
  58134. return 'หลังเที่ยง';
  58135. }
  58136. },
  58137. calendar: {
  58138. sameDay: '[วันนี้ เวลา] LT',
  58139. nextDay: '[พรุ่งนี้ เวลา] LT',
  58140. nextWeek: 'dddd[หน้า เวลา] LT',
  58141. lastDay: '[เมื่อวานนี้ เวลา] LT',
  58142. lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
  58143. sameElse: 'L',
  58144. },
  58145. relativeTime: {
  58146. future: 'อีก %s',
  58147. past: '%sที่แล้ว',
  58148. s: 'ไม่กี่วินาที',
  58149. ss: '%d วินาที',
  58150. m: '1 นาที',
  58151. mm: '%d นาที',
  58152. h: '1 ชั่วโมง',
  58153. hh: '%d ชั่วโมง',
  58154. d: '1 วัน',
  58155. dd: '%d วัน',
  58156. w: '1 สัปดาห์',
  58157. ww: '%d สัปดาห์',
  58158. M: '1 เดือน',
  58159. MM: '%d เดือน',
  58160. y: '1 ปี',
  58161. yy: '%d ปี',
  58162. },
  58163. });
  58164. return th;
  58165. })));
  58166. /***/ }),
  58167. /***/ 19005:
  58168. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58169. //! moment.js locale configuration
  58170. //! locale : Turkmen [tk]
  58171. //! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
  58172. ;(function (global, factory) {
  58173. true ? factory(__webpack_require__(30381)) :
  58174. 0
  58175. }(this, (function (moment) { 'use strict';
  58176. //! moment.js locale configuration
  58177. var suffixes = {
  58178. 1: "'inji",
  58179. 5: "'inji",
  58180. 8: "'inji",
  58181. 70: "'inji",
  58182. 80: "'inji",
  58183. 2: "'nji",
  58184. 7: "'nji",
  58185. 20: "'nji",
  58186. 50: "'nji",
  58187. 3: "'ünji",
  58188. 4: "'ünji",
  58189. 100: "'ünji",
  58190. 6: "'njy",
  58191. 9: "'unjy",
  58192. 10: "'unjy",
  58193. 30: "'unjy",
  58194. 60: "'ynjy",
  58195. 90: "'ynjy",
  58196. };
  58197. var tk = moment.defineLocale('tk', {
  58198. months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
  58199. '_'
  58200. ),
  58201. monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
  58202. weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
  58203. '_'
  58204. ),
  58205. weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
  58206. weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
  58207. longDateFormat: {
  58208. LT: 'HH:mm',
  58209. LTS: 'HH:mm:ss',
  58210. L: 'DD.MM.YYYY',
  58211. LL: 'D MMMM YYYY',
  58212. LLL: 'D MMMM YYYY HH:mm',
  58213. LLLL: 'dddd, D MMMM YYYY HH:mm',
  58214. },
  58215. calendar: {
  58216. sameDay: '[bugün sagat] LT',
  58217. nextDay: '[ertir sagat] LT',
  58218. nextWeek: '[indiki] dddd [sagat] LT',
  58219. lastDay: '[düýn] LT',
  58220. lastWeek: '[geçen] dddd [sagat] LT',
  58221. sameElse: 'L',
  58222. },
  58223. relativeTime: {
  58224. future: '%s soň',
  58225. past: '%s öň',
  58226. s: 'birnäçe sekunt',
  58227. m: 'bir minut',
  58228. mm: '%d minut',
  58229. h: 'bir sagat',
  58230. hh: '%d sagat',
  58231. d: 'bir gün',
  58232. dd: '%d gün',
  58233. M: 'bir aý',
  58234. MM: '%d aý',
  58235. y: 'bir ýyl',
  58236. yy: '%d ýyl',
  58237. },
  58238. ordinal: function (number, period) {
  58239. switch (period) {
  58240. case 'd':
  58241. case 'D':
  58242. case 'Do':
  58243. case 'DD':
  58244. return number;
  58245. default:
  58246. if (number === 0) {
  58247. // special case for zero
  58248. return number + "'unjy";
  58249. }
  58250. var a = number % 10,
  58251. b = (number % 100) - a,
  58252. c = number >= 100 ? 100 : null;
  58253. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  58254. }
  58255. },
  58256. week: {
  58257. dow: 1, // Monday is the first day of the week.
  58258. doy: 7, // The week that contains Jan 7th is the first week of the year.
  58259. },
  58260. });
  58261. return tk;
  58262. })));
  58263. /***/ }),
  58264. /***/ 75768:
  58265. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58266. //! moment.js locale configuration
  58267. //! locale : Tagalog (Philippines) [tl-ph]
  58268. //! author : Dan Hagman : https://github.com/hagmandan
  58269. ;(function (global, factory) {
  58270. true ? factory(__webpack_require__(30381)) :
  58271. 0
  58272. }(this, (function (moment) { 'use strict';
  58273. //! moment.js locale configuration
  58274. var tlPh = moment.defineLocale('tl-ph', {
  58275. months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
  58276. '_'
  58277. ),
  58278. monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  58279. weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
  58280. '_'
  58281. ),
  58282. weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  58283. weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  58284. longDateFormat: {
  58285. LT: 'HH:mm',
  58286. LTS: 'HH:mm:ss',
  58287. L: 'MM/D/YYYY',
  58288. LL: 'MMMM D, YYYY',
  58289. LLL: 'MMMM D, YYYY HH:mm',
  58290. LLLL: 'dddd, MMMM DD, YYYY HH:mm',
  58291. },
  58292. calendar: {
  58293. sameDay: 'LT [ngayong araw]',
  58294. nextDay: '[Bukas ng] LT',
  58295. nextWeek: 'LT [sa susunod na] dddd',
  58296. lastDay: 'LT [kahapon]',
  58297. lastWeek: 'LT [noong nakaraang] dddd',
  58298. sameElse: 'L',
  58299. },
  58300. relativeTime: {
  58301. future: 'sa loob ng %s',
  58302. past: '%s ang nakalipas',
  58303. s: 'ilang segundo',
  58304. ss: '%d segundo',
  58305. m: 'isang minuto',
  58306. mm: '%d minuto',
  58307. h: 'isang oras',
  58308. hh: '%d oras',
  58309. d: 'isang araw',
  58310. dd: '%d araw',
  58311. M: 'isang buwan',
  58312. MM: '%d buwan',
  58313. y: 'isang taon',
  58314. yy: '%d taon',
  58315. },
  58316. dayOfMonthOrdinalParse: /\d{1,2}/,
  58317. ordinal: function (number) {
  58318. return number;
  58319. },
  58320. week: {
  58321. dow: 1, // Monday is the first day of the week.
  58322. doy: 4, // The week that contains Jan 4th is the first week of the year.
  58323. },
  58324. });
  58325. return tlPh;
  58326. })));
  58327. /***/ }),
  58328. /***/ 89444:
  58329. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58330. //! moment.js locale configuration
  58331. //! locale : Klingon [tlh]
  58332. //! author : Dominika Kruk : https://github.com/amaranthrose
  58333. ;(function (global, factory) {
  58334. true ? factory(__webpack_require__(30381)) :
  58335. 0
  58336. }(this, (function (moment) { 'use strict';
  58337. //! moment.js locale configuration
  58338. var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
  58339. function translateFuture(output) {
  58340. var time = output;
  58341. time =
  58342. output.indexOf('jaj') !== -1
  58343. ? time.slice(0, -3) + 'leS'
  58344. : output.indexOf('jar') !== -1
  58345. ? time.slice(0, -3) + 'waQ'
  58346. : output.indexOf('DIS') !== -1
  58347. ? time.slice(0, -3) + 'nem'
  58348. : time + ' pIq';
  58349. return time;
  58350. }
  58351. function translatePast(output) {
  58352. var time = output;
  58353. time =
  58354. output.indexOf('jaj') !== -1
  58355. ? time.slice(0, -3) + 'Hu’'
  58356. : output.indexOf('jar') !== -1
  58357. ? time.slice(0, -3) + 'wen'
  58358. : output.indexOf('DIS') !== -1
  58359. ? time.slice(0, -3) + 'ben'
  58360. : time + ' ret';
  58361. return time;
  58362. }
  58363. function translate(number, withoutSuffix, string, isFuture) {
  58364. var numberNoun = numberAsNoun(number);
  58365. switch (string) {
  58366. case 'ss':
  58367. return numberNoun + ' lup';
  58368. case 'mm':
  58369. return numberNoun + ' tup';
  58370. case 'hh':
  58371. return numberNoun + ' rep';
  58372. case 'dd':
  58373. return numberNoun + ' jaj';
  58374. case 'MM':
  58375. return numberNoun + ' jar';
  58376. case 'yy':
  58377. return numberNoun + ' DIS';
  58378. }
  58379. }
  58380. function numberAsNoun(number) {
  58381. var hundred = Math.floor((number % 1000) / 100),
  58382. ten = Math.floor((number % 100) / 10),
  58383. one = number % 10,
  58384. word = '';
  58385. if (hundred > 0) {
  58386. word += numbersNouns[hundred] + 'vatlh';
  58387. }
  58388. if (ten > 0) {
  58389. word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
  58390. }
  58391. if (one > 0) {
  58392. word += (word !== '' ? ' ' : '') + numbersNouns[one];
  58393. }
  58394. return word === '' ? 'pagh' : word;
  58395. }
  58396. var tlh = moment.defineLocale('tlh', {
  58397. months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
  58398. '_'
  58399. ),
  58400. monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
  58401. '_'
  58402. ),
  58403. monthsParseExact: true,
  58404. weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  58405. '_'
  58406. ),
  58407. weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  58408. '_'
  58409. ),
  58410. weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  58411. '_'
  58412. ),
  58413. longDateFormat: {
  58414. LT: 'HH:mm',
  58415. LTS: 'HH:mm:ss',
  58416. L: 'DD.MM.YYYY',
  58417. LL: 'D MMMM YYYY',
  58418. LLL: 'D MMMM YYYY HH:mm',
  58419. LLLL: 'dddd, D MMMM YYYY HH:mm',
  58420. },
  58421. calendar: {
  58422. sameDay: '[DaHjaj] LT',
  58423. nextDay: '[wa’leS] LT',
  58424. nextWeek: 'LLL',
  58425. lastDay: '[wa’Hu’] LT',
  58426. lastWeek: 'LLL',
  58427. sameElse: 'L',
  58428. },
  58429. relativeTime: {
  58430. future: translateFuture,
  58431. past: translatePast,
  58432. s: 'puS lup',
  58433. ss: translate,
  58434. m: 'wa’ tup',
  58435. mm: translate,
  58436. h: 'wa’ rep',
  58437. hh: translate,
  58438. d: 'wa’ jaj',
  58439. dd: translate,
  58440. M: 'wa’ jar',
  58441. MM: translate,
  58442. y: 'wa’ DIS',
  58443. yy: translate,
  58444. },
  58445. dayOfMonthOrdinalParse: /\d{1,2}\./,
  58446. ordinal: '%d.',
  58447. week: {
  58448. dow: 1, // Monday is the first day of the week.
  58449. doy: 4, // The week that contains Jan 4th is the first week of the year.
  58450. },
  58451. });
  58452. return tlh;
  58453. })));
  58454. /***/ }),
  58455. /***/ 72397:
  58456. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58457. //! moment.js locale configuration
  58458. //! locale : Turkish [tr]
  58459. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  58460. //! Burak Yiğit Kaya: https://github.com/BYK
  58461. ;(function (global, factory) {
  58462. true ? factory(__webpack_require__(30381)) :
  58463. 0
  58464. }(this, (function (moment) { 'use strict';
  58465. //! moment.js locale configuration
  58466. var suffixes = {
  58467. 1: "'inci",
  58468. 5: "'inci",
  58469. 8: "'inci",
  58470. 70: "'inci",
  58471. 80: "'inci",
  58472. 2: "'nci",
  58473. 7: "'nci",
  58474. 20: "'nci",
  58475. 50: "'nci",
  58476. 3: "'üncü",
  58477. 4: "'üncü",
  58478. 100: "'üncü",
  58479. 6: "'ncı",
  58480. 9: "'uncu",
  58481. 10: "'uncu",
  58482. 30: "'uncu",
  58483. 60: "'ıncı",
  58484. 90: "'ıncı",
  58485. };
  58486. var tr = moment.defineLocale('tr', {
  58487. months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
  58488. '_'
  58489. ),
  58490. monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  58491. weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
  58492. '_'
  58493. ),
  58494. weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  58495. weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  58496. meridiem: function (hours, minutes, isLower) {
  58497. if (hours < 12) {
  58498. return isLower ? 'öö' : 'ÖÖ';
  58499. } else {
  58500. return isLower ? 'ös' : 'ÖS';
  58501. }
  58502. },
  58503. meridiemParse: /öö|ÖÖ|ös|ÖS/,
  58504. isPM: function (input) {
  58505. return input === 'ös' || input === 'ÖS';
  58506. },
  58507. longDateFormat: {
  58508. LT: 'HH:mm',
  58509. LTS: 'HH:mm:ss',
  58510. L: 'DD.MM.YYYY',
  58511. LL: 'D MMMM YYYY',
  58512. LLL: 'D MMMM YYYY HH:mm',
  58513. LLLL: 'dddd, D MMMM YYYY HH:mm',
  58514. },
  58515. calendar: {
  58516. sameDay: '[bugün saat] LT',
  58517. nextDay: '[yarın saat] LT',
  58518. nextWeek: '[gelecek] dddd [saat] LT',
  58519. lastDay: '[dün] LT',
  58520. lastWeek: '[geçen] dddd [saat] LT',
  58521. sameElse: 'L',
  58522. },
  58523. relativeTime: {
  58524. future: '%s sonra',
  58525. past: '%s önce',
  58526. s: 'birkaç saniye',
  58527. ss: '%d saniye',
  58528. m: 'bir dakika',
  58529. mm: '%d dakika',
  58530. h: 'bir saat',
  58531. hh: '%d saat',
  58532. d: 'bir gün',
  58533. dd: '%d gün',
  58534. w: 'bir hafta',
  58535. ww: '%d hafta',
  58536. M: 'bir ay',
  58537. MM: '%d ay',
  58538. y: 'bir yıl',
  58539. yy: '%d yıl',
  58540. },
  58541. ordinal: function (number, period) {
  58542. switch (period) {
  58543. case 'd':
  58544. case 'D':
  58545. case 'Do':
  58546. case 'DD':
  58547. return number;
  58548. default:
  58549. if (number === 0) {
  58550. // special case for zero
  58551. return number + "'ıncı";
  58552. }
  58553. var a = number % 10,
  58554. b = (number % 100) - a,
  58555. c = number >= 100 ? 100 : null;
  58556. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  58557. }
  58558. },
  58559. week: {
  58560. dow: 1, // Monday is the first day of the week.
  58561. doy: 7, // The week that contains Jan 7th is the first week of the year.
  58562. },
  58563. });
  58564. return tr;
  58565. })));
  58566. /***/ }),
  58567. /***/ 28254:
  58568. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58569. //! moment.js locale configuration
  58570. //! locale : Talossan [tzl]
  58571. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  58572. //! author : Iustì Canun
  58573. ;(function (global, factory) {
  58574. true ? factory(__webpack_require__(30381)) :
  58575. 0
  58576. }(this, (function (moment) { 'use strict';
  58577. //! moment.js locale configuration
  58578. // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
  58579. // This is currently too difficult (maybe even impossible) to add.
  58580. var tzl = moment.defineLocale('tzl', {
  58581. months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
  58582. '_'
  58583. ),
  58584. monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
  58585. weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
  58586. weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
  58587. weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
  58588. longDateFormat: {
  58589. LT: 'HH.mm',
  58590. LTS: 'HH.mm.ss',
  58591. L: 'DD.MM.YYYY',
  58592. LL: 'D. MMMM [dallas] YYYY',
  58593. LLL: 'D. MMMM [dallas] YYYY HH.mm',
  58594. LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
  58595. },
  58596. meridiemParse: /d\'o|d\'a/i,
  58597. isPM: function (input) {
  58598. return "d'o" === input.toLowerCase();
  58599. },
  58600. meridiem: function (hours, minutes, isLower) {
  58601. if (hours > 11) {
  58602. return isLower ? "d'o" : "D'O";
  58603. } else {
  58604. return isLower ? "d'a" : "D'A";
  58605. }
  58606. },
  58607. calendar: {
  58608. sameDay: '[oxhi à] LT',
  58609. nextDay: '[demà à] LT',
  58610. nextWeek: 'dddd [à] LT',
  58611. lastDay: '[ieiri à] LT',
  58612. lastWeek: '[sür el] dddd [lasteu à] LT',
  58613. sameElse: 'L',
  58614. },
  58615. relativeTime: {
  58616. future: 'osprei %s',
  58617. past: 'ja%s',
  58618. s: processRelativeTime,
  58619. ss: processRelativeTime,
  58620. m: processRelativeTime,
  58621. mm: processRelativeTime,
  58622. h: processRelativeTime,
  58623. hh: processRelativeTime,
  58624. d: processRelativeTime,
  58625. dd: processRelativeTime,
  58626. M: processRelativeTime,
  58627. MM: processRelativeTime,
  58628. y: processRelativeTime,
  58629. yy: processRelativeTime,
  58630. },
  58631. dayOfMonthOrdinalParse: /\d{1,2}\./,
  58632. ordinal: '%d.',
  58633. week: {
  58634. dow: 1, // Monday is the first day of the week.
  58635. doy: 4, // The week that contains Jan 4th is the first week of the year.
  58636. },
  58637. });
  58638. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  58639. var format = {
  58640. s: ['viensas secunds', "'iensas secunds"],
  58641. ss: [number + ' secunds', '' + number + ' secunds'],
  58642. m: ["'n míut", "'iens míut"],
  58643. mm: [number + ' míuts', '' + number + ' míuts'],
  58644. h: ["'n þora", "'iensa þora"],
  58645. hh: [number + ' þoras', '' + number + ' þoras'],
  58646. d: ["'n ziua", "'iensa ziua"],
  58647. dd: [number + ' ziuas', '' + number + ' ziuas'],
  58648. M: ["'n mes", "'iens mes"],
  58649. MM: [number + ' mesen', '' + number + ' mesen'],
  58650. y: ["'n ar", "'iens ar"],
  58651. yy: [number + ' ars', '' + number + ' ars'],
  58652. };
  58653. return isFuture
  58654. ? format[key][0]
  58655. : withoutSuffix
  58656. ? format[key][0]
  58657. : format[key][1];
  58658. }
  58659. return tzl;
  58660. })));
  58661. /***/ }),
  58662. /***/ 30699:
  58663. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58664. //! moment.js locale configuration
  58665. //! locale : Central Atlas Tamazight Latin [tzm-latn]
  58666. //! author : Abdel Said : https://github.com/abdelsaid
  58667. ;(function (global, factory) {
  58668. true ? factory(__webpack_require__(30381)) :
  58669. 0
  58670. }(this, (function (moment) { 'use strict';
  58671. //! moment.js locale configuration
  58672. var tzmLatn = moment.defineLocale('tzm-latn', {
  58673. months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
  58674. '_'
  58675. ),
  58676. monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
  58677. '_'
  58678. ),
  58679. weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  58680. weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  58681. weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  58682. longDateFormat: {
  58683. LT: 'HH:mm',
  58684. LTS: 'HH:mm:ss',
  58685. L: 'DD/MM/YYYY',
  58686. LL: 'D MMMM YYYY',
  58687. LLL: 'D MMMM YYYY HH:mm',
  58688. LLLL: 'dddd D MMMM YYYY HH:mm',
  58689. },
  58690. calendar: {
  58691. sameDay: '[asdkh g] LT',
  58692. nextDay: '[aska g] LT',
  58693. nextWeek: 'dddd [g] LT',
  58694. lastDay: '[assant g] LT',
  58695. lastWeek: 'dddd [g] LT',
  58696. sameElse: 'L',
  58697. },
  58698. relativeTime: {
  58699. future: 'dadkh s yan %s',
  58700. past: 'yan %s',
  58701. s: 'imik',
  58702. ss: '%d imik',
  58703. m: 'minuḍ',
  58704. mm: '%d minuḍ',
  58705. h: 'saɛa',
  58706. hh: '%d tassaɛin',
  58707. d: 'ass',
  58708. dd: '%d ossan',
  58709. M: 'ayowr',
  58710. MM: '%d iyyirn',
  58711. y: 'asgas',
  58712. yy: '%d isgasn',
  58713. },
  58714. week: {
  58715. dow: 6, // Saturday is the first day of the week.
  58716. doy: 12, // The week that contains Jan 12th is the first week of the year.
  58717. },
  58718. });
  58719. return tzmLatn;
  58720. })));
  58721. /***/ }),
  58722. /***/ 51106:
  58723. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58724. //! moment.js locale configuration
  58725. //! locale : Central Atlas Tamazight [tzm]
  58726. //! author : Abdel Said : https://github.com/abdelsaid
  58727. ;(function (global, factory) {
  58728. true ? factory(__webpack_require__(30381)) :
  58729. 0
  58730. }(this, (function (moment) { 'use strict';
  58731. //! moment.js locale configuration
  58732. var tzm = moment.defineLocale('tzm', {
  58733. months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
  58734. '_'
  58735. ),
  58736. monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
  58737. '_'
  58738. ),
  58739. weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  58740. weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  58741. weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  58742. longDateFormat: {
  58743. LT: 'HH:mm',
  58744. LTS: 'HH:mm:ss',
  58745. L: 'DD/MM/YYYY',
  58746. LL: 'D MMMM YYYY',
  58747. LLL: 'D MMMM YYYY HH:mm',
  58748. LLLL: 'dddd D MMMM YYYY HH:mm',
  58749. },
  58750. calendar: {
  58751. sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
  58752. nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
  58753. nextWeek: 'dddd [ⴴ] LT',
  58754. lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
  58755. lastWeek: 'dddd [ⴴ] LT',
  58756. sameElse: 'L',
  58757. },
  58758. relativeTime: {
  58759. future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
  58760. past: 'ⵢⴰⵏ %s',
  58761. s: 'ⵉⵎⵉⴽ',
  58762. ss: '%d ⵉⵎⵉⴽ',
  58763. m: 'ⵎⵉⵏⵓⴺ',
  58764. mm: '%d ⵎⵉⵏⵓⴺ',
  58765. h: 'ⵙⴰⵄⴰ',
  58766. hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
  58767. d: 'ⴰⵙⵙ',
  58768. dd: '%d oⵙⵙⴰⵏ',
  58769. M: 'ⴰⵢoⵓⵔ',
  58770. MM: '%d ⵉⵢⵢⵉⵔⵏ',
  58771. y: 'ⴰⵙⴳⴰⵙ',
  58772. yy: '%d ⵉⵙⴳⴰⵙⵏ',
  58773. },
  58774. week: {
  58775. dow: 6, // Saturday is the first day of the week.
  58776. doy: 12, // The week that contains Jan 12th is the first week of the year.
  58777. },
  58778. });
  58779. return tzm;
  58780. })));
  58781. /***/ }),
  58782. /***/ 9288:
  58783. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58784. //! moment.js locale configuration
  58785. //! locale : Uyghur (China) [ug-cn]
  58786. //! author: boyaq : https://github.com/boyaq
  58787. ;(function (global, factory) {
  58788. true ? factory(__webpack_require__(30381)) :
  58789. 0
  58790. }(this, (function (moment) { 'use strict';
  58791. //! moment.js locale configuration
  58792. var ugCn = moment.defineLocale('ug-cn', {
  58793. months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
  58794. '_'
  58795. ),
  58796. monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
  58797. '_'
  58798. ),
  58799. weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
  58800. '_'
  58801. ),
  58802. weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
  58803. weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
  58804. longDateFormat: {
  58805. LT: 'HH:mm',
  58806. LTS: 'HH:mm:ss',
  58807. L: 'YYYY-MM-DD',
  58808. LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
  58809. LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
  58810. LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
  58811. },
  58812. meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
  58813. meridiemHour: function (hour, meridiem) {
  58814. if (hour === 12) {
  58815. hour = 0;
  58816. }
  58817. if (
  58818. meridiem === 'يېرىم كېچە' ||
  58819. meridiem === 'سەھەر' ||
  58820. meridiem === 'چۈشتىن بۇرۇن'
  58821. ) {
  58822. return hour;
  58823. } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
  58824. return hour + 12;
  58825. } else {
  58826. return hour >= 11 ? hour : hour + 12;
  58827. }
  58828. },
  58829. meridiem: function (hour, minute, isLower) {
  58830. var hm = hour * 100 + minute;
  58831. if (hm < 600) {
  58832. return 'يېرىم كېچە';
  58833. } else if (hm < 900) {
  58834. return 'سەھەر';
  58835. } else if (hm < 1130) {
  58836. return 'چۈشتىن بۇرۇن';
  58837. } else if (hm < 1230) {
  58838. return 'چۈش';
  58839. } else if (hm < 1800) {
  58840. return 'چۈشتىن كېيىن';
  58841. } else {
  58842. return 'كەچ';
  58843. }
  58844. },
  58845. calendar: {
  58846. sameDay: '[بۈگۈن سائەت] LT',
  58847. nextDay: '[ئەتە سائەت] LT',
  58848. nextWeek: '[كېلەركى] dddd [سائەت] LT',
  58849. lastDay: '[تۆنۈگۈن] LT',
  58850. lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
  58851. sameElse: 'L',
  58852. },
  58853. relativeTime: {
  58854. future: '%s كېيىن',
  58855. past: '%s بۇرۇن',
  58856. s: 'نەچچە سېكونت',
  58857. ss: '%d سېكونت',
  58858. m: 'بىر مىنۇت',
  58859. mm: '%d مىنۇت',
  58860. h: 'بىر سائەت',
  58861. hh: '%d سائەت',
  58862. d: 'بىر كۈن',
  58863. dd: '%d كۈن',
  58864. M: 'بىر ئاي',
  58865. MM: '%d ئاي',
  58866. y: 'بىر يىل',
  58867. yy: '%d يىل',
  58868. },
  58869. dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
  58870. ordinal: function (number, period) {
  58871. switch (period) {
  58872. case 'd':
  58873. case 'D':
  58874. case 'DDD':
  58875. return number + '-كۈنى';
  58876. case 'w':
  58877. case 'W':
  58878. return number + '-ھەپتە';
  58879. default:
  58880. return number;
  58881. }
  58882. },
  58883. preparse: function (string) {
  58884. return string.replace(/،/g, ',');
  58885. },
  58886. postformat: function (string) {
  58887. return string.replace(/,/g, '،');
  58888. },
  58889. week: {
  58890. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  58891. dow: 1, // Monday is the first day of the week.
  58892. doy: 7, // The week that contains Jan 1st is the first week of the year.
  58893. },
  58894. });
  58895. return ugCn;
  58896. })));
  58897. /***/ }),
  58898. /***/ 67691:
  58899. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58900. //! moment.js locale configuration
  58901. //! locale : Ukrainian [uk]
  58902. //! author : zemlanin : https://github.com/zemlanin
  58903. //! Author : Menelion Elensúle : https://github.com/Oire
  58904. ;(function (global, factory) {
  58905. true ? factory(__webpack_require__(30381)) :
  58906. 0
  58907. }(this, (function (moment) { 'use strict';
  58908. //! moment.js locale configuration
  58909. function plural(word, num) {
  58910. var forms = word.split('_');
  58911. return num % 10 === 1 && num % 100 !== 11
  58912. ? forms[0]
  58913. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  58914. ? forms[1]
  58915. : forms[2];
  58916. }
  58917. function relativeTimeWithPlural(number, withoutSuffix, key) {
  58918. var format = {
  58919. ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
  58920. mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  58921. hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  58922. dd: 'день_дні_днів',
  58923. MM: 'місяць_місяці_місяців',
  58924. yy: 'рік_роки_років',
  58925. };
  58926. if (key === 'm') {
  58927. return withoutSuffix ? 'хвилина' : 'хвилину';
  58928. } else if (key === 'h') {
  58929. return withoutSuffix ? 'година' : 'годину';
  58930. } else {
  58931. return number + ' ' + plural(format[key], +number);
  58932. }
  58933. }
  58934. function weekdaysCaseReplace(m, format) {
  58935. var weekdays = {
  58936. nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
  58937. '_'
  58938. ),
  58939. accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
  58940. '_'
  58941. ),
  58942. genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
  58943. '_'
  58944. ),
  58945. },
  58946. nounCase;
  58947. if (m === true) {
  58948. return weekdays['nominative']
  58949. .slice(1, 7)
  58950. .concat(weekdays['nominative'].slice(0, 1));
  58951. }
  58952. if (!m) {
  58953. return weekdays['nominative'];
  58954. }
  58955. nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
  58956. ? 'accusative'
  58957. : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
  58958. ? 'genitive'
  58959. : 'nominative';
  58960. return weekdays[nounCase][m.day()];
  58961. }
  58962. function processHoursFunction(str) {
  58963. return function () {
  58964. return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
  58965. };
  58966. }
  58967. var uk = moment.defineLocale('uk', {
  58968. months: {
  58969. format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
  58970. '_'
  58971. ),
  58972. standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
  58973. '_'
  58974. ),
  58975. },
  58976. monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
  58977. '_'
  58978. ),
  58979. weekdays: weekdaysCaseReplace,
  58980. weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  58981. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  58982. longDateFormat: {
  58983. LT: 'HH:mm',
  58984. LTS: 'HH:mm:ss',
  58985. L: 'DD.MM.YYYY',
  58986. LL: 'D MMMM YYYY р.',
  58987. LLL: 'D MMMM YYYY р., HH:mm',
  58988. LLLL: 'dddd, D MMMM YYYY р., HH:mm',
  58989. },
  58990. calendar: {
  58991. sameDay: processHoursFunction('[Сьогодні '),
  58992. nextDay: processHoursFunction('[Завтра '),
  58993. lastDay: processHoursFunction('[Вчора '),
  58994. nextWeek: processHoursFunction('[У] dddd ['),
  58995. lastWeek: function () {
  58996. switch (this.day()) {
  58997. case 0:
  58998. case 3:
  58999. case 5:
  59000. case 6:
  59001. return processHoursFunction('[Минулої] dddd [').call(this);
  59002. case 1:
  59003. case 2:
  59004. case 4:
  59005. return processHoursFunction('[Минулого] dddd [').call(this);
  59006. }
  59007. },
  59008. sameElse: 'L',
  59009. },
  59010. relativeTime: {
  59011. future: 'за %s',
  59012. past: '%s тому',
  59013. s: 'декілька секунд',
  59014. ss: relativeTimeWithPlural,
  59015. m: relativeTimeWithPlural,
  59016. mm: relativeTimeWithPlural,
  59017. h: 'годину',
  59018. hh: relativeTimeWithPlural,
  59019. d: 'день',
  59020. dd: relativeTimeWithPlural,
  59021. M: 'місяць',
  59022. MM: relativeTimeWithPlural,
  59023. y: 'рік',
  59024. yy: relativeTimeWithPlural,
  59025. },
  59026. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  59027. meridiemParse: /ночі|ранку|дня|вечора/,
  59028. isPM: function (input) {
  59029. return /^(дня|вечора)$/.test(input);
  59030. },
  59031. meridiem: function (hour, minute, isLower) {
  59032. if (hour < 4) {
  59033. return 'ночі';
  59034. } else if (hour < 12) {
  59035. return 'ранку';
  59036. } else if (hour < 17) {
  59037. return 'дня';
  59038. } else {
  59039. return 'вечора';
  59040. }
  59041. },
  59042. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  59043. ordinal: function (number, period) {
  59044. switch (period) {
  59045. case 'M':
  59046. case 'd':
  59047. case 'DDD':
  59048. case 'w':
  59049. case 'W':
  59050. return number + '-й';
  59051. case 'D':
  59052. return number + '-го';
  59053. default:
  59054. return number;
  59055. }
  59056. },
  59057. week: {
  59058. dow: 1, // Monday is the first day of the week.
  59059. doy: 7, // The week that contains Jan 7th is the first week of the year.
  59060. },
  59061. });
  59062. return uk;
  59063. })));
  59064. /***/ }),
  59065. /***/ 13795:
  59066. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59067. //! moment.js locale configuration
  59068. //! locale : Urdu [ur]
  59069. //! author : Sawood Alam : https://github.com/ibnesayeed
  59070. //! author : Zack : https://github.com/ZackVision
  59071. ;(function (global, factory) {
  59072. true ? factory(__webpack_require__(30381)) :
  59073. 0
  59074. }(this, (function (moment) { 'use strict';
  59075. //! moment.js locale configuration
  59076. var months = [
  59077. 'جنوری',
  59078. 'فروری',
  59079. 'مارچ',
  59080. 'اپریل',
  59081. 'مئی',
  59082. 'جون',
  59083. 'جولائی',
  59084. 'اگست',
  59085. 'ستمبر',
  59086. 'اکتوبر',
  59087. 'نومبر',
  59088. 'دسمبر',
  59089. ],
  59090. days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
  59091. var ur = moment.defineLocale('ur', {
  59092. months: months,
  59093. monthsShort: months,
  59094. weekdays: days,
  59095. weekdaysShort: days,
  59096. weekdaysMin: days,
  59097. longDateFormat: {
  59098. LT: 'HH:mm',
  59099. LTS: 'HH:mm:ss',
  59100. L: 'DD/MM/YYYY',
  59101. LL: 'D MMMM YYYY',
  59102. LLL: 'D MMMM YYYY HH:mm',
  59103. LLLL: 'dddd، D MMMM YYYY HH:mm',
  59104. },
  59105. meridiemParse: /صبح|شام/,
  59106. isPM: function (input) {
  59107. return 'شام' === input;
  59108. },
  59109. meridiem: function (hour, minute, isLower) {
  59110. if (hour < 12) {
  59111. return 'صبح';
  59112. }
  59113. return 'شام';
  59114. },
  59115. calendar: {
  59116. sameDay: '[آج بوقت] LT',
  59117. nextDay: '[کل بوقت] LT',
  59118. nextWeek: 'dddd [بوقت] LT',
  59119. lastDay: '[گذشتہ روز بوقت] LT',
  59120. lastWeek: '[گذشتہ] dddd [بوقت] LT',
  59121. sameElse: 'L',
  59122. },
  59123. relativeTime: {
  59124. future: '%s بعد',
  59125. past: '%s قبل',
  59126. s: 'چند سیکنڈ',
  59127. ss: '%d سیکنڈ',
  59128. m: 'ایک منٹ',
  59129. mm: '%d منٹ',
  59130. h: 'ایک گھنٹہ',
  59131. hh: '%d گھنٹے',
  59132. d: 'ایک دن',
  59133. dd: '%d دن',
  59134. M: 'ایک ماہ',
  59135. MM: '%d ماہ',
  59136. y: 'ایک سال',
  59137. yy: '%d سال',
  59138. },
  59139. preparse: function (string) {
  59140. return string.replace(/،/g, ',');
  59141. },
  59142. postformat: function (string) {
  59143. return string.replace(/,/g, '،');
  59144. },
  59145. week: {
  59146. dow: 1, // Monday is the first day of the week.
  59147. doy: 4, // The week that contains Jan 4th is the first week of the year.
  59148. },
  59149. });
  59150. return ur;
  59151. })));
  59152. /***/ }),
  59153. /***/ 60588:
  59154. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59155. //! moment.js locale configuration
  59156. //! locale : Uzbek Latin [uz-latn]
  59157. //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
  59158. ;(function (global, factory) {
  59159. true ? factory(__webpack_require__(30381)) :
  59160. 0
  59161. }(this, (function (moment) { 'use strict';
  59162. //! moment.js locale configuration
  59163. var uzLatn = moment.defineLocale('uz-latn', {
  59164. months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
  59165. '_'
  59166. ),
  59167. monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
  59168. weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
  59169. '_'
  59170. ),
  59171. weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
  59172. weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
  59173. longDateFormat: {
  59174. LT: 'HH:mm',
  59175. LTS: 'HH:mm:ss',
  59176. L: 'DD/MM/YYYY',
  59177. LL: 'D MMMM YYYY',
  59178. LLL: 'D MMMM YYYY HH:mm',
  59179. LLLL: 'D MMMM YYYY, dddd HH:mm',
  59180. },
  59181. calendar: {
  59182. sameDay: '[Bugun soat] LT [da]',
  59183. nextDay: '[Ertaga] LT [da]',
  59184. nextWeek: 'dddd [kuni soat] LT [da]',
  59185. lastDay: '[Kecha soat] LT [da]',
  59186. lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
  59187. sameElse: 'L',
  59188. },
  59189. relativeTime: {
  59190. future: 'Yaqin %s ichida',
  59191. past: 'Bir necha %s oldin',
  59192. s: 'soniya',
  59193. ss: '%d soniya',
  59194. m: 'bir daqiqa',
  59195. mm: '%d daqiqa',
  59196. h: 'bir soat',
  59197. hh: '%d soat',
  59198. d: 'bir kun',
  59199. dd: '%d kun',
  59200. M: 'bir oy',
  59201. MM: '%d oy',
  59202. y: 'bir yil',
  59203. yy: '%d yil',
  59204. },
  59205. week: {
  59206. dow: 1, // Monday is the first day of the week.
  59207. doy: 7, // The week that contains Jan 7th is the first week of the year.
  59208. },
  59209. });
  59210. return uzLatn;
  59211. })));
  59212. /***/ }),
  59213. /***/ 6791:
  59214. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59215. //! moment.js locale configuration
  59216. //! locale : Uzbek [uz]
  59217. //! author : Sardor Muminov : https://github.com/muminoff
  59218. ;(function (global, factory) {
  59219. true ? factory(__webpack_require__(30381)) :
  59220. 0
  59221. }(this, (function (moment) { 'use strict';
  59222. //! moment.js locale configuration
  59223. var uz = moment.defineLocale('uz', {
  59224. months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
  59225. '_'
  59226. ),
  59227. monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  59228. weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
  59229. weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
  59230. weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
  59231. longDateFormat: {
  59232. LT: 'HH:mm',
  59233. LTS: 'HH:mm:ss',
  59234. L: 'DD/MM/YYYY',
  59235. LL: 'D MMMM YYYY',
  59236. LLL: 'D MMMM YYYY HH:mm',
  59237. LLLL: 'D MMMM YYYY, dddd HH:mm',
  59238. },
  59239. calendar: {
  59240. sameDay: '[Бугун соат] LT [да]',
  59241. nextDay: '[Эртага] LT [да]',
  59242. nextWeek: 'dddd [куни соат] LT [да]',
  59243. lastDay: '[Кеча соат] LT [да]',
  59244. lastWeek: '[Утган] dddd [куни соат] LT [да]',
  59245. sameElse: 'L',
  59246. },
  59247. relativeTime: {
  59248. future: 'Якин %s ичида',
  59249. past: 'Бир неча %s олдин',
  59250. s: 'фурсат',
  59251. ss: '%d фурсат',
  59252. m: 'бир дакика',
  59253. mm: '%d дакика',
  59254. h: 'бир соат',
  59255. hh: '%d соат',
  59256. d: 'бир кун',
  59257. dd: '%d кун',
  59258. M: 'бир ой',
  59259. MM: '%d ой',
  59260. y: 'бир йил',
  59261. yy: '%d йил',
  59262. },
  59263. week: {
  59264. dow: 1, // Monday is the first day of the week.
  59265. doy: 7, // The week that contains Jan 4th is the first week of the year.
  59266. },
  59267. });
  59268. return uz;
  59269. })));
  59270. /***/ }),
  59271. /***/ 65666:
  59272. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59273. //! moment.js locale configuration
  59274. //! locale : Vietnamese [vi]
  59275. //! author : Bang Nguyen : https://github.com/bangnk
  59276. //! author : Chien Kira : https://github.com/chienkira
  59277. ;(function (global, factory) {
  59278. true ? factory(__webpack_require__(30381)) :
  59279. 0
  59280. }(this, (function (moment) { 'use strict';
  59281. //! moment.js locale configuration
  59282. var vi = moment.defineLocale('vi', {
  59283. months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
  59284. '_'
  59285. ),
  59286. monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
  59287. '_'
  59288. ),
  59289. monthsParseExact: true,
  59290. weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
  59291. '_'
  59292. ),
  59293. weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  59294. weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  59295. weekdaysParseExact: true,
  59296. meridiemParse: /sa|ch/i,
  59297. isPM: function (input) {
  59298. return /^ch$/i.test(input);
  59299. },
  59300. meridiem: function (hours, minutes, isLower) {
  59301. if (hours < 12) {
  59302. return isLower ? 'sa' : 'SA';
  59303. } else {
  59304. return isLower ? 'ch' : 'CH';
  59305. }
  59306. },
  59307. longDateFormat: {
  59308. LT: 'HH:mm',
  59309. LTS: 'HH:mm:ss',
  59310. L: 'DD/MM/YYYY',
  59311. LL: 'D MMMM [năm] YYYY',
  59312. LLL: 'D MMMM [năm] YYYY HH:mm',
  59313. LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
  59314. l: 'DD/M/YYYY',
  59315. ll: 'D MMM YYYY',
  59316. lll: 'D MMM YYYY HH:mm',
  59317. llll: 'ddd, D MMM YYYY HH:mm',
  59318. },
  59319. calendar: {
  59320. sameDay: '[Hôm nay lúc] LT',
  59321. nextDay: '[Ngày mai lúc] LT',
  59322. nextWeek: 'dddd [tuần tới lúc] LT',
  59323. lastDay: '[Hôm qua lúc] LT',
  59324. lastWeek: 'dddd [tuần trước lúc] LT',
  59325. sameElse: 'L',
  59326. },
  59327. relativeTime: {
  59328. future: '%s tới',
  59329. past: '%s trước',
  59330. s: 'vài giây',
  59331. ss: '%d giây',
  59332. m: 'một phút',
  59333. mm: '%d phút',
  59334. h: 'một giờ',
  59335. hh: '%d giờ',
  59336. d: 'một ngày',
  59337. dd: '%d ngày',
  59338. w: 'một tuần',
  59339. ww: '%d tuần',
  59340. M: 'một tháng',
  59341. MM: '%d tháng',
  59342. y: 'một năm',
  59343. yy: '%d năm',
  59344. },
  59345. dayOfMonthOrdinalParse: /\d{1,2}/,
  59346. ordinal: function (number) {
  59347. return number;
  59348. },
  59349. week: {
  59350. dow: 1, // Monday is the first day of the week.
  59351. doy: 4, // The week that contains Jan 4th is the first week of the year.
  59352. },
  59353. });
  59354. return vi;
  59355. })));
  59356. /***/ }),
  59357. /***/ 14378:
  59358. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59359. //! moment.js locale configuration
  59360. //! locale : Pseudo [x-pseudo]
  59361. //! author : Andrew Hood : https://github.com/andrewhood125
  59362. ;(function (global, factory) {
  59363. true ? factory(__webpack_require__(30381)) :
  59364. 0
  59365. }(this, (function (moment) { 'use strict';
  59366. //! moment.js locale configuration
  59367. var xPseudo = moment.defineLocale('x-pseudo', {
  59368. months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
  59369. '_'
  59370. ),
  59371. monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
  59372. '_'
  59373. ),
  59374. monthsParseExact: true,
  59375. weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
  59376. '_'
  59377. ),
  59378. weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
  59379. weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
  59380. weekdaysParseExact: true,
  59381. longDateFormat: {
  59382. LT: 'HH:mm',
  59383. L: 'DD/MM/YYYY',
  59384. LL: 'D MMMM YYYY',
  59385. LLL: 'D MMMM YYYY HH:mm',
  59386. LLLL: 'dddd, D MMMM YYYY HH:mm',
  59387. },
  59388. calendar: {
  59389. sameDay: '[T~ódá~ý át] LT',
  59390. nextDay: '[T~ómó~rró~w át] LT',
  59391. nextWeek: 'dddd [át] LT',
  59392. lastDay: '[Ý~ést~érdá~ý át] LT',
  59393. lastWeek: '[L~ást] dddd [át] LT',
  59394. sameElse: 'L',
  59395. },
  59396. relativeTime: {
  59397. future: 'í~ñ %s',
  59398. past: '%s á~gó',
  59399. s: 'á ~féw ~sécó~ñds',
  59400. ss: '%d s~écóñ~ds',
  59401. m: 'á ~míñ~úté',
  59402. mm: '%d m~íñú~tés',
  59403. h: 'á~ñ hó~úr',
  59404. hh: '%d h~óúrs',
  59405. d: 'á ~dáý',
  59406. dd: '%d d~áýs',
  59407. M: 'á ~móñ~th',
  59408. MM: '%d m~óñt~hs',
  59409. y: 'á ~ýéár',
  59410. yy: '%d ý~éárs',
  59411. },
  59412. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  59413. ordinal: function (number) {
  59414. var b = number % 10,
  59415. output =
  59416. ~~((number % 100) / 10) === 1
  59417. ? 'th'
  59418. : b === 1
  59419. ? 'st'
  59420. : b === 2
  59421. ? 'nd'
  59422. : b === 3
  59423. ? 'rd'
  59424. : 'th';
  59425. return number + output;
  59426. },
  59427. week: {
  59428. dow: 1, // Monday is the first day of the week.
  59429. doy: 4, // The week that contains Jan 4th is the first week of the year.
  59430. },
  59431. });
  59432. return xPseudo;
  59433. })));
  59434. /***/ }),
  59435. /***/ 75805:
  59436. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59437. //! moment.js locale configuration
  59438. //! locale : Yoruba Nigeria [yo]
  59439. //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
  59440. ;(function (global, factory) {
  59441. true ? factory(__webpack_require__(30381)) :
  59442. 0
  59443. }(this, (function (moment) { 'use strict';
  59444. //! moment.js locale configuration
  59445. var yo = moment.defineLocale('yo', {
  59446. months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
  59447. '_'
  59448. ),
  59449. monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
  59450. weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
  59451. weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
  59452. weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
  59453. longDateFormat: {
  59454. LT: 'h:mm A',
  59455. LTS: 'h:mm:ss A',
  59456. L: 'DD/MM/YYYY',
  59457. LL: 'D MMMM YYYY',
  59458. LLL: 'D MMMM YYYY h:mm A',
  59459. LLLL: 'dddd, D MMMM YYYY h:mm A',
  59460. },
  59461. calendar: {
  59462. sameDay: '[Ònì ni] LT',
  59463. nextDay: '[Ọ̀la ni] LT',
  59464. nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
  59465. lastDay: '[Àna ni] LT',
  59466. lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
  59467. sameElse: 'L',
  59468. },
  59469. relativeTime: {
  59470. future: 'ní %s',
  59471. past: '%s kọjá',
  59472. s: 'ìsẹjú aayá die',
  59473. ss: 'aayá %d',
  59474. m: 'ìsẹjú kan',
  59475. mm: 'ìsẹjú %d',
  59476. h: 'wákati kan',
  59477. hh: 'wákati %d',
  59478. d: 'ọjọ́ kan',
  59479. dd: 'ọjọ́ %d',
  59480. M: 'osù kan',
  59481. MM: 'osù %d',
  59482. y: 'ọdún kan',
  59483. yy: 'ọdún %d',
  59484. },
  59485. dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
  59486. ordinal: 'ọjọ́ %d',
  59487. week: {
  59488. dow: 1, // Monday is the first day of the week.
  59489. doy: 4, // The week that contains Jan 4th is the first week of the year.
  59490. },
  59491. });
  59492. return yo;
  59493. })));
  59494. /***/ }),
  59495. /***/ 83839:
  59496. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59497. //! moment.js locale configuration
  59498. //! locale : Chinese (China) [zh-cn]
  59499. //! author : suupic : https://github.com/suupic
  59500. //! author : Zeno Zeng : https://github.com/zenozeng
  59501. //! author : uu109 : https://github.com/uu109
  59502. ;(function (global, factory) {
  59503. true ? factory(__webpack_require__(30381)) :
  59504. 0
  59505. }(this, (function (moment) { 'use strict';
  59506. //! moment.js locale configuration
  59507. var zhCn = moment.defineLocale('zh-cn', {
  59508. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  59509. '_'
  59510. ),
  59511. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  59512. '_'
  59513. ),
  59514. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  59515. weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  59516. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  59517. longDateFormat: {
  59518. LT: 'HH:mm',
  59519. LTS: 'HH:mm:ss',
  59520. L: 'YYYY/MM/DD',
  59521. LL: 'YYYY年M月D日',
  59522. LLL: 'YYYY年M月D日Ah点mm分',
  59523. LLLL: 'YYYY年M月D日ddddAh点mm分',
  59524. l: 'YYYY/M/D',
  59525. ll: 'YYYY年M月D日',
  59526. lll: 'YYYY年M月D日 HH:mm',
  59527. llll: 'YYYY年M月D日dddd HH:mm',
  59528. },
  59529. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  59530. meridiemHour: function (hour, meridiem) {
  59531. if (hour === 12) {
  59532. hour = 0;
  59533. }
  59534. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  59535. return hour;
  59536. } else if (meridiem === '下午' || meridiem === '晚上') {
  59537. return hour + 12;
  59538. } else {
  59539. // '中午'
  59540. return hour >= 11 ? hour : hour + 12;
  59541. }
  59542. },
  59543. meridiem: function (hour, minute, isLower) {
  59544. var hm = hour * 100 + minute;
  59545. if (hm < 600) {
  59546. return '凌晨';
  59547. } else if (hm < 900) {
  59548. return '早上';
  59549. } else if (hm < 1130) {
  59550. return '上午';
  59551. } else if (hm < 1230) {
  59552. return '中午';
  59553. } else if (hm < 1800) {
  59554. return '下午';
  59555. } else {
  59556. return '晚上';
  59557. }
  59558. },
  59559. calendar: {
  59560. sameDay: '[今天]LT',
  59561. nextDay: '[明天]LT',
  59562. nextWeek: function (now) {
  59563. if (now.week() !== this.week()) {
  59564. return '[下]dddLT';
  59565. } else {
  59566. return '[本]dddLT';
  59567. }
  59568. },
  59569. lastDay: '[昨天]LT',
  59570. lastWeek: function (now) {
  59571. if (this.week() !== now.week()) {
  59572. return '[上]dddLT';
  59573. } else {
  59574. return '[本]dddLT';
  59575. }
  59576. },
  59577. sameElse: 'L',
  59578. },
  59579. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  59580. ordinal: function (number, period) {
  59581. switch (period) {
  59582. case 'd':
  59583. case 'D':
  59584. case 'DDD':
  59585. return number + '日';
  59586. case 'M':
  59587. return number + '月';
  59588. case 'w':
  59589. case 'W':
  59590. return number + '周';
  59591. default:
  59592. return number;
  59593. }
  59594. },
  59595. relativeTime: {
  59596. future: '%s后',
  59597. past: '%s前',
  59598. s: '几秒',
  59599. ss: '%d 秒',
  59600. m: '1 分钟',
  59601. mm: '%d 分钟',
  59602. h: '1 小时',
  59603. hh: '%d 小时',
  59604. d: '1 天',
  59605. dd: '%d 天',
  59606. w: '1 周',
  59607. ww: '%d 周',
  59608. M: '1 个月',
  59609. MM: '%d 个月',
  59610. y: '1 年',
  59611. yy: '%d 年',
  59612. },
  59613. week: {
  59614. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  59615. dow: 1, // Monday is the first day of the week.
  59616. doy: 4, // The week that contains Jan 4th is the first week of the year.
  59617. },
  59618. });
  59619. return zhCn;
  59620. })));
  59621. /***/ }),
  59622. /***/ 55726:
  59623. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59624. //! moment.js locale configuration
  59625. //! locale : Chinese (Hong Kong) [zh-hk]
  59626. //! author : Ben : https://github.com/ben-lin
  59627. //! author : Chris Lam : https://github.com/hehachris
  59628. //! author : Konstantin : https://github.com/skfd
  59629. //! author : Anthony : https://github.com/anthonylau
  59630. ;(function (global, factory) {
  59631. true ? factory(__webpack_require__(30381)) :
  59632. 0
  59633. }(this, (function (moment) { 'use strict';
  59634. //! moment.js locale configuration
  59635. var zhHk = moment.defineLocale('zh-hk', {
  59636. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  59637. '_'
  59638. ),
  59639. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  59640. '_'
  59641. ),
  59642. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  59643. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  59644. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  59645. longDateFormat: {
  59646. LT: 'HH:mm',
  59647. LTS: 'HH:mm:ss',
  59648. L: 'YYYY/MM/DD',
  59649. LL: 'YYYY年M月D日',
  59650. LLL: 'YYYY年M月D日 HH:mm',
  59651. LLLL: 'YYYY年M月D日dddd HH:mm',
  59652. l: 'YYYY/M/D',
  59653. ll: 'YYYY年M月D日',
  59654. lll: 'YYYY年M月D日 HH:mm',
  59655. llll: 'YYYY年M月D日dddd HH:mm',
  59656. },
  59657. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  59658. meridiemHour: function (hour, meridiem) {
  59659. if (hour === 12) {
  59660. hour = 0;
  59661. }
  59662. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  59663. return hour;
  59664. } else if (meridiem === '中午') {
  59665. return hour >= 11 ? hour : hour + 12;
  59666. } else if (meridiem === '下午' || meridiem === '晚上') {
  59667. return hour + 12;
  59668. }
  59669. },
  59670. meridiem: function (hour, minute, isLower) {
  59671. var hm = hour * 100 + minute;
  59672. if (hm < 600) {
  59673. return '凌晨';
  59674. } else if (hm < 900) {
  59675. return '早上';
  59676. } else if (hm < 1200) {
  59677. return '上午';
  59678. } else if (hm === 1200) {
  59679. return '中午';
  59680. } else if (hm < 1800) {
  59681. return '下午';
  59682. } else {
  59683. return '晚上';
  59684. }
  59685. },
  59686. calendar: {
  59687. sameDay: '[今天]LT',
  59688. nextDay: '[明天]LT',
  59689. nextWeek: '[下]ddddLT',
  59690. lastDay: '[昨天]LT',
  59691. lastWeek: '[上]ddddLT',
  59692. sameElse: 'L',
  59693. },
  59694. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  59695. ordinal: function (number, period) {
  59696. switch (period) {
  59697. case 'd':
  59698. case 'D':
  59699. case 'DDD':
  59700. return number + '日';
  59701. case 'M':
  59702. return number + '月';
  59703. case 'w':
  59704. case 'W':
  59705. return number + '週';
  59706. default:
  59707. return number;
  59708. }
  59709. },
  59710. relativeTime: {
  59711. future: '%s後',
  59712. past: '%s前',
  59713. s: '幾秒',
  59714. ss: '%d 秒',
  59715. m: '1 分鐘',
  59716. mm: '%d 分鐘',
  59717. h: '1 小時',
  59718. hh: '%d 小時',
  59719. d: '1 天',
  59720. dd: '%d 天',
  59721. M: '1 個月',
  59722. MM: '%d 個月',
  59723. y: '1 年',
  59724. yy: '%d 年',
  59725. },
  59726. });
  59727. return zhHk;
  59728. })));
  59729. /***/ }),
  59730. /***/ 99807:
  59731. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59732. //! moment.js locale configuration
  59733. //! locale : Chinese (Macau) [zh-mo]
  59734. //! author : Ben : https://github.com/ben-lin
  59735. //! author : Chris Lam : https://github.com/hehachris
  59736. //! author : Tan Yuanhong : https://github.com/le0tan
  59737. ;(function (global, factory) {
  59738. true ? factory(__webpack_require__(30381)) :
  59739. 0
  59740. }(this, (function (moment) { 'use strict';
  59741. //! moment.js locale configuration
  59742. var zhMo = moment.defineLocale('zh-mo', {
  59743. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  59744. '_'
  59745. ),
  59746. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  59747. '_'
  59748. ),
  59749. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  59750. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  59751. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  59752. longDateFormat: {
  59753. LT: 'HH:mm',
  59754. LTS: 'HH:mm:ss',
  59755. L: 'DD/MM/YYYY',
  59756. LL: 'YYYY年M月D日',
  59757. LLL: 'YYYY年M月D日 HH:mm',
  59758. LLLL: 'YYYY年M月D日dddd HH:mm',
  59759. l: 'D/M/YYYY',
  59760. ll: 'YYYY年M月D日',
  59761. lll: 'YYYY年M月D日 HH:mm',
  59762. llll: 'YYYY年M月D日dddd HH:mm',
  59763. },
  59764. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  59765. meridiemHour: function (hour, meridiem) {
  59766. if (hour === 12) {
  59767. hour = 0;
  59768. }
  59769. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  59770. return hour;
  59771. } else if (meridiem === '中午') {
  59772. return hour >= 11 ? hour : hour + 12;
  59773. } else if (meridiem === '下午' || meridiem === '晚上') {
  59774. return hour + 12;
  59775. }
  59776. },
  59777. meridiem: function (hour, minute, isLower) {
  59778. var hm = hour * 100 + minute;
  59779. if (hm < 600) {
  59780. return '凌晨';
  59781. } else if (hm < 900) {
  59782. return '早上';
  59783. } else if (hm < 1130) {
  59784. return '上午';
  59785. } else if (hm < 1230) {
  59786. return '中午';
  59787. } else if (hm < 1800) {
  59788. return '下午';
  59789. } else {
  59790. return '晚上';
  59791. }
  59792. },
  59793. calendar: {
  59794. sameDay: '[今天] LT',
  59795. nextDay: '[明天] LT',
  59796. nextWeek: '[下]dddd LT',
  59797. lastDay: '[昨天] LT',
  59798. lastWeek: '[上]dddd LT',
  59799. sameElse: 'L',
  59800. },
  59801. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  59802. ordinal: function (number, period) {
  59803. switch (period) {
  59804. case 'd':
  59805. case 'D':
  59806. case 'DDD':
  59807. return number + '日';
  59808. case 'M':
  59809. return number + '月';
  59810. case 'w':
  59811. case 'W':
  59812. return number + '週';
  59813. default:
  59814. return number;
  59815. }
  59816. },
  59817. relativeTime: {
  59818. future: '%s內',
  59819. past: '%s前',
  59820. s: '幾秒',
  59821. ss: '%d 秒',
  59822. m: '1 分鐘',
  59823. mm: '%d 分鐘',
  59824. h: '1 小時',
  59825. hh: '%d 小時',
  59826. d: '1 天',
  59827. dd: '%d 天',
  59828. M: '1 個月',
  59829. MM: '%d 個月',
  59830. y: '1 年',
  59831. yy: '%d 年',
  59832. },
  59833. });
  59834. return zhMo;
  59835. })));
  59836. /***/ }),
  59837. /***/ 74152:
  59838. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  59839. //! moment.js locale configuration
  59840. //! locale : Chinese (Taiwan) [zh-tw]
  59841. //! author : Ben : https://github.com/ben-lin
  59842. //! author : Chris Lam : https://github.com/hehachris
  59843. ;(function (global, factory) {
  59844. true ? factory(__webpack_require__(30381)) :
  59845. 0
  59846. }(this, (function (moment) { 'use strict';
  59847. //! moment.js locale configuration
  59848. var zhTw = moment.defineLocale('zh-tw', {
  59849. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  59850. '_'
  59851. ),
  59852. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  59853. '_'
  59854. ),
  59855. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  59856. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  59857. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  59858. longDateFormat: {
  59859. LT: 'HH:mm',
  59860. LTS: 'HH:mm:ss',
  59861. L: 'YYYY/MM/DD',
  59862. LL: 'YYYY年M月D日',
  59863. LLL: 'YYYY年M月D日 HH:mm',
  59864. LLLL: 'YYYY年M月D日dddd HH:mm',
  59865. l: 'YYYY/M/D',
  59866. ll: 'YYYY年M月D日',
  59867. lll: 'YYYY年M月D日 HH:mm',
  59868. llll: 'YYYY年M月D日dddd HH:mm',
  59869. },
  59870. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  59871. meridiemHour: function (hour, meridiem) {
  59872. if (hour === 12) {
  59873. hour = 0;
  59874. }
  59875. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  59876. return hour;
  59877. } else if (meridiem === '中午') {
  59878. return hour >= 11 ? hour : hour + 12;
  59879. } else if (meridiem === '下午' || meridiem === '晚上') {
  59880. return hour + 12;
  59881. }
  59882. },
  59883. meridiem: function (hour, minute, isLower) {
  59884. var hm = hour * 100 + minute;
  59885. if (hm < 600) {
  59886. return '凌晨';
  59887. } else if (hm < 900) {
  59888. return '早上';
  59889. } else if (hm < 1130) {
  59890. return '上午';
  59891. } else if (hm < 1230) {
  59892. return '中午';
  59893. } else if (hm < 1800) {
  59894. return '下午';
  59895. } else {
  59896. return '晚上';
  59897. }
  59898. },
  59899. calendar: {
  59900. sameDay: '[今天] LT',
  59901. nextDay: '[明天] LT',
  59902. nextWeek: '[下]dddd LT',
  59903. lastDay: '[昨天] LT',
  59904. lastWeek: '[上]dddd LT',
  59905. sameElse: 'L',
  59906. },
  59907. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  59908. ordinal: function (number, period) {
  59909. switch (period) {
  59910. case 'd':
  59911. case 'D':
  59912. case 'DDD':
  59913. return number + '日';
  59914. case 'M':
  59915. return number + '月';
  59916. case 'w':
  59917. case 'W':
  59918. return number + '週';
  59919. default:
  59920. return number;
  59921. }
  59922. },
  59923. relativeTime: {
  59924. future: '%s後',
  59925. past: '%s前',
  59926. s: '幾秒',
  59927. ss: '%d 秒',
  59928. m: '1 分鐘',
  59929. mm: '%d 分鐘',
  59930. h: '1 小時',
  59931. hh: '%d 小時',
  59932. d: '1 天',
  59933. dd: '%d 天',
  59934. M: '1 個月',
  59935. MM: '%d 個月',
  59936. y: '1 年',
  59937. yy: '%d 年',
  59938. },
  59939. });
  59940. return zhTw;
  59941. })));
  59942. /***/ }),
  59943. /***/ 30381:
  59944. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59945. /* module decorator */ module = __webpack_require__.nmd(module);
  59946. //! moment.js
  59947. //! version : 2.29.1
  59948. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  59949. //! license : MIT
  59950. //! momentjs.com
  59951. ;(function (global, factory) {
  59952. true ? module.exports = factory() :
  59953. 0
  59954. }(this, (function () { 'use strict';
  59955. var hookCallback;
  59956. function hooks() {
  59957. return hookCallback.apply(null, arguments);
  59958. }
  59959. // This is done to register the method called with moment()
  59960. // without creating circular dependencies.
  59961. function setHookCallback(callback) {
  59962. hookCallback = callback;
  59963. }
  59964. function isArray(input) {
  59965. return (
  59966. input instanceof Array ||
  59967. Object.prototype.toString.call(input) === '[object Array]'
  59968. );
  59969. }
  59970. function isObject(input) {
  59971. // IE8 will treat undefined and null as object if it wasn't for
  59972. // input != null
  59973. return (
  59974. input != null &&
  59975. Object.prototype.toString.call(input) === '[object Object]'
  59976. );
  59977. }
  59978. function hasOwnProp(a, b) {
  59979. return Object.prototype.hasOwnProperty.call(a, b);
  59980. }
  59981. function isObjectEmpty(obj) {
  59982. if (Object.getOwnPropertyNames) {
  59983. return Object.getOwnPropertyNames(obj).length === 0;
  59984. } else {
  59985. var k;
  59986. for (k in obj) {
  59987. if (hasOwnProp(obj, k)) {
  59988. return false;
  59989. }
  59990. }
  59991. return true;
  59992. }
  59993. }
  59994. function isUndefined(input) {
  59995. return input === void 0;
  59996. }
  59997. function isNumber(input) {
  59998. return (
  59999. typeof input === 'number' ||
  60000. Object.prototype.toString.call(input) === '[object Number]'
  60001. );
  60002. }
  60003. function isDate(input) {
  60004. return (
  60005. input instanceof Date ||
  60006. Object.prototype.toString.call(input) === '[object Date]'
  60007. );
  60008. }
  60009. function map(arr, fn) {
  60010. var res = [],
  60011. i;
  60012. for (i = 0; i < arr.length; ++i) {
  60013. res.push(fn(arr[i], i));
  60014. }
  60015. return res;
  60016. }
  60017. function extend(a, b) {
  60018. for (var i in b) {
  60019. if (hasOwnProp(b, i)) {
  60020. a[i] = b[i];
  60021. }
  60022. }
  60023. if (hasOwnProp(b, 'toString')) {
  60024. a.toString = b.toString;
  60025. }
  60026. if (hasOwnProp(b, 'valueOf')) {
  60027. a.valueOf = b.valueOf;
  60028. }
  60029. return a;
  60030. }
  60031. function createUTC(input, format, locale, strict) {
  60032. return createLocalOrUTC(input, format, locale, strict, true).utc();
  60033. }
  60034. function defaultParsingFlags() {
  60035. // We need to deep clone this object.
  60036. return {
  60037. empty: false,
  60038. unusedTokens: [],
  60039. unusedInput: [],
  60040. overflow: -2,
  60041. charsLeftOver: 0,
  60042. nullInput: false,
  60043. invalidEra: null,
  60044. invalidMonth: null,
  60045. invalidFormat: false,
  60046. userInvalidated: false,
  60047. iso: false,
  60048. parsedDateParts: [],
  60049. era: null,
  60050. meridiem: null,
  60051. rfc2822: false,
  60052. weekdayMismatch: false,
  60053. };
  60054. }
  60055. function getParsingFlags(m) {
  60056. if (m._pf == null) {
  60057. m._pf = defaultParsingFlags();
  60058. }
  60059. return m._pf;
  60060. }
  60061. var some;
  60062. if (Array.prototype.some) {
  60063. some = Array.prototype.some;
  60064. } else {
  60065. some = function (fun) {
  60066. var t = Object(this),
  60067. len = t.length >>> 0,
  60068. i;
  60069. for (i = 0; i < len; i++) {
  60070. if (i in t && fun.call(this, t[i], i, t)) {
  60071. return true;
  60072. }
  60073. }
  60074. return false;
  60075. };
  60076. }
  60077. function isValid(m) {
  60078. if (m._isValid == null) {
  60079. var flags = getParsingFlags(m),
  60080. parsedParts = some.call(flags.parsedDateParts, function (i) {
  60081. return i != null;
  60082. }),
  60083. isNowValid =
  60084. !isNaN(m._d.getTime()) &&
  60085. flags.overflow < 0 &&
  60086. !flags.empty &&
  60087. !flags.invalidEra &&
  60088. !flags.invalidMonth &&
  60089. !flags.invalidWeekday &&
  60090. !flags.weekdayMismatch &&
  60091. !flags.nullInput &&
  60092. !flags.invalidFormat &&
  60093. !flags.userInvalidated &&
  60094. (!flags.meridiem || (flags.meridiem && parsedParts));
  60095. if (m._strict) {
  60096. isNowValid =
  60097. isNowValid &&
  60098. flags.charsLeftOver === 0 &&
  60099. flags.unusedTokens.length === 0 &&
  60100. flags.bigHour === undefined;
  60101. }
  60102. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  60103. m._isValid = isNowValid;
  60104. } else {
  60105. return isNowValid;
  60106. }
  60107. }
  60108. return m._isValid;
  60109. }
  60110. function createInvalid(flags) {
  60111. var m = createUTC(NaN);
  60112. if (flags != null) {
  60113. extend(getParsingFlags(m), flags);
  60114. } else {
  60115. getParsingFlags(m).userInvalidated = true;
  60116. }
  60117. return m;
  60118. }
  60119. // Plugins that add properties should also add the key here (null value),
  60120. // so we can properly clone ourselves.
  60121. var momentProperties = (hooks.momentProperties = []),
  60122. updateInProgress = false;
  60123. function copyConfig(to, from) {
  60124. var i, prop, val;
  60125. if (!isUndefined(from._isAMomentObject)) {
  60126. to._isAMomentObject = from._isAMomentObject;
  60127. }
  60128. if (!isUndefined(from._i)) {
  60129. to._i = from._i;
  60130. }
  60131. if (!isUndefined(from._f)) {
  60132. to._f = from._f;
  60133. }
  60134. if (!isUndefined(from._l)) {
  60135. to._l = from._l;
  60136. }
  60137. if (!isUndefined(from._strict)) {
  60138. to._strict = from._strict;
  60139. }
  60140. if (!isUndefined(from._tzm)) {
  60141. to._tzm = from._tzm;
  60142. }
  60143. if (!isUndefined(from._isUTC)) {
  60144. to._isUTC = from._isUTC;
  60145. }
  60146. if (!isUndefined(from._offset)) {
  60147. to._offset = from._offset;
  60148. }
  60149. if (!isUndefined(from._pf)) {
  60150. to._pf = getParsingFlags(from);
  60151. }
  60152. if (!isUndefined(from._locale)) {
  60153. to._locale = from._locale;
  60154. }
  60155. if (momentProperties.length > 0) {
  60156. for (i = 0; i < momentProperties.length; i++) {
  60157. prop = momentProperties[i];
  60158. val = from[prop];
  60159. if (!isUndefined(val)) {
  60160. to[prop] = val;
  60161. }
  60162. }
  60163. }
  60164. return to;
  60165. }
  60166. // Moment prototype object
  60167. function Moment(config) {
  60168. copyConfig(this, config);
  60169. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  60170. if (!this.isValid()) {
  60171. this._d = new Date(NaN);
  60172. }
  60173. // Prevent infinite loop in case updateOffset creates new moment
  60174. // objects.
  60175. if (updateInProgress === false) {
  60176. updateInProgress = true;
  60177. hooks.updateOffset(this);
  60178. updateInProgress = false;
  60179. }
  60180. }
  60181. function isMoment(obj) {
  60182. return (
  60183. obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
  60184. );
  60185. }
  60186. function warn(msg) {
  60187. if (
  60188. hooks.suppressDeprecationWarnings === false &&
  60189. typeof console !== 'undefined' &&
  60190. console.warn
  60191. ) {
  60192. console.warn('Deprecation warning: ' + msg);
  60193. }
  60194. }
  60195. function deprecate(msg, fn) {
  60196. var firstTime = true;
  60197. return extend(function () {
  60198. if (hooks.deprecationHandler != null) {
  60199. hooks.deprecationHandler(null, msg);
  60200. }
  60201. if (firstTime) {
  60202. var args = [],
  60203. arg,
  60204. i,
  60205. key;
  60206. for (i = 0; i < arguments.length; i++) {
  60207. arg = '';
  60208. if (typeof arguments[i] === 'object') {
  60209. arg += '\n[' + i + '] ';
  60210. for (key in arguments[0]) {
  60211. if (hasOwnProp(arguments[0], key)) {
  60212. arg += key + ': ' + arguments[0][key] + ', ';
  60213. }
  60214. }
  60215. arg = arg.slice(0, -2); // Remove trailing comma and space
  60216. } else {
  60217. arg = arguments[i];
  60218. }
  60219. args.push(arg);
  60220. }
  60221. warn(
  60222. msg +
  60223. '\nArguments: ' +
  60224. Array.prototype.slice.call(args).join('') +
  60225. '\n' +
  60226. new Error().stack
  60227. );
  60228. firstTime = false;
  60229. }
  60230. return fn.apply(this, arguments);
  60231. }, fn);
  60232. }
  60233. var deprecations = {};
  60234. function deprecateSimple(name, msg) {
  60235. if (hooks.deprecationHandler != null) {
  60236. hooks.deprecationHandler(name, msg);
  60237. }
  60238. if (!deprecations[name]) {
  60239. warn(msg);
  60240. deprecations[name] = true;
  60241. }
  60242. }
  60243. hooks.suppressDeprecationWarnings = false;
  60244. hooks.deprecationHandler = null;
  60245. function isFunction(input) {
  60246. return (
  60247. (typeof Function !== 'undefined' && input instanceof Function) ||
  60248. Object.prototype.toString.call(input) === '[object Function]'
  60249. );
  60250. }
  60251. function set(config) {
  60252. var prop, i;
  60253. for (i in config) {
  60254. if (hasOwnProp(config, i)) {
  60255. prop = config[i];
  60256. if (isFunction(prop)) {
  60257. this[i] = prop;
  60258. } else {
  60259. this['_' + i] = prop;
  60260. }
  60261. }
  60262. }
  60263. this._config = config;
  60264. // Lenient ordinal parsing accepts just a number in addition to
  60265. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  60266. // TODO: Remove "ordinalParse" fallback in next major release.
  60267. this._dayOfMonthOrdinalParseLenient = new RegExp(
  60268. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  60269. '|' +
  60270. /\d{1,2}/.source
  60271. );
  60272. }
  60273. function mergeConfigs(parentConfig, childConfig) {
  60274. var res = extend({}, parentConfig),
  60275. prop;
  60276. for (prop in childConfig) {
  60277. if (hasOwnProp(childConfig, prop)) {
  60278. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  60279. res[prop] = {};
  60280. extend(res[prop], parentConfig[prop]);
  60281. extend(res[prop], childConfig[prop]);
  60282. } else if (childConfig[prop] != null) {
  60283. res[prop] = childConfig[prop];
  60284. } else {
  60285. delete res[prop];
  60286. }
  60287. }
  60288. }
  60289. for (prop in parentConfig) {
  60290. if (
  60291. hasOwnProp(parentConfig, prop) &&
  60292. !hasOwnProp(childConfig, prop) &&
  60293. isObject(parentConfig[prop])
  60294. ) {
  60295. // make sure changes to properties don't modify parent config
  60296. res[prop] = extend({}, res[prop]);
  60297. }
  60298. }
  60299. return res;
  60300. }
  60301. function Locale(config) {
  60302. if (config != null) {
  60303. this.set(config);
  60304. }
  60305. }
  60306. var keys;
  60307. if (Object.keys) {
  60308. keys = Object.keys;
  60309. } else {
  60310. keys = function (obj) {
  60311. var i,
  60312. res = [];
  60313. for (i in obj) {
  60314. if (hasOwnProp(obj, i)) {
  60315. res.push(i);
  60316. }
  60317. }
  60318. return res;
  60319. };
  60320. }
  60321. var defaultCalendar = {
  60322. sameDay: '[Today at] LT',
  60323. nextDay: '[Tomorrow at] LT',
  60324. nextWeek: 'dddd [at] LT',
  60325. lastDay: '[Yesterday at] LT',
  60326. lastWeek: '[Last] dddd [at] LT',
  60327. sameElse: 'L',
  60328. };
  60329. function calendar(key, mom, now) {
  60330. var output = this._calendar[key] || this._calendar['sameElse'];
  60331. return isFunction(output) ? output.call(mom, now) : output;
  60332. }
  60333. function zeroFill(number, targetLength, forceSign) {
  60334. var absNumber = '' + Math.abs(number),
  60335. zerosToFill = targetLength - absNumber.length,
  60336. sign = number >= 0;
  60337. return (
  60338. (sign ? (forceSign ? '+' : '') : '-') +
  60339. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
  60340. absNumber
  60341. );
  60342. }
  60343. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
  60344. localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
  60345. formatFunctions = {},
  60346. formatTokenFunctions = {};
  60347. // token: 'M'
  60348. // padded: ['MM', 2]
  60349. // ordinal: 'Mo'
  60350. // callback: function () { this.month() + 1 }
  60351. function addFormatToken(token, padded, ordinal, callback) {
  60352. var func = callback;
  60353. if (typeof callback === 'string') {
  60354. func = function () {
  60355. return this[callback]();
  60356. };
  60357. }
  60358. if (token) {
  60359. formatTokenFunctions[token] = func;
  60360. }
  60361. if (padded) {
  60362. formatTokenFunctions[padded[0]] = function () {
  60363. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  60364. };
  60365. }
  60366. if (ordinal) {
  60367. formatTokenFunctions[ordinal] = function () {
  60368. return this.localeData().ordinal(
  60369. func.apply(this, arguments),
  60370. token
  60371. );
  60372. };
  60373. }
  60374. }
  60375. function removeFormattingTokens(input) {
  60376. if (input.match(/\[[\s\S]/)) {
  60377. return input.replace(/^\[|\]$/g, '');
  60378. }
  60379. return input.replace(/\\/g, '');
  60380. }
  60381. function makeFormatFunction(format) {
  60382. var array = format.match(formattingTokens),
  60383. i,
  60384. length;
  60385. for (i = 0, length = array.length; i < length; i++) {
  60386. if (formatTokenFunctions[array[i]]) {
  60387. array[i] = formatTokenFunctions[array[i]];
  60388. } else {
  60389. array[i] = removeFormattingTokens(array[i]);
  60390. }
  60391. }
  60392. return function (mom) {
  60393. var output = '',
  60394. i;
  60395. for (i = 0; i < length; i++) {
  60396. output += isFunction(array[i])
  60397. ? array[i].call(mom, format)
  60398. : array[i];
  60399. }
  60400. return output;
  60401. };
  60402. }
  60403. // format date using native date object
  60404. function formatMoment(m, format) {
  60405. if (!m.isValid()) {
  60406. return m.localeData().invalidDate();
  60407. }
  60408. format = expandFormat(format, m.localeData());
  60409. formatFunctions[format] =
  60410. formatFunctions[format] || makeFormatFunction(format);
  60411. return formatFunctions[format](m);
  60412. }
  60413. function expandFormat(format, locale) {
  60414. var i = 5;
  60415. function replaceLongDateFormatTokens(input) {
  60416. return locale.longDateFormat(input) || input;
  60417. }
  60418. localFormattingTokens.lastIndex = 0;
  60419. while (i >= 0 && localFormattingTokens.test(format)) {
  60420. format = format.replace(
  60421. localFormattingTokens,
  60422. replaceLongDateFormatTokens
  60423. );
  60424. localFormattingTokens.lastIndex = 0;
  60425. i -= 1;
  60426. }
  60427. return format;
  60428. }
  60429. var defaultLongDateFormat = {
  60430. LTS: 'h:mm:ss A',
  60431. LT: 'h:mm A',
  60432. L: 'MM/DD/YYYY',
  60433. LL: 'MMMM D, YYYY',
  60434. LLL: 'MMMM D, YYYY h:mm A',
  60435. LLLL: 'dddd, MMMM D, YYYY h:mm A',
  60436. };
  60437. function longDateFormat(key) {
  60438. var format = this._longDateFormat[key],
  60439. formatUpper = this._longDateFormat[key.toUpperCase()];
  60440. if (format || !formatUpper) {
  60441. return format;
  60442. }
  60443. this._longDateFormat[key] = formatUpper
  60444. .match(formattingTokens)
  60445. .map(function (tok) {
  60446. if (
  60447. tok === 'MMMM' ||
  60448. tok === 'MM' ||
  60449. tok === 'DD' ||
  60450. tok === 'dddd'
  60451. ) {
  60452. return tok.slice(1);
  60453. }
  60454. return tok;
  60455. })
  60456. .join('');
  60457. return this._longDateFormat[key];
  60458. }
  60459. var defaultInvalidDate = 'Invalid date';
  60460. function invalidDate() {
  60461. return this._invalidDate;
  60462. }
  60463. var defaultOrdinal = '%d',
  60464. defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  60465. function ordinal(number) {
  60466. return this._ordinal.replace('%d', number);
  60467. }
  60468. var defaultRelativeTime = {
  60469. future: 'in %s',
  60470. past: '%s ago',
  60471. s: 'a few seconds',
  60472. ss: '%d seconds',
  60473. m: 'a minute',
  60474. mm: '%d minutes',
  60475. h: 'an hour',
  60476. hh: '%d hours',
  60477. d: 'a day',
  60478. dd: '%d days',
  60479. w: 'a week',
  60480. ww: '%d weeks',
  60481. M: 'a month',
  60482. MM: '%d months',
  60483. y: 'a year',
  60484. yy: '%d years',
  60485. };
  60486. function relativeTime(number, withoutSuffix, string, isFuture) {
  60487. var output = this._relativeTime[string];
  60488. return isFunction(output)
  60489. ? output(number, withoutSuffix, string, isFuture)
  60490. : output.replace(/%d/i, number);
  60491. }
  60492. function pastFuture(diff, output) {
  60493. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  60494. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  60495. }
  60496. var aliases = {};
  60497. function addUnitAlias(unit, shorthand) {
  60498. var lowerCase = unit.toLowerCase();
  60499. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  60500. }
  60501. function normalizeUnits(units) {
  60502. return typeof units === 'string'
  60503. ? aliases[units] || aliases[units.toLowerCase()]
  60504. : undefined;
  60505. }
  60506. function normalizeObjectUnits(inputObject) {
  60507. var normalizedInput = {},
  60508. normalizedProp,
  60509. prop;
  60510. for (prop in inputObject) {
  60511. if (hasOwnProp(inputObject, prop)) {
  60512. normalizedProp = normalizeUnits(prop);
  60513. if (normalizedProp) {
  60514. normalizedInput[normalizedProp] = inputObject[prop];
  60515. }
  60516. }
  60517. }
  60518. return normalizedInput;
  60519. }
  60520. var priorities = {};
  60521. function addUnitPriority(unit, priority) {
  60522. priorities[unit] = priority;
  60523. }
  60524. function getPrioritizedUnits(unitsObj) {
  60525. var units = [],
  60526. u;
  60527. for (u in unitsObj) {
  60528. if (hasOwnProp(unitsObj, u)) {
  60529. units.push({ unit: u, priority: priorities[u] });
  60530. }
  60531. }
  60532. units.sort(function (a, b) {
  60533. return a.priority - b.priority;
  60534. });
  60535. return units;
  60536. }
  60537. function isLeapYear(year) {
  60538. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  60539. }
  60540. function absFloor(number) {
  60541. if (number < 0) {
  60542. // -0 -> 0
  60543. return Math.ceil(number) || 0;
  60544. } else {
  60545. return Math.floor(number);
  60546. }
  60547. }
  60548. function toInt(argumentForCoercion) {
  60549. var coercedNumber = +argumentForCoercion,
  60550. value = 0;
  60551. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  60552. value = absFloor(coercedNumber);
  60553. }
  60554. return value;
  60555. }
  60556. function makeGetSet(unit, keepTime) {
  60557. return function (value) {
  60558. if (value != null) {
  60559. set$1(this, unit, value);
  60560. hooks.updateOffset(this, keepTime);
  60561. return this;
  60562. } else {
  60563. return get(this, unit);
  60564. }
  60565. };
  60566. }
  60567. function get(mom, unit) {
  60568. return mom.isValid()
  60569. ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
  60570. : NaN;
  60571. }
  60572. function set$1(mom, unit, value) {
  60573. if (mom.isValid() && !isNaN(value)) {
  60574. if (
  60575. unit === 'FullYear' &&
  60576. isLeapYear(mom.year()) &&
  60577. mom.month() === 1 &&
  60578. mom.date() === 29
  60579. ) {
  60580. value = toInt(value);
  60581. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
  60582. value,
  60583. mom.month(),
  60584. daysInMonth(value, mom.month())
  60585. );
  60586. } else {
  60587. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  60588. }
  60589. }
  60590. }
  60591. // MOMENTS
  60592. function stringGet(units) {
  60593. units = normalizeUnits(units);
  60594. if (isFunction(this[units])) {
  60595. return this[units]();
  60596. }
  60597. return this;
  60598. }
  60599. function stringSet(units, value) {
  60600. if (typeof units === 'object') {
  60601. units = normalizeObjectUnits(units);
  60602. var prioritized = getPrioritizedUnits(units),
  60603. i;
  60604. for (i = 0; i < prioritized.length; i++) {
  60605. this[prioritized[i].unit](units[prioritized[i].unit]);
  60606. }
  60607. } else {
  60608. units = normalizeUnits(units);
  60609. if (isFunction(this[units])) {
  60610. return this[units](value);
  60611. }
  60612. }
  60613. return this;
  60614. }
  60615. var match1 = /\d/, // 0 - 9
  60616. match2 = /\d\d/, // 00 - 99
  60617. match3 = /\d{3}/, // 000 - 999
  60618. match4 = /\d{4}/, // 0000 - 9999
  60619. match6 = /[+-]?\d{6}/, // -999999 - 999999
  60620. match1to2 = /\d\d?/, // 0 - 99
  60621. match3to4 = /\d\d\d\d?/, // 999 - 9999
  60622. match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
  60623. match1to3 = /\d{1,3}/, // 0 - 999
  60624. match1to4 = /\d{1,4}/, // 0 - 9999
  60625. match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
  60626. matchUnsigned = /\d+/, // 0 - inf
  60627. matchSigned = /[+-]?\d+/, // -inf - inf
  60628. matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
  60629. matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  60630. matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
  60631. // any word (or two) characters or numbers including two/three word month in arabic.
  60632. // includes scottish gaelic two word and hyphenated months
  60633. matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
  60634. regexes;
  60635. regexes = {};
  60636. function addRegexToken(token, regex, strictRegex) {
  60637. regexes[token] = isFunction(regex)
  60638. ? regex
  60639. : function (isStrict, localeData) {
  60640. return isStrict && strictRegex ? strictRegex : regex;
  60641. };
  60642. }
  60643. function getParseRegexForToken(token, config) {
  60644. if (!hasOwnProp(regexes, token)) {
  60645. return new RegExp(unescapeFormat(token));
  60646. }
  60647. return regexes[token](config._strict, config._locale);
  60648. }
  60649. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  60650. function unescapeFormat(s) {
  60651. return regexEscape(
  60652. s
  60653. .replace('\\', '')
  60654. .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
  60655. matched,
  60656. p1,
  60657. p2,
  60658. p3,
  60659. p4
  60660. ) {
  60661. return p1 || p2 || p3 || p4;
  60662. })
  60663. );
  60664. }
  60665. function regexEscape(s) {
  60666. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  60667. }
  60668. var tokens = {};
  60669. function addParseToken(token, callback) {
  60670. var i,
  60671. func = callback;
  60672. if (typeof token === 'string') {
  60673. token = [token];
  60674. }
  60675. if (isNumber(callback)) {
  60676. func = function (input, array) {
  60677. array[callback] = toInt(input);
  60678. };
  60679. }
  60680. for (i = 0; i < token.length; i++) {
  60681. tokens[token[i]] = func;
  60682. }
  60683. }
  60684. function addWeekParseToken(token, callback) {
  60685. addParseToken(token, function (input, array, config, token) {
  60686. config._w = config._w || {};
  60687. callback(input, config._w, config, token);
  60688. });
  60689. }
  60690. function addTimeToArrayFromToken(token, input, config) {
  60691. if (input != null && hasOwnProp(tokens, token)) {
  60692. tokens[token](input, config._a, config, token);
  60693. }
  60694. }
  60695. var YEAR = 0,
  60696. MONTH = 1,
  60697. DATE = 2,
  60698. HOUR = 3,
  60699. MINUTE = 4,
  60700. SECOND = 5,
  60701. MILLISECOND = 6,
  60702. WEEK = 7,
  60703. WEEKDAY = 8;
  60704. function mod(n, x) {
  60705. return ((n % x) + x) % x;
  60706. }
  60707. var indexOf;
  60708. if (Array.prototype.indexOf) {
  60709. indexOf = Array.prototype.indexOf;
  60710. } else {
  60711. indexOf = function (o) {
  60712. // I know
  60713. var i;
  60714. for (i = 0; i < this.length; ++i) {
  60715. if (this[i] === o) {
  60716. return i;
  60717. }
  60718. }
  60719. return -1;
  60720. };
  60721. }
  60722. function daysInMonth(year, month) {
  60723. if (isNaN(year) || isNaN(month)) {
  60724. return NaN;
  60725. }
  60726. var modMonth = mod(month, 12);
  60727. year += (month - modMonth) / 12;
  60728. return modMonth === 1
  60729. ? isLeapYear(year)
  60730. ? 29
  60731. : 28
  60732. : 31 - ((modMonth % 7) % 2);
  60733. }
  60734. // FORMATTING
  60735. addFormatToken('M', ['MM', 2], 'Mo', function () {
  60736. return this.month() + 1;
  60737. });
  60738. addFormatToken('MMM', 0, 0, function (format) {
  60739. return this.localeData().monthsShort(this, format);
  60740. });
  60741. addFormatToken('MMMM', 0, 0, function (format) {
  60742. return this.localeData().months(this, format);
  60743. });
  60744. // ALIASES
  60745. addUnitAlias('month', 'M');
  60746. // PRIORITY
  60747. addUnitPriority('month', 8);
  60748. // PARSING
  60749. addRegexToken('M', match1to2);
  60750. addRegexToken('MM', match1to2, match2);
  60751. addRegexToken('MMM', function (isStrict, locale) {
  60752. return locale.monthsShortRegex(isStrict);
  60753. });
  60754. addRegexToken('MMMM', function (isStrict, locale) {
  60755. return locale.monthsRegex(isStrict);
  60756. });
  60757. addParseToken(['M', 'MM'], function (input, array) {
  60758. array[MONTH] = toInt(input) - 1;
  60759. });
  60760. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  60761. var month = config._locale.monthsParse(input, token, config._strict);
  60762. // if we didn't find a month name, mark the date as invalid.
  60763. if (month != null) {
  60764. array[MONTH] = month;
  60765. } else {
  60766. getParsingFlags(config).invalidMonth = input;
  60767. }
  60768. });
  60769. // LOCALES
  60770. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  60771. '_'
  60772. ),
  60773. defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
  60774. '_'
  60775. ),
  60776. MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
  60777. defaultMonthsShortRegex = matchWord,
  60778. defaultMonthsRegex = matchWord;
  60779. function localeMonths(m, format) {
  60780. if (!m) {
  60781. return isArray(this._months)
  60782. ? this._months
  60783. : this._months['standalone'];
  60784. }
  60785. return isArray(this._months)
  60786. ? this._months[m.month()]
  60787. : this._months[
  60788. (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
  60789. ? 'format'
  60790. : 'standalone'
  60791. ][m.month()];
  60792. }
  60793. function localeMonthsShort(m, format) {
  60794. if (!m) {
  60795. return isArray(this._monthsShort)
  60796. ? this._monthsShort
  60797. : this._monthsShort['standalone'];
  60798. }
  60799. return isArray(this._monthsShort)
  60800. ? this._monthsShort[m.month()]
  60801. : this._monthsShort[
  60802. MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
  60803. ][m.month()];
  60804. }
  60805. function handleStrictParse(monthName, format, strict) {
  60806. var i,
  60807. ii,
  60808. mom,
  60809. llc = monthName.toLocaleLowerCase();
  60810. if (!this._monthsParse) {
  60811. // this is not used
  60812. this._monthsParse = [];
  60813. this._longMonthsParse = [];
  60814. this._shortMonthsParse = [];
  60815. for (i = 0; i < 12; ++i) {
  60816. mom = createUTC([2000, i]);
  60817. this._shortMonthsParse[i] = this.monthsShort(
  60818. mom,
  60819. ''
  60820. ).toLocaleLowerCase();
  60821. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  60822. }
  60823. }
  60824. if (strict) {
  60825. if (format === 'MMM') {
  60826. ii = indexOf.call(this._shortMonthsParse, llc);
  60827. return ii !== -1 ? ii : null;
  60828. } else {
  60829. ii = indexOf.call(this._longMonthsParse, llc);
  60830. return ii !== -1 ? ii : null;
  60831. }
  60832. } else {
  60833. if (format === 'MMM') {
  60834. ii = indexOf.call(this._shortMonthsParse, llc);
  60835. if (ii !== -1) {
  60836. return ii;
  60837. }
  60838. ii = indexOf.call(this._longMonthsParse, llc);
  60839. return ii !== -1 ? ii : null;
  60840. } else {
  60841. ii = indexOf.call(this._longMonthsParse, llc);
  60842. if (ii !== -1) {
  60843. return ii;
  60844. }
  60845. ii = indexOf.call(this._shortMonthsParse, llc);
  60846. return ii !== -1 ? ii : null;
  60847. }
  60848. }
  60849. }
  60850. function localeMonthsParse(monthName, format, strict) {
  60851. var i, mom, regex;
  60852. if (this._monthsParseExact) {
  60853. return handleStrictParse.call(this, monthName, format, strict);
  60854. }
  60855. if (!this._monthsParse) {
  60856. this._monthsParse = [];
  60857. this._longMonthsParse = [];
  60858. this._shortMonthsParse = [];
  60859. }
  60860. // TODO: add sorting
  60861. // Sorting makes sure if one month (or abbr) is a prefix of another
  60862. // see sorting in computeMonthsParse
  60863. for (i = 0; i < 12; i++) {
  60864. // make the regex if we don't have it already
  60865. mom = createUTC([2000, i]);
  60866. if (strict && !this._longMonthsParse[i]) {
  60867. this._longMonthsParse[i] = new RegExp(
  60868. '^' + this.months(mom, '').replace('.', '') + '$',
  60869. 'i'
  60870. );
  60871. this._shortMonthsParse[i] = new RegExp(
  60872. '^' + this.monthsShort(mom, '').replace('.', '') + '$',
  60873. 'i'
  60874. );
  60875. }
  60876. if (!strict && !this._monthsParse[i]) {
  60877. regex =
  60878. '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  60879. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  60880. }
  60881. // test the regex
  60882. if (
  60883. strict &&
  60884. format === 'MMMM' &&
  60885. this._longMonthsParse[i].test(monthName)
  60886. ) {
  60887. return i;
  60888. } else if (
  60889. strict &&
  60890. format === 'MMM' &&
  60891. this._shortMonthsParse[i].test(monthName)
  60892. ) {
  60893. return i;
  60894. } else if (!strict && this._monthsParse[i].test(monthName)) {
  60895. return i;
  60896. }
  60897. }
  60898. }
  60899. // MOMENTS
  60900. function setMonth(mom, value) {
  60901. var dayOfMonth;
  60902. if (!mom.isValid()) {
  60903. // No op
  60904. return mom;
  60905. }
  60906. if (typeof value === 'string') {
  60907. if (/^\d+$/.test(value)) {
  60908. value = toInt(value);
  60909. } else {
  60910. value = mom.localeData().monthsParse(value);
  60911. // TODO: Another silent failure?
  60912. if (!isNumber(value)) {
  60913. return mom;
  60914. }
  60915. }
  60916. }
  60917. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  60918. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  60919. return mom;
  60920. }
  60921. function getSetMonth(value) {
  60922. if (value != null) {
  60923. setMonth(this, value);
  60924. hooks.updateOffset(this, true);
  60925. return this;
  60926. } else {
  60927. return get(this, 'Month');
  60928. }
  60929. }
  60930. function getDaysInMonth() {
  60931. return daysInMonth(this.year(), this.month());
  60932. }
  60933. function monthsShortRegex(isStrict) {
  60934. if (this._monthsParseExact) {
  60935. if (!hasOwnProp(this, '_monthsRegex')) {
  60936. computeMonthsParse.call(this);
  60937. }
  60938. if (isStrict) {
  60939. return this._monthsShortStrictRegex;
  60940. } else {
  60941. return this._monthsShortRegex;
  60942. }
  60943. } else {
  60944. if (!hasOwnProp(this, '_monthsShortRegex')) {
  60945. this._monthsShortRegex = defaultMonthsShortRegex;
  60946. }
  60947. return this._monthsShortStrictRegex && isStrict
  60948. ? this._monthsShortStrictRegex
  60949. : this._monthsShortRegex;
  60950. }
  60951. }
  60952. function monthsRegex(isStrict) {
  60953. if (this._monthsParseExact) {
  60954. if (!hasOwnProp(this, '_monthsRegex')) {
  60955. computeMonthsParse.call(this);
  60956. }
  60957. if (isStrict) {
  60958. return this._monthsStrictRegex;
  60959. } else {
  60960. return this._monthsRegex;
  60961. }
  60962. } else {
  60963. if (!hasOwnProp(this, '_monthsRegex')) {
  60964. this._monthsRegex = defaultMonthsRegex;
  60965. }
  60966. return this._monthsStrictRegex && isStrict
  60967. ? this._monthsStrictRegex
  60968. : this._monthsRegex;
  60969. }
  60970. }
  60971. function computeMonthsParse() {
  60972. function cmpLenRev(a, b) {
  60973. return b.length - a.length;
  60974. }
  60975. var shortPieces = [],
  60976. longPieces = [],
  60977. mixedPieces = [],
  60978. i,
  60979. mom;
  60980. for (i = 0; i < 12; i++) {
  60981. // make the regex if we don't have it already
  60982. mom = createUTC([2000, i]);
  60983. shortPieces.push(this.monthsShort(mom, ''));
  60984. longPieces.push(this.months(mom, ''));
  60985. mixedPieces.push(this.months(mom, ''));
  60986. mixedPieces.push(this.monthsShort(mom, ''));
  60987. }
  60988. // Sorting makes sure if one month (or abbr) is a prefix of another it
  60989. // will match the longer piece.
  60990. shortPieces.sort(cmpLenRev);
  60991. longPieces.sort(cmpLenRev);
  60992. mixedPieces.sort(cmpLenRev);
  60993. for (i = 0; i < 12; i++) {
  60994. shortPieces[i] = regexEscape(shortPieces[i]);
  60995. longPieces[i] = regexEscape(longPieces[i]);
  60996. }
  60997. for (i = 0; i < 24; i++) {
  60998. mixedPieces[i] = regexEscape(mixedPieces[i]);
  60999. }
  61000. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  61001. this._monthsShortRegex = this._monthsRegex;
  61002. this._monthsStrictRegex = new RegExp(
  61003. '^(' + longPieces.join('|') + ')',
  61004. 'i'
  61005. );
  61006. this._monthsShortStrictRegex = new RegExp(
  61007. '^(' + shortPieces.join('|') + ')',
  61008. 'i'
  61009. );
  61010. }
  61011. // FORMATTING
  61012. addFormatToken('Y', 0, 0, function () {
  61013. var y = this.year();
  61014. return y <= 9999 ? zeroFill(y, 4) : '+' + y;
  61015. });
  61016. addFormatToken(0, ['YY', 2], 0, function () {
  61017. return this.year() % 100;
  61018. });
  61019. addFormatToken(0, ['YYYY', 4], 0, 'year');
  61020. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  61021. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  61022. // ALIASES
  61023. addUnitAlias('year', 'y');
  61024. // PRIORITIES
  61025. addUnitPriority('year', 1);
  61026. // PARSING
  61027. addRegexToken('Y', matchSigned);
  61028. addRegexToken('YY', match1to2, match2);
  61029. addRegexToken('YYYY', match1to4, match4);
  61030. addRegexToken('YYYYY', match1to6, match6);
  61031. addRegexToken('YYYYYY', match1to6, match6);
  61032. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  61033. addParseToken('YYYY', function (input, array) {
  61034. array[YEAR] =
  61035. input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  61036. });
  61037. addParseToken('YY', function (input, array) {
  61038. array[YEAR] = hooks.parseTwoDigitYear(input);
  61039. });
  61040. addParseToken('Y', function (input, array) {
  61041. array[YEAR] = parseInt(input, 10);
  61042. });
  61043. // HELPERS
  61044. function daysInYear(year) {
  61045. return isLeapYear(year) ? 366 : 365;
  61046. }
  61047. // HOOKS
  61048. hooks.parseTwoDigitYear = function (input) {
  61049. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  61050. };
  61051. // MOMENTS
  61052. var getSetYear = makeGetSet('FullYear', true);
  61053. function getIsLeapYear() {
  61054. return isLeapYear(this.year());
  61055. }
  61056. function createDate(y, m, d, h, M, s, ms) {
  61057. // can't just apply() to create a date:
  61058. // https://stackoverflow.com/q/181348
  61059. var date;
  61060. // the date constructor remaps years 0-99 to 1900-1999
  61061. if (y < 100 && y >= 0) {
  61062. // preserve leap years using a full 400 year cycle, then reset
  61063. date = new Date(y + 400, m, d, h, M, s, ms);
  61064. if (isFinite(date.getFullYear())) {
  61065. date.setFullYear(y);
  61066. }
  61067. } else {
  61068. date = new Date(y, m, d, h, M, s, ms);
  61069. }
  61070. return date;
  61071. }
  61072. function createUTCDate(y) {
  61073. var date, args;
  61074. // the Date.UTC function remaps years 0-99 to 1900-1999
  61075. if (y < 100 && y >= 0) {
  61076. args = Array.prototype.slice.call(arguments);
  61077. // preserve leap years using a full 400 year cycle, then reset
  61078. args[0] = y + 400;
  61079. date = new Date(Date.UTC.apply(null, args));
  61080. if (isFinite(date.getUTCFullYear())) {
  61081. date.setUTCFullYear(y);
  61082. }
  61083. } else {
  61084. date = new Date(Date.UTC.apply(null, arguments));
  61085. }
  61086. return date;
  61087. }
  61088. // start-of-first-week - start-of-year
  61089. function firstWeekOffset(year, dow, doy) {
  61090. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  61091. fwd = 7 + dow - doy,
  61092. // first-week day local weekday -- which local weekday is fwd
  61093. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  61094. return -fwdlw + fwd - 1;
  61095. }
  61096. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  61097. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  61098. var localWeekday = (7 + weekday - dow) % 7,
  61099. weekOffset = firstWeekOffset(year, dow, doy),
  61100. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  61101. resYear,
  61102. resDayOfYear;
  61103. if (dayOfYear <= 0) {
  61104. resYear = year - 1;
  61105. resDayOfYear = daysInYear(resYear) + dayOfYear;
  61106. } else if (dayOfYear > daysInYear(year)) {
  61107. resYear = year + 1;
  61108. resDayOfYear = dayOfYear - daysInYear(year);
  61109. } else {
  61110. resYear = year;
  61111. resDayOfYear = dayOfYear;
  61112. }
  61113. return {
  61114. year: resYear,
  61115. dayOfYear: resDayOfYear,
  61116. };
  61117. }
  61118. function weekOfYear(mom, dow, doy) {
  61119. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  61120. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  61121. resWeek,
  61122. resYear;
  61123. if (week < 1) {
  61124. resYear = mom.year() - 1;
  61125. resWeek = week + weeksInYear(resYear, dow, doy);
  61126. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  61127. resWeek = week - weeksInYear(mom.year(), dow, doy);
  61128. resYear = mom.year() + 1;
  61129. } else {
  61130. resYear = mom.year();
  61131. resWeek = week;
  61132. }
  61133. return {
  61134. week: resWeek,
  61135. year: resYear,
  61136. };
  61137. }
  61138. function weeksInYear(year, dow, doy) {
  61139. var weekOffset = firstWeekOffset(year, dow, doy),
  61140. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  61141. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  61142. }
  61143. // FORMATTING
  61144. addFormatToken('w', ['ww', 2], 'wo', 'week');
  61145. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  61146. // ALIASES
  61147. addUnitAlias('week', 'w');
  61148. addUnitAlias('isoWeek', 'W');
  61149. // PRIORITIES
  61150. addUnitPriority('week', 5);
  61151. addUnitPriority('isoWeek', 5);
  61152. // PARSING
  61153. addRegexToken('w', match1to2);
  61154. addRegexToken('ww', match1to2, match2);
  61155. addRegexToken('W', match1to2);
  61156. addRegexToken('WW', match1to2, match2);
  61157. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
  61158. input,
  61159. week,
  61160. config,
  61161. token
  61162. ) {
  61163. week[token.substr(0, 1)] = toInt(input);
  61164. });
  61165. // HELPERS
  61166. // LOCALES
  61167. function localeWeek(mom) {
  61168. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  61169. }
  61170. var defaultLocaleWeek = {
  61171. dow: 0, // Sunday is the first day of the week.
  61172. doy: 6, // The week that contains Jan 6th is the first week of the year.
  61173. };
  61174. function localeFirstDayOfWeek() {
  61175. return this._week.dow;
  61176. }
  61177. function localeFirstDayOfYear() {
  61178. return this._week.doy;
  61179. }
  61180. // MOMENTS
  61181. function getSetWeek(input) {
  61182. var week = this.localeData().week(this);
  61183. return input == null ? week : this.add((input - week) * 7, 'd');
  61184. }
  61185. function getSetISOWeek(input) {
  61186. var week = weekOfYear(this, 1, 4).week;
  61187. return input == null ? week : this.add((input - week) * 7, 'd');
  61188. }
  61189. // FORMATTING
  61190. addFormatToken('d', 0, 'do', 'day');
  61191. addFormatToken('dd', 0, 0, function (format) {
  61192. return this.localeData().weekdaysMin(this, format);
  61193. });
  61194. addFormatToken('ddd', 0, 0, function (format) {
  61195. return this.localeData().weekdaysShort(this, format);
  61196. });
  61197. addFormatToken('dddd', 0, 0, function (format) {
  61198. return this.localeData().weekdays(this, format);
  61199. });
  61200. addFormatToken('e', 0, 0, 'weekday');
  61201. addFormatToken('E', 0, 0, 'isoWeekday');
  61202. // ALIASES
  61203. addUnitAlias('day', 'd');
  61204. addUnitAlias('weekday', 'e');
  61205. addUnitAlias('isoWeekday', 'E');
  61206. // PRIORITY
  61207. addUnitPriority('day', 11);
  61208. addUnitPriority('weekday', 11);
  61209. addUnitPriority('isoWeekday', 11);
  61210. // PARSING
  61211. addRegexToken('d', match1to2);
  61212. addRegexToken('e', match1to2);
  61213. addRegexToken('E', match1to2);
  61214. addRegexToken('dd', function (isStrict, locale) {
  61215. return locale.weekdaysMinRegex(isStrict);
  61216. });
  61217. addRegexToken('ddd', function (isStrict, locale) {
  61218. return locale.weekdaysShortRegex(isStrict);
  61219. });
  61220. addRegexToken('dddd', function (isStrict, locale) {
  61221. return locale.weekdaysRegex(isStrict);
  61222. });
  61223. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  61224. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  61225. // if we didn't get a weekday name, mark the date as invalid
  61226. if (weekday != null) {
  61227. week.d = weekday;
  61228. } else {
  61229. getParsingFlags(config).invalidWeekday = input;
  61230. }
  61231. });
  61232. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  61233. week[token] = toInt(input);
  61234. });
  61235. // HELPERS
  61236. function parseWeekday(input, locale) {
  61237. if (typeof input !== 'string') {
  61238. return input;
  61239. }
  61240. if (!isNaN(input)) {
  61241. return parseInt(input, 10);
  61242. }
  61243. input = locale.weekdaysParse(input);
  61244. if (typeof input === 'number') {
  61245. return input;
  61246. }
  61247. return null;
  61248. }
  61249. function parseIsoWeekday(input, locale) {
  61250. if (typeof input === 'string') {
  61251. return locale.weekdaysParse(input) % 7 || 7;
  61252. }
  61253. return isNaN(input) ? null : input;
  61254. }
  61255. // LOCALES
  61256. function shiftWeekdays(ws, n) {
  61257. return ws.slice(n, 7).concat(ws.slice(0, n));
  61258. }
  61259. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  61260. '_'
  61261. ),
  61262. defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  61263. defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  61264. defaultWeekdaysRegex = matchWord,
  61265. defaultWeekdaysShortRegex = matchWord,
  61266. defaultWeekdaysMinRegex = matchWord;
  61267. function localeWeekdays(m, format) {
  61268. var weekdays = isArray(this._weekdays)
  61269. ? this._weekdays
  61270. : this._weekdays[
  61271. m && m !== true && this._weekdays.isFormat.test(format)
  61272. ? 'format'
  61273. : 'standalone'
  61274. ];
  61275. return m === true
  61276. ? shiftWeekdays(weekdays, this._week.dow)
  61277. : m
  61278. ? weekdays[m.day()]
  61279. : weekdays;
  61280. }
  61281. function localeWeekdaysShort(m) {
  61282. return m === true
  61283. ? shiftWeekdays(this._weekdaysShort, this._week.dow)
  61284. : m
  61285. ? this._weekdaysShort[m.day()]
  61286. : this._weekdaysShort;
  61287. }
  61288. function localeWeekdaysMin(m) {
  61289. return m === true
  61290. ? shiftWeekdays(this._weekdaysMin, this._week.dow)
  61291. : m
  61292. ? this._weekdaysMin[m.day()]
  61293. : this._weekdaysMin;
  61294. }
  61295. function handleStrictParse$1(weekdayName, format, strict) {
  61296. var i,
  61297. ii,
  61298. mom,
  61299. llc = weekdayName.toLocaleLowerCase();
  61300. if (!this._weekdaysParse) {
  61301. this._weekdaysParse = [];
  61302. this._shortWeekdaysParse = [];
  61303. this._minWeekdaysParse = [];
  61304. for (i = 0; i < 7; ++i) {
  61305. mom = createUTC([2000, 1]).day(i);
  61306. this._minWeekdaysParse[i] = this.weekdaysMin(
  61307. mom,
  61308. ''
  61309. ).toLocaleLowerCase();
  61310. this._shortWeekdaysParse[i] = this.weekdaysShort(
  61311. mom,
  61312. ''
  61313. ).toLocaleLowerCase();
  61314. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  61315. }
  61316. }
  61317. if (strict) {
  61318. if (format === 'dddd') {
  61319. ii = indexOf.call(this._weekdaysParse, llc);
  61320. return ii !== -1 ? ii : null;
  61321. } else if (format === 'ddd') {
  61322. ii = indexOf.call(this._shortWeekdaysParse, llc);
  61323. return ii !== -1 ? ii : null;
  61324. } else {
  61325. ii = indexOf.call(this._minWeekdaysParse, llc);
  61326. return ii !== -1 ? ii : null;
  61327. }
  61328. } else {
  61329. if (format === 'dddd') {
  61330. ii = indexOf.call(this._weekdaysParse, llc);
  61331. if (ii !== -1) {
  61332. return ii;
  61333. }
  61334. ii = indexOf.call(this._shortWeekdaysParse, llc);
  61335. if (ii !== -1) {
  61336. return ii;
  61337. }
  61338. ii = indexOf.call(this._minWeekdaysParse, llc);
  61339. return ii !== -1 ? ii : null;
  61340. } else if (format === 'ddd') {
  61341. ii = indexOf.call(this._shortWeekdaysParse, llc);
  61342. if (ii !== -1) {
  61343. return ii;
  61344. }
  61345. ii = indexOf.call(this._weekdaysParse, llc);
  61346. if (ii !== -1) {
  61347. return ii;
  61348. }
  61349. ii = indexOf.call(this._minWeekdaysParse, llc);
  61350. return ii !== -1 ? ii : null;
  61351. } else {
  61352. ii = indexOf.call(this._minWeekdaysParse, llc);
  61353. if (ii !== -1) {
  61354. return ii;
  61355. }
  61356. ii = indexOf.call(this._weekdaysParse, llc);
  61357. if (ii !== -1) {
  61358. return ii;
  61359. }
  61360. ii = indexOf.call(this._shortWeekdaysParse, llc);
  61361. return ii !== -1 ? ii : null;
  61362. }
  61363. }
  61364. }
  61365. function localeWeekdaysParse(weekdayName, format, strict) {
  61366. var i, mom, regex;
  61367. if (this._weekdaysParseExact) {
  61368. return handleStrictParse$1.call(this, weekdayName, format, strict);
  61369. }
  61370. if (!this._weekdaysParse) {
  61371. this._weekdaysParse = [];
  61372. this._minWeekdaysParse = [];
  61373. this._shortWeekdaysParse = [];
  61374. this._fullWeekdaysParse = [];
  61375. }
  61376. for (i = 0; i < 7; i++) {
  61377. // make the regex if we don't have it already
  61378. mom = createUTC([2000, 1]).day(i);
  61379. if (strict && !this._fullWeekdaysParse[i]) {
  61380. this._fullWeekdaysParse[i] = new RegExp(
  61381. '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
  61382. 'i'
  61383. );
  61384. this._shortWeekdaysParse[i] = new RegExp(
  61385. '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
  61386. 'i'
  61387. );
  61388. this._minWeekdaysParse[i] = new RegExp(
  61389. '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
  61390. 'i'
  61391. );
  61392. }
  61393. if (!this._weekdaysParse[i]) {
  61394. regex =
  61395. '^' +
  61396. this.weekdays(mom, '') +
  61397. '|^' +
  61398. this.weekdaysShort(mom, '') +
  61399. '|^' +
  61400. this.weekdaysMin(mom, '');
  61401. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  61402. }
  61403. // test the regex
  61404. if (
  61405. strict &&
  61406. format === 'dddd' &&
  61407. this._fullWeekdaysParse[i].test(weekdayName)
  61408. ) {
  61409. return i;
  61410. } else if (
  61411. strict &&
  61412. format === 'ddd' &&
  61413. this._shortWeekdaysParse[i].test(weekdayName)
  61414. ) {
  61415. return i;
  61416. } else if (
  61417. strict &&
  61418. format === 'dd' &&
  61419. this._minWeekdaysParse[i].test(weekdayName)
  61420. ) {
  61421. return i;
  61422. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  61423. return i;
  61424. }
  61425. }
  61426. }
  61427. // MOMENTS
  61428. function getSetDayOfWeek(input) {
  61429. if (!this.isValid()) {
  61430. return input != null ? this : NaN;
  61431. }
  61432. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  61433. if (input != null) {
  61434. input = parseWeekday(input, this.localeData());
  61435. return this.add(input - day, 'd');
  61436. } else {
  61437. return day;
  61438. }
  61439. }
  61440. function getSetLocaleDayOfWeek(input) {
  61441. if (!this.isValid()) {
  61442. return input != null ? this : NaN;
  61443. }
  61444. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  61445. return input == null ? weekday : this.add(input - weekday, 'd');
  61446. }
  61447. function getSetISODayOfWeek(input) {
  61448. if (!this.isValid()) {
  61449. return input != null ? this : NaN;
  61450. }
  61451. // behaves the same as moment#day except
  61452. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  61453. // as a setter, sunday should belong to the previous week.
  61454. if (input != null) {
  61455. var weekday = parseIsoWeekday(input, this.localeData());
  61456. return this.day(this.day() % 7 ? weekday : weekday - 7);
  61457. } else {
  61458. return this.day() || 7;
  61459. }
  61460. }
  61461. function weekdaysRegex(isStrict) {
  61462. if (this._weekdaysParseExact) {
  61463. if (!hasOwnProp(this, '_weekdaysRegex')) {
  61464. computeWeekdaysParse.call(this);
  61465. }
  61466. if (isStrict) {
  61467. return this._weekdaysStrictRegex;
  61468. } else {
  61469. return this._weekdaysRegex;
  61470. }
  61471. } else {
  61472. if (!hasOwnProp(this, '_weekdaysRegex')) {
  61473. this._weekdaysRegex = defaultWeekdaysRegex;
  61474. }
  61475. return this._weekdaysStrictRegex && isStrict
  61476. ? this._weekdaysStrictRegex
  61477. : this._weekdaysRegex;
  61478. }
  61479. }
  61480. function weekdaysShortRegex(isStrict) {
  61481. if (this._weekdaysParseExact) {
  61482. if (!hasOwnProp(this, '_weekdaysRegex')) {
  61483. computeWeekdaysParse.call(this);
  61484. }
  61485. if (isStrict) {
  61486. return this._weekdaysShortStrictRegex;
  61487. } else {
  61488. return this._weekdaysShortRegex;
  61489. }
  61490. } else {
  61491. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  61492. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  61493. }
  61494. return this._weekdaysShortStrictRegex && isStrict
  61495. ? this._weekdaysShortStrictRegex
  61496. : this._weekdaysShortRegex;
  61497. }
  61498. }
  61499. function weekdaysMinRegex(isStrict) {
  61500. if (this._weekdaysParseExact) {
  61501. if (!hasOwnProp(this, '_weekdaysRegex')) {
  61502. computeWeekdaysParse.call(this);
  61503. }
  61504. if (isStrict) {
  61505. return this._weekdaysMinStrictRegex;
  61506. } else {
  61507. return this._weekdaysMinRegex;
  61508. }
  61509. } else {
  61510. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  61511. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  61512. }
  61513. return this._weekdaysMinStrictRegex && isStrict
  61514. ? this._weekdaysMinStrictRegex
  61515. : this._weekdaysMinRegex;
  61516. }
  61517. }
  61518. function computeWeekdaysParse() {
  61519. function cmpLenRev(a, b) {
  61520. return b.length - a.length;
  61521. }
  61522. var minPieces = [],
  61523. shortPieces = [],
  61524. longPieces = [],
  61525. mixedPieces = [],
  61526. i,
  61527. mom,
  61528. minp,
  61529. shortp,
  61530. longp;
  61531. for (i = 0; i < 7; i++) {
  61532. // make the regex if we don't have it already
  61533. mom = createUTC([2000, 1]).day(i);
  61534. minp = regexEscape(this.weekdaysMin(mom, ''));
  61535. shortp = regexEscape(this.weekdaysShort(mom, ''));
  61536. longp = regexEscape(this.weekdays(mom, ''));
  61537. minPieces.push(minp);
  61538. shortPieces.push(shortp);
  61539. longPieces.push(longp);
  61540. mixedPieces.push(minp);
  61541. mixedPieces.push(shortp);
  61542. mixedPieces.push(longp);
  61543. }
  61544. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  61545. // will match the longer piece.
  61546. minPieces.sort(cmpLenRev);
  61547. shortPieces.sort(cmpLenRev);
  61548. longPieces.sort(cmpLenRev);
  61549. mixedPieces.sort(cmpLenRev);
  61550. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  61551. this._weekdaysShortRegex = this._weekdaysRegex;
  61552. this._weekdaysMinRegex = this._weekdaysRegex;
  61553. this._weekdaysStrictRegex = new RegExp(
  61554. '^(' + longPieces.join('|') + ')',
  61555. 'i'
  61556. );
  61557. this._weekdaysShortStrictRegex = new RegExp(
  61558. '^(' + shortPieces.join('|') + ')',
  61559. 'i'
  61560. );
  61561. this._weekdaysMinStrictRegex = new RegExp(
  61562. '^(' + minPieces.join('|') + ')',
  61563. 'i'
  61564. );
  61565. }
  61566. // FORMATTING
  61567. function hFormat() {
  61568. return this.hours() % 12 || 12;
  61569. }
  61570. function kFormat() {
  61571. return this.hours() || 24;
  61572. }
  61573. addFormatToken('H', ['HH', 2], 0, 'hour');
  61574. addFormatToken('h', ['hh', 2], 0, hFormat);
  61575. addFormatToken('k', ['kk', 2], 0, kFormat);
  61576. addFormatToken('hmm', 0, 0, function () {
  61577. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  61578. });
  61579. addFormatToken('hmmss', 0, 0, function () {
  61580. return (
  61581. '' +
  61582. hFormat.apply(this) +
  61583. zeroFill(this.minutes(), 2) +
  61584. zeroFill(this.seconds(), 2)
  61585. );
  61586. });
  61587. addFormatToken('Hmm', 0, 0, function () {
  61588. return '' + this.hours() + zeroFill(this.minutes(), 2);
  61589. });
  61590. addFormatToken('Hmmss', 0, 0, function () {
  61591. return (
  61592. '' +
  61593. this.hours() +
  61594. zeroFill(this.minutes(), 2) +
  61595. zeroFill(this.seconds(), 2)
  61596. );
  61597. });
  61598. function meridiem(token, lowercase) {
  61599. addFormatToken(token, 0, 0, function () {
  61600. return this.localeData().meridiem(
  61601. this.hours(),
  61602. this.minutes(),
  61603. lowercase
  61604. );
  61605. });
  61606. }
  61607. meridiem('a', true);
  61608. meridiem('A', false);
  61609. // ALIASES
  61610. addUnitAlias('hour', 'h');
  61611. // PRIORITY
  61612. addUnitPriority('hour', 13);
  61613. // PARSING
  61614. function matchMeridiem(isStrict, locale) {
  61615. return locale._meridiemParse;
  61616. }
  61617. addRegexToken('a', matchMeridiem);
  61618. addRegexToken('A', matchMeridiem);
  61619. addRegexToken('H', match1to2);
  61620. addRegexToken('h', match1to2);
  61621. addRegexToken('k', match1to2);
  61622. addRegexToken('HH', match1to2, match2);
  61623. addRegexToken('hh', match1to2, match2);
  61624. addRegexToken('kk', match1to2, match2);
  61625. addRegexToken('hmm', match3to4);
  61626. addRegexToken('hmmss', match5to6);
  61627. addRegexToken('Hmm', match3to4);
  61628. addRegexToken('Hmmss', match5to6);
  61629. addParseToken(['H', 'HH'], HOUR);
  61630. addParseToken(['k', 'kk'], function (input, array, config) {
  61631. var kInput = toInt(input);
  61632. array[HOUR] = kInput === 24 ? 0 : kInput;
  61633. });
  61634. addParseToken(['a', 'A'], function (input, array, config) {
  61635. config._isPm = config._locale.isPM(input);
  61636. config._meridiem = input;
  61637. });
  61638. addParseToken(['h', 'hh'], function (input, array, config) {
  61639. array[HOUR] = toInt(input);
  61640. getParsingFlags(config).bigHour = true;
  61641. });
  61642. addParseToken('hmm', function (input, array, config) {
  61643. var pos = input.length - 2;
  61644. array[HOUR] = toInt(input.substr(0, pos));
  61645. array[MINUTE] = toInt(input.substr(pos));
  61646. getParsingFlags(config).bigHour = true;
  61647. });
  61648. addParseToken('hmmss', function (input, array, config) {
  61649. var pos1 = input.length - 4,
  61650. pos2 = input.length - 2;
  61651. array[HOUR] = toInt(input.substr(0, pos1));
  61652. array[MINUTE] = toInt(input.substr(pos1, 2));
  61653. array[SECOND] = toInt(input.substr(pos2));
  61654. getParsingFlags(config).bigHour = true;
  61655. });
  61656. addParseToken('Hmm', function (input, array, config) {
  61657. var pos = input.length - 2;
  61658. array[HOUR] = toInt(input.substr(0, pos));
  61659. array[MINUTE] = toInt(input.substr(pos));
  61660. });
  61661. addParseToken('Hmmss', function (input, array, config) {
  61662. var pos1 = input.length - 4,
  61663. pos2 = input.length - 2;
  61664. array[HOUR] = toInt(input.substr(0, pos1));
  61665. array[MINUTE] = toInt(input.substr(pos1, 2));
  61666. array[SECOND] = toInt(input.substr(pos2));
  61667. });
  61668. // LOCALES
  61669. function localeIsPM(input) {
  61670. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  61671. // Using charAt should be more compatible.
  61672. return (input + '').toLowerCase().charAt(0) === 'p';
  61673. }
  61674. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
  61675. // Setting the hour should keep the time, because the user explicitly
  61676. // specified which hour they want. So trying to maintain the same hour (in
  61677. // a new timezone) makes sense. Adding/subtracting hours does not follow
  61678. // this rule.
  61679. getSetHour = makeGetSet('Hours', true);
  61680. function localeMeridiem(hours, minutes, isLower) {
  61681. if (hours > 11) {
  61682. return isLower ? 'pm' : 'PM';
  61683. } else {
  61684. return isLower ? 'am' : 'AM';
  61685. }
  61686. }
  61687. var baseConfig = {
  61688. calendar: defaultCalendar,
  61689. longDateFormat: defaultLongDateFormat,
  61690. invalidDate: defaultInvalidDate,
  61691. ordinal: defaultOrdinal,
  61692. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  61693. relativeTime: defaultRelativeTime,
  61694. months: defaultLocaleMonths,
  61695. monthsShort: defaultLocaleMonthsShort,
  61696. week: defaultLocaleWeek,
  61697. weekdays: defaultLocaleWeekdays,
  61698. weekdaysMin: defaultLocaleWeekdaysMin,
  61699. weekdaysShort: defaultLocaleWeekdaysShort,
  61700. meridiemParse: defaultLocaleMeridiemParse,
  61701. };
  61702. // internal storage for locale config files
  61703. var locales = {},
  61704. localeFamilies = {},
  61705. globalLocale;
  61706. function commonPrefix(arr1, arr2) {
  61707. var i,
  61708. minl = Math.min(arr1.length, arr2.length);
  61709. for (i = 0; i < minl; i += 1) {
  61710. if (arr1[i] !== arr2[i]) {
  61711. return i;
  61712. }
  61713. }
  61714. return minl;
  61715. }
  61716. function normalizeLocale(key) {
  61717. return key ? key.toLowerCase().replace('_', '-') : key;
  61718. }
  61719. // pick the locale from the array
  61720. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  61721. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  61722. function chooseLocale(names) {
  61723. var i = 0,
  61724. j,
  61725. next,
  61726. locale,
  61727. split;
  61728. while (i < names.length) {
  61729. split = normalizeLocale(names[i]).split('-');
  61730. j = split.length;
  61731. next = normalizeLocale(names[i + 1]);
  61732. next = next ? next.split('-') : null;
  61733. while (j > 0) {
  61734. locale = loadLocale(split.slice(0, j).join('-'));
  61735. if (locale) {
  61736. return locale;
  61737. }
  61738. if (
  61739. next &&
  61740. next.length >= j &&
  61741. commonPrefix(split, next) >= j - 1
  61742. ) {
  61743. //the next array item is better than a shallower substring of this one
  61744. break;
  61745. }
  61746. j--;
  61747. }
  61748. i++;
  61749. }
  61750. return globalLocale;
  61751. }
  61752. function loadLocale(name) {
  61753. var oldLocale = null,
  61754. aliasedRequire;
  61755. // TODO: Find a better way to register and load all the locales in Node
  61756. if (
  61757. locales[name] === undefined &&
  61758. "object" !== 'undefined' &&
  61759. module &&
  61760. module.exports
  61761. ) {
  61762. try {
  61763. oldLocale = globalLocale._abbr;
  61764. aliasedRequire = undefined;
  61765. __webpack_require__(46700)("./" + name);
  61766. getSetGlobalLocale(oldLocale);
  61767. } catch (e) {
  61768. // mark as not found to avoid repeating expensive file require call causing high CPU
  61769. // when trying to find en-US, en_US, en-us for every format call
  61770. locales[name] = null; // null means not found
  61771. }
  61772. }
  61773. return locales[name];
  61774. }
  61775. // This function will load locale and then set the global locale. If
  61776. // no arguments are passed in, it will simply return the current global
  61777. // locale key.
  61778. function getSetGlobalLocale(key, values) {
  61779. var data;
  61780. if (key) {
  61781. if (isUndefined(values)) {
  61782. data = getLocale(key);
  61783. } else {
  61784. data = defineLocale(key, values);
  61785. }
  61786. if (data) {
  61787. // moment.duration._locale = moment._locale = data;
  61788. globalLocale = data;
  61789. } else {
  61790. if (typeof console !== 'undefined' && console.warn) {
  61791. //warn user if arguments are passed but the locale could not be set
  61792. console.warn(
  61793. 'Locale ' + key + ' not found. Did you forget to load it?'
  61794. );
  61795. }
  61796. }
  61797. }
  61798. return globalLocale._abbr;
  61799. }
  61800. function defineLocale(name, config) {
  61801. if (config !== null) {
  61802. var locale,
  61803. parentConfig = baseConfig;
  61804. config.abbr = name;
  61805. if (locales[name] != null) {
  61806. deprecateSimple(
  61807. 'defineLocaleOverride',
  61808. 'use moment.updateLocale(localeName, config) to change ' +
  61809. 'an existing locale. moment.defineLocale(localeName, ' +
  61810. 'config) should only be used for creating a new locale ' +
  61811. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
  61812. );
  61813. parentConfig = locales[name]._config;
  61814. } else if (config.parentLocale != null) {
  61815. if (locales[config.parentLocale] != null) {
  61816. parentConfig = locales[config.parentLocale]._config;
  61817. } else {
  61818. locale = loadLocale(config.parentLocale);
  61819. if (locale != null) {
  61820. parentConfig = locale._config;
  61821. } else {
  61822. if (!localeFamilies[config.parentLocale]) {
  61823. localeFamilies[config.parentLocale] = [];
  61824. }
  61825. localeFamilies[config.parentLocale].push({
  61826. name: name,
  61827. config: config,
  61828. });
  61829. return null;
  61830. }
  61831. }
  61832. }
  61833. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  61834. if (localeFamilies[name]) {
  61835. localeFamilies[name].forEach(function (x) {
  61836. defineLocale(x.name, x.config);
  61837. });
  61838. }
  61839. // backwards compat for now: also set the locale
  61840. // make sure we set the locale AFTER all child locales have been
  61841. // created, so we won't end up with the child locale set.
  61842. getSetGlobalLocale(name);
  61843. return locales[name];
  61844. } else {
  61845. // useful for testing
  61846. delete locales[name];
  61847. return null;
  61848. }
  61849. }
  61850. function updateLocale(name, config) {
  61851. if (config != null) {
  61852. var locale,
  61853. tmpLocale,
  61854. parentConfig = baseConfig;
  61855. if (locales[name] != null && locales[name].parentLocale != null) {
  61856. // Update existing child locale in-place to avoid memory-leaks
  61857. locales[name].set(mergeConfigs(locales[name]._config, config));
  61858. } else {
  61859. // MERGE
  61860. tmpLocale = loadLocale(name);
  61861. if (tmpLocale != null) {
  61862. parentConfig = tmpLocale._config;
  61863. }
  61864. config = mergeConfigs(parentConfig, config);
  61865. if (tmpLocale == null) {
  61866. // updateLocale is called for creating a new locale
  61867. // Set abbr so it will have a name (getters return
  61868. // undefined otherwise).
  61869. config.abbr = name;
  61870. }
  61871. locale = new Locale(config);
  61872. locale.parentLocale = locales[name];
  61873. locales[name] = locale;
  61874. }
  61875. // backwards compat for now: also set the locale
  61876. getSetGlobalLocale(name);
  61877. } else {
  61878. // pass null for config to unupdate, useful for tests
  61879. if (locales[name] != null) {
  61880. if (locales[name].parentLocale != null) {
  61881. locales[name] = locales[name].parentLocale;
  61882. if (name === getSetGlobalLocale()) {
  61883. getSetGlobalLocale(name);
  61884. }
  61885. } else if (locales[name] != null) {
  61886. delete locales[name];
  61887. }
  61888. }
  61889. }
  61890. return locales[name];
  61891. }
  61892. // returns locale data
  61893. function getLocale(key) {
  61894. var locale;
  61895. if (key && key._locale && key._locale._abbr) {
  61896. key = key._locale._abbr;
  61897. }
  61898. if (!key) {
  61899. return globalLocale;
  61900. }
  61901. if (!isArray(key)) {
  61902. //short-circuit everything else
  61903. locale = loadLocale(key);
  61904. if (locale) {
  61905. return locale;
  61906. }
  61907. key = [key];
  61908. }
  61909. return chooseLocale(key);
  61910. }
  61911. function listLocales() {
  61912. return keys(locales);
  61913. }
  61914. function checkOverflow(m) {
  61915. var overflow,
  61916. a = m._a;
  61917. if (a && getParsingFlags(m).overflow === -2) {
  61918. overflow =
  61919. a[MONTH] < 0 || a[MONTH] > 11
  61920. ? MONTH
  61921. : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
  61922. ? DATE
  61923. : a[HOUR] < 0 ||
  61924. a[HOUR] > 24 ||
  61925. (a[HOUR] === 24 &&
  61926. (a[MINUTE] !== 0 ||
  61927. a[SECOND] !== 0 ||
  61928. a[MILLISECOND] !== 0))
  61929. ? HOUR
  61930. : a[MINUTE] < 0 || a[MINUTE] > 59
  61931. ? MINUTE
  61932. : a[SECOND] < 0 || a[SECOND] > 59
  61933. ? SECOND
  61934. : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
  61935. ? MILLISECOND
  61936. : -1;
  61937. if (
  61938. getParsingFlags(m)._overflowDayOfYear &&
  61939. (overflow < YEAR || overflow > DATE)
  61940. ) {
  61941. overflow = DATE;
  61942. }
  61943. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  61944. overflow = WEEK;
  61945. }
  61946. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  61947. overflow = WEEKDAY;
  61948. }
  61949. getParsingFlags(m).overflow = overflow;
  61950. }
  61951. return m;
  61952. }
  61953. // iso 8601 regex
  61954. // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
  61955. var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
  61956. basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
  61957. tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
  61958. isoDates = [
  61959. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  61960. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  61961. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  61962. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  61963. ['YYYY-DDD', /\d{4}-\d{3}/],
  61964. ['YYYY-MM', /\d{4}-\d\d/, false],
  61965. ['YYYYYYMMDD', /[+-]\d{10}/],
  61966. ['YYYYMMDD', /\d{8}/],
  61967. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  61968. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  61969. ['YYYYDDD', /\d{7}/],
  61970. ['YYYYMM', /\d{6}/, false],
  61971. ['YYYY', /\d{4}/, false],
  61972. ],
  61973. // iso time formats and regexes
  61974. isoTimes = [
  61975. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  61976. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  61977. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  61978. ['HH:mm', /\d\d:\d\d/],
  61979. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  61980. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  61981. ['HHmmss', /\d\d\d\d\d\d/],
  61982. ['HHmm', /\d\d\d\d/],
  61983. ['HH', /\d\d/],
  61984. ],
  61985. aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
  61986. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  61987. rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
  61988. obsOffsets = {
  61989. UT: 0,
  61990. GMT: 0,
  61991. EDT: -4 * 60,
  61992. EST: -5 * 60,
  61993. CDT: -5 * 60,
  61994. CST: -6 * 60,
  61995. MDT: -6 * 60,
  61996. MST: -7 * 60,
  61997. PDT: -7 * 60,
  61998. PST: -8 * 60,
  61999. };
  62000. // date from iso format
  62001. function configFromISO(config) {
  62002. var i,
  62003. l,
  62004. string = config._i,
  62005. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  62006. allowTime,
  62007. dateFormat,
  62008. timeFormat,
  62009. tzFormat;
  62010. if (match) {
  62011. getParsingFlags(config).iso = true;
  62012. for (i = 0, l = isoDates.length; i < l; i++) {
  62013. if (isoDates[i][1].exec(match[1])) {
  62014. dateFormat = isoDates[i][0];
  62015. allowTime = isoDates[i][2] !== false;
  62016. break;
  62017. }
  62018. }
  62019. if (dateFormat == null) {
  62020. config._isValid = false;
  62021. return;
  62022. }
  62023. if (match[3]) {
  62024. for (i = 0, l = isoTimes.length; i < l; i++) {
  62025. if (isoTimes[i][1].exec(match[3])) {
  62026. // match[2] should be 'T' or space
  62027. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  62028. break;
  62029. }
  62030. }
  62031. if (timeFormat == null) {
  62032. config._isValid = false;
  62033. return;
  62034. }
  62035. }
  62036. if (!allowTime && timeFormat != null) {
  62037. config._isValid = false;
  62038. return;
  62039. }
  62040. if (match[4]) {
  62041. if (tzRegex.exec(match[4])) {
  62042. tzFormat = 'Z';
  62043. } else {
  62044. config._isValid = false;
  62045. return;
  62046. }
  62047. }
  62048. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  62049. configFromStringAndFormat(config);
  62050. } else {
  62051. config._isValid = false;
  62052. }
  62053. }
  62054. function extractFromRFC2822Strings(
  62055. yearStr,
  62056. monthStr,
  62057. dayStr,
  62058. hourStr,
  62059. minuteStr,
  62060. secondStr
  62061. ) {
  62062. var result = [
  62063. untruncateYear(yearStr),
  62064. defaultLocaleMonthsShort.indexOf(monthStr),
  62065. parseInt(dayStr, 10),
  62066. parseInt(hourStr, 10),
  62067. parseInt(minuteStr, 10),
  62068. ];
  62069. if (secondStr) {
  62070. result.push(parseInt(secondStr, 10));
  62071. }
  62072. return result;
  62073. }
  62074. function untruncateYear(yearStr) {
  62075. var year = parseInt(yearStr, 10);
  62076. if (year <= 49) {
  62077. return 2000 + year;
  62078. } else if (year <= 999) {
  62079. return 1900 + year;
  62080. }
  62081. return year;
  62082. }
  62083. function preprocessRFC2822(s) {
  62084. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  62085. return s
  62086. .replace(/\([^)]*\)|[\n\t]/g, ' ')
  62087. .replace(/(\s\s+)/g, ' ')
  62088. .replace(/^\s\s*/, '')
  62089. .replace(/\s\s*$/, '');
  62090. }
  62091. function checkWeekday(weekdayStr, parsedInput, config) {
  62092. if (weekdayStr) {
  62093. // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
  62094. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  62095. weekdayActual = new Date(
  62096. parsedInput[0],
  62097. parsedInput[1],
  62098. parsedInput[2]
  62099. ).getDay();
  62100. if (weekdayProvided !== weekdayActual) {
  62101. getParsingFlags(config).weekdayMismatch = true;
  62102. config._isValid = false;
  62103. return false;
  62104. }
  62105. }
  62106. return true;
  62107. }
  62108. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  62109. if (obsOffset) {
  62110. return obsOffsets[obsOffset];
  62111. } else if (militaryOffset) {
  62112. // the only allowed military tz is Z
  62113. return 0;
  62114. } else {
  62115. var hm = parseInt(numOffset, 10),
  62116. m = hm % 100,
  62117. h = (hm - m) / 100;
  62118. return h * 60 + m;
  62119. }
  62120. }
  62121. // date and time from ref 2822 format
  62122. function configFromRFC2822(config) {
  62123. var match = rfc2822.exec(preprocessRFC2822(config._i)),
  62124. parsedArray;
  62125. if (match) {
  62126. parsedArray = extractFromRFC2822Strings(
  62127. match[4],
  62128. match[3],
  62129. match[2],
  62130. match[5],
  62131. match[6],
  62132. match[7]
  62133. );
  62134. if (!checkWeekday(match[1], parsedArray, config)) {
  62135. return;
  62136. }
  62137. config._a = parsedArray;
  62138. config._tzm = calculateOffset(match[8], match[9], match[10]);
  62139. config._d = createUTCDate.apply(null, config._a);
  62140. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  62141. getParsingFlags(config).rfc2822 = true;
  62142. } else {
  62143. config._isValid = false;
  62144. }
  62145. }
  62146. // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
  62147. function configFromString(config) {
  62148. var matched = aspNetJsonRegex.exec(config._i);
  62149. if (matched !== null) {
  62150. config._d = new Date(+matched[1]);
  62151. return;
  62152. }
  62153. configFromISO(config);
  62154. if (config._isValid === false) {
  62155. delete config._isValid;
  62156. } else {
  62157. return;
  62158. }
  62159. configFromRFC2822(config);
  62160. if (config._isValid === false) {
  62161. delete config._isValid;
  62162. } else {
  62163. return;
  62164. }
  62165. if (config._strict) {
  62166. config._isValid = false;
  62167. } else {
  62168. // Final attempt, use Input Fallback
  62169. hooks.createFromInputFallback(config);
  62170. }
  62171. }
  62172. hooks.createFromInputFallback = deprecate(
  62173. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  62174. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  62175. 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  62176. function (config) {
  62177. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  62178. }
  62179. );
  62180. // Pick the first defined of two or three arguments.
  62181. function defaults(a, b, c) {
  62182. if (a != null) {
  62183. return a;
  62184. }
  62185. if (b != null) {
  62186. return b;
  62187. }
  62188. return c;
  62189. }
  62190. function currentDateArray(config) {
  62191. // hooks is actually the exported moment object
  62192. var nowValue = new Date(hooks.now());
  62193. if (config._useUTC) {
  62194. return [
  62195. nowValue.getUTCFullYear(),
  62196. nowValue.getUTCMonth(),
  62197. nowValue.getUTCDate(),
  62198. ];
  62199. }
  62200. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  62201. }
  62202. // convert an array to a date.
  62203. // the array should mirror the parameters below
  62204. // note: all values past the year are optional and will default to the lowest possible value.
  62205. // [year, month, day , hour, minute, second, millisecond]
  62206. function configFromArray(config) {
  62207. var i,
  62208. date,
  62209. input = [],
  62210. currentDate,
  62211. expectedWeekday,
  62212. yearToUse;
  62213. if (config._d) {
  62214. return;
  62215. }
  62216. currentDate = currentDateArray(config);
  62217. //compute day of the year from weeks and weekdays
  62218. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  62219. dayOfYearFromWeekInfo(config);
  62220. }
  62221. //if the day of the year is set, figure out what it is
  62222. if (config._dayOfYear != null) {
  62223. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  62224. if (
  62225. config._dayOfYear > daysInYear(yearToUse) ||
  62226. config._dayOfYear === 0
  62227. ) {
  62228. getParsingFlags(config)._overflowDayOfYear = true;
  62229. }
  62230. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  62231. config._a[MONTH] = date.getUTCMonth();
  62232. config._a[DATE] = date.getUTCDate();
  62233. }
  62234. // Default to current date.
  62235. // * if no year, month, day of month are given, default to today
  62236. // * if day of month is given, default month and year
  62237. // * if month is given, default only year
  62238. // * if year is given, don't default anything
  62239. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  62240. config._a[i] = input[i] = currentDate[i];
  62241. }
  62242. // Zero out whatever was not defaulted, including time
  62243. for (; i < 7; i++) {
  62244. config._a[i] = input[i] =
  62245. config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
  62246. }
  62247. // Check for 24:00:00.000
  62248. if (
  62249. config._a[HOUR] === 24 &&
  62250. config._a[MINUTE] === 0 &&
  62251. config._a[SECOND] === 0 &&
  62252. config._a[MILLISECOND] === 0
  62253. ) {
  62254. config._nextDay = true;
  62255. config._a[HOUR] = 0;
  62256. }
  62257. config._d = (config._useUTC ? createUTCDate : createDate).apply(
  62258. null,
  62259. input
  62260. );
  62261. expectedWeekday = config._useUTC
  62262. ? config._d.getUTCDay()
  62263. : config._d.getDay();
  62264. // Apply timezone offset from input. The actual utcOffset can be changed
  62265. // with parseZone.
  62266. if (config._tzm != null) {
  62267. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  62268. }
  62269. if (config._nextDay) {
  62270. config._a[HOUR] = 24;
  62271. }
  62272. // check for mismatching day of week
  62273. if (
  62274. config._w &&
  62275. typeof config._w.d !== 'undefined' &&
  62276. config._w.d !== expectedWeekday
  62277. ) {
  62278. getParsingFlags(config).weekdayMismatch = true;
  62279. }
  62280. }
  62281. function dayOfYearFromWeekInfo(config) {
  62282. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
  62283. w = config._w;
  62284. if (w.GG != null || w.W != null || w.E != null) {
  62285. dow = 1;
  62286. doy = 4;
  62287. // TODO: We need to take the current isoWeekYear, but that depends on
  62288. // how we interpret now (local, utc, fixed offset). So create
  62289. // a now version of current config (take local/utc/offset flags, and
  62290. // create now).
  62291. weekYear = defaults(
  62292. w.GG,
  62293. config._a[YEAR],
  62294. weekOfYear(createLocal(), 1, 4).year
  62295. );
  62296. week = defaults(w.W, 1);
  62297. weekday = defaults(w.E, 1);
  62298. if (weekday < 1 || weekday > 7) {
  62299. weekdayOverflow = true;
  62300. }
  62301. } else {
  62302. dow = config._locale._week.dow;
  62303. doy = config._locale._week.doy;
  62304. curWeek = weekOfYear(createLocal(), dow, doy);
  62305. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  62306. // Default to current week.
  62307. week = defaults(w.w, curWeek.week);
  62308. if (w.d != null) {
  62309. // weekday -- low day numbers are considered next week
  62310. weekday = w.d;
  62311. if (weekday < 0 || weekday > 6) {
  62312. weekdayOverflow = true;
  62313. }
  62314. } else if (w.e != null) {
  62315. // local weekday -- counting starts from beginning of week
  62316. weekday = w.e + dow;
  62317. if (w.e < 0 || w.e > 6) {
  62318. weekdayOverflow = true;
  62319. }
  62320. } else {
  62321. // default to beginning of week
  62322. weekday = dow;
  62323. }
  62324. }
  62325. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  62326. getParsingFlags(config)._overflowWeeks = true;
  62327. } else if (weekdayOverflow != null) {
  62328. getParsingFlags(config)._overflowWeekday = true;
  62329. } else {
  62330. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  62331. config._a[YEAR] = temp.year;
  62332. config._dayOfYear = temp.dayOfYear;
  62333. }
  62334. }
  62335. // constant that refers to the ISO standard
  62336. hooks.ISO_8601 = function () {};
  62337. // constant that refers to the RFC 2822 form
  62338. hooks.RFC_2822 = function () {};
  62339. // date from string and format string
  62340. function configFromStringAndFormat(config) {
  62341. // TODO: Move this to another part of the creation flow to prevent circular deps
  62342. if (config._f === hooks.ISO_8601) {
  62343. configFromISO(config);
  62344. return;
  62345. }
  62346. if (config._f === hooks.RFC_2822) {
  62347. configFromRFC2822(config);
  62348. return;
  62349. }
  62350. config._a = [];
  62351. getParsingFlags(config).empty = true;
  62352. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  62353. var string = '' + config._i,
  62354. i,
  62355. parsedInput,
  62356. tokens,
  62357. token,
  62358. skipped,
  62359. stringLength = string.length,
  62360. totalParsedInputLength = 0,
  62361. era;
  62362. tokens =
  62363. expandFormat(config._f, config._locale).match(formattingTokens) || [];
  62364. for (i = 0; i < tokens.length; i++) {
  62365. token = tokens[i];
  62366. parsedInput = (string.match(getParseRegexForToken(token, config)) ||
  62367. [])[0];
  62368. if (parsedInput) {
  62369. skipped = string.substr(0, string.indexOf(parsedInput));
  62370. if (skipped.length > 0) {
  62371. getParsingFlags(config).unusedInput.push(skipped);
  62372. }
  62373. string = string.slice(
  62374. string.indexOf(parsedInput) + parsedInput.length
  62375. );
  62376. totalParsedInputLength += parsedInput.length;
  62377. }
  62378. // don't parse if it's not a known token
  62379. if (formatTokenFunctions[token]) {
  62380. if (parsedInput) {
  62381. getParsingFlags(config).empty = false;
  62382. } else {
  62383. getParsingFlags(config).unusedTokens.push(token);
  62384. }
  62385. addTimeToArrayFromToken(token, parsedInput, config);
  62386. } else if (config._strict && !parsedInput) {
  62387. getParsingFlags(config).unusedTokens.push(token);
  62388. }
  62389. }
  62390. // add remaining unparsed input length to the string
  62391. getParsingFlags(config).charsLeftOver =
  62392. stringLength - totalParsedInputLength;
  62393. if (string.length > 0) {
  62394. getParsingFlags(config).unusedInput.push(string);
  62395. }
  62396. // clear _12h flag if hour is <= 12
  62397. if (
  62398. config._a[HOUR] <= 12 &&
  62399. getParsingFlags(config).bigHour === true &&
  62400. config._a[HOUR] > 0
  62401. ) {
  62402. getParsingFlags(config).bigHour = undefined;
  62403. }
  62404. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  62405. getParsingFlags(config).meridiem = config._meridiem;
  62406. // handle meridiem
  62407. config._a[HOUR] = meridiemFixWrap(
  62408. config._locale,
  62409. config._a[HOUR],
  62410. config._meridiem
  62411. );
  62412. // handle era
  62413. era = getParsingFlags(config).era;
  62414. if (era !== null) {
  62415. config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
  62416. }
  62417. configFromArray(config);
  62418. checkOverflow(config);
  62419. }
  62420. function meridiemFixWrap(locale, hour, meridiem) {
  62421. var isPm;
  62422. if (meridiem == null) {
  62423. // nothing to do
  62424. return hour;
  62425. }
  62426. if (locale.meridiemHour != null) {
  62427. return locale.meridiemHour(hour, meridiem);
  62428. } else if (locale.isPM != null) {
  62429. // Fallback
  62430. isPm = locale.isPM(meridiem);
  62431. if (isPm && hour < 12) {
  62432. hour += 12;
  62433. }
  62434. if (!isPm && hour === 12) {
  62435. hour = 0;
  62436. }
  62437. return hour;
  62438. } else {
  62439. // this is not supposed to happen
  62440. return hour;
  62441. }
  62442. }
  62443. // date from string and array of format strings
  62444. function configFromStringAndArray(config) {
  62445. var tempConfig,
  62446. bestMoment,
  62447. scoreToBeat,
  62448. i,
  62449. currentScore,
  62450. validFormatFound,
  62451. bestFormatIsValid = false;
  62452. if (config._f.length === 0) {
  62453. getParsingFlags(config).invalidFormat = true;
  62454. config._d = new Date(NaN);
  62455. return;
  62456. }
  62457. for (i = 0; i < config._f.length; i++) {
  62458. currentScore = 0;
  62459. validFormatFound = false;
  62460. tempConfig = copyConfig({}, config);
  62461. if (config._useUTC != null) {
  62462. tempConfig._useUTC = config._useUTC;
  62463. }
  62464. tempConfig._f = config._f[i];
  62465. configFromStringAndFormat(tempConfig);
  62466. if (isValid(tempConfig)) {
  62467. validFormatFound = true;
  62468. }
  62469. // if there is any input that was not parsed add a penalty for that format
  62470. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  62471. //or tokens
  62472. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  62473. getParsingFlags(tempConfig).score = currentScore;
  62474. if (!bestFormatIsValid) {
  62475. if (
  62476. scoreToBeat == null ||
  62477. currentScore < scoreToBeat ||
  62478. validFormatFound
  62479. ) {
  62480. scoreToBeat = currentScore;
  62481. bestMoment = tempConfig;
  62482. if (validFormatFound) {
  62483. bestFormatIsValid = true;
  62484. }
  62485. }
  62486. } else {
  62487. if (currentScore < scoreToBeat) {
  62488. scoreToBeat = currentScore;
  62489. bestMoment = tempConfig;
  62490. }
  62491. }
  62492. }
  62493. extend(config, bestMoment || tempConfig);
  62494. }
  62495. function configFromObject(config) {
  62496. if (config._d) {
  62497. return;
  62498. }
  62499. var i = normalizeObjectUnits(config._i),
  62500. dayOrDate = i.day === undefined ? i.date : i.day;
  62501. config._a = map(
  62502. [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
  62503. function (obj) {
  62504. return obj && parseInt(obj, 10);
  62505. }
  62506. );
  62507. configFromArray(config);
  62508. }
  62509. function createFromConfig(config) {
  62510. var res = new Moment(checkOverflow(prepareConfig(config)));
  62511. if (res._nextDay) {
  62512. // Adding is smart enough around DST
  62513. res.add(1, 'd');
  62514. res._nextDay = undefined;
  62515. }
  62516. return res;
  62517. }
  62518. function prepareConfig(config) {
  62519. var input = config._i,
  62520. format = config._f;
  62521. config._locale = config._locale || getLocale(config._l);
  62522. if (input === null || (format === undefined && input === '')) {
  62523. return createInvalid({ nullInput: true });
  62524. }
  62525. if (typeof input === 'string') {
  62526. config._i = input = config._locale.preparse(input);
  62527. }
  62528. if (isMoment(input)) {
  62529. return new Moment(checkOverflow(input));
  62530. } else if (isDate(input)) {
  62531. config._d = input;
  62532. } else if (isArray(format)) {
  62533. configFromStringAndArray(config);
  62534. } else if (format) {
  62535. configFromStringAndFormat(config);
  62536. } else {
  62537. configFromInput(config);
  62538. }
  62539. if (!isValid(config)) {
  62540. config._d = null;
  62541. }
  62542. return config;
  62543. }
  62544. function configFromInput(config) {
  62545. var input = config._i;
  62546. if (isUndefined(input)) {
  62547. config._d = new Date(hooks.now());
  62548. } else if (isDate(input)) {
  62549. config._d = new Date(input.valueOf());
  62550. } else if (typeof input === 'string') {
  62551. configFromString(config);
  62552. } else if (isArray(input)) {
  62553. config._a = map(input.slice(0), function (obj) {
  62554. return parseInt(obj, 10);
  62555. });
  62556. configFromArray(config);
  62557. } else if (isObject(input)) {
  62558. configFromObject(config);
  62559. } else if (isNumber(input)) {
  62560. // from milliseconds
  62561. config._d = new Date(input);
  62562. } else {
  62563. hooks.createFromInputFallback(config);
  62564. }
  62565. }
  62566. function createLocalOrUTC(input, format, locale, strict, isUTC) {
  62567. var c = {};
  62568. if (format === true || format === false) {
  62569. strict = format;
  62570. format = undefined;
  62571. }
  62572. if (locale === true || locale === false) {
  62573. strict = locale;
  62574. locale = undefined;
  62575. }
  62576. if (
  62577. (isObject(input) && isObjectEmpty(input)) ||
  62578. (isArray(input) && input.length === 0)
  62579. ) {
  62580. input = undefined;
  62581. }
  62582. // object construction must be done this way.
  62583. // https://github.com/moment/moment/issues/1423
  62584. c._isAMomentObject = true;
  62585. c._useUTC = c._isUTC = isUTC;
  62586. c._l = locale;
  62587. c._i = input;
  62588. c._f = format;
  62589. c._strict = strict;
  62590. return createFromConfig(c);
  62591. }
  62592. function createLocal(input, format, locale, strict) {
  62593. return createLocalOrUTC(input, format, locale, strict, false);
  62594. }
  62595. var prototypeMin = deprecate(
  62596. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  62597. function () {
  62598. var other = createLocal.apply(null, arguments);
  62599. if (this.isValid() && other.isValid()) {
  62600. return other < this ? this : other;
  62601. } else {
  62602. return createInvalid();
  62603. }
  62604. }
  62605. ),
  62606. prototypeMax = deprecate(
  62607. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  62608. function () {
  62609. var other = createLocal.apply(null, arguments);
  62610. if (this.isValid() && other.isValid()) {
  62611. return other > this ? this : other;
  62612. } else {
  62613. return createInvalid();
  62614. }
  62615. }
  62616. );
  62617. // Pick a moment m from moments so that m[fn](other) is true for all
  62618. // other. This relies on the function fn to be transitive.
  62619. //
  62620. // moments should either be an array of moment objects or an array, whose
  62621. // first element is an array of moment objects.
  62622. function pickBy(fn, moments) {
  62623. var res, i;
  62624. if (moments.length === 1 && isArray(moments[0])) {
  62625. moments = moments[0];
  62626. }
  62627. if (!moments.length) {
  62628. return createLocal();
  62629. }
  62630. res = moments[0];
  62631. for (i = 1; i < moments.length; ++i) {
  62632. if (!moments[i].isValid() || moments[i][fn](res)) {
  62633. res = moments[i];
  62634. }
  62635. }
  62636. return res;
  62637. }
  62638. // TODO: Use [].sort instead?
  62639. function min() {
  62640. var args = [].slice.call(arguments, 0);
  62641. return pickBy('isBefore', args);
  62642. }
  62643. function max() {
  62644. var args = [].slice.call(arguments, 0);
  62645. return pickBy('isAfter', args);
  62646. }
  62647. var now = function () {
  62648. return Date.now ? Date.now() : +new Date();
  62649. };
  62650. var ordering = [
  62651. 'year',
  62652. 'quarter',
  62653. 'month',
  62654. 'week',
  62655. 'day',
  62656. 'hour',
  62657. 'minute',
  62658. 'second',
  62659. 'millisecond',
  62660. ];
  62661. function isDurationValid(m) {
  62662. var key,
  62663. unitHasDecimal = false,
  62664. i;
  62665. for (key in m) {
  62666. if (
  62667. hasOwnProp(m, key) &&
  62668. !(
  62669. indexOf.call(ordering, key) !== -1 &&
  62670. (m[key] == null || !isNaN(m[key]))
  62671. )
  62672. ) {
  62673. return false;
  62674. }
  62675. }
  62676. for (i = 0; i < ordering.length; ++i) {
  62677. if (m[ordering[i]]) {
  62678. if (unitHasDecimal) {
  62679. return false; // only allow non-integers for smallest unit
  62680. }
  62681. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  62682. unitHasDecimal = true;
  62683. }
  62684. }
  62685. }
  62686. return true;
  62687. }
  62688. function isValid$1() {
  62689. return this._isValid;
  62690. }
  62691. function createInvalid$1() {
  62692. return createDuration(NaN);
  62693. }
  62694. function Duration(duration) {
  62695. var normalizedInput = normalizeObjectUnits(duration),
  62696. years = normalizedInput.year || 0,
  62697. quarters = normalizedInput.quarter || 0,
  62698. months = normalizedInput.month || 0,
  62699. weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
  62700. days = normalizedInput.day || 0,
  62701. hours = normalizedInput.hour || 0,
  62702. minutes = normalizedInput.minute || 0,
  62703. seconds = normalizedInput.second || 0,
  62704. milliseconds = normalizedInput.millisecond || 0;
  62705. this._isValid = isDurationValid(normalizedInput);
  62706. // representation for dateAddRemove
  62707. this._milliseconds =
  62708. +milliseconds +
  62709. seconds * 1e3 + // 1000
  62710. minutes * 6e4 + // 1000 * 60
  62711. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  62712. // Because of dateAddRemove treats 24 hours as different from a
  62713. // day when working around DST, we need to store them separately
  62714. this._days = +days + weeks * 7;
  62715. // It is impossible to translate months into days without knowing
  62716. // which months you are are talking about, so we have to store
  62717. // it separately.
  62718. this._months = +months + quarters * 3 + years * 12;
  62719. this._data = {};
  62720. this._locale = getLocale();
  62721. this._bubble();
  62722. }
  62723. function isDuration(obj) {
  62724. return obj instanceof Duration;
  62725. }
  62726. function absRound(number) {
  62727. if (number < 0) {
  62728. return Math.round(-1 * number) * -1;
  62729. } else {
  62730. return Math.round(number);
  62731. }
  62732. }
  62733. // compare two arrays, return the number of differences
  62734. function compareArrays(array1, array2, dontConvert) {
  62735. var len = Math.min(array1.length, array2.length),
  62736. lengthDiff = Math.abs(array1.length - array2.length),
  62737. diffs = 0,
  62738. i;
  62739. for (i = 0; i < len; i++) {
  62740. if (
  62741. (dontConvert && array1[i] !== array2[i]) ||
  62742. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
  62743. ) {
  62744. diffs++;
  62745. }
  62746. }
  62747. return diffs + lengthDiff;
  62748. }
  62749. // FORMATTING
  62750. function offset(token, separator) {
  62751. addFormatToken(token, 0, 0, function () {
  62752. var offset = this.utcOffset(),
  62753. sign = '+';
  62754. if (offset < 0) {
  62755. offset = -offset;
  62756. sign = '-';
  62757. }
  62758. return (
  62759. sign +
  62760. zeroFill(~~(offset / 60), 2) +
  62761. separator +
  62762. zeroFill(~~offset % 60, 2)
  62763. );
  62764. });
  62765. }
  62766. offset('Z', ':');
  62767. offset('ZZ', '');
  62768. // PARSING
  62769. addRegexToken('Z', matchShortOffset);
  62770. addRegexToken('ZZ', matchShortOffset);
  62771. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  62772. config._useUTC = true;
  62773. config._tzm = offsetFromString(matchShortOffset, input);
  62774. });
  62775. // HELPERS
  62776. // timezone chunker
  62777. // '+10:00' > ['10', '00']
  62778. // '-1530' > ['-15', '30']
  62779. var chunkOffset = /([\+\-]|\d\d)/gi;
  62780. function offsetFromString(matcher, string) {
  62781. var matches = (string || '').match(matcher),
  62782. chunk,
  62783. parts,
  62784. minutes;
  62785. if (matches === null) {
  62786. return null;
  62787. }
  62788. chunk = matches[matches.length - 1] || [];
  62789. parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  62790. minutes = +(parts[1] * 60) + toInt(parts[2]);
  62791. return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
  62792. }
  62793. // Return a moment from input, that is local/utc/zone equivalent to model.
  62794. function cloneWithOffset(input, model) {
  62795. var res, diff;
  62796. if (model._isUTC) {
  62797. res = model.clone();
  62798. diff =
  62799. (isMoment(input) || isDate(input)
  62800. ? input.valueOf()
  62801. : createLocal(input).valueOf()) - res.valueOf();
  62802. // Use low-level api, because this fn is low-level api.
  62803. res._d.setTime(res._d.valueOf() + diff);
  62804. hooks.updateOffset(res, false);
  62805. return res;
  62806. } else {
  62807. return createLocal(input).local();
  62808. }
  62809. }
  62810. function getDateOffset(m) {
  62811. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  62812. // https://github.com/moment/moment/pull/1871
  62813. return -Math.round(m._d.getTimezoneOffset());
  62814. }
  62815. // HOOKS
  62816. // This function will be called whenever a moment is mutated.
  62817. // It is intended to keep the offset in sync with the timezone.
  62818. hooks.updateOffset = function () {};
  62819. // MOMENTS
  62820. // keepLocalTime = true means only change the timezone, without
  62821. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  62822. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  62823. // +0200, so we adjust the time as needed, to be valid.
  62824. //
  62825. // Keeping the time actually adds/subtracts (one hour)
  62826. // from the actual represented time. That is why we call updateOffset
  62827. // a second time. In case it wants us to change the offset again
  62828. // _changeInProgress == true case, then we have to adjust, because
  62829. // there is no such time in the given timezone.
  62830. function getSetOffset(input, keepLocalTime, keepMinutes) {
  62831. var offset = this._offset || 0,
  62832. localAdjust;
  62833. if (!this.isValid()) {
  62834. return input != null ? this : NaN;
  62835. }
  62836. if (input != null) {
  62837. if (typeof input === 'string') {
  62838. input = offsetFromString(matchShortOffset, input);
  62839. if (input === null) {
  62840. return this;
  62841. }
  62842. } else if (Math.abs(input) < 16 && !keepMinutes) {
  62843. input = input * 60;
  62844. }
  62845. if (!this._isUTC && keepLocalTime) {
  62846. localAdjust = getDateOffset(this);
  62847. }
  62848. this._offset = input;
  62849. this._isUTC = true;
  62850. if (localAdjust != null) {
  62851. this.add(localAdjust, 'm');
  62852. }
  62853. if (offset !== input) {
  62854. if (!keepLocalTime || this._changeInProgress) {
  62855. addSubtract(
  62856. this,
  62857. createDuration(input - offset, 'm'),
  62858. 1,
  62859. false
  62860. );
  62861. } else if (!this._changeInProgress) {
  62862. this._changeInProgress = true;
  62863. hooks.updateOffset(this, true);
  62864. this._changeInProgress = null;
  62865. }
  62866. }
  62867. return this;
  62868. } else {
  62869. return this._isUTC ? offset : getDateOffset(this);
  62870. }
  62871. }
  62872. function getSetZone(input, keepLocalTime) {
  62873. if (input != null) {
  62874. if (typeof input !== 'string') {
  62875. input = -input;
  62876. }
  62877. this.utcOffset(input, keepLocalTime);
  62878. return this;
  62879. } else {
  62880. return -this.utcOffset();
  62881. }
  62882. }
  62883. function setOffsetToUTC(keepLocalTime) {
  62884. return this.utcOffset(0, keepLocalTime);
  62885. }
  62886. function setOffsetToLocal(keepLocalTime) {
  62887. if (this._isUTC) {
  62888. this.utcOffset(0, keepLocalTime);
  62889. this._isUTC = false;
  62890. if (keepLocalTime) {
  62891. this.subtract(getDateOffset(this), 'm');
  62892. }
  62893. }
  62894. return this;
  62895. }
  62896. function setOffsetToParsedOffset() {
  62897. if (this._tzm != null) {
  62898. this.utcOffset(this._tzm, false, true);
  62899. } else if (typeof this._i === 'string') {
  62900. var tZone = offsetFromString(matchOffset, this._i);
  62901. if (tZone != null) {
  62902. this.utcOffset(tZone);
  62903. } else {
  62904. this.utcOffset(0, true);
  62905. }
  62906. }
  62907. return this;
  62908. }
  62909. function hasAlignedHourOffset(input) {
  62910. if (!this.isValid()) {
  62911. return false;
  62912. }
  62913. input = input ? createLocal(input).utcOffset() : 0;
  62914. return (this.utcOffset() - input) % 60 === 0;
  62915. }
  62916. function isDaylightSavingTime() {
  62917. return (
  62918. this.utcOffset() > this.clone().month(0).utcOffset() ||
  62919. this.utcOffset() > this.clone().month(5).utcOffset()
  62920. );
  62921. }
  62922. function isDaylightSavingTimeShifted() {
  62923. if (!isUndefined(this._isDSTShifted)) {
  62924. return this._isDSTShifted;
  62925. }
  62926. var c = {},
  62927. other;
  62928. copyConfig(c, this);
  62929. c = prepareConfig(c);
  62930. if (c._a) {
  62931. other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  62932. this._isDSTShifted =
  62933. this.isValid() && compareArrays(c._a, other.toArray()) > 0;
  62934. } else {
  62935. this._isDSTShifted = false;
  62936. }
  62937. return this._isDSTShifted;
  62938. }
  62939. function isLocal() {
  62940. return this.isValid() ? !this._isUTC : false;
  62941. }
  62942. function isUtcOffset() {
  62943. return this.isValid() ? this._isUTC : false;
  62944. }
  62945. function isUtc() {
  62946. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  62947. }
  62948. // ASP.NET json date format regex
  62949. var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
  62950. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  62951. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  62952. // and further modified to allow for strings containing both week and day
  62953. isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  62954. function createDuration(input, key) {
  62955. var duration = input,
  62956. // matching against regexp is expensive, do it on demand
  62957. match = null,
  62958. sign,
  62959. ret,
  62960. diffRes;
  62961. if (isDuration(input)) {
  62962. duration = {
  62963. ms: input._milliseconds,
  62964. d: input._days,
  62965. M: input._months,
  62966. };
  62967. } else if (isNumber(input) || !isNaN(+input)) {
  62968. duration = {};
  62969. if (key) {
  62970. duration[key] = +input;
  62971. } else {
  62972. duration.milliseconds = +input;
  62973. }
  62974. } else if ((match = aspNetRegex.exec(input))) {
  62975. sign = match[1] === '-' ? -1 : 1;
  62976. duration = {
  62977. y: 0,
  62978. d: toInt(match[DATE]) * sign,
  62979. h: toInt(match[HOUR]) * sign,
  62980. m: toInt(match[MINUTE]) * sign,
  62981. s: toInt(match[SECOND]) * sign,
  62982. ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
  62983. };
  62984. } else if ((match = isoRegex.exec(input))) {
  62985. sign = match[1] === '-' ? -1 : 1;
  62986. duration = {
  62987. y: parseIso(match[2], sign),
  62988. M: parseIso(match[3], sign),
  62989. w: parseIso(match[4], sign),
  62990. d: parseIso(match[5], sign),
  62991. h: parseIso(match[6], sign),
  62992. m: parseIso(match[7], sign),
  62993. s: parseIso(match[8], sign),
  62994. };
  62995. } else if (duration == null) {
  62996. // checks for null or undefined
  62997. duration = {};
  62998. } else if (
  62999. typeof duration === 'object' &&
  63000. ('from' in duration || 'to' in duration)
  63001. ) {
  63002. diffRes = momentsDifference(
  63003. createLocal(duration.from),
  63004. createLocal(duration.to)
  63005. );
  63006. duration = {};
  63007. duration.ms = diffRes.milliseconds;
  63008. duration.M = diffRes.months;
  63009. }
  63010. ret = new Duration(duration);
  63011. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  63012. ret._locale = input._locale;
  63013. }
  63014. if (isDuration(input) && hasOwnProp(input, '_isValid')) {
  63015. ret._isValid = input._isValid;
  63016. }
  63017. return ret;
  63018. }
  63019. createDuration.fn = Duration.prototype;
  63020. createDuration.invalid = createInvalid$1;
  63021. function parseIso(inp, sign) {
  63022. // We'd normally use ~~inp for this, but unfortunately it also
  63023. // converts floats to ints.
  63024. // inp may be undefined, so careful calling replace on it.
  63025. var res = inp && parseFloat(inp.replace(',', '.'));
  63026. // apply sign while we're at it
  63027. return (isNaN(res) ? 0 : res) * sign;
  63028. }
  63029. function positiveMomentsDifference(base, other) {
  63030. var res = {};
  63031. res.months =
  63032. other.month() - base.month() + (other.year() - base.year()) * 12;
  63033. if (base.clone().add(res.months, 'M').isAfter(other)) {
  63034. --res.months;
  63035. }
  63036. res.milliseconds = +other - +base.clone().add(res.months, 'M');
  63037. return res;
  63038. }
  63039. function momentsDifference(base, other) {
  63040. var res;
  63041. if (!(base.isValid() && other.isValid())) {
  63042. return { milliseconds: 0, months: 0 };
  63043. }
  63044. other = cloneWithOffset(other, base);
  63045. if (base.isBefore(other)) {
  63046. res = positiveMomentsDifference(base, other);
  63047. } else {
  63048. res = positiveMomentsDifference(other, base);
  63049. res.milliseconds = -res.milliseconds;
  63050. res.months = -res.months;
  63051. }
  63052. return res;
  63053. }
  63054. // TODO: remove 'name' arg after deprecation is removed
  63055. function createAdder(direction, name) {
  63056. return function (val, period) {
  63057. var dur, tmp;
  63058. //invert the arguments, but complain about it
  63059. if (period !== null && !isNaN(+period)) {
  63060. deprecateSimple(
  63061. name,
  63062. 'moment().' +
  63063. name +
  63064. '(period, number) is deprecated. Please use moment().' +
  63065. name +
  63066. '(number, period). ' +
  63067. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
  63068. );
  63069. tmp = val;
  63070. val = period;
  63071. period = tmp;
  63072. }
  63073. dur = createDuration(val, period);
  63074. addSubtract(this, dur, direction);
  63075. return this;
  63076. };
  63077. }
  63078. function addSubtract(mom, duration, isAdding, updateOffset) {
  63079. var milliseconds = duration._milliseconds,
  63080. days = absRound(duration._days),
  63081. months = absRound(duration._months);
  63082. if (!mom.isValid()) {
  63083. // No op
  63084. return;
  63085. }
  63086. updateOffset = updateOffset == null ? true : updateOffset;
  63087. if (months) {
  63088. setMonth(mom, get(mom, 'Month') + months * isAdding);
  63089. }
  63090. if (days) {
  63091. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  63092. }
  63093. if (milliseconds) {
  63094. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  63095. }
  63096. if (updateOffset) {
  63097. hooks.updateOffset(mom, days || months);
  63098. }
  63099. }
  63100. var add = createAdder(1, 'add'),
  63101. subtract = createAdder(-1, 'subtract');
  63102. function isString(input) {
  63103. return typeof input === 'string' || input instanceof String;
  63104. }
  63105. // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
  63106. function isMomentInput(input) {
  63107. return (
  63108. isMoment(input) ||
  63109. isDate(input) ||
  63110. isString(input) ||
  63111. isNumber(input) ||
  63112. isNumberOrStringArray(input) ||
  63113. isMomentInputObject(input) ||
  63114. input === null ||
  63115. input === undefined
  63116. );
  63117. }
  63118. function isMomentInputObject(input) {
  63119. var objectTest = isObject(input) && !isObjectEmpty(input),
  63120. propertyTest = false,
  63121. properties = [
  63122. 'years',
  63123. 'year',
  63124. 'y',
  63125. 'months',
  63126. 'month',
  63127. 'M',
  63128. 'days',
  63129. 'day',
  63130. 'd',
  63131. 'dates',
  63132. 'date',
  63133. 'D',
  63134. 'hours',
  63135. 'hour',
  63136. 'h',
  63137. 'minutes',
  63138. 'minute',
  63139. 'm',
  63140. 'seconds',
  63141. 'second',
  63142. 's',
  63143. 'milliseconds',
  63144. 'millisecond',
  63145. 'ms',
  63146. ],
  63147. i,
  63148. property;
  63149. for (i = 0; i < properties.length; i += 1) {
  63150. property = properties[i];
  63151. propertyTest = propertyTest || hasOwnProp(input, property);
  63152. }
  63153. return objectTest && propertyTest;
  63154. }
  63155. function isNumberOrStringArray(input) {
  63156. var arrayTest = isArray(input),
  63157. dataTypeTest = false;
  63158. if (arrayTest) {
  63159. dataTypeTest =
  63160. input.filter(function (item) {
  63161. return !isNumber(item) && isString(input);
  63162. }).length === 0;
  63163. }
  63164. return arrayTest && dataTypeTest;
  63165. }
  63166. function isCalendarSpec(input) {
  63167. var objectTest = isObject(input) && !isObjectEmpty(input),
  63168. propertyTest = false,
  63169. properties = [
  63170. 'sameDay',
  63171. 'nextDay',
  63172. 'lastDay',
  63173. 'nextWeek',
  63174. 'lastWeek',
  63175. 'sameElse',
  63176. ],
  63177. i,
  63178. property;
  63179. for (i = 0; i < properties.length; i += 1) {
  63180. property = properties[i];
  63181. propertyTest = propertyTest || hasOwnProp(input, property);
  63182. }
  63183. return objectTest && propertyTest;
  63184. }
  63185. function getCalendarFormat(myMoment, now) {
  63186. var diff = myMoment.diff(now, 'days', true);
  63187. return diff < -6
  63188. ? 'sameElse'
  63189. : diff < -1
  63190. ? 'lastWeek'
  63191. : diff < 0
  63192. ? 'lastDay'
  63193. : diff < 1
  63194. ? 'sameDay'
  63195. : diff < 2
  63196. ? 'nextDay'
  63197. : diff < 7
  63198. ? 'nextWeek'
  63199. : 'sameElse';
  63200. }
  63201. function calendar$1(time, formats) {
  63202. // Support for single parameter, formats only overload to the calendar function
  63203. if (arguments.length === 1) {
  63204. if (!arguments[0]) {
  63205. time = undefined;
  63206. formats = undefined;
  63207. } else if (isMomentInput(arguments[0])) {
  63208. time = arguments[0];
  63209. formats = undefined;
  63210. } else if (isCalendarSpec(arguments[0])) {
  63211. formats = arguments[0];
  63212. time = undefined;
  63213. }
  63214. }
  63215. // We want to compare the start of today, vs this.
  63216. // Getting start-of-today depends on whether we're local/utc/offset or not.
  63217. var now = time || createLocal(),
  63218. sod = cloneWithOffset(now, this).startOf('day'),
  63219. format = hooks.calendarFormat(this, sod) || 'sameElse',
  63220. output =
  63221. formats &&
  63222. (isFunction(formats[format])
  63223. ? formats[format].call(this, now)
  63224. : formats[format]);
  63225. return this.format(
  63226. output || this.localeData().calendar(format, this, createLocal(now))
  63227. );
  63228. }
  63229. function clone() {
  63230. return new Moment(this);
  63231. }
  63232. function isAfter(input, units) {
  63233. var localInput = isMoment(input) ? input : createLocal(input);
  63234. if (!(this.isValid() && localInput.isValid())) {
  63235. return false;
  63236. }
  63237. units = normalizeUnits(units) || 'millisecond';
  63238. if (units === 'millisecond') {
  63239. return this.valueOf() > localInput.valueOf();
  63240. } else {
  63241. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  63242. }
  63243. }
  63244. function isBefore(input, units) {
  63245. var localInput = isMoment(input) ? input : createLocal(input);
  63246. if (!(this.isValid() && localInput.isValid())) {
  63247. return false;
  63248. }
  63249. units = normalizeUnits(units) || 'millisecond';
  63250. if (units === 'millisecond') {
  63251. return this.valueOf() < localInput.valueOf();
  63252. } else {
  63253. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  63254. }
  63255. }
  63256. function isBetween(from, to, units, inclusivity) {
  63257. var localFrom = isMoment(from) ? from : createLocal(from),
  63258. localTo = isMoment(to) ? to : createLocal(to);
  63259. if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
  63260. return false;
  63261. }
  63262. inclusivity = inclusivity || '()';
  63263. return (
  63264. (inclusivity[0] === '('
  63265. ? this.isAfter(localFrom, units)
  63266. : !this.isBefore(localFrom, units)) &&
  63267. (inclusivity[1] === ')'
  63268. ? this.isBefore(localTo, units)
  63269. : !this.isAfter(localTo, units))
  63270. );
  63271. }
  63272. function isSame(input, units) {
  63273. var localInput = isMoment(input) ? input : createLocal(input),
  63274. inputMs;
  63275. if (!(this.isValid() && localInput.isValid())) {
  63276. return false;
  63277. }
  63278. units = normalizeUnits(units) || 'millisecond';
  63279. if (units === 'millisecond') {
  63280. return this.valueOf() === localInput.valueOf();
  63281. } else {
  63282. inputMs = localInput.valueOf();
  63283. return (
  63284. this.clone().startOf(units).valueOf() <= inputMs &&
  63285. inputMs <= this.clone().endOf(units).valueOf()
  63286. );
  63287. }
  63288. }
  63289. function isSameOrAfter(input, units) {
  63290. return this.isSame(input, units) || this.isAfter(input, units);
  63291. }
  63292. function isSameOrBefore(input, units) {
  63293. return this.isSame(input, units) || this.isBefore(input, units);
  63294. }
  63295. function diff(input, units, asFloat) {
  63296. var that, zoneDelta, output;
  63297. if (!this.isValid()) {
  63298. return NaN;
  63299. }
  63300. that = cloneWithOffset(input, this);
  63301. if (!that.isValid()) {
  63302. return NaN;
  63303. }
  63304. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  63305. units = normalizeUnits(units);
  63306. switch (units) {
  63307. case 'year':
  63308. output = monthDiff(this, that) / 12;
  63309. break;
  63310. case 'month':
  63311. output = monthDiff(this, that);
  63312. break;
  63313. case 'quarter':
  63314. output = monthDiff(this, that) / 3;
  63315. break;
  63316. case 'second':
  63317. output = (this - that) / 1e3;
  63318. break; // 1000
  63319. case 'minute':
  63320. output = (this - that) / 6e4;
  63321. break; // 1000 * 60
  63322. case 'hour':
  63323. output = (this - that) / 36e5;
  63324. break; // 1000 * 60 * 60
  63325. case 'day':
  63326. output = (this - that - zoneDelta) / 864e5;
  63327. break; // 1000 * 60 * 60 * 24, negate dst
  63328. case 'week':
  63329. output = (this - that - zoneDelta) / 6048e5;
  63330. break; // 1000 * 60 * 60 * 24 * 7, negate dst
  63331. default:
  63332. output = this - that;
  63333. }
  63334. return asFloat ? output : absFloor(output);
  63335. }
  63336. function monthDiff(a, b) {
  63337. if (a.date() < b.date()) {
  63338. // end-of-month calculations work correct when the start month has more
  63339. // days than the end month.
  63340. return -monthDiff(b, a);
  63341. }
  63342. // difference in months
  63343. var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
  63344. // b is in (anchor - 1 month, anchor + 1 month)
  63345. anchor = a.clone().add(wholeMonthDiff, 'months'),
  63346. anchor2,
  63347. adjust;
  63348. if (b - anchor < 0) {
  63349. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  63350. // linear across the month
  63351. adjust = (b - anchor) / (anchor - anchor2);
  63352. } else {
  63353. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  63354. // linear across the month
  63355. adjust = (b - anchor) / (anchor2 - anchor);
  63356. }
  63357. //check for negative zero, return zero if negative zero
  63358. return -(wholeMonthDiff + adjust) || 0;
  63359. }
  63360. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  63361. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  63362. function toString() {
  63363. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  63364. }
  63365. function toISOString(keepOffset) {
  63366. if (!this.isValid()) {
  63367. return null;
  63368. }
  63369. var utc = keepOffset !== true,
  63370. m = utc ? this.clone().utc() : this;
  63371. if (m.year() < 0 || m.year() > 9999) {
  63372. return formatMoment(
  63373. m,
  63374. utc
  63375. ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
  63376. : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
  63377. );
  63378. }
  63379. if (isFunction(Date.prototype.toISOString)) {
  63380. // native implementation is ~50x faster, use it when we can
  63381. if (utc) {
  63382. return this.toDate().toISOString();
  63383. } else {
  63384. return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
  63385. .toISOString()
  63386. .replace('Z', formatMoment(m, 'Z'));
  63387. }
  63388. }
  63389. return formatMoment(
  63390. m,
  63391. utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
  63392. );
  63393. }
  63394. /**
  63395. * Return a human readable representation of a moment that can
  63396. * also be evaluated to get a new moment which is the same
  63397. *
  63398. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  63399. */
  63400. function inspect() {
  63401. if (!this.isValid()) {
  63402. return 'moment.invalid(/* ' + this._i + ' */)';
  63403. }
  63404. var func = 'moment',
  63405. zone = '',
  63406. prefix,
  63407. year,
  63408. datetime,
  63409. suffix;
  63410. if (!this.isLocal()) {
  63411. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  63412. zone = 'Z';
  63413. }
  63414. prefix = '[' + func + '("]';
  63415. year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
  63416. datetime = '-MM-DD[T]HH:mm:ss.SSS';
  63417. suffix = zone + '[")]';
  63418. return this.format(prefix + year + datetime + suffix);
  63419. }
  63420. function format(inputString) {
  63421. if (!inputString) {
  63422. inputString = this.isUtc()
  63423. ? hooks.defaultFormatUtc
  63424. : hooks.defaultFormat;
  63425. }
  63426. var output = formatMoment(this, inputString);
  63427. return this.localeData().postformat(output);
  63428. }
  63429. function from(time, withoutSuffix) {
  63430. if (
  63431. this.isValid() &&
  63432. ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
  63433. ) {
  63434. return createDuration({ to: this, from: time })
  63435. .locale(this.locale())
  63436. .humanize(!withoutSuffix);
  63437. } else {
  63438. return this.localeData().invalidDate();
  63439. }
  63440. }
  63441. function fromNow(withoutSuffix) {
  63442. return this.from(createLocal(), withoutSuffix);
  63443. }
  63444. function to(time, withoutSuffix) {
  63445. if (
  63446. this.isValid() &&
  63447. ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
  63448. ) {
  63449. return createDuration({ from: this, to: time })
  63450. .locale(this.locale())
  63451. .humanize(!withoutSuffix);
  63452. } else {
  63453. return this.localeData().invalidDate();
  63454. }
  63455. }
  63456. function toNow(withoutSuffix) {
  63457. return this.to(createLocal(), withoutSuffix);
  63458. }
  63459. // If passed a locale key, it will set the locale for this
  63460. // instance. Otherwise, it will return the locale configuration
  63461. // variables for this instance.
  63462. function locale(key) {
  63463. var newLocaleData;
  63464. if (key === undefined) {
  63465. return this._locale._abbr;
  63466. } else {
  63467. newLocaleData = getLocale(key);
  63468. if (newLocaleData != null) {
  63469. this._locale = newLocaleData;
  63470. }
  63471. return this;
  63472. }
  63473. }
  63474. var lang = deprecate(
  63475. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  63476. function (key) {
  63477. if (key === undefined) {
  63478. return this.localeData();
  63479. } else {
  63480. return this.locale(key);
  63481. }
  63482. }
  63483. );
  63484. function localeData() {
  63485. return this._locale;
  63486. }
  63487. var MS_PER_SECOND = 1000,
  63488. MS_PER_MINUTE = 60 * MS_PER_SECOND,
  63489. MS_PER_HOUR = 60 * MS_PER_MINUTE,
  63490. MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
  63491. // actual modulo - handles negative numbers (for dates before 1970):
  63492. function mod$1(dividend, divisor) {
  63493. return ((dividend % divisor) + divisor) % divisor;
  63494. }
  63495. function localStartOfDate(y, m, d) {
  63496. // the date constructor remaps years 0-99 to 1900-1999
  63497. if (y < 100 && y >= 0) {
  63498. // preserve leap years using a full 400 year cycle, then reset
  63499. return new Date(y + 400, m, d) - MS_PER_400_YEARS;
  63500. } else {
  63501. return new Date(y, m, d).valueOf();
  63502. }
  63503. }
  63504. function utcStartOfDate(y, m, d) {
  63505. // Date.UTC remaps years 0-99 to 1900-1999
  63506. if (y < 100 && y >= 0) {
  63507. // preserve leap years using a full 400 year cycle, then reset
  63508. return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
  63509. } else {
  63510. return Date.UTC(y, m, d);
  63511. }
  63512. }
  63513. function startOf(units) {
  63514. var time, startOfDate;
  63515. units = normalizeUnits(units);
  63516. if (units === undefined || units === 'millisecond' || !this.isValid()) {
  63517. return this;
  63518. }
  63519. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  63520. switch (units) {
  63521. case 'year':
  63522. time = startOfDate(this.year(), 0, 1);
  63523. break;
  63524. case 'quarter':
  63525. time = startOfDate(
  63526. this.year(),
  63527. this.month() - (this.month() % 3),
  63528. 1
  63529. );
  63530. break;
  63531. case 'month':
  63532. time = startOfDate(this.year(), this.month(), 1);
  63533. break;
  63534. case 'week':
  63535. time = startOfDate(
  63536. this.year(),
  63537. this.month(),
  63538. this.date() - this.weekday()
  63539. );
  63540. break;
  63541. case 'isoWeek':
  63542. time = startOfDate(
  63543. this.year(),
  63544. this.month(),
  63545. this.date() - (this.isoWeekday() - 1)
  63546. );
  63547. break;
  63548. case 'day':
  63549. case 'date':
  63550. time = startOfDate(this.year(), this.month(), this.date());
  63551. break;
  63552. case 'hour':
  63553. time = this._d.valueOf();
  63554. time -= mod$1(
  63555. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  63556. MS_PER_HOUR
  63557. );
  63558. break;
  63559. case 'minute':
  63560. time = this._d.valueOf();
  63561. time -= mod$1(time, MS_PER_MINUTE);
  63562. break;
  63563. case 'second':
  63564. time = this._d.valueOf();
  63565. time -= mod$1(time, MS_PER_SECOND);
  63566. break;
  63567. }
  63568. this._d.setTime(time);
  63569. hooks.updateOffset(this, true);
  63570. return this;
  63571. }
  63572. function endOf(units) {
  63573. var time, startOfDate;
  63574. units = normalizeUnits(units);
  63575. if (units === undefined || units === 'millisecond' || !this.isValid()) {
  63576. return this;
  63577. }
  63578. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  63579. switch (units) {
  63580. case 'year':
  63581. time = startOfDate(this.year() + 1, 0, 1) - 1;
  63582. break;
  63583. case 'quarter':
  63584. time =
  63585. startOfDate(
  63586. this.year(),
  63587. this.month() - (this.month() % 3) + 3,
  63588. 1
  63589. ) - 1;
  63590. break;
  63591. case 'month':
  63592. time = startOfDate(this.year(), this.month() + 1, 1) - 1;
  63593. break;
  63594. case 'week':
  63595. time =
  63596. startOfDate(
  63597. this.year(),
  63598. this.month(),
  63599. this.date() - this.weekday() + 7
  63600. ) - 1;
  63601. break;
  63602. case 'isoWeek':
  63603. time =
  63604. startOfDate(
  63605. this.year(),
  63606. this.month(),
  63607. this.date() - (this.isoWeekday() - 1) + 7
  63608. ) - 1;
  63609. break;
  63610. case 'day':
  63611. case 'date':
  63612. time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
  63613. break;
  63614. case 'hour':
  63615. time = this._d.valueOf();
  63616. time +=
  63617. MS_PER_HOUR -
  63618. mod$1(
  63619. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  63620. MS_PER_HOUR
  63621. ) -
  63622. 1;
  63623. break;
  63624. case 'minute':
  63625. time = this._d.valueOf();
  63626. time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
  63627. break;
  63628. case 'second':
  63629. time = this._d.valueOf();
  63630. time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
  63631. break;
  63632. }
  63633. this._d.setTime(time);
  63634. hooks.updateOffset(this, true);
  63635. return this;
  63636. }
  63637. function valueOf() {
  63638. return this._d.valueOf() - (this._offset || 0) * 60000;
  63639. }
  63640. function unix() {
  63641. return Math.floor(this.valueOf() / 1000);
  63642. }
  63643. function toDate() {
  63644. return new Date(this.valueOf());
  63645. }
  63646. function toArray() {
  63647. var m = this;
  63648. return [
  63649. m.year(),
  63650. m.month(),
  63651. m.date(),
  63652. m.hour(),
  63653. m.minute(),
  63654. m.second(),
  63655. m.millisecond(),
  63656. ];
  63657. }
  63658. function toObject() {
  63659. var m = this;
  63660. return {
  63661. years: m.year(),
  63662. months: m.month(),
  63663. date: m.date(),
  63664. hours: m.hours(),
  63665. minutes: m.minutes(),
  63666. seconds: m.seconds(),
  63667. milliseconds: m.milliseconds(),
  63668. };
  63669. }
  63670. function toJSON() {
  63671. // new Date(NaN).toJSON() === null
  63672. return this.isValid() ? this.toISOString() : null;
  63673. }
  63674. function isValid$2() {
  63675. return isValid(this);
  63676. }
  63677. function parsingFlags() {
  63678. return extend({}, getParsingFlags(this));
  63679. }
  63680. function invalidAt() {
  63681. return getParsingFlags(this).overflow;
  63682. }
  63683. function creationData() {
  63684. return {
  63685. input: this._i,
  63686. format: this._f,
  63687. locale: this._locale,
  63688. isUTC: this._isUTC,
  63689. strict: this._strict,
  63690. };
  63691. }
  63692. addFormatToken('N', 0, 0, 'eraAbbr');
  63693. addFormatToken('NN', 0, 0, 'eraAbbr');
  63694. addFormatToken('NNN', 0, 0, 'eraAbbr');
  63695. addFormatToken('NNNN', 0, 0, 'eraName');
  63696. addFormatToken('NNNNN', 0, 0, 'eraNarrow');
  63697. addFormatToken('y', ['y', 1], 'yo', 'eraYear');
  63698. addFormatToken('y', ['yy', 2], 0, 'eraYear');
  63699. addFormatToken('y', ['yyy', 3], 0, 'eraYear');
  63700. addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
  63701. addRegexToken('N', matchEraAbbr);
  63702. addRegexToken('NN', matchEraAbbr);
  63703. addRegexToken('NNN', matchEraAbbr);
  63704. addRegexToken('NNNN', matchEraName);
  63705. addRegexToken('NNNNN', matchEraNarrow);
  63706. addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
  63707. input,
  63708. array,
  63709. config,
  63710. token
  63711. ) {
  63712. var era = config._locale.erasParse(input, token, config._strict);
  63713. if (era) {
  63714. getParsingFlags(config).era = era;
  63715. } else {
  63716. getParsingFlags(config).invalidEra = input;
  63717. }
  63718. });
  63719. addRegexToken('y', matchUnsigned);
  63720. addRegexToken('yy', matchUnsigned);
  63721. addRegexToken('yyy', matchUnsigned);
  63722. addRegexToken('yyyy', matchUnsigned);
  63723. addRegexToken('yo', matchEraYearOrdinal);
  63724. addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
  63725. addParseToken(['yo'], function (input, array, config, token) {
  63726. var match;
  63727. if (config._locale._eraYearOrdinalRegex) {
  63728. match = input.match(config._locale._eraYearOrdinalRegex);
  63729. }
  63730. if (config._locale.eraYearOrdinalParse) {
  63731. array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
  63732. } else {
  63733. array[YEAR] = parseInt(input, 10);
  63734. }
  63735. });
  63736. function localeEras(m, format) {
  63737. var i,
  63738. l,
  63739. date,
  63740. eras = this._eras || getLocale('en')._eras;
  63741. for (i = 0, l = eras.length; i < l; ++i) {
  63742. switch (typeof eras[i].since) {
  63743. case 'string':
  63744. // truncate time
  63745. date = hooks(eras[i].since).startOf('day');
  63746. eras[i].since = date.valueOf();
  63747. break;
  63748. }
  63749. switch (typeof eras[i].until) {
  63750. case 'undefined':
  63751. eras[i].until = +Infinity;
  63752. break;
  63753. case 'string':
  63754. // truncate time
  63755. date = hooks(eras[i].until).startOf('day').valueOf();
  63756. eras[i].until = date.valueOf();
  63757. break;
  63758. }
  63759. }
  63760. return eras;
  63761. }
  63762. function localeErasParse(eraName, format, strict) {
  63763. var i,
  63764. l,
  63765. eras = this.eras(),
  63766. name,
  63767. abbr,
  63768. narrow;
  63769. eraName = eraName.toUpperCase();
  63770. for (i = 0, l = eras.length; i < l; ++i) {
  63771. name = eras[i].name.toUpperCase();
  63772. abbr = eras[i].abbr.toUpperCase();
  63773. narrow = eras[i].narrow.toUpperCase();
  63774. if (strict) {
  63775. switch (format) {
  63776. case 'N':
  63777. case 'NN':
  63778. case 'NNN':
  63779. if (abbr === eraName) {
  63780. return eras[i];
  63781. }
  63782. break;
  63783. case 'NNNN':
  63784. if (name === eraName) {
  63785. return eras[i];
  63786. }
  63787. break;
  63788. case 'NNNNN':
  63789. if (narrow === eraName) {
  63790. return eras[i];
  63791. }
  63792. break;
  63793. }
  63794. } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
  63795. return eras[i];
  63796. }
  63797. }
  63798. }
  63799. function localeErasConvertYear(era, year) {
  63800. var dir = era.since <= era.until ? +1 : -1;
  63801. if (year === undefined) {
  63802. return hooks(era.since).year();
  63803. } else {
  63804. return hooks(era.since).year() + (year - era.offset) * dir;
  63805. }
  63806. }
  63807. function getEraName() {
  63808. var i,
  63809. l,
  63810. val,
  63811. eras = this.localeData().eras();
  63812. for (i = 0, l = eras.length; i < l; ++i) {
  63813. // truncate time
  63814. val = this.clone().startOf('day').valueOf();
  63815. if (eras[i].since <= val && val <= eras[i].until) {
  63816. return eras[i].name;
  63817. }
  63818. if (eras[i].until <= val && val <= eras[i].since) {
  63819. return eras[i].name;
  63820. }
  63821. }
  63822. return '';
  63823. }
  63824. function getEraNarrow() {
  63825. var i,
  63826. l,
  63827. val,
  63828. eras = this.localeData().eras();
  63829. for (i = 0, l = eras.length; i < l; ++i) {
  63830. // truncate time
  63831. val = this.clone().startOf('day').valueOf();
  63832. if (eras[i].since <= val && val <= eras[i].until) {
  63833. return eras[i].narrow;
  63834. }
  63835. if (eras[i].until <= val && val <= eras[i].since) {
  63836. return eras[i].narrow;
  63837. }
  63838. }
  63839. return '';
  63840. }
  63841. function getEraAbbr() {
  63842. var i,
  63843. l,
  63844. val,
  63845. eras = this.localeData().eras();
  63846. for (i = 0, l = eras.length; i < l; ++i) {
  63847. // truncate time
  63848. val = this.clone().startOf('day').valueOf();
  63849. if (eras[i].since <= val && val <= eras[i].until) {
  63850. return eras[i].abbr;
  63851. }
  63852. if (eras[i].until <= val && val <= eras[i].since) {
  63853. return eras[i].abbr;
  63854. }
  63855. }
  63856. return '';
  63857. }
  63858. function getEraYear() {
  63859. var i,
  63860. l,
  63861. dir,
  63862. val,
  63863. eras = this.localeData().eras();
  63864. for (i = 0, l = eras.length; i < l; ++i) {
  63865. dir = eras[i].since <= eras[i].until ? +1 : -1;
  63866. // truncate time
  63867. val = this.clone().startOf('day').valueOf();
  63868. if (
  63869. (eras[i].since <= val && val <= eras[i].until) ||
  63870. (eras[i].until <= val && val <= eras[i].since)
  63871. ) {
  63872. return (
  63873. (this.year() - hooks(eras[i].since).year()) * dir +
  63874. eras[i].offset
  63875. );
  63876. }
  63877. }
  63878. return this.year();
  63879. }
  63880. function erasNameRegex(isStrict) {
  63881. if (!hasOwnProp(this, '_erasNameRegex')) {
  63882. computeErasParse.call(this);
  63883. }
  63884. return isStrict ? this._erasNameRegex : this._erasRegex;
  63885. }
  63886. function erasAbbrRegex(isStrict) {
  63887. if (!hasOwnProp(this, '_erasAbbrRegex')) {
  63888. computeErasParse.call(this);
  63889. }
  63890. return isStrict ? this._erasAbbrRegex : this._erasRegex;
  63891. }
  63892. function erasNarrowRegex(isStrict) {
  63893. if (!hasOwnProp(this, '_erasNarrowRegex')) {
  63894. computeErasParse.call(this);
  63895. }
  63896. return isStrict ? this._erasNarrowRegex : this._erasRegex;
  63897. }
  63898. function matchEraAbbr(isStrict, locale) {
  63899. return locale.erasAbbrRegex(isStrict);
  63900. }
  63901. function matchEraName(isStrict, locale) {
  63902. return locale.erasNameRegex(isStrict);
  63903. }
  63904. function matchEraNarrow(isStrict, locale) {
  63905. return locale.erasNarrowRegex(isStrict);
  63906. }
  63907. function matchEraYearOrdinal(isStrict, locale) {
  63908. return locale._eraYearOrdinalRegex || matchUnsigned;
  63909. }
  63910. function computeErasParse() {
  63911. var abbrPieces = [],
  63912. namePieces = [],
  63913. narrowPieces = [],
  63914. mixedPieces = [],
  63915. i,
  63916. l,
  63917. eras = this.eras();
  63918. for (i = 0, l = eras.length; i < l; ++i) {
  63919. namePieces.push(regexEscape(eras[i].name));
  63920. abbrPieces.push(regexEscape(eras[i].abbr));
  63921. narrowPieces.push(regexEscape(eras[i].narrow));
  63922. mixedPieces.push(regexEscape(eras[i].name));
  63923. mixedPieces.push(regexEscape(eras[i].abbr));
  63924. mixedPieces.push(regexEscape(eras[i].narrow));
  63925. }
  63926. this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  63927. this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
  63928. this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
  63929. this._erasNarrowRegex = new RegExp(
  63930. '^(' + narrowPieces.join('|') + ')',
  63931. 'i'
  63932. );
  63933. }
  63934. // FORMATTING
  63935. addFormatToken(0, ['gg', 2], 0, function () {
  63936. return this.weekYear() % 100;
  63937. });
  63938. addFormatToken(0, ['GG', 2], 0, function () {
  63939. return this.isoWeekYear() % 100;
  63940. });
  63941. function addWeekYearFormatToken(token, getter) {
  63942. addFormatToken(0, [token, token.length], 0, getter);
  63943. }
  63944. addWeekYearFormatToken('gggg', 'weekYear');
  63945. addWeekYearFormatToken('ggggg', 'weekYear');
  63946. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  63947. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  63948. // ALIASES
  63949. addUnitAlias('weekYear', 'gg');
  63950. addUnitAlias('isoWeekYear', 'GG');
  63951. // PRIORITY
  63952. addUnitPriority('weekYear', 1);
  63953. addUnitPriority('isoWeekYear', 1);
  63954. // PARSING
  63955. addRegexToken('G', matchSigned);
  63956. addRegexToken('g', matchSigned);
  63957. addRegexToken('GG', match1to2, match2);
  63958. addRegexToken('gg', match1to2, match2);
  63959. addRegexToken('GGGG', match1to4, match4);
  63960. addRegexToken('gggg', match1to4, match4);
  63961. addRegexToken('GGGGG', match1to6, match6);
  63962. addRegexToken('ggggg', match1to6, match6);
  63963. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
  63964. input,
  63965. week,
  63966. config,
  63967. token
  63968. ) {
  63969. week[token.substr(0, 2)] = toInt(input);
  63970. });
  63971. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  63972. week[token] = hooks.parseTwoDigitYear(input);
  63973. });
  63974. // MOMENTS
  63975. function getSetWeekYear(input) {
  63976. return getSetWeekYearHelper.call(
  63977. this,
  63978. input,
  63979. this.week(),
  63980. this.weekday(),
  63981. this.localeData()._week.dow,
  63982. this.localeData()._week.doy
  63983. );
  63984. }
  63985. function getSetISOWeekYear(input) {
  63986. return getSetWeekYearHelper.call(
  63987. this,
  63988. input,
  63989. this.isoWeek(),
  63990. this.isoWeekday(),
  63991. 1,
  63992. 4
  63993. );
  63994. }
  63995. function getISOWeeksInYear() {
  63996. return weeksInYear(this.year(), 1, 4);
  63997. }
  63998. function getISOWeeksInISOWeekYear() {
  63999. return weeksInYear(this.isoWeekYear(), 1, 4);
  64000. }
  64001. function getWeeksInYear() {
  64002. var weekInfo = this.localeData()._week;
  64003. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  64004. }
  64005. function getWeeksInWeekYear() {
  64006. var weekInfo = this.localeData()._week;
  64007. return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
  64008. }
  64009. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  64010. var weeksTarget;
  64011. if (input == null) {
  64012. return weekOfYear(this, dow, doy).year;
  64013. } else {
  64014. weeksTarget = weeksInYear(input, dow, doy);
  64015. if (week > weeksTarget) {
  64016. week = weeksTarget;
  64017. }
  64018. return setWeekAll.call(this, input, week, weekday, dow, doy);
  64019. }
  64020. }
  64021. function setWeekAll(weekYear, week, weekday, dow, doy) {
  64022. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  64023. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  64024. this.year(date.getUTCFullYear());
  64025. this.month(date.getUTCMonth());
  64026. this.date(date.getUTCDate());
  64027. return this;
  64028. }
  64029. // FORMATTING
  64030. addFormatToken('Q', 0, 'Qo', 'quarter');
  64031. // ALIASES
  64032. addUnitAlias('quarter', 'Q');
  64033. // PRIORITY
  64034. addUnitPriority('quarter', 7);
  64035. // PARSING
  64036. addRegexToken('Q', match1);
  64037. addParseToken('Q', function (input, array) {
  64038. array[MONTH] = (toInt(input) - 1) * 3;
  64039. });
  64040. // MOMENTS
  64041. function getSetQuarter(input) {
  64042. return input == null
  64043. ? Math.ceil((this.month() + 1) / 3)
  64044. : this.month((input - 1) * 3 + (this.month() % 3));
  64045. }
  64046. // FORMATTING
  64047. addFormatToken('D', ['DD', 2], 'Do', 'date');
  64048. // ALIASES
  64049. addUnitAlias('date', 'D');
  64050. // PRIORITY
  64051. addUnitPriority('date', 9);
  64052. // PARSING
  64053. addRegexToken('D', match1to2);
  64054. addRegexToken('DD', match1to2, match2);
  64055. addRegexToken('Do', function (isStrict, locale) {
  64056. // TODO: Remove "ordinalParse" fallback in next major release.
  64057. return isStrict
  64058. ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
  64059. : locale._dayOfMonthOrdinalParseLenient;
  64060. });
  64061. addParseToken(['D', 'DD'], DATE);
  64062. addParseToken('Do', function (input, array) {
  64063. array[DATE] = toInt(input.match(match1to2)[0]);
  64064. });
  64065. // MOMENTS
  64066. var getSetDayOfMonth = makeGetSet('Date', true);
  64067. // FORMATTING
  64068. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  64069. // ALIASES
  64070. addUnitAlias('dayOfYear', 'DDD');
  64071. // PRIORITY
  64072. addUnitPriority('dayOfYear', 4);
  64073. // PARSING
  64074. addRegexToken('DDD', match1to3);
  64075. addRegexToken('DDDD', match3);
  64076. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  64077. config._dayOfYear = toInt(input);
  64078. });
  64079. // HELPERS
  64080. // MOMENTS
  64081. function getSetDayOfYear(input) {
  64082. var dayOfYear =
  64083. Math.round(
  64084. (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
  64085. ) + 1;
  64086. return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
  64087. }
  64088. // FORMATTING
  64089. addFormatToken('m', ['mm', 2], 0, 'minute');
  64090. // ALIASES
  64091. addUnitAlias('minute', 'm');
  64092. // PRIORITY
  64093. addUnitPriority('minute', 14);
  64094. // PARSING
  64095. addRegexToken('m', match1to2);
  64096. addRegexToken('mm', match1to2, match2);
  64097. addParseToken(['m', 'mm'], MINUTE);
  64098. // MOMENTS
  64099. var getSetMinute = makeGetSet('Minutes', false);
  64100. // FORMATTING
  64101. addFormatToken('s', ['ss', 2], 0, 'second');
  64102. // ALIASES
  64103. addUnitAlias('second', 's');
  64104. // PRIORITY
  64105. addUnitPriority('second', 15);
  64106. // PARSING
  64107. addRegexToken('s', match1to2);
  64108. addRegexToken('ss', match1to2, match2);
  64109. addParseToken(['s', 'ss'], SECOND);
  64110. // MOMENTS
  64111. var getSetSecond = makeGetSet('Seconds', false);
  64112. // FORMATTING
  64113. addFormatToken('S', 0, 0, function () {
  64114. return ~~(this.millisecond() / 100);
  64115. });
  64116. addFormatToken(0, ['SS', 2], 0, function () {
  64117. return ~~(this.millisecond() / 10);
  64118. });
  64119. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  64120. addFormatToken(0, ['SSSS', 4], 0, function () {
  64121. return this.millisecond() * 10;
  64122. });
  64123. addFormatToken(0, ['SSSSS', 5], 0, function () {
  64124. return this.millisecond() * 100;
  64125. });
  64126. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  64127. return this.millisecond() * 1000;
  64128. });
  64129. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  64130. return this.millisecond() * 10000;
  64131. });
  64132. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  64133. return this.millisecond() * 100000;
  64134. });
  64135. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  64136. return this.millisecond() * 1000000;
  64137. });
  64138. // ALIASES
  64139. addUnitAlias('millisecond', 'ms');
  64140. // PRIORITY
  64141. addUnitPriority('millisecond', 16);
  64142. // PARSING
  64143. addRegexToken('S', match1to3, match1);
  64144. addRegexToken('SS', match1to3, match2);
  64145. addRegexToken('SSS', match1to3, match3);
  64146. var token, getSetMillisecond;
  64147. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  64148. addRegexToken(token, matchUnsigned);
  64149. }
  64150. function parseMs(input, array) {
  64151. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  64152. }
  64153. for (token = 'S'; token.length <= 9; token += 'S') {
  64154. addParseToken(token, parseMs);
  64155. }
  64156. getSetMillisecond = makeGetSet('Milliseconds', false);
  64157. // FORMATTING
  64158. addFormatToken('z', 0, 0, 'zoneAbbr');
  64159. addFormatToken('zz', 0, 0, 'zoneName');
  64160. // MOMENTS
  64161. function getZoneAbbr() {
  64162. return this._isUTC ? 'UTC' : '';
  64163. }
  64164. function getZoneName() {
  64165. return this._isUTC ? 'Coordinated Universal Time' : '';
  64166. }
  64167. var proto = Moment.prototype;
  64168. proto.add = add;
  64169. proto.calendar = calendar$1;
  64170. proto.clone = clone;
  64171. proto.diff = diff;
  64172. proto.endOf = endOf;
  64173. proto.format = format;
  64174. proto.from = from;
  64175. proto.fromNow = fromNow;
  64176. proto.to = to;
  64177. proto.toNow = toNow;
  64178. proto.get = stringGet;
  64179. proto.invalidAt = invalidAt;
  64180. proto.isAfter = isAfter;
  64181. proto.isBefore = isBefore;
  64182. proto.isBetween = isBetween;
  64183. proto.isSame = isSame;
  64184. proto.isSameOrAfter = isSameOrAfter;
  64185. proto.isSameOrBefore = isSameOrBefore;
  64186. proto.isValid = isValid$2;
  64187. proto.lang = lang;
  64188. proto.locale = locale;
  64189. proto.localeData = localeData;
  64190. proto.max = prototypeMax;
  64191. proto.min = prototypeMin;
  64192. proto.parsingFlags = parsingFlags;
  64193. proto.set = stringSet;
  64194. proto.startOf = startOf;
  64195. proto.subtract = subtract;
  64196. proto.toArray = toArray;
  64197. proto.toObject = toObject;
  64198. proto.toDate = toDate;
  64199. proto.toISOString = toISOString;
  64200. proto.inspect = inspect;
  64201. if (typeof Symbol !== 'undefined' && Symbol.for != null) {
  64202. proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
  64203. return 'Moment<' + this.format() + '>';
  64204. };
  64205. }
  64206. proto.toJSON = toJSON;
  64207. proto.toString = toString;
  64208. proto.unix = unix;
  64209. proto.valueOf = valueOf;
  64210. proto.creationData = creationData;
  64211. proto.eraName = getEraName;
  64212. proto.eraNarrow = getEraNarrow;
  64213. proto.eraAbbr = getEraAbbr;
  64214. proto.eraYear = getEraYear;
  64215. proto.year = getSetYear;
  64216. proto.isLeapYear = getIsLeapYear;
  64217. proto.weekYear = getSetWeekYear;
  64218. proto.isoWeekYear = getSetISOWeekYear;
  64219. proto.quarter = proto.quarters = getSetQuarter;
  64220. proto.month = getSetMonth;
  64221. proto.daysInMonth = getDaysInMonth;
  64222. proto.week = proto.weeks = getSetWeek;
  64223. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  64224. proto.weeksInYear = getWeeksInYear;
  64225. proto.weeksInWeekYear = getWeeksInWeekYear;
  64226. proto.isoWeeksInYear = getISOWeeksInYear;
  64227. proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
  64228. proto.date = getSetDayOfMonth;
  64229. proto.day = proto.days = getSetDayOfWeek;
  64230. proto.weekday = getSetLocaleDayOfWeek;
  64231. proto.isoWeekday = getSetISODayOfWeek;
  64232. proto.dayOfYear = getSetDayOfYear;
  64233. proto.hour = proto.hours = getSetHour;
  64234. proto.minute = proto.minutes = getSetMinute;
  64235. proto.second = proto.seconds = getSetSecond;
  64236. proto.millisecond = proto.milliseconds = getSetMillisecond;
  64237. proto.utcOffset = getSetOffset;
  64238. proto.utc = setOffsetToUTC;
  64239. proto.local = setOffsetToLocal;
  64240. proto.parseZone = setOffsetToParsedOffset;
  64241. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  64242. proto.isDST = isDaylightSavingTime;
  64243. proto.isLocal = isLocal;
  64244. proto.isUtcOffset = isUtcOffset;
  64245. proto.isUtc = isUtc;
  64246. proto.isUTC = isUtc;
  64247. proto.zoneAbbr = getZoneAbbr;
  64248. proto.zoneName = getZoneName;
  64249. proto.dates = deprecate(
  64250. 'dates accessor is deprecated. Use date instead.',
  64251. getSetDayOfMonth
  64252. );
  64253. proto.months = deprecate(
  64254. 'months accessor is deprecated. Use month instead',
  64255. getSetMonth
  64256. );
  64257. proto.years = deprecate(
  64258. 'years accessor is deprecated. Use year instead',
  64259. getSetYear
  64260. );
  64261. proto.zone = deprecate(
  64262. 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
  64263. getSetZone
  64264. );
  64265. proto.isDSTShifted = deprecate(
  64266. 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
  64267. isDaylightSavingTimeShifted
  64268. );
  64269. function createUnix(input) {
  64270. return createLocal(input * 1000);
  64271. }
  64272. function createInZone() {
  64273. return createLocal.apply(null, arguments).parseZone();
  64274. }
  64275. function preParsePostFormat(string) {
  64276. return string;
  64277. }
  64278. var proto$1 = Locale.prototype;
  64279. proto$1.calendar = calendar;
  64280. proto$1.longDateFormat = longDateFormat;
  64281. proto$1.invalidDate = invalidDate;
  64282. proto$1.ordinal = ordinal;
  64283. proto$1.preparse = preParsePostFormat;
  64284. proto$1.postformat = preParsePostFormat;
  64285. proto$1.relativeTime = relativeTime;
  64286. proto$1.pastFuture = pastFuture;
  64287. proto$1.set = set;
  64288. proto$1.eras = localeEras;
  64289. proto$1.erasParse = localeErasParse;
  64290. proto$1.erasConvertYear = localeErasConvertYear;
  64291. proto$1.erasAbbrRegex = erasAbbrRegex;
  64292. proto$1.erasNameRegex = erasNameRegex;
  64293. proto$1.erasNarrowRegex = erasNarrowRegex;
  64294. proto$1.months = localeMonths;
  64295. proto$1.monthsShort = localeMonthsShort;
  64296. proto$1.monthsParse = localeMonthsParse;
  64297. proto$1.monthsRegex = monthsRegex;
  64298. proto$1.monthsShortRegex = monthsShortRegex;
  64299. proto$1.week = localeWeek;
  64300. proto$1.firstDayOfYear = localeFirstDayOfYear;
  64301. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  64302. proto$1.weekdays = localeWeekdays;
  64303. proto$1.weekdaysMin = localeWeekdaysMin;
  64304. proto$1.weekdaysShort = localeWeekdaysShort;
  64305. proto$1.weekdaysParse = localeWeekdaysParse;
  64306. proto$1.weekdaysRegex = weekdaysRegex;
  64307. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  64308. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  64309. proto$1.isPM = localeIsPM;
  64310. proto$1.meridiem = localeMeridiem;
  64311. function get$1(format, index, field, setter) {
  64312. var locale = getLocale(),
  64313. utc = createUTC().set(setter, index);
  64314. return locale[field](utc, format);
  64315. }
  64316. function listMonthsImpl(format, index, field) {
  64317. if (isNumber(format)) {
  64318. index = format;
  64319. format = undefined;
  64320. }
  64321. format = format || '';
  64322. if (index != null) {
  64323. return get$1(format, index, field, 'month');
  64324. }
  64325. var i,
  64326. out = [];
  64327. for (i = 0; i < 12; i++) {
  64328. out[i] = get$1(format, i, field, 'month');
  64329. }
  64330. return out;
  64331. }
  64332. // ()
  64333. // (5)
  64334. // (fmt, 5)
  64335. // (fmt)
  64336. // (true)
  64337. // (true, 5)
  64338. // (true, fmt, 5)
  64339. // (true, fmt)
  64340. function listWeekdaysImpl(localeSorted, format, index, field) {
  64341. if (typeof localeSorted === 'boolean') {
  64342. if (isNumber(format)) {
  64343. index = format;
  64344. format = undefined;
  64345. }
  64346. format = format || '';
  64347. } else {
  64348. format = localeSorted;
  64349. index = format;
  64350. localeSorted = false;
  64351. if (isNumber(format)) {
  64352. index = format;
  64353. format = undefined;
  64354. }
  64355. format = format || '';
  64356. }
  64357. var locale = getLocale(),
  64358. shift = localeSorted ? locale._week.dow : 0,
  64359. i,
  64360. out = [];
  64361. if (index != null) {
  64362. return get$1(format, (index + shift) % 7, field, 'day');
  64363. }
  64364. for (i = 0; i < 7; i++) {
  64365. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  64366. }
  64367. return out;
  64368. }
  64369. function listMonths(format, index) {
  64370. return listMonthsImpl(format, index, 'months');
  64371. }
  64372. function listMonthsShort(format, index) {
  64373. return listMonthsImpl(format, index, 'monthsShort');
  64374. }
  64375. function listWeekdays(localeSorted, format, index) {
  64376. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  64377. }
  64378. function listWeekdaysShort(localeSorted, format, index) {
  64379. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  64380. }
  64381. function listWeekdaysMin(localeSorted, format, index) {
  64382. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  64383. }
  64384. getSetGlobalLocale('en', {
  64385. eras: [
  64386. {
  64387. since: '0001-01-01',
  64388. until: +Infinity,
  64389. offset: 1,
  64390. name: 'Anno Domini',
  64391. narrow: 'AD',
  64392. abbr: 'AD',
  64393. },
  64394. {
  64395. since: '0000-12-31',
  64396. until: -Infinity,
  64397. offset: 1,
  64398. name: 'Before Christ',
  64399. narrow: 'BC',
  64400. abbr: 'BC',
  64401. },
  64402. ],
  64403. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  64404. ordinal: function (number) {
  64405. var b = number % 10,
  64406. output =
  64407. toInt((number % 100) / 10) === 1
  64408. ? 'th'
  64409. : b === 1
  64410. ? 'st'
  64411. : b === 2
  64412. ? 'nd'
  64413. : b === 3
  64414. ? 'rd'
  64415. : 'th';
  64416. return number + output;
  64417. },
  64418. });
  64419. // Side effect imports
  64420. hooks.lang = deprecate(
  64421. 'moment.lang is deprecated. Use moment.locale instead.',
  64422. getSetGlobalLocale
  64423. );
  64424. hooks.langData = deprecate(
  64425. 'moment.langData is deprecated. Use moment.localeData instead.',
  64426. getLocale
  64427. );
  64428. var mathAbs = Math.abs;
  64429. function abs() {
  64430. var data = this._data;
  64431. this._milliseconds = mathAbs(this._milliseconds);
  64432. this._days = mathAbs(this._days);
  64433. this._months = mathAbs(this._months);
  64434. data.milliseconds = mathAbs(data.milliseconds);
  64435. data.seconds = mathAbs(data.seconds);
  64436. data.minutes = mathAbs(data.minutes);
  64437. data.hours = mathAbs(data.hours);
  64438. data.months = mathAbs(data.months);
  64439. data.years = mathAbs(data.years);
  64440. return this;
  64441. }
  64442. function addSubtract$1(duration, input, value, direction) {
  64443. var other = createDuration(input, value);
  64444. duration._milliseconds += direction * other._milliseconds;
  64445. duration._days += direction * other._days;
  64446. duration._months += direction * other._months;
  64447. return duration._bubble();
  64448. }
  64449. // supports only 2.0-style add(1, 's') or add(duration)
  64450. function add$1(input, value) {
  64451. return addSubtract$1(this, input, value, 1);
  64452. }
  64453. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  64454. function subtract$1(input, value) {
  64455. return addSubtract$1(this, input, value, -1);
  64456. }
  64457. function absCeil(number) {
  64458. if (number < 0) {
  64459. return Math.floor(number);
  64460. } else {
  64461. return Math.ceil(number);
  64462. }
  64463. }
  64464. function bubble() {
  64465. var milliseconds = this._milliseconds,
  64466. days = this._days,
  64467. months = this._months,
  64468. data = this._data,
  64469. seconds,
  64470. minutes,
  64471. hours,
  64472. years,
  64473. monthsFromDays;
  64474. // if we have a mix of positive and negative values, bubble down first
  64475. // check: https://github.com/moment/moment/issues/2166
  64476. if (
  64477. !(
  64478. (milliseconds >= 0 && days >= 0 && months >= 0) ||
  64479. (milliseconds <= 0 && days <= 0 && months <= 0)
  64480. )
  64481. ) {
  64482. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  64483. days = 0;
  64484. months = 0;
  64485. }
  64486. // The following code bubbles up values, see the tests for
  64487. // examples of what that means.
  64488. data.milliseconds = milliseconds % 1000;
  64489. seconds = absFloor(milliseconds / 1000);
  64490. data.seconds = seconds % 60;
  64491. minutes = absFloor(seconds / 60);
  64492. data.minutes = minutes % 60;
  64493. hours = absFloor(minutes / 60);
  64494. data.hours = hours % 24;
  64495. days += absFloor(hours / 24);
  64496. // convert days to months
  64497. monthsFromDays = absFloor(daysToMonths(days));
  64498. months += monthsFromDays;
  64499. days -= absCeil(monthsToDays(monthsFromDays));
  64500. // 12 months -> 1 year
  64501. years = absFloor(months / 12);
  64502. months %= 12;
  64503. data.days = days;
  64504. data.months = months;
  64505. data.years = years;
  64506. return this;
  64507. }
  64508. function daysToMonths(days) {
  64509. // 400 years have 146097 days (taking into account leap year rules)
  64510. // 400 years have 12 months === 4800
  64511. return (days * 4800) / 146097;
  64512. }
  64513. function monthsToDays(months) {
  64514. // the reverse of daysToMonths
  64515. return (months * 146097) / 4800;
  64516. }
  64517. function as(units) {
  64518. if (!this.isValid()) {
  64519. return NaN;
  64520. }
  64521. var days,
  64522. months,
  64523. milliseconds = this._milliseconds;
  64524. units = normalizeUnits(units);
  64525. if (units === 'month' || units === 'quarter' || units === 'year') {
  64526. days = this._days + milliseconds / 864e5;
  64527. months = this._months + daysToMonths(days);
  64528. switch (units) {
  64529. case 'month':
  64530. return months;
  64531. case 'quarter':
  64532. return months / 3;
  64533. case 'year':
  64534. return months / 12;
  64535. }
  64536. } else {
  64537. // handle milliseconds separately because of floating point math errors (issue #1867)
  64538. days = this._days + Math.round(monthsToDays(this._months));
  64539. switch (units) {
  64540. case 'week':
  64541. return days / 7 + milliseconds / 6048e5;
  64542. case 'day':
  64543. return days + milliseconds / 864e5;
  64544. case 'hour':
  64545. return days * 24 + milliseconds / 36e5;
  64546. case 'minute':
  64547. return days * 1440 + milliseconds / 6e4;
  64548. case 'second':
  64549. return days * 86400 + milliseconds / 1000;
  64550. // Math.floor prevents floating point math errors here
  64551. case 'millisecond':
  64552. return Math.floor(days * 864e5) + milliseconds;
  64553. default:
  64554. throw new Error('Unknown unit ' + units);
  64555. }
  64556. }
  64557. }
  64558. // TODO: Use this.as('ms')?
  64559. function valueOf$1() {
  64560. if (!this.isValid()) {
  64561. return NaN;
  64562. }
  64563. return (
  64564. this._milliseconds +
  64565. this._days * 864e5 +
  64566. (this._months % 12) * 2592e6 +
  64567. toInt(this._months / 12) * 31536e6
  64568. );
  64569. }
  64570. function makeAs(alias) {
  64571. return function () {
  64572. return this.as(alias);
  64573. };
  64574. }
  64575. var asMilliseconds = makeAs('ms'),
  64576. asSeconds = makeAs('s'),
  64577. asMinutes = makeAs('m'),
  64578. asHours = makeAs('h'),
  64579. asDays = makeAs('d'),
  64580. asWeeks = makeAs('w'),
  64581. asMonths = makeAs('M'),
  64582. asQuarters = makeAs('Q'),
  64583. asYears = makeAs('y');
  64584. function clone$1() {
  64585. return createDuration(this);
  64586. }
  64587. function get$2(units) {
  64588. units = normalizeUnits(units);
  64589. return this.isValid() ? this[units + 's']() : NaN;
  64590. }
  64591. function makeGetter(name) {
  64592. return function () {
  64593. return this.isValid() ? this._data[name] : NaN;
  64594. };
  64595. }
  64596. var milliseconds = makeGetter('milliseconds'),
  64597. seconds = makeGetter('seconds'),
  64598. minutes = makeGetter('minutes'),
  64599. hours = makeGetter('hours'),
  64600. days = makeGetter('days'),
  64601. months = makeGetter('months'),
  64602. years = makeGetter('years');
  64603. function weeks() {
  64604. return absFloor(this.days() / 7);
  64605. }
  64606. var round = Math.round,
  64607. thresholds = {
  64608. ss: 44, // a few seconds to seconds
  64609. s: 45, // seconds to minute
  64610. m: 45, // minutes to hour
  64611. h: 22, // hours to day
  64612. d: 26, // days to month/week
  64613. w: null, // weeks to month
  64614. M: 11, // months to year
  64615. };
  64616. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  64617. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  64618. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  64619. }
  64620. function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
  64621. var duration = createDuration(posNegDuration).abs(),
  64622. seconds = round(duration.as('s')),
  64623. minutes = round(duration.as('m')),
  64624. hours = round(duration.as('h')),
  64625. days = round(duration.as('d')),
  64626. months = round(duration.as('M')),
  64627. weeks = round(duration.as('w')),
  64628. years = round(duration.as('y')),
  64629. a =
  64630. (seconds <= thresholds.ss && ['s', seconds]) ||
  64631. (seconds < thresholds.s && ['ss', seconds]) ||
  64632. (minutes <= 1 && ['m']) ||
  64633. (minutes < thresholds.m && ['mm', minutes]) ||
  64634. (hours <= 1 && ['h']) ||
  64635. (hours < thresholds.h && ['hh', hours]) ||
  64636. (days <= 1 && ['d']) ||
  64637. (days < thresholds.d && ['dd', days]);
  64638. if (thresholds.w != null) {
  64639. a =
  64640. a ||
  64641. (weeks <= 1 && ['w']) ||
  64642. (weeks < thresholds.w && ['ww', weeks]);
  64643. }
  64644. a = a ||
  64645. (months <= 1 && ['M']) ||
  64646. (months < thresholds.M && ['MM', months]) ||
  64647. (years <= 1 && ['y']) || ['yy', years];
  64648. a[2] = withoutSuffix;
  64649. a[3] = +posNegDuration > 0;
  64650. a[4] = locale;
  64651. return substituteTimeAgo.apply(null, a);
  64652. }
  64653. // This function allows you to set the rounding function for relative time strings
  64654. function getSetRelativeTimeRounding(roundingFunction) {
  64655. if (roundingFunction === undefined) {
  64656. return round;
  64657. }
  64658. if (typeof roundingFunction === 'function') {
  64659. round = roundingFunction;
  64660. return true;
  64661. }
  64662. return false;
  64663. }
  64664. // This function allows you to set a threshold for relative time strings
  64665. function getSetRelativeTimeThreshold(threshold, limit) {
  64666. if (thresholds[threshold] === undefined) {
  64667. return false;
  64668. }
  64669. if (limit === undefined) {
  64670. return thresholds[threshold];
  64671. }
  64672. thresholds[threshold] = limit;
  64673. if (threshold === 's') {
  64674. thresholds.ss = limit - 1;
  64675. }
  64676. return true;
  64677. }
  64678. function humanize(argWithSuffix, argThresholds) {
  64679. if (!this.isValid()) {
  64680. return this.localeData().invalidDate();
  64681. }
  64682. var withSuffix = false,
  64683. th = thresholds,
  64684. locale,
  64685. output;
  64686. if (typeof argWithSuffix === 'object') {
  64687. argThresholds = argWithSuffix;
  64688. argWithSuffix = false;
  64689. }
  64690. if (typeof argWithSuffix === 'boolean') {
  64691. withSuffix = argWithSuffix;
  64692. }
  64693. if (typeof argThresholds === 'object') {
  64694. th = Object.assign({}, thresholds, argThresholds);
  64695. if (argThresholds.s != null && argThresholds.ss == null) {
  64696. th.ss = argThresholds.s - 1;
  64697. }
  64698. }
  64699. locale = this.localeData();
  64700. output = relativeTime$1(this, !withSuffix, th, locale);
  64701. if (withSuffix) {
  64702. output = locale.pastFuture(+this, output);
  64703. }
  64704. return locale.postformat(output);
  64705. }
  64706. var abs$1 = Math.abs;
  64707. function sign(x) {
  64708. return (x > 0) - (x < 0) || +x;
  64709. }
  64710. function toISOString$1() {
  64711. // for ISO strings we do not use the normal bubbling rules:
  64712. // * milliseconds bubble up until they become hours
  64713. // * days do not bubble at all
  64714. // * months bubble up until they become years
  64715. // This is because there is no context-free conversion between hours and days
  64716. // (think of clock changes)
  64717. // and also not between days and months (28-31 days per month)
  64718. if (!this.isValid()) {
  64719. return this.localeData().invalidDate();
  64720. }
  64721. var seconds = abs$1(this._milliseconds) / 1000,
  64722. days = abs$1(this._days),
  64723. months = abs$1(this._months),
  64724. minutes,
  64725. hours,
  64726. years,
  64727. s,
  64728. total = this.asSeconds(),
  64729. totalSign,
  64730. ymSign,
  64731. daysSign,
  64732. hmsSign;
  64733. if (!total) {
  64734. // this is the same as C#'s (Noda) and python (isodate)...
  64735. // but not other JS (goog.date)
  64736. return 'P0D';
  64737. }
  64738. // 3600 seconds -> 60 minutes -> 1 hour
  64739. minutes = absFloor(seconds / 60);
  64740. hours = absFloor(minutes / 60);
  64741. seconds %= 60;
  64742. minutes %= 60;
  64743. // 12 months -> 1 year
  64744. years = absFloor(months / 12);
  64745. months %= 12;
  64746. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  64747. s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  64748. totalSign = total < 0 ? '-' : '';
  64749. ymSign = sign(this._months) !== sign(total) ? '-' : '';
  64750. daysSign = sign(this._days) !== sign(total) ? '-' : '';
  64751. hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  64752. return (
  64753. totalSign +
  64754. 'P' +
  64755. (years ? ymSign + years + 'Y' : '') +
  64756. (months ? ymSign + months + 'M' : '') +
  64757. (days ? daysSign + days + 'D' : '') +
  64758. (hours || minutes || seconds ? 'T' : '') +
  64759. (hours ? hmsSign + hours + 'H' : '') +
  64760. (minutes ? hmsSign + minutes + 'M' : '') +
  64761. (seconds ? hmsSign + s + 'S' : '')
  64762. );
  64763. }
  64764. var proto$2 = Duration.prototype;
  64765. proto$2.isValid = isValid$1;
  64766. proto$2.abs = abs;
  64767. proto$2.add = add$1;
  64768. proto$2.subtract = subtract$1;
  64769. proto$2.as = as;
  64770. proto$2.asMilliseconds = asMilliseconds;
  64771. proto$2.asSeconds = asSeconds;
  64772. proto$2.asMinutes = asMinutes;
  64773. proto$2.asHours = asHours;
  64774. proto$2.asDays = asDays;
  64775. proto$2.asWeeks = asWeeks;
  64776. proto$2.asMonths = asMonths;
  64777. proto$2.asQuarters = asQuarters;
  64778. proto$2.asYears = asYears;
  64779. proto$2.valueOf = valueOf$1;
  64780. proto$2._bubble = bubble;
  64781. proto$2.clone = clone$1;
  64782. proto$2.get = get$2;
  64783. proto$2.milliseconds = milliseconds;
  64784. proto$2.seconds = seconds;
  64785. proto$2.minutes = minutes;
  64786. proto$2.hours = hours;
  64787. proto$2.days = days;
  64788. proto$2.weeks = weeks;
  64789. proto$2.months = months;
  64790. proto$2.years = years;
  64791. proto$2.humanize = humanize;
  64792. proto$2.toISOString = toISOString$1;
  64793. proto$2.toString = toISOString$1;
  64794. proto$2.toJSON = toISOString$1;
  64795. proto$2.locale = locale;
  64796. proto$2.localeData = localeData;
  64797. proto$2.toIsoString = deprecate(
  64798. 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
  64799. toISOString$1
  64800. );
  64801. proto$2.lang = lang;
  64802. // FORMATTING
  64803. addFormatToken('X', 0, 0, 'unix');
  64804. addFormatToken('x', 0, 0, 'valueOf');
  64805. // PARSING
  64806. addRegexToken('x', matchSigned);
  64807. addRegexToken('X', matchTimestamp);
  64808. addParseToken('X', function (input, array, config) {
  64809. config._d = new Date(parseFloat(input) * 1000);
  64810. });
  64811. addParseToken('x', function (input, array, config) {
  64812. config._d = new Date(toInt(input));
  64813. });
  64814. //! moment.js
  64815. hooks.version = '2.29.1';
  64816. setHookCallback(createLocal);
  64817. hooks.fn = proto;
  64818. hooks.min = min;
  64819. hooks.max = max;
  64820. hooks.now = now;
  64821. hooks.utc = createUTC;
  64822. hooks.unix = createUnix;
  64823. hooks.months = listMonths;
  64824. hooks.isDate = isDate;
  64825. hooks.locale = getSetGlobalLocale;
  64826. hooks.invalid = createInvalid;
  64827. hooks.duration = createDuration;
  64828. hooks.isMoment = isMoment;
  64829. hooks.weekdays = listWeekdays;
  64830. hooks.parseZone = createInZone;
  64831. hooks.localeData = getLocale;
  64832. hooks.isDuration = isDuration;
  64833. hooks.monthsShort = listMonthsShort;
  64834. hooks.weekdaysMin = listWeekdaysMin;
  64835. hooks.defineLocale = defineLocale;
  64836. hooks.updateLocale = updateLocale;
  64837. hooks.locales = listLocales;
  64838. hooks.weekdaysShort = listWeekdaysShort;
  64839. hooks.normalizeUnits = normalizeUnits;
  64840. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  64841. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  64842. hooks.calendarFormat = getCalendarFormat;
  64843. hooks.prototype = proto;
  64844. // currently HTML5 input type only supports 24-hour formats
  64845. hooks.HTML5_FMT = {
  64846. DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
  64847. DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
  64848. DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
  64849. DATE: 'YYYY-MM-DD', // <input type="date" />
  64850. TIME: 'HH:mm', // <input type="time" />
  64851. TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
  64852. TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
  64853. WEEK: 'GGGG-[W]WW', // <input type="week" />
  64854. MONTH: 'YYYY-MM', // <input type="month" />
  64855. };
  64856. return hooks;
  64857. })));
  64858. /***/ }),
  64859. /***/ 4366:
  64860. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  64861. var makeIterator = __webpack_require__(54891);
  64862. /**
  64863. * Array filter
  64864. */
  64865. function filter(arr, callback, thisObj) {
  64866. callback = makeIterator(callback, thisObj);
  64867. var results = [];
  64868. if (arr == null) {
  64869. return results;
  64870. }
  64871. var i = -1, len = arr.length, value;
  64872. while (++i < len) {
  64873. value = arr[i];
  64874. if (callback(value, i, arr)) {
  64875. results.push(value);
  64876. }
  64877. }
  64878. return results;
  64879. }
  64880. module.exports = filter;
  64881. /***/ }),
  64882. /***/ 4978:
  64883. /***/ ((module) => {
  64884. /**
  64885. * Array forEach
  64886. */
  64887. function forEach(arr, callback, thisObj) {
  64888. if (arr == null) {
  64889. return;
  64890. }
  64891. var i = -1,
  64892. len = arr.length;
  64893. while (++i < len) {
  64894. // we iterate over sparse items since there is no way to make it
  64895. // work properly on IE 7-8. see #64
  64896. if ( callback.call(thisObj, arr[i], i, arr) === false ) {
  64897. break;
  64898. }
  64899. }
  64900. }
  64901. module.exports = forEach;
  64902. /***/ }),
  64903. /***/ 89451:
  64904. /***/ ((module) => {
  64905. /**
  64906. * Create slice of source array or array-like object
  64907. */
  64908. function slice(arr, start, end){
  64909. var len = arr.length;
  64910. if (start == null) {
  64911. start = 0;
  64912. } else if (start < 0) {
  64913. start = Math.max(len + start, 0);
  64914. } else {
  64915. start = Math.min(start, len);
  64916. }
  64917. if (end == null) {
  64918. end = len;
  64919. } else if (end < 0) {
  64920. end = Math.max(len + end, 0);
  64921. } else {
  64922. end = Math.min(end, len);
  64923. }
  64924. var result = [];
  64925. while (start < end) {
  64926. result.push(arr[start++]);
  64927. }
  64928. return result;
  64929. }
  64930. module.exports = slice;
  64931. /***/ }),
  64932. /***/ 79863:
  64933. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  64934. var filter = __webpack_require__(4366);
  64935. /**
  64936. * @return {array} Array of unique items
  64937. */
  64938. function unique(arr, compare){
  64939. compare = compare || isEqual;
  64940. return filter(arr, function(item, i, arr){
  64941. var n = arr.length;
  64942. while (++i < n) {
  64943. if ( compare(item, arr[i]) ) {
  64944. return false;
  64945. }
  64946. }
  64947. return true;
  64948. });
  64949. }
  64950. function isEqual(a, b){
  64951. return a === b;
  64952. }
  64953. module.exports = unique;
  64954. /***/ }),
  64955. /***/ 84596:
  64956. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  64957. var slice = __webpack_require__(89451);
  64958. /**
  64959. * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection.
  64960. * @param {Function} fn Function.
  64961. * @param {object} context Execution context.
  64962. * @param {rest} args Arguments (0...n arguments).
  64963. * @return {Function} Wrapped Function.
  64964. */
  64965. function bind(fn, context, args){
  64966. var argsArr = slice(arguments, 2); //curried args
  64967. return function(){
  64968. return fn.apply(context, argsArr.concat(slice(arguments)));
  64969. };
  64970. }
  64971. module.exports = bind;
  64972. /***/ }),
  64973. /***/ 19761:
  64974. /***/ ((module) => {
  64975. /**
  64976. * Returns the first argument provided to it.
  64977. */
  64978. function identity(val){
  64979. return val;
  64980. }
  64981. module.exports = identity;
  64982. /***/ }),
  64983. /***/ 54891:
  64984. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  64985. var identity = __webpack_require__(19761);
  64986. var prop = __webpack_require__(99437);
  64987. var deepMatches = __webpack_require__(28614);
  64988. /**
  64989. * Converts argument into a valid iterator.
  64990. * Used internally on most array/object/collection methods that receives a
  64991. * callback/iterator providing a shortcut syntax.
  64992. */
  64993. function makeIterator(src, thisObj){
  64994. if (src == null) {
  64995. return identity;
  64996. }
  64997. switch(typeof src) {
  64998. case 'function':
  64999. // function is the first to improve perf (most common case)
  65000. // also avoid using `Function#call` if not needed, which boosts
  65001. // perf a lot in some cases
  65002. return (typeof thisObj !== 'undefined')? function(val, i, arr){
  65003. return src.call(thisObj, val, i, arr);
  65004. } : src;
  65005. case 'object':
  65006. return function(val){
  65007. return deepMatches(val, src);
  65008. };
  65009. case 'string':
  65010. case 'number':
  65011. return prop(src);
  65012. }
  65013. }
  65014. module.exports = makeIterator;
  65015. /***/ }),
  65016. /***/ 99437:
  65017. /***/ ((module) => {
  65018. /**
  65019. * Returns a function that gets a property of the passed object
  65020. */
  65021. function prop(name){
  65022. return function(obj){
  65023. return obj[name];
  65024. };
  65025. }
  65026. module.exports = prop;
  65027. /***/ }),
  65028. /***/ 19775:
  65029. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65030. var isKind = __webpack_require__(52813);
  65031. /**
  65032. */
  65033. var isArray = Array.isArray || function (val) {
  65034. return isKind(val, 'Array');
  65035. };
  65036. module.exports = isArray;
  65037. /***/ }),
  65038. /***/ 52813:
  65039. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65040. var kindOf = __webpack_require__(96224);
  65041. /**
  65042. * Check if value is from a specific "kind".
  65043. */
  65044. function isKind(val, kind){
  65045. return kindOf(val) === kind;
  65046. }
  65047. module.exports = isKind;
  65048. /***/ }),
  65049. /***/ 96224:
  65050. /***/ ((module) => {
  65051. /**
  65052. * Gets the "kind" of value. (e.g. "String", "Number", etc)
  65053. */
  65054. function kindOf(val) {
  65055. return Object.prototype.toString.call(val).slice(8, -1);
  65056. }
  65057. module.exports = kindOf;
  65058. /***/ }),
  65059. /***/ 4007:
  65060. /***/ ((module) => {
  65061. /**
  65062. * Typecast a value to a String, using an empty string value for null or
  65063. * undefined.
  65064. */
  65065. function toString(val){
  65066. return val == null ? '' : val.toString();
  65067. }
  65068. module.exports = toString;
  65069. /***/ }),
  65070. /***/ 19188:
  65071. /***/ ((module) => {
  65072. /**
  65073. * Clamps value inside range.
  65074. */
  65075. function clamp(val, min, max){
  65076. return val < min? min : (val > max? max : val);
  65077. }
  65078. module.exports = clamp;
  65079. /***/ }),
  65080. /***/ 28614:
  65081. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65082. var forOwn = __webpack_require__(66463);
  65083. var isArray = __webpack_require__(19775);
  65084. function containsMatch(array, pattern) {
  65085. var i = -1, length = array.length;
  65086. while (++i < length) {
  65087. if (deepMatches(array[i], pattern)) {
  65088. return true;
  65089. }
  65090. }
  65091. return false;
  65092. }
  65093. function matchArray(target, pattern) {
  65094. var i = -1, patternLength = pattern.length;
  65095. while (++i < patternLength) {
  65096. if (!containsMatch(target, pattern[i])) {
  65097. return false;
  65098. }
  65099. }
  65100. return true;
  65101. }
  65102. function matchObject(target, pattern) {
  65103. var result = true;
  65104. forOwn(pattern, function(val, key) {
  65105. if (!deepMatches(target[key], val)) {
  65106. // Return false to break out of forOwn early
  65107. return (result = false);
  65108. }
  65109. });
  65110. return result;
  65111. }
  65112. /**
  65113. * Recursively check if the objects match.
  65114. */
  65115. function deepMatches(target, pattern){
  65116. if (target && typeof target === 'object' &&
  65117. pattern && typeof pattern === 'object') {
  65118. if (isArray(target) && isArray(pattern)) {
  65119. return matchArray(target, pattern);
  65120. } else {
  65121. return matchObject(target, pattern);
  65122. }
  65123. } else {
  65124. return target === pattern;
  65125. }
  65126. }
  65127. module.exports = deepMatches;
  65128. /***/ }),
  65129. /***/ 15473:
  65130. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65131. var hasOwn = __webpack_require__(12683);
  65132. var _hasDontEnumBug,
  65133. _dontEnums;
  65134. function checkDontEnum(){
  65135. _dontEnums = [
  65136. 'toString',
  65137. 'toLocaleString',
  65138. 'valueOf',
  65139. 'hasOwnProperty',
  65140. 'isPrototypeOf',
  65141. 'propertyIsEnumerable',
  65142. 'constructor'
  65143. ];
  65144. _hasDontEnumBug = true;
  65145. for (var key in {'toString': null}) {
  65146. _hasDontEnumBug = false;
  65147. }
  65148. }
  65149. /**
  65150. * Similar to Array/forEach but works over object properties and fixes Don't
  65151. * Enum bug on IE.
  65152. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
  65153. */
  65154. function forIn(obj, fn, thisObj){
  65155. var key, i = 0;
  65156. // no need to check if argument is a real object that way we can use
  65157. // it for arrays, functions, date, etc.
  65158. //post-pone check till needed
  65159. if (_hasDontEnumBug == null) checkDontEnum();
  65160. for (key in obj) {
  65161. if (exec(fn, obj, key, thisObj) === false) {
  65162. break;
  65163. }
  65164. }
  65165. if (_hasDontEnumBug) {
  65166. var ctor = obj.constructor,
  65167. isProto = !!ctor && obj === ctor.prototype;
  65168. while (key = _dontEnums[i++]) {
  65169. // For constructor, if it is a prototype object the constructor
  65170. // is always non-enumerable unless defined otherwise (and
  65171. // enumerated above). For non-prototype objects, it will have
  65172. // to be defined on this object, since it cannot be defined on
  65173. // any prototype objects.
  65174. //
  65175. // For other [[DontEnum]] properties, check if the value is
  65176. // different than Object prototype value.
  65177. if (
  65178. (key !== 'constructor' ||
  65179. (!isProto && hasOwn(obj, key))) &&
  65180. obj[key] !== Object.prototype[key]
  65181. ) {
  65182. if (exec(fn, obj, key, thisObj) === false) {
  65183. break;
  65184. }
  65185. }
  65186. }
  65187. }
  65188. }
  65189. function exec(fn, obj, key, thisObj){
  65190. return fn.call(thisObj, obj[key], key, obj);
  65191. }
  65192. module.exports = forIn;
  65193. /***/ }),
  65194. /***/ 66463:
  65195. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65196. var hasOwn = __webpack_require__(12683);
  65197. var forIn = __webpack_require__(15473);
  65198. /**
  65199. * Similar to Array/forEach but works over object properties and fixes Don't
  65200. * Enum bug on IE.
  65201. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
  65202. */
  65203. function forOwn(obj, fn, thisObj){
  65204. forIn(obj, function(val, key){
  65205. if (hasOwn(obj, key)) {
  65206. return fn.call(thisObj, obj[key], key, obj);
  65207. }
  65208. });
  65209. }
  65210. module.exports = forOwn;
  65211. /***/ }),
  65212. /***/ 12683:
  65213. /***/ ((module) => {
  65214. /**
  65215. * Safer Object.hasOwnProperty
  65216. */
  65217. function hasOwn(obj, prop){
  65218. return Object.prototype.hasOwnProperty.call(obj, prop);
  65219. }
  65220. module.exports = hasOwn;
  65221. /***/ }),
  65222. /***/ 85407:
  65223. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65224. //automatically generated, do not edit!
  65225. //run `node build` instead
  65226. module.exports = {
  65227. 'contains' : __webpack_require__(58169),
  65228. 'decode' : __webpack_require__(96592),
  65229. 'encode' : __webpack_require__(54706),
  65230. 'getParam' : __webpack_require__(39567),
  65231. 'getQuery' : __webpack_require__(80902),
  65232. 'parse' : __webpack_require__(94460),
  65233. 'setParam' : __webpack_require__(5025)
  65234. };
  65235. /***/ }),
  65236. /***/ 58169:
  65237. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65238. var getQuery = __webpack_require__(80902);
  65239. /**
  65240. * Checks if query string contains parameter.
  65241. */
  65242. function contains(url, paramName) {
  65243. var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `&param=`
  65244. return regex.test(getQuery(url));
  65245. }
  65246. module.exports = contains;
  65247. /***/ }),
  65248. /***/ 96592:
  65249. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65250. var typecast = __webpack_require__(37038);
  65251. var isArray = __webpack_require__(19775);
  65252. var hasOwn = __webpack_require__(12683);
  65253. /**
  65254. * Decode query string into an object of keys => vals.
  65255. */
  65256. function decode(queryStr, shouldTypecast) {
  65257. var queryArr = (queryStr || '').replace('?', '').split('&'),
  65258. reg = /([^=]+)=(.+)/,
  65259. i = -1,
  65260. obj = {},
  65261. equalIndex, cur, pValue, pName;
  65262. while ((cur = queryArr[++i])) {
  65263. equalIndex = cur.indexOf('=');
  65264. pName = cur.substring(0, equalIndex);
  65265. pValue = decodeURIComponent(cur.substring(equalIndex + 1));
  65266. if (shouldTypecast !== false) {
  65267. pValue = typecast(pValue);
  65268. }
  65269. if (hasOwn(obj, pName)){
  65270. if(isArray(obj[pName])){
  65271. obj[pName].push(pValue);
  65272. } else {
  65273. obj[pName] = [obj[pName], pValue];
  65274. }
  65275. } else {
  65276. obj[pName] = pValue;
  65277. }
  65278. }
  65279. return obj;
  65280. }
  65281. module.exports = decode;
  65282. /***/ }),
  65283. /***/ 54706:
  65284. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65285. var forOwn = __webpack_require__(66463);
  65286. var isArray = __webpack_require__(19775);
  65287. var forEach = __webpack_require__(4978);
  65288. /**
  65289. * Encode object into a query string.
  65290. */
  65291. function encode(obj){
  65292. var query = [],
  65293. arrValues, reg;
  65294. forOwn(obj, function (val, key) {
  65295. if (isArray(val)) {
  65296. arrValues = key + '=';
  65297. reg = new RegExp('&'+key+'+=$');
  65298. forEach(val, function (aValue) {
  65299. arrValues += encodeURIComponent(aValue) + '&' + key + '=';
  65300. });
  65301. query.push(arrValues.replace(reg, ''));
  65302. } else {
  65303. query.push(key + '=' + encodeURIComponent(val));
  65304. }
  65305. });
  65306. return (query.length) ? '?' + query.join('&') : '';
  65307. }
  65308. module.exports = encode;
  65309. /***/ }),
  65310. /***/ 39567:
  65311. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65312. var typecast = __webpack_require__(37038);
  65313. var getQuery = __webpack_require__(80902);
  65314. /**
  65315. * Get query parameter value.
  65316. */
  65317. function getParam(url, param, shouldTypecast){
  65318. var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `&param=value`, value = $2
  65319. result = regexp.exec( getQuery(url) ),
  65320. val = (result && result[2])? result[2] : null;
  65321. return shouldTypecast === false? val : typecast(val);
  65322. }
  65323. module.exports = getParam;
  65324. /***/ }),
  65325. /***/ 80902:
  65326. /***/ ((module) => {
  65327. /**
  65328. * Gets full query as string with all special chars decoded.
  65329. */
  65330. function getQuery(url) {
  65331. // url = url.replace(/#.*\?/, '?'); //removes hash (to avoid getting hash query)
  65332. var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt
  65333. return (queryString)? decodeURIComponent(queryString[0].replace(/\+/g,' ')) : '';
  65334. }
  65335. module.exports = getQuery;
  65336. /***/ }),
  65337. /***/ 94460:
  65338. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65339. var decode = __webpack_require__(96592);
  65340. var getQuery = __webpack_require__(80902);
  65341. /**
  65342. * Get query string, parses and decodes it.
  65343. */
  65344. function parse(url, shouldTypecast) {
  65345. return decode(getQuery(url), shouldTypecast);
  65346. }
  65347. module.exports = parse;
  65348. /***/ }),
  65349. /***/ 5025:
  65350. /***/ ((module) => {
  65351. /**
  65352. * Set query string parameter value
  65353. */
  65354. function setParam(url, paramName, value){
  65355. url = url || '';
  65356. var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' );
  65357. var param = paramName +'='+ encodeURIComponent( value );
  65358. if ( re.test(url) ) {
  65359. return url.replace(re, '$1'+ param);
  65360. } else {
  65361. if (url.indexOf('?') === -1) {
  65362. url += '?';
  65363. }
  65364. if (url.indexOf('=') !== -1) {
  65365. url += '&';
  65366. }
  65367. return url + param;
  65368. }
  65369. }
  65370. module.exports = setParam;
  65371. /***/ }),
  65372. /***/ 88723:
  65373. /***/ ((module) => {
  65374. /**
  65375. * Contains all Unicode white-spaces. Taken from
  65376. * http://en.wikipedia.org/wiki/Whitespace_character.
  65377. */
  65378. module.exports = [
  65379. ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E',
  65380. '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006',
  65381. '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F',
  65382. '\u205F', '\u3000'
  65383. ];
  65384. /***/ }),
  65385. /***/ 71047:
  65386. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65387. var toString = __webpack_require__(4007);
  65388. var replaceAccents = __webpack_require__(90568);
  65389. var removeNonWord = __webpack_require__(657);
  65390. var upperCase = __webpack_require__(6608);
  65391. var lowerCase = __webpack_require__(60437);
  65392. /**
  65393. * Convert string to camelCase text.
  65394. */
  65395. function camelCase(str){
  65396. str = toString(str);
  65397. str = replaceAccents(str);
  65398. str = removeNonWord(str)
  65399. .replace(/[\-_]/g, ' '); // convert all hyphens and underscores to spaces
  65400. // handle acronyms
  65401. // matches lowercase chars && uppercase words
  65402. if (/[a-z]/.test(str) && /^|\s[A-Z]+\s|$/.test(str)) {
  65403. // we convert any word that isn't all caps into lowercase
  65404. str = str.replace(/\s(\w+)/g, function(word, m) {
  65405. return /^[A-Z]+$/.test(m) ? word : lowerCase(word);
  65406. });
  65407. } else if (/\s/.test(str)) {
  65408. // if it doesn't contain an acronym and it has spaces we should
  65409. // convert every word to lowercase
  65410. str = lowerCase(str);
  65411. }
  65412. return str
  65413. .replace(/\s[a-z]/g, upperCase) // convert first char of each word to UPPERCASE
  65414. .replace(/^\s*[A-Z]+/g, lowerCase) // convert first word to lowercase
  65415. .replace(/\s+/g, ''); // remove spaces
  65416. }
  65417. module.exports = camelCase;
  65418. /***/ }),
  65419. /***/ 85286:
  65420. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65421. var toString = __webpack_require__(4007);
  65422. /**
  65423. * Searches for a given substring
  65424. */
  65425. function contains(str, substring, fromIndex){
  65426. str = toString(str);
  65427. substring = toString(substring);
  65428. return str.indexOf(substring, fromIndex) !== -1;
  65429. }
  65430. module.exports = contains;
  65431. /***/ }),
  65432. /***/ 60437:
  65433. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65434. var toString = __webpack_require__(4007);
  65435. /**
  65436. * "Safer" String.toLowerCase()
  65437. */
  65438. function lowerCase(str){
  65439. str = toString(str);
  65440. return str.toLowerCase();
  65441. }
  65442. module.exports = lowerCase;
  65443. /***/ }),
  65444. /***/ 82516:
  65445. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65446. var toString = __webpack_require__(4007);
  65447. var WHITE_SPACES = __webpack_require__(88723);
  65448. /**
  65449. * Remove chars from beginning of string.
  65450. */
  65451. function ltrim(str, chars) {
  65452. str = toString(str);
  65453. chars = chars || WHITE_SPACES;
  65454. var start = 0,
  65455. len = str.length,
  65456. charLen = chars.length,
  65457. found = true,
  65458. i, c;
  65459. while (found && start < len) {
  65460. found = false;
  65461. i = -1;
  65462. c = str.charAt(start);
  65463. while (++i < charLen) {
  65464. if (c === chars[i]) {
  65465. found = true;
  65466. start++;
  65467. break;
  65468. }
  65469. }
  65470. }
  65471. return (start >= len) ? '' : str.substr(start, len);
  65472. }
  65473. module.exports = ltrim;
  65474. /***/ }),
  65475. /***/ 657:
  65476. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65477. var toString = __webpack_require__(4007);
  65478. // This pattern is generated by the _build/pattern-removeNonWord.js script
  65479. var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;
  65480. /**
  65481. * Remove non-word chars.
  65482. */
  65483. function removeNonWord(str){
  65484. str = toString(str);
  65485. return str.replace(PATTERN, '');
  65486. }
  65487. module.exports = removeNonWord;
  65488. /***/ }),
  65489. /***/ 90568:
  65490. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65491. var toString = __webpack_require__(4007);
  65492. /**
  65493. * Replaces all accented chars with regular ones
  65494. */
  65495. function replaceAccents(str){
  65496. str = toString(str);
  65497. // verifies if the String has accents and replace them
  65498. if (str.search(/[\xC0-\xFF]/g) > -1) {
  65499. str = str
  65500. .replace(/[\xC0-\xC5]/g, "A")
  65501. .replace(/[\xC6]/g, "AE")
  65502. .replace(/[\xC7]/g, "C")
  65503. .replace(/[\xC8-\xCB]/g, "E")
  65504. .replace(/[\xCC-\xCF]/g, "I")
  65505. .replace(/[\xD0]/g, "D")
  65506. .replace(/[\xD1]/g, "N")
  65507. .replace(/[\xD2-\xD6\xD8]/g, "O")
  65508. .replace(/[\xD9-\xDC]/g, "U")
  65509. .replace(/[\xDD]/g, "Y")
  65510. .replace(/[\xDE]/g, "P")
  65511. .replace(/[\xE0-\xE5]/g, "a")
  65512. .replace(/[\xE6]/g, "ae")
  65513. .replace(/[\xE7]/g, "c")
  65514. .replace(/[\xE8-\xEB]/g, "e")
  65515. .replace(/[\xEC-\xEF]/g, "i")
  65516. .replace(/[\xF1]/g, "n")
  65517. .replace(/[\xF2-\xF6\xF8]/g, "o")
  65518. .replace(/[\xF9-\xFC]/g, "u")
  65519. .replace(/[\xFE]/g, "p")
  65520. .replace(/[\xFD\xFF]/g, "y");
  65521. }
  65522. return str;
  65523. }
  65524. module.exports = replaceAccents;
  65525. /***/ }),
  65526. /***/ 95264:
  65527. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65528. var toString = __webpack_require__(4007);
  65529. var WHITE_SPACES = __webpack_require__(88723);
  65530. /**
  65531. * Remove chars from end of string.
  65532. */
  65533. function rtrim(str, chars) {
  65534. str = toString(str);
  65535. chars = chars || WHITE_SPACES;
  65536. var end = str.length - 1,
  65537. charLen = chars.length,
  65538. found = true,
  65539. i, c;
  65540. while (found && end >= 0) {
  65541. found = false;
  65542. i = -1;
  65543. c = str.charAt(end);
  65544. while (++i < charLen) {
  65545. if (c === chars[i]) {
  65546. found = true;
  65547. end--;
  65548. break;
  65549. }
  65550. }
  65551. }
  65552. return (end >= 0) ? str.substring(0, end + 1) : '';
  65553. }
  65554. module.exports = rtrim;
  65555. /***/ }),
  65556. /***/ 78579:
  65557. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65558. var toString = __webpack_require__(4007);
  65559. var WHITE_SPACES = __webpack_require__(88723);
  65560. var ltrim = __webpack_require__(82516);
  65561. var rtrim = __webpack_require__(95264);
  65562. /**
  65563. * Remove white-spaces from beginning and end of string.
  65564. */
  65565. function trim(str, chars) {
  65566. str = toString(str);
  65567. chars = chars || WHITE_SPACES;
  65568. return ltrim(rtrim(str, chars), chars);
  65569. }
  65570. module.exports = trim;
  65571. /***/ }),
  65572. /***/ 37038:
  65573. /***/ ((module) => {
  65574. var UNDEF;
  65575. /**
  65576. * Parses string and convert it into a native value.
  65577. */
  65578. function typecast(val) {
  65579. var r;
  65580. if ( val === null || val === 'null' ) {
  65581. r = null;
  65582. } else if ( val === 'true' ) {
  65583. r = true;
  65584. } else if ( val === 'false' ) {
  65585. r = false;
  65586. } else if ( val === UNDEF || val === 'undefined' ) {
  65587. r = UNDEF;
  65588. } else if ( val === '' || isNaN(val) ) {
  65589. //isNaN('') returns false
  65590. r = val;
  65591. } else {
  65592. //parseFloat(null || '') returns NaN
  65593. r = parseFloat(val);
  65594. }
  65595. return r;
  65596. }
  65597. module.exports = typecast;
  65598. /***/ }),
  65599. /***/ 6608:
  65600. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  65601. var toString = __webpack_require__(4007);
  65602. /**
  65603. * "Safer" String.toUpperCase()
  65604. */
  65605. function upperCase(str){
  65606. str = toString(str);
  65607. return str.toUpperCase();
  65608. }
  65609. module.exports = upperCase;
  65610. /***/ }),
  65611. /***/ 35666:
  65612. /***/ ((module) => {
  65613. /**
  65614. * Copyright (c) 2014-present, Facebook, Inc.
  65615. *
  65616. * This source code is licensed under the MIT license found in the
  65617. * LICENSE file in the root directory of this source tree.
  65618. */
  65619. var runtime = (function (exports) {
  65620. "use strict";
  65621. var Op = Object.prototype;
  65622. var hasOwn = Op.hasOwnProperty;
  65623. var undefined; // More compressible than void 0.
  65624. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  65625. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  65626. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  65627. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  65628. function define(obj, key, value) {
  65629. Object.defineProperty(obj, key, {
  65630. value: value,
  65631. enumerable: true,
  65632. configurable: true,
  65633. writable: true
  65634. });
  65635. return obj[key];
  65636. }
  65637. try {
  65638. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  65639. define({}, "");
  65640. } catch (err) {
  65641. define = function(obj, key, value) {
  65642. return obj[key] = value;
  65643. };
  65644. }
  65645. function wrap(innerFn, outerFn, self, tryLocsList) {
  65646. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  65647. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  65648. var generator = Object.create(protoGenerator.prototype);
  65649. var context = new Context(tryLocsList || []);
  65650. // The ._invoke method unifies the implementations of the .next,
  65651. // .throw, and .return methods.
  65652. generator._invoke = makeInvokeMethod(innerFn, self, context);
  65653. return generator;
  65654. }
  65655. exports.wrap = wrap;
  65656. // Try/catch helper to minimize deoptimizations. Returns a completion
  65657. // record like context.tryEntries[i].completion. This interface could
  65658. // have been (and was previously) designed to take a closure to be
  65659. // invoked without arguments, but in all the cases we care about we
  65660. // already have an existing method we want to call, so there's no need
  65661. // to create a new function object. We can even get away with assuming
  65662. // the method takes exactly one argument, since that happens to be true
  65663. // in every case, so we don't have to touch the arguments object. The
  65664. // only additional allocation required is the completion record, which
  65665. // has a stable shape and so hopefully should be cheap to allocate.
  65666. function tryCatch(fn, obj, arg) {
  65667. try {
  65668. return { type: "normal", arg: fn.call(obj, arg) };
  65669. } catch (err) {
  65670. return { type: "throw", arg: err };
  65671. }
  65672. }
  65673. var GenStateSuspendedStart = "suspendedStart";
  65674. var GenStateSuspendedYield = "suspendedYield";
  65675. var GenStateExecuting = "executing";
  65676. var GenStateCompleted = "completed";
  65677. // Returning this object from the innerFn has the same effect as
  65678. // breaking out of the dispatch switch statement.
  65679. var ContinueSentinel = {};
  65680. // Dummy constructor functions that we use as the .constructor and
  65681. // .constructor.prototype properties for functions that return Generator
  65682. // objects. For full spec compliance, you may wish to configure your
  65683. // minifier not to mangle the names of these two functions.
  65684. function Generator() {}
  65685. function GeneratorFunction() {}
  65686. function GeneratorFunctionPrototype() {}
  65687. // This is a polyfill for %IteratorPrototype% for environments that
  65688. // don't natively support it.
  65689. var IteratorPrototype = {};
  65690. IteratorPrototype[iteratorSymbol] = function () {
  65691. return this;
  65692. };
  65693. var getProto = Object.getPrototypeOf;
  65694. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  65695. if (NativeIteratorPrototype &&
  65696. NativeIteratorPrototype !== Op &&
  65697. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  65698. // This environment has a native %IteratorPrototype%; use it instead
  65699. // of the polyfill.
  65700. IteratorPrototype = NativeIteratorPrototype;
  65701. }
  65702. var Gp = GeneratorFunctionPrototype.prototype =
  65703. Generator.prototype = Object.create(IteratorPrototype);
  65704. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  65705. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  65706. GeneratorFunction.displayName = define(
  65707. GeneratorFunctionPrototype,
  65708. toStringTagSymbol,
  65709. "GeneratorFunction"
  65710. );
  65711. // Helper for defining the .next, .throw, and .return methods of the
  65712. // Iterator interface in terms of a single ._invoke method.
  65713. function defineIteratorMethods(prototype) {
  65714. ["next", "throw", "return"].forEach(function(method) {
  65715. define(prototype, method, function(arg) {
  65716. return this._invoke(method, arg);
  65717. });
  65718. });
  65719. }
  65720. exports.isGeneratorFunction = function(genFun) {
  65721. var ctor = typeof genFun === "function" && genFun.constructor;
  65722. return ctor
  65723. ? ctor === GeneratorFunction ||
  65724. // For the native GeneratorFunction constructor, the best we can
  65725. // do is to check its .name property.
  65726. (ctor.displayName || ctor.name) === "GeneratorFunction"
  65727. : false;
  65728. };
  65729. exports.mark = function(genFun) {
  65730. if (Object.setPrototypeOf) {
  65731. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  65732. } else {
  65733. genFun.__proto__ = GeneratorFunctionPrototype;
  65734. define(genFun, toStringTagSymbol, "GeneratorFunction");
  65735. }
  65736. genFun.prototype = Object.create(Gp);
  65737. return genFun;
  65738. };
  65739. // Within the body of any async function, `await x` is transformed to
  65740. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  65741. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  65742. // meant to be awaited.
  65743. exports.awrap = function(arg) {
  65744. return { __await: arg };
  65745. };
  65746. function AsyncIterator(generator, PromiseImpl) {
  65747. function invoke(method, arg, resolve, reject) {
  65748. var record = tryCatch(generator[method], generator, arg);
  65749. if (record.type === "throw") {
  65750. reject(record.arg);
  65751. } else {
  65752. var result = record.arg;
  65753. var value = result.value;
  65754. if (value &&
  65755. typeof value === "object" &&
  65756. hasOwn.call(value, "__await")) {
  65757. return PromiseImpl.resolve(value.__await).then(function(value) {
  65758. invoke("next", value, resolve, reject);
  65759. }, function(err) {
  65760. invoke("throw", err, resolve, reject);
  65761. });
  65762. }
  65763. return PromiseImpl.resolve(value).then(function(unwrapped) {
  65764. // When a yielded Promise is resolved, its final value becomes
  65765. // the .value of the Promise<{value,done}> result for the
  65766. // current iteration.
  65767. result.value = unwrapped;
  65768. resolve(result);
  65769. }, function(error) {
  65770. // If a rejected Promise was yielded, throw the rejection back
  65771. // into the async generator function so it can be handled there.
  65772. return invoke("throw", error, resolve, reject);
  65773. });
  65774. }
  65775. }
  65776. var previousPromise;
  65777. function enqueue(method, arg) {
  65778. function callInvokeWithMethodAndArg() {
  65779. return new PromiseImpl(function(resolve, reject) {
  65780. invoke(method, arg, resolve, reject);
  65781. });
  65782. }
  65783. return previousPromise =
  65784. // If enqueue has been called before, then we want to wait until
  65785. // all previous Promises have been resolved before calling invoke,
  65786. // so that results are always delivered in the correct order. If
  65787. // enqueue has not been called before, then it is important to
  65788. // call invoke immediately, without waiting on a callback to fire,
  65789. // so that the async generator function has the opportunity to do
  65790. // any necessary setup in a predictable way. This predictability
  65791. // is why the Promise constructor synchronously invokes its
  65792. // executor callback, and why async functions synchronously
  65793. // execute code before the first await. Since we implement simple
  65794. // async functions in terms of async generators, it is especially
  65795. // important to get this right, even though it requires care.
  65796. previousPromise ? previousPromise.then(
  65797. callInvokeWithMethodAndArg,
  65798. // Avoid propagating failures to Promises returned by later
  65799. // invocations of the iterator.
  65800. callInvokeWithMethodAndArg
  65801. ) : callInvokeWithMethodAndArg();
  65802. }
  65803. // Define the unified helper method that is used to implement .next,
  65804. // .throw, and .return (see defineIteratorMethods).
  65805. this._invoke = enqueue;
  65806. }
  65807. defineIteratorMethods(AsyncIterator.prototype);
  65808. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  65809. return this;
  65810. };
  65811. exports.AsyncIterator = AsyncIterator;
  65812. // Note that simple async functions are implemented on top of
  65813. // AsyncIterator objects; they just return a Promise for the value of
  65814. // the final result produced by the iterator.
  65815. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  65816. if (PromiseImpl === void 0) PromiseImpl = Promise;
  65817. var iter = new AsyncIterator(
  65818. wrap(innerFn, outerFn, self, tryLocsList),
  65819. PromiseImpl
  65820. );
  65821. return exports.isGeneratorFunction(outerFn)
  65822. ? iter // If outerFn is a generator, return the full iterator.
  65823. : iter.next().then(function(result) {
  65824. return result.done ? result.value : iter.next();
  65825. });
  65826. };
  65827. function makeInvokeMethod(innerFn, self, context) {
  65828. var state = GenStateSuspendedStart;
  65829. return function invoke(method, arg) {
  65830. if (state === GenStateExecuting) {
  65831. throw new Error("Generator is already running");
  65832. }
  65833. if (state === GenStateCompleted) {
  65834. if (method === "throw") {
  65835. throw arg;
  65836. }
  65837. // Be forgiving, per 25.3.3.3.3 of the spec:
  65838. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  65839. return doneResult();
  65840. }
  65841. context.method = method;
  65842. context.arg = arg;
  65843. while (true) {
  65844. var delegate = context.delegate;
  65845. if (delegate) {
  65846. var delegateResult = maybeInvokeDelegate(delegate, context);
  65847. if (delegateResult) {
  65848. if (delegateResult === ContinueSentinel) continue;
  65849. return delegateResult;
  65850. }
  65851. }
  65852. if (context.method === "next") {
  65853. // Setting context._sent for legacy support of Babel's
  65854. // function.sent implementation.
  65855. context.sent = context._sent = context.arg;
  65856. } else if (context.method === "throw") {
  65857. if (state === GenStateSuspendedStart) {
  65858. state = GenStateCompleted;
  65859. throw context.arg;
  65860. }
  65861. context.dispatchException(context.arg);
  65862. } else if (context.method === "return") {
  65863. context.abrupt("return", context.arg);
  65864. }
  65865. state = GenStateExecuting;
  65866. var record = tryCatch(innerFn, self, context);
  65867. if (record.type === "normal") {
  65868. // If an exception is thrown from innerFn, we leave state ===
  65869. // GenStateExecuting and loop back for another invocation.
  65870. state = context.done
  65871. ? GenStateCompleted
  65872. : GenStateSuspendedYield;
  65873. if (record.arg === ContinueSentinel) {
  65874. continue;
  65875. }
  65876. return {
  65877. value: record.arg,
  65878. done: context.done
  65879. };
  65880. } else if (record.type === "throw") {
  65881. state = GenStateCompleted;
  65882. // Dispatch the exception by looping back around to the
  65883. // context.dispatchException(context.arg) call above.
  65884. context.method = "throw";
  65885. context.arg = record.arg;
  65886. }
  65887. }
  65888. };
  65889. }
  65890. // Call delegate.iterator[context.method](context.arg) and handle the
  65891. // result, either by returning a { value, done } result from the
  65892. // delegate iterator, or by modifying context.method and context.arg,
  65893. // setting context.delegate to null, and returning the ContinueSentinel.
  65894. function maybeInvokeDelegate(delegate, context) {
  65895. var method = delegate.iterator[context.method];
  65896. if (method === undefined) {
  65897. // A .throw or .return when the delegate iterator has no .throw
  65898. // method always terminates the yield* loop.
  65899. context.delegate = null;
  65900. if (context.method === "throw") {
  65901. // Note: ["return"] must be used for ES3 parsing compatibility.
  65902. if (delegate.iterator["return"]) {
  65903. // If the delegate iterator has a return method, give it a
  65904. // chance to clean up.
  65905. context.method = "return";
  65906. context.arg = undefined;
  65907. maybeInvokeDelegate(delegate, context);
  65908. if (context.method === "throw") {
  65909. // If maybeInvokeDelegate(context) changed context.method from
  65910. // "return" to "throw", let that override the TypeError below.
  65911. return ContinueSentinel;
  65912. }
  65913. }
  65914. context.method = "throw";
  65915. context.arg = new TypeError(
  65916. "The iterator does not provide a 'throw' method");
  65917. }
  65918. return ContinueSentinel;
  65919. }
  65920. var record = tryCatch(method, delegate.iterator, context.arg);
  65921. if (record.type === "throw") {
  65922. context.method = "throw";
  65923. context.arg = record.arg;
  65924. context.delegate = null;
  65925. return ContinueSentinel;
  65926. }
  65927. var info = record.arg;
  65928. if (! info) {
  65929. context.method = "throw";
  65930. context.arg = new TypeError("iterator result is not an object");
  65931. context.delegate = null;
  65932. return ContinueSentinel;
  65933. }
  65934. if (info.done) {
  65935. // Assign the result of the finished delegate to the temporary
  65936. // variable specified by delegate.resultName (see delegateYield).
  65937. context[delegate.resultName] = info.value;
  65938. // Resume execution at the desired location (see delegateYield).
  65939. context.next = delegate.nextLoc;
  65940. // If context.method was "throw" but the delegate handled the
  65941. // exception, let the outer generator proceed normally. If
  65942. // context.method was "next", forget context.arg since it has been
  65943. // "consumed" by the delegate iterator. If context.method was
  65944. // "return", allow the original .return call to continue in the
  65945. // outer generator.
  65946. if (context.method !== "return") {
  65947. context.method = "next";
  65948. context.arg = undefined;
  65949. }
  65950. } else {
  65951. // Re-yield the result returned by the delegate method.
  65952. return info;
  65953. }
  65954. // The delegate iterator is finished, so forget it and continue with
  65955. // the outer generator.
  65956. context.delegate = null;
  65957. return ContinueSentinel;
  65958. }
  65959. // Define Generator.prototype.{next,throw,return} in terms of the
  65960. // unified ._invoke helper method.
  65961. defineIteratorMethods(Gp);
  65962. define(Gp, toStringTagSymbol, "Generator");
  65963. // A Generator should always return itself as the iterator object when the
  65964. // @@iterator function is called on it. Some browsers' implementations of the
  65965. // iterator prototype chain incorrectly implement this, causing the Generator
  65966. // object to not be returned from this call. This ensures that doesn't happen.
  65967. // See https://github.com/facebook/regenerator/issues/274 for more details.
  65968. Gp[iteratorSymbol] = function() {
  65969. return this;
  65970. };
  65971. Gp.toString = function() {
  65972. return "[object Generator]";
  65973. };
  65974. function pushTryEntry(locs) {
  65975. var entry = { tryLoc: locs[0] };
  65976. if (1 in locs) {
  65977. entry.catchLoc = locs[1];
  65978. }
  65979. if (2 in locs) {
  65980. entry.finallyLoc = locs[2];
  65981. entry.afterLoc = locs[3];
  65982. }
  65983. this.tryEntries.push(entry);
  65984. }
  65985. function resetTryEntry(entry) {
  65986. var record = entry.completion || {};
  65987. record.type = "normal";
  65988. delete record.arg;
  65989. entry.completion = record;
  65990. }
  65991. function Context(tryLocsList) {
  65992. // The root entry object (effectively a try statement without a catch
  65993. // or a finally block) gives us a place to store values thrown from
  65994. // locations where there is no enclosing try statement.
  65995. this.tryEntries = [{ tryLoc: "root" }];
  65996. tryLocsList.forEach(pushTryEntry, this);
  65997. this.reset(true);
  65998. }
  65999. exports.keys = function(object) {
  66000. var keys = [];
  66001. for (var key in object) {
  66002. keys.push(key);
  66003. }
  66004. keys.reverse();
  66005. // Rather than returning an object with a next method, we keep
  66006. // things simple and return the next function itself.
  66007. return function next() {
  66008. while (keys.length) {
  66009. var key = keys.pop();
  66010. if (key in object) {
  66011. next.value = key;
  66012. next.done = false;
  66013. return next;
  66014. }
  66015. }
  66016. // To avoid creating an additional object, we just hang the .value
  66017. // and .done properties off the next function object itself. This
  66018. // also ensures that the minifier will not anonymize the function.
  66019. next.done = true;
  66020. return next;
  66021. };
  66022. };
  66023. function values(iterable) {
  66024. if (iterable) {
  66025. var iteratorMethod = iterable[iteratorSymbol];
  66026. if (iteratorMethod) {
  66027. return iteratorMethod.call(iterable);
  66028. }
  66029. if (typeof iterable.next === "function") {
  66030. return iterable;
  66031. }
  66032. if (!isNaN(iterable.length)) {
  66033. var i = -1, next = function next() {
  66034. while (++i < iterable.length) {
  66035. if (hasOwn.call(iterable, i)) {
  66036. next.value = iterable[i];
  66037. next.done = false;
  66038. return next;
  66039. }
  66040. }
  66041. next.value = undefined;
  66042. next.done = true;
  66043. return next;
  66044. };
  66045. return next.next = next;
  66046. }
  66047. }
  66048. // Return an iterator with no values.
  66049. return { next: doneResult };
  66050. }
  66051. exports.values = values;
  66052. function doneResult() {
  66053. return { value: undefined, done: true };
  66054. }
  66055. Context.prototype = {
  66056. constructor: Context,
  66057. reset: function(skipTempReset) {
  66058. this.prev = 0;
  66059. this.next = 0;
  66060. // Resetting context._sent for legacy support of Babel's
  66061. // function.sent implementation.
  66062. this.sent = this._sent = undefined;
  66063. this.done = false;
  66064. this.delegate = null;
  66065. this.method = "next";
  66066. this.arg = undefined;
  66067. this.tryEntries.forEach(resetTryEntry);
  66068. if (!skipTempReset) {
  66069. for (var name in this) {
  66070. // Not sure about the optimal order of these conditions:
  66071. if (name.charAt(0) === "t" &&
  66072. hasOwn.call(this, name) &&
  66073. !isNaN(+name.slice(1))) {
  66074. this[name] = undefined;
  66075. }
  66076. }
  66077. }
  66078. },
  66079. stop: function() {
  66080. this.done = true;
  66081. var rootEntry = this.tryEntries[0];
  66082. var rootRecord = rootEntry.completion;
  66083. if (rootRecord.type === "throw") {
  66084. throw rootRecord.arg;
  66085. }
  66086. return this.rval;
  66087. },
  66088. dispatchException: function(exception) {
  66089. if (this.done) {
  66090. throw exception;
  66091. }
  66092. var context = this;
  66093. function handle(loc, caught) {
  66094. record.type = "throw";
  66095. record.arg = exception;
  66096. context.next = loc;
  66097. if (caught) {
  66098. // If the dispatched exception was caught by a catch block,
  66099. // then let that catch block handle the exception normally.
  66100. context.method = "next";
  66101. context.arg = undefined;
  66102. }
  66103. return !! caught;
  66104. }
  66105. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  66106. var entry = this.tryEntries[i];
  66107. var record = entry.completion;
  66108. if (entry.tryLoc === "root") {
  66109. // Exception thrown outside of any try block that could handle
  66110. // it, so set the completion value of the entire function to
  66111. // throw the exception.
  66112. return handle("end");
  66113. }
  66114. if (entry.tryLoc <= this.prev) {
  66115. var hasCatch = hasOwn.call(entry, "catchLoc");
  66116. var hasFinally = hasOwn.call(entry, "finallyLoc");
  66117. if (hasCatch && hasFinally) {
  66118. if (this.prev < entry.catchLoc) {
  66119. return handle(entry.catchLoc, true);
  66120. } else if (this.prev < entry.finallyLoc) {
  66121. return handle(entry.finallyLoc);
  66122. }
  66123. } else if (hasCatch) {
  66124. if (this.prev < entry.catchLoc) {
  66125. return handle(entry.catchLoc, true);
  66126. }
  66127. } else if (hasFinally) {
  66128. if (this.prev < entry.finallyLoc) {
  66129. return handle(entry.finallyLoc);
  66130. }
  66131. } else {
  66132. throw new Error("try statement without catch or finally");
  66133. }
  66134. }
  66135. }
  66136. },
  66137. abrupt: function(type, arg) {
  66138. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  66139. var entry = this.tryEntries[i];
  66140. if (entry.tryLoc <= this.prev &&
  66141. hasOwn.call(entry, "finallyLoc") &&
  66142. this.prev < entry.finallyLoc) {
  66143. var finallyEntry = entry;
  66144. break;
  66145. }
  66146. }
  66147. if (finallyEntry &&
  66148. (type === "break" ||
  66149. type === "continue") &&
  66150. finallyEntry.tryLoc <= arg &&
  66151. arg <= finallyEntry.finallyLoc) {
  66152. // Ignore the finally entry if control is not jumping to a
  66153. // location outside the try/catch block.
  66154. finallyEntry = null;
  66155. }
  66156. var record = finallyEntry ? finallyEntry.completion : {};
  66157. record.type = type;
  66158. record.arg = arg;
  66159. if (finallyEntry) {
  66160. this.method = "next";
  66161. this.next = finallyEntry.finallyLoc;
  66162. return ContinueSentinel;
  66163. }
  66164. return this.complete(record);
  66165. },
  66166. complete: function(record, afterLoc) {
  66167. if (record.type === "throw") {
  66168. throw record.arg;
  66169. }
  66170. if (record.type === "break" ||
  66171. record.type === "continue") {
  66172. this.next = record.arg;
  66173. } else if (record.type === "return") {
  66174. this.rval = this.arg = record.arg;
  66175. this.method = "return";
  66176. this.next = "end";
  66177. } else if (record.type === "normal" && afterLoc) {
  66178. this.next = afterLoc;
  66179. }
  66180. return ContinueSentinel;
  66181. },
  66182. finish: function(finallyLoc) {
  66183. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  66184. var entry = this.tryEntries[i];
  66185. if (entry.finallyLoc === finallyLoc) {
  66186. this.complete(entry.completion, entry.afterLoc);
  66187. resetTryEntry(entry);
  66188. return ContinueSentinel;
  66189. }
  66190. }
  66191. },
  66192. "catch": function(tryLoc) {
  66193. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  66194. var entry = this.tryEntries[i];
  66195. if (entry.tryLoc === tryLoc) {
  66196. var record = entry.completion;
  66197. if (record.type === "throw") {
  66198. var thrown = record.arg;
  66199. resetTryEntry(entry);
  66200. }
  66201. return thrown;
  66202. }
  66203. }
  66204. // The context.catch method must only be called with a location
  66205. // argument that corresponds to a known catch block.
  66206. throw new Error("illegal catch attempt");
  66207. },
  66208. delegateYield: function(iterable, resultName, nextLoc) {
  66209. this.delegate = {
  66210. iterator: values(iterable),
  66211. resultName: resultName,
  66212. nextLoc: nextLoc
  66213. };
  66214. if (this.method === "next") {
  66215. // Deliberately forget the last sent value so that we don't
  66216. // accidentally pass it on to the delegate.
  66217. this.arg = undefined;
  66218. }
  66219. return ContinueSentinel;
  66220. }
  66221. };
  66222. // Regardless of whether this script is executing as a CommonJS module
  66223. // or not, return the runtime object so that we can declare the variable
  66224. // regeneratorRuntime in the outer scope, which allows this module to be
  66225. // injected easily by `bin/regenerator --include-runtime script.js`.
  66226. return exports;
  66227. }(
  66228. // If this script is executing as a CommonJS module, use module.exports
  66229. // as the regeneratorRuntime namespace. Otherwise create a new empty
  66230. // object. Either way, the resulting object will be used to initialize
  66231. // the regeneratorRuntime variable at the top of this file.
  66232. true ? module.exports : 0
  66233. ));
  66234. try {
  66235. regeneratorRuntime = runtime;
  66236. } catch (accidentalStrictMode) {
  66237. // This module should not be running in strict mode, so the above
  66238. // assignment should always work unless something is misconfigured. Just
  66239. // in case runtime.js accidentally runs in strict mode, we can escape
  66240. // strict mode using a global Function call. This could conceivably fail
  66241. // if a Content Security Policy forbids using Function, but in that case
  66242. // the proper solution is to fix the accidental strict mode problem. If
  66243. // you've misconfigured your bundler to force strict mode and applied a
  66244. // CSP to forbid Function, and you're not willing to fix either of those
  66245. // problems, please detail your unique predicament in a GitHub issue.
  66246. Function("r", "regeneratorRuntime = r")(runtime);
  66247. }
  66248. /***/ }),
  66249. /***/ 25703:
  66250. /***/ (function(module, exports, __webpack_require__) {
  66251. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  66252. * selectize.js (v0.12.6)
  66253. * Copyright (c) 2013–2015 Brian Reavis & contributors
  66254. *
  66255. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  66256. * file except in compliance with the License. You may obtain a copy of the License at:
  66257. * http://www.apache.org/licenses/LICENSE-2.0
  66258. *
  66259. * Unless required by applicable law or agreed to in writing, software distributed under
  66260. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  66261. * ANY KIND, either express or implied. See the License for the specific language
  66262. * governing permissions and limitations under the License.
  66263. *
  66264. * @author Brian Reavis <brian@thirdroute.com>
  66265. */
  66266. /*jshint curly:false */
  66267. /*jshint browser:true */
  66268. (function(root, factory) {
  66269. if (true) {
  66270. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(73609),__webpack_require__(55069),__webpack_require__(76252)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  66271. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  66272. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  66273. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  66274. } else {}
  66275. }(this, function($, Sifter, MicroPlugin) {
  66276. 'use strict';
  66277. var highlight = function($element, pattern) {
  66278. if (typeof pattern === 'string' && !pattern.length) return;
  66279. var regex = (typeof pattern === 'string') ? new RegExp(pattern, 'i') : pattern;
  66280. var highlight = function(node) {
  66281. var skip = 0;
  66282. // Wrap matching part of text node with highlighting <span>, e.g.
  66283. // Soccer -> <span class="highlight">Soc</span>cer for regex = /soc/i
  66284. if (node.nodeType === 3) {
  66285. var pos = node.data.search(regex);
  66286. if (pos >= 0 && node.data.length > 0) {
  66287. var match = node.data.match(regex);
  66288. var spannode = document.createElement('span');
  66289. spannode.className = 'highlight';
  66290. var middlebit = node.splitText(pos);
  66291. var endbit = middlebit.splitText(match[0].length);
  66292. var middleclone = middlebit.cloneNode(true);
  66293. spannode.appendChild(middleclone);
  66294. middlebit.parentNode.replaceChild(spannode, middlebit);
  66295. skip = 1;
  66296. }
  66297. }
  66298. // Recurse element node, looking for child text nodes to highlight, unless element
  66299. // is childless, <script>, <style>, or already highlighted: <span class="hightlight">
  66300. else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName) && ( node.className !== 'highlight' || node.tagName !== 'SPAN' )) {
  66301. for (var i = 0; i < node.childNodes.length; ++i) {
  66302. i += highlight(node.childNodes[i]);
  66303. }
  66304. }
  66305. return skip;
  66306. };
  66307. return $element.each(function() {
  66308. highlight(this);
  66309. });
  66310. };
  66311. /**
  66312. * removeHighlight fn copied from highlight v5 and
  66313. * edited to remove with() and pass js strict mode
  66314. */
  66315. $.fn.removeHighlight = function() {
  66316. return this.find("span.highlight").each(function() {
  66317. this.parentNode.firstChild.nodeName;
  66318. var parent = this.parentNode;
  66319. parent.replaceChild(this.firstChild, this);
  66320. parent.normalize();
  66321. }).end();
  66322. };
  66323. var MicroEvent = function() {};
  66324. MicroEvent.prototype = {
  66325. on: function(event, fct){
  66326. this._events = this._events || {};
  66327. this._events[event] = this._events[event] || [];
  66328. this._events[event].push(fct);
  66329. },
  66330. off: function(event, fct){
  66331. var n = arguments.length;
  66332. if (n === 0) return delete this._events;
  66333. if (n === 1) return delete this._events[event];
  66334. this._events = this._events || {};
  66335. if (event in this._events === false) return;
  66336. this._events[event].splice(this._events[event].indexOf(fct), 1);
  66337. },
  66338. trigger: function(event /* , args... */){
  66339. this._events = this._events || {};
  66340. if (event in this._events === false) return;
  66341. for (var i = 0; i < this._events[event].length; i++){
  66342. this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
  66343. }
  66344. }
  66345. };
  66346. /**
  66347. * Mixin will delegate all MicroEvent.js function in the destination object.
  66348. *
  66349. * - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent
  66350. *
  66351. * @param {object} the object which will support MicroEvent
  66352. */
  66353. MicroEvent.mixin = function(destObject){
  66354. var props = ['on', 'off', 'trigger'];
  66355. for (var i = 0; i < props.length; i++){
  66356. destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
  66357. }
  66358. };
  66359. var IS_MAC = /Mac/.test(navigator.userAgent);
  66360. var KEY_A = 65;
  66361. var KEY_COMMA = 188;
  66362. var KEY_RETURN = 13;
  66363. var KEY_ESC = 27;
  66364. var KEY_LEFT = 37;
  66365. var KEY_UP = 38;
  66366. var KEY_P = 80;
  66367. var KEY_RIGHT = 39;
  66368. var KEY_DOWN = 40;
  66369. var KEY_N = 78;
  66370. var KEY_BACKSPACE = 8;
  66371. var KEY_DELETE = 46;
  66372. var KEY_SHIFT = 16;
  66373. var KEY_CMD = IS_MAC ? 91 : 17;
  66374. var KEY_CTRL = IS_MAC ? 18 : 17;
  66375. var KEY_TAB = 9;
  66376. var TAG_SELECT = 1;
  66377. var TAG_INPUT = 2;
  66378. // for now, android support in general is too spotty to support validity
  66379. var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('input').validity;
  66380. var isset = function(object) {
  66381. return typeof object !== 'undefined';
  66382. };
  66383. /**
  66384. * Converts a scalar to its best string representation
  66385. * for hash keys and HTML attribute values.
  66386. *
  66387. * Transformations:
  66388. * 'str' -> 'str'
  66389. * null -> ''
  66390. * undefined -> ''
  66391. * true -> '1'
  66392. * false -> '0'
  66393. * 0 -> '0'
  66394. * 1 -> '1'
  66395. *
  66396. * @param {string} value
  66397. * @returns {string|null}
  66398. */
  66399. var hash_key = function(value) {
  66400. if (typeof value === 'undefined' || value === null) return null;
  66401. if (typeof value === 'boolean') return value ? '1' : '0';
  66402. return value + '';
  66403. };
  66404. /**
  66405. * Escapes a string for use within HTML.
  66406. *
  66407. * @param {string} str
  66408. * @returns {string}
  66409. */
  66410. var escape_html = function(str) {
  66411. return (str + '')
  66412. .replace(/&/g, '&amp;')
  66413. .replace(/</g, '&lt;')
  66414. .replace(/>/g, '&gt;')
  66415. .replace(/"/g, '&quot;');
  66416. };
  66417. /**
  66418. * Escapes "$" characters in replacement strings.
  66419. *
  66420. * @param {string} str
  66421. * @returns {string}
  66422. */
  66423. var escape_replace = function(str) {
  66424. return (str + '').replace(/\$/g, '$$$$');
  66425. };
  66426. var hook = {};
  66427. /**
  66428. * Wraps `method` on `self` so that `fn`
  66429. * is invoked before the original method.
  66430. *
  66431. * @param {object} self
  66432. * @param {string} method
  66433. * @param {function} fn
  66434. */
  66435. hook.before = function(self, method, fn) {
  66436. var original = self[method];
  66437. self[method] = function() {
  66438. fn.apply(self, arguments);
  66439. return original.apply(self, arguments);
  66440. };
  66441. };
  66442. /**
  66443. * Wraps `method` on `self` so that `fn`
  66444. * is invoked after the original method.
  66445. *
  66446. * @param {object} self
  66447. * @param {string} method
  66448. * @param {function} fn
  66449. */
  66450. hook.after = function(self, method, fn) {
  66451. var original = self[method];
  66452. self[method] = function() {
  66453. var result = original.apply(self, arguments);
  66454. fn.apply(self, arguments);
  66455. return result;
  66456. };
  66457. };
  66458. /**
  66459. * Wraps `fn` so that it can only be invoked once.
  66460. *
  66461. * @param {function} fn
  66462. * @returns {function}
  66463. */
  66464. var once = function(fn) {
  66465. var called = false;
  66466. return function() {
  66467. if (called) return;
  66468. called = true;
  66469. fn.apply(this, arguments);
  66470. };
  66471. };
  66472. /**
  66473. * Wraps `fn` so that it can only be called once
  66474. * every `delay` milliseconds (invoked on the falling edge).
  66475. *
  66476. * @param {function} fn
  66477. * @param {int} delay
  66478. * @returns {function}
  66479. */
  66480. var debounce = function(fn, delay) {
  66481. var timeout;
  66482. return function() {
  66483. var self = this;
  66484. var args = arguments;
  66485. window.clearTimeout(timeout);
  66486. timeout = window.setTimeout(function() {
  66487. fn.apply(self, args);
  66488. }, delay);
  66489. };
  66490. };
  66491. /**
  66492. * Debounce all fired events types listed in `types`
  66493. * while executing the provided `fn`.
  66494. *
  66495. * @param {object} self
  66496. * @param {array} types
  66497. * @param {function} fn
  66498. */
  66499. var debounce_events = function(self, types, fn) {
  66500. var type;
  66501. var trigger = self.trigger;
  66502. var event_args = {};
  66503. // override trigger method
  66504. self.trigger = function() {
  66505. var type = arguments[0];
  66506. if (types.indexOf(type) !== -1) {
  66507. event_args[type] = arguments;
  66508. } else {
  66509. return trigger.apply(self, arguments);
  66510. }
  66511. };
  66512. // invoke provided function
  66513. fn.apply(self, []);
  66514. self.trigger = trigger;
  66515. // trigger queued events
  66516. for (type in event_args) {
  66517. if (event_args.hasOwnProperty(type)) {
  66518. trigger.apply(self, event_args[type]);
  66519. }
  66520. }
  66521. };
  66522. /**
  66523. * A workaround for http://bugs.jquery.com/ticket/6696
  66524. *
  66525. * @param {object} $parent - Parent element to listen on.
  66526. * @param {string} event - Event name.
  66527. * @param {string} selector - Descendant selector to filter by.
  66528. * @param {function} fn - Event handler.
  66529. */
  66530. var watchChildEvent = function($parent, event, selector, fn) {
  66531. $parent.on(event, selector, function(e) {
  66532. var child = e.target;
  66533. while (child && child.parentNode !== $parent[0]) {
  66534. child = child.parentNode;
  66535. }
  66536. e.currentTarget = child;
  66537. return fn.apply(this, [e]);
  66538. });
  66539. };
  66540. /**
  66541. * Determines the current selection within a text input control.
  66542. * Returns an object containing:
  66543. * - start
  66544. * - length
  66545. *
  66546. * @param {object} input
  66547. * @returns {object}
  66548. */
  66549. var getSelection = function(input) {
  66550. var result = {};
  66551. if ('selectionStart' in input) {
  66552. result.start = input.selectionStart;
  66553. result.length = input.selectionEnd - result.start;
  66554. } else if (document.selection) {
  66555. input.focus();
  66556. var sel = document.selection.createRange();
  66557. var selLen = document.selection.createRange().text.length;
  66558. sel.moveStart('character', -input.value.length);
  66559. result.start = sel.text.length - selLen;
  66560. result.length = selLen;
  66561. }
  66562. return result;
  66563. };
  66564. /**
  66565. * Copies CSS properties from one element to another.
  66566. *
  66567. * @param {object} $from
  66568. * @param {object} $to
  66569. * @param {array} properties
  66570. */
  66571. var transferStyles = function($from, $to, properties) {
  66572. var i, n, styles = {};
  66573. if (properties) {
  66574. for (i = 0, n = properties.length; i < n; i++) {
  66575. styles[properties[i]] = $from.css(properties[i]);
  66576. }
  66577. } else {
  66578. styles = $from.css();
  66579. }
  66580. $to.css(styles);
  66581. };
  66582. /**
  66583. * Measures the width of a string within a
  66584. * parent element (in pixels).
  66585. *
  66586. * @param {string} str
  66587. * @param {object} $parent
  66588. * @returns {int}
  66589. */
  66590. var measureString = function(str, $parent) {
  66591. if (!str) {
  66592. return 0;
  66593. }
  66594. if (!Selectize.$testInput) {
  66595. Selectize.$testInput = $('<span />').css({
  66596. position: 'absolute',
  66597. top: -99999,
  66598. left: -99999,
  66599. width: 'auto',
  66600. padding: 0,
  66601. whiteSpace: 'pre'
  66602. }).appendTo('body');
  66603. }
  66604. Selectize.$testInput.text(str);
  66605. transferStyles($parent, Selectize.$testInput, [
  66606. 'letterSpacing',
  66607. 'fontSize',
  66608. 'fontFamily',
  66609. 'fontWeight',
  66610. 'textTransform'
  66611. ]);
  66612. return Selectize.$testInput.width();
  66613. };
  66614. /**
  66615. * Sets up an input to grow horizontally as the user
  66616. * types. If the value is changed manually, you can
  66617. * trigger the "update" handler to resize:
  66618. *
  66619. * $input.trigger('update');
  66620. *
  66621. * @param {object} $input
  66622. */
  66623. var autoGrow = function($input) {
  66624. var currentWidth = null;
  66625. var update = function(e, options) {
  66626. var value, keyCode, printable, placeholder, width;
  66627. var shift, character, selection;
  66628. e = e || window.event || {};
  66629. options = options || {};
  66630. if (e.metaKey || e.altKey) return;
  66631. if (!options.force && $input.data('grow') === false) return;
  66632. value = $input.val();
  66633. if (e.type && e.type.toLowerCase() === 'keydown') {
  66634. keyCode = e.keyCode;
  66635. printable = (
  66636. (keyCode >= 48 && keyCode <= 57) || // 0-9
  66637. (keyCode >= 65 && keyCode <= 90) || // a-z
  66638. (keyCode >= 96 && keyCode <= 111) || // numpad 0-9, numeric operators
  66639. (keyCode >= 186 && keyCode <= 222) || // semicolon, equal, comma, dash, etc.
  66640. keyCode === 32 // space
  66641. );
  66642. if (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {
  66643. selection = getSelection($input[0]);
  66644. if (selection.length) {
  66645. value = value.substring(0, selection.start) + value.substring(selection.start + selection.length);
  66646. } else if (keyCode === KEY_BACKSPACE && selection.start) {
  66647. value = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);
  66648. } else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {
  66649. value = value.substring(0, selection.start) + value.substring(selection.start + 1);
  66650. }
  66651. } else if (printable) {
  66652. shift = e.shiftKey;
  66653. character = String.fromCharCode(e.keyCode);
  66654. if (shift) character = character.toUpperCase();
  66655. else character = character.toLowerCase();
  66656. value += character;
  66657. }
  66658. }
  66659. placeholder = $input.attr('placeholder');
  66660. if (!value && placeholder) {
  66661. value = placeholder;
  66662. }
  66663. width = measureString(value, $input) + 4;
  66664. if (width !== currentWidth) {
  66665. currentWidth = width;
  66666. $input.width(width);
  66667. $input.triggerHandler('resize');
  66668. }
  66669. };
  66670. $input.on('keydown keyup update blur', update);
  66671. update();
  66672. };
  66673. var domToString = function(d) {
  66674. var tmp = document.createElement('div');
  66675. tmp.appendChild(d.cloneNode(true));
  66676. return tmp.innerHTML;
  66677. };
  66678. var logError = function(message, options){
  66679. if(!options) options = {};
  66680. var component = "Selectize";
  66681. console.error(component + ": " + message)
  66682. if(options.explanation){
  66683. // console.group is undefined in <IE11
  66684. if(console.group) console.group();
  66685. console.error(options.explanation);
  66686. if(console.group) console.groupEnd();
  66687. }
  66688. }
  66689. var Selectize = function($input, settings) {
  66690. var key, i, n, dir, input, self = this;
  66691. input = $input[0];
  66692. input.selectize = self;
  66693. // detect rtl environment
  66694. var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);
  66695. dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;
  66696. dir = dir || $input.parents('[dir]:first').attr('dir') || '';
  66697. // setup default state
  66698. $.extend(self, {
  66699. order : 0,
  66700. settings : settings,
  66701. $input : $input,
  66702. tabIndex : $input.attr('tabindex') || '',
  66703. tagType : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT,
  66704. rtl : /rtl/i.test(dir),
  66705. eventNS : '.selectize' + (++Selectize.count),
  66706. highlightedValue : null,
  66707. isBlurring : false,
  66708. isOpen : false,
  66709. isDisabled : false,
  66710. isRequired : $input.is('[required]'),
  66711. isInvalid : false,
  66712. isLocked : false,
  66713. isFocused : false,
  66714. isInputHidden : false,
  66715. isSetup : false,
  66716. isShiftDown : false,
  66717. isCmdDown : false,
  66718. isCtrlDown : false,
  66719. ignoreFocus : false,
  66720. ignoreBlur : false,
  66721. ignoreHover : false,
  66722. hasOptions : false,
  66723. currentResults : null,
  66724. lastValue : '',
  66725. caretPos : 0,
  66726. loading : 0,
  66727. loadedSearches : {},
  66728. $activeOption : null,
  66729. $activeItems : [],
  66730. optgroups : {},
  66731. options : {},
  66732. userOptions : {},
  66733. items : [],
  66734. renderCache : {},
  66735. onSearchChange : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)
  66736. });
  66737. // search system
  66738. self.sifter = new Sifter(this.options, {diacritics: settings.diacritics});
  66739. // build options table
  66740. if (self.settings.options) {
  66741. for (i = 0, n = self.settings.options.length; i < n; i++) {
  66742. self.registerOption(self.settings.options[i]);
  66743. }
  66744. delete self.settings.options;
  66745. }
  66746. // build optgroup table
  66747. if (self.settings.optgroups) {
  66748. for (i = 0, n = self.settings.optgroups.length; i < n; i++) {
  66749. self.registerOptionGroup(self.settings.optgroups[i]);
  66750. }
  66751. delete self.settings.optgroups;
  66752. }
  66753. // option-dependent defaults
  66754. self.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi');
  66755. if (typeof self.settings.hideSelected !== 'boolean') {
  66756. self.settings.hideSelected = self.settings.mode === 'multi';
  66757. }
  66758. self.initializePlugins(self.settings.plugins);
  66759. self.setupCallbacks();
  66760. self.setupTemplates();
  66761. self.setup();
  66762. };
  66763. // mixins
  66764. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  66765. MicroEvent.mixin(Selectize);
  66766. if(typeof MicroPlugin !== "undefined"){
  66767. MicroPlugin.mixin(Selectize);
  66768. }else{
  66769. logError("Dependency MicroPlugin is missing",
  66770. {explanation:
  66771. "Make sure you either: (1) are using the \"standalone\" "+
  66772. "version of Selectize, or (2) require MicroPlugin before you "+
  66773. "load Selectize."}
  66774. );
  66775. }
  66776. // methods
  66777. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  66778. $.extend(Selectize.prototype, {
  66779. /**
  66780. * Creates all elements and sets up event bindings.
  66781. */
  66782. setup: function() {
  66783. var self = this;
  66784. var settings = self.settings;
  66785. var eventNS = self.eventNS;
  66786. var $window = $(window);
  66787. var $document = $(document);
  66788. var $input = self.$input;
  66789. var $wrapper;
  66790. var $control;
  66791. var $control_input;
  66792. var $dropdown;
  66793. var $dropdown_content;
  66794. var $dropdown_parent;
  66795. var inputMode;
  66796. var timeout_blur;
  66797. var timeout_focus;
  66798. var classes;
  66799. var classes_plugins;
  66800. var inputId;
  66801. inputMode = self.settings.mode;
  66802. classes = $input.attr('class') || '';
  66803. $wrapper = $('<div>').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);
  66804. $control = $('<div>').addClass(settings.inputClass).addClass('items').appendTo($wrapper);
  66805. $control_input = $('<input type="text" autocomplete="off" />').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex);
  66806. $dropdown_parent = $(settings.dropdownParent || $wrapper);
  66807. $dropdown = $('<div>').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);
  66808. $dropdown_content = $('<div>').addClass(settings.dropdownContentClass).appendTo($dropdown);
  66809. if(inputId = $input.attr('id')) {
  66810. $control_input.attr('id', inputId + '-selectized');
  66811. $("label[for='"+inputId+"']").attr('for', inputId + '-selectized');
  66812. }
  66813. if(self.settings.copyClassesToDropdown) {
  66814. $dropdown.addClass(classes);
  66815. }
  66816. $wrapper.css({
  66817. width: $input[0].style.width
  66818. });
  66819. if (self.plugins.names.length) {
  66820. classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
  66821. $wrapper.addClass(classes_plugins);
  66822. $dropdown.addClass(classes_plugins);
  66823. }
  66824. if ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) {
  66825. $input.attr('multiple', 'multiple');
  66826. }
  66827. if (self.settings.placeholder) {
  66828. $control_input.attr('placeholder', settings.placeholder);
  66829. }
  66830. // if splitOn was not passed in, construct it from the delimiter to allow pasting universally
  66831. if (!self.settings.splitOn && self.settings.delimiter) {
  66832. var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  66833. self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*');
  66834. }
  66835. if ($input.attr('autocorrect')) {
  66836. $control_input.attr('autocorrect', $input.attr('autocorrect'));
  66837. }
  66838. if ($input.attr('autocapitalize')) {
  66839. $control_input.attr('autocapitalize', $input.attr('autocapitalize'));
  66840. }
  66841. $control_input[0].type = $input[0].type;
  66842. self.$wrapper = $wrapper;
  66843. self.$control = $control;
  66844. self.$control_input = $control_input;
  66845. self.$dropdown = $dropdown;
  66846. self.$dropdown_content = $dropdown_content;
  66847. $dropdown.on('mouseenter mousedown click', '[data-disabled]>[data-selectable]', function(e) { e.stopImmediatePropagation(); });
  66848. $dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });
  66849. $dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
  66850. watchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); });
  66851. autoGrow($control_input);
  66852. $control.on({
  66853. mousedown : function() { return self.onMouseDown.apply(self, arguments); },
  66854. click : function() { return self.onClick.apply(self, arguments); }
  66855. });
  66856. $control_input.on({
  66857. mousedown : function(e) { e.stopPropagation(); },
  66858. keydown : function() { return self.onKeyDown.apply(self, arguments); },
  66859. keyup : function() { return self.onKeyUp.apply(self, arguments); },
  66860. keypress : function() { return self.onKeyPress.apply(self, arguments); },
  66861. resize : function() { self.positionDropdown.apply(self, []); },
  66862. blur : function() { return self.onBlur.apply(self, arguments); },
  66863. focus : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); },
  66864. paste : function() { return self.onPaste.apply(self, arguments); }
  66865. });
  66866. $document.on('keydown' + eventNS, function(e) {
  66867. self.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey'];
  66868. self.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey'];
  66869. self.isShiftDown = e.shiftKey;
  66870. });
  66871. $document.on('keyup' + eventNS, function(e) {
  66872. if (e.keyCode === KEY_CTRL) self.isCtrlDown = false;
  66873. if (e.keyCode === KEY_SHIFT) self.isShiftDown = false;
  66874. if (e.keyCode === KEY_CMD) self.isCmdDown = false;
  66875. });
  66876. $document.on('mousedown' + eventNS, function(e) {
  66877. if (self.isFocused) {
  66878. // prevent events on the dropdown scrollbar from causing the control to blur
  66879. if (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) {
  66880. return false;
  66881. }
  66882. // blur on click outside
  66883. if (!self.$control.has(e.target).length && e.target !== self.$control[0]) {
  66884. self.blur(e.target);
  66885. }
  66886. }
  66887. });
  66888. $window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function() {
  66889. if (self.isOpen) {
  66890. self.positionDropdown.apply(self, arguments);
  66891. }
  66892. });
  66893. $window.on('mousemove' + eventNS, function() {
  66894. self.ignoreHover = false;
  66895. });
  66896. // store original children and tab index so that they can be
  66897. // restored when the destroy() method is called.
  66898. this.revertSettings = {
  66899. $children : $input.children().detach(),
  66900. tabindex : $input.attr('tabindex')
  66901. };
  66902. $input.attr('tabindex', -1).hide().after(self.$wrapper);
  66903. if ($.isArray(settings.items)) {
  66904. self.setValue(settings.items);
  66905. delete settings.items;
  66906. }
  66907. // feature detect for the validation API
  66908. if (SUPPORTS_VALIDITY_API) {
  66909. $input.on('invalid' + eventNS, function(e) {
  66910. e.preventDefault();
  66911. self.isInvalid = true;
  66912. self.refreshState();
  66913. });
  66914. }
  66915. self.updateOriginalInput();
  66916. self.refreshItems();
  66917. self.refreshState();
  66918. self.updatePlaceholder();
  66919. self.isSetup = true;
  66920. if ($input.is(':disabled')) {
  66921. self.disable();
  66922. }
  66923. self.on('change', this.onChange);
  66924. $input.data('selectize', self);
  66925. $input.addClass('selectized');
  66926. self.trigger('initialize');
  66927. // preload options
  66928. if (settings.preload === true) {
  66929. self.onSearchChange('');
  66930. }
  66931. },
  66932. /**
  66933. * Sets up default rendering functions.
  66934. */
  66935. setupTemplates: function() {
  66936. var self = this;
  66937. var field_label = self.settings.labelField;
  66938. var field_optgroup = self.settings.optgroupLabelField;
  66939. var templates = {
  66940. 'optgroup': function(data) {
  66941. return '<div class="optgroup">' + data.html + '</div>';
  66942. },
  66943. 'optgroup_header': function(data, escape) {
  66944. return '<div class="optgroup-header">' + escape(data[field_optgroup]) + '</div>';
  66945. },
  66946. 'option': function(data, escape) {
  66947. return '<div class="option">' + escape(data[field_label]) + '</div>';
  66948. },
  66949. 'item': function(data, escape) {
  66950. return '<div class="item">' + escape(data[field_label]) + '</div>';
  66951. },
  66952. 'option_create': function(data, escape) {
  66953. return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
  66954. }
  66955. };
  66956. self.settings.render = $.extend({}, templates, self.settings.render);
  66957. },
  66958. /**
  66959. * Maps fired events to callbacks provided
  66960. * in the settings used when creating the control.
  66961. */
  66962. setupCallbacks: function() {
  66963. var key, fn, callbacks = {
  66964. 'initialize' : 'onInitialize',
  66965. 'change' : 'onChange',
  66966. 'item_add' : 'onItemAdd',
  66967. 'item_remove' : 'onItemRemove',
  66968. 'clear' : 'onClear',
  66969. 'option_add' : 'onOptionAdd',
  66970. 'option_remove' : 'onOptionRemove',
  66971. 'option_clear' : 'onOptionClear',
  66972. 'optgroup_add' : 'onOptionGroupAdd',
  66973. 'optgroup_remove' : 'onOptionGroupRemove',
  66974. 'optgroup_clear' : 'onOptionGroupClear',
  66975. 'dropdown_open' : 'onDropdownOpen',
  66976. 'dropdown_close' : 'onDropdownClose',
  66977. 'type' : 'onType',
  66978. 'load' : 'onLoad',
  66979. 'focus' : 'onFocus',
  66980. 'blur' : 'onBlur'
  66981. };
  66982. for (key in callbacks) {
  66983. if (callbacks.hasOwnProperty(key)) {
  66984. fn = this.settings[callbacks[key]];
  66985. if (fn) this.on(key, fn);
  66986. }
  66987. }
  66988. },
  66989. /**
  66990. * Triggered when the main control element
  66991. * has a click event.
  66992. *
  66993. * @param {object} e
  66994. * @return {boolean}
  66995. */
  66996. onClick: function(e) {
  66997. var self = this;
  66998. // necessary for mobile webkit devices (manual focus triggering
  66999. // is ignored unless invoked within a click event)
  67000. // also necessary to reopen a dropdown that has been closed by
  67001. // closeAfterSelect
  67002. if (!self.isFocused || !self.isOpen) {
  67003. self.focus();
  67004. e.preventDefault();
  67005. }
  67006. },
  67007. /**
  67008. * Triggered when the main control element
  67009. * has a mouse down event.
  67010. *
  67011. * @param {object} e
  67012. * @return {boolean}
  67013. */
  67014. onMouseDown: function(e) {
  67015. var self = this;
  67016. var defaultPrevented = e.isDefaultPrevented();
  67017. var $target = $(e.target);
  67018. if (self.isFocused) {
  67019. // retain focus by preventing native handling. if the
  67020. // event target is the input it should not be modified.
  67021. // otherwise, text selection within the input won't work.
  67022. if (e.target !== self.$control_input[0]) {
  67023. if (self.settings.mode === 'single') {
  67024. // toggle dropdown
  67025. self.isOpen ? self.close() : self.open();
  67026. } else if (!defaultPrevented) {
  67027. self.setActiveItem(null);
  67028. }
  67029. return false;
  67030. }
  67031. } else {
  67032. // give control focus
  67033. if (!defaultPrevented) {
  67034. window.setTimeout(function() {
  67035. self.focus();
  67036. }, 0);
  67037. }
  67038. }
  67039. },
  67040. /**
  67041. * Triggered when the value of the control has been changed.
  67042. * This should propagate the event to the original DOM
  67043. * input / select element.
  67044. */
  67045. onChange: function() {
  67046. this.$input.trigger('change');
  67047. },
  67048. /**
  67049. * Triggered on <input> paste.
  67050. *
  67051. * @param {object} e
  67052. * @returns {boolean}
  67053. */
  67054. onPaste: function(e) {
  67055. var self = this;
  67056. if (self.isFull() || self.isInputHidden || self.isLocked) {
  67057. e.preventDefault();
  67058. return;
  67059. }
  67060. // If a regex or string is included, this will split the pasted
  67061. // input and create Items for each separate value
  67062. if (self.settings.splitOn) {
  67063. // Wait for pasted text to be recognized in value
  67064. setTimeout(function() {
  67065. var pastedText = self.$control_input.val();
  67066. if(!pastedText.match(self.settings.splitOn)){ return }
  67067. var splitInput = $.trim(pastedText).split(self.settings.splitOn);
  67068. for (var i = 0, n = splitInput.length; i < n; i++) {
  67069. self.createItem(splitInput[i]);
  67070. }
  67071. }, 0);
  67072. }
  67073. },
  67074. /**
  67075. * Triggered on <input> keypress.
  67076. *
  67077. * @param {object} e
  67078. * @returns {boolean}
  67079. */
  67080. onKeyPress: function(e) {
  67081. if (this.isLocked) return e && e.preventDefault();
  67082. var character = String.fromCharCode(e.keyCode || e.which);
  67083. if (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) {
  67084. this.createItem();
  67085. e.preventDefault();
  67086. return false;
  67087. }
  67088. },
  67089. /**
  67090. * Triggered on <input> keydown.
  67091. *
  67092. * @param {object} e
  67093. * @returns {boolean}
  67094. */
  67095. onKeyDown: function(e) {
  67096. var isInput = e.target === this.$control_input[0];
  67097. var self = this;
  67098. if (self.isLocked) {
  67099. if (e.keyCode !== KEY_TAB) {
  67100. e.preventDefault();
  67101. }
  67102. return;
  67103. }
  67104. switch (e.keyCode) {
  67105. case KEY_A:
  67106. if (self.isCmdDown) {
  67107. self.selectAll();
  67108. return;
  67109. }
  67110. break;
  67111. case KEY_ESC:
  67112. if (self.isOpen) {
  67113. e.preventDefault();
  67114. e.stopPropagation();
  67115. self.close();
  67116. }
  67117. return;
  67118. case KEY_N:
  67119. if (!e.ctrlKey || e.altKey) break;
  67120. case KEY_DOWN:
  67121. if (!self.isOpen && self.hasOptions) {
  67122. self.open();
  67123. } else if (self.$activeOption) {
  67124. self.ignoreHover = true;
  67125. var $next = self.getAdjacentOption(self.$activeOption, 1);
  67126. if ($next.length) self.setActiveOption($next, true, true);
  67127. }
  67128. e.preventDefault();
  67129. return;
  67130. case KEY_P:
  67131. if (!e.ctrlKey || e.altKey) break;
  67132. case KEY_UP:
  67133. if (self.$activeOption) {
  67134. self.ignoreHover = true;
  67135. var $prev = self.getAdjacentOption(self.$activeOption, -1);
  67136. if ($prev.length) self.setActiveOption($prev, true, true);
  67137. }
  67138. e.preventDefault();
  67139. return;
  67140. case KEY_RETURN:
  67141. if (self.isOpen && self.$activeOption) {
  67142. self.onOptionSelect({currentTarget: self.$activeOption});
  67143. e.preventDefault();
  67144. }
  67145. return;
  67146. case KEY_LEFT:
  67147. self.advanceSelection(-1, e);
  67148. return;
  67149. case KEY_RIGHT:
  67150. self.advanceSelection(1, e);
  67151. return;
  67152. case KEY_TAB:
  67153. if (self.settings.selectOnTab && self.isOpen && self.$activeOption) {
  67154. self.onOptionSelect({currentTarget: self.$activeOption});
  67155. // Default behaviour is to jump to the next field, we only want this
  67156. // if the current field doesn't accept any more entries
  67157. if (!self.isFull()) {
  67158. e.preventDefault();
  67159. }
  67160. }
  67161. if (self.settings.create && self.createItem()) {
  67162. e.preventDefault();
  67163. }
  67164. return;
  67165. case KEY_BACKSPACE:
  67166. case KEY_DELETE:
  67167. self.deleteSelection(e);
  67168. return;
  67169. }
  67170. if ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) {
  67171. e.preventDefault();
  67172. return;
  67173. }
  67174. },
  67175. /**
  67176. * Triggered on <input> keyup.
  67177. *
  67178. * @param {object} e
  67179. * @returns {boolean}
  67180. */
  67181. onKeyUp: function(e) {
  67182. var self = this;
  67183. if (self.isLocked) return e && e.preventDefault();
  67184. var value = self.$control_input.val() || '';
  67185. if (self.lastValue !== value) {
  67186. self.lastValue = value;
  67187. self.onSearchChange(value);
  67188. self.refreshOptions();
  67189. self.trigger('type', value);
  67190. }
  67191. },
  67192. /**
  67193. * Invokes the user-provide option provider / loader.
  67194. *
  67195. * Note: this function is debounced in the Selectize
  67196. * constructor (by `settings.loadThrottle` milliseconds)
  67197. *
  67198. * @param {string} value
  67199. */
  67200. onSearchChange: function(value) {
  67201. var self = this;
  67202. var fn = self.settings.load;
  67203. if (!fn) return;
  67204. if (self.loadedSearches.hasOwnProperty(value)) return;
  67205. self.loadedSearches[value] = true;
  67206. self.load(function(callback) {
  67207. fn.apply(self, [value, callback]);
  67208. });
  67209. },
  67210. /**
  67211. * Triggered on <input> focus.
  67212. *
  67213. * @param {object} e (optional)
  67214. * @returns {boolean}
  67215. */
  67216. onFocus: function(e) {
  67217. var self = this;
  67218. var wasFocused = self.isFocused;
  67219. if (self.isDisabled) {
  67220. self.blur();
  67221. e && e.preventDefault();
  67222. return false;
  67223. }
  67224. if (self.ignoreFocus) return;
  67225. self.isFocused = true;
  67226. if (self.settings.preload === 'focus') self.onSearchChange('');
  67227. if (!wasFocused) self.trigger('focus');
  67228. if (!self.$activeItems.length) {
  67229. self.showInput();
  67230. self.setActiveItem(null);
  67231. self.refreshOptions(!!self.settings.openOnFocus);
  67232. }
  67233. self.refreshState();
  67234. },
  67235. /**
  67236. * Triggered on <input> blur.
  67237. *
  67238. * @param {object} e
  67239. * @param {Element} dest
  67240. */
  67241. onBlur: function(e, dest) {
  67242. var self = this;
  67243. if (!self.isFocused) return;
  67244. self.isFocused = false;
  67245. if (self.ignoreFocus) {
  67246. return;
  67247. } else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) {
  67248. // necessary to prevent IE closing the dropdown when the scrollbar is clicked
  67249. self.ignoreBlur = true;
  67250. self.onFocus(e);
  67251. return;
  67252. }
  67253. var deactivate = function() {
  67254. self.close();
  67255. self.setTextboxValue('');
  67256. self.setActiveItem(null);
  67257. self.setActiveOption(null);
  67258. self.setCaret(self.items.length);
  67259. self.refreshState();
  67260. // IE11 bug: element still marked as active
  67261. dest && dest.focus && dest.focus();
  67262. self.isBlurring = false;
  67263. self.ignoreFocus = false;
  67264. self.trigger('blur');
  67265. };
  67266. self.isBlurring = true;
  67267. self.ignoreFocus = true;
  67268. if (self.settings.create && self.settings.createOnBlur) {
  67269. self.createItem(null, false, deactivate);
  67270. } else {
  67271. deactivate();
  67272. }
  67273. },
  67274. /**
  67275. * Triggered when the user rolls over
  67276. * an option in the autocomplete dropdown menu.
  67277. *
  67278. * @param {object} e
  67279. * @returns {boolean}
  67280. */
  67281. onOptionHover: function(e) {
  67282. if (this.ignoreHover) return;
  67283. this.setActiveOption(e.currentTarget, false);
  67284. },
  67285. /**
  67286. * Triggered when the user clicks on an option
  67287. * in the autocomplete dropdown menu.
  67288. *
  67289. * @param {object} e
  67290. * @returns {boolean}
  67291. */
  67292. onOptionSelect: function(e) {
  67293. var value, $target, $option, self = this;
  67294. if (e.preventDefault) {
  67295. e.preventDefault();
  67296. e.stopPropagation();
  67297. }
  67298. $target = $(e.currentTarget);
  67299. if ($target.hasClass('create')) {
  67300. self.createItem(null, function() {
  67301. if (self.settings.closeAfterSelect) {
  67302. self.close();
  67303. }
  67304. });
  67305. } else {
  67306. value = $target.attr('data-value');
  67307. if (typeof value !== 'undefined') {
  67308. self.lastQuery = null;
  67309. self.setTextboxValue('');
  67310. self.addItem(value);
  67311. if (self.settings.closeAfterSelect) {
  67312. self.close();
  67313. } else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) {
  67314. self.setActiveOption(self.getOption(value));
  67315. }
  67316. }
  67317. }
  67318. },
  67319. /**
  67320. * Triggered when the user clicks on an item
  67321. * that has been selected.
  67322. *
  67323. * @param {object} e
  67324. * @returns {boolean}
  67325. */
  67326. onItemSelect: function(e) {
  67327. var self = this;
  67328. if (self.isLocked) return;
  67329. if (self.settings.mode === 'multi') {
  67330. e.preventDefault();
  67331. self.setActiveItem(e.currentTarget, e);
  67332. }
  67333. },
  67334. /**
  67335. * Invokes the provided method that provides
  67336. * results to a callback---which are then added
  67337. * as options to the control.
  67338. *
  67339. * @param {function} fn
  67340. */
  67341. load: function(fn) {
  67342. var self = this;
  67343. var $wrapper = self.$wrapper.addClass(self.settings.loadingClass);
  67344. self.loading++;
  67345. fn.apply(self, [function(results) {
  67346. self.loading = Math.max(self.loading - 1, 0);
  67347. if (results && results.length) {
  67348. self.addOption(results);
  67349. self.refreshOptions(self.isFocused && !self.isInputHidden);
  67350. }
  67351. if (!self.loading) {
  67352. $wrapper.removeClass(self.settings.loadingClass);
  67353. }
  67354. self.trigger('load', results);
  67355. }]);
  67356. },
  67357. /**
  67358. * Sets the input field of the control to the specified value.
  67359. *
  67360. * @param {string} value
  67361. */
  67362. setTextboxValue: function(value) {
  67363. var $input = this.$control_input;
  67364. var changed = $input.val() !== value;
  67365. if (changed) {
  67366. $input.val(value).triggerHandler('update');
  67367. this.lastValue = value;
  67368. }
  67369. },
  67370. /**
  67371. * Returns the value of the control. If multiple items
  67372. * can be selected (e.g. <select multiple>), this returns
  67373. * an array. If only one item can be selected, this
  67374. * returns a string.
  67375. *
  67376. * @returns {mixed}
  67377. */
  67378. getValue: function() {
  67379. if (this.tagType === TAG_SELECT && this.$input.attr('multiple')) {
  67380. return this.items;
  67381. } else {
  67382. return this.items.join(this.settings.delimiter);
  67383. }
  67384. },
  67385. /**
  67386. * Resets the selected items to the given value.
  67387. *
  67388. * @param {mixed} value
  67389. */
  67390. setValue: function(value, silent) {
  67391. var events = silent ? [] : ['change'];
  67392. debounce_events(this, events, function() {
  67393. this.clear(silent);
  67394. this.addItems(value, silent);
  67395. });
  67396. },
  67397. /**
  67398. * Sets the selected item.
  67399. *
  67400. * @param {object} $item
  67401. * @param {object} e (optional)
  67402. */
  67403. setActiveItem: function($item, e) {
  67404. var self = this;
  67405. var eventName;
  67406. var i, idx, begin, end, item, swap;
  67407. var $last;
  67408. if (self.settings.mode === 'single') return;
  67409. $item = $($item);
  67410. // clear the active selection
  67411. if (!$item.length) {
  67412. $(self.$activeItems).removeClass('active');
  67413. self.$activeItems = [];
  67414. if (self.isFocused) {
  67415. self.showInput();
  67416. }
  67417. return;
  67418. }
  67419. // modify selection
  67420. eventName = e && e.type.toLowerCase();
  67421. if (eventName === 'mousedown' && self.isShiftDown && self.$activeItems.length) {
  67422. $last = self.$control.children('.active:last');
  67423. begin = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$last[0]]);
  67424. end = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$item[0]]);
  67425. if (begin > end) {
  67426. swap = begin;
  67427. begin = end;
  67428. end = swap;
  67429. }
  67430. for (i = begin; i <= end; i++) {
  67431. item = self.$control[0].childNodes[i];
  67432. if (self.$activeItems.indexOf(item) === -1) {
  67433. $(item).addClass('active');
  67434. self.$activeItems.push(item);
  67435. }
  67436. }
  67437. e.preventDefault();
  67438. } else if ((eventName === 'mousedown' && self.isCtrlDown) || (eventName === 'keydown' && this.isShiftDown)) {
  67439. if ($item.hasClass('active')) {
  67440. idx = self.$activeItems.indexOf($item[0]);
  67441. self.$activeItems.splice(idx, 1);
  67442. $item.removeClass('active');
  67443. } else {
  67444. self.$activeItems.push($item.addClass('active')[0]);
  67445. }
  67446. } else {
  67447. $(self.$activeItems).removeClass('active');
  67448. self.$activeItems = [$item.addClass('active')[0]];
  67449. }
  67450. // ensure control has focus
  67451. self.hideInput();
  67452. if (!this.isFocused) {
  67453. self.focus();
  67454. }
  67455. },
  67456. /**
  67457. * Sets the selected item in the dropdown menu
  67458. * of available options.
  67459. *
  67460. * @param {object} $object
  67461. * @param {boolean} scroll
  67462. * @param {boolean} animate
  67463. */
  67464. setActiveOption: function($option, scroll, animate) {
  67465. var height_menu, height_item, y;
  67466. var scroll_top, scroll_bottom;
  67467. var self = this;
  67468. if (self.$activeOption) self.$activeOption.removeClass('active');
  67469. self.$activeOption = null;
  67470. $option = $($option);
  67471. if (!$option.length) return;
  67472. self.$activeOption = $option.addClass('active');
  67473. if (scroll || !isset(scroll)) {
  67474. height_menu = self.$dropdown_content.height();
  67475. height_item = self.$activeOption.outerHeight(true);
  67476. scroll = self.$dropdown_content.scrollTop() || 0;
  67477. y = self.$activeOption.offset().top - self.$dropdown_content.offset().top + scroll;
  67478. scroll_top = y;
  67479. scroll_bottom = y - height_menu + height_item;
  67480. if (y + height_item > height_menu + scroll) {
  67481. self.$dropdown_content.stop().animate({scrollTop: scroll_bottom}, animate ? self.settings.scrollDuration : 0);
  67482. } else if (y < scroll) {
  67483. self.$dropdown_content.stop().animate({scrollTop: scroll_top}, animate ? self.settings.scrollDuration : 0);
  67484. }
  67485. }
  67486. },
  67487. /**
  67488. * Selects all items (CTRL + A).
  67489. */
  67490. selectAll: function() {
  67491. var self = this;
  67492. if (self.settings.mode === 'single') return;
  67493. self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
  67494. if (self.$activeItems.length) {
  67495. self.hideInput();
  67496. self.close();
  67497. }
  67498. self.focus();
  67499. },
  67500. /**
  67501. * Hides the input element out of view, while
  67502. * retaining its focus.
  67503. */
  67504. hideInput: function() {
  67505. var self = this;
  67506. self.setTextboxValue('');
  67507. self.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});
  67508. self.isInputHidden = true;
  67509. },
  67510. /**
  67511. * Restores input visibility.
  67512. */
  67513. showInput: function() {
  67514. this.$control_input.css({opacity: 1, position: 'relative', left: 0});
  67515. this.isInputHidden = false;
  67516. },
  67517. /**
  67518. * Gives the control focus.
  67519. */
  67520. focus: function() {
  67521. var self = this;
  67522. if (self.isDisabled) return;
  67523. self.ignoreFocus = true;
  67524. self.$control_input[0].focus();
  67525. window.setTimeout(function() {
  67526. self.ignoreFocus = false;
  67527. self.onFocus();
  67528. }, 0);
  67529. },
  67530. /**
  67531. * Forces the control out of focus.
  67532. *
  67533. * @param {Element} dest
  67534. */
  67535. blur: function(dest) {
  67536. this.$control_input[0].blur();
  67537. this.onBlur(null, dest);
  67538. },
  67539. /**
  67540. * Returns a function that scores an object
  67541. * to show how good of a match it is to the
  67542. * provided query.
  67543. *
  67544. * @param {string} query
  67545. * @param {object} options
  67546. * @return {function}
  67547. */
  67548. getScoreFunction: function(query) {
  67549. return this.sifter.getScoreFunction(query, this.getSearchOptions());
  67550. },
  67551. /**
  67552. * Returns search options for sifter (the system
  67553. * for scoring and sorting results).
  67554. *
  67555. * @see https://github.com/brianreavis/sifter.js
  67556. * @return {object}
  67557. */
  67558. getSearchOptions: function() {
  67559. var settings = this.settings;
  67560. var sort = settings.sortField;
  67561. if (typeof sort === 'string') {
  67562. sort = [{field: sort}];
  67563. }
  67564. return {
  67565. fields : settings.searchField,
  67566. conjunction : settings.searchConjunction,
  67567. sort : sort,
  67568. nesting : settings.nesting
  67569. };
  67570. },
  67571. /**
  67572. * Searches through available options and returns
  67573. * a sorted array of matches.
  67574. *
  67575. * Returns an object containing:
  67576. *
  67577. * - query {string}
  67578. * - tokens {array}
  67579. * - total {int}
  67580. * - items {array}
  67581. *
  67582. * @param {string} query
  67583. * @returns {object}
  67584. */
  67585. search: function(query) {
  67586. var i, value, score, result, calculateScore;
  67587. var self = this;
  67588. var settings = self.settings;
  67589. var options = this.getSearchOptions();
  67590. // validate user-provided result scoring function
  67591. if (settings.score) {
  67592. calculateScore = self.settings.score.apply(this, [query]);
  67593. if (typeof calculateScore !== 'function') {
  67594. throw new Error('Selectize "score" setting must be a function that returns a function');
  67595. }
  67596. }
  67597. // perform search
  67598. if (query !== self.lastQuery) {
  67599. self.lastQuery = query;
  67600. result = self.sifter.search(query, $.extend(options, {score: calculateScore}));
  67601. self.currentResults = result;
  67602. } else {
  67603. result = $.extend(true, {}, self.currentResults);
  67604. }
  67605. // filter out selected items
  67606. if (settings.hideSelected) {
  67607. for (i = result.items.length - 1; i >= 0; i--) {
  67608. if (self.items.indexOf(hash_key(result.items[i].id)) !== -1) {
  67609. result.items.splice(i, 1);
  67610. }
  67611. }
  67612. }
  67613. return result;
  67614. },
  67615. /**
  67616. * Refreshes the list of available options shown
  67617. * in the autocomplete dropdown menu.
  67618. *
  67619. * @param {boolean} triggerDropdown
  67620. */
  67621. refreshOptions: function(triggerDropdown) {
  67622. var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
  67623. var $active, $active_before, $create;
  67624. if (typeof triggerDropdown === 'undefined') {
  67625. triggerDropdown = true;
  67626. }
  67627. var self = this;
  67628. var query = $.trim(self.$control_input.val());
  67629. var results = self.search(query);
  67630. var $dropdown_content = self.$dropdown_content;
  67631. var active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value'));
  67632. // build markup
  67633. n = results.items.length;
  67634. if (typeof self.settings.maxOptions === 'number') {
  67635. n = Math.min(n, self.settings.maxOptions);
  67636. }
  67637. // render and group available options individually
  67638. groups = {};
  67639. groups_order = [];
  67640. for (i = 0; i < n; i++) {
  67641. option = self.options[results.items[i].id];
  67642. option_html = self.render('option', option);
  67643. optgroup = option[self.settings.optgroupField] || '';
  67644. optgroups = $.isArray(optgroup) ? optgroup : [optgroup];
  67645. for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
  67646. optgroup = optgroups[j];
  67647. if (!self.optgroups.hasOwnProperty(optgroup)) {
  67648. optgroup = '';
  67649. }
  67650. if (!groups.hasOwnProperty(optgroup)) {
  67651. groups[optgroup] = document.createDocumentFragment();
  67652. groups_order.push(optgroup);
  67653. }
  67654. groups[optgroup].appendChild(option_html);
  67655. }
  67656. }
  67657. // sort optgroups
  67658. if (this.settings.lockOptgroupOrder) {
  67659. groups_order.sort(function(a, b) {
  67660. var a_order = self.optgroups[a].$order || 0;
  67661. var b_order = self.optgroups[b].$order || 0;
  67662. return a_order - b_order;
  67663. });
  67664. }
  67665. // render optgroup headers & join groups
  67666. html = document.createDocumentFragment();
  67667. for (i = 0, n = groups_order.length; i < n; i++) {
  67668. optgroup = groups_order[i];
  67669. if (self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].childNodes.length) {
  67670. // render the optgroup header and options within it,
  67671. // then pass it to the wrapper template
  67672. html_children = document.createDocumentFragment();
  67673. html_children.appendChild(self.render('optgroup_header', self.optgroups[optgroup]));
  67674. html_children.appendChild(groups[optgroup]);
  67675. html.appendChild(self.render('optgroup', $.extend({}, self.optgroups[optgroup], {
  67676. html: domToString(html_children),
  67677. dom: html_children
  67678. })));
  67679. } else {
  67680. html.appendChild(groups[optgroup]);
  67681. }
  67682. }
  67683. $dropdown_content.html(html);
  67684. // highlight matching terms inline
  67685. if (self.settings.highlight) {
  67686. $dropdown_content.removeHighlight();
  67687. if (results.query.length && results.tokens.length) {
  67688. for (i = 0, n = results.tokens.length; i < n; i++) {
  67689. highlight($dropdown_content, results.tokens[i].regex);
  67690. }
  67691. }
  67692. }
  67693. // add "selected" class to selected options
  67694. if (!self.settings.hideSelected) {
  67695. for (i = 0, n = self.items.length; i < n; i++) {
  67696. self.getOption(self.items[i]).addClass('selected');
  67697. }
  67698. }
  67699. // add create option
  67700. has_create_option = self.canCreate(query);
  67701. if (has_create_option) {
  67702. $dropdown_content.prepend(self.render('option_create', {input: query}));
  67703. $create = $($dropdown_content[0].childNodes[0]);
  67704. }
  67705. // activate
  67706. self.hasOptions = results.items.length > 0 || has_create_option;
  67707. if (self.hasOptions) {
  67708. if (results.items.length > 0) {
  67709. $active_before = active_before && self.getOption(active_before);
  67710. if ($active_before && $active_before.length) {
  67711. $active = $active_before;
  67712. } else if (self.settings.mode === 'single' && self.items.length) {
  67713. $active = self.getOption(self.items[0]);
  67714. }
  67715. if (!$active || !$active.length) {
  67716. if ($create && !self.settings.addPrecedence) {
  67717. $active = self.getAdjacentOption($create, 1);
  67718. } else {
  67719. $active = $dropdown_content.find('[data-selectable]:first');
  67720. }
  67721. }
  67722. } else {
  67723. $active = $create;
  67724. }
  67725. self.setActiveOption($active);
  67726. if (triggerDropdown && !self.isOpen) { self.open(); }
  67727. } else {
  67728. self.setActiveOption(null);
  67729. if (triggerDropdown && self.isOpen) { self.close(); }
  67730. }
  67731. },
  67732. /**
  67733. * Adds an available option. If it already exists,
  67734. * nothing will happen. Note: this does not refresh
  67735. * the options list dropdown (use `refreshOptions`
  67736. * for that).
  67737. *
  67738. * Usage:
  67739. *
  67740. * this.addOption(data)
  67741. *
  67742. * @param {object|array} data
  67743. */
  67744. addOption: function(data) {
  67745. var i, n, value, self = this;
  67746. if ($.isArray(data)) {
  67747. for (i = 0, n = data.length; i < n; i++) {
  67748. self.addOption(data[i]);
  67749. }
  67750. return;
  67751. }
  67752. if (value = self.registerOption(data)) {
  67753. self.userOptions[value] = true;
  67754. self.lastQuery = null;
  67755. self.trigger('option_add', value, data);
  67756. }
  67757. },
  67758. /**
  67759. * Registers an option to the pool of options.
  67760. *
  67761. * @param {object} data
  67762. * @return {boolean|string}
  67763. */
  67764. registerOption: function(data) {
  67765. var key = hash_key(data[this.settings.valueField]);
  67766. if (typeof key === 'undefined' || key === null || this.options.hasOwnProperty(key)) return false;
  67767. data.$order = data.$order || ++this.order;
  67768. this.options[key] = data;
  67769. return key;
  67770. },
  67771. /**
  67772. * Registers an option group to the pool of option groups.
  67773. *
  67774. * @param {object} data
  67775. * @return {boolean|string}
  67776. */
  67777. registerOptionGroup: function(data) {
  67778. var key = hash_key(data[this.settings.optgroupValueField]);
  67779. if (!key) return false;
  67780. data.$order = data.$order || ++this.order;
  67781. this.optgroups[key] = data;
  67782. return key;
  67783. },
  67784. /**
  67785. * Registers a new optgroup for options
  67786. * to be bucketed into.
  67787. *
  67788. * @param {string} id
  67789. * @param {object} data
  67790. */
  67791. addOptionGroup: function(id, data) {
  67792. data[this.settings.optgroupValueField] = id;
  67793. if (id = this.registerOptionGroup(data)) {
  67794. this.trigger('optgroup_add', id, data);
  67795. }
  67796. },
  67797. /**
  67798. * Removes an existing option group.
  67799. *
  67800. * @param {string} id
  67801. */
  67802. removeOptionGroup: function(id) {
  67803. if (this.optgroups.hasOwnProperty(id)) {
  67804. delete this.optgroups[id];
  67805. this.renderCache = {};
  67806. this.trigger('optgroup_remove', id);
  67807. }
  67808. },
  67809. /**
  67810. * Clears all existing option groups.
  67811. */
  67812. clearOptionGroups: function() {
  67813. this.optgroups = {};
  67814. this.renderCache = {};
  67815. this.trigger('optgroup_clear');
  67816. },
  67817. /**
  67818. * Updates an option available for selection. If
  67819. * it is visible in the selected items or options
  67820. * dropdown, it will be re-rendered automatically.
  67821. *
  67822. * @param {string} value
  67823. * @param {object} data
  67824. */
  67825. updateOption: function(value, data) {
  67826. var self = this;
  67827. var $item, $item_new;
  67828. var value_new, index_item, cache_items, cache_options, order_old;
  67829. value = hash_key(value);
  67830. value_new = hash_key(data[self.settings.valueField]);
  67831. // sanity checks
  67832. if (value === null) return;
  67833. if (!self.options.hasOwnProperty(value)) return;
  67834. if (typeof value_new !== 'string') throw new Error('Value must be set in option data');
  67835. order_old = self.options[value].$order;
  67836. // update references
  67837. if (value_new !== value) {
  67838. delete self.options[value];
  67839. index_item = self.items.indexOf(value);
  67840. if (index_item !== -1) {
  67841. self.items.splice(index_item, 1, value_new);
  67842. }
  67843. }
  67844. data.$order = data.$order || order_old;
  67845. self.options[value_new] = data;
  67846. // invalidate render cache
  67847. cache_items = self.renderCache['item'];
  67848. cache_options = self.renderCache['option'];
  67849. if (cache_items) {
  67850. delete cache_items[value];
  67851. delete cache_items[value_new];
  67852. }
  67853. if (cache_options) {
  67854. delete cache_options[value];
  67855. delete cache_options[value_new];
  67856. }
  67857. // update the item if it's selected
  67858. if (self.items.indexOf(value_new) !== -1) {
  67859. $item = self.getItem(value);
  67860. $item_new = $(self.render('item', data));
  67861. if ($item.hasClass('active')) $item_new.addClass('active');
  67862. $item.replaceWith($item_new);
  67863. }
  67864. // invalidate last query because we might have updated the sortField
  67865. self.lastQuery = null;
  67866. // update dropdown contents
  67867. if (self.isOpen) {
  67868. self.refreshOptions(false);
  67869. }
  67870. },
  67871. /**
  67872. * Removes a single option.
  67873. *
  67874. * @param {string} value
  67875. * @param {boolean} silent
  67876. */
  67877. removeOption: function(value, silent) {
  67878. var self = this;
  67879. value = hash_key(value);
  67880. var cache_items = self.renderCache['item'];
  67881. var cache_options = self.renderCache['option'];
  67882. if (cache_items) delete cache_items[value];
  67883. if (cache_options) delete cache_options[value];
  67884. delete self.userOptions[value];
  67885. delete self.options[value];
  67886. self.lastQuery = null;
  67887. self.trigger('option_remove', value);
  67888. self.removeItem(value, silent);
  67889. },
  67890. /**
  67891. * Clears all options.
  67892. */
  67893. clearOptions: function() {
  67894. var self = this;
  67895. self.loadedSearches = {};
  67896. self.userOptions = {};
  67897. self.renderCache = {};
  67898. var options = self.options;
  67899. $.each(self.options, function(key, value) {
  67900. if(self.items.indexOf(key) == -1) {
  67901. delete options[key];
  67902. }
  67903. });
  67904. self.options = self.sifter.items = options;
  67905. self.lastQuery = null;
  67906. self.trigger('option_clear');
  67907. },
  67908. /**
  67909. * Returns the jQuery element of the option
  67910. * matching the given value.
  67911. *
  67912. * @param {string} value
  67913. * @returns {object}
  67914. */
  67915. getOption: function(value) {
  67916. return this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'));
  67917. },
  67918. /**
  67919. * Returns the jQuery element of the next or
  67920. * previous selectable option.
  67921. *
  67922. * @param {object} $option
  67923. * @param {int} direction can be 1 for next or -1 for previous
  67924. * @return {object}
  67925. */
  67926. getAdjacentOption: function($option, direction) {
  67927. var $options = this.$dropdown.find('[data-selectable]');
  67928. var index = $options.index($option) + direction;
  67929. return index >= 0 && index < $options.length ? $options.eq(index) : $();
  67930. },
  67931. /**
  67932. * Finds the first element with a "data-value" attribute
  67933. * that matches the given value.
  67934. *
  67935. * @param {mixed} value
  67936. * @param {object} $els
  67937. * @return {object}
  67938. */
  67939. getElementWithValue: function(value, $els) {
  67940. value = hash_key(value);
  67941. if (typeof value !== 'undefined' && value !== null) {
  67942. for (var i = 0, n = $els.length; i < n; i++) {
  67943. if ($els[i].getAttribute('data-value') === value) {
  67944. return $($els[i]);
  67945. }
  67946. }
  67947. }
  67948. return $();
  67949. },
  67950. /**
  67951. * Returns the jQuery element of the item
  67952. * matching the given value.
  67953. *
  67954. * @param {string} value
  67955. * @returns {object}
  67956. */
  67957. getItem: function(value) {
  67958. return this.getElementWithValue(value, this.$control.children());
  67959. },
  67960. /**
  67961. * "Selects" multiple items at once. Adds them to the list
  67962. * at the current caret position.
  67963. *
  67964. * @param {string} value
  67965. * @param {boolean} silent
  67966. */
  67967. addItems: function(values, silent) {
  67968. this.buffer = document.createDocumentFragment();
  67969. var childNodes = this.$control[0].childNodes;
  67970. for (var i = 0; i < childNodes.length; i++) {
  67971. this.buffer.appendChild(childNodes[i]);
  67972. }
  67973. var items = $.isArray(values) ? values : [values];
  67974. for (var i = 0, n = items.length; i < n; i++) {
  67975. this.isPending = (i < n - 1);
  67976. this.addItem(items[i], silent);
  67977. }
  67978. var control = this.$control[0];
  67979. control.insertBefore(this.buffer, control.firstChild);
  67980. this.buffer = null;
  67981. },
  67982. /**
  67983. * "Selects" an item. Adds it to the list
  67984. * at the current caret position.
  67985. *
  67986. * @param {string} value
  67987. * @param {boolean} silent
  67988. */
  67989. addItem: function(value, silent) {
  67990. var events = silent ? [] : ['change'];
  67991. debounce_events(this, events, function() {
  67992. var $item, $option, $options;
  67993. var self = this;
  67994. var inputMode = self.settings.mode;
  67995. var i, active, value_next, wasFull;
  67996. value = hash_key(value);
  67997. if (self.items.indexOf(value) !== -1) {
  67998. if (inputMode === 'single') self.close();
  67999. return;
  68000. }
  68001. if (!self.options.hasOwnProperty(value)) return;
  68002. if (inputMode === 'single') self.clear(silent);
  68003. if (inputMode === 'multi' && self.isFull()) return;
  68004. $item = $(self.render('item', self.options[value]));
  68005. wasFull = self.isFull();
  68006. self.items.splice(self.caretPos, 0, value);
  68007. self.insertAtCaret($item);
  68008. if (!self.isPending || (!wasFull && self.isFull())) {
  68009. self.refreshState();
  68010. }
  68011. if (self.isSetup) {
  68012. $options = self.$dropdown_content.find('[data-selectable]');
  68013. // update menu / remove the option (if this is not one item being added as part of series)
  68014. if (!self.isPending) {
  68015. $option = self.getOption(value);
  68016. value_next = self.getAdjacentOption($option, 1).attr('data-value');
  68017. self.refreshOptions(self.isFocused && inputMode !== 'single');
  68018. if (value_next) {
  68019. self.setActiveOption(self.getOption(value_next));
  68020. }
  68021. }
  68022. // hide the menu if the maximum number of items have been selected or no options are left
  68023. if (!$options.length || self.isFull()) {
  68024. self.close();
  68025. } else if (!self.isPending) {
  68026. self.positionDropdown();
  68027. }
  68028. self.updatePlaceholder();
  68029. self.trigger('item_add', value, $item);
  68030. if (!self.isPending) {
  68031. self.updateOriginalInput({silent: silent});
  68032. }
  68033. }
  68034. });
  68035. },
  68036. /**
  68037. * Removes the selected item matching
  68038. * the provided value.
  68039. *
  68040. * @param {string} value
  68041. */
  68042. removeItem: function(value, silent) {
  68043. var self = this;
  68044. var $item, i, idx;
  68045. $item = (value instanceof $) ? value : self.getItem(value);
  68046. value = hash_key($item.attr('data-value'));
  68047. i = self.items.indexOf(value);
  68048. if (i !== -1) {
  68049. $item.remove();
  68050. if ($item.hasClass('active')) {
  68051. idx = self.$activeItems.indexOf($item[0]);
  68052. self.$activeItems.splice(idx, 1);
  68053. }
  68054. self.items.splice(i, 1);
  68055. self.lastQuery = null;
  68056. if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
  68057. self.removeOption(value, silent);
  68058. }
  68059. if (i < self.caretPos) {
  68060. self.setCaret(self.caretPos - 1);
  68061. }
  68062. self.refreshState();
  68063. self.updatePlaceholder();
  68064. self.updateOriginalInput({silent: silent});
  68065. self.positionDropdown();
  68066. self.trigger('item_remove', value, $item);
  68067. }
  68068. },
  68069. /**
  68070. * Invokes the `create` method provided in the
  68071. * selectize options that should provide the data
  68072. * for the new item, given the user input.
  68073. *
  68074. * Once this completes, it will be added
  68075. * to the item list.
  68076. *
  68077. * @param {string} value
  68078. * @param {boolean} [triggerDropdown]
  68079. * @param {function} [callback]
  68080. * @return {boolean}
  68081. */
  68082. createItem: function(input, triggerDropdown) {
  68083. var self = this;
  68084. var caret = self.caretPos;
  68085. input = input || $.trim(self.$control_input.val() || '');
  68086. var callback = arguments[arguments.length - 1];
  68087. if (typeof callback !== 'function') callback = function() {};
  68088. if (typeof triggerDropdown !== 'boolean') {
  68089. triggerDropdown = true;
  68090. }
  68091. if (!self.canCreate(input)) {
  68092. callback();
  68093. return false;
  68094. }
  68095. self.lock();
  68096. var setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) {
  68097. var data = {};
  68098. data[self.settings.labelField] = input;
  68099. data[self.settings.valueField] = input;
  68100. return data;
  68101. };
  68102. var create = once(function(data) {
  68103. self.unlock();
  68104. if (!data || typeof data !== 'object') return callback();
  68105. var value = hash_key(data[self.settings.valueField]);
  68106. if (typeof value !== 'string') return callback();
  68107. self.setTextboxValue('');
  68108. self.addOption(data);
  68109. self.setCaret(caret);
  68110. self.addItem(value);
  68111. self.refreshOptions(triggerDropdown && self.settings.mode !== 'single');
  68112. callback(data);
  68113. });
  68114. var output = setup.apply(this, [input, create]);
  68115. if (typeof output !== 'undefined') {
  68116. create(output);
  68117. }
  68118. return true;
  68119. },
  68120. /**
  68121. * Re-renders the selected item lists.
  68122. */
  68123. refreshItems: function() {
  68124. this.lastQuery = null;
  68125. if (this.isSetup) {
  68126. this.addItem(this.items);
  68127. }
  68128. this.refreshState();
  68129. this.updateOriginalInput();
  68130. },
  68131. /**
  68132. * Updates all state-dependent attributes
  68133. * and CSS classes.
  68134. */
  68135. refreshState: function() {
  68136. this.refreshValidityState();
  68137. this.refreshClasses();
  68138. },
  68139. /**
  68140. * Update the `required` attribute of both input and control input.
  68141. *
  68142. * The `required` property needs to be activated on the control input
  68143. * for the error to be displayed at the right place. `required` also
  68144. * needs to be temporarily deactivated on the input since the input is
  68145. * hidden and can't show errors.
  68146. */
  68147. refreshValidityState: function() {
  68148. if (!this.isRequired) return false;
  68149. var invalid = !this.items.length;
  68150. this.isInvalid = invalid;
  68151. this.$control_input.prop('required', invalid);
  68152. this.$input.prop('required', !invalid);
  68153. },
  68154. /**
  68155. * Updates all state-dependent CSS classes.
  68156. */
  68157. refreshClasses: function() {
  68158. var self = this;
  68159. var isFull = self.isFull();
  68160. var isLocked = self.isLocked;
  68161. self.$wrapper
  68162. .toggleClass('rtl', self.rtl);
  68163. self.$control
  68164. .toggleClass('focus', self.isFocused)
  68165. .toggleClass('disabled', self.isDisabled)
  68166. .toggleClass('required', self.isRequired)
  68167. .toggleClass('invalid', self.isInvalid)
  68168. .toggleClass('locked', isLocked)
  68169. .toggleClass('full', isFull).toggleClass('not-full', !isFull)
  68170. .toggleClass('input-active', self.isFocused && !self.isInputHidden)
  68171. .toggleClass('dropdown-active', self.isOpen)
  68172. .toggleClass('has-options', !$.isEmptyObject(self.options))
  68173. .toggleClass('has-items', self.items.length > 0);
  68174. self.$control_input.data('grow', !isFull && !isLocked);
  68175. },
  68176. /**
  68177. * Determines whether or not more items can be added
  68178. * to the control without exceeding the user-defined maximum.
  68179. *
  68180. * @returns {boolean}
  68181. */
  68182. isFull: function() {
  68183. return this.settings.maxItems !== null && this.items.length >= this.settings.maxItems;
  68184. },
  68185. /**
  68186. * Refreshes the original <select> or <input>
  68187. * element to reflect the current state.
  68188. */
  68189. updateOriginalInput: function(opts) {
  68190. var i, n, options, label, self = this;
  68191. opts = opts || {};
  68192. if (self.tagType === TAG_SELECT) {
  68193. options = [];
  68194. for (i = 0, n = self.items.length; i < n; i++) {
  68195. label = self.options[self.items[i]][self.settings.labelField] || '';
  68196. options.push('<option value="' + escape_html(self.items[i]) + '" selected="selected">' + escape_html(label) + '</option>');
  68197. }
  68198. if (!options.length && !this.$input.attr('multiple')) {
  68199. options.push('<option value="" selected="selected"></option>');
  68200. }
  68201. self.$input.html(options.join(''));
  68202. } else {
  68203. self.$input.val(self.getValue());
  68204. self.$input.attr('value',self.$input.val());
  68205. }
  68206. if (self.isSetup) {
  68207. if (!opts.silent) {
  68208. self.trigger('change', self.$input.val());
  68209. }
  68210. }
  68211. },
  68212. /**
  68213. * Shows/hide the input placeholder depending
  68214. * on if there items in the list already.
  68215. */
  68216. updatePlaceholder: function() {
  68217. if (!this.settings.placeholder) return;
  68218. var $input = this.$control_input;
  68219. if (this.items.length) {
  68220. $input.removeAttr('placeholder');
  68221. } else {
  68222. $input.attr('placeholder', this.settings.placeholder);
  68223. }
  68224. $input.triggerHandler('update', {force: true});
  68225. },
  68226. /**
  68227. * Shows the autocomplete dropdown containing
  68228. * the available options.
  68229. */
  68230. open: function() {
  68231. var self = this;
  68232. if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
  68233. self.focus();
  68234. self.isOpen = true;
  68235. self.refreshState();
  68236. self.$dropdown.css({visibility: 'hidden', display: 'block'});
  68237. self.positionDropdown();
  68238. self.$dropdown.css({visibility: 'visible'});
  68239. self.trigger('dropdown_open', self.$dropdown);
  68240. },
  68241. /**
  68242. * Closes the autocomplete dropdown menu.
  68243. */
  68244. close: function() {
  68245. var self = this;
  68246. var trigger = self.isOpen;
  68247. if (self.settings.mode === 'single' && self.items.length) {
  68248. self.hideInput();
  68249. // Do not trigger blur while inside a blur event,
  68250. // this fixes some weird tabbing behavior in FF and IE.
  68251. // See #1164
  68252. if (!self.isBlurring) {
  68253. self.$control_input.blur(); // close keyboard on iOS
  68254. }
  68255. }
  68256. self.isOpen = false;
  68257. self.$dropdown.hide();
  68258. self.setActiveOption(null);
  68259. self.refreshState();
  68260. if (trigger) self.trigger('dropdown_close', self.$dropdown);
  68261. },
  68262. /**
  68263. * Calculates and applies the appropriate
  68264. * position of the dropdown.
  68265. */
  68266. positionDropdown: function() {
  68267. var $control = this.$control;
  68268. var offset = this.settings.dropdownParent === 'body' ? $control.offset() : $control.position();
  68269. offset.top += $control.outerHeight(true);
  68270. this.$dropdown.css({
  68271. width : $control[0].getBoundingClientRect().width,
  68272. top : offset.top,
  68273. left : offset.left
  68274. });
  68275. },
  68276. /**
  68277. * Resets / clears all selected items
  68278. * from the control.
  68279. *
  68280. * @param {boolean} silent
  68281. */
  68282. clear: function(silent) {
  68283. var self = this;
  68284. if (!self.items.length) return;
  68285. self.$control.children(':not(input)').remove();
  68286. self.items = [];
  68287. self.lastQuery = null;
  68288. self.setCaret(0);
  68289. self.setActiveItem(null);
  68290. self.updatePlaceholder();
  68291. self.updateOriginalInput({silent: silent});
  68292. self.refreshState();
  68293. self.showInput();
  68294. self.trigger('clear');
  68295. },
  68296. /**
  68297. * A helper method for inserting an element
  68298. * at the current caret position.
  68299. *
  68300. * @param {object} $el
  68301. */
  68302. insertAtCaret: function($el) {
  68303. var caret = Math.min(this.caretPos, this.items.length);
  68304. var el = $el[0];
  68305. var target = this.buffer || this.$control[0];
  68306. if (caret === 0) {
  68307. target.insertBefore(el, target.firstChild);
  68308. } else {
  68309. target.insertBefore(el, target.childNodes[caret]);
  68310. }
  68311. this.setCaret(caret + 1);
  68312. },
  68313. /**
  68314. * Removes the current selected item(s).
  68315. *
  68316. * @param {object} e (optional)
  68317. * @returns {boolean}
  68318. */
  68319. deleteSelection: function(e) {
  68320. var i, n, direction, selection, values, caret, option_select, $option_select, $tail;
  68321. var self = this;
  68322. direction = (e && e.keyCode === KEY_BACKSPACE) ? -1 : 1;
  68323. selection = getSelection(self.$control_input[0]);
  68324. if (self.$activeOption && !self.settings.hideSelected) {
  68325. option_select = self.getAdjacentOption(self.$activeOption, -1).attr('data-value');
  68326. }
  68327. // determine items that will be removed
  68328. values = [];
  68329. if (self.$activeItems.length) {
  68330. $tail = self.$control.children('.active:' + (direction > 0 ? 'last' : 'first'));
  68331. caret = self.$control.children(':not(input)').index($tail);
  68332. if (direction > 0) { caret++; }
  68333. for (i = 0, n = self.$activeItems.length; i < n; i++) {
  68334. values.push($(self.$activeItems[i]).attr('data-value'));
  68335. }
  68336. if (e) {
  68337. e.preventDefault();
  68338. e.stopPropagation();
  68339. }
  68340. } else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
  68341. if (direction < 0 && selection.start === 0 && selection.length === 0) {
  68342. values.push(self.items[self.caretPos - 1]);
  68343. } else if (direction > 0 && selection.start === self.$control_input.val().length) {
  68344. values.push(self.items[self.caretPos]);
  68345. }
  68346. }
  68347. // allow the callback to abort
  68348. if (!values.length || (typeof self.settings.onDelete === 'function' && self.settings.onDelete.apply(self, [values]) === false)) {
  68349. return false;
  68350. }
  68351. // perform removal
  68352. if (typeof caret !== 'undefined') {
  68353. self.setCaret(caret);
  68354. }
  68355. while (values.length) {
  68356. self.removeItem(values.pop());
  68357. }
  68358. self.showInput();
  68359. self.positionDropdown();
  68360. self.refreshOptions(true);
  68361. // select previous option
  68362. if (option_select) {
  68363. $option_select = self.getOption(option_select);
  68364. if ($option_select.length) {
  68365. self.setActiveOption($option_select);
  68366. }
  68367. }
  68368. return true;
  68369. },
  68370. /**
  68371. * Selects the previous / next item (depending
  68372. * on the `direction` argument).
  68373. *
  68374. * > 0 - right
  68375. * < 0 - left
  68376. *
  68377. * @param {int} direction
  68378. * @param {object} e (optional)
  68379. */
  68380. advanceSelection: function(direction, e) {
  68381. var tail, selection, idx, valueLength, cursorAtEdge, $tail;
  68382. var self = this;
  68383. if (direction === 0) return;
  68384. if (self.rtl) direction *= -1;
  68385. tail = direction > 0 ? 'last' : 'first';
  68386. selection = getSelection(self.$control_input[0]);
  68387. if (self.isFocused && !self.isInputHidden) {
  68388. valueLength = self.$control_input.val().length;
  68389. cursorAtEdge = direction < 0
  68390. ? selection.start === 0 && selection.length === 0
  68391. : selection.start === valueLength;
  68392. if (cursorAtEdge && !valueLength) {
  68393. self.advanceCaret(direction, e);
  68394. }
  68395. } else {
  68396. $tail = self.$control.children('.active:' + tail);
  68397. if ($tail.length) {
  68398. idx = self.$control.children(':not(input)').index($tail);
  68399. self.setActiveItem(null);
  68400. self.setCaret(direction > 0 ? idx + 1 : idx);
  68401. }
  68402. }
  68403. },
  68404. /**
  68405. * Moves the caret left / right.
  68406. *
  68407. * @param {int} direction
  68408. * @param {object} e (optional)
  68409. */
  68410. advanceCaret: function(direction, e) {
  68411. var self = this, fn, $adj;
  68412. if (direction === 0) return;
  68413. fn = direction > 0 ? 'next' : 'prev';
  68414. if (self.isShiftDown) {
  68415. $adj = self.$control_input[fn]();
  68416. if ($adj.length) {
  68417. self.hideInput();
  68418. self.setActiveItem($adj);
  68419. e && e.preventDefault();
  68420. }
  68421. } else {
  68422. self.setCaret(self.caretPos + direction);
  68423. }
  68424. },
  68425. /**
  68426. * Moves the caret to the specified index.
  68427. *
  68428. * @param {int} i
  68429. */
  68430. setCaret: function(i) {
  68431. var self = this;
  68432. if (self.settings.mode === 'single') {
  68433. i = self.items.length;
  68434. } else {
  68435. i = Math.max(0, Math.min(self.items.length, i));
  68436. }
  68437. if(!self.isPending) {
  68438. // the input must be moved by leaving it in place and moving the
  68439. // siblings, due to the fact that focus cannot be restored once lost
  68440. // on mobile webkit devices
  68441. var j, n, fn, $children, $child;
  68442. $children = self.$control.children(':not(input)');
  68443. for (j = 0, n = $children.length; j < n; j++) {
  68444. $child = $($children[j]).detach();
  68445. if (j < i) {
  68446. self.$control_input.before($child);
  68447. } else {
  68448. self.$control.append($child);
  68449. }
  68450. }
  68451. }
  68452. self.caretPos = i;
  68453. },
  68454. /**
  68455. * Disables user input on the control. Used while
  68456. * items are being asynchronously created.
  68457. */
  68458. lock: function() {
  68459. this.close();
  68460. this.isLocked = true;
  68461. this.refreshState();
  68462. },
  68463. /**
  68464. * Re-enables user input on the control.
  68465. */
  68466. unlock: function() {
  68467. this.isLocked = false;
  68468. this.refreshState();
  68469. },
  68470. /**
  68471. * Disables user input on the control completely.
  68472. * While disabled, it cannot receive focus.
  68473. */
  68474. disable: function() {
  68475. var self = this;
  68476. self.$input.prop('disabled', true);
  68477. self.$control_input.prop('disabled', true).prop('tabindex', -1);
  68478. self.isDisabled = true;
  68479. self.lock();
  68480. },
  68481. /**
  68482. * Enables the control so that it can respond
  68483. * to focus and user input.
  68484. */
  68485. enable: function() {
  68486. var self = this;
  68487. self.$input.prop('disabled', false);
  68488. self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
  68489. self.isDisabled = false;
  68490. self.unlock();
  68491. },
  68492. /**
  68493. * Completely destroys the control and
  68494. * unbinds all event listeners so that it can
  68495. * be garbage collected.
  68496. */
  68497. destroy: function() {
  68498. var self = this;
  68499. var eventNS = self.eventNS;
  68500. var revertSettings = self.revertSettings;
  68501. self.trigger('destroy');
  68502. self.off();
  68503. self.$wrapper.remove();
  68504. self.$dropdown.remove();
  68505. self.$input
  68506. .html('')
  68507. .append(revertSettings.$children)
  68508. .removeAttr('tabindex')
  68509. .removeClass('selectized')
  68510. .attr({tabindex: revertSettings.tabindex})
  68511. .show();
  68512. self.$control_input.removeData('grow');
  68513. self.$input.removeData('selectize');
  68514. if (--Selectize.count == 0 && Selectize.$testInput) {
  68515. Selectize.$testInput.remove();
  68516. Selectize.$testInput = undefined;
  68517. }
  68518. $(window).off(eventNS);
  68519. $(document).off(eventNS);
  68520. $(document.body).off(eventNS);
  68521. delete self.$input[0].selectize;
  68522. },
  68523. /**
  68524. * A helper method for rendering "item" and
  68525. * "option" templates, given the data.
  68526. *
  68527. * @param {string} templateName
  68528. * @param {object} data
  68529. * @returns {string}
  68530. */
  68531. render: function(templateName, data) {
  68532. var value, id, label;
  68533. var html = '';
  68534. var cache = false;
  68535. var self = this;
  68536. var regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
  68537. if (templateName === 'option' || templateName === 'item') {
  68538. value = hash_key(data[self.settings.valueField]);
  68539. cache = !!value;
  68540. }
  68541. // pull markup from cache if it exists
  68542. if (cache) {
  68543. if (!isset(self.renderCache[templateName])) {
  68544. self.renderCache[templateName] = {};
  68545. }
  68546. if (self.renderCache[templateName].hasOwnProperty(value)) {
  68547. return self.renderCache[templateName][value];
  68548. }
  68549. }
  68550. // render markup
  68551. html = $(self.settings.render[templateName].apply(this, [data, escape_html]));
  68552. // add mandatory attributes
  68553. if (templateName === 'option' || templateName === 'option_create') {
  68554. if (!data[self.settings.disabledField]) {
  68555. html.attr('data-selectable', '');
  68556. }
  68557. }
  68558. else if (templateName === 'optgroup') {
  68559. id = data[self.settings.optgroupValueField] || '';
  68560. html.attr('data-group', id);
  68561. if(data[self.settings.disabledField]) {
  68562. html.attr('data-disabled', '');
  68563. }
  68564. }
  68565. if (templateName === 'option' || templateName === 'item') {
  68566. html.attr('data-value', value || '');
  68567. }
  68568. // update cache
  68569. if (cache) {
  68570. self.renderCache[templateName][value] = html[0];
  68571. }
  68572. return html[0];
  68573. },
  68574. /**
  68575. * Clears the render cache for a template. If
  68576. * no template is given, clears all render
  68577. * caches.
  68578. *
  68579. * @param {string} templateName
  68580. */
  68581. clearCache: function(templateName) {
  68582. var self = this;
  68583. if (typeof templateName === 'undefined') {
  68584. self.renderCache = {};
  68585. } else {
  68586. delete self.renderCache[templateName];
  68587. }
  68588. },
  68589. /**
  68590. * Determines whether or not to display the
  68591. * create item prompt, given a user input.
  68592. *
  68593. * @param {string} input
  68594. * @return {boolean}
  68595. */
  68596. canCreate: function(input) {
  68597. var self = this;
  68598. if (!self.settings.create) return false;
  68599. var filter = self.settings.createFilter;
  68600. return input.length
  68601. && (typeof filter !== 'function' || filter.apply(self, [input]))
  68602. && (typeof filter !== 'string' || new RegExp(filter).test(input))
  68603. && (!(filter instanceof RegExp) || filter.test(input));
  68604. }
  68605. });
  68606. Selectize.count = 0;
  68607. Selectize.defaults = {
  68608. options: [],
  68609. optgroups: [],
  68610. plugins: [],
  68611. delimiter: ',',
  68612. splitOn: null, // regexp or string for splitting up values from a paste command
  68613. persist: true,
  68614. diacritics: true,
  68615. create: false,
  68616. createOnBlur: false,
  68617. createFilter: null,
  68618. highlight: true,
  68619. openOnFocus: true,
  68620. maxOptions: 1000,
  68621. maxItems: null,
  68622. hideSelected: null,
  68623. addPrecedence: false,
  68624. selectOnTab: false,
  68625. preload: false,
  68626. allowEmptyOption: false,
  68627. closeAfterSelect: false,
  68628. scrollDuration: 60,
  68629. loadThrottle: 300,
  68630. loadingClass: 'loading',
  68631. dataAttr: 'data-data',
  68632. optgroupField: 'optgroup',
  68633. valueField: 'value',
  68634. labelField: 'text',
  68635. disabledField: 'disabled',
  68636. optgroupLabelField: 'label',
  68637. optgroupValueField: 'value',
  68638. lockOptgroupOrder: false,
  68639. sortField: '$order',
  68640. searchField: ['text'],
  68641. searchConjunction: 'and',
  68642. mode: null,
  68643. wrapperClass: 'selectize-control',
  68644. inputClass: 'selectize-input',
  68645. dropdownClass: 'selectize-dropdown',
  68646. dropdownContentClass: 'selectize-dropdown-content',
  68647. dropdownParent: null,
  68648. copyClassesToDropdown: true,
  68649. /*
  68650. load : null, // function(query, callback) { ... }
  68651. score : null, // function(search) { ... }
  68652. onInitialize : null, // function() { ... }
  68653. onChange : null, // function(value) { ... }
  68654. onItemAdd : null, // function(value, $item) { ... }
  68655. onItemRemove : null, // function(value) { ... }
  68656. onClear : null, // function() { ... }
  68657. onOptionAdd : null, // function(value, data) { ... }
  68658. onOptionRemove : null, // function(value) { ... }
  68659. onOptionClear : null, // function() { ... }
  68660. onOptionGroupAdd : null, // function(id, data) { ... }
  68661. onOptionGroupRemove : null, // function(id) { ... }
  68662. onOptionGroupClear : null, // function() { ... }
  68663. onDropdownOpen : null, // function($dropdown) { ... }
  68664. onDropdownClose : null, // function($dropdown) { ... }
  68665. onType : null, // function(str) { ... }
  68666. onDelete : null, // function(values) { ... }
  68667. */
  68668. render: {
  68669. /*
  68670. item: null,
  68671. optgroup: null,
  68672. optgroup_header: null,
  68673. option: null,
  68674. option_create: null
  68675. */
  68676. }
  68677. };
  68678. $.fn.selectize = function(settings_user) {
  68679. var defaults = $.fn.selectize.defaults;
  68680. var settings = $.extend({}, defaults, settings_user);
  68681. var attr_data = settings.dataAttr;
  68682. var field_label = settings.labelField;
  68683. var field_value = settings.valueField;
  68684. var field_disabled = settings.disabledField;
  68685. var field_optgroup = settings.optgroupField;
  68686. var field_optgroup_label = settings.optgroupLabelField;
  68687. var field_optgroup_value = settings.optgroupValueField;
  68688. /**
  68689. * Initializes selectize from a <input type="text"> element.
  68690. *
  68691. * @param {object} $input
  68692. * @param {object} settings_element
  68693. */
  68694. var init_textbox = function($input, settings_element) {
  68695. var i, n, values, option;
  68696. var data_raw = $input.attr(attr_data);
  68697. if (!data_raw) {
  68698. var value = $.trim($input.val() || '');
  68699. if (!settings.allowEmptyOption && !value.length) return;
  68700. values = value.split(settings.delimiter);
  68701. for (i = 0, n = values.length; i < n; i++) {
  68702. option = {};
  68703. option[field_label] = values[i];
  68704. option[field_value] = values[i];
  68705. settings_element.options.push(option);
  68706. }
  68707. settings_element.items = values;
  68708. } else {
  68709. settings_element.options = JSON.parse(data_raw);
  68710. for (i = 0, n = settings_element.options.length; i < n; i++) {
  68711. settings_element.items.push(settings_element.options[i][field_value]);
  68712. }
  68713. }
  68714. };
  68715. /**
  68716. * Initializes selectize from a <select> element.
  68717. *
  68718. * @param {object} $input
  68719. * @param {object} settings_element
  68720. */
  68721. var init_select = function($input, settings_element) {
  68722. var i, n, tagName, $children, order = 0;
  68723. var options = settings_element.options;
  68724. var optionsMap = {};
  68725. var readData = function($el) {
  68726. var data = attr_data && $el.attr(attr_data);
  68727. if (typeof data === 'string' && data.length) {
  68728. return JSON.parse(data);
  68729. }
  68730. return null;
  68731. };
  68732. var addOption = function($option, group) {
  68733. $option = $($option);
  68734. var value = hash_key($option.val());
  68735. if (!value && !settings.allowEmptyOption) return;
  68736. // if the option already exists, it's probably been
  68737. // duplicated in another optgroup. in this case, push
  68738. // the current group to the "optgroup" property on the
  68739. // existing option so that it's rendered in both places.
  68740. if (optionsMap.hasOwnProperty(value)) {
  68741. if (group) {
  68742. var arr = optionsMap[value][field_optgroup];
  68743. if (!arr) {
  68744. optionsMap[value][field_optgroup] = group;
  68745. } else if (!$.isArray(arr)) {
  68746. optionsMap[value][field_optgroup] = [arr, group];
  68747. } else {
  68748. arr.push(group);
  68749. }
  68750. }
  68751. return;
  68752. }
  68753. var option = readData($option) || {};
  68754. option[field_label] = option[field_label] || $option.text();
  68755. option[field_value] = option[field_value] || value;
  68756. option[field_disabled] = option[field_disabled] || $option.prop('disabled');
  68757. option[field_optgroup] = option[field_optgroup] || group;
  68758. optionsMap[value] = option;
  68759. options.push(option);
  68760. if ($option.is(':selected')) {
  68761. settings_element.items.push(value);
  68762. }
  68763. };
  68764. var addGroup = function($optgroup) {
  68765. var i, n, id, optgroup, $options;
  68766. $optgroup = $($optgroup);
  68767. id = $optgroup.attr('label');
  68768. if (id) {
  68769. optgroup = readData($optgroup) || {};
  68770. optgroup[field_optgroup_label] = id;
  68771. optgroup[field_optgroup_value] = id;
  68772. optgroup[field_disabled] = $optgroup.prop('disabled');
  68773. settings_element.optgroups.push(optgroup);
  68774. }
  68775. $options = $('option', $optgroup);
  68776. for (i = 0, n = $options.length; i < n; i++) {
  68777. addOption($options[i], id);
  68778. }
  68779. };
  68780. settings_element.maxItems = $input.attr('multiple') ? null : 1;
  68781. $children = $input.children();
  68782. for (i = 0, n = $children.length; i < n; i++) {
  68783. tagName = $children[i].tagName.toLowerCase();
  68784. if (tagName === 'optgroup') {
  68785. addGroup($children[i]);
  68786. } else if (tagName === 'option') {
  68787. addOption($children[i]);
  68788. }
  68789. }
  68790. };
  68791. return this.each(function() {
  68792. if (this.selectize) return;
  68793. var instance;
  68794. var $input = $(this);
  68795. var tag_name = this.tagName.toLowerCase();
  68796. var placeholder = $input.attr('placeholder') || $input.attr('data-placeholder');
  68797. if (!placeholder && !settings.allowEmptyOption) {
  68798. placeholder = $input.children('option[value=""]').text();
  68799. }
  68800. var settings_element = {
  68801. 'placeholder' : placeholder,
  68802. 'options' : [],
  68803. 'optgroups' : [],
  68804. 'items' : []
  68805. };
  68806. if (tag_name === 'select') {
  68807. init_select($input, settings_element);
  68808. } else {
  68809. init_textbox($input, settings_element);
  68810. }
  68811. instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
  68812. });
  68813. };
  68814. $.fn.selectize.defaults = Selectize.defaults;
  68815. $.fn.selectize.support = {
  68816. validity: SUPPORTS_VALIDITY_API
  68817. };
  68818. Selectize.define('drag_drop', function(options) {
  68819. if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');
  68820. if (this.settings.mode !== 'multi') return;
  68821. var self = this;
  68822. self.lock = (function() {
  68823. var original = self.lock;
  68824. return function() {
  68825. var sortable = self.$control.data('sortable');
  68826. if (sortable) sortable.disable();
  68827. return original.apply(self, arguments);
  68828. };
  68829. })();
  68830. self.unlock = (function() {
  68831. var original = self.unlock;
  68832. return function() {
  68833. var sortable = self.$control.data('sortable');
  68834. if (sortable) sortable.enable();
  68835. return original.apply(self, arguments);
  68836. };
  68837. })();
  68838. self.setup = (function() {
  68839. var original = self.setup;
  68840. return function() {
  68841. original.apply(this, arguments);
  68842. var $control = self.$control.sortable({
  68843. items: '[data-value]',
  68844. forcePlaceholderSize: true,
  68845. disabled: self.isLocked,
  68846. start: function(e, ui) {
  68847. ui.placeholder.css('width', ui.helper.css('width'));
  68848. $control.css({overflow: 'visible'});
  68849. },
  68850. stop: function() {
  68851. $control.css({overflow: 'hidden'});
  68852. var active = self.$activeItems ? self.$activeItems.slice() : null;
  68853. var values = [];
  68854. $control.children('[data-value]').each(function() {
  68855. values.push($(this).attr('data-value'));
  68856. });
  68857. self.setValue(values);
  68858. self.setActiveItem(active);
  68859. }
  68860. });
  68861. };
  68862. })();
  68863. });
  68864. Selectize.define('dropdown_header', function(options) {
  68865. var self = this;
  68866. options = $.extend({
  68867. title : 'Untitled',
  68868. headerClass : 'selectize-dropdown-header',
  68869. titleRowClass : 'selectize-dropdown-header-title',
  68870. labelClass : 'selectize-dropdown-header-label',
  68871. closeClass : 'selectize-dropdown-header-close',
  68872. html: function(data) {
  68873. return (
  68874. '<div class="' + data.headerClass + '">' +
  68875. '<div class="' + data.titleRowClass + '">' +
  68876. '<span class="' + data.labelClass + '">' + data.title + '</span>' +
  68877. '<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
  68878. '</div>' +
  68879. '</div>'
  68880. );
  68881. }
  68882. }, options);
  68883. self.setup = (function() {
  68884. var original = self.setup;
  68885. return function() {
  68886. original.apply(self, arguments);
  68887. self.$dropdown_header = $(options.html(options));
  68888. self.$dropdown.prepend(self.$dropdown_header);
  68889. };
  68890. })();
  68891. });
  68892. Selectize.define('optgroup_columns', function(options) {
  68893. var self = this;
  68894. options = $.extend({
  68895. equalizeWidth : true,
  68896. equalizeHeight : true
  68897. }, options);
  68898. this.getAdjacentOption = function($option, direction) {
  68899. var $options = $option.closest('[data-group]').find('[data-selectable]');
  68900. var index = $options.index($option) + direction;
  68901. return index >= 0 && index < $options.length ? $options.eq(index) : $();
  68902. };
  68903. this.onKeyDown = (function() {
  68904. var original = self.onKeyDown;
  68905. return function(e) {
  68906. var index, $option, $options, $optgroup;
  68907. if (this.isOpen && (e.keyCode === KEY_LEFT || e.keyCode === KEY_RIGHT)) {
  68908. self.ignoreHover = true;
  68909. $optgroup = this.$activeOption.closest('[data-group]');
  68910. index = $optgroup.find('[data-selectable]').index(this.$activeOption);
  68911. if(e.keyCode === KEY_LEFT) {
  68912. $optgroup = $optgroup.prev('[data-group]');
  68913. } else {
  68914. $optgroup = $optgroup.next('[data-group]');
  68915. }
  68916. $options = $optgroup.find('[data-selectable]');
  68917. $option = $options.eq(Math.min($options.length - 1, index));
  68918. if ($option.length) {
  68919. this.setActiveOption($option);
  68920. }
  68921. return;
  68922. }
  68923. return original.apply(this, arguments);
  68924. };
  68925. })();
  68926. var getScrollbarWidth = function() {
  68927. var div;
  68928. var width = getScrollbarWidth.width;
  68929. var doc = document;
  68930. if (typeof width === 'undefined') {
  68931. div = doc.createElement('div');
  68932. div.innerHTML = '<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';
  68933. div = div.firstChild;
  68934. doc.body.appendChild(div);
  68935. width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth;
  68936. doc.body.removeChild(div);
  68937. }
  68938. return width;
  68939. };
  68940. var equalizeSizes = function() {
  68941. var i, n, height_max, width, width_last, width_parent, $optgroups;
  68942. $optgroups = $('[data-group]', self.$dropdown_content);
  68943. n = $optgroups.length;
  68944. if (!n || !self.$dropdown_content.width()) return;
  68945. if (options.equalizeHeight) {
  68946. height_max = 0;
  68947. for (i = 0; i < n; i++) {
  68948. height_max = Math.max(height_max, $optgroups.eq(i).height());
  68949. }
  68950. $optgroups.css({height: height_max});
  68951. }
  68952. if (options.equalizeWidth) {
  68953. width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth();
  68954. width = Math.round(width_parent / n);
  68955. $optgroups.css({width: width});
  68956. if (n > 1) {
  68957. width_last = width_parent - width * (n - 1);
  68958. $optgroups.eq(n - 1).css({width: width_last});
  68959. }
  68960. }
  68961. };
  68962. if (options.equalizeHeight || options.equalizeWidth) {
  68963. hook.after(this, 'positionDropdown', equalizeSizes);
  68964. hook.after(this, 'refreshOptions', equalizeSizes);
  68965. }
  68966. });
  68967. Selectize.define('remove_button', function(options) {
  68968. options = $.extend({
  68969. label : '&times;',
  68970. title : 'Remove',
  68971. className : 'remove',
  68972. append : true
  68973. }, options);
  68974. var singleClose = function(thisRef, options) {
  68975. options.className = 'remove-single';
  68976. var self = thisRef;
  68977. var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
  68978. /**
  68979. * Appends an element as a child (with raw HTML).
  68980. *
  68981. * @param {string} html_container
  68982. * @param {string} html_element
  68983. * @return {string}
  68984. */
  68985. var append = function(html_container, html_element) {
  68986. return $('<span>').append(html_container)
  68987. .append(html_element);
  68988. };
  68989. thisRef.setup = (function() {
  68990. var original = self.setup;
  68991. return function() {
  68992. // override the item rendering method to add the button to each
  68993. if (options.append) {
  68994. var id = $(self.$input.context).attr('id');
  68995. var selectizer = $('#'+id);
  68996. var render_item = self.settings.render.item;
  68997. self.settings.render.item = function(data) {
  68998. return append(render_item.apply(thisRef, arguments), html);
  68999. };
  69000. }
  69001. original.apply(thisRef, arguments);
  69002. // add event listener
  69003. thisRef.$control.on('click', '.' + options.className, function(e) {
  69004. e.preventDefault();
  69005. if (self.isLocked) return;
  69006. self.clear();
  69007. });
  69008. };
  69009. })();
  69010. };
  69011. var multiClose = function(thisRef, options) {
  69012. var self = thisRef;
  69013. var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
  69014. /**
  69015. * Appends an element as a child (with raw HTML).
  69016. *
  69017. * @param {string} html_container
  69018. * @param {string} html_element
  69019. * @return {string}
  69020. */
  69021. var append = function(html_container, html_element) {
  69022. var pos = html_container.search(/(<\/[^>]+>\s*)$/);
  69023. return html_container.substring(0, pos) + html_element + html_container.substring(pos);
  69024. };
  69025. thisRef.setup = (function() {
  69026. var original = self.setup;
  69027. return function() {
  69028. // override the item rendering method to add the button to each
  69029. if (options.append) {
  69030. var render_item = self.settings.render.item;
  69031. self.settings.render.item = function(data) {
  69032. return append(render_item.apply(thisRef, arguments), html);
  69033. };
  69034. }
  69035. original.apply(thisRef, arguments);
  69036. // add event listener
  69037. thisRef.$control.on('click', '.' + options.className, function(e) {
  69038. e.preventDefault();
  69039. if (self.isLocked) return;
  69040. var $item = $(e.currentTarget).parent();
  69041. self.setActiveItem($item);
  69042. if (self.deleteSelection()) {
  69043. self.setCaret(self.items.length);
  69044. }
  69045. });
  69046. };
  69047. })();
  69048. };
  69049. if (this.settings.mode === 'single') {
  69050. singleClose(this, options);
  69051. return;
  69052. } else {
  69053. multiClose(this, options);
  69054. }
  69055. });
  69056. Selectize.define('restore_on_backspace', function(options) {
  69057. var self = this;
  69058. options.text = options.text || function(option) {
  69059. return option[this.settings.labelField];
  69060. };
  69061. this.onKeyDown = (function() {
  69062. var original = self.onKeyDown;
  69063. return function(e) {
  69064. var index, option;
  69065. if (e.keyCode === KEY_BACKSPACE && this.$control_input.val() === '' && !this.$activeItems.length) {
  69066. index = this.caretPos - 1;
  69067. if (index >= 0 && index < this.items.length) {
  69068. option = this.options[this.items[index]];
  69069. if (this.deleteSelection(e)) {
  69070. this.setTextboxValue(options.text.apply(this, [option]));
  69071. this.refreshOptions(true);
  69072. }
  69073. e.preventDefault();
  69074. return;
  69075. }
  69076. }
  69077. return original.apply(this, arguments);
  69078. };
  69079. })();
  69080. });
  69081. return Selectize;
  69082. }));
  69083. /***/ }),
  69084. /***/ 55069:
  69085. /***/ (function(module, exports, __webpack_require__) {
  69086. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  69087. * sifter.js
  69088. * Copyright (c) 2013 Brian Reavis & contributors
  69089. *
  69090. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  69091. * file except in compliance with the License. You may obtain a copy of the License at:
  69092. * http://www.apache.org/licenses/LICENSE-2.0
  69093. *
  69094. * Unless required by applicable law or agreed to in writing, software distributed under
  69095. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  69096. * ANY KIND, either express or implied. See the License for the specific language
  69097. * governing permissions and limitations under the License.
  69098. *
  69099. * @author Brian Reavis <brian@thirdroute.com>
  69100. */
  69101. (function(root, factory) {
  69102. if (true) {
  69103. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  69104. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  69105. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  69106. __WEBPACK_AMD_DEFINE_FACTORY__),
  69107. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  69108. } else {}
  69109. }(this, function() {
  69110. /**
  69111. * Textually searches arrays and hashes of objects
  69112. * by property (or multiple properties). Designed
  69113. * specifically for autocomplete.
  69114. *
  69115. * @constructor
  69116. * @param {array|object} items
  69117. * @param {object} items
  69118. */
  69119. var Sifter = function(items, settings) {
  69120. this.items = items;
  69121. this.settings = settings || {diacritics: true};
  69122. };
  69123. /**
  69124. * Splits a search string into an array of individual
  69125. * regexps to be used to match results.
  69126. *
  69127. * @param {string} query
  69128. * @returns {array}
  69129. */
  69130. Sifter.prototype.tokenize = function(query) {
  69131. query = trim(String(query || '').toLowerCase());
  69132. if (!query || !query.length) return [];
  69133. var i, n, regex, letter;
  69134. var tokens = [];
  69135. var words = query.split(/ +/);
  69136. for (i = 0, n = words.length; i < n; i++) {
  69137. regex = escape_regex(words[i]);
  69138. if (this.settings.diacritics) {
  69139. for (letter in DIACRITICS) {
  69140. if (DIACRITICS.hasOwnProperty(letter)) {
  69141. regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);
  69142. }
  69143. }
  69144. }
  69145. tokens.push({
  69146. string : words[i],
  69147. regex : new RegExp(regex, 'i')
  69148. });
  69149. }
  69150. return tokens;
  69151. };
  69152. /**
  69153. * Iterates over arrays and hashes.
  69154. *
  69155. * ```
  69156. * this.iterator(this.items, function(item, id) {
  69157. * // invoked for each item
  69158. * });
  69159. * ```
  69160. *
  69161. * @param {array|object} object
  69162. */
  69163. Sifter.prototype.iterator = function(object, callback) {
  69164. var iterator;
  69165. if (is_array(object)) {
  69166. iterator = Array.prototype.forEach || function(callback) {
  69167. for (var i = 0, n = this.length; i < n; i++) {
  69168. callback(this[i], i, this);
  69169. }
  69170. };
  69171. } else {
  69172. iterator = function(callback) {
  69173. for (var key in this) {
  69174. if (this.hasOwnProperty(key)) {
  69175. callback(this[key], key, this);
  69176. }
  69177. }
  69178. };
  69179. }
  69180. iterator.apply(object, [callback]);
  69181. };
  69182. /**
  69183. * Returns a function to be used to score individual results.
  69184. *
  69185. * Good matches will have a higher score than poor matches.
  69186. * If an item is not a match, 0 will be returned by the function.
  69187. *
  69188. * @param {object|string} search
  69189. * @param {object} options (optional)
  69190. * @returns {function}
  69191. */
  69192. Sifter.prototype.getScoreFunction = function(search, options) {
  69193. var self, fields, tokens, token_count, nesting;
  69194. self = this;
  69195. search = self.prepareSearch(search, options);
  69196. tokens = search.tokens;
  69197. fields = search.options.fields;
  69198. token_count = tokens.length;
  69199. nesting = search.options.nesting;
  69200. /**
  69201. * Calculates how close of a match the
  69202. * given value is against a search token.
  69203. *
  69204. * @param {mixed} value
  69205. * @param {object} token
  69206. * @return {number}
  69207. */
  69208. var scoreValue = function(value, token) {
  69209. var score, pos;
  69210. if (!value) return 0;
  69211. value = String(value || '');
  69212. pos = value.search(token.regex);
  69213. if (pos === -1) return 0;
  69214. score = token.string.length / value.length;
  69215. if (pos === 0) score += 0.5;
  69216. return score;
  69217. };
  69218. /**
  69219. * Calculates the score of an object
  69220. * against the search query.
  69221. *
  69222. * @param {object} token
  69223. * @param {object} data
  69224. * @return {number}
  69225. */
  69226. var scoreObject = (function() {
  69227. var field_count = fields.length;
  69228. if (!field_count) {
  69229. return function() { return 0; };
  69230. }
  69231. if (field_count === 1) {
  69232. return function(token, data) {
  69233. return scoreValue(getattr(data, fields[0], nesting), token);
  69234. };
  69235. }
  69236. return function(token, data) {
  69237. for (var i = 0, sum = 0; i < field_count; i++) {
  69238. sum += scoreValue(getattr(data, fields[i], nesting), token);
  69239. }
  69240. return sum / field_count;
  69241. };
  69242. })();
  69243. if (!token_count) {
  69244. return function() { return 0; };
  69245. }
  69246. if (token_count === 1) {
  69247. return function(data) {
  69248. return scoreObject(tokens[0], data);
  69249. };
  69250. }
  69251. if (search.options.conjunction === 'and') {
  69252. return function(data) {
  69253. var score;
  69254. for (var i = 0, sum = 0; i < token_count; i++) {
  69255. score = scoreObject(tokens[i], data);
  69256. if (score <= 0) return 0;
  69257. sum += score;
  69258. }
  69259. return sum / token_count;
  69260. };
  69261. } else {
  69262. return function(data) {
  69263. for (var i = 0, sum = 0; i < token_count; i++) {
  69264. sum += scoreObject(tokens[i], data);
  69265. }
  69266. return sum / token_count;
  69267. };
  69268. }
  69269. };
  69270. /**
  69271. * Returns a function that can be used to compare two
  69272. * results, for sorting purposes. If no sorting should
  69273. * be performed, `null` will be returned.
  69274. *
  69275. * @param {string|object} search
  69276. * @param {object} options
  69277. * @return function(a,b)
  69278. */
  69279. Sifter.prototype.getSortFunction = function(search, options) {
  69280. var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;
  69281. self = this;
  69282. search = self.prepareSearch(search, options);
  69283. sort = (!search.query && options.sort_empty) || options.sort;
  69284. /**
  69285. * Fetches the specified sort field value
  69286. * from a search result item.
  69287. *
  69288. * @param {string} name
  69289. * @param {object} result
  69290. * @return {mixed}
  69291. */
  69292. get_field = function(name, result) {
  69293. if (name === '$score') return result.score;
  69294. return getattr(self.items[result.id], name, options.nesting);
  69295. };
  69296. // parse options
  69297. fields = [];
  69298. if (sort) {
  69299. for (i = 0, n = sort.length; i < n; i++) {
  69300. if (search.query || sort[i].field !== '$score') {
  69301. fields.push(sort[i]);
  69302. }
  69303. }
  69304. }
  69305. // the "$score" field is implied to be the primary
  69306. // sort field, unless it's manually specified
  69307. if (search.query) {
  69308. implicit_score = true;
  69309. for (i = 0, n = fields.length; i < n; i++) {
  69310. if (fields[i].field === '$score') {
  69311. implicit_score = false;
  69312. break;
  69313. }
  69314. }
  69315. if (implicit_score) {
  69316. fields.unshift({field: '$score', direction: 'desc'});
  69317. }
  69318. } else {
  69319. for (i = 0, n = fields.length; i < n; i++) {
  69320. if (fields[i].field === '$score') {
  69321. fields.splice(i, 1);
  69322. break;
  69323. }
  69324. }
  69325. }
  69326. multipliers = [];
  69327. for (i = 0, n = fields.length; i < n; i++) {
  69328. multipliers.push(fields[i].direction === 'desc' ? -1 : 1);
  69329. }
  69330. // build function
  69331. fields_count = fields.length;
  69332. if (!fields_count) {
  69333. return null;
  69334. } else if (fields_count === 1) {
  69335. field = fields[0].field;
  69336. multiplier = multipliers[0];
  69337. return function(a, b) {
  69338. return multiplier * cmp(
  69339. get_field(field, a),
  69340. get_field(field, b)
  69341. );
  69342. };
  69343. } else {
  69344. return function(a, b) {
  69345. var i, result, a_value, b_value, field;
  69346. for (i = 0; i < fields_count; i++) {
  69347. field = fields[i].field;
  69348. result = multipliers[i] * cmp(
  69349. get_field(field, a),
  69350. get_field(field, b)
  69351. );
  69352. if (result) return result;
  69353. }
  69354. return 0;
  69355. };
  69356. }
  69357. };
  69358. /**
  69359. * Parses a search query and returns an object
  69360. * with tokens and fields ready to be populated
  69361. * with results.
  69362. *
  69363. * @param {string} query
  69364. * @param {object} options
  69365. * @returns {object}
  69366. */
  69367. Sifter.prototype.prepareSearch = function(query, options) {
  69368. if (typeof query === 'object') return query;
  69369. options = extend({}, options);
  69370. var option_fields = options.fields;
  69371. var option_sort = options.sort;
  69372. var option_sort_empty = options.sort_empty;
  69373. if (option_fields && !is_array(option_fields)) options.fields = [option_fields];
  69374. if (option_sort && !is_array(option_sort)) options.sort = [option_sort];
  69375. if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];
  69376. return {
  69377. options : options,
  69378. query : String(query || '').toLowerCase(),
  69379. tokens : this.tokenize(query),
  69380. total : 0,
  69381. items : []
  69382. };
  69383. };
  69384. /**
  69385. * Searches through all items and returns a sorted array of matches.
  69386. *
  69387. * The `options` parameter can contain:
  69388. *
  69389. * - fields {string|array}
  69390. * - sort {array}
  69391. * - score {function}
  69392. * - filter {bool}
  69393. * - limit {integer}
  69394. *
  69395. * Returns an object containing:
  69396. *
  69397. * - options {object}
  69398. * - query {string}
  69399. * - tokens {array}
  69400. * - total {int}
  69401. * - items {array}
  69402. *
  69403. * @param {string} query
  69404. * @param {object} options
  69405. * @returns {object}
  69406. */
  69407. Sifter.prototype.search = function(query, options) {
  69408. var self = this, value, score, search, calculateScore;
  69409. var fn_sort;
  69410. var fn_score;
  69411. search = this.prepareSearch(query, options);
  69412. options = search.options;
  69413. query = search.query;
  69414. // generate result scoring function
  69415. fn_score = options.score || self.getScoreFunction(search);
  69416. // perform search and sort
  69417. if (query.length) {
  69418. self.iterator(self.items, function(item, id) {
  69419. score = fn_score(item);
  69420. if (options.filter === false || score > 0) {
  69421. search.items.push({'score': score, 'id': id});
  69422. }
  69423. });
  69424. } else {
  69425. self.iterator(self.items, function(item, id) {
  69426. search.items.push({'score': 1, 'id': id});
  69427. });
  69428. }
  69429. fn_sort = self.getSortFunction(search, options);
  69430. if (fn_sort) search.items.sort(fn_sort);
  69431. // apply limits
  69432. search.total = search.items.length;
  69433. if (typeof options.limit === 'number') {
  69434. search.items = search.items.slice(0, options.limit);
  69435. }
  69436. return search;
  69437. };
  69438. // utilities
  69439. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  69440. var cmp = function(a, b) {
  69441. if (typeof a === 'number' && typeof b === 'number') {
  69442. return a > b ? 1 : (a < b ? -1 : 0);
  69443. }
  69444. a = asciifold(String(a || ''));
  69445. b = asciifold(String(b || ''));
  69446. if (a > b) return 1;
  69447. if (b > a) return -1;
  69448. return 0;
  69449. };
  69450. var extend = function(a, b) {
  69451. var i, n, k, object;
  69452. for (i = 1, n = arguments.length; i < n; i++) {
  69453. object = arguments[i];
  69454. if (!object) continue;
  69455. for (k in object) {
  69456. if (object.hasOwnProperty(k)) {
  69457. a[k] = object[k];
  69458. }
  69459. }
  69460. }
  69461. return a;
  69462. };
  69463. /**
  69464. * A property getter resolving dot-notation
  69465. * @param {Object} obj The root object to fetch property on
  69466. * @param {String} name The optionally dotted property name to fetch
  69467. * @param {Boolean} nesting Handle nesting or not
  69468. * @return {Object} The resolved property value
  69469. */
  69470. var getattr = function(obj, name, nesting) {
  69471. if (!obj || !name) return;
  69472. if (!nesting) return obj[name];
  69473. var names = name.split(".");
  69474. while(names.length && (obj = obj[names.shift()]));
  69475. return obj;
  69476. };
  69477. var trim = function(str) {
  69478. return (str + '').replace(/^\s+|\s+$|/g, '');
  69479. };
  69480. var escape_regex = function(str) {
  69481. return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
  69482. };
  69483. var is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {
  69484. return Object.prototype.toString.call(object) === '[object Array]';
  69485. };
  69486. var DIACRITICS = {
  69487. 'a': '[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]',
  69488. 'b': '[b␢βΒB฿𐌁ᛒ]',
  69489. 'c': '[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]',
  69490. 'd': '[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]',
  69491. 'e': '[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]',
  69492. 'f': '[fƑƒḞḟ]',
  69493. 'g': '[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]',
  69494. 'h': '[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]',
  69495. 'i': '[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]',
  69496. 'j': '[jȷĴĵɈɉʝɟʲ]',
  69497. 'k': '[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]',
  69498. 'l': '[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]',
  69499. 'n': '[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]',
  69500. 'o': '[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]',
  69501. 'p': '[pṔṕṖṗⱣᵽƤƥᵱ]',
  69502. 'q': '[qꝖꝗʠɊɋꝘꝙq̃]',
  69503. 'r': '[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]',
  69504. 's': '[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]',
  69505. 't': '[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]',
  69506. 'u': '[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]',
  69507. 'v': '[vṼṽṾṿƲʋꝞꝟⱱʋ]',
  69508. 'w': '[wẂẃẀẁŴŵẄẅẆẇẈẉ]',
  69509. 'x': '[xẌẍẊẋχ]',
  69510. 'y': '[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]',
  69511. 'z': '[zŹźẐẑŽžŻżẒẓẔẕƵƶ]'
  69512. };
  69513. var asciifold = (function() {
  69514. var i, n, k, chunk;
  69515. var foreignletters = '';
  69516. var lookup = {};
  69517. for (k in DIACRITICS) {
  69518. if (DIACRITICS.hasOwnProperty(k)) {
  69519. chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);
  69520. foreignletters += chunk;
  69521. for (i = 0, n = chunk.length; i < n; i++) {
  69522. lookup[chunk.charAt(i)] = k;
  69523. }
  69524. }
  69525. }
  69526. var regexp = new RegExp('[' + foreignletters + ']', 'g');
  69527. return function(str) {
  69528. return str.replace(regexp, function(foreignletter) {
  69529. return lookup[foreignletter];
  69530. }).toLowerCase();
  69531. };
  69532. })();
  69533. // export
  69534. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  69535. return Sifter;
  69536. }));
  69537. /***/ }),
  69538. /***/ 56884:
  69539. /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
  69540. "use strict";
  69541. // UNUSED EXPORTS: default
  69542. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.array.for-each.js
  69543. var es_array_for_each = __webpack_require__(49399);
  69544. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/web.dom-collections.for-each.js
  69545. var web_dom_collections_for_each = __webpack_require__(3542);
  69546. // EXTERNAL MODULE: ./node_modules/can-use-dom/index.js
  69547. var can_use_dom = __webpack_require__(31807);
  69548. var can_use_dom_default = /*#__PURE__*/__webpack_require__.n(can_use_dom);
  69549. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.array.filter.js
  69550. var es_array_filter = __webpack_require__(28165);
  69551. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.array.iterator.js
  69552. var es_array_iterator = __webpack_require__(47543);
  69553. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.object.assign.js
  69554. var es_object_assign = __webpack_require__(57692);
  69555. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.object.to-string.js
  69556. var es_object_to_string = __webpack_require__(12352);
  69557. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.parse-int.js
  69558. var es_parse_int = __webpack_require__(4249);
  69559. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.string.iterator.js
  69560. var es_string_iterator = __webpack_require__(63344);
  69561. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.weak-map.js
  69562. var es_weak_map = __webpack_require__(27323);
  69563. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/web.dom-collections.iterator.js
  69564. var web_dom_collections_iterator = __webpack_require__(4079);
  69565. // EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js
  69566. var lodash_throttle = __webpack_require__(93096);
  69567. var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle);
  69568. // EXTERNAL MODULE: ./node_modules/lodash.debounce/index.js
  69569. var lodash_debounce = __webpack_require__(91296);
  69570. var lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce);
  69571. // EXTERNAL MODULE: ./node_modules/lodash.memoize/index.js
  69572. var lodash_memoize = __webpack_require__(20773);
  69573. var lodash_memoize_default = /*#__PURE__*/__webpack_require__.n(lodash_memoize);
  69574. ;// CONCATENATED MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
  69575. /**
  69576. * A collection of shims that provide minimal functionality of the ES6 collections.
  69577. *
  69578. * These implementations are not meant to be used outside of the ResizeObserver
  69579. * modules as they cover only a limited range of use cases.
  69580. */
  69581. /* eslint-disable require-jsdoc, valid-jsdoc */
  69582. var MapShim = (function () {
  69583. if (typeof Map !== 'undefined') {
  69584. return Map;
  69585. }
  69586. /**
  69587. * Returns index in provided array that matches the specified key.
  69588. *
  69589. * @param {Array<Array>} arr
  69590. * @param {*} key
  69591. * @returns {number}
  69592. */
  69593. function getIndex(arr, key) {
  69594. var result = -1;
  69595. arr.some(function (entry, index) {
  69596. if (entry[0] === key) {
  69597. result = index;
  69598. return true;
  69599. }
  69600. return false;
  69601. });
  69602. return result;
  69603. }
  69604. return /** @class */ (function () {
  69605. function class_1() {
  69606. this.__entries__ = [];
  69607. }
  69608. Object.defineProperty(class_1.prototype, "size", {
  69609. /**
  69610. * @returns {boolean}
  69611. */
  69612. get: function () {
  69613. return this.__entries__.length;
  69614. },
  69615. enumerable: true,
  69616. configurable: true
  69617. });
  69618. /**
  69619. * @param {*} key
  69620. * @returns {*}
  69621. */
  69622. class_1.prototype.get = function (key) {
  69623. var index = getIndex(this.__entries__, key);
  69624. var entry = this.__entries__[index];
  69625. return entry && entry[1];
  69626. };
  69627. /**
  69628. * @param {*} key
  69629. * @param {*} value
  69630. * @returns {void}
  69631. */
  69632. class_1.prototype.set = function (key, value) {
  69633. var index = getIndex(this.__entries__, key);
  69634. if (~index) {
  69635. this.__entries__[index][1] = value;
  69636. }
  69637. else {
  69638. this.__entries__.push([key, value]);
  69639. }
  69640. };
  69641. /**
  69642. * @param {*} key
  69643. * @returns {void}
  69644. */
  69645. class_1.prototype.delete = function (key) {
  69646. var entries = this.__entries__;
  69647. var index = getIndex(entries, key);
  69648. if (~index) {
  69649. entries.splice(index, 1);
  69650. }
  69651. };
  69652. /**
  69653. * @param {*} key
  69654. * @returns {void}
  69655. */
  69656. class_1.prototype.has = function (key) {
  69657. return !!~getIndex(this.__entries__, key);
  69658. };
  69659. /**
  69660. * @returns {void}
  69661. */
  69662. class_1.prototype.clear = function () {
  69663. this.__entries__.splice(0);
  69664. };
  69665. /**
  69666. * @param {Function} callback
  69667. * @param {*} [ctx=null]
  69668. * @returns {void}
  69669. */
  69670. class_1.prototype.forEach = function (callback, ctx) {
  69671. if (ctx === void 0) { ctx = null; }
  69672. for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
  69673. var entry = _a[_i];
  69674. callback.call(ctx, entry[1], entry[0]);
  69675. }
  69676. };
  69677. return class_1;
  69678. }());
  69679. })();
  69680. /**
  69681. * Detects whether window and document objects are available in current environment.
  69682. */
  69683. var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
  69684. // Returns global object of a current environment.
  69685. var global$1 = (function () {
  69686. if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
  69687. return __webpack_require__.g;
  69688. }
  69689. if (typeof self !== 'undefined' && self.Math === Math) {
  69690. return self;
  69691. }
  69692. if (typeof window !== 'undefined' && window.Math === Math) {
  69693. return window;
  69694. }
  69695. // eslint-disable-next-line no-new-func
  69696. return Function('return this')();
  69697. })();
  69698. /**
  69699. * A shim for the requestAnimationFrame which falls back to the setTimeout if
  69700. * first one is not supported.
  69701. *
  69702. * @returns {number} Requests' identifier.
  69703. */
  69704. var requestAnimationFrame$1 = (function () {
  69705. if (typeof requestAnimationFrame === 'function') {
  69706. // It's required to use a bounded function because IE sometimes throws
  69707. // an "Invalid calling object" error if rAF is invoked without the global
  69708. // object on the left hand side.
  69709. return requestAnimationFrame.bind(global$1);
  69710. }
  69711. return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
  69712. })();
  69713. // Defines minimum timeout before adding a trailing call.
  69714. var trailingTimeout = 2;
  69715. /**
  69716. * Creates a wrapper function which ensures that provided callback will be
  69717. * invoked only once during the specified delay period.
  69718. *
  69719. * @param {Function} callback - Function to be invoked after the delay period.
  69720. * @param {number} delay - Delay after which to invoke callback.
  69721. * @returns {Function}
  69722. */
  69723. function throttle (callback, delay) {
  69724. var leadingCall = false, trailingCall = false, lastCallTime = 0;
  69725. /**
  69726. * Invokes the original callback function and schedules new invocation if
  69727. * the "proxy" was called during current request.
  69728. *
  69729. * @returns {void}
  69730. */
  69731. function resolvePending() {
  69732. if (leadingCall) {
  69733. leadingCall = false;
  69734. callback();
  69735. }
  69736. if (trailingCall) {
  69737. proxy();
  69738. }
  69739. }
  69740. /**
  69741. * Callback invoked after the specified delay. It will further postpone
  69742. * invocation of the original function delegating it to the
  69743. * requestAnimationFrame.
  69744. *
  69745. * @returns {void}
  69746. */
  69747. function timeoutCallback() {
  69748. requestAnimationFrame$1(resolvePending);
  69749. }
  69750. /**
  69751. * Schedules invocation of the original function.
  69752. *
  69753. * @returns {void}
  69754. */
  69755. function proxy() {
  69756. var timeStamp = Date.now();
  69757. if (leadingCall) {
  69758. // Reject immediately following calls.
  69759. if (timeStamp - lastCallTime < trailingTimeout) {
  69760. return;
  69761. }
  69762. // Schedule new call to be in invoked when the pending one is resolved.
  69763. // This is important for "transitions" which never actually start
  69764. // immediately so there is a chance that we might miss one if change
  69765. // happens amids the pending invocation.
  69766. trailingCall = true;
  69767. }
  69768. else {
  69769. leadingCall = true;
  69770. trailingCall = false;
  69771. setTimeout(timeoutCallback, delay);
  69772. }
  69773. lastCallTime = timeStamp;
  69774. }
  69775. return proxy;
  69776. }
  69777. // Minimum delay before invoking the update of observers.
  69778. var REFRESH_DELAY = 20;
  69779. // A list of substrings of CSS properties used to find transition events that
  69780. // might affect dimensions of observed elements.
  69781. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
  69782. // Check if MutationObserver is available.
  69783. var mutationObserverSupported = typeof MutationObserver !== 'undefined';
  69784. /**
  69785. * Singleton controller class which handles updates of ResizeObserver instances.
  69786. */
  69787. var ResizeObserverController = /** @class */ (function () {
  69788. /**
  69789. * Creates a new instance of ResizeObserverController.
  69790. *
  69791. * @private
  69792. */
  69793. function ResizeObserverController() {
  69794. /**
  69795. * Indicates whether DOM listeners have been added.
  69796. *
  69797. * @private {boolean}
  69798. */
  69799. this.connected_ = false;
  69800. /**
  69801. * Tells that controller has subscribed for Mutation Events.
  69802. *
  69803. * @private {boolean}
  69804. */
  69805. this.mutationEventsAdded_ = false;
  69806. /**
  69807. * Keeps reference to the instance of MutationObserver.
  69808. *
  69809. * @private {MutationObserver}
  69810. */
  69811. this.mutationsObserver_ = null;
  69812. /**
  69813. * A list of connected observers.
  69814. *
  69815. * @private {Array<ResizeObserverSPI>}
  69816. */
  69817. this.observers_ = [];
  69818. this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
  69819. this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
  69820. }
  69821. /**
  69822. * Adds observer to observers list.
  69823. *
  69824. * @param {ResizeObserverSPI} observer - Observer to be added.
  69825. * @returns {void}
  69826. */
  69827. ResizeObserverController.prototype.addObserver = function (observer) {
  69828. if (!~this.observers_.indexOf(observer)) {
  69829. this.observers_.push(observer);
  69830. }
  69831. // Add listeners if they haven't been added yet.
  69832. if (!this.connected_) {
  69833. this.connect_();
  69834. }
  69835. };
  69836. /**
  69837. * Removes observer from observers list.
  69838. *
  69839. * @param {ResizeObserverSPI} observer - Observer to be removed.
  69840. * @returns {void}
  69841. */
  69842. ResizeObserverController.prototype.removeObserver = function (observer) {
  69843. var observers = this.observers_;
  69844. var index = observers.indexOf(observer);
  69845. // Remove observer if it's present in registry.
  69846. if (~index) {
  69847. observers.splice(index, 1);
  69848. }
  69849. // Remove listeners if controller has no connected observers.
  69850. if (!observers.length && this.connected_) {
  69851. this.disconnect_();
  69852. }
  69853. };
  69854. /**
  69855. * Invokes the update of observers. It will continue running updates insofar
  69856. * it detects changes.
  69857. *
  69858. * @returns {void}
  69859. */
  69860. ResizeObserverController.prototype.refresh = function () {
  69861. var changesDetected = this.updateObservers_();
  69862. // Continue running updates if changes have been detected as there might
  69863. // be future ones caused by CSS transitions.
  69864. if (changesDetected) {
  69865. this.refresh();
  69866. }
  69867. };
  69868. /**
  69869. * Updates every observer from observers list and notifies them of queued
  69870. * entries.
  69871. *
  69872. * @private
  69873. * @returns {boolean} Returns "true" if any observer has detected changes in
  69874. * dimensions of it's elements.
  69875. */
  69876. ResizeObserverController.prototype.updateObservers_ = function () {
  69877. // Collect observers that have active observations.
  69878. var activeObservers = this.observers_.filter(function (observer) {
  69879. return observer.gatherActive(), observer.hasActive();
  69880. });
  69881. // Deliver notifications in a separate cycle in order to avoid any
  69882. // collisions between observers, e.g. when multiple instances of
  69883. // ResizeObserver are tracking the same element and the callback of one
  69884. // of them changes content dimensions of the observed target. Sometimes
  69885. // this may result in notifications being blocked for the rest of observers.
  69886. activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
  69887. return activeObservers.length > 0;
  69888. };
  69889. /**
  69890. * Initializes DOM listeners.
  69891. *
  69892. * @private
  69893. * @returns {void}
  69894. */
  69895. ResizeObserverController.prototype.connect_ = function () {
  69896. // Do nothing if running in a non-browser environment or if listeners
  69897. // have been already added.
  69898. if (!isBrowser || this.connected_) {
  69899. return;
  69900. }
  69901. // Subscription to the "Transitionend" event is used as a workaround for
  69902. // delayed transitions. This way it's possible to capture at least the
  69903. // final state of an element.
  69904. document.addEventListener('transitionend', this.onTransitionEnd_);
  69905. window.addEventListener('resize', this.refresh);
  69906. if (mutationObserverSupported) {
  69907. this.mutationsObserver_ = new MutationObserver(this.refresh);
  69908. this.mutationsObserver_.observe(document, {
  69909. attributes: true,
  69910. childList: true,
  69911. characterData: true,
  69912. subtree: true
  69913. });
  69914. }
  69915. else {
  69916. document.addEventListener('DOMSubtreeModified', this.refresh);
  69917. this.mutationEventsAdded_ = true;
  69918. }
  69919. this.connected_ = true;
  69920. };
  69921. /**
  69922. * Removes DOM listeners.
  69923. *
  69924. * @private
  69925. * @returns {void}
  69926. */
  69927. ResizeObserverController.prototype.disconnect_ = function () {
  69928. // Do nothing if running in a non-browser environment or if listeners
  69929. // have been already removed.
  69930. if (!isBrowser || !this.connected_) {
  69931. return;
  69932. }
  69933. document.removeEventListener('transitionend', this.onTransitionEnd_);
  69934. window.removeEventListener('resize', this.refresh);
  69935. if (this.mutationsObserver_) {
  69936. this.mutationsObserver_.disconnect();
  69937. }
  69938. if (this.mutationEventsAdded_) {
  69939. document.removeEventListener('DOMSubtreeModified', this.refresh);
  69940. }
  69941. this.mutationsObserver_ = null;
  69942. this.mutationEventsAdded_ = false;
  69943. this.connected_ = false;
  69944. };
  69945. /**
  69946. * "Transitionend" event handler.
  69947. *
  69948. * @private
  69949. * @param {TransitionEvent} event
  69950. * @returns {void}
  69951. */
  69952. ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
  69953. var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
  69954. // Detect whether transition may affect dimensions of an element.
  69955. var isReflowProperty = transitionKeys.some(function (key) {
  69956. return !!~propertyName.indexOf(key);
  69957. });
  69958. if (isReflowProperty) {
  69959. this.refresh();
  69960. }
  69961. };
  69962. /**
  69963. * Returns instance of the ResizeObserverController.
  69964. *
  69965. * @returns {ResizeObserverController}
  69966. */
  69967. ResizeObserverController.getInstance = function () {
  69968. if (!this.instance_) {
  69969. this.instance_ = new ResizeObserverController();
  69970. }
  69971. return this.instance_;
  69972. };
  69973. /**
  69974. * Holds reference to the controller's instance.
  69975. *
  69976. * @private {ResizeObserverController}
  69977. */
  69978. ResizeObserverController.instance_ = null;
  69979. return ResizeObserverController;
  69980. }());
  69981. /**
  69982. * Defines non-writable/enumerable properties of the provided target object.
  69983. *
  69984. * @param {Object} target - Object for which to define properties.
  69985. * @param {Object} props - Properties to be defined.
  69986. * @returns {Object} Target object.
  69987. */
  69988. var defineConfigurable = (function (target, props) {
  69989. for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
  69990. var key = _a[_i];
  69991. Object.defineProperty(target, key, {
  69992. value: props[key],
  69993. enumerable: false,
  69994. writable: false,
  69995. configurable: true
  69996. });
  69997. }
  69998. return target;
  69999. });
  70000. /**
  70001. * Returns the global object associated with provided element.
  70002. *
  70003. * @param {Object} target
  70004. * @returns {Object}
  70005. */
  70006. var getWindowOf = (function (target) {
  70007. // Assume that the element is an instance of Node, which means that it
  70008. // has the "ownerDocument" property from which we can retrieve a
  70009. // corresponding global object.
  70010. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
  70011. // Return the local global object if it's not possible extract one from
  70012. // provided element.
  70013. return ownerGlobal || global$1;
  70014. });
  70015. // Placeholder of an empty content rectangle.
  70016. var emptyRect = createRectInit(0, 0, 0, 0);
  70017. /**
  70018. * Converts provided string to a number.
  70019. *
  70020. * @param {number|string} value
  70021. * @returns {number}
  70022. */
  70023. function toFloat(value) {
  70024. return parseFloat(value) || 0;
  70025. }
  70026. /**
  70027. * Extracts borders size from provided styles.
  70028. *
  70029. * @param {CSSStyleDeclaration} styles
  70030. * @param {...string} positions - Borders positions (top, right, ...)
  70031. * @returns {number}
  70032. */
  70033. function getBordersSize(styles) {
  70034. var positions = [];
  70035. for (var _i = 1; _i < arguments.length; _i++) {
  70036. positions[_i - 1] = arguments[_i];
  70037. }
  70038. return positions.reduce(function (size, position) {
  70039. var value = styles['border-' + position + '-width'];
  70040. return size + toFloat(value);
  70041. }, 0);
  70042. }
  70043. /**
  70044. * Extracts paddings sizes from provided styles.
  70045. *
  70046. * @param {CSSStyleDeclaration} styles
  70047. * @returns {Object} Paddings box.
  70048. */
  70049. function getPaddings(styles) {
  70050. var positions = ['top', 'right', 'bottom', 'left'];
  70051. var paddings = {};
  70052. for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
  70053. var position = positions_1[_i];
  70054. var value = styles['padding-' + position];
  70055. paddings[position] = toFloat(value);
  70056. }
  70057. return paddings;
  70058. }
  70059. /**
  70060. * Calculates content rectangle of provided SVG element.
  70061. *
  70062. * @param {SVGGraphicsElement} target - Element content rectangle of which needs
  70063. * to be calculated.
  70064. * @returns {DOMRectInit}
  70065. */
  70066. function getSVGContentRect(target) {
  70067. var bbox = target.getBBox();
  70068. return createRectInit(0, 0, bbox.width, bbox.height);
  70069. }
  70070. /**
  70071. * Calculates content rectangle of provided HTMLElement.
  70072. *
  70073. * @param {HTMLElement} target - Element for which to calculate the content rectangle.
  70074. * @returns {DOMRectInit}
  70075. */
  70076. function getHTMLElementContentRect(target) {
  70077. // Client width & height properties can't be
  70078. // used exclusively as they provide rounded values.
  70079. var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
  70080. // By this condition we can catch all non-replaced inline, hidden and
  70081. // detached elements. Though elements with width & height properties less
  70082. // than 0.5 will be discarded as well.
  70083. //
  70084. // Without it we would need to implement separate methods for each of
  70085. // those cases and it's not possible to perform a precise and performance
  70086. // effective test for hidden elements. E.g. even jQuery's ':visible' filter
  70087. // gives wrong results for elements with width & height less than 0.5.
  70088. if (!clientWidth && !clientHeight) {
  70089. return emptyRect;
  70090. }
  70091. var styles = getWindowOf(target).getComputedStyle(target);
  70092. var paddings = getPaddings(styles);
  70093. var horizPad = paddings.left + paddings.right;
  70094. var vertPad = paddings.top + paddings.bottom;
  70095. // Computed styles of width & height are being used because they are the
  70096. // only dimensions available to JS that contain non-rounded values. It could
  70097. // be possible to utilize the getBoundingClientRect if only it's data wasn't
  70098. // affected by CSS transformations let alone paddings, borders and scroll bars.
  70099. var width = toFloat(styles.width), height = toFloat(styles.height);
  70100. // Width & height include paddings and borders when the 'border-box' box
  70101. // model is applied (except for IE).
  70102. if (styles.boxSizing === 'border-box') {
  70103. // Following conditions are required to handle Internet Explorer which
  70104. // doesn't include paddings and borders to computed CSS dimensions.
  70105. //
  70106. // We can say that if CSS dimensions + paddings are equal to the "client"
  70107. // properties then it's either IE, and thus we don't need to subtract
  70108. // anything, or an element merely doesn't have paddings/borders styles.
  70109. if (Math.round(width + horizPad) !== clientWidth) {
  70110. width -= getBordersSize(styles, 'left', 'right') + horizPad;
  70111. }
  70112. if (Math.round(height + vertPad) !== clientHeight) {
  70113. height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
  70114. }
  70115. }
  70116. // Following steps can't be applied to the document's root element as its
  70117. // client[Width/Height] properties represent viewport area of the window.
  70118. // Besides, it's as well not necessary as the <html> itself neither has
  70119. // rendered scroll bars nor it can be clipped.
  70120. if (!isDocumentElement(target)) {
  70121. // In some browsers (only in Firefox, actually) CSS width & height
  70122. // include scroll bars size which can be removed at this step as scroll
  70123. // bars are the only difference between rounded dimensions + paddings
  70124. // and "client" properties, though that is not always true in Chrome.
  70125. var vertScrollbar = Math.round(width + horizPad) - clientWidth;
  70126. var horizScrollbar = Math.round(height + vertPad) - clientHeight;
  70127. // Chrome has a rather weird rounding of "client" properties.
  70128. // E.g. for an element with content width of 314.2px it sometimes gives
  70129. // the client width of 315px and for the width of 314.7px it may give
  70130. // 314px. And it doesn't happen all the time. So just ignore this delta
  70131. // as a non-relevant.
  70132. if (Math.abs(vertScrollbar) !== 1) {
  70133. width -= vertScrollbar;
  70134. }
  70135. if (Math.abs(horizScrollbar) !== 1) {
  70136. height -= horizScrollbar;
  70137. }
  70138. }
  70139. return createRectInit(paddings.left, paddings.top, width, height);
  70140. }
  70141. /**
  70142. * Checks whether provided element is an instance of the SVGGraphicsElement.
  70143. *
  70144. * @param {Element} target - Element to be checked.
  70145. * @returns {boolean}
  70146. */
  70147. var isSVGGraphicsElement = (function () {
  70148. // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
  70149. // interface.
  70150. if (typeof SVGGraphicsElement !== 'undefined') {
  70151. return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
  70152. }
  70153. // If it's so, then check that element is at least an instance of the
  70154. // SVGElement and that it has the "getBBox" method.
  70155. // eslint-disable-next-line no-extra-parens
  70156. return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
  70157. typeof target.getBBox === 'function'); };
  70158. })();
  70159. /**
  70160. * Checks whether provided element is a document element (<html>).
  70161. *
  70162. * @param {Element} target - Element to be checked.
  70163. * @returns {boolean}
  70164. */
  70165. function isDocumentElement(target) {
  70166. return target === getWindowOf(target).document.documentElement;
  70167. }
  70168. /**
  70169. * Calculates an appropriate content rectangle for provided html or svg element.
  70170. *
  70171. * @param {Element} target - Element content rectangle of which needs to be calculated.
  70172. * @returns {DOMRectInit}
  70173. */
  70174. function getContentRect(target) {
  70175. if (!isBrowser) {
  70176. return emptyRect;
  70177. }
  70178. if (isSVGGraphicsElement(target)) {
  70179. return getSVGContentRect(target);
  70180. }
  70181. return getHTMLElementContentRect(target);
  70182. }
  70183. /**
  70184. * Creates rectangle with an interface of the DOMRectReadOnly.
  70185. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
  70186. *
  70187. * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
  70188. * @returns {DOMRectReadOnly}
  70189. */
  70190. function createReadOnlyRect(_a) {
  70191. var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
  70192. // If DOMRectReadOnly is available use it as a prototype for the rectangle.
  70193. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
  70194. var rect = Object.create(Constr.prototype);
  70195. // Rectangle's properties are not writable and non-enumerable.
  70196. defineConfigurable(rect, {
  70197. x: x, y: y, width: width, height: height,
  70198. top: y,
  70199. right: x + width,
  70200. bottom: height + y,
  70201. left: x
  70202. });
  70203. return rect;
  70204. }
  70205. /**
  70206. * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
  70207. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
  70208. *
  70209. * @param {number} x - X coordinate.
  70210. * @param {number} y - Y coordinate.
  70211. * @param {number} width - Rectangle's width.
  70212. * @param {number} height - Rectangle's height.
  70213. * @returns {DOMRectInit}
  70214. */
  70215. function createRectInit(x, y, width, height) {
  70216. return { x: x, y: y, width: width, height: height };
  70217. }
  70218. /**
  70219. * Class that is responsible for computations of the content rectangle of
  70220. * provided DOM element and for keeping track of it's changes.
  70221. */
  70222. var ResizeObservation = /** @class */ (function () {
  70223. /**
  70224. * Creates an instance of ResizeObservation.
  70225. *
  70226. * @param {Element} target - Element to be observed.
  70227. */
  70228. function ResizeObservation(target) {
  70229. /**
  70230. * Broadcasted width of content rectangle.
  70231. *
  70232. * @type {number}
  70233. */
  70234. this.broadcastWidth = 0;
  70235. /**
  70236. * Broadcasted height of content rectangle.
  70237. *
  70238. * @type {number}
  70239. */
  70240. this.broadcastHeight = 0;
  70241. /**
  70242. * Reference to the last observed content rectangle.
  70243. *
  70244. * @private {DOMRectInit}
  70245. */
  70246. this.contentRect_ = createRectInit(0, 0, 0, 0);
  70247. this.target = target;
  70248. }
  70249. /**
  70250. * Updates content rectangle and tells whether it's width or height properties
  70251. * have changed since the last broadcast.
  70252. *
  70253. * @returns {boolean}
  70254. */
  70255. ResizeObservation.prototype.isActive = function () {
  70256. var rect = getContentRect(this.target);
  70257. this.contentRect_ = rect;
  70258. return (rect.width !== this.broadcastWidth ||
  70259. rect.height !== this.broadcastHeight);
  70260. };
  70261. /**
  70262. * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
  70263. * from the corresponding properties of the last observed content rectangle.
  70264. *
  70265. * @returns {DOMRectInit} Last observed content rectangle.
  70266. */
  70267. ResizeObservation.prototype.broadcastRect = function () {
  70268. var rect = this.contentRect_;
  70269. this.broadcastWidth = rect.width;
  70270. this.broadcastHeight = rect.height;
  70271. return rect;
  70272. };
  70273. return ResizeObservation;
  70274. }());
  70275. var ResizeObserverEntry = /** @class */ (function () {
  70276. /**
  70277. * Creates an instance of ResizeObserverEntry.
  70278. *
  70279. * @param {Element} target - Element that is being observed.
  70280. * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
  70281. */
  70282. function ResizeObserverEntry(target, rectInit) {
  70283. var contentRect = createReadOnlyRect(rectInit);
  70284. // According to the specification following properties are not writable
  70285. // and are also not enumerable in the native implementation.
  70286. //
  70287. // Property accessors are not being used as they'd require to define a
  70288. // private WeakMap storage which may cause memory leaks in browsers that
  70289. // don't support this type of collections.
  70290. defineConfigurable(this, { target: target, contentRect: contentRect });
  70291. }
  70292. return ResizeObserverEntry;
  70293. }());
  70294. var ResizeObserverSPI = /** @class */ (function () {
  70295. /**
  70296. * Creates a new instance of ResizeObserver.
  70297. *
  70298. * @param {ResizeObserverCallback} callback - Callback function that is invoked
  70299. * when one of the observed elements changes it's content dimensions.
  70300. * @param {ResizeObserverController} controller - Controller instance which
  70301. * is responsible for the updates of observer.
  70302. * @param {ResizeObserver} callbackCtx - Reference to the public
  70303. * ResizeObserver instance which will be passed to callback function.
  70304. */
  70305. function ResizeObserverSPI(callback, controller, callbackCtx) {
  70306. /**
  70307. * Collection of resize observations that have detected changes in dimensions
  70308. * of elements.
  70309. *
  70310. * @private {Array<ResizeObservation>}
  70311. */
  70312. this.activeObservations_ = [];
  70313. /**
  70314. * Registry of the ResizeObservation instances.
  70315. *
  70316. * @private {Map<Element, ResizeObservation>}
  70317. */
  70318. this.observations_ = new MapShim();
  70319. if (typeof callback !== 'function') {
  70320. throw new TypeError('The callback provided as parameter 1 is not a function.');
  70321. }
  70322. this.callback_ = callback;
  70323. this.controller_ = controller;
  70324. this.callbackCtx_ = callbackCtx;
  70325. }
  70326. /**
  70327. * Starts observing provided element.
  70328. *
  70329. * @param {Element} target - Element to be observed.
  70330. * @returns {void}
  70331. */
  70332. ResizeObserverSPI.prototype.observe = function (target) {
  70333. if (!arguments.length) {
  70334. throw new TypeError('1 argument required, but only 0 present.');
  70335. }
  70336. // Do nothing if current environment doesn't have the Element interface.
  70337. if (typeof Element === 'undefined' || !(Element instanceof Object)) {
  70338. return;
  70339. }
  70340. if (!(target instanceof getWindowOf(target).Element)) {
  70341. throw new TypeError('parameter 1 is not of type "Element".');
  70342. }
  70343. var observations = this.observations_;
  70344. // Do nothing if element is already being observed.
  70345. if (observations.has(target)) {
  70346. return;
  70347. }
  70348. observations.set(target, new ResizeObservation(target));
  70349. this.controller_.addObserver(this);
  70350. // Force the update of observations.
  70351. this.controller_.refresh();
  70352. };
  70353. /**
  70354. * Stops observing provided element.
  70355. *
  70356. * @param {Element} target - Element to stop observing.
  70357. * @returns {void}
  70358. */
  70359. ResizeObserverSPI.prototype.unobserve = function (target) {
  70360. if (!arguments.length) {
  70361. throw new TypeError('1 argument required, but only 0 present.');
  70362. }
  70363. // Do nothing if current environment doesn't have the Element interface.
  70364. if (typeof Element === 'undefined' || !(Element instanceof Object)) {
  70365. return;
  70366. }
  70367. if (!(target instanceof getWindowOf(target).Element)) {
  70368. throw new TypeError('parameter 1 is not of type "Element".');
  70369. }
  70370. var observations = this.observations_;
  70371. // Do nothing if element is not being observed.
  70372. if (!observations.has(target)) {
  70373. return;
  70374. }
  70375. observations.delete(target);
  70376. if (!observations.size) {
  70377. this.controller_.removeObserver(this);
  70378. }
  70379. };
  70380. /**
  70381. * Stops observing all elements.
  70382. *
  70383. * @returns {void}
  70384. */
  70385. ResizeObserverSPI.prototype.disconnect = function () {
  70386. this.clearActive();
  70387. this.observations_.clear();
  70388. this.controller_.removeObserver(this);
  70389. };
  70390. /**
  70391. * Collects observation instances the associated element of which has changed
  70392. * it's content rectangle.
  70393. *
  70394. * @returns {void}
  70395. */
  70396. ResizeObserverSPI.prototype.gatherActive = function () {
  70397. var _this = this;
  70398. this.clearActive();
  70399. this.observations_.forEach(function (observation) {
  70400. if (observation.isActive()) {
  70401. _this.activeObservations_.push(observation);
  70402. }
  70403. });
  70404. };
  70405. /**
  70406. * Invokes initial callback function with a list of ResizeObserverEntry
  70407. * instances collected from active resize observations.
  70408. *
  70409. * @returns {void}
  70410. */
  70411. ResizeObserverSPI.prototype.broadcastActive = function () {
  70412. // Do nothing if observer doesn't have active observations.
  70413. if (!this.hasActive()) {
  70414. return;
  70415. }
  70416. var ctx = this.callbackCtx_;
  70417. // Create ResizeObserverEntry instance for every active observation.
  70418. var entries = this.activeObservations_.map(function (observation) {
  70419. return new ResizeObserverEntry(observation.target, observation.broadcastRect());
  70420. });
  70421. this.callback_.call(ctx, entries, ctx);
  70422. this.clearActive();
  70423. };
  70424. /**
  70425. * Clears the collection of active observations.
  70426. *
  70427. * @returns {void}
  70428. */
  70429. ResizeObserverSPI.prototype.clearActive = function () {
  70430. this.activeObservations_.splice(0);
  70431. };
  70432. /**
  70433. * Tells whether observer has active observations.
  70434. *
  70435. * @returns {boolean}
  70436. */
  70437. ResizeObserverSPI.prototype.hasActive = function () {
  70438. return this.activeObservations_.length > 0;
  70439. };
  70440. return ResizeObserverSPI;
  70441. }());
  70442. // Registry of internal observers. If WeakMap is not available use current shim
  70443. // for the Map collection as it has all required methods and because WeakMap
  70444. // can't be fully polyfilled anyway.
  70445. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
  70446. /**
  70447. * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
  70448. * exposing only those methods and properties that are defined in the spec.
  70449. */
  70450. var ResizeObserver = /** @class */ (function () {
  70451. /**
  70452. * Creates a new instance of ResizeObserver.
  70453. *
  70454. * @param {ResizeObserverCallback} callback - Callback that is invoked when
  70455. * dimensions of the observed elements change.
  70456. */
  70457. function ResizeObserver(callback) {
  70458. if (!(this instanceof ResizeObserver)) {
  70459. throw new TypeError('Cannot call a class as a function.');
  70460. }
  70461. if (!arguments.length) {
  70462. throw new TypeError('1 argument required, but only 0 present.');
  70463. }
  70464. var controller = ResizeObserverController.getInstance();
  70465. var observer = new ResizeObserverSPI(callback, controller, this);
  70466. observers.set(this, observer);
  70467. }
  70468. return ResizeObserver;
  70469. }());
  70470. // Expose public methods of ResizeObserver.
  70471. [
  70472. 'observe',
  70473. 'unobserve',
  70474. 'disconnect'
  70475. ].forEach(function (method) {
  70476. ResizeObserver.prototype[method] = function () {
  70477. var _a;
  70478. return (_a = observers.get(this))[method].apply(_a, arguments);
  70479. };
  70480. });
  70481. var index = (function () {
  70482. // Export existing implementation if available.
  70483. if (typeof global$1.ResizeObserver !== 'undefined') {
  70484. return global$1.ResizeObserver;
  70485. }
  70486. return ResizeObserver;
  70487. })();
  70488. /* harmony default export */ const ResizeObserver_es = (index);
  70489. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.array.reduce.js
  70490. var es_array_reduce = __webpack_require__(57985);
  70491. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.function.name.js
  70492. var es_function_name = __webpack_require__(66618);
  70493. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.regexp.exec.js
  70494. var es_regexp_exec = __webpack_require__(9989);
  70495. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.string.match.js
  70496. var es_string_match = __webpack_require__(8307);
  70497. // EXTERNAL MODULE: ./node_modules/simplebar/node_modules/core-js/modules/es.string.replace.js
  70498. var es_string_replace = __webpack_require__(4390);
  70499. ;// CONCATENATED MODULE: ./node_modules/simplebar/dist/simplebar.esm.js
  70500. /**
  70501. * SimpleBar.js - v5.3.2
  70502. * Scrollbars, simpler.
  70503. * https://grsmto.github.io/simplebar/
  70504. *
  70505. * Made by Adrien Denat from a fork by Jonathan Nicol
  70506. * Under MIT License
  70507. */
  70508. // Helper function to retrieve options from element attributes
  70509. var getOptions = function getOptions(obj) {
  70510. var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
  70511. var option = attribute.name.match(/data-simplebar-(.+)/);
  70512. if (option) {
  70513. var key = option[1].replace(/\W+(.)/g, function (x, chr) {
  70514. return chr.toUpperCase();
  70515. });
  70516. switch (attribute.value) {
  70517. case 'true':
  70518. acc[key] = true;
  70519. break;
  70520. case 'false':
  70521. acc[key] = false;
  70522. break;
  70523. case undefined:
  70524. acc[key] = true;
  70525. break;
  70526. default:
  70527. acc[key] = attribute.value;
  70528. }
  70529. }
  70530. return acc;
  70531. }, {});
  70532. return options;
  70533. };
  70534. function getElementWindow(element) {
  70535. if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
  70536. return window;
  70537. }
  70538. return element.ownerDocument.defaultView;
  70539. }
  70540. function getElementDocument(element) {
  70541. if (!element || !element.ownerDocument) {
  70542. return document;
  70543. }
  70544. return element.ownerDocument;
  70545. }
  70546. var cachedScrollbarWidth = null;
  70547. var cachedDevicePixelRatio = null;
  70548. if ((can_use_dom_default())) {
  70549. window.addEventListener('resize', function () {
  70550. if (cachedDevicePixelRatio !== window.devicePixelRatio) {
  70551. cachedDevicePixelRatio = window.devicePixelRatio;
  70552. cachedScrollbarWidth = null;
  70553. }
  70554. });
  70555. }
  70556. function scrollbarWidth(el) {
  70557. if (cachedScrollbarWidth === null) {
  70558. var document = getElementDocument(el);
  70559. if (typeof document === 'undefined') {
  70560. cachedScrollbarWidth = 0;
  70561. return cachedScrollbarWidth;
  70562. }
  70563. var body = document.body;
  70564. var box = document.createElement('div');
  70565. box.classList.add('simplebar-hide-scrollbar');
  70566. body.appendChild(box);
  70567. var width = box.getBoundingClientRect().right;
  70568. body.removeChild(box);
  70569. cachedScrollbarWidth = width;
  70570. }
  70571. return cachedScrollbarWidth;
  70572. }
  70573. var SimpleBar =
  70574. /*#__PURE__*/
  70575. function () {
  70576. function SimpleBar(element, options) {
  70577. var _this = this;
  70578. this.onScroll = function () {
  70579. var elWindow = getElementWindow(_this.el);
  70580. if (!_this.scrollXTicking) {
  70581. elWindow.requestAnimationFrame(_this.scrollX);
  70582. _this.scrollXTicking = true;
  70583. }
  70584. if (!_this.scrollYTicking) {
  70585. elWindow.requestAnimationFrame(_this.scrollY);
  70586. _this.scrollYTicking = true;
  70587. }
  70588. };
  70589. this.scrollX = function () {
  70590. if (_this.axis.x.isOverflowing) {
  70591. _this.showScrollbar('x');
  70592. _this.positionScrollbar('x');
  70593. }
  70594. _this.scrollXTicking = false;
  70595. };
  70596. this.scrollY = function () {
  70597. if (_this.axis.y.isOverflowing) {
  70598. _this.showScrollbar('y');
  70599. _this.positionScrollbar('y');
  70600. }
  70601. _this.scrollYTicking = false;
  70602. };
  70603. this.onMouseEnter = function () {
  70604. _this.showScrollbar('x');
  70605. _this.showScrollbar('y');
  70606. };
  70607. this.onMouseMove = function (e) {
  70608. _this.mouseX = e.clientX;
  70609. _this.mouseY = e.clientY;
  70610. if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
  70611. _this.onMouseMoveForAxis('x');
  70612. }
  70613. if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
  70614. _this.onMouseMoveForAxis('y');
  70615. }
  70616. };
  70617. this.onMouseLeave = function () {
  70618. _this.onMouseMove.cancel();
  70619. if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
  70620. _this.onMouseLeaveForAxis('x');
  70621. }
  70622. if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
  70623. _this.onMouseLeaveForAxis('y');
  70624. }
  70625. _this.mouseX = -1;
  70626. _this.mouseY = -1;
  70627. };
  70628. this.onWindowResize = function () {
  70629. // Recalculate scrollbarWidth in case it's a zoom
  70630. _this.scrollbarWidth = _this.getScrollbarWidth();
  70631. _this.hideNativeScrollbar();
  70632. };
  70633. this.hideScrollbars = function () {
  70634. _this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
  70635. _this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
  70636. if (!_this.isWithinBounds(_this.axis.y.track.rect)) {
  70637. _this.axis.y.scrollbar.el.classList.remove(_this.classNames.visible);
  70638. _this.axis.y.isVisible = false;
  70639. }
  70640. if (!_this.isWithinBounds(_this.axis.x.track.rect)) {
  70641. _this.axis.x.scrollbar.el.classList.remove(_this.classNames.visible);
  70642. _this.axis.x.isVisible = false;
  70643. }
  70644. };
  70645. this.onPointerEvent = function (e) {
  70646. var isWithinTrackXBounds, isWithinTrackYBounds;
  70647. _this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
  70648. _this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
  70649. if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
  70650. isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
  70651. }
  70652. if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
  70653. isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
  70654. } // If any pointer event is called on the scrollbar
  70655. if (isWithinTrackXBounds || isWithinTrackYBounds) {
  70656. // Preventing the event's default action stops text being
  70657. // selectable during the drag.
  70658. e.preventDefault(); // Prevent event leaking
  70659. e.stopPropagation();
  70660. if (e.type === 'mousedown') {
  70661. if (isWithinTrackXBounds) {
  70662. _this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
  70663. if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
  70664. _this.onDragStart(e, 'x');
  70665. } else {
  70666. _this.onTrackClick(e, 'x');
  70667. }
  70668. }
  70669. if (isWithinTrackYBounds) {
  70670. _this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
  70671. if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
  70672. _this.onDragStart(e, 'y');
  70673. } else {
  70674. _this.onTrackClick(e, 'y');
  70675. }
  70676. }
  70677. }
  70678. }
  70679. };
  70680. this.drag = function (e) {
  70681. var eventOffset;
  70682. var track = _this.axis[_this.draggedAxis].track;
  70683. var trackSize = track.rect[_this.axis[_this.draggedAxis].sizeAttr];
  70684. var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
  70685. var contentSize = _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr];
  70686. var hostSize = parseInt(_this.elStyles[_this.axis[_this.draggedAxis].sizeAttr], 10);
  70687. e.preventDefault();
  70688. e.stopPropagation();
  70689. if (_this.draggedAxis === 'y') {
  70690. eventOffset = e.pageY;
  70691. } else {
  70692. eventOffset = e.pageX;
  70693. } // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).
  70694. var dragPos = eventOffset - track.rect[_this.axis[_this.draggedAxis].offsetAttr] - _this.axis[_this.draggedAxis].dragOffset; // Convert the mouse position into a percentage of the scrollbar height/width.
  70695. var dragPerc = dragPos / (trackSize - scrollbar.size); // Scroll the content by the same percentage.
  70696. var scrollPos = dragPerc * (contentSize - hostSize); // Fix browsers inconsistency on RTL
  70697. if (_this.draggedAxis === 'x') {
  70698. scrollPos = _this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? scrollPos - (trackSize + scrollbar.size) : scrollPos;
  70699. scrollPos = _this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollPos : scrollPos;
  70700. }
  70701. _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
  70702. };
  70703. this.onEndDrag = function (e) {
  70704. var elDocument = getElementDocument(_this.el);
  70705. var elWindow = getElementWindow(_this.el);
  70706. e.preventDefault();
  70707. e.stopPropagation();
  70708. _this.el.classList.remove(_this.classNames.dragging);
  70709. elDocument.removeEventListener('mousemove', _this.drag, true);
  70710. elDocument.removeEventListener('mouseup', _this.onEndDrag, true);
  70711. _this.removePreventClickId = elWindow.setTimeout(function () {
  70712. // Remove these asynchronously so we still suppress click events
  70713. // generated simultaneously with mouseup.
  70714. elDocument.removeEventListener('click', _this.preventClick, true);
  70715. elDocument.removeEventListener('dblclick', _this.preventClick, true);
  70716. _this.removePreventClickId = null;
  70717. });
  70718. };
  70719. this.preventClick = function (e) {
  70720. e.preventDefault();
  70721. e.stopPropagation();
  70722. };
  70723. this.el = element;
  70724. this.minScrollbarWidth = 20;
  70725. this.options = Object.assign({}, SimpleBar.defaultOptions, {}, options);
  70726. this.classNames = Object.assign({}, SimpleBar.defaultOptions.classNames, {}, this.options.classNames);
  70727. this.axis = {
  70728. x: {
  70729. scrollOffsetAttr: 'scrollLeft',
  70730. sizeAttr: 'width',
  70731. scrollSizeAttr: 'scrollWidth',
  70732. offsetSizeAttr: 'offsetWidth',
  70733. offsetAttr: 'left',
  70734. overflowAttr: 'overflowX',
  70735. dragOffset: 0,
  70736. isOverflowing: true,
  70737. isVisible: false,
  70738. forceVisible: false,
  70739. track: {},
  70740. scrollbar: {}
  70741. },
  70742. y: {
  70743. scrollOffsetAttr: 'scrollTop',
  70744. sizeAttr: 'height',
  70745. scrollSizeAttr: 'scrollHeight',
  70746. offsetSizeAttr: 'offsetHeight',
  70747. offsetAttr: 'top',
  70748. overflowAttr: 'overflowY',
  70749. dragOffset: 0,
  70750. isOverflowing: true,
  70751. isVisible: false,
  70752. forceVisible: false,
  70753. track: {},
  70754. scrollbar: {}
  70755. }
  70756. };
  70757. this.removePreventClickId = null; // Don't re-instantiate over an existing one
  70758. if (SimpleBar.instances.has(this.el)) {
  70759. return;
  70760. }
  70761. this.recalculate = lodash_throttle_default()(this.recalculate.bind(this), 64);
  70762. this.onMouseMove = lodash_throttle_default()(this.onMouseMove.bind(this), 64);
  70763. this.hideScrollbars = lodash_debounce_default()(this.hideScrollbars.bind(this), this.options.timeout);
  70764. this.onWindowResize = lodash_debounce_default()(this.onWindowResize.bind(this), 64, {
  70765. leading: true
  70766. });
  70767. SimpleBar.getRtlHelpers = lodash_memoize_default()(SimpleBar.getRtlHelpers);
  70768. this.init();
  70769. }
  70770. /**
  70771. * Static properties
  70772. */
  70773. /**
  70774. * Helper to fix browsers inconsistency on RTL:
  70775. * - Firefox inverts the scrollbar initial position
  70776. * - IE11 inverts both scrollbar position and scrolling offset
  70777. * Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634
  70778. */
  70779. SimpleBar.getRtlHelpers = function getRtlHelpers() {
  70780. var dummyDiv = document.createElement('div');
  70781. dummyDiv.innerHTML = '<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';
  70782. var scrollbarDummyEl = dummyDiv.firstElementChild;
  70783. document.body.appendChild(scrollbarDummyEl);
  70784. var dummyContainerChild = scrollbarDummyEl.firstElementChild;
  70785. scrollbarDummyEl.scrollLeft = 0;
  70786. var dummyContainerOffset = SimpleBar.getOffset(scrollbarDummyEl);
  70787. var dummyContainerChildOffset = SimpleBar.getOffset(dummyContainerChild);
  70788. scrollbarDummyEl.scrollLeft = 999;
  70789. var dummyContainerScrollOffsetAfterScroll = SimpleBar.getOffset(dummyContainerChild);
  70790. return {
  70791. // determines if the scrolling is responding with negative values
  70792. isRtlScrollingInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left && dummyContainerChildOffset.left - dummyContainerScrollOffsetAfterScroll.left !== 0,
  70793. // determines if the origin scrollbar position is inverted or not (positioned on left or right)
  70794. isRtlScrollbarInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left
  70795. };
  70796. };
  70797. SimpleBar.getOffset = function getOffset(el) {
  70798. var rect = el.getBoundingClientRect();
  70799. var elDocument = getElementDocument(el);
  70800. var elWindow = getElementWindow(el);
  70801. return {
  70802. top: rect.top + (elWindow.pageYOffset || elDocument.documentElement.scrollTop),
  70803. left: rect.left + (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)
  70804. };
  70805. };
  70806. var _proto = SimpleBar.prototype;
  70807. _proto.init = function init() {
  70808. // Save a reference to the instance, so we know this DOM node has already been instancied
  70809. SimpleBar.instances.set(this.el, this); // We stop here on server-side
  70810. if ((can_use_dom_default())) {
  70811. this.initDOM();
  70812. this.scrollbarWidth = this.getScrollbarWidth();
  70813. this.recalculate();
  70814. this.initListeners();
  70815. }
  70816. };
  70817. _proto.initDOM = function initDOM() {
  70818. var _this2 = this;
  70819. // make sure this element doesn't have the elements yet
  70820. if (Array.prototype.filter.call(this.el.children, function (child) {
  70821. return child.classList.contains(_this2.classNames.wrapper);
  70822. }).length) {
  70823. // assume that element has his DOM already initiated
  70824. this.wrapperEl = this.el.querySelector("." + this.classNames.wrapper);
  70825. this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector("." + this.classNames.contentWrapper);
  70826. this.contentEl = this.options.contentNode || this.el.querySelector("." + this.classNames.contentEl);
  70827. this.offsetEl = this.el.querySelector("." + this.classNames.offset);
  70828. this.maskEl = this.el.querySelector("." + this.classNames.mask);
  70829. this.placeholderEl = this.findChild(this.wrapperEl, "." + this.classNames.placeholder);
  70830. this.heightAutoObserverWrapperEl = this.el.querySelector("." + this.classNames.heightAutoObserverWrapperEl);
  70831. this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl);
  70832. this.axis.x.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.horizontal);
  70833. this.axis.y.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.vertical);
  70834. } else {
  70835. // Prepare DOM
  70836. this.wrapperEl = document.createElement('div');
  70837. this.contentWrapperEl = document.createElement('div');
  70838. this.offsetEl = document.createElement('div');
  70839. this.maskEl = document.createElement('div');
  70840. this.contentEl = document.createElement('div');
  70841. this.placeholderEl = document.createElement('div');
  70842. this.heightAutoObserverWrapperEl = document.createElement('div');
  70843. this.heightAutoObserverEl = document.createElement('div');
  70844. this.wrapperEl.classList.add(this.classNames.wrapper);
  70845. this.contentWrapperEl.classList.add(this.classNames.contentWrapper);
  70846. this.offsetEl.classList.add(this.classNames.offset);
  70847. this.maskEl.classList.add(this.classNames.mask);
  70848. this.contentEl.classList.add(this.classNames.contentEl);
  70849. this.placeholderEl.classList.add(this.classNames.placeholder);
  70850. this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl);
  70851. this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);
  70852. while (this.el.firstChild) {
  70853. this.contentEl.appendChild(this.el.firstChild);
  70854. }
  70855. this.contentWrapperEl.appendChild(this.contentEl);
  70856. this.offsetEl.appendChild(this.contentWrapperEl);
  70857. this.maskEl.appendChild(this.offsetEl);
  70858. this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
  70859. this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
  70860. this.wrapperEl.appendChild(this.maskEl);
  70861. this.wrapperEl.appendChild(this.placeholderEl);
  70862. this.el.appendChild(this.wrapperEl);
  70863. }
  70864. if (!this.axis.x.track.el || !this.axis.y.track.el) {
  70865. var track = document.createElement('div');
  70866. var scrollbar = document.createElement('div');
  70867. track.classList.add(this.classNames.track);
  70868. scrollbar.classList.add(this.classNames.scrollbar);
  70869. track.appendChild(scrollbar);
  70870. this.axis.x.track.el = track.cloneNode(true);
  70871. this.axis.x.track.el.classList.add(this.classNames.horizontal);
  70872. this.axis.y.track.el = track.cloneNode(true);
  70873. this.axis.y.track.el.classList.add(this.classNames.vertical);
  70874. this.el.appendChild(this.axis.x.track.el);
  70875. this.el.appendChild(this.axis.y.track.el);
  70876. }
  70877. this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector("." + this.classNames.scrollbar);
  70878. this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector("." + this.classNames.scrollbar);
  70879. if (!this.options.autoHide) {
  70880. this.axis.x.scrollbar.el.classList.add(this.classNames.visible);
  70881. this.axis.y.scrollbar.el.classList.add(this.classNames.visible);
  70882. }
  70883. this.el.setAttribute('data-simplebar', 'init');
  70884. };
  70885. _proto.initListeners = function initListeners() {
  70886. var _this3 = this;
  70887. var elWindow = getElementWindow(this.el); // Event listeners
  70888. if (this.options.autoHide) {
  70889. this.el.addEventListener('mouseenter', this.onMouseEnter);
  70890. }
  70891. ['mousedown', 'click', 'dblclick'].forEach(function (e) {
  70892. _this3.el.addEventListener(e, _this3.onPointerEvent, true);
  70893. });
  70894. ['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
  70895. _this3.el.addEventListener(e, _this3.onPointerEvent, {
  70896. capture: true,
  70897. passive: true
  70898. });
  70899. });
  70900. this.el.addEventListener('mousemove', this.onMouseMove);
  70901. this.el.addEventListener('mouseleave', this.onMouseLeave);
  70902. this.contentWrapperEl.addEventListener('scroll', this.onScroll); // Browser zoom triggers a window resize
  70903. elWindow.addEventListener('resize', this.onWindowResize); // Hack for https://github.com/WICG/ResizeObserver/issues/38
  70904. var resizeObserverStarted = false;
  70905. var resizeObserver = elWindow.ResizeObserver || ResizeObserver_es;
  70906. this.resizeObserver = new resizeObserver(function () {
  70907. if (!resizeObserverStarted) return;
  70908. _this3.recalculate();
  70909. });
  70910. this.resizeObserver.observe(this.el);
  70911. this.resizeObserver.observe(this.contentEl);
  70912. elWindow.requestAnimationFrame(function () {
  70913. resizeObserverStarted = true;
  70914. }); // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
  70915. this.mutationObserver = new elWindow.MutationObserver(this.recalculate);
  70916. this.mutationObserver.observe(this.contentEl, {
  70917. childList: true,
  70918. subtree: true,
  70919. characterData: true
  70920. });
  70921. };
  70922. _proto.recalculate = function recalculate() {
  70923. var elWindow = getElementWindow(this.el);
  70924. this.elStyles = elWindow.getComputedStyle(this.el);
  70925. this.isRtl = this.elStyles.direction === 'rtl';
  70926. var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
  70927. var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
  70928. var contentElOffsetWidth = this.contentEl.offsetWidth;
  70929. var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
  70930. var elOverflowX = this.elStyles.overflowX;
  70931. var elOverflowY = this.elStyles.overflowY;
  70932. this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft;
  70933. this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft;
  70934. var contentElScrollHeight = this.contentEl.scrollHeight;
  70935. var contentElScrollWidth = this.contentEl.scrollWidth;
  70936. this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%'; // Determine placeholder size
  70937. this.placeholderEl.style.width = isWidthAuto ? contentElOffsetWidth + "px" : 'auto';
  70938. this.placeholderEl.style.height = contentElScrollHeight + "px";
  70939. var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
  70940. this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;
  70941. this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
  70942. this.axis.x.isOverflowing = elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
  70943. this.axis.y.isOverflowing = elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;
  70944. this.axis.x.forceVisible = this.options.forceVisible === 'x' || this.options.forceVisible === true;
  70945. this.axis.y.forceVisible = this.options.forceVisible === 'y' || this.options.forceVisible === true;
  70946. this.hideNativeScrollbar(); // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
  70947. var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
  70948. var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
  70949. this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
  70950. this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
  70951. this.axis.x.scrollbar.size = this.getScrollbarSize('x');
  70952. this.axis.y.scrollbar.size = this.getScrollbarSize('y');
  70953. this.axis.x.scrollbar.el.style.width = this.axis.x.scrollbar.size + "px";
  70954. this.axis.y.scrollbar.el.style.height = this.axis.y.scrollbar.size + "px";
  70955. this.positionScrollbar('x');
  70956. this.positionScrollbar('y');
  70957. this.toggleTrackVisibility('x');
  70958. this.toggleTrackVisibility('y');
  70959. }
  70960. /**
  70961. * Calculate scrollbar size
  70962. */
  70963. ;
  70964. _proto.getScrollbarSize = function getScrollbarSize(axis) {
  70965. if (axis === void 0) {
  70966. axis = 'y';
  70967. }
  70968. if (!this.axis[axis].isOverflowing) {
  70969. return 0;
  70970. }
  70971. var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
  70972. var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
  70973. var scrollbarSize;
  70974. var scrollbarRatio = trackSize / contentSize; // Calculate new height/position of drag handle.
  70975. scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
  70976. if (this.options.scrollbarMaxSize) {
  70977. scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
  70978. }
  70979. return scrollbarSize;
  70980. };
  70981. _proto.positionScrollbar = function positionScrollbar(axis) {
  70982. if (axis === void 0) {
  70983. axis = 'y';
  70984. }
  70985. if (!this.axis[axis].isOverflowing) {
  70986. return;
  70987. }
  70988. var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
  70989. var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
  70990. var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
  70991. var scrollbar = this.axis[axis].scrollbar;
  70992. var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
  70993. scrollOffset = axis === 'x' && this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollOffset : scrollOffset;
  70994. var scrollPourcent = scrollOffset / (contentSize - hostSize);
  70995. var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
  70996. handleOffset = axis === 'x' && this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? handleOffset + (trackSize - scrollbar.size) : handleOffset;
  70997. scrollbar.el.style.transform = axis === 'x' ? "translate3d(" + handleOffset + "px, 0, 0)" : "translate3d(0, " + handleOffset + "px, 0)";
  70998. };
  70999. _proto.toggleTrackVisibility = function toggleTrackVisibility(axis) {
  71000. if (axis === void 0) {
  71001. axis = 'y';
  71002. }
  71003. var track = this.axis[axis].track.el;
  71004. var scrollbar = this.axis[axis].scrollbar.el;
  71005. if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
  71006. track.style.visibility = 'visible';
  71007. this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';
  71008. } else {
  71009. track.style.visibility = 'hidden';
  71010. this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';
  71011. } // Even if forceVisible is enabled, scrollbar itself should be hidden
  71012. if (this.axis[axis].isOverflowing) {
  71013. scrollbar.style.display = 'block';
  71014. } else {
  71015. scrollbar.style.display = 'none';
  71016. }
  71017. };
  71018. _proto.hideNativeScrollbar = function hideNativeScrollbar() {
  71019. this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
  71020. this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
  71021. }
  71022. /**
  71023. * On scroll event handling
  71024. */
  71025. ;
  71026. _proto.onMouseMoveForAxis = function onMouseMoveForAxis(axis) {
  71027. if (axis === void 0) {
  71028. axis = 'y';
  71029. }
  71030. this.axis[axis].track.rect = this.axis[axis].track.el.getBoundingClientRect();
  71031. this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
  71032. var isWithinScrollbarBoundsX = this.isWithinBounds(this.axis[axis].scrollbar.rect);
  71033. if (isWithinScrollbarBoundsX) {
  71034. this.axis[axis].scrollbar.el.classList.add(this.classNames.hover);
  71035. } else {
  71036. this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
  71037. }
  71038. if (this.isWithinBounds(this.axis[axis].track.rect)) {
  71039. this.showScrollbar(axis);
  71040. this.axis[axis].track.el.classList.add(this.classNames.hover);
  71041. } else {
  71042. this.axis[axis].track.el.classList.remove(this.classNames.hover);
  71043. }
  71044. };
  71045. _proto.onMouseLeaveForAxis = function onMouseLeaveForAxis(axis) {
  71046. if (axis === void 0) {
  71047. axis = 'y';
  71048. }
  71049. this.axis[axis].track.el.classList.remove(this.classNames.hover);
  71050. this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
  71051. };
  71052. /**
  71053. * Show scrollbar
  71054. */
  71055. _proto.showScrollbar = function showScrollbar(axis) {
  71056. if (axis === void 0) {
  71057. axis = 'y';
  71058. }
  71059. var scrollbar = this.axis[axis].scrollbar.el;
  71060. if (!this.axis[axis].isVisible) {
  71061. scrollbar.classList.add(this.classNames.visible);
  71062. this.axis[axis].isVisible = true;
  71063. }
  71064. if (this.options.autoHide) {
  71065. this.hideScrollbars();
  71066. }
  71067. }
  71068. /**
  71069. * Hide Scrollbar
  71070. */
  71071. ;
  71072. /**
  71073. * on scrollbar handle drag movement starts
  71074. */
  71075. _proto.onDragStart = function onDragStart(e, axis) {
  71076. if (axis === void 0) {
  71077. axis = 'y';
  71078. }
  71079. var elDocument = getElementDocument(this.el);
  71080. var elWindow = getElementWindow(this.el);
  71081. var scrollbar = this.axis[axis].scrollbar; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
  71082. var eventOffset = axis === 'y' ? e.pageY : e.pageX;
  71083. this.axis[axis].dragOffset = eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];
  71084. this.draggedAxis = axis;
  71085. this.el.classList.add(this.classNames.dragging);
  71086. elDocument.addEventListener('mousemove', this.drag, true);
  71087. elDocument.addEventListener('mouseup', this.onEndDrag, true);
  71088. if (this.removePreventClickId === null) {
  71089. elDocument.addEventListener('click', this.preventClick, true);
  71090. elDocument.addEventListener('dblclick', this.preventClick, true);
  71091. } else {
  71092. elWindow.clearTimeout(this.removePreventClickId);
  71093. this.removePreventClickId = null;
  71094. }
  71095. }
  71096. /**
  71097. * Drag scrollbar handle
  71098. */
  71099. ;
  71100. _proto.onTrackClick = function onTrackClick(e, axis) {
  71101. var _this4 = this;
  71102. if (axis === void 0) {
  71103. axis = 'y';
  71104. }
  71105. if (!this.options.clickOnTrack) return;
  71106. var elWindow = getElementWindow(this.el);
  71107. this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
  71108. var scrollbar = this.axis[axis].scrollbar;
  71109. var scrollbarOffset = scrollbar.rect[this.axis[axis].offsetAttr];
  71110. var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
  71111. var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
  71112. var t = axis === 'y' ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
  71113. var dir = t < 0 ? -1 : 1;
  71114. var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
  71115. var scrollTo = function scrollTo() {
  71116. if (dir === -1) {
  71117. if (scrolled > scrollSize) {
  71118. var _this4$contentWrapper;
  71119. scrolled -= _this4.options.clickOnTrackSpeed;
  71120. _this4.contentWrapperEl.scrollTo((_this4$contentWrapper = {}, _this4$contentWrapper[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper));
  71121. elWindow.requestAnimationFrame(scrollTo);
  71122. }
  71123. } else {
  71124. if (scrolled < scrollSize) {
  71125. var _this4$contentWrapper2;
  71126. scrolled += _this4.options.clickOnTrackSpeed;
  71127. _this4.contentWrapperEl.scrollTo((_this4$contentWrapper2 = {}, _this4$contentWrapper2[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper2));
  71128. elWindow.requestAnimationFrame(scrollTo);
  71129. }
  71130. }
  71131. };
  71132. scrollTo();
  71133. }
  71134. /**
  71135. * Getter for content element
  71136. */
  71137. ;
  71138. _proto.getContentElement = function getContentElement() {
  71139. return this.contentEl;
  71140. }
  71141. /**
  71142. * Getter for original scrolling element
  71143. */
  71144. ;
  71145. _proto.getScrollElement = function getScrollElement() {
  71146. return this.contentWrapperEl;
  71147. };
  71148. _proto.getScrollbarWidth = function getScrollbarWidth() {
  71149. // Try/catch for FF 56 throwing on undefined computedStyles
  71150. try {
  71151. // Detect browsers supporting CSS scrollbar styling and do not calculate
  71152. if (getComputedStyle(this.contentWrapperEl, '::-webkit-scrollbar').display === 'none' || 'scrollbarWidth' in document.documentElement.style || '-ms-overflow-style' in document.documentElement.style) {
  71153. return 0;
  71154. } else {
  71155. return scrollbarWidth(this.el);
  71156. }
  71157. } catch (e) {
  71158. return scrollbarWidth(this.el);
  71159. }
  71160. };
  71161. _proto.removeListeners = function removeListeners() {
  71162. var _this5 = this;
  71163. var elWindow = getElementWindow(this.el); // Event listeners
  71164. if (this.options.autoHide) {
  71165. this.el.removeEventListener('mouseenter', this.onMouseEnter);
  71166. }
  71167. ['mousedown', 'click', 'dblclick'].forEach(function (e) {
  71168. _this5.el.removeEventListener(e, _this5.onPointerEvent, true);
  71169. });
  71170. ['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
  71171. _this5.el.removeEventListener(e, _this5.onPointerEvent, {
  71172. capture: true,
  71173. passive: true
  71174. });
  71175. });
  71176. this.el.removeEventListener('mousemove', this.onMouseMove);
  71177. this.el.removeEventListener('mouseleave', this.onMouseLeave);
  71178. if (this.contentWrapperEl) {
  71179. this.contentWrapperEl.removeEventListener('scroll', this.onScroll);
  71180. }
  71181. elWindow.removeEventListener('resize', this.onWindowResize);
  71182. if (this.mutationObserver) {
  71183. this.mutationObserver.disconnect();
  71184. }
  71185. if (this.resizeObserver) {
  71186. this.resizeObserver.disconnect();
  71187. } // Cancel all debounced functions
  71188. this.recalculate.cancel();
  71189. this.onMouseMove.cancel();
  71190. this.hideScrollbars.cancel();
  71191. this.onWindowResize.cancel();
  71192. }
  71193. /**
  71194. * UnMount mutation observer and delete SimpleBar instance from DOM element
  71195. */
  71196. ;
  71197. _proto.unMount = function unMount() {
  71198. this.removeListeners();
  71199. SimpleBar.instances.delete(this.el);
  71200. }
  71201. /**
  71202. * Check if mouse is within bounds
  71203. */
  71204. ;
  71205. _proto.isWithinBounds = function isWithinBounds(bbox) {
  71206. return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
  71207. }
  71208. /**
  71209. * Find element children matches query
  71210. */
  71211. ;
  71212. _proto.findChild = function findChild(el, query) {
  71213. var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
  71214. return Array.prototype.filter.call(el.children, function (child) {
  71215. return matches.call(child, query);
  71216. })[0];
  71217. };
  71218. return SimpleBar;
  71219. }();
  71220. SimpleBar.defaultOptions = {
  71221. autoHide: true,
  71222. forceVisible: false,
  71223. clickOnTrack: true,
  71224. clickOnTrackSpeed: 40,
  71225. classNames: {
  71226. contentEl: 'simplebar-content',
  71227. contentWrapper: 'simplebar-content-wrapper',
  71228. offset: 'simplebar-offset',
  71229. mask: 'simplebar-mask',
  71230. wrapper: 'simplebar-wrapper',
  71231. placeholder: 'simplebar-placeholder',
  71232. scrollbar: 'simplebar-scrollbar',
  71233. track: 'simplebar-track',
  71234. heightAutoObserverWrapperEl: 'simplebar-height-auto-observer-wrapper',
  71235. heightAutoObserverEl: 'simplebar-height-auto-observer',
  71236. visible: 'simplebar-visible',
  71237. horizontal: 'simplebar-horizontal',
  71238. vertical: 'simplebar-vertical',
  71239. hover: 'simplebar-hover',
  71240. dragging: 'simplebar-dragging'
  71241. },
  71242. scrollbarMinSize: 25,
  71243. scrollbarMaxSize: 0,
  71244. timeout: 1000
  71245. };
  71246. SimpleBar.instances = new WeakMap();
  71247. SimpleBar.initDOMLoadedElements = function () {
  71248. document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
  71249. window.removeEventListener('load', this.initDOMLoadedElements);
  71250. Array.prototype.forEach.call(document.querySelectorAll('[data-simplebar]'), function (el) {
  71251. if (el.getAttribute('data-simplebar') !== 'init' && !SimpleBar.instances.has(el)) new SimpleBar(el, getOptions(el.attributes));
  71252. });
  71253. };
  71254. SimpleBar.removeObserver = function () {
  71255. this.globalObserver.disconnect();
  71256. };
  71257. SimpleBar.initHtmlApi = function () {
  71258. this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
  71259. if (typeof MutationObserver !== 'undefined') {
  71260. // Mutation observer to observe dynamically added elements
  71261. this.globalObserver = new MutationObserver(SimpleBar.handleMutations);
  71262. this.globalObserver.observe(document, {
  71263. childList: true,
  71264. subtree: true
  71265. });
  71266. } // Taken from jQuery `ready` function
  71267. // Instantiate elements already present on the page
  71268. if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
  71269. // Handle it asynchronously to allow scripts the opportunity to delay init
  71270. window.setTimeout(this.initDOMLoadedElements);
  71271. } else {
  71272. document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
  71273. window.addEventListener('load', this.initDOMLoadedElements);
  71274. }
  71275. };
  71276. SimpleBar.handleMutations = function (mutations) {
  71277. mutations.forEach(function (mutation) {
  71278. Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
  71279. if (addedNode.nodeType === 1) {
  71280. if (addedNode.hasAttribute('data-simplebar')) {
  71281. !SimpleBar.instances.has(addedNode) && new SimpleBar(addedNode, getOptions(addedNode.attributes));
  71282. } else {
  71283. Array.prototype.forEach.call(addedNode.querySelectorAll('[data-simplebar]'), function (el) {
  71284. if (el.getAttribute('data-simplebar') !== 'init' && !SimpleBar.instances.has(el)) new SimpleBar(el, getOptions(el.attributes));
  71285. });
  71286. }
  71287. }
  71288. });
  71289. Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
  71290. if (removedNode.nodeType === 1) {
  71291. if (removedNode.hasAttribute('[data-simplebar="init"]')) {
  71292. SimpleBar.instances.has(removedNode) && SimpleBar.instances.get(removedNode).unMount();
  71293. } else {
  71294. Array.prototype.forEach.call(removedNode.querySelectorAll('[data-simplebar="init"]'), function (el) {
  71295. SimpleBar.instances.has(el) && SimpleBar.instances.get(el).unMount();
  71296. });
  71297. }
  71298. }
  71299. });
  71300. });
  71301. };
  71302. SimpleBar.getOptions = getOptions;
  71303. /**
  71304. * HTML API
  71305. * Called only in a browser env.
  71306. */
  71307. if ((can_use_dom_default())) {
  71308. SimpleBar.initHtmlApi();
  71309. }
  71310. /* harmony default export */ const simplebar_esm = ((/* unused pure expression or super */ null && (SimpleBar)));
  71311. //# sourceMappingURL=simplebar.esm.js.map
  71312. /***/ }),
  71313. /***/ 86653:
  71314. /***/ ((module) => {
  71315. module.exports = function (it) {
  71316. if (typeof it != 'function') {
  71317. throw TypeError(String(it) + ' is not a function');
  71318. } return it;
  71319. };
  71320. /***/ }),
  71321. /***/ 52004:
  71322. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71323. var isObject = __webpack_require__(65896);
  71324. module.exports = function (it) {
  71325. if (!isObject(it) && it !== null) {
  71326. throw TypeError("Can't set " + String(it) + ' as a prototype');
  71327. } return it;
  71328. };
  71329. /***/ }),
  71330. /***/ 29256:
  71331. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71332. var wellKnownSymbol = __webpack_require__(48149);
  71333. var create = __webpack_require__(31525);
  71334. var definePropertyModule = __webpack_require__(79168);
  71335. var UNSCOPABLES = wellKnownSymbol('unscopables');
  71336. var ArrayPrototype = Array.prototype;
  71337. // Array.prototype[@@unscopables]
  71338. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  71339. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  71340. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  71341. configurable: true,
  71342. value: create(null)
  71343. });
  71344. }
  71345. // add a key to Array.prototype[@@unscopables]
  71346. module.exports = function (key) {
  71347. ArrayPrototype[UNSCOPABLES][key] = true;
  71348. };
  71349. /***/ }),
  71350. /***/ 53615:
  71351. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71352. "use strict";
  71353. var charAt = __webpack_require__(27321).charAt;
  71354. // `AdvanceStringIndex` abstract operation
  71355. // https://tc39.github.io/ecma262/#sec-advancestringindex
  71356. module.exports = function (S, index, unicode) {
  71357. return index + (unicode ? charAt(S, index).length : 1);
  71358. };
  71359. /***/ }),
  71360. /***/ 81748:
  71361. /***/ ((module) => {
  71362. module.exports = function (it, Constructor, name) {
  71363. if (!(it instanceof Constructor)) {
  71364. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  71365. } return it;
  71366. };
  71367. /***/ }),
  71368. /***/ 71474:
  71369. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71370. var isObject = __webpack_require__(65896);
  71371. module.exports = function (it) {
  71372. if (!isObject(it)) {
  71373. throw TypeError(String(it) + ' is not an object');
  71374. } return it;
  71375. };
  71376. /***/ }),
  71377. /***/ 81269:
  71378. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71379. "use strict";
  71380. var $forEach = __webpack_require__(20528).forEach;
  71381. var arrayMethodIsStrict = __webpack_require__(1923);
  71382. var arrayMethodUsesToLength = __webpack_require__(55714);
  71383. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  71384. var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');
  71385. // `Array.prototype.forEach` method implementation
  71386. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  71387. module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
  71388. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  71389. } : [].forEach;
  71390. /***/ }),
  71391. /***/ 65675:
  71392. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71393. var toIndexedObject = __webpack_require__(43206);
  71394. var toLength = __webpack_require__(93917);
  71395. var toAbsoluteIndex = __webpack_require__(19623);
  71396. // `Array.prototype.{ indexOf, includes }` methods implementation
  71397. var createMethod = function (IS_INCLUDES) {
  71398. return function ($this, el, fromIndex) {
  71399. var O = toIndexedObject($this);
  71400. var length = toLength(O.length);
  71401. var index = toAbsoluteIndex(fromIndex, length);
  71402. var value;
  71403. // Array#includes uses SameValueZero equality algorithm
  71404. // eslint-disable-next-line no-self-compare
  71405. if (IS_INCLUDES && el != el) while (length > index) {
  71406. value = O[index++];
  71407. // eslint-disable-next-line no-self-compare
  71408. if (value != value) return true;
  71409. // Array#indexOf ignores holes, Array#includes - not
  71410. } else for (;length > index; index++) {
  71411. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  71412. } return !IS_INCLUDES && -1;
  71413. };
  71414. };
  71415. module.exports = {
  71416. // `Array.prototype.includes` method
  71417. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  71418. includes: createMethod(true),
  71419. // `Array.prototype.indexOf` method
  71420. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  71421. indexOf: createMethod(false)
  71422. };
  71423. /***/ }),
  71424. /***/ 20528:
  71425. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71426. var bind = __webpack_require__(81098);
  71427. var IndexedObject = __webpack_require__(87530);
  71428. var toObject = __webpack_require__(29473);
  71429. var toLength = __webpack_require__(93917);
  71430. var arraySpeciesCreate = __webpack_require__(72768);
  71431. var push = [].push;
  71432. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  71433. var createMethod = function (TYPE) {
  71434. var IS_MAP = TYPE == 1;
  71435. var IS_FILTER = TYPE == 2;
  71436. var IS_SOME = TYPE == 3;
  71437. var IS_EVERY = TYPE == 4;
  71438. var IS_FIND_INDEX = TYPE == 6;
  71439. var IS_FILTER_OUT = TYPE == 7;
  71440. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  71441. return function ($this, callbackfn, that, specificCreate) {
  71442. var O = toObject($this);
  71443. var self = IndexedObject(O);
  71444. var boundFunction = bind(callbackfn, that, 3);
  71445. var length = toLength(self.length);
  71446. var index = 0;
  71447. var create = specificCreate || arraySpeciesCreate;
  71448. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  71449. var value, result;
  71450. for (;length > index; index++) if (NO_HOLES || index in self) {
  71451. value = self[index];
  71452. result = boundFunction(value, index, O);
  71453. if (TYPE) {
  71454. if (IS_MAP) target[index] = result; // map
  71455. else if (result) switch (TYPE) {
  71456. case 3: return true; // some
  71457. case 5: return value; // find
  71458. case 6: return index; // findIndex
  71459. case 2: push.call(target, value); // filter
  71460. } else switch (TYPE) {
  71461. case 4: return false; // every
  71462. case 7: push.call(target, value); // filterOut
  71463. }
  71464. }
  71465. }
  71466. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  71467. };
  71468. };
  71469. module.exports = {
  71470. // `Array.prototype.forEach` method
  71471. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  71472. forEach: createMethod(0),
  71473. // `Array.prototype.map` method
  71474. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  71475. map: createMethod(1),
  71476. // `Array.prototype.filter` method
  71477. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  71478. filter: createMethod(2),
  71479. // `Array.prototype.some` method
  71480. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  71481. some: createMethod(3),
  71482. // `Array.prototype.every` method
  71483. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  71484. every: createMethod(4),
  71485. // `Array.prototype.find` method
  71486. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  71487. find: createMethod(5),
  71488. // `Array.prototype.findIndex` method
  71489. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  71490. findIndex: createMethod(6),
  71491. // `Array.prototype.filterOut` method
  71492. // https://github.com/tc39/proposal-array-filtering
  71493. filterOut: createMethod(7)
  71494. };
  71495. /***/ }),
  71496. /***/ 44820:
  71497. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71498. var fails = __webpack_require__(56183);
  71499. var wellKnownSymbol = __webpack_require__(48149);
  71500. var V8_VERSION = __webpack_require__(24324);
  71501. var SPECIES = wellKnownSymbol('species');
  71502. module.exports = function (METHOD_NAME) {
  71503. // We can't use this feature detection in V8 since it causes
  71504. // deoptimization and serious performance degradation
  71505. // https://github.com/zloirock/core-js/issues/677
  71506. return V8_VERSION >= 51 || !fails(function () {
  71507. var array = [];
  71508. var constructor = array.constructor = {};
  71509. constructor[SPECIES] = function () {
  71510. return { foo: 1 };
  71511. };
  71512. return array[METHOD_NAME](Boolean).foo !== 1;
  71513. });
  71514. };
  71515. /***/ }),
  71516. /***/ 1923:
  71517. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71518. "use strict";
  71519. var fails = __webpack_require__(56183);
  71520. module.exports = function (METHOD_NAME, argument) {
  71521. var method = [][METHOD_NAME];
  71522. return !!method && fails(function () {
  71523. // eslint-disable-next-line no-useless-call,no-throw-literal
  71524. method.call(null, argument || function () { throw 1; }, 1);
  71525. });
  71526. };
  71527. /***/ }),
  71528. /***/ 55714:
  71529. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71530. var DESCRIPTORS = __webpack_require__(70723);
  71531. var fails = __webpack_require__(56183);
  71532. var has = __webpack_require__(53520);
  71533. var defineProperty = Object.defineProperty;
  71534. var cache = {};
  71535. var thrower = function (it) { throw it; };
  71536. module.exports = function (METHOD_NAME, options) {
  71537. if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
  71538. if (!options) options = {};
  71539. var method = [][METHOD_NAME];
  71540. var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
  71541. var argument0 = has(options, 0) ? options[0] : thrower;
  71542. var argument1 = has(options, 1) ? options[1] : undefined;
  71543. return cache[METHOD_NAME] = !!method && !fails(function () {
  71544. if (ACCESSORS && !DESCRIPTORS) return true;
  71545. var O = { length: -1 };
  71546. if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
  71547. else O[1] = 1;
  71548. method.call(O, argument0, argument1);
  71549. });
  71550. };
  71551. /***/ }),
  71552. /***/ 26589:
  71553. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71554. var aFunction = __webpack_require__(86653);
  71555. var toObject = __webpack_require__(29473);
  71556. var IndexedObject = __webpack_require__(87530);
  71557. var toLength = __webpack_require__(93917);
  71558. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  71559. var createMethod = function (IS_RIGHT) {
  71560. return function (that, callbackfn, argumentsLength, memo) {
  71561. aFunction(callbackfn);
  71562. var O = toObject(that);
  71563. var self = IndexedObject(O);
  71564. var length = toLength(O.length);
  71565. var index = IS_RIGHT ? length - 1 : 0;
  71566. var i = IS_RIGHT ? -1 : 1;
  71567. if (argumentsLength < 2) while (true) {
  71568. if (index in self) {
  71569. memo = self[index];
  71570. index += i;
  71571. break;
  71572. }
  71573. index += i;
  71574. if (IS_RIGHT ? index < 0 : length <= index) {
  71575. throw TypeError('Reduce of empty array with no initial value');
  71576. }
  71577. }
  71578. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  71579. memo = callbackfn(memo, self[index], index, O);
  71580. }
  71581. return memo;
  71582. };
  71583. };
  71584. module.exports = {
  71585. // `Array.prototype.reduce` method
  71586. // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
  71587. left: createMethod(false),
  71588. // `Array.prototype.reduceRight` method
  71589. // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
  71590. right: createMethod(true)
  71591. };
  71592. /***/ }),
  71593. /***/ 72768:
  71594. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71595. var isObject = __webpack_require__(65896);
  71596. var isArray = __webpack_require__(27931);
  71597. var wellKnownSymbol = __webpack_require__(48149);
  71598. var SPECIES = wellKnownSymbol('species');
  71599. // `ArraySpeciesCreate` abstract operation
  71600. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  71601. module.exports = function (originalArray, length) {
  71602. var C;
  71603. if (isArray(originalArray)) {
  71604. C = originalArray.constructor;
  71605. // cross-realm fallback
  71606. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  71607. else if (isObject(C)) {
  71608. C = C[SPECIES];
  71609. if (C === null) C = undefined;
  71610. }
  71611. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  71612. };
  71613. /***/ }),
  71614. /***/ 1751:
  71615. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71616. var wellKnownSymbol = __webpack_require__(48149);
  71617. var ITERATOR = wellKnownSymbol('iterator');
  71618. var SAFE_CLOSING = false;
  71619. try {
  71620. var called = 0;
  71621. var iteratorWithReturn = {
  71622. next: function () {
  71623. return { done: !!called++ };
  71624. },
  71625. 'return': function () {
  71626. SAFE_CLOSING = true;
  71627. }
  71628. };
  71629. iteratorWithReturn[ITERATOR] = function () {
  71630. return this;
  71631. };
  71632. // eslint-disable-next-line no-throw-literal
  71633. Array.from(iteratorWithReturn, function () { throw 2; });
  71634. } catch (error) { /* empty */ }
  71635. module.exports = function (exec, SKIP_CLOSING) {
  71636. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  71637. var ITERATION_SUPPORT = false;
  71638. try {
  71639. var object = {};
  71640. object[ITERATOR] = function () {
  71641. return {
  71642. next: function () {
  71643. return { done: ITERATION_SUPPORT = true };
  71644. }
  71645. };
  71646. };
  71647. exec(object);
  71648. } catch (error) { /* empty */ }
  71649. return ITERATION_SUPPORT;
  71650. };
  71651. /***/ }),
  71652. /***/ 41510:
  71653. /***/ ((module) => {
  71654. var toString = {}.toString;
  71655. module.exports = function (it) {
  71656. return toString.call(it).slice(8, -1);
  71657. };
  71658. /***/ }),
  71659. /***/ 59225:
  71660. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71661. var TO_STRING_TAG_SUPPORT = __webpack_require__(94823);
  71662. var classofRaw = __webpack_require__(41510);
  71663. var wellKnownSymbol = __webpack_require__(48149);
  71664. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  71665. // ES3 wrong here
  71666. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  71667. // fallback for IE11 Script Access Denied error
  71668. var tryGet = function (it, key) {
  71669. try {
  71670. return it[key];
  71671. } catch (error) { /* empty */ }
  71672. };
  71673. // getting tag from ES6+ `Object.prototype.toString`
  71674. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  71675. var O, tag, result;
  71676. return it === undefined ? 'Undefined' : it === null ? 'Null'
  71677. // @@toStringTag case
  71678. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  71679. // builtinTag case
  71680. : CORRECT_ARGUMENTS ? classofRaw(O)
  71681. // ES3 arguments fallback
  71682. : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
  71683. };
  71684. /***/ }),
  71685. /***/ 77790:
  71686. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71687. "use strict";
  71688. var redefineAll = __webpack_require__(19573);
  71689. var getWeakData = __webpack_require__(96582).getWeakData;
  71690. var anObject = __webpack_require__(71474);
  71691. var isObject = __webpack_require__(65896);
  71692. var anInstance = __webpack_require__(81748);
  71693. var iterate = __webpack_require__(21518);
  71694. var ArrayIterationModule = __webpack_require__(20528);
  71695. var $has = __webpack_require__(53520);
  71696. var InternalStateModule = __webpack_require__(41030);
  71697. var setInternalState = InternalStateModule.set;
  71698. var internalStateGetterFor = InternalStateModule.getterFor;
  71699. var find = ArrayIterationModule.find;
  71700. var findIndex = ArrayIterationModule.findIndex;
  71701. var id = 0;
  71702. // fallback for uncaught frozen keys
  71703. var uncaughtFrozenStore = function (store) {
  71704. return store.frozen || (store.frozen = new UncaughtFrozenStore());
  71705. };
  71706. var UncaughtFrozenStore = function () {
  71707. this.entries = [];
  71708. };
  71709. var findUncaughtFrozen = function (store, key) {
  71710. return find(store.entries, function (it) {
  71711. return it[0] === key;
  71712. });
  71713. };
  71714. UncaughtFrozenStore.prototype = {
  71715. get: function (key) {
  71716. var entry = findUncaughtFrozen(this, key);
  71717. if (entry) return entry[1];
  71718. },
  71719. has: function (key) {
  71720. return !!findUncaughtFrozen(this, key);
  71721. },
  71722. set: function (key, value) {
  71723. var entry = findUncaughtFrozen(this, key);
  71724. if (entry) entry[1] = value;
  71725. else this.entries.push([key, value]);
  71726. },
  71727. 'delete': function (key) {
  71728. var index = findIndex(this.entries, function (it) {
  71729. return it[0] === key;
  71730. });
  71731. if (~index) this.entries.splice(index, 1);
  71732. return !!~index;
  71733. }
  71734. };
  71735. module.exports = {
  71736. getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
  71737. var C = wrapper(function (that, iterable) {
  71738. anInstance(that, C, CONSTRUCTOR_NAME);
  71739. setInternalState(that, {
  71740. type: CONSTRUCTOR_NAME,
  71741. id: id++,
  71742. frozen: undefined
  71743. });
  71744. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  71745. });
  71746. var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
  71747. var define = function (that, key, value) {
  71748. var state = getInternalState(that);
  71749. var data = getWeakData(anObject(key), true);
  71750. if (data === true) uncaughtFrozenStore(state).set(key, value);
  71751. else data[state.id] = value;
  71752. return that;
  71753. };
  71754. redefineAll(C.prototype, {
  71755. // 23.3.3.2 WeakMap.prototype.delete(key)
  71756. // 23.4.3.3 WeakSet.prototype.delete(value)
  71757. 'delete': function (key) {
  71758. var state = getInternalState(this);
  71759. if (!isObject(key)) return false;
  71760. var data = getWeakData(key);
  71761. if (data === true) return uncaughtFrozenStore(state)['delete'](key);
  71762. return data && $has(data, state.id) && delete data[state.id];
  71763. },
  71764. // 23.3.3.4 WeakMap.prototype.has(key)
  71765. // 23.4.3.4 WeakSet.prototype.has(value)
  71766. has: function has(key) {
  71767. var state = getInternalState(this);
  71768. if (!isObject(key)) return false;
  71769. var data = getWeakData(key);
  71770. if (data === true) return uncaughtFrozenStore(state).has(key);
  71771. return data && $has(data, state.id);
  71772. }
  71773. });
  71774. redefineAll(C.prototype, IS_MAP ? {
  71775. // 23.3.3.3 WeakMap.prototype.get(key)
  71776. get: function get(key) {
  71777. var state = getInternalState(this);
  71778. if (isObject(key)) {
  71779. var data = getWeakData(key);
  71780. if (data === true) return uncaughtFrozenStore(state).get(key);
  71781. return data ? data[state.id] : undefined;
  71782. }
  71783. },
  71784. // 23.3.3.5 WeakMap.prototype.set(key, value)
  71785. set: function set(key, value) {
  71786. return define(this, key, value);
  71787. }
  71788. } : {
  71789. // 23.4.3.1 WeakSet.prototype.add(value)
  71790. add: function add(value) {
  71791. return define(this, value, true);
  71792. }
  71793. });
  71794. return C;
  71795. }
  71796. };
  71797. /***/ }),
  71798. /***/ 96645:
  71799. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71800. "use strict";
  71801. var $ = __webpack_require__(54761);
  71802. var global = __webpack_require__(8454);
  71803. var isForced = __webpack_require__(31949);
  71804. var redefine = __webpack_require__(23971);
  71805. var InternalMetadataModule = __webpack_require__(96582);
  71806. var iterate = __webpack_require__(21518);
  71807. var anInstance = __webpack_require__(81748);
  71808. var isObject = __webpack_require__(65896);
  71809. var fails = __webpack_require__(56183);
  71810. var checkCorrectnessOfIteration = __webpack_require__(1751);
  71811. var setToStringTag = __webpack_require__(30820);
  71812. var inheritIfRequired = __webpack_require__(67770);
  71813. module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
  71814. var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
  71815. var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
  71816. var ADDER = IS_MAP ? 'set' : 'add';
  71817. var NativeConstructor = global[CONSTRUCTOR_NAME];
  71818. var NativePrototype = NativeConstructor && NativeConstructor.prototype;
  71819. var Constructor = NativeConstructor;
  71820. var exported = {};
  71821. var fixMethod = function (KEY) {
  71822. var nativeMethod = NativePrototype[KEY];
  71823. redefine(NativePrototype, KEY,
  71824. KEY == 'add' ? function add(value) {
  71825. nativeMethod.call(this, value === 0 ? 0 : value);
  71826. return this;
  71827. } : KEY == 'delete' ? function (key) {
  71828. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  71829. } : KEY == 'get' ? function get(key) {
  71830. return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
  71831. } : KEY == 'has' ? function has(key) {
  71832. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  71833. } : function set(key, value) {
  71834. nativeMethod.call(this, key === 0 ? 0 : key, value);
  71835. return this;
  71836. }
  71837. );
  71838. };
  71839. // eslint-disable-next-line max-len
  71840. if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
  71841. new NativeConstructor().entries().next();
  71842. })))) {
  71843. // create collection constructor
  71844. Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
  71845. InternalMetadataModule.REQUIRED = true;
  71846. } else if (isForced(CONSTRUCTOR_NAME, true)) {
  71847. var instance = new Constructor();
  71848. // early implementations not supports chaining
  71849. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  71850. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  71851. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  71852. // most early implementations doesn't supports iterables, most modern - not close it correctly
  71853. // eslint-disable-next-line no-new
  71854. var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
  71855. // for early implementations -0 and +0 not the same
  71856. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  71857. // V8 ~ Chromium 42- fails only with 5+ elements
  71858. var $instance = new NativeConstructor();
  71859. var index = 5;
  71860. while (index--) $instance[ADDER](index, index);
  71861. return !$instance.has(-0);
  71862. });
  71863. if (!ACCEPT_ITERABLES) {
  71864. Constructor = wrapper(function (dummy, iterable) {
  71865. anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
  71866. var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
  71867. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  71868. return that;
  71869. });
  71870. Constructor.prototype = NativePrototype;
  71871. NativePrototype.constructor = Constructor;
  71872. }
  71873. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  71874. fixMethod('delete');
  71875. fixMethod('has');
  71876. IS_MAP && fixMethod('get');
  71877. }
  71878. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  71879. // weak collections should not contains .clear method
  71880. if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
  71881. }
  71882. exported[CONSTRUCTOR_NAME] = Constructor;
  71883. $({ global: true, forced: Constructor != NativeConstructor }, exported);
  71884. setToStringTag(Constructor, CONSTRUCTOR_NAME);
  71885. if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
  71886. return Constructor;
  71887. };
  71888. /***/ }),
  71889. /***/ 60882:
  71890. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71891. var has = __webpack_require__(53520);
  71892. var ownKeys = __webpack_require__(21441);
  71893. var getOwnPropertyDescriptorModule = __webpack_require__(35663);
  71894. var definePropertyModule = __webpack_require__(79168);
  71895. module.exports = function (target, source) {
  71896. var keys = ownKeys(source);
  71897. var defineProperty = definePropertyModule.f;
  71898. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  71899. for (var i = 0; i < keys.length; i++) {
  71900. var key = keys[i];
  71901. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  71902. }
  71903. };
  71904. /***/ }),
  71905. /***/ 97401:
  71906. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71907. var fails = __webpack_require__(56183);
  71908. module.exports = !fails(function () {
  71909. function F() { /* empty */ }
  71910. F.prototype.constructor = null;
  71911. return Object.getPrototypeOf(new F()) !== F.prototype;
  71912. });
  71913. /***/ }),
  71914. /***/ 2538:
  71915. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71916. "use strict";
  71917. var IteratorPrototype = __webpack_require__(66524).IteratorPrototype;
  71918. var create = __webpack_require__(31525);
  71919. var createPropertyDescriptor = __webpack_require__(49273);
  71920. var setToStringTag = __webpack_require__(30820);
  71921. var Iterators = __webpack_require__(96126);
  71922. var returnThis = function () { return this; };
  71923. module.exports = function (IteratorConstructor, NAME, next) {
  71924. var TO_STRING_TAG = NAME + ' Iterator';
  71925. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  71926. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  71927. Iterators[TO_STRING_TAG] = returnThis;
  71928. return IteratorConstructor;
  71929. };
  71930. /***/ }),
  71931. /***/ 31501:
  71932. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71933. var DESCRIPTORS = __webpack_require__(70723);
  71934. var definePropertyModule = __webpack_require__(79168);
  71935. var createPropertyDescriptor = __webpack_require__(49273);
  71936. module.exports = DESCRIPTORS ? function (object, key, value) {
  71937. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  71938. } : function (object, key, value) {
  71939. object[key] = value;
  71940. return object;
  71941. };
  71942. /***/ }),
  71943. /***/ 49273:
  71944. /***/ ((module) => {
  71945. module.exports = function (bitmap, value) {
  71946. return {
  71947. enumerable: !(bitmap & 1),
  71948. configurable: !(bitmap & 2),
  71949. writable: !(bitmap & 4),
  71950. value: value
  71951. };
  71952. };
  71953. /***/ }),
  71954. /***/ 57583:
  71955. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71956. "use strict";
  71957. var $ = __webpack_require__(54761);
  71958. var createIteratorConstructor = __webpack_require__(2538);
  71959. var getPrototypeOf = __webpack_require__(64204);
  71960. var setPrototypeOf = __webpack_require__(75900);
  71961. var setToStringTag = __webpack_require__(30820);
  71962. var createNonEnumerableProperty = __webpack_require__(31501);
  71963. var redefine = __webpack_require__(23971);
  71964. var wellKnownSymbol = __webpack_require__(48149);
  71965. var IS_PURE = __webpack_require__(23556);
  71966. var Iterators = __webpack_require__(96126);
  71967. var IteratorsCore = __webpack_require__(66524);
  71968. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  71969. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  71970. var ITERATOR = wellKnownSymbol('iterator');
  71971. var KEYS = 'keys';
  71972. var VALUES = 'values';
  71973. var ENTRIES = 'entries';
  71974. var returnThis = function () { return this; };
  71975. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  71976. createIteratorConstructor(IteratorConstructor, NAME, next);
  71977. var getIterationMethod = function (KIND) {
  71978. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  71979. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  71980. switch (KIND) {
  71981. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  71982. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  71983. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  71984. } return function () { return new IteratorConstructor(this); };
  71985. };
  71986. var TO_STRING_TAG = NAME + ' Iterator';
  71987. var INCORRECT_VALUES_NAME = false;
  71988. var IterablePrototype = Iterable.prototype;
  71989. var nativeIterator = IterablePrototype[ITERATOR]
  71990. || IterablePrototype['@@iterator']
  71991. || DEFAULT && IterablePrototype[DEFAULT];
  71992. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  71993. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  71994. var CurrentIteratorPrototype, methods, KEY;
  71995. // fix native
  71996. if (anyNativeIterator) {
  71997. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  71998. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  71999. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  72000. if (setPrototypeOf) {
  72001. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  72002. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  72003. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  72004. }
  72005. }
  72006. // Set @@toStringTag to native iterators
  72007. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  72008. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  72009. }
  72010. }
  72011. // fix Array#{values, @@iterator}.name in V8 / FF
  72012. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  72013. INCORRECT_VALUES_NAME = true;
  72014. defaultIterator = function values() { return nativeIterator.call(this); };
  72015. }
  72016. // define iterator
  72017. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  72018. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  72019. }
  72020. Iterators[NAME] = defaultIterator;
  72021. // export additional methods
  72022. if (DEFAULT) {
  72023. methods = {
  72024. values: getIterationMethod(VALUES),
  72025. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  72026. entries: getIterationMethod(ENTRIES)
  72027. };
  72028. if (FORCED) for (KEY in methods) {
  72029. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  72030. redefine(IterablePrototype, KEY, methods[KEY]);
  72031. }
  72032. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  72033. }
  72034. return methods;
  72035. };
  72036. /***/ }),
  72037. /***/ 70723:
  72038. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72039. var fails = __webpack_require__(56183);
  72040. // Thank's IE8 for his funny defineProperty
  72041. module.exports = !fails(function () {
  72042. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  72043. });
  72044. /***/ }),
  72045. /***/ 97282:
  72046. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72047. var global = __webpack_require__(8454);
  72048. var isObject = __webpack_require__(65896);
  72049. var document = global.document;
  72050. // typeof document.createElement is 'object' in old IE
  72051. var EXISTS = isObject(document) && isObject(document.createElement);
  72052. module.exports = function (it) {
  72053. return EXISTS ? document.createElement(it) : {};
  72054. };
  72055. /***/ }),
  72056. /***/ 66181:
  72057. /***/ ((module) => {
  72058. // iterable DOM collections
  72059. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  72060. module.exports = {
  72061. CSSRuleList: 0,
  72062. CSSStyleDeclaration: 0,
  72063. CSSValueList: 0,
  72064. ClientRectList: 0,
  72065. DOMRectList: 0,
  72066. DOMStringList: 0,
  72067. DOMTokenList: 1,
  72068. DataTransferItemList: 0,
  72069. FileList: 0,
  72070. HTMLAllCollection: 0,
  72071. HTMLCollection: 0,
  72072. HTMLFormElement: 0,
  72073. HTMLSelectElement: 0,
  72074. MediaList: 0,
  72075. MimeTypeArray: 0,
  72076. NamedNodeMap: 0,
  72077. NodeList: 1,
  72078. PaintRequestList: 0,
  72079. Plugin: 0,
  72080. PluginArray: 0,
  72081. SVGLengthList: 0,
  72082. SVGNumberList: 0,
  72083. SVGPathSegList: 0,
  72084. SVGPointList: 0,
  72085. SVGStringList: 0,
  72086. SVGTransformList: 0,
  72087. SourceBufferList: 0,
  72088. StyleSheetList: 0,
  72089. TextTrackCueList: 0,
  72090. TextTrackList: 0,
  72091. TouchList: 0
  72092. };
  72093. /***/ }),
  72094. /***/ 37594:
  72095. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72096. var classof = __webpack_require__(41510);
  72097. var global = __webpack_require__(8454);
  72098. module.exports = classof(global.process) == 'process';
  72099. /***/ }),
  72100. /***/ 92543:
  72101. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72102. var getBuiltIn = __webpack_require__(54991);
  72103. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  72104. /***/ }),
  72105. /***/ 24324:
  72106. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72107. var global = __webpack_require__(8454);
  72108. var userAgent = __webpack_require__(92543);
  72109. var process = global.process;
  72110. var versions = process && process.versions;
  72111. var v8 = versions && versions.v8;
  72112. var match, version;
  72113. if (v8) {
  72114. match = v8.split('.');
  72115. version = match[0] + match[1];
  72116. } else if (userAgent) {
  72117. match = userAgent.match(/Edge\/(\d+)/);
  72118. if (!match || match[1] >= 74) {
  72119. match = userAgent.match(/Chrome\/(\d+)/);
  72120. if (match) version = match[1];
  72121. }
  72122. }
  72123. module.exports = version && +version;
  72124. /***/ }),
  72125. /***/ 8409:
  72126. /***/ ((module) => {
  72127. // IE8- don't enum bug keys
  72128. module.exports = [
  72129. 'constructor',
  72130. 'hasOwnProperty',
  72131. 'isPrototypeOf',
  72132. 'propertyIsEnumerable',
  72133. 'toLocaleString',
  72134. 'toString',
  72135. 'valueOf'
  72136. ];
  72137. /***/ }),
  72138. /***/ 54761:
  72139. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72140. var global = __webpack_require__(8454);
  72141. var getOwnPropertyDescriptor = __webpack_require__(35663).f;
  72142. var createNonEnumerableProperty = __webpack_require__(31501);
  72143. var redefine = __webpack_require__(23971);
  72144. var setGlobal = __webpack_require__(47852);
  72145. var copyConstructorProperties = __webpack_require__(60882);
  72146. var isForced = __webpack_require__(31949);
  72147. /*
  72148. options.target - name of the target object
  72149. options.global - target is the global object
  72150. options.stat - export as static methods of target
  72151. options.proto - export as prototype methods of target
  72152. options.real - real prototype method for the `pure` version
  72153. options.forced - export even if the native feature is available
  72154. options.bind - bind methods to the target, required for the `pure` version
  72155. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  72156. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  72157. options.sham - add a flag to not completely full polyfills
  72158. options.enumerable - export as enumerable property
  72159. options.noTargetGet - prevent calling a getter on target
  72160. */
  72161. module.exports = function (options, source) {
  72162. var TARGET = options.target;
  72163. var GLOBAL = options.global;
  72164. var STATIC = options.stat;
  72165. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  72166. if (GLOBAL) {
  72167. target = global;
  72168. } else if (STATIC) {
  72169. target = global[TARGET] || setGlobal(TARGET, {});
  72170. } else {
  72171. target = (global[TARGET] || {}).prototype;
  72172. }
  72173. if (target) for (key in source) {
  72174. sourceProperty = source[key];
  72175. if (options.noTargetGet) {
  72176. descriptor = getOwnPropertyDescriptor(target, key);
  72177. targetProperty = descriptor && descriptor.value;
  72178. } else targetProperty = target[key];
  72179. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  72180. // contained in target
  72181. if (!FORCED && targetProperty !== undefined) {
  72182. if (typeof sourceProperty === typeof targetProperty) continue;
  72183. copyConstructorProperties(sourceProperty, targetProperty);
  72184. }
  72185. // add a flag to not completely full polyfills
  72186. if (options.sham || (targetProperty && targetProperty.sham)) {
  72187. createNonEnumerableProperty(sourceProperty, 'sham', true);
  72188. }
  72189. // extend global
  72190. redefine(target, key, sourceProperty, options);
  72191. }
  72192. };
  72193. /***/ }),
  72194. /***/ 56183:
  72195. /***/ ((module) => {
  72196. module.exports = function (exec) {
  72197. try {
  72198. return !!exec();
  72199. } catch (error) {
  72200. return true;
  72201. }
  72202. };
  72203. /***/ }),
  72204. /***/ 29696:
  72205. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72206. "use strict";
  72207. // TODO: Remove from `core-js@4` since it's moved to entry points
  72208. __webpack_require__(9989);
  72209. var redefine = __webpack_require__(23971);
  72210. var fails = __webpack_require__(56183);
  72211. var wellKnownSymbol = __webpack_require__(48149);
  72212. var regexpExec = __webpack_require__(15510);
  72213. var createNonEnumerableProperty = __webpack_require__(31501);
  72214. var SPECIES = wellKnownSymbol('species');
  72215. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  72216. // #replace needs built-in support for named groups.
  72217. // #match works fine because it just return the exec results, even if it has
  72218. // a "grops" property.
  72219. var re = /./;
  72220. re.exec = function () {
  72221. var result = [];
  72222. result.groups = { a: '7' };
  72223. return result;
  72224. };
  72225. return ''.replace(re, '$<a>') !== '7';
  72226. });
  72227. // IE <= 11 replaces $0 with the whole match, as if it was $&
  72228. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  72229. var REPLACE_KEEPS_$0 = (function () {
  72230. return 'a'.replace(/./, '$0') === '$0';
  72231. })();
  72232. var REPLACE = wellKnownSymbol('replace');
  72233. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  72234. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  72235. if (/./[REPLACE]) {
  72236. return /./[REPLACE]('a', '$0') === '';
  72237. }
  72238. return false;
  72239. })();
  72240. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  72241. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  72242. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  72243. var re = /(?:)/;
  72244. var originalExec = re.exec;
  72245. re.exec = function () { return originalExec.apply(this, arguments); };
  72246. var result = 'ab'.split(re);
  72247. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  72248. });
  72249. module.exports = function (KEY, length, exec, sham) {
  72250. var SYMBOL = wellKnownSymbol(KEY);
  72251. var DELEGATES_TO_SYMBOL = !fails(function () {
  72252. // String methods call symbol-named RegEp methods
  72253. var O = {};
  72254. O[SYMBOL] = function () { return 7; };
  72255. return ''[KEY](O) != 7;
  72256. });
  72257. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  72258. // Symbol-named RegExp methods call .exec
  72259. var execCalled = false;
  72260. var re = /a/;
  72261. if (KEY === 'split') {
  72262. // We can't use real regex here since it causes deoptimization
  72263. // and serious performance degradation in V8
  72264. // https://github.com/zloirock/core-js/issues/306
  72265. re = {};
  72266. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  72267. // a new one. We need to return the patched regex when creating the new one.
  72268. re.constructor = {};
  72269. re.constructor[SPECIES] = function () { return re; };
  72270. re.flags = '';
  72271. re[SYMBOL] = /./[SYMBOL];
  72272. }
  72273. re.exec = function () { execCalled = true; return null; };
  72274. re[SYMBOL]('');
  72275. return !execCalled;
  72276. });
  72277. if (
  72278. !DELEGATES_TO_SYMBOL ||
  72279. !DELEGATES_TO_EXEC ||
  72280. (KEY === 'replace' && !(
  72281. REPLACE_SUPPORTS_NAMED_GROUPS &&
  72282. REPLACE_KEEPS_$0 &&
  72283. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  72284. )) ||
  72285. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  72286. ) {
  72287. var nativeRegExpMethod = /./[SYMBOL];
  72288. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  72289. if (regexp.exec === regexpExec) {
  72290. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  72291. // The native String method already delegates to @@method (this
  72292. // polyfilled function), leasing to infinite recursion.
  72293. // We avoid it by directly calling the native @@method method.
  72294. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  72295. }
  72296. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  72297. }
  72298. return { done: false };
  72299. }, {
  72300. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  72301. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  72302. });
  72303. var stringMethod = methods[0];
  72304. var regexMethod = methods[1];
  72305. redefine(String.prototype, KEY, stringMethod);
  72306. redefine(RegExp.prototype, SYMBOL, length == 2
  72307. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  72308. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  72309. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  72310. // 21.2.5.6 RegExp.prototype[@@match](string)
  72311. // 21.2.5.9 RegExp.prototype[@@search](string)
  72312. : function (string) { return regexMethod.call(string, this); }
  72313. );
  72314. }
  72315. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  72316. };
  72317. /***/ }),
  72318. /***/ 3116:
  72319. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72320. var fails = __webpack_require__(56183);
  72321. module.exports = !fails(function () {
  72322. return Object.isExtensible(Object.preventExtensions({}));
  72323. });
  72324. /***/ }),
  72325. /***/ 81098:
  72326. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72327. var aFunction = __webpack_require__(86653);
  72328. // optional / simple context binding
  72329. module.exports = function (fn, that, length) {
  72330. aFunction(fn);
  72331. if (that === undefined) return fn;
  72332. switch (length) {
  72333. case 0: return function () {
  72334. return fn.call(that);
  72335. };
  72336. case 1: return function (a) {
  72337. return fn.call(that, a);
  72338. };
  72339. case 2: return function (a, b) {
  72340. return fn.call(that, a, b);
  72341. };
  72342. case 3: return function (a, b, c) {
  72343. return fn.call(that, a, b, c);
  72344. };
  72345. }
  72346. return function (/* ...args */) {
  72347. return fn.apply(that, arguments);
  72348. };
  72349. };
  72350. /***/ }),
  72351. /***/ 54991:
  72352. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72353. var path = __webpack_require__(51426);
  72354. var global = __webpack_require__(8454);
  72355. var aFunction = function (variable) {
  72356. return typeof variable == 'function' ? variable : undefined;
  72357. };
  72358. module.exports = function (namespace, method) {
  72359. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
  72360. : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
  72361. };
  72362. /***/ }),
  72363. /***/ 90650:
  72364. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72365. var classof = __webpack_require__(59225);
  72366. var Iterators = __webpack_require__(96126);
  72367. var wellKnownSymbol = __webpack_require__(48149);
  72368. var ITERATOR = wellKnownSymbol('iterator');
  72369. module.exports = function (it) {
  72370. if (it != undefined) return it[ITERATOR]
  72371. || it['@@iterator']
  72372. || Iterators[classof(it)];
  72373. };
  72374. /***/ }),
  72375. /***/ 8454:
  72376. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72377. var check = function (it) {
  72378. return it && it.Math == Math && it;
  72379. };
  72380. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  72381. module.exports =
  72382. // eslint-disable-next-line no-undef
  72383. check(typeof globalThis == 'object' && globalThis) ||
  72384. check(typeof window == 'object' && window) ||
  72385. check(typeof self == 'object' && self) ||
  72386. check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
  72387. // eslint-disable-next-line no-new-func
  72388. (function () { return this; })() || Function('return this')();
  72389. /***/ }),
  72390. /***/ 53520:
  72391. /***/ ((module) => {
  72392. var hasOwnProperty = {}.hasOwnProperty;
  72393. module.exports = function (it, key) {
  72394. return hasOwnProperty.call(it, key);
  72395. };
  72396. /***/ }),
  72397. /***/ 4377:
  72398. /***/ ((module) => {
  72399. module.exports = {};
  72400. /***/ }),
  72401. /***/ 57461:
  72402. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72403. var getBuiltIn = __webpack_require__(54991);
  72404. module.exports = getBuiltIn('document', 'documentElement');
  72405. /***/ }),
  72406. /***/ 14985:
  72407. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72408. var DESCRIPTORS = __webpack_require__(70723);
  72409. var fails = __webpack_require__(56183);
  72410. var createElement = __webpack_require__(97282);
  72411. // Thank's IE8 for his funny defineProperty
  72412. module.exports = !DESCRIPTORS && !fails(function () {
  72413. return Object.defineProperty(createElement('div'), 'a', {
  72414. get: function () { return 7; }
  72415. }).a != 7;
  72416. });
  72417. /***/ }),
  72418. /***/ 87530:
  72419. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72420. var fails = __webpack_require__(56183);
  72421. var classof = __webpack_require__(41510);
  72422. var split = ''.split;
  72423. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  72424. module.exports = fails(function () {
  72425. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  72426. // eslint-disable-next-line no-prototype-builtins
  72427. return !Object('z').propertyIsEnumerable(0);
  72428. }) ? function (it) {
  72429. return classof(it) == 'String' ? split.call(it, '') : Object(it);
  72430. } : Object;
  72431. /***/ }),
  72432. /***/ 67770:
  72433. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72434. var isObject = __webpack_require__(65896);
  72435. var setPrototypeOf = __webpack_require__(75900);
  72436. // makes subclassing work correct for wrapped built-ins
  72437. module.exports = function ($this, dummy, Wrapper) {
  72438. var NewTarget, NewTargetPrototype;
  72439. if (
  72440. // it can work only with native `setPrototypeOf`
  72441. setPrototypeOf &&
  72442. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  72443. typeof (NewTarget = dummy.constructor) == 'function' &&
  72444. NewTarget !== Wrapper &&
  72445. isObject(NewTargetPrototype = NewTarget.prototype) &&
  72446. NewTargetPrototype !== Wrapper.prototype
  72447. ) setPrototypeOf($this, NewTargetPrototype);
  72448. return $this;
  72449. };
  72450. /***/ }),
  72451. /***/ 16901:
  72452. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72453. var store = __webpack_require__(82047);
  72454. var functionToString = Function.toString;
  72455. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  72456. if (typeof store.inspectSource != 'function') {
  72457. store.inspectSource = function (it) {
  72458. return functionToString.call(it);
  72459. };
  72460. }
  72461. module.exports = store.inspectSource;
  72462. /***/ }),
  72463. /***/ 96582:
  72464. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72465. var hiddenKeys = __webpack_require__(4377);
  72466. var isObject = __webpack_require__(65896);
  72467. var has = __webpack_require__(53520);
  72468. var defineProperty = __webpack_require__(79168).f;
  72469. var uid = __webpack_require__(59059);
  72470. var FREEZING = __webpack_require__(3116);
  72471. var METADATA = uid('meta');
  72472. var id = 0;
  72473. var isExtensible = Object.isExtensible || function () {
  72474. return true;
  72475. };
  72476. var setMetadata = function (it) {
  72477. defineProperty(it, METADATA, { value: {
  72478. objectID: 'O' + ++id, // object ID
  72479. weakData: {} // weak collections IDs
  72480. } });
  72481. };
  72482. var fastKey = function (it, create) {
  72483. // return a primitive with prefix
  72484. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  72485. if (!has(it, METADATA)) {
  72486. // can't set metadata to uncaught frozen object
  72487. if (!isExtensible(it)) return 'F';
  72488. // not necessary to add metadata
  72489. if (!create) return 'E';
  72490. // add missing metadata
  72491. setMetadata(it);
  72492. // return object ID
  72493. } return it[METADATA].objectID;
  72494. };
  72495. var getWeakData = function (it, create) {
  72496. if (!has(it, METADATA)) {
  72497. // can't set metadata to uncaught frozen object
  72498. if (!isExtensible(it)) return true;
  72499. // not necessary to add metadata
  72500. if (!create) return false;
  72501. // add missing metadata
  72502. setMetadata(it);
  72503. // return the store of weak collections IDs
  72504. } return it[METADATA].weakData;
  72505. };
  72506. // add metadata on freeze-family methods calling
  72507. var onFreeze = function (it) {
  72508. if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
  72509. return it;
  72510. };
  72511. var meta = module.exports = {
  72512. REQUIRED: false,
  72513. fastKey: fastKey,
  72514. getWeakData: getWeakData,
  72515. onFreeze: onFreeze
  72516. };
  72517. hiddenKeys[METADATA] = true;
  72518. /***/ }),
  72519. /***/ 41030:
  72520. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72521. var NATIVE_WEAK_MAP = __webpack_require__(4404);
  72522. var global = __webpack_require__(8454);
  72523. var isObject = __webpack_require__(65896);
  72524. var createNonEnumerableProperty = __webpack_require__(31501);
  72525. var objectHas = __webpack_require__(53520);
  72526. var shared = __webpack_require__(82047);
  72527. var sharedKey = __webpack_require__(28873);
  72528. var hiddenKeys = __webpack_require__(4377);
  72529. var WeakMap = global.WeakMap;
  72530. var set, get, has;
  72531. var enforce = function (it) {
  72532. return has(it) ? get(it) : set(it, {});
  72533. };
  72534. var getterFor = function (TYPE) {
  72535. return function (it) {
  72536. var state;
  72537. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  72538. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  72539. } return state;
  72540. };
  72541. };
  72542. if (NATIVE_WEAK_MAP) {
  72543. var store = shared.state || (shared.state = new WeakMap());
  72544. var wmget = store.get;
  72545. var wmhas = store.has;
  72546. var wmset = store.set;
  72547. set = function (it, metadata) {
  72548. metadata.facade = it;
  72549. wmset.call(store, it, metadata);
  72550. return metadata;
  72551. };
  72552. get = function (it) {
  72553. return wmget.call(store, it) || {};
  72554. };
  72555. has = function (it) {
  72556. return wmhas.call(store, it);
  72557. };
  72558. } else {
  72559. var STATE = sharedKey('state');
  72560. hiddenKeys[STATE] = true;
  72561. set = function (it, metadata) {
  72562. metadata.facade = it;
  72563. createNonEnumerableProperty(it, STATE, metadata);
  72564. return metadata;
  72565. };
  72566. get = function (it) {
  72567. return objectHas(it, STATE) ? it[STATE] : {};
  72568. };
  72569. has = function (it) {
  72570. return objectHas(it, STATE);
  72571. };
  72572. }
  72573. module.exports = {
  72574. set: set,
  72575. get: get,
  72576. has: has,
  72577. enforce: enforce,
  72578. getterFor: getterFor
  72579. };
  72580. /***/ }),
  72581. /***/ 55859:
  72582. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72583. var wellKnownSymbol = __webpack_require__(48149);
  72584. var Iterators = __webpack_require__(96126);
  72585. var ITERATOR = wellKnownSymbol('iterator');
  72586. var ArrayPrototype = Array.prototype;
  72587. // check on default Array iterator
  72588. module.exports = function (it) {
  72589. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  72590. };
  72591. /***/ }),
  72592. /***/ 27931:
  72593. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72594. var classof = __webpack_require__(41510);
  72595. // `IsArray` abstract operation
  72596. // https://tc39.github.io/ecma262/#sec-isarray
  72597. module.exports = Array.isArray || function isArray(arg) {
  72598. return classof(arg) == 'Array';
  72599. };
  72600. /***/ }),
  72601. /***/ 31949:
  72602. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72603. var fails = __webpack_require__(56183);
  72604. var replacement = /#|\.prototype\./;
  72605. var isForced = function (feature, detection) {
  72606. var value = data[normalize(feature)];
  72607. return value == POLYFILL ? true
  72608. : value == NATIVE ? false
  72609. : typeof detection == 'function' ? fails(detection)
  72610. : !!detection;
  72611. };
  72612. var normalize = isForced.normalize = function (string) {
  72613. return String(string).replace(replacement, '.').toLowerCase();
  72614. };
  72615. var data = isForced.data = {};
  72616. var NATIVE = isForced.NATIVE = 'N';
  72617. var POLYFILL = isForced.POLYFILL = 'P';
  72618. module.exports = isForced;
  72619. /***/ }),
  72620. /***/ 65896:
  72621. /***/ ((module) => {
  72622. module.exports = function (it) {
  72623. return typeof it === 'object' ? it !== null : typeof it === 'function';
  72624. };
  72625. /***/ }),
  72626. /***/ 23556:
  72627. /***/ ((module) => {
  72628. module.exports = false;
  72629. /***/ }),
  72630. /***/ 21518:
  72631. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72632. var anObject = __webpack_require__(71474);
  72633. var isArrayIteratorMethod = __webpack_require__(55859);
  72634. var toLength = __webpack_require__(93917);
  72635. var bind = __webpack_require__(81098);
  72636. var getIteratorMethod = __webpack_require__(90650);
  72637. var iteratorClose = __webpack_require__(69193);
  72638. var Result = function (stopped, result) {
  72639. this.stopped = stopped;
  72640. this.result = result;
  72641. };
  72642. module.exports = function (iterable, unboundFunction, options) {
  72643. var that = options && options.that;
  72644. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  72645. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  72646. var INTERRUPTED = !!(options && options.INTERRUPTED);
  72647. var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
  72648. var iterator, iterFn, index, length, result, next, step;
  72649. var stop = function (condition) {
  72650. if (iterator) iteratorClose(iterator);
  72651. return new Result(true, condition);
  72652. };
  72653. var callFn = function (value) {
  72654. if (AS_ENTRIES) {
  72655. anObject(value);
  72656. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  72657. } return INTERRUPTED ? fn(value, stop) : fn(value);
  72658. };
  72659. if (IS_ITERATOR) {
  72660. iterator = iterable;
  72661. } else {
  72662. iterFn = getIteratorMethod(iterable);
  72663. if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
  72664. // optimisation for array iterators
  72665. if (isArrayIteratorMethod(iterFn)) {
  72666. for (index = 0, length = toLength(iterable.length); length > index; index++) {
  72667. result = callFn(iterable[index]);
  72668. if (result && result instanceof Result) return result;
  72669. } return new Result(false);
  72670. }
  72671. iterator = iterFn.call(iterable);
  72672. }
  72673. next = iterator.next;
  72674. while (!(step = next.call(iterator)).done) {
  72675. try {
  72676. result = callFn(step.value);
  72677. } catch (error) {
  72678. iteratorClose(iterator);
  72679. throw error;
  72680. }
  72681. if (typeof result == 'object' && result && result instanceof Result) return result;
  72682. } return new Result(false);
  72683. };
  72684. /***/ }),
  72685. /***/ 69193:
  72686. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72687. var anObject = __webpack_require__(71474);
  72688. module.exports = function (iterator) {
  72689. var returnMethod = iterator['return'];
  72690. if (returnMethod !== undefined) {
  72691. return anObject(returnMethod.call(iterator)).value;
  72692. }
  72693. };
  72694. /***/ }),
  72695. /***/ 66524:
  72696. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72697. "use strict";
  72698. var getPrototypeOf = __webpack_require__(64204);
  72699. var createNonEnumerableProperty = __webpack_require__(31501);
  72700. var has = __webpack_require__(53520);
  72701. var wellKnownSymbol = __webpack_require__(48149);
  72702. var IS_PURE = __webpack_require__(23556);
  72703. var ITERATOR = wellKnownSymbol('iterator');
  72704. var BUGGY_SAFARI_ITERATORS = false;
  72705. var returnThis = function () { return this; };
  72706. // `%IteratorPrototype%` object
  72707. // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
  72708. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  72709. if ([].keys) {
  72710. arrayIterator = [].keys();
  72711. // Safari 8 has buggy iterators w/o `next`
  72712. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  72713. else {
  72714. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  72715. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  72716. }
  72717. }
  72718. if (IteratorPrototype == undefined) IteratorPrototype = {};
  72719. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  72720. if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
  72721. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  72722. }
  72723. module.exports = {
  72724. IteratorPrototype: IteratorPrototype,
  72725. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  72726. };
  72727. /***/ }),
  72728. /***/ 96126:
  72729. /***/ ((module) => {
  72730. module.exports = {};
  72731. /***/ }),
  72732. /***/ 10323:
  72733. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72734. var fails = __webpack_require__(56183);
  72735. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  72736. // Chrome 38 Symbol has incorrect toString conversion
  72737. // eslint-disable-next-line no-undef
  72738. return !String(Symbol());
  72739. });
  72740. /***/ }),
  72741. /***/ 4404:
  72742. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72743. var global = __webpack_require__(8454);
  72744. var inspectSource = __webpack_require__(16901);
  72745. var WeakMap = global.WeakMap;
  72746. module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
  72747. /***/ }),
  72748. /***/ 78513:
  72749. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72750. var global = __webpack_require__(8454);
  72751. var trim = __webpack_require__(19749).trim;
  72752. var whitespaces = __webpack_require__(28342);
  72753. var $parseInt = global.parseInt;
  72754. var hex = /^[+-]?0[Xx]/;
  72755. var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
  72756. // `parseInt` method
  72757. // https://tc39.github.io/ecma262/#sec-parseint-string-radix
  72758. module.exports = FORCED ? function parseInt(string, radix) {
  72759. var S = trim(String(string));
  72760. return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
  72761. } : $parseInt;
  72762. /***/ }),
  72763. /***/ 24727:
  72764. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72765. "use strict";
  72766. var DESCRIPTORS = __webpack_require__(70723);
  72767. var fails = __webpack_require__(56183);
  72768. var objectKeys = __webpack_require__(21340);
  72769. var getOwnPropertySymbolsModule = __webpack_require__(98074);
  72770. var propertyIsEnumerableModule = __webpack_require__(4043);
  72771. var toObject = __webpack_require__(29473);
  72772. var IndexedObject = __webpack_require__(87530);
  72773. var nativeAssign = Object.assign;
  72774. var defineProperty = Object.defineProperty;
  72775. // `Object.assign` method
  72776. // https://tc39.github.io/ecma262/#sec-object.assign
  72777. module.exports = !nativeAssign || fails(function () {
  72778. // should have correct order of operations (Edge bug)
  72779. if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
  72780. enumerable: true,
  72781. get: function () {
  72782. defineProperty(this, 'b', {
  72783. value: 3,
  72784. enumerable: false
  72785. });
  72786. }
  72787. }), { b: 2 })).b !== 1) return true;
  72788. // should work with symbols and should have deterministic property order (V8 bug)
  72789. var A = {};
  72790. var B = {};
  72791. // eslint-disable-next-line no-undef
  72792. var symbol = Symbol();
  72793. var alphabet = 'abcdefghijklmnopqrst';
  72794. A[symbol] = 7;
  72795. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  72796. return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
  72797. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  72798. var T = toObject(target);
  72799. var argumentsLength = arguments.length;
  72800. var index = 1;
  72801. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  72802. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  72803. while (argumentsLength > index) {
  72804. var S = IndexedObject(arguments[index++]);
  72805. var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
  72806. var length = keys.length;
  72807. var j = 0;
  72808. var key;
  72809. while (length > j) {
  72810. key = keys[j++];
  72811. if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
  72812. }
  72813. } return T;
  72814. } : nativeAssign;
  72815. /***/ }),
  72816. /***/ 31525:
  72817. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72818. var anObject = __webpack_require__(71474);
  72819. var defineProperties = __webpack_require__(50262);
  72820. var enumBugKeys = __webpack_require__(8409);
  72821. var hiddenKeys = __webpack_require__(4377);
  72822. var html = __webpack_require__(57461);
  72823. var documentCreateElement = __webpack_require__(97282);
  72824. var sharedKey = __webpack_require__(28873);
  72825. var GT = '>';
  72826. var LT = '<';
  72827. var PROTOTYPE = 'prototype';
  72828. var SCRIPT = 'script';
  72829. var IE_PROTO = sharedKey('IE_PROTO');
  72830. var EmptyConstructor = function () { /* empty */ };
  72831. var scriptTag = function (content) {
  72832. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  72833. };
  72834. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  72835. var NullProtoObjectViaActiveX = function (activeXDocument) {
  72836. activeXDocument.write(scriptTag(''));
  72837. activeXDocument.close();
  72838. var temp = activeXDocument.parentWindow.Object;
  72839. activeXDocument = null; // avoid memory leak
  72840. return temp;
  72841. };
  72842. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  72843. var NullProtoObjectViaIFrame = function () {
  72844. // Thrash, waste and sodomy: IE GC bug
  72845. var iframe = documentCreateElement('iframe');
  72846. var JS = 'java' + SCRIPT + ':';
  72847. var iframeDocument;
  72848. iframe.style.display = 'none';
  72849. html.appendChild(iframe);
  72850. // https://github.com/zloirock/core-js/issues/475
  72851. iframe.src = String(JS);
  72852. iframeDocument = iframe.contentWindow.document;
  72853. iframeDocument.open();
  72854. iframeDocument.write(scriptTag('document.F=Object'));
  72855. iframeDocument.close();
  72856. return iframeDocument.F;
  72857. };
  72858. // Check for document.domain and active x support
  72859. // No need to use active x approach when document.domain is not set
  72860. // see https://github.com/es-shims/es5-shim/issues/150
  72861. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  72862. // avoid IE GC bug
  72863. var activeXDocument;
  72864. var NullProtoObject = function () {
  72865. try {
  72866. /* global ActiveXObject */
  72867. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  72868. } catch (error) { /* ignore */ }
  72869. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  72870. var length = enumBugKeys.length;
  72871. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  72872. return NullProtoObject();
  72873. };
  72874. hiddenKeys[IE_PROTO] = true;
  72875. // `Object.create` method
  72876. // https://tc39.github.io/ecma262/#sec-object.create
  72877. module.exports = Object.create || function create(O, Properties) {
  72878. var result;
  72879. if (O !== null) {
  72880. EmptyConstructor[PROTOTYPE] = anObject(O);
  72881. result = new EmptyConstructor();
  72882. EmptyConstructor[PROTOTYPE] = null;
  72883. // add "__proto__" for Object.getPrototypeOf polyfill
  72884. result[IE_PROTO] = O;
  72885. } else result = NullProtoObject();
  72886. return Properties === undefined ? result : defineProperties(result, Properties);
  72887. };
  72888. /***/ }),
  72889. /***/ 50262:
  72890. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72891. var DESCRIPTORS = __webpack_require__(70723);
  72892. var definePropertyModule = __webpack_require__(79168);
  72893. var anObject = __webpack_require__(71474);
  72894. var objectKeys = __webpack_require__(21340);
  72895. // `Object.defineProperties` method
  72896. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  72897. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  72898. anObject(O);
  72899. var keys = objectKeys(Properties);
  72900. var length = keys.length;
  72901. var index = 0;
  72902. var key;
  72903. while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  72904. return O;
  72905. };
  72906. /***/ }),
  72907. /***/ 79168:
  72908. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  72909. var DESCRIPTORS = __webpack_require__(70723);
  72910. var IE8_DOM_DEFINE = __webpack_require__(14985);
  72911. var anObject = __webpack_require__(71474);
  72912. var toPrimitive = __webpack_require__(43948);
  72913. var nativeDefineProperty = Object.defineProperty;
  72914. // `Object.defineProperty` method
  72915. // https://tc39.github.io/ecma262/#sec-object.defineproperty
  72916. exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  72917. anObject(O);
  72918. P = toPrimitive(P, true);
  72919. anObject(Attributes);
  72920. if (IE8_DOM_DEFINE) try {
  72921. return nativeDefineProperty(O, P, Attributes);
  72922. } catch (error) { /* empty */ }
  72923. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  72924. if ('value' in Attributes) O[P] = Attributes.value;
  72925. return O;
  72926. };
  72927. /***/ }),
  72928. /***/ 35663:
  72929. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  72930. var DESCRIPTORS = __webpack_require__(70723);
  72931. var propertyIsEnumerableModule = __webpack_require__(4043);
  72932. var createPropertyDescriptor = __webpack_require__(49273);
  72933. var toIndexedObject = __webpack_require__(43206);
  72934. var toPrimitive = __webpack_require__(43948);
  72935. var has = __webpack_require__(53520);
  72936. var IE8_DOM_DEFINE = __webpack_require__(14985);
  72937. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  72938. // `Object.getOwnPropertyDescriptor` method
  72939. // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
  72940. exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  72941. O = toIndexedObject(O);
  72942. P = toPrimitive(P, true);
  72943. if (IE8_DOM_DEFINE) try {
  72944. return nativeGetOwnPropertyDescriptor(O, P);
  72945. } catch (error) { /* empty */ }
  72946. if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
  72947. };
  72948. /***/ }),
  72949. /***/ 26785:
  72950. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  72951. var internalObjectKeys = __webpack_require__(75113);
  72952. var enumBugKeys = __webpack_require__(8409);
  72953. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  72954. // `Object.getOwnPropertyNames` method
  72955. // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  72956. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  72957. return internalObjectKeys(O, hiddenKeys);
  72958. };
  72959. /***/ }),
  72960. /***/ 98074:
  72961. /***/ ((__unused_webpack_module, exports) => {
  72962. exports.f = Object.getOwnPropertySymbols;
  72963. /***/ }),
  72964. /***/ 64204:
  72965. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72966. var has = __webpack_require__(53520);
  72967. var toObject = __webpack_require__(29473);
  72968. var sharedKey = __webpack_require__(28873);
  72969. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(97401);
  72970. var IE_PROTO = sharedKey('IE_PROTO');
  72971. var ObjectPrototype = Object.prototype;
  72972. // `Object.getPrototypeOf` method
  72973. // https://tc39.github.io/ecma262/#sec-object.getprototypeof
  72974. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  72975. O = toObject(O);
  72976. if (has(O, IE_PROTO)) return O[IE_PROTO];
  72977. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  72978. return O.constructor.prototype;
  72979. } return O instanceof Object ? ObjectPrototype : null;
  72980. };
  72981. /***/ }),
  72982. /***/ 75113:
  72983. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72984. var has = __webpack_require__(53520);
  72985. var toIndexedObject = __webpack_require__(43206);
  72986. var indexOf = __webpack_require__(65675).indexOf;
  72987. var hiddenKeys = __webpack_require__(4377);
  72988. module.exports = function (object, names) {
  72989. var O = toIndexedObject(object);
  72990. var i = 0;
  72991. var result = [];
  72992. var key;
  72993. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  72994. // Don't enum bug & hidden keys
  72995. while (names.length > i) if (has(O, key = names[i++])) {
  72996. ~indexOf(result, key) || result.push(key);
  72997. }
  72998. return result;
  72999. };
  73000. /***/ }),
  73001. /***/ 21340:
  73002. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73003. var internalObjectKeys = __webpack_require__(75113);
  73004. var enumBugKeys = __webpack_require__(8409);
  73005. // `Object.keys` method
  73006. // https://tc39.github.io/ecma262/#sec-object.keys
  73007. module.exports = Object.keys || function keys(O) {
  73008. return internalObjectKeys(O, enumBugKeys);
  73009. };
  73010. /***/ }),
  73011. /***/ 4043:
  73012. /***/ ((__unused_webpack_module, exports) => {
  73013. "use strict";
  73014. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  73015. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  73016. // Nashorn ~ JDK8 bug
  73017. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  73018. // `Object.prototype.propertyIsEnumerable` method implementation
  73019. // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
  73020. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  73021. var descriptor = getOwnPropertyDescriptor(this, V);
  73022. return !!descriptor && descriptor.enumerable;
  73023. } : nativePropertyIsEnumerable;
  73024. /***/ }),
  73025. /***/ 75900:
  73026. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73027. var anObject = __webpack_require__(71474);
  73028. var aPossiblePrototype = __webpack_require__(52004);
  73029. // `Object.setPrototypeOf` method
  73030. // https://tc39.github.io/ecma262/#sec-object.setprototypeof
  73031. // Works with __proto__ only. Old v8 can't work with null proto objects.
  73032. /* eslint-disable no-proto */
  73033. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  73034. var CORRECT_SETTER = false;
  73035. var test = {};
  73036. var setter;
  73037. try {
  73038. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  73039. setter.call(test, []);
  73040. CORRECT_SETTER = test instanceof Array;
  73041. } catch (error) { /* empty */ }
  73042. return function setPrototypeOf(O, proto) {
  73043. anObject(O);
  73044. aPossiblePrototype(proto);
  73045. if (CORRECT_SETTER) setter.call(O, proto);
  73046. else O.__proto__ = proto;
  73047. return O;
  73048. };
  73049. }() : undefined);
  73050. /***/ }),
  73051. /***/ 4117:
  73052. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73053. "use strict";
  73054. var TO_STRING_TAG_SUPPORT = __webpack_require__(94823);
  73055. var classof = __webpack_require__(59225);
  73056. // `Object.prototype.toString` method implementation
  73057. // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
  73058. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  73059. return '[object ' + classof(this) + ']';
  73060. };
  73061. /***/ }),
  73062. /***/ 21441:
  73063. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73064. var getBuiltIn = __webpack_require__(54991);
  73065. var getOwnPropertyNamesModule = __webpack_require__(26785);
  73066. var getOwnPropertySymbolsModule = __webpack_require__(98074);
  73067. var anObject = __webpack_require__(71474);
  73068. // all object keys, includes non-enumerable and symbols
  73069. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  73070. var keys = getOwnPropertyNamesModule.f(anObject(it));
  73071. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  73072. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  73073. };
  73074. /***/ }),
  73075. /***/ 51426:
  73076. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73077. var global = __webpack_require__(8454);
  73078. module.exports = global;
  73079. /***/ }),
  73080. /***/ 19573:
  73081. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73082. var redefine = __webpack_require__(23971);
  73083. module.exports = function (target, src, options) {
  73084. for (var key in src) redefine(target, key, src[key], options);
  73085. return target;
  73086. };
  73087. /***/ }),
  73088. /***/ 23971:
  73089. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73090. var global = __webpack_require__(8454);
  73091. var createNonEnumerableProperty = __webpack_require__(31501);
  73092. var has = __webpack_require__(53520);
  73093. var setGlobal = __webpack_require__(47852);
  73094. var inspectSource = __webpack_require__(16901);
  73095. var InternalStateModule = __webpack_require__(41030);
  73096. var getInternalState = InternalStateModule.get;
  73097. var enforceInternalState = InternalStateModule.enforce;
  73098. var TEMPLATE = String(String).split('String');
  73099. (module.exports = function (O, key, value, options) {
  73100. var unsafe = options ? !!options.unsafe : false;
  73101. var simple = options ? !!options.enumerable : false;
  73102. var noTargetGet = options ? !!options.noTargetGet : false;
  73103. var state;
  73104. if (typeof value == 'function') {
  73105. if (typeof key == 'string' && !has(value, 'name')) {
  73106. createNonEnumerableProperty(value, 'name', key);
  73107. }
  73108. state = enforceInternalState(value);
  73109. if (!state.source) {
  73110. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  73111. }
  73112. }
  73113. if (O === global) {
  73114. if (simple) O[key] = value;
  73115. else setGlobal(key, value);
  73116. return;
  73117. } else if (!unsafe) {
  73118. delete O[key];
  73119. } else if (!noTargetGet && O[key]) {
  73120. simple = true;
  73121. }
  73122. if (simple) O[key] = value;
  73123. else createNonEnumerableProperty(O, key, value);
  73124. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  73125. })(Function.prototype, 'toString', function toString() {
  73126. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  73127. });
  73128. /***/ }),
  73129. /***/ 8734:
  73130. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73131. var classof = __webpack_require__(41510);
  73132. var regexpExec = __webpack_require__(15510);
  73133. // `RegExpExec` abstract operation
  73134. // https://tc39.github.io/ecma262/#sec-regexpexec
  73135. module.exports = function (R, S) {
  73136. var exec = R.exec;
  73137. if (typeof exec === 'function') {
  73138. var result = exec.call(R, S);
  73139. if (typeof result !== 'object') {
  73140. throw TypeError('RegExp exec method returned something other than an Object or null');
  73141. }
  73142. return result;
  73143. }
  73144. if (classof(R) !== 'RegExp') {
  73145. throw TypeError('RegExp#exec called on incompatible receiver');
  73146. }
  73147. return regexpExec.call(R, S);
  73148. };
  73149. /***/ }),
  73150. /***/ 15510:
  73151. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73152. "use strict";
  73153. var regexpFlags = __webpack_require__(18383);
  73154. var stickyHelpers = __webpack_require__(26558);
  73155. var nativeExec = RegExp.prototype.exec;
  73156. // This always refers to the native implementation, because the
  73157. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  73158. // which loads this file before patching the method.
  73159. var nativeReplace = String.prototype.replace;
  73160. var patchedExec = nativeExec;
  73161. var UPDATES_LAST_INDEX_WRONG = (function () {
  73162. var re1 = /a/;
  73163. var re2 = /b*/g;
  73164. nativeExec.call(re1, 'a');
  73165. nativeExec.call(re2, 'a');
  73166. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  73167. })();
  73168. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
  73169. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  73170. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  73171. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  73172. if (PATCH) {
  73173. patchedExec = function exec(str) {
  73174. var re = this;
  73175. var lastIndex, reCopy, match, i;
  73176. var sticky = UNSUPPORTED_Y && re.sticky;
  73177. var flags = regexpFlags.call(re);
  73178. var source = re.source;
  73179. var charsAdded = 0;
  73180. var strCopy = str;
  73181. if (sticky) {
  73182. flags = flags.replace('y', '');
  73183. if (flags.indexOf('g') === -1) {
  73184. flags += 'g';
  73185. }
  73186. strCopy = String(str).slice(re.lastIndex);
  73187. // Support anchored sticky behavior.
  73188. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  73189. source = '(?: ' + source + ')';
  73190. strCopy = ' ' + strCopy;
  73191. charsAdded++;
  73192. }
  73193. // ^(? + rx + ) is needed, in combination with some str slicing, to
  73194. // simulate the 'y' flag.
  73195. reCopy = new RegExp('^(?:' + source + ')', flags);
  73196. }
  73197. if (NPCG_INCLUDED) {
  73198. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  73199. }
  73200. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  73201. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  73202. if (sticky) {
  73203. if (match) {
  73204. match.input = match.input.slice(charsAdded);
  73205. match[0] = match[0].slice(charsAdded);
  73206. match.index = re.lastIndex;
  73207. re.lastIndex += match[0].length;
  73208. } else re.lastIndex = 0;
  73209. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  73210. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  73211. }
  73212. if (NPCG_INCLUDED && match && match.length > 1) {
  73213. // Fix browsers whose `exec` methods don't consistently return `undefined`
  73214. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  73215. nativeReplace.call(match[0], reCopy, function () {
  73216. for (i = 1; i < arguments.length - 2; i++) {
  73217. if (arguments[i] === undefined) match[i] = undefined;
  73218. }
  73219. });
  73220. }
  73221. return match;
  73222. };
  73223. }
  73224. module.exports = patchedExec;
  73225. /***/ }),
  73226. /***/ 18383:
  73227. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73228. "use strict";
  73229. var anObject = __webpack_require__(71474);
  73230. // `RegExp.prototype.flags` getter implementation
  73231. // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
  73232. module.exports = function () {
  73233. var that = anObject(this);
  73234. var result = '';
  73235. if (that.global) result += 'g';
  73236. if (that.ignoreCase) result += 'i';
  73237. if (that.multiline) result += 'm';
  73238. if (that.dotAll) result += 's';
  73239. if (that.unicode) result += 'u';
  73240. if (that.sticky) result += 'y';
  73241. return result;
  73242. };
  73243. /***/ }),
  73244. /***/ 26558:
  73245. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  73246. "use strict";
  73247. var fails = __webpack_require__(56183);
  73248. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  73249. // so we use an intermediate function.
  73250. function RE(s, f) {
  73251. return RegExp(s, f);
  73252. }
  73253. exports.UNSUPPORTED_Y = fails(function () {
  73254. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  73255. var re = RE('a', 'y');
  73256. re.lastIndex = 2;
  73257. return re.exec('abcd') != null;
  73258. });
  73259. exports.BROKEN_CARET = fails(function () {
  73260. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  73261. var re = RE('^r', 'gy');
  73262. re.lastIndex = 2;
  73263. return re.exec('str') != null;
  73264. });
  73265. /***/ }),
  73266. /***/ 97431:
  73267. /***/ ((module) => {
  73268. // `RequireObjectCoercible` abstract operation
  73269. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  73270. module.exports = function (it) {
  73271. if (it == undefined) throw TypeError("Can't call method on " + it);
  73272. return it;
  73273. };
  73274. /***/ }),
  73275. /***/ 47852:
  73276. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73277. var global = __webpack_require__(8454);
  73278. var createNonEnumerableProperty = __webpack_require__(31501);
  73279. module.exports = function (key, value) {
  73280. try {
  73281. createNonEnumerableProperty(global, key, value);
  73282. } catch (error) {
  73283. global[key] = value;
  73284. } return value;
  73285. };
  73286. /***/ }),
  73287. /***/ 30820:
  73288. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73289. var defineProperty = __webpack_require__(79168).f;
  73290. var has = __webpack_require__(53520);
  73291. var wellKnownSymbol = __webpack_require__(48149);
  73292. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  73293. module.exports = function (it, TAG, STATIC) {
  73294. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  73295. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  73296. }
  73297. };
  73298. /***/ }),
  73299. /***/ 28873:
  73300. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73301. var shared = __webpack_require__(41748);
  73302. var uid = __webpack_require__(59059);
  73303. var keys = shared('keys');
  73304. module.exports = function (key) {
  73305. return keys[key] || (keys[key] = uid(key));
  73306. };
  73307. /***/ }),
  73308. /***/ 82047:
  73309. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73310. var global = __webpack_require__(8454);
  73311. var setGlobal = __webpack_require__(47852);
  73312. var SHARED = '__core-js_shared__';
  73313. var store = global[SHARED] || setGlobal(SHARED, {});
  73314. module.exports = store;
  73315. /***/ }),
  73316. /***/ 41748:
  73317. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73318. var IS_PURE = __webpack_require__(23556);
  73319. var store = __webpack_require__(82047);
  73320. (module.exports = function (key, value) {
  73321. return store[key] || (store[key] = value !== undefined ? value : {});
  73322. })('versions', []).push({
  73323. version: '3.8.1',
  73324. mode: IS_PURE ? 'pure' : 'global',
  73325. copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
  73326. });
  73327. /***/ }),
  73328. /***/ 27321:
  73329. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73330. var toInteger = __webpack_require__(78874);
  73331. var requireObjectCoercible = __webpack_require__(97431);
  73332. // `String.prototype.{ codePointAt, at }` methods implementation
  73333. var createMethod = function (CONVERT_TO_STRING) {
  73334. return function ($this, pos) {
  73335. var S = String(requireObjectCoercible($this));
  73336. var position = toInteger(pos);
  73337. var size = S.length;
  73338. var first, second;
  73339. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  73340. first = S.charCodeAt(position);
  73341. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  73342. || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
  73343. ? CONVERT_TO_STRING ? S.charAt(position) : first
  73344. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  73345. };
  73346. };
  73347. module.exports = {
  73348. // `String.prototype.codePointAt` method
  73349. // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
  73350. codeAt: createMethod(false),
  73351. // `String.prototype.at` method
  73352. // https://github.com/mathiasbynens/String.prototype.at
  73353. charAt: createMethod(true)
  73354. };
  73355. /***/ }),
  73356. /***/ 19749:
  73357. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73358. var requireObjectCoercible = __webpack_require__(97431);
  73359. var whitespaces = __webpack_require__(28342);
  73360. var whitespace = '[' + whitespaces + ']';
  73361. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  73362. var rtrim = RegExp(whitespace + whitespace + '*$');
  73363. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  73364. var createMethod = function (TYPE) {
  73365. return function ($this) {
  73366. var string = String(requireObjectCoercible($this));
  73367. if (TYPE & 1) string = string.replace(ltrim, '');
  73368. if (TYPE & 2) string = string.replace(rtrim, '');
  73369. return string;
  73370. };
  73371. };
  73372. module.exports = {
  73373. // `String.prototype.{ trimLeft, trimStart }` methods
  73374. // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
  73375. start: createMethod(1),
  73376. // `String.prototype.{ trimRight, trimEnd }` methods
  73377. // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
  73378. end: createMethod(2),
  73379. // `String.prototype.trim` method
  73380. // https://tc39.github.io/ecma262/#sec-string.prototype.trim
  73381. trim: createMethod(3)
  73382. };
  73383. /***/ }),
  73384. /***/ 19623:
  73385. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73386. var toInteger = __webpack_require__(78874);
  73387. var max = Math.max;
  73388. var min = Math.min;
  73389. // Helper for a popular repeating case of the spec:
  73390. // Let integer be ? ToInteger(index).
  73391. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  73392. module.exports = function (index, length) {
  73393. var integer = toInteger(index);
  73394. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  73395. };
  73396. /***/ }),
  73397. /***/ 43206:
  73398. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73399. // toObject with fallback for non-array-like ES3 strings
  73400. var IndexedObject = __webpack_require__(87530);
  73401. var requireObjectCoercible = __webpack_require__(97431);
  73402. module.exports = function (it) {
  73403. return IndexedObject(requireObjectCoercible(it));
  73404. };
  73405. /***/ }),
  73406. /***/ 78874:
  73407. /***/ ((module) => {
  73408. var ceil = Math.ceil;
  73409. var floor = Math.floor;
  73410. // `ToInteger` abstract operation
  73411. // https://tc39.github.io/ecma262/#sec-tointeger
  73412. module.exports = function (argument) {
  73413. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  73414. };
  73415. /***/ }),
  73416. /***/ 93917:
  73417. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73418. var toInteger = __webpack_require__(78874);
  73419. var min = Math.min;
  73420. // `ToLength` abstract operation
  73421. // https://tc39.github.io/ecma262/#sec-tolength
  73422. module.exports = function (argument) {
  73423. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  73424. };
  73425. /***/ }),
  73426. /***/ 29473:
  73427. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73428. var requireObjectCoercible = __webpack_require__(97431);
  73429. // `ToObject` abstract operation
  73430. // https://tc39.github.io/ecma262/#sec-toobject
  73431. module.exports = function (argument) {
  73432. return Object(requireObjectCoercible(argument));
  73433. };
  73434. /***/ }),
  73435. /***/ 43948:
  73436. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73437. var isObject = __webpack_require__(65896);
  73438. // `ToPrimitive` abstract operation
  73439. // https://tc39.github.io/ecma262/#sec-toprimitive
  73440. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  73441. // and the second argument - flag - preferred type is a string
  73442. module.exports = function (input, PREFERRED_STRING) {
  73443. if (!isObject(input)) return input;
  73444. var fn, val;
  73445. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  73446. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  73447. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  73448. throw TypeError("Can't convert object to primitive value");
  73449. };
  73450. /***/ }),
  73451. /***/ 94823:
  73452. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73453. var wellKnownSymbol = __webpack_require__(48149);
  73454. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  73455. var test = {};
  73456. test[TO_STRING_TAG] = 'z';
  73457. module.exports = String(test) === '[object z]';
  73458. /***/ }),
  73459. /***/ 59059:
  73460. /***/ ((module) => {
  73461. var id = 0;
  73462. var postfix = Math.random();
  73463. module.exports = function (key) {
  73464. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  73465. };
  73466. /***/ }),
  73467. /***/ 4746:
  73468. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73469. var NATIVE_SYMBOL = __webpack_require__(10323);
  73470. module.exports = NATIVE_SYMBOL
  73471. // eslint-disable-next-line no-undef
  73472. && !Symbol.sham
  73473. // eslint-disable-next-line no-undef
  73474. && typeof Symbol.iterator == 'symbol';
  73475. /***/ }),
  73476. /***/ 48149:
  73477. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73478. var global = __webpack_require__(8454);
  73479. var shared = __webpack_require__(41748);
  73480. var has = __webpack_require__(53520);
  73481. var uid = __webpack_require__(59059);
  73482. var NATIVE_SYMBOL = __webpack_require__(10323);
  73483. var USE_SYMBOL_AS_UID = __webpack_require__(4746);
  73484. var WellKnownSymbolsStore = shared('wks');
  73485. var Symbol = global.Symbol;
  73486. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  73487. module.exports = function (name) {
  73488. if (!has(WellKnownSymbolsStore, name)) {
  73489. if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
  73490. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  73491. } return WellKnownSymbolsStore[name];
  73492. };
  73493. /***/ }),
  73494. /***/ 28342:
  73495. /***/ ((module) => {
  73496. // a string of all valid unicode whitespaces
  73497. // eslint-disable-next-line max-len
  73498. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  73499. /***/ }),
  73500. /***/ 28165:
  73501. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73502. "use strict";
  73503. var $ = __webpack_require__(54761);
  73504. var $filter = __webpack_require__(20528).filter;
  73505. var arrayMethodHasSpeciesSupport = __webpack_require__(44820);
  73506. var arrayMethodUsesToLength = __webpack_require__(55714);
  73507. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  73508. // Edge 14- issue
  73509. var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
  73510. // `Array.prototype.filter` method
  73511. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  73512. // with adding support of @@species
  73513. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
  73514. filter: function filter(callbackfn /* , thisArg */) {
  73515. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  73516. }
  73517. });
  73518. /***/ }),
  73519. /***/ 49399:
  73520. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73521. "use strict";
  73522. var $ = __webpack_require__(54761);
  73523. var forEach = __webpack_require__(81269);
  73524. // `Array.prototype.forEach` method
  73525. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  73526. $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  73527. forEach: forEach
  73528. });
  73529. /***/ }),
  73530. /***/ 47543:
  73531. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73532. "use strict";
  73533. var toIndexedObject = __webpack_require__(43206);
  73534. var addToUnscopables = __webpack_require__(29256);
  73535. var Iterators = __webpack_require__(96126);
  73536. var InternalStateModule = __webpack_require__(41030);
  73537. var defineIterator = __webpack_require__(57583);
  73538. var ARRAY_ITERATOR = 'Array Iterator';
  73539. var setInternalState = InternalStateModule.set;
  73540. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  73541. // `Array.prototype.entries` method
  73542. // https://tc39.github.io/ecma262/#sec-array.prototype.entries
  73543. // `Array.prototype.keys` method
  73544. // https://tc39.github.io/ecma262/#sec-array.prototype.keys
  73545. // `Array.prototype.values` method
  73546. // https://tc39.github.io/ecma262/#sec-array.prototype.values
  73547. // `Array.prototype[@@iterator]` method
  73548. // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
  73549. // `CreateArrayIterator` internal method
  73550. // https://tc39.github.io/ecma262/#sec-createarrayiterator
  73551. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  73552. setInternalState(this, {
  73553. type: ARRAY_ITERATOR,
  73554. target: toIndexedObject(iterated), // target
  73555. index: 0, // next index
  73556. kind: kind // kind
  73557. });
  73558. // `%ArrayIteratorPrototype%.next` method
  73559. // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
  73560. }, function () {
  73561. var state = getInternalState(this);
  73562. var target = state.target;
  73563. var kind = state.kind;
  73564. var index = state.index++;
  73565. if (!target || index >= target.length) {
  73566. state.target = undefined;
  73567. return { value: undefined, done: true };
  73568. }
  73569. if (kind == 'keys') return { value: index, done: false };
  73570. if (kind == 'values') return { value: target[index], done: false };
  73571. return { value: [index, target[index]], done: false };
  73572. }, 'values');
  73573. // argumentsList[@@iterator] is %ArrayProto_values%
  73574. // https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
  73575. // https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
  73576. Iterators.Arguments = Iterators.Array;
  73577. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  73578. addToUnscopables('keys');
  73579. addToUnscopables('values');
  73580. addToUnscopables('entries');
  73581. /***/ }),
  73582. /***/ 57985:
  73583. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73584. "use strict";
  73585. var $ = __webpack_require__(54761);
  73586. var $reduce = __webpack_require__(26589).left;
  73587. var arrayMethodIsStrict = __webpack_require__(1923);
  73588. var arrayMethodUsesToLength = __webpack_require__(55714);
  73589. var CHROME_VERSION = __webpack_require__(24324);
  73590. var IS_NODE = __webpack_require__(37594);
  73591. var STRICT_METHOD = arrayMethodIsStrict('reduce');
  73592. var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
  73593. // Chrome 80-82 has a critical bug
  73594. // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
  73595. var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
  73596. // `Array.prototype.reduce` method
  73597. // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
  73598. $({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH || CHROME_BUG }, {
  73599. reduce: function reduce(callbackfn /* , initialValue */) {
  73600. return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  73601. }
  73602. });
  73603. /***/ }),
  73604. /***/ 66618:
  73605. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73606. var DESCRIPTORS = __webpack_require__(70723);
  73607. var defineProperty = __webpack_require__(79168).f;
  73608. var FunctionPrototype = Function.prototype;
  73609. var FunctionPrototypeToString = FunctionPrototype.toString;
  73610. var nameRE = /^\s*function ([^ (]*)/;
  73611. var NAME = 'name';
  73612. // Function instances `.name` property
  73613. // https://tc39.github.io/ecma262/#sec-function-instances-name
  73614. if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  73615. defineProperty(FunctionPrototype, NAME, {
  73616. configurable: true,
  73617. get: function () {
  73618. try {
  73619. return FunctionPrototypeToString.call(this).match(nameRE)[1];
  73620. } catch (error) {
  73621. return '';
  73622. }
  73623. }
  73624. });
  73625. }
  73626. /***/ }),
  73627. /***/ 57692:
  73628. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73629. var $ = __webpack_require__(54761);
  73630. var assign = __webpack_require__(24727);
  73631. // `Object.assign` method
  73632. // https://tc39.github.io/ecma262/#sec-object.assign
  73633. $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
  73634. assign: assign
  73635. });
  73636. /***/ }),
  73637. /***/ 12352:
  73638. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73639. var TO_STRING_TAG_SUPPORT = __webpack_require__(94823);
  73640. var redefine = __webpack_require__(23971);
  73641. var toString = __webpack_require__(4117);
  73642. // `Object.prototype.toString` method
  73643. // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
  73644. if (!TO_STRING_TAG_SUPPORT) {
  73645. redefine(Object.prototype, 'toString', toString, { unsafe: true });
  73646. }
  73647. /***/ }),
  73648. /***/ 4249:
  73649. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73650. var $ = __webpack_require__(54761);
  73651. var parseIntImplementation = __webpack_require__(78513);
  73652. // `parseInt` method
  73653. // https://tc39.github.io/ecma262/#sec-parseint-string-radix
  73654. $({ global: true, forced: parseInt != parseIntImplementation }, {
  73655. parseInt: parseIntImplementation
  73656. });
  73657. /***/ }),
  73658. /***/ 9989:
  73659. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73660. "use strict";
  73661. var $ = __webpack_require__(54761);
  73662. var exec = __webpack_require__(15510);
  73663. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  73664. exec: exec
  73665. });
  73666. /***/ }),
  73667. /***/ 63344:
  73668. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73669. "use strict";
  73670. var charAt = __webpack_require__(27321).charAt;
  73671. var InternalStateModule = __webpack_require__(41030);
  73672. var defineIterator = __webpack_require__(57583);
  73673. var STRING_ITERATOR = 'String Iterator';
  73674. var setInternalState = InternalStateModule.set;
  73675. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  73676. // `String.prototype[@@iterator]` method
  73677. // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
  73678. defineIterator(String, 'String', function (iterated) {
  73679. setInternalState(this, {
  73680. type: STRING_ITERATOR,
  73681. string: String(iterated),
  73682. index: 0
  73683. });
  73684. // `%StringIteratorPrototype%.next` method
  73685. // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
  73686. }, function next() {
  73687. var state = getInternalState(this);
  73688. var string = state.string;
  73689. var index = state.index;
  73690. var point;
  73691. if (index >= string.length) return { value: undefined, done: true };
  73692. point = charAt(string, index);
  73693. state.index += point.length;
  73694. return { value: point, done: false };
  73695. });
  73696. /***/ }),
  73697. /***/ 8307:
  73698. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73699. "use strict";
  73700. var fixRegExpWellKnownSymbolLogic = __webpack_require__(29696);
  73701. var anObject = __webpack_require__(71474);
  73702. var toLength = __webpack_require__(93917);
  73703. var requireObjectCoercible = __webpack_require__(97431);
  73704. var advanceStringIndex = __webpack_require__(53615);
  73705. var regExpExec = __webpack_require__(8734);
  73706. // @@match logic
  73707. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  73708. return [
  73709. // `String.prototype.match` method
  73710. // https://tc39.github.io/ecma262/#sec-string.prototype.match
  73711. function match(regexp) {
  73712. var O = requireObjectCoercible(this);
  73713. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  73714. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  73715. },
  73716. // `RegExp.prototype[@@match]` method
  73717. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
  73718. function (regexp) {
  73719. var res = maybeCallNative(nativeMatch, regexp, this);
  73720. if (res.done) return res.value;
  73721. var rx = anObject(regexp);
  73722. var S = String(this);
  73723. if (!rx.global) return regExpExec(rx, S);
  73724. var fullUnicode = rx.unicode;
  73725. rx.lastIndex = 0;
  73726. var A = [];
  73727. var n = 0;
  73728. var result;
  73729. while ((result = regExpExec(rx, S)) !== null) {
  73730. var matchStr = String(result[0]);
  73731. A[n] = matchStr;
  73732. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  73733. n++;
  73734. }
  73735. return n === 0 ? null : A;
  73736. }
  73737. ];
  73738. });
  73739. /***/ }),
  73740. /***/ 4390:
  73741. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73742. "use strict";
  73743. var fixRegExpWellKnownSymbolLogic = __webpack_require__(29696);
  73744. var anObject = __webpack_require__(71474);
  73745. var toObject = __webpack_require__(29473);
  73746. var toLength = __webpack_require__(93917);
  73747. var toInteger = __webpack_require__(78874);
  73748. var requireObjectCoercible = __webpack_require__(97431);
  73749. var advanceStringIndex = __webpack_require__(53615);
  73750. var regExpExec = __webpack_require__(8734);
  73751. var max = Math.max;
  73752. var min = Math.min;
  73753. var floor = Math.floor;
  73754. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
  73755. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
  73756. var maybeToString = function (it) {
  73757. return it === undefined ? it : String(it);
  73758. };
  73759. // @@replace logic
  73760. fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  73761. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  73762. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  73763. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  73764. return [
  73765. // `String.prototype.replace` method
  73766. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  73767. function replace(searchValue, replaceValue) {
  73768. var O = requireObjectCoercible(this);
  73769. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  73770. return replacer !== undefined
  73771. ? replacer.call(searchValue, O, replaceValue)
  73772. : nativeReplace.call(String(O), searchValue, replaceValue);
  73773. },
  73774. // `RegExp.prototype[@@replace]` method
  73775. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  73776. function (regexp, replaceValue) {
  73777. if (
  73778. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  73779. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  73780. ) {
  73781. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  73782. if (res.done) return res.value;
  73783. }
  73784. var rx = anObject(regexp);
  73785. var S = String(this);
  73786. var functionalReplace = typeof replaceValue === 'function';
  73787. if (!functionalReplace) replaceValue = String(replaceValue);
  73788. var global = rx.global;
  73789. if (global) {
  73790. var fullUnicode = rx.unicode;
  73791. rx.lastIndex = 0;
  73792. }
  73793. var results = [];
  73794. while (true) {
  73795. var result = regExpExec(rx, S);
  73796. if (result === null) break;
  73797. results.push(result);
  73798. if (!global) break;
  73799. var matchStr = String(result[0]);
  73800. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  73801. }
  73802. var accumulatedResult = '';
  73803. var nextSourcePosition = 0;
  73804. for (var i = 0; i < results.length; i++) {
  73805. result = results[i];
  73806. var matched = String(result[0]);
  73807. var position = max(min(toInteger(result.index), S.length), 0);
  73808. var captures = [];
  73809. // NOTE: This is equivalent to
  73810. // captures = result.slice(1).map(maybeToString)
  73811. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  73812. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  73813. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  73814. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  73815. var namedCaptures = result.groups;
  73816. if (functionalReplace) {
  73817. var replacerArgs = [matched].concat(captures, position, S);
  73818. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  73819. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  73820. } else {
  73821. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  73822. }
  73823. if (position >= nextSourcePosition) {
  73824. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  73825. nextSourcePosition = position + matched.length;
  73826. }
  73827. }
  73828. return accumulatedResult + S.slice(nextSourcePosition);
  73829. }
  73830. ];
  73831. // https://tc39.github.io/ecma262/#sec-getsubstitution
  73832. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  73833. var tailPos = position + matched.length;
  73834. var m = captures.length;
  73835. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  73836. if (namedCaptures !== undefined) {
  73837. namedCaptures = toObject(namedCaptures);
  73838. symbols = SUBSTITUTION_SYMBOLS;
  73839. }
  73840. return nativeReplace.call(replacement, symbols, function (match, ch) {
  73841. var capture;
  73842. switch (ch.charAt(0)) {
  73843. case '$': return '$';
  73844. case '&': return matched;
  73845. case '`': return str.slice(0, position);
  73846. case "'": return str.slice(tailPos);
  73847. case '<':
  73848. capture = namedCaptures[ch.slice(1, -1)];
  73849. break;
  73850. default: // \d\d?
  73851. var n = +ch;
  73852. if (n === 0) return match;
  73853. if (n > m) {
  73854. var f = floor(n / 10);
  73855. if (f === 0) return match;
  73856. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  73857. return match;
  73858. }
  73859. capture = captures[n - 1];
  73860. }
  73861. return capture === undefined ? '' : capture;
  73862. });
  73863. }
  73864. });
  73865. /***/ }),
  73866. /***/ 27323:
  73867. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  73868. "use strict";
  73869. var global = __webpack_require__(8454);
  73870. var redefineAll = __webpack_require__(19573);
  73871. var InternalMetadataModule = __webpack_require__(96582);
  73872. var collection = __webpack_require__(96645);
  73873. var collectionWeak = __webpack_require__(77790);
  73874. var isObject = __webpack_require__(65896);
  73875. var enforceIternalState = __webpack_require__(41030).enforce;
  73876. var NATIVE_WEAK_MAP = __webpack_require__(4404);
  73877. var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
  73878. var isExtensible = Object.isExtensible;
  73879. var InternalWeakMap;
  73880. var wrapper = function (init) {
  73881. return function WeakMap() {
  73882. return init(this, arguments.length ? arguments[0] : undefined);
  73883. };
  73884. };
  73885. // `WeakMap` constructor
  73886. // https://tc39.github.io/ecma262/#sec-weakmap-constructor
  73887. var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);
  73888. // IE11 WeakMap frozen keys fix
  73889. // We can't use feature detection because it crash some old IE builds
  73890. // https://github.com/zloirock/core-js/issues/485
  73891. if (NATIVE_WEAK_MAP && IS_IE11) {
  73892. InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
  73893. InternalMetadataModule.REQUIRED = true;
  73894. var WeakMapPrototype = $WeakMap.prototype;
  73895. var nativeDelete = WeakMapPrototype['delete'];
  73896. var nativeHas = WeakMapPrototype.has;
  73897. var nativeGet = WeakMapPrototype.get;
  73898. var nativeSet = WeakMapPrototype.set;
  73899. redefineAll(WeakMapPrototype, {
  73900. 'delete': function (key) {
  73901. if (isObject(key) && !isExtensible(key)) {
  73902. var state = enforceIternalState(this);
  73903. if (!state.frozen) state.frozen = new InternalWeakMap();
  73904. return nativeDelete.call(this, key) || state.frozen['delete'](key);
  73905. } return nativeDelete.call(this, key);
  73906. },
  73907. has: function has(key) {
  73908. if (isObject(key) && !isExtensible(key)) {
  73909. var state = enforceIternalState(this);
  73910. if (!state.frozen) state.frozen = new InternalWeakMap();
  73911. return nativeHas.call(this, key) || state.frozen.has(key);
  73912. } return nativeHas.call(this, key);
  73913. },
  73914. get: function get(key) {
  73915. if (isObject(key) && !isExtensible(key)) {
  73916. var state = enforceIternalState(this);
  73917. if (!state.frozen) state.frozen = new InternalWeakMap();
  73918. return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);
  73919. } return nativeGet.call(this, key);
  73920. },
  73921. set: function set(key, value) {
  73922. if (isObject(key) && !isExtensible(key)) {
  73923. var state = enforceIternalState(this);
  73924. if (!state.frozen) state.frozen = new InternalWeakMap();
  73925. nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);
  73926. } else nativeSet.call(this, key, value);
  73927. return this;
  73928. }
  73929. });
  73930. }
  73931. /***/ }),
  73932. /***/ 3542:
  73933. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73934. var global = __webpack_require__(8454);
  73935. var DOMIterables = __webpack_require__(66181);
  73936. var forEach = __webpack_require__(81269);
  73937. var createNonEnumerableProperty = __webpack_require__(31501);
  73938. for (var COLLECTION_NAME in DOMIterables) {
  73939. var Collection = global[COLLECTION_NAME];
  73940. var CollectionPrototype = Collection && Collection.prototype;
  73941. // some Chrome versions have non-configurable methods on DOMTokenList
  73942. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  73943. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  73944. } catch (error) {
  73945. CollectionPrototype.forEach = forEach;
  73946. }
  73947. }
  73948. /***/ }),
  73949. /***/ 4079:
  73950. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  73951. var global = __webpack_require__(8454);
  73952. var DOMIterables = __webpack_require__(66181);
  73953. var ArrayIteratorMethods = __webpack_require__(47543);
  73954. var createNonEnumerableProperty = __webpack_require__(31501);
  73955. var wellKnownSymbol = __webpack_require__(48149);
  73956. var ITERATOR = wellKnownSymbol('iterator');
  73957. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  73958. var ArrayValues = ArrayIteratorMethods.values;
  73959. for (var COLLECTION_NAME in DOMIterables) {
  73960. var Collection = global[COLLECTION_NAME];
  73961. var CollectionPrototype = Collection && Collection.prototype;
  73962. if (CollectionPrototype) {
  73963. // some Chrome versions have non-configurable methods on DOMTokenList
  73964. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  73965. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  73966. } catch (error) {
  73967. CollectionPrototype[ITERATOR] = ArrayValues;
  73968. }
  73969. if (!CollectionPrototype[TO_STRING_TAG]) {
  73970. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  73971. }
  73972. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  73973. // some Chrome versions have non-configurable methods on DOMTokenList
  73974. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  73975. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  73976. } catch (error) {
  73977. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  73978. }
  73979. }
  73980. }
  73981. }
  73982. /***/ }),
  73983. /***/ 51474:
  73984. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  73985. "use strict";
  73986. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  73987. /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__)
  73988. /* harmony export */ });
  73989. /* unused harmony exports MultiDrag, Sortable, Swap */
  73990. /**!
  73991. * Sortable 1.13.0
  73992. * @author RubaXa <trash@rubaxa.org>
  73993. * @author owenm <owen23355@gmail.com>
  73994. * @license MIT
  73995. */
  73996. function _typeof(obj) {
  73997. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  73998. _typeof = function (obj) {
  73999. return typeof obj;
  74000. };
  74001. } else {
  74002. _typeof = function (obj) {
  74003. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  74004. };
  74005. }
  74006. return _typeof(obj);
  74007. }
  74008. function _defineProperty(obj, key, value) {
  74009. if (key in obj) {
  74010. Object.defineProperty(obj, key, {
  74011. value: value,
  74012. enumerable: true,
  74013. configurable: true,
  74014. writable: true
  74015. });
  74016. } else {
  74017. obj[key] = value;
  74018. }
  74019. return obj;
  74020. }
  74021. function _extends() {
  74022. _extends = Object.assign || function (target) {
  74023. for (var i = 1; i < arguments.length; i++) {
  74024. var source = arguments[i];
  74025. for (var key in source) {
  74026. if (Object.prototype.hasOwnProperty.call(source, key)) {
  74027. target[key] = source[key];
  74028. }
  74029. }
  74030. }
  74031. return target;
  74032. };
  74033. return _extends.apply(this, arguments);
  74034. }
  74035. function _objectSpread(target) {
  74036. for (var i = 1; i < arguments.length; i++) {
  74037. var source = arguments[i] != null ? arguments[i] : {};
  74038. var ownKeys = Object.keys(source);
  74039. if (typeof Object.getOwnPropertySymbols === 'function') {
  74040. ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
  74041. return Object.getOwnPropertyDescriptor(source, sym).enumerable;
  74042. }));
  74043. }
  74044. ownKeys.forEach(function (key) {
  74045. _defineProperty(target, key, source[key]);
  74046. });
  74047. }
  74048. return target;
  74049. }
  74050. function _objectWithoutPropertiesLoose(source, excluded) {
  74051. if (source == null) return {};
  74052. var target = {};
  74053. var sourceKeys = Object.keys(source);
  74054. var key, i;
  74055. for (i = 0; i < sourceKeys.length; i++) {
  74056. key = sourceKeys[i];
  74057. if (excluded.indexOf(key) >= 0) continue;
  74058. target[key] = source[key];
  74059. }
  74060. return target;
  74061. }
  74062. function _objectWithoutProperties(source, excluded) {
  74063. if (source == null) return {};
  74064. var target = _objectWithoutPropertiesLoose(source, excluded);
  74065. var key, i;
  74066. if (Object.getOwnPropertySymbols) {
  74067. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  74068. for (i = 0; i < sourceSymbolKeys.length; i++) {
  74069. key = sourceSymbolKeys[i];
  74070. if (excluded.indexOf(key) >= 0) continue;
  74071. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  74072. target[key] = source[key];
  74073. }
  74074. }
  74075. return target;
  74076. }
  74077. function _toConsumableArray(arr) {
  74078. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
  74079. }
  74080. function _arrayWithoutHoles(arr) {
  74081. if (Array.isArray(arr)) {
  74082. for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
  74083. return arr2;
  74084. }
  74085. }
  74086. function _iterableToArray(iter) {
  74087. if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
  74088. }
  74089. function _nonIterableSpread() {
  74090. throw new TypeError("Invalid attempt to spread non-iterable instance");
  74091. }
  74092. var version = "1.13.0";
  74093. function userAgent(pattern) {
  74094. if (typeof window !== 'undefined' && window.navigator) {
  74095. return !!
  74096. /*@__PURE__*/
  74097. navigator.userAgent.match(pattern);
  74098. }
  74099. }
  74100. var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
  74101. var Edge = userAgent(/Edge/i);
  74102. var FireFox = userAgent(/firefox/i);
  74103. var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
  74104. var IOS = userAgent(/iP(ad|od|hone)/i);
  74105. var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
  74106. var captureMode = {
  74107. capture: false,
  74108. passive: false
  74109. };
  74110. function on(el, event, fn) {
  74111. el.addEventListener(event, fn, !IE11OrLess && captureMode);
  74112. }
  74113. function off(el, event, fn) {
  74114. el.removeEventListener(event, fn, !IE11OrLess && captureMode);
  74115. }
  74116. function matches(
  74117. /**HTMLElement*/
  74118. el,
  74119. /**String*/
  74120. selector) {
  74121. if (!selector) return;
  74122. selector[0] === '>' && (selector = selector.substring(1));
  74123. if (el) {
  74124. try {
  74125. if (el.matches) {
  74126. return el.matches(selector);
  74127. } else if (el.msMatchesSelector) {
  74128. return el.msMatchesSelector(selector);
  74129. } else if (el.webkitMatchesSelector) {
  74130. return el.webkitMatchesSelector(selector);
  74131. }
  74132. } catch (_) {
  74133. return false;
  74134. }
  74135. }
  74136. return false;
  74137. }
  74138. function getParentOrHost(el) {
  74139. return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
  74140. }
  74141. function closest(
  74142. /**HTMLElement*/
  74143. el,
  74144. /**String*/
  74145. selector,
  74146. /**HTMLElement*/
  74147. ctx, includeCTX) {
  74148. if (el) {
  74149. ctx = ctx || document;
  74150. do {
  74151. if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
  74152. return el;
  74153. }
  74154. if (el === ctx) break;
  74155. /* jshint boss:true */
  74156. } while (el = getParentOrHost(el));
  74157. }
  74158. return null;
  74159. }
  74160. var R_SPACE = /\s+/g;
  74161. function toggleClass(el, name, state) {
  74162. if (el && name) {
  74163. if (el.classList) {
  74164. el.classList[state ? 'add' : 'remove'](name);
  74165. } else {
  74166. var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
  74167. el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
  74168. }
  74169. }
  74170. }
  74171. function css(el, prop, val) {
  74172. var style = el && el.style;
  74173. if (style) {
  74174. if (val === void 0) {
  74175. if (document.defaultView && document.defaultView.getComputedStyle) {
  74176. val = document.defaultView.getComputedStyle(el, '');
  74177. } else if (el.currentStyle) {
  74178. val = el.currentStyle;
  74179. }
  74180. return prop === void 0 ? val : val[prop];
  74181. } else {
  74182. if (!(prop in style) && prop.indexOf('webkit') === -1) {
  74183. prop = '-webkit-' + prop;
  74184. }
  74185. style[prop] = val + (typeof val === 'string' ? '' : 'px');
  74186. }
  74187. }
  74188. }
  74189. function matrix(el, selfOnly) {
  74190. var appliedTransforms = '';
  74191. if (typeof el === 'string') {
  74192. appliedTransforms = el;
  74193. } else {
  74194. do {
  74195. var transform = css(el, 'transform');
  74196. if (transform && transform !== 'none') {
  74197. appliedTransforms = transform + ' ' + appliedTransforms;
  74198. }
  74199. /* jshint boss:true */
  74200. } while (!selfOnly && (el = el.parentNode));
  74201. }
  74202. var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
  74203. /*jshint -W056 */
  74204. return matrixFn && new matrixFn(appliedTransforms);
  74205. }
  74206. function find(ctx, tagName, iterator) {
  74207. if (ctx) {
  74208. var list = ctx.getElementsByTagName(tagName),
  74209. i = 0,
  74210. n = list.length;
  74211. if (iterator) {
  74212. for (; i < n; i++) {
  74213. iterator(list[i], i);
  74214. }
  74215. }
  74216. return list;
  74217. }
  74218. return [];
  74219. }
  74220. function getWindowScrollingElement() {
  74221. var scrollingElement = document.scrollingElement;
  74222. if (scrollingElement) {
  74223. return scrollingElement;
  74224. } else {
  74225. return document.documentElement;
  74226. }
  74227. }
  74228. /**
  74229. * Returns the "bounding client rect" of given element
  74230. * @param {HTMLElement} el The element whose boundingClientRect is wanted
  74231. * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
  74232. * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
  74233. * @param {[Boolean]} undoScale Whether the container's scale() should be undone
  74234. * @param {[HTMLElement]} container The parent the element will be placed in
  74235. * @return {Object} The boundingClientRect of el, with specified adjustments
  74236. */
  74237. function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
  74238. if (!el.getBoundingClientRect && el !== window) return;
  74239. var elRect, top, left, bottom, right, height, width;
  74240. if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
  74241. elRect = el.getBoundingClientRect();
  74242. top = elRect.top;
  74243. left = elRect.left;
  74244. bottom = elRect.bottom;
  74245. right = elRect.right;
  74246. height = elRect.height;
  74247. width = elRect.width;
  74248. } else {
  74249. top = 0;
  74250. left = 0;
  74251. bottom = window.innerHeight;
  74252. right = window.innerWidth;
  74253. height = window.innerHeight;
  74254. width = window.innerWidth;
  74255. }
  74256. if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
  74257. // Adjust for translate()
  74258. container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
  74259. // Not needed on <= IE11
  74260. if (!IE11OrLess) {
  74261. do {
  74262. if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
  74263. var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
  74264. top -= containerRect.top + parseInt(css(container, 'border-top-width'));
  74265. left -= containerRect.left + parseInt(css(container, 'border-left-width'));
  74266. bottom = top + elRect.height;
  74267. right = left + elRect.width;
  74268. break;
  74269. }
  74270. /* jshint boss:true */
  74271. } while (container = container.parentNode);
  74272. }
  74273. }
  74274. if (undoScale && el !== window) {
  74275. // Adjust for scale()
  74276. var elMatrix = matrix(container || el),
  74277. scaleX = elMatrix && elMatrix.a,
  74278. scaleY = elMatrix && elMatrix.d;
  74279. if (elMatrix) {
  74280. top /= scaleY;
  74281. left /= scaleX;
  74282. width /= scaleX;
  74283. height /= scaleY;
  74284. bottom = top + height;
  74285. right = left + width;
  74286. }
  74287. }
  74288. return {
  74289. top: top,
  74290. left: left,
  74291. bottom: bottom,
  74292. right: right,
  74293. width: width,
  74294. height: height
  74295. };
  74296. }
  74297. /**
  74298. * Checks if a side of an element is scrolled past a side of its parents
  74299. * @param {HTMLElement} el The element who's side being scrolled out of view is in question
  74300. * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
  74301. * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
  74302. * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
  74303. */
  74304. function isScrolledPast(el, elSide, parentSide) {
  74305. var parent = getParentAutoScrollElement(el, true),
  74306. elSideVal = getRect(el)[elSide];
  74307. /* jshint boss:true */
  74308. while (parent) {
  74309. var parentSideVal = getRect(parent)[parentSide],
  74310. visible = void 0;
  74311. if (parentSide === 'top' || parentSide === 'left') {
  74312. visible = elSideVal >= parentSideVal;
  74313. } else {
  74314. visible = elSideVal <= parentSideVal;
  74315. }
  74316. if (!visible) return parent;
  74317. if (parent === getWindowScrollingElement()) break;
  74318. parent = getParentAutoScrollElement(parent, false);
  74319. }
  74320. return false;
  74321. }
  74322. /**
  74323. * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
  74324. * and non-draggable elements
  74325. * @param {HTMLElement} el The parent element
  74326. * @param {Number} childNum The index of the child
  74327. * @param {Object} options Parent Sortable's options
  74328. * @return {HTMLElement} The child at index childNum, or null if not found
  74329. */
  74330. function getChild(el, childNum, options) {
  74331. var currentChild = 0,
  74332. i = 0,
  74333. children = el.children;
  74334. while (i < children.length) {
  74335. if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {
  74336. if (currentChild === childNum) {
  74337. return children[i];
  74338. }
  74339. currentChild++;
  74340. }
  74341. i++;
  74342. }
  74343. return null;
  74344. }
  74345. /**
  74346. * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
  74347. * @param {HTMLElement} el Parent element
  74348. * @param {selector} selector Any other elements that should be ignored
  74349. * @return {HTMLElement} The last child, ignoring ghostEl
  74350. */
  74351. function lastChild(el, selector) {
  74352. var last = el.lastElementChild;
  74353. while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
  74354. last = last.previousElementSibling;
  74355. }
  74356. return last || null;
  74357. }
  74358. /**
  74359. * Returns the index of an element within its parent for a selected set of
  74360. * elements
  74361. * @param {HTMLElement} el
  74362. * @param {selector} selector
  74363. * @return {number}
  74364. */
  74365. function index(el, selector) {
  74366. var index = 0;
  74367. if (!el || !el.parentNode) {
  74368. return -1;
  74369. }
  74370. /* jshint boss:true */
  74371. while (el = el.previousElementSibling) {
  74372. if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
  74373. index++;
  74374. }
  74375. }
  74376. return index;
  74377. }
  74378. /**
  74379. * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
  74380. * The value is returned in real pixels.
  74381. * @param {HTMLElement} el
  74382. * @return {Array} Offsets in the format of [left, top]
  74383. */
  74384. function getRelativeScrollOffset(el) {
  74385. var offsetLeft = 0,
  74386. offsetTop = 0,
  74387. winScroller = getWindowScrollingElement();
  74388. if (el) {
  74389. do {
  74390. var elMatrix = matrix(el),
  74391. scaleX = elMatrix.a,
  74392. scaleY = elMatrix.d;
  74393. offsetLeft += el.scrollLeft * scaleX;
  74394. offsetTop += el.scrollTop * scaleY;
  74395. } while (el !== winScroller && (el = el.parentNode));
  74396. }
  74397. return [offsetLeft, offsetTop];
  74398. }
  74399. /**
  74400. * Returns the index of the object within the given array
  74401. * @param {Array} arr Array that may or may not hold the object
  74402. * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
  74403. * @return {Number} The index of the object in the array, or -1
  74404. */
  74405. function indexOfObject(arr, obj) {
  74406. for (var i in arr) {
  74407. if (!arr.hasOwnProperty(i)) continue;
  74408. for (var key in obj) {
  74409. if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
  74410. }
  74411. }
  74412. return -1;
  74413. }
  74414. function getParentAutoScrollElement(el, includeSelf) {
  74415. // skip to window
  74416. if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
  74417. var elem = el;
  74418. var gotSelf = false;
  74419. do {
  74420. // we don't need to get elem css if it isn't even overflowing in the first place (performance)
  74421. if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
  74422. var elemCSS = css(elem);
  74423. if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
  74424. if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
  74425. if (gotSelf || includeSelf) return elem;
  74426. gotSelf = true;
  74427. }
  74428. }
  74429. /* jshint boss:true */
  74430. } while (elem = elem.parentNode);
  74431. return getWindowScrollingElement();
  74432. }
  74433. function extend(dst, src) {
  74434. if (dst && src) {
  74435. for (var key in src) {
  74436. if (src.hasOwnProperty(key)) {
  74437. dst[key] = src[key];
  74438. }
  74439. }
  74440. }
  74441. return dst;
  74442. }
  74443. function isRectEqual(rect1, rect2) {
  74444. return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
  74445. }
  74446. var _throttleTimeout;
  74447. function throttle(callback, ms) {
  74448. return function () {
  74449. if (!_throttleTimeout) {
  74450. var args = arguments,
  74451. _this = this;
  74452. if (args.length === 1) {
  74453. callback.call(_this, args[0]);
  74454. } else {
  74455. callback.apply(_this, args);
  74456. }
  74457. _throttleTimeout = setTimeout(function () {
  74458. _throttleTimeout = void 0;
  74459. }, ms);
  74460. }
  74461. };
  74462. }
  74463. function cancelThrottle() {
  74464. clearTimeout(_throttleTimeout);
  74465. _throttleTimeout = void 0;
  74466. }
  74467. function scrollBy(el, x, y) {
  74468. el.scrollLeft += x;
  74469. el.scrollTop += y;
  74470. }
  74471. function clone(el) {
  74472. var Polymer = window.Polymer;
  74473. var $ = window.jQuery || window.Zepto;
  74474. if (Polymer && Polymer.dom) {
  74475. return Polymer.dom(el).cloneNode(true);
  74476. } else if ($) {
  74477. return $(el).clone(true)[0];
  74478. } else {
  74479. return el.cloneNode(true);
  74480. }
  74481. }
  74482. function setRect(el, rect) {
  74483. css(el, 'position', 'absolute');
  74484. css(el, 'top', rect.top);
  74485. css(el, 'left', rect.left);
  74486. css(el, 'width', rect.width);
  74487. css(el, 'height', rect.height);
  74488. }
  74489. function unsetRect(el) {
  74490. css(el, 'position', '');
  74491. css(el, 'top', '');
  74492. css(el, 'left', '');
  74493. css(el, 'width', '');
  74494. css(el, 'height', '');
  74495. }
  74496. var expando = 'Sortable' + new Date().getTime();
  74497. function AnimationStateManager() {
  74498. var animationStates = [],
  74499. animationCallbackId;
  74500. return {
  74501. captureAnimationState: function captureAnimationState() {
  74502. animationStates = [];
  74503. if (!this.options.animation) return;
  74504. var children = [].slice.call(this.el.children);
  74505. children.forEach(function (child) {
  74506. if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
  74507. animationStates.push({
  74508. target: child,
  74509. rect: getRect(child)
  74510. });
  74511. var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
  74512. if (child.thisAnimationDuration) {
  74513. var childMatrix = matrix(child, true);
  74514. if (childMatrix) {
  74515. fromRect.top -= childMatrix.f;
  74516. fromRect.left -= childMatrix.e;
  74517. }
  74518. }
  74519. child.fromRect = fromRect;
  74520. });
  74521. },
  74522. addAnimationState: function addAnimationState(state) {
  74523. animationStates.push(state);
  74524. },
  74525. removeAnimationState: function removeAnimationState(target) {
  74526. animationStates.splice(indexOfObject(animationStates, {
  74527. target: target
  74528. }), 1);
  74529. },
  74530. animateAll: function animateAll(callback) {
  74531. var _this = this;
  74532. if (!this.options.animation) {
  74533. clearTimeout(animationCallbackId);
  74534. if (typeof callback === 'function') callback();
  74535. return;
  74536. }
  74537. var animating = false,
  74538. animationTime = 0;
  74539. animationStates.forEach(function (state) {
  74540. var time = 0,
  74541. target = state.target,
  74542. fromRect = target.fromRect,
  74543. toRect = getRect(target),
  74544. prevFromRect = target.prevFromRect,
  74545. prevToRect = target.prevToRect,
  74546. animatingRect = state.rect,
  74547. targetMatrix = matrix(target, true);
  74548. if (targetMatrix) {
  74549. // Compensate for current animation
  74550. toRect.top -= targetMatrix.f;
  74551. toRect.left -= targetMatrix.e;
  74552. }
  74553. target.toRect = toRect;
  74554. if (target.thisAnimationDuration) {
  74555. // Could also check if animatingRect is between fromRect and toRect
  74556. if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
  74557. (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
  74558. // If returning to same place as started from animation and on same axis
  74559. time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
  74560. }
  74561. } // if fromRect != toRect: animate
  74562. if (!isRectEqual(toRect, fromRect)) {
  74563. target.prevFromRect = fromRect;
  74564. target.prevToRect = toRect;
  74565. if (!time) {
  74566. time = _this.options.animation;
  74567. }
  74568. _this.animate(target, animatingRect, toRect, time);
  74569. }
  74570. if (time) {
  74571. animating = true;
  74572. animationTime = Math.max(animationTime, time);
  74573. clearTimeout(target.animationResetTimer);
  74574. target.animationResetTimer = setTimeout(function () {
  74575. target.animationTime = 0;
  74576. target.prevFromRect = null;
  74577. target.fromRect = null;
  74578. target.prevToRect = null;
  74579. target.thisAnimationDuration = null;
  74580. }, time);
  74581. target.thisAnimationDuration = time;
  74582. }
  74583. });
  74584. clearTimeout(animationCallbackId);
  74585. if (!animating) {
  74586. if (typeof callback === 'function') callback();
  74587. } else {
  74588. animationCallbackId = setTimeout(function () {
  74589. if (typeof callback === 'function') callback();
  74590. }, animationTime);
  74591. }
  74592. animationStates = [];
  74593. },
  74594. animate: function animate(target, currentRect, toRect, duration) {
  74595. if (duration) {
  74596. css(target, 'transition', '');
  74597. css(target, 'transform', '');
  74598. var elMatrix = matrix(this.el),
  74599. scaleX = elMatrix && elMatrix.a,
  74600. scaleY = elMatrix && elMatrix.d,
  74601. translateX = (currentRect.left - toRect.left) / (scaleX || 1),
  74602. translateY = (currentRect.top - toRect.top) / (scaleY || 1);
  74603. target.animatingX = !!translateX;
  74604. target.animatingY = !!translateY;
  74605. css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
  74606. this.forRepaintDummy = repaint(target); // repaint
  74607. css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
  74608. css(target, 'transform', 'translate3d(0,0,0)');
  74609. typeof target.animated === 'number' && clearTimeout(target.animated);
  74610. target.animated = setTimeout(function () {
  74611. css(target, 'transition', '');
  74612. css(target, 'transform', '');
  74613. target.animated = false;
  74614. target.animatingX = false;
  74615. target.animatingY = false;
  74616. }, duration);
  74617. }
  74618. }
  74619. };
  74620. }
  74621. function repaint(target) {
  74622. return target.offsetWidth;
  74623. }
  74624. function calculateRealTime(animatingRect, fromRect, toRect, options) {
  74625. return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
  74626. }
  74627. var plugins = [];
  74628. var defaults = {
  74629. initializeByDefault: true
  74630. };
  74631. var PluginManager = {
  74632. mount: function mount(plugin) {
  74633. // Set default static properties
  74634. for (var option in defaults) {
  74635. if (defaults.hasOwnProperty(option) && !(option in plugin)) {
  74636. plugin[option] = defaults[option];
  74637. }
  74638. }
  74639. plugins.forEach(function (p) {
  74640. if (p.pluginName === plugin.pluginName) {
  74641. throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
  74642. }
  74643. });
  74644. plugins.push(plugin);
  74645. },
  74646. pluginEvent: function pluginEvent(eventName, sortable, evt) {
  74647. var _this = this;
  74648. this.eventCanceled = false;
  74649. evt.cancel = function () {
  74650. _this.eventCanceled = true;
  74651. };
  74652. var eventNameGlobal = eventName + 'Global';
  74653. plugins.forEach(function (plugin) {
  74654. if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
  74655. if (sortable[plugin.pluginName][eventNameGlobal]) {
  74656. sortable[plugin.pluginName][eventNameGlobal](_objectSpread({
  74657. sortable: sortable
  74658. }, evt));
  74659. } // Only fire plugin event if plugin is enabled in this sortable,
  74660. // and plugin has event defined
  74661. if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
  74662. sortable[plugin.pluginName][eventName](_objectSpread({
  74663. sortable: sortable
  74664. }, evt));
  74665. }
  74666. });
  74667. },
  74668. initializePlugins: function initializePlugins(sortable, el, defaults, options) {
  74669. plugins.forEach(function (plugin) {
  74670. var pluginName = plugin.pluginName;
  74671. if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
  74672. var initialized = new plugin(sortable, el, sortable.options);
  74673. initialized.sortable = sortable;
  74674. initialized.options = sortable.options;
  74675. sortable[pluginName] = initialized; // Add default options from plugin
  74676. _extends(defaults, initialized.defaults);
  74677. });
  74678. for (var option in sortable.options) {
  74679. if (!sortable.options.hasOwnProperty(option)) continue;
  74680. var modified = this.modifyOption(sortable, option, sortable.options[option]);
  74681. if (typeof modified !== 'undefined') {
  74682. sortable.options[option] = modified;
  74683. }
  74684. }
  74685. },
  74686. getEventProperties: function getEventProperties(name, sortable) {
  74687. var eventProperties = {};
  74688. plugins.forEach(function (plugin) {
  74689. if (typeof plugin.eventProperties !== 'function') return;
  74690. _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
  74691. });
  74692. return eventProperties;
  74693. },
  74694. modifyOption: function modifyOption(sortable, name, value) {
  74695. var modifiedValue;
  74696. plugins.forEach(function (plugin) {
  74697. // Plugin must exist on the Sortable
  74698. if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
  74699. if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
  74700. modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
  74701. }
  74702. });
  74703. return modifiedValue;
  74704. }
  74705. };
  74706. function dispatchEvent(_ref) {
  74707. var sortable = _ref.sortable,
  74708. rootEl = _ref.rootEl,
  74709. name = _ref.name,
  74710. targetEl = _ref.targetEl,
  74711. cloneEl = _ref.cloneEl,
  74712. toEl = _ref.toEl,
  74713. fromEl = _ref.fromEl,
  74714. oldIndex = _ref.oldIndex,
  74715. newIndex = _ref.newIndex,
  74716. oldDraggableIndex = _ref.oldDraggableIndex,
  74717. newDraggableIndex = _ref.newDraggableIndex,
  74718. originalEvent = _ref.originalEvent,
  74719. putSortable = _ref.putSortable,
  74720. extraEventProperties = _ref.extraEventProperties;
  74721. sortable = sortable || rootEl && rootEl[expando];
  74722. if (!sortable) return;
  74723. var evt,
  74724. options = sortable.options,
  74725. onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
  74726. if (window.CustomEvent && !IE11OrLess && !Edge) {
  74727. evt = new CustomEvent(name, {
  74728. bubbles: true,
  74729. cancelable: true
  74730. });
  74731. } else {
  74732. evt = document.createEvent('Event');
  74733. evt.initEvent(name, true, true);
  74734. }
  74735. evt.to = toEl || rootEl;
  74736. evt.from = fromEl || rootEl;
  74737. evt.item = targetEl || rootEl;
  74738. evt.clone = cloneEl;
  74739. evt.oldIndex = oldIndex;
  74740. evt.newIndex = newIndex;
  74741. evt.oldDraggableIndex = oldDraggableIndex;
  74742. evt.newDraggableIndex = newDraggableIndex;
  74743. evt.originalEvent = originalEvent;
  74744. evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
  74745. var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));
  74746. for (var option in allEventProperties) {
  74747. evt[option] = allEventProperties[option];
  74748. }
  74749. if (rootEl) {
  74750. rootEl.dispatchEvent(evt);
  74751. }
  74752. if (options[onName]) {
  74753. options[onName].call(sortable, evt);
  74754. }
  74755. }
  74756. var pluginEvent = function pluginEvent(eventName, sortable) {
  74757. var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
  74758. originalEvent = _ref.evt,
  74759. data = _objectWithoutProperties(_ref, ["evt"]);
  74760. PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({
  74761. dragEl: dragEl,
  74762. parentEl: parentEl,
  74763. ghostEl: ghostEl,
  74764. rootEl: rootEl,
  74765. nextEl: nextEl,
  74766. lastDownEl: lastDownEl,
  74767. cloneEl: cloneEl,
  74768. cloneHidden: cloneHidden,
  74769. dragStarted: moved,
  74770. putSortable: putSortable,
  74771. activeSortable: Sortable.active,
  74772. originalEvent: originalEvent,
  74773. oldIndex: oldIndex,
  74774. oldDraggableIndex: oldDraggableIndex,
  74775. newIndex: newIndex,
  74776. newDraggableIndex: newDraggableIndex,
  74777. hideGhostForTarget: _hideGhostForTarget,
  74778. unhideGhostForTarget: _unhideGhostForTarget,
  74779. cloneNowHidden: function cloneNowHidden() {
  74780. cloneHidden = true;
  74781. },
  74782. cloneNowShown: function cloneNowShown() {
  74783. cloneHidden = false;
  74784. },
  74785. dispatchSortableEvent: function dispatchSortableEvent(name) {
  74786. _dispatchEvent({
  74787. sortable: sortable,
  74788. name: name,
  74789. originalEvent: originalEvent
  74790. });
  74791. }
  74792. }, data));
  74793. };
  74794. function _dispatchEvent(info) {
  74795. dispatchEvent(_objectSpread({
  74796. putSortable: putSortable,
  74797. cloneEl: cloneEl,
  74798. targetEl: dragEl,
  74799. rootEl: rootEl,
  74800. oldIndex: oldIndex,
  74801. oldDraggableIndex: oldDraggableIndex,
  74802. newIndex: newIndex,
  74803. newDraggableIndex: newDraggableIndex
  74804. }, info));
  74805. }
  74806. var dragEl,
  74807. parentEl,
  74808. ghostEl,
  74809. rootEl,
  74810. nextEl,
  74811. lastDownEl,
  74812. cloneEl,
  74813. cloneHidden,
  74814. oldIndex,
  74815. newIndex,
  74816. oldDraggableIndex,
  74817. newDraggableIndex,
  74818. activeGroup,
  74819. putSortable,
  74820. awaitingDragStarted = false,
  74821. ignoreNextClick = false,
  74822. sortables = [],
  74823. tapEvt,
  74824. touchEvt,
  74825. lastDx,
  74826. lastDy,
  74827. tapDistanceLeft,
  74828. tapDistanceTop,
  74829. moved,
  74830. lastTarget,
  74831. lastDirection,
  74832. pastFirstInvertThresh = false,
  74833. isCircumstantialInvert = false,
  74834. targetMoveDistance,
  74835. // For positioning ghost absolutely
  74836. ghostRelativeParent,
  74837. ghostRelativeParentInitialScroll = [],
  74838. // (left, top)
  74839. _silent = false,
  74840. savedInputChecked = [];
  74841. /** @const */
  74842. var documentExists = typeof document !== 'undefined',
  74843. PositionGhostAbsolutely = IOS,
  74844. CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
  74845. // This will not pass for IE9, because IE9 DnD only works on anchors
  74846. supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
  74847. supportCssPointerEvents = function () {
  74848. if (!documentExists) return; // false when <= IE11
  74849. if (IE11OrLess) {
  74850. return false;
  74851. }
  74852. var el = document.createElement('x');
  74853. el.style.cssText = 'pointer-events:auto';
  74854. return el.style.pointerEvents === 'auto';
  74855. }(),
  74856. _detectDirection = function _detectDirection(el, options) {
  74857. var elCSS = css(el),
  74858. elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
  74859. child1 = getChild(el, 0, options),
  74860. child2 = getChild(el, 1, options),
  74861. firstChildCSS = child1 && css(child1),
  74862. secondChildCSS = child2 && css(child2),
  74863. firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
  74864. secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
  74865. if (elCSS.display === 'flex') {
  74866. return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
  74867. }
  74868. if (elCSS.display === 'grid') {
  74869. return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
  74870. }
  74871. if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
  74872. var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
  74873. return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
  74874. }
  74875. return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
  74876. },
  74877. _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
  74878. var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
  74879. dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
  74880. dragElOppLength = vertical ? dragRect.width : dragRect.height,
  74881. targetS1Opp = vertical ? targetRect.left : targetRect.top,
  74882. targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
  74883. targetOppLength = vertical ? targetRect.width : targetRect.height;
  74884. return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
  74885. },
  74886. /**
  74887. * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
  74888. * @param {Number} x X position
  74889. * @param {Number} y Y position
  74890. * @return {HTMLElement} Element of the first found nearest Sortable
  74891. */
  74892. _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
  74893. var ret;
  74894. sortables.some(function (sortable) {
  74895. if (lastChild(sortable)) return;
  74896. var rect = getRect(sortable),
  74897. threshold = sortable[expando].options.emptyInsertThreshold,
  74898. insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
  74899. insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
  74900. if (threshold && insideHorizontally && insideVertically) {
  74901. return ret = sortable;
  74902. }
  74903. });
  74904. return ret;
  74905. },
  74906. _prepareGroup = function _prepareGroup(options) {
  74907. function toFn(value, pull) {
  74908. return function (to, from, dragEl, evt) {
  74909. var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
  74910. if (value == null && (pull || sameGroup)) {
  74911. // Default pull value
  74912. // Default pull and put value if same group
  74913. return true;
  74914. } else if (value == null || value === false) {
  74915. return false;
  74916. } else if (pull && value === 'clone') {
  74917. return value;
  74918. } else if (typeof value === 'function') {
  74919. return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
  74920. } else {
  74921. var otherGroup = (pull ? to : from).options.group.name;
  74922. return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
  74923. }
  74924. };
  74925. }
  74926. var group = {};
  74927. var originalGroup = options.group;
  74928. if (!originalGroup || _typeof(originalGroup) != 'object') {
  74929. originalGroup = {
  74930. name: originalGroup
  74931. };
  74932. }
  74933. group.name = originalGroup.name;
  74934. group.checkPull = toFn(originalGroup.pull, true);
  74935. group.checkPut = toFn(originalGroup.put);
  74936. group.revertClone = originalGroup.revertClone;
  74937. options.group = group;
  74938. },
  74939. _hideGhostForTarget = function _hideGhostForTarget() {
  74940. if (!supportCssPointerEvents && ghostEl) {
  74941. css(ghostEl, 'display', 'none');
  74942. }
  74943. },
  74944. _unhideGhostForTarget = function _unhideGhostForTarget() {
  74945. if (!supportCssPointerEvents && ghostEl) {
  74946. css(ghostEl, 'display', '');
  74947. }
  74948. }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
  74949. if (documentExists) {
  74950. document.addEventListener('click', function (evt) {
  74951. if (ignoreNextClick) {
  74952. evt.preventDefault();
  74953. evt.stopPropagation && evt.stopPropagation();
  74954. evt.stopImmediatePropagation && evt.stopImmediatePropagation();
  74955. ignoreNextClick = false;
  74956. return false;
  74957. }
  74958. }, true);
  74959. }
  74960. var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
  74961. if (dragEl) {
  74962. evt = evt.touches ? evt.touches[0] : evt;
  74963. var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
  74964. if (nearest) {
  74965. // Create imitation event
  74966. var event = {};
  74967. for (var i in evt) {
  74968. if (evt.hasOwnProperty(i)) {
  74969. event[i] = evt[i];
  74970. }
  74971. }
  74972. event.target = event.rootEl = nearest;
  74973. event.preventDefault = void 0;
  74974. event.stopPropagation = void 0;
  74975. nearest[expando]._onDragOver(event);
  74976. }
  74977. }
  74978. };
  74979. var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
  74980. if (dragEl) {
  74981. dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
  74982. }
  74983. };
  74984. /**
  74985. * @class Sortable
  74986. * @param {HTMLElement} el
  74987. * @param {Object} [options]
  74988. */
  74989. function Sortable(el, options) {
  74990. if (!(el && el.nodeType && el.nodeType === 1)) {
  74991. throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
  74992. }
  74993. this.el = el; // root element
  74994. this.options = options = _extends({}, options); // Export instance
  74995. el[expando] = this;
  74996. var defaults = {
  74997. group: null,
  74998. sort: true,
  74999. disabled: false,
  75000. store: null,
  75001. handle: null,
  75002. draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
  75003. swapThreshold: 1,
  75004. // percentage; 0 <= x <= 1
  75005. invertSwap: false,
  75006. // invert always
  75007. invertedSwapThreshold: null,
  75008. // will be set to same as swapThreshold if default
  75009. removeCloneOnHide: true,
  75010. direction: function direction() {
  75011. return _detectDirection(el, this.options);
  75012. },
  75013. ghostClass: 'sortable-ghost',
  75014. chosenClass: 'sortable-chosen',
  75015. dragClass: 'sortable-drag',
  75016. ignore: 'a, img',
  75017. filter: null,
  75018. preventOnFilter: true,
  75019. animation: 0,
  75020. easing: null,
  75021. setData: function setData(dataTransfer, dragEl) {
  75022. dataTransfer.setData('Text', dragEl.textContent);
  75023. },
  75024. dropBubble: false,
  75025. dragoverBubble: false,
  75026. dataIdAttr: 'data-id',
  75027. delay: 0,
  75028. delayOnTouchOnly: false,
  75029. touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
  75030. forceFallback: false,
  75031. fallbackClass: 'sortable-fallback',
  75032. fallbackOnBody: false,
  75033. fallbackTolerance: 0,
  75034. fallbackOffset: {
  75035. x: 0,
  75036. y: 0
  75037. },
  75038. supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
  75039. emptyInsertThreshold: 5
  75040. };
  75041. PluginManager.initializePlugins(this, el, defaults); // Set default options
  75042. for (var name in defaults) {
  75043. !(name in options) && (options[name] = defaults[name]);
  75044. }
  75045. _prepareGroup(options); // Bind all private methods
  75046. for (var fn in this) {
  75047. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  75048. this[fn] = this[fn].bind(this);
  75049. }
  75050. } // Setup drag mode
  75051. this.nativeDraggable = options.forceFallback ? false : supportDraggable;
  75052. if (this.nativeDraggable) {
  75053. // Touch start threshold cannot be greater than the native dragstart threshold
  75054. this.options.touchStartThreshold = 1;
  75055. } // Bind events
  75056. if (options.supportPointer) {
  75057. on(el, 'pointerdown', this._onTapStart);
  75058. } else {
  75059. on(el, 'mousedown', this._onTapStart);
  75060. on(el, 'touchstart', this._onTapStart);
  75061. }
  75062. if (this.nativeDraggable) {
  75063. on(el, 'dragover', this);
  75064. on(el, 'dragenter', this);
  75065. }
  75066. sortables.push(this.el); // Restore sorting
  75067. options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
  75068. _extends(this, AnimationStateManager());
  75069. }
  75070. Sortable.prototype =
  75071. /** @lends Sortable.prototype */
  75072. {
  75073. constructor: Sortable,
  75074. _isOutsideThisEl: function _isOutsideThisEl(target) {
  75075. if (!this.el.contains(target) && target !== this.el) {
  75076. lastTarget = null;
  75077. }
  75078. },
  75079. _getDirection: function _getDirection(evt, target) {
  75080. return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
  75081. },
  75082. _onTapStart: function _onTapStart(
  75083. /** Event|TouchEvent */
  75084. evt) {
  75085. if (!evt.cancelable) return;
  75086. var _this = this,
  75087. el = this.el,
  75088. options = this.options,
  75089. preventOnFilter = options.preventOnFilter,
  75090. type = evt.type,
  75091. touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
  75092. target = (touch || evt).target,
  75093. originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
  75094. filter = options.filter;
  75095. _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
  75096. if (dragEl) {
  75097. return;
  75098. }
  75099. if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
  75100. return; // only left button and enabled
  75101. } // cancel dnd if original target is content editable
  75102. if (originalTarget.isContentEditable) {
  75103. return;
  75104. } // Safari ignores further event handling after mousedown
  75105. if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
  75106. return;
  75107. }
  75108. target = closest(target, options.draggable, el, false);
  75109. if (target && target.animated) {
  75110. return;
  75111. }
  75112. if (lastDownEl === target) {
  75113. // Ignoring duplicate `down`
  75114. return;
  75115. } // Get the index of the dragged element within its parent
  75116. oldIndex = index(target);
  75117. oldDraggableIndex = index(target, options.draggable); // Check filter
  75118. if (typeof filter === 'function') {
  75119. if (filter.call(this, evt, target, this)) {
  75120. _dispatchEvent({
  75121. sortable: _this,
  75122. rootEl: originalTarget,
  75123. name: 'filter',
  75124. targetEl: target,
  75125. toEl: el,
  75126. fromEl: el
  75127. });
  75128. pluginEvent('filter', _this, {
  75129. evt: evt
  75130. });
  75131. preventOnFilter && evt.cancelable && evt.preventDefault();
  75132. return; // cancel dnd
  75133. }
  75134. } else if (filter) {
  75135. filter = filter.split(',').some(function (criteria) {
  75136. criteria = closest(originalTarget, criteria.trim(), el, false);
  75137. if (criteria) {
  75138. _dispatchEvent({
  75139. sortable: _this,
  75140. rootEl: criteria,
  75141. name: 'filter',
  75142. targetEl: target,
  75143. fromEl: el,
  75144. toEl: el
  75145. });
  75146. pluginEvent('filter', _this, {
  75147. evt: evt
  75148. });
  75149. return true;
  75150. }
  75151. });
  75152. if (filter) {
  75153. preventOnFilter && evt.cancelable && evt.preventDefault();
  75154. return; // cancel dnd
  75155. }
  75156. }
  75157. if (options.handle && !closest(originalTarget, options.handle, el, false)) {
  75158. return;
  75159. } // Prepare `dragstart`
  75160. this._prepareDragStart(evt, touch, target);
  75161. },
  75162. _prepareDragStart: function _prepareDragStart(
  75163. /** Event */
  75164. evt,
  75165. /** Touch */
  75166. touch,
  75167. /** HTMLElement */
  75168. target) {
  75169. var _this = this,
  75170. el = _this.el,
  75171. options = _this.options,
  75172. ownerDocument = el.ownerDocument,
  75173. dragStartFn;
  75174. if (target && !dragEl && target.parentNode === el) {
  75175. var dragRect = getRect(target);
  75176. rootEl = el;
  75177. dragEl = target;
  75178. parentEl = dragEl.parentNode;
  75179. nextEl = dragEl.nextSibling;
  75180. lastDownEl = target;
  75181. activeGroup = options.group;
  75182. Sortable.dragged = dragEl;
  75183. tapEvt = {
  75184. target: dragEl,
  75185. clientX: (touch || evt).clientX,
  75186. clientY: (touch || evt).clientY
  75187. };
  75188. tapDistanceLeft = tapEvt.clientX - dragRect.left;
  75189. tapDistanceTop = tapEvt.clientY - dragRect.top;
  75190. this._lastX = (touch || evt).clientX;
  75191. this._lastY = (touch || evt).clientY;
  75192. dragEl.style['will-change'] = 'all';
  75193. dragStartFn = function dragStartFn() {
  75194. pluginEvent('delayEnded', _this, {
  75195. evt: evt
  75196. });
  75197. if (Sortable.eventCanceled) {
  75198. _this._onDrop();
  75199. return;
  75200. } // Delayed drag has been triggered
  75201. // we can re-enable the events: touchmove/mousemove
  75202. _this._disableDelayedDragEvents();
  75203. if (!FireFox && _this.nativeDraggable) {
  75204. dragEl.draggable = true;
  75205. } // Bind the events: dragstart/dragend
  75206. _this._triggerDragStart(evt, touch); // Drag start event
  75207. _dispatchEvent({
  75208. sortable: _this,
  75209. name: 'choose',
  75210. originalEvent: evt
  75211. }); // Chosen item
  75212. toggleClass(dragEl, options.chosenClass, true);
  75213. }; // Disable "draggable"
  75214. options.ignore.split(',').forEach(function (criteria) {
  75215. find(dragEl, criteria.trim(), _disableDraggable);
  75216. });
  75217. on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
  75218. on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
  75219. on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
  75220. on(ownerDocument, 'mouseup', _this._onDrop);
  75221. on(ownerDocument, 'touchend', _this._onDrop);
  75222. on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
  75223. if (FireFox && this.nativeDraggable) {
  75224. this.options.touchStartThreshold = 4;
  75225. dragEl.draggable = true;
  75226. }
  75227. pluginEvent('delayStart', this, {
  75228. evt: evt
  75229. }); // Delay is impossible for native DnD in Edge or IE
  75230. if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
  75231. if (Sortable.eventCanceled) {
  75232. this._onDrop();
  75233. return;
  75234. } // If the user moves the pointer or let go the click or touch
  75235. // before the delay has been reached:
  75236. // disable the delayed drag
  75237. on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
  75238. on(ownerDocument, 'touchend', _this._disableDelayedDrag);
  75239. on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
  75240. on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
  75241. on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
  75242. options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
  75243. _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
  75244. } else {
  75245. dragStartFn();
  75246. }
  75247. }
  75248. },
  75249. _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
  75250. /** TouchEvent|PointerEvent **/
  75251. e) {
  75252. var touch = e.touches ? e.touches[0] : e;
  75253. if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
  75254. this._disableDelayedDrag();
  75255. }
  75256. },
  75257. _disableDelayedDrag: function _disableDelayedDrag() {
  75258. dragEl && _disableDraggable(dragEl);
  75259. clearTimeout(this._dragStartTimer);
  75260. this._disableDelayedDragEvents();
  75261. },
  75262. _disableDelayedDragEvents: function _disableDelayedDragEvents() {
  75263. var ownerDocument = this.el.ownerDocument;
  75264. off(ownerDocument, 'mouseup', this._disableDelayedDrag);
  75265. off(ownerDocument, 'touchend', this._disableDelayedDrag);
  75266. off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
  75267. off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
  75268. off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
  75269. off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
  75270. },
  75271. _triggerDragStart: function _triggerDragStart(
  75272. /** Event */
  75273. evt,
  75274. /** Touch */
  75275. touch) {
  75276. touch = touch || evt.pointerType == 'touch' && evt;
  75277. if (!this.nativeDraggable || touch) {
  75278. if (this.options.supportPointer) {
  75279. on(document, 'pointermove', this._onTouchMove);
  75280. } else if (touch) {
  75281. on(document, 'touchmove', this._onTouchMove);
  75282. } else {
  75283. on(document, 'mousemove', this._onTouchMove);
  75284. }
  75285. } else {
  75286. on(dragEl, 'dragend', this);
  75287. on(rootEl, 'dragstart', this._onDragStart);
  75288. }
  75289. try {
  75290. if (document.selection) {
  75291. // Timeout neccessary for IE9
  75292. _nextTick(function () {
  75293. document.selection.empty();
  75294. });
  75295. } else {
  75296. window.getSelection().removeAllRanges();
  75297. }
  75298. } catch (err) {}
  75299. },
  75300. _dragStarted: function _dragStarted(fallback, evt) {
  75301. awaitingDragStarted = false;
  75302. if (rootEl && dragEl) {
  75303. pluginEvent('dragStarted', this, {
  75304. evt: evt
  75305. });
  75306. if (this.nativeDraggable) {
  75307. on(document, 'dragover', _checkOutsideTargetEl);
  75308. }
  75309. var options = this.options; // Apply effect
  75310. !fallback && toggleClass(dragEl, options.dragClass, false);
  75311. toggleClass(dragEl, options.ghostClass, true);
  75312. Sortable.active = this;
  75313. fallback && this._appendGhost(); // Drag start event
  75314. _dispatchEvent({
  75315. sortable: this,
  75316. name: 'start',
  75317. originalEvent: evt
  75318. });
  75319. } else {
  75320. this._nulling();
  75321. }
  75322. },
  75323. _emulateDragOver: function _emulateDragOver() {
  75324. if (touchEvt) {
  75325. this._lastX = touchEvt.clientX;
  75326. this._lastY = touchEvt.clientY;
  75327. _hideGhostForTarget();
  75328. var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
  75329. var parent = target;
  75330. while (target && target.shadowRoot) {
  75331. target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
  75332. if (target === parent) break;
  75333. parent = target;
  75334. }
  75335. dragEl.parentNode[expando]._isOutsideThisEl(target);
  75336. if (parent) {
  75337. do {
  75338. if (parent[expando]) {
  75339. var inserted = void 0;
  75340. inserted = parent[expando]._onDragOver({
  75341. clientX: touchEvt.clientX,
  75342. clientY: touchEvt.clientY,
  75343. target: target,
  75344. rootEl: parent
  75345. });
  75346. if (inserted && !this.options.dragoverBubble) {
  75347. break;
  75348. }
  75349. }
  75350. target = parent; // store last element
  75351. }
  75352. /* jshint boss:true */
  75353. while (parent = parent.parentNode);
  75354. }
  75355. _unhideGhostForTarget();
  75356. }
  75357. },
  75358. _onTouchMove: function _onTouchMove(
  75359. /**TouchEvent*/
  75360. evt) {
  75361. if (tapEvt) {
  75362. var options = this.options,
  75363. fallbackTolerance = options.fallbackTolerance,
  75364. fallbackOffset = options.fallbackOffset,
  75365. touch = evt.touches ? evt.touches[0] : evt,
  75366. ghostMatrix = ghostEl && matrix(ghostEl, true),
  75367. scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
  75368. scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
  75369. relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
  75370. dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
  75371. dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
  75372. if (!Sortable.active && !awaitingDragStarted) {
  75373. if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
  75374. return;
  75375. }
  75376. this._onDragStart(evt, true);
  75377. }
  75378. if (ghostEl) {
  75379. if (ghostMatrix) {
  75380. ghostMatrix.e += dx - (lastDx || 0);
  75381. ghostMatrix.f += dy - (lastDy || 0);
  75382. } else {
  75383. ghostMatrix = {
  75384. a: 1,
  75385. b: 0,
  75386. c: 0,
  75387. d: 1,
  75388. e: dx,
  75389. f: dy
  75390. };
  75391. }
  75392. var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
  75393. css(ghostEl, 'webkitTransform', cssMatrix);
  75394. css(ghostEl, 'mozTransform', cssMatrix);
  75395. css(ghostEl, 'msTransform', cssMatrix);
  75396. css(ghostEl, 'transform', cssMatrix);
  75397. lastDx = dx;
  75398. lastDy = dy;
  75399. touchEvt = touch;
  75400. }
  75401. evt.cancelable && evt.preventDefault();
  75402. }
  75403. },
  75404. _appendGhost: function _appendGhost() {
  75405. // Bug if using scale(): https://stackoverflow.com/questions/2637058
  75406. // Not being adjusted for
  75407. if (!ghostEl) {
  75408. var container = this.options.fallbackOnBody ? document.body : rootEl,
  75409. rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
  75410. options = this.options; // Position absolutely
  75411. if (PositionGhostAbsolutely) {
  75412. // Get relatively positioned parent
  75413. ghostRelativeParent = container;
  75414. while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
  75415. ghostRelativeParent = ghostRelativeParent.parentNode;
  75416. }
  75417. if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
  75418. if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
  75419. rect.top += ghostRelativeParent.scrollTop;
  75420. rect.left += ghostRelativeParent.scrollLeft;
  75421. } else {
  75422. ghostRelativeParent = getWindowScrollingElement();
  75423. }
  75424. ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
  75425. }
  75426. ghostEl = dragEl.cloneNode(true);
  75427. toggleClass(ghostEl, options.ghostClass, false);
  75428. toggleClass(ghostEl, options.fallbackClass, true);
  75429. toggleClass(ghostEl, options.dragClass, true);
  75430. css(ghostEl, 'transition', '');
  75431. css(ghostEl, 'transform', '');
  75432. css(ghostEl, 'box-sizing', 'border-box');
  75433. css(ghostEl, 'margin', 0);
  75434. css(ghostEl, 'top', rect.top);
  75435. css(ghostEl, 'left', rect.left);
  75436. css(ghostEl, 'width', rect.width);
  75437. css(ghostEl, 'height', rect.height);
  75438. css(ghostEl, 'opacity', '0.8');
  75439. css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
  75440. css(ghostEl, 'zIndex', '100000');
  75441. css(ghostEl, 'pointerEvents', 'none');
  75442. Sortable.ghost = ghostEl;
  75443. container.appendChild(ghostEl); // Set transform-origin
  75444. css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
  75445. }
  75446. },
  75447. _onDragStart: function _onDragStart(
  75448. /**Event*/
  75449. evt,
  75450. /**boolean*/
  75451. fallback) {
  75452. var _this = this;
  75453. var dataTransfer = evt.dataTransfer;
  75454. var options = _this.options;
  75455. pluginEvent('dragStart', this, {
  75456. evt: evt
  75457. });
  75458. if (Sortable.eventCanceled) {
  75459. this._onDrop();
  75460. return;
  75461. }
  75462. pluginEvent('setupClone', this);
  75463. if (!Sortable.eventCanceled) {
  75464. cloneEl = clone(dragEl);
  75465. cloneEl.draggable = false;
  75466. cloneEl.style['will-change'] = '';
  75467. this._hideClone();
  75468. toggleClass(cloneEl, this.options.chosenClass, false);
  75469. Sortable.clone = cloneEl;
  75470. } // #1143: IFrame support workaround
  75471. _this.cloneId = _nextTick(function () {
  75472. pluginEvent('clone', _this);
  75473. if (Sortable.eventCanceled) return;
  75474. if (!_this.options.removeCloneOnHide) {
  75475. rootEl.insertBefore(cloneEl, dragEl);
  75476. }
  75477. _this._hideClone();
  75478. _dispatchEvent({
  75479. sortable: _this,
  75480. name: 'clone'
  75481. });
  75482. });
  75483. !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
  75484. if (fallback) {
  75485. ignoreNextClick = true;
  75486. _this._loopId = setInterval(_this._emulateDragOver, 50);
  75487. } else {
  75488. // Undo what was set in _prepareDragStart before drag started
  75489. off(document, 'mouseup', _this._onDrop);
  75490. off(document, 'touchend', _this._onDrop);
  75491. off(document, 'touchcancel', _this._onDrop);
  75492. if (dataTransfer) {
  75493. dataTransfer.effectAllowed = 'move';
  75494. options.setData && options.setData.call(_this, dataTransfer, dragEl);
  75495. }
  75496. on(document, 'drop', _this); // #1276 fix:
  75497. css(dragEl, 'transform', 'translateZ(0)');
  75498. }
  75499. awaitingDragStarted = true;
  75500. _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
  75501. on(document, 'selectstart', _this);
  75502. moved = true;
  75503. if (Safari) {
  75504. css(document.body, 'user-select', 'none');
  75505. }
  75506. },
  75507. // Returns true - if no further action is needed (either inserted or another condition)
  75508. _onDragOver: function _onDragOver(
  75509. /**Event*/
  75510. evt) {
  75511. var el = this.el,
  75512. target = evt.target,
  75513. dragRect,
  75514. targetRect,
  75515. revert,
  75516. options = this.options,
  75517. group = options.group,
  75518. activeSortable = Sortable.active,
  75519. isOwner = activeGroup === group,
  75520. canSort = options.sort,
  75521. fromSortable = putSortable || activeSortable,
  75522. vertical,
  75523. _this = this,
  75524. completedFired = false;
  75525. if (_silent) return;
  75526. function dragOverEvent(name, extra) {
  75527. pluginEvent(name, _this, _objectSpread({
  75528. evt: evt,
  75529. isOwner: isOwner,
  75530. axis: vertical ? 'vertical' : 'horizontal',
  75531. revert: revert,
  75532. dragRect: dragRect,
  75533. targetRect: targetRect,
  75534. canSort: canSort,
  75535. fromSortable: fromSortable,
  75536. target: target,
  75537. completed: completed,
  75538. onMove: function onMove(target, after) {
  75539. return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
  75540. },
  75541. changed: changed
  75542. }, extra));
  75543. } // Capture animation state
  75544. function capture() {
  75545. dragOverEvent('dragOverAnimationCapture');
  75546. _this.captureAnimationState();
  75547. if (_this !== fromSortable) {
  75548. fromSortable.captureAnimationState();
  75549. }
  75550. } // Return invocation when dragEl is inserted (or completed)
  75551. function completed(insertion) {
  75552. dragOverEvent('dragOverCompleted', {
  75553. insertion: insertion
  75554. });
  75555. if (insertion) {
  75556. // Clones must be hidden before folding animation to capture dragRectAbsolute properly
  75557. if (isOwner) {
  75558. activeSortable._hideClone();
  75559. } else {
  75560. activeSortable._showClone(_this);
  75561. }
  75562. if (_this !== fromSortable) {
  75563. // Set ghost class to new sortable's ghost class
  75564. toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
  75565. toggleClass(dragEl, options.ghostClass, true);
  75566. }
  75567. if (putSortable !== _this && _this !== Sortable.active) {
  75568. putSortable = _this;
  75569. } else if (_this === Sortable.active && putSortable) {
  75570. putSortable = null;
  75571. } // Animation
  75572. if (fromSortable === _this) {
  75573. _this._ignoreWhileAnimating = target;
  75574. }
  75575. _this.animateAll(function () {
  75576. dragOverEvent('dragOverAnimationComplete');
  75577. _this._ignoreWhileAnimating = null;
  75578. });
  75579. if (_this !== fromSortable) {
  75580. fromSortable.animateAll();
  75581. fromSortable._ignoreWhileAnimating = null;
  75582. }
  75583. } // Null lastTarget if it is not inside a previously swapped element
  75584. if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
  75585. lastTarget = null;
  75586. } // no bubbling and not fallback
  75587. if (!options.dragoverBubble && !evt.rootEl && target !== document) {
  75588. dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
  75589. !insertion && nearestEmptyInsertDetectEvent(evt);
  75590. }
  75591. !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
  75592. return completedFired = true;
  75593. } // Call when dragEl has been inserted
  75594. function changed() {
  75595. newIndex = index(dragEl);
  75596. newDraggableIndex = index(dragEl, options.draggable);
  75597. _dispatchEvent({
  75598. sortable: _this,
  75599. name: 'change',
  75600. toEl: el,
  75601. newIndex: newIndex,
  75602. newDraggableIndex: newDraggableIndex,
  75603. originalEvent: evt
  75604. });
  75605. }
  75606. if (evt.preventDefault !== void 0) {
  75607. evt.cancelable && evt.preventDefault();
  75608. }
  75609. target = closest(target, options.draggable, el, true);
  75610. dragOverEvent('dragOver');
  75611. if (Sortable.eventCanceled) return completedFired;
  75612. if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
  75613. return completed(false);
  75614. }
  75615. ignoreNextClick = false;
  75616. if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
  75617. : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
  75618. vertical = this._getDirection(evt, target) === 'vertical';
  75619. dragRect = getRect(dragEl);
  75620. dragOverEvent('dragOverValid');
  75621. if (Sortable.eventCanceled) return completedFired;
  75622. if (revert) {
  75623. parentEl = rootEl; // actualization
  75624. capture();
  75625. this._hideClone();
  75626. dragOverEvent('revert');
  75627. if (!Sortable.eventCanceled) {
  75628. if (nextEl) {
  75629. rootEl.insertBefore(dragEl, nextEl);
  75630. } else {
  75631. rootEl.appendChild(dragEl);
  75632. }
  75633. }
  75634. return completed(true);
  75635. }
  75636. var elLastChild = lastChild(el, options.draggable);
  75637. if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
  75638. // If already at end of list: Do not insert
  75639. if (elLastChild === dragEl) {
  75640. return completed(false);
  75641. } // assign target only if condition is true
  75642. if (elLastChild && el === evt.target) {
  75643. target = elLastChild;
  75644. }
  75645. if (target) {
  75646. targetRect = getRect(target);
  75647. }
  75648. if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
  75649. capture();
  75650. el.appendChild(dragEl);
  75651. parentEl = el; // actualization
  75652. changed();
  75653. return completed(true);
  75654. }
  75655. } else if (target.parentNode === el) {
  75656. targetRect = getRect(target);
  75657. var direction = 0,
  75658. targetBeforeFirstSwap,
  75659. differentLevel = dragEl.parentNode !== el,
  75660. differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
  75661. side1 = vertical ? 'top' : 'left',
  75662. scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
  75663. scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
  75664. if (lastTarget !== target) {
  75665. targetBeforeFirstSwap = targetRect[side1];
  75666. pastFirstInvertThresh = false;
  75667. isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
  75668. }
  75669. direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
  75670. var sibling;
  75671. if (direction !== 0) {
  75672. // Check if target is beside dragEl in respective direction (ignoring hidden elements)
  75673. var dragIndex = index(dragEl);
  75674. do {
  75675. dragIndex -= direction;
  75676. sibling = parentEl.children[dragIndex];
  75677. } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
  75678. } // If dragEl is already beside target: Do not insert
  75679. if (direction === 0 || sibling === target) {
  75680. return completed(false);
  75681. }
  75682. lastTarget = target;
  75683. lastDirection = direction;
  75684. var nextSibling = target.nextElementSibling,
  75685. after = false;
  75686. after = direction === 1;
  75687. var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
  75688. if (moveVector !== false) {
  75689. if (moveVector === 1 || moveVector === -1) {
  75690. after = moveVector === 1;
  75691. }
  75692. _silent = true;
  75693. setTimeout(_unsilent, 30);
  75694. capture();
  75695. if (after && !nextSibling) {
  75696. el.appendChild(dragEl);
  75697. } else {
  75698. target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
  75699. } // Undo chrome's scroll adjustment (has no effect on other browsers)
  75700. if (scrolledPastTop) {
  75701. scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
  75702. }
  75703. parentEl = dragEl.parentNode; // actualization
  75704. // must be done before animation
  75705. if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
  75706. targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
  75707. }
  75708. changed();
  75709. return completed(true);
  75710. }
  75711. }
  75712. if (el.contains(dragEl)) {
  75713. return completed(false);
  75714. }
  75715. }
  75716. return false;
  75717. },
  75718. _ignoreWhileAnimating: null,
  75719. _offMoveEvents: function _offMoveEvents() {
  75720. off(document, 'mousemove', this._onTouchMove);
  75721. off(document, 'touchmove', this._onTouchMove);
  75722. off(document, 'pointermove', this._onTouchMove);
  75723. off(document, 'dragover', nearestEmptyInsertDetectEvent);
  75724. off(document, 'mousemove', nearestEmptyInsertDetectEvent);
  75725. off(document, 'touchmove', nearestEmptyInsertDetectEvent);
  75726. },
  75727. _offUpEvents: function _offUpEvents() {
  75728. var ownerDocument = this.el.ownerDocument;
  75729. off(ownerDocument, 'mouseup', this._onDrop);
  75730. off(ownerDocument, 'touchend', this._onDrop);
  75731. off(ownerDocument, 'pointerup', this._onDrop);
  75732. off(ownerDocument, 'touchcancel', this._onDrop);
  75733. off(document, 'selectstart', this);
  75734. },
  75735. _onDrop: function _onDrop(
  75736. /**Event*/
  75737. evt) {
  75738. var el = this.el,
  75739. options = this.options; // Get the index of the dragged element within its parent
  75740. newIndex = index(dragEl);
  75741. newDraggableIndex = index(dragEl, options.draggable);
  75742. pluginEvent('drop', this, {
  75743. evt: evt
  75744. });
  75745. parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
  75746. newIndex = index(dragEl);
  75747. newDraggableIndex = index(dragEl, options.draggable);
  75748. if (Sortable.eventCanceled) {
  75749. this._nulling();
  75750. return;
  75751. }
  75752. awaitingDragStarted = false;
  75753. isCircumstantialInvert = false;
  75754. pastFirstInvertThresh = false;
  75755. clearInterval(this._loopId);
  75756. clearTimeout(this._dragStartTimer);
  75757. _cancelNextTick(this.cloneId);
  75758. _cancelNextTick(this._dragStartId); // Unbind events
  75759. if (this.nativeDraggable) {
  75760. off(document, 'drop', this);
  75761. off(el, 'dragstart', this._onDragStart);
  75762. }
  75763. this._offMoveEvents();
  75764. this._offUpEvents();
  75765. if (Safari) {
  75766. css(document.body, 'user-select', '');
  75767. }
  75768. css(dragEl, 'transform', '');
  75769. if (evt) {
  75770. if (moved) {
  75771. evt.cancelable && evt.preventDefault();
  75772. !options.dropBubble && evt.stopPropagation();
  75773. }
  75774. ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
  75775. if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
  75776. // Remove clone(s)
  75777. cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
  75778. }
  75779. if (dragEl) {
  75780. if (this.nativeDraggable) {
  75781. off(dragEl, 'dragend', this);
  75782. }
  75783. _disableDraggable(dragEl);
  75784. dragEl.style['will-change'] = ''; // Remove classes
  75785. // ghostClass is added in dragStarted
  75786. if (moved && !awaitingDragStarted) {
  75787. toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
  75788. }
  75789. toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
  75790. _dispatchEvent({
  75791. sortable: this,
  75792. name: 'unchoose',
  75793. toEl: parentEl,
  75794. newIndex: null,
  75795. newDraggableIndex: null,
  75796. originalEvent: evt
  75797. });
  75798. if (rootEl !== parentEl) {
  75799. if (newIndex >= 0) {
  75800. // Add event
  75801. _dispatchEvent({
  75802. rootEl: parentEl,
  75803. name: 'add',
  75804. toEl: parentEl,
  75805. fromEl: rootEl,
  75806. originalEvent: evt
  75807. }); // Remove event
  75808. _dispatchEvent({
  75809. sortable: this,
  75810. name: 'remove',
  75811. toEl: parentEl,
  75812. originalEvent: evt
  75813. }); // drag from one list and drop into another
  75814. _dispatchEvent({
  75815. rootEl: parentEl,
  75816. name: 'sort',
  75817. toEl: parentEl,
  75818. fromEl: rootEl,
  75819. originalEvent: evt
  75820. });
  75821. _dispatchEvent({
  75822. sortable: this,
  75823. name: 'sort',
  75824. toEl: parentEl,
  75825. originalEvent: evt
  75826. });
  75827. }
  75828. putSortable && putSortable.save();
  75829. } else {
  75830. if (newIndex !== oldIndex) {
  75831. if (newIndex >= 0) {
  75832. // drag & drop within the same list
  75833. _dispatchEvent({
  75834. sortable: this,
  75835. name: 'update',
  75836. toEl: parentEl,
  75837. originalEvent: evt
  75838. });
  75839. _dispatchEvent({
  75840. sortable: this,
  75841. name: 'sort',
  75842. toEl: parentEl,
  75843. originalEvent: evt
  75844. });
  75845. }
  75846. }
  75847. }
  75848. if (Sortable.active) {
  75849. /* jshint eqnull:true */
  75850. if (newIndex == null || newIndex === -1) {
  75851. newIndex = oldIndex;
  75852. newDraggableIndex = oldDraggableIndex;
  75853. }
  75854. _dispatchEvent({
  75855. sortable: this,
  75856. name: 'end',
  75857. toEl: parentEl,
  75858. originalEvent: evt
  75859. }); // Save sorting
  75860. this.save();
  75861. }
  75862. }
  75863. }
  75864. this._nulling();
  75865. },
  75866. _nulling: function _nulling() {
  75867. pluginEvent('nulling', this);
  75868. rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
  75869. savedInputChecked.forEach(function (el) {
  75870. el.checked = true;
  75871. });
  75872. savedInputChecked.length = lastDx = lastDy = 0;
  75873. },
  75874. handleEvent: function handleEvent(
  75875. /**Event*/
  75876. evt) {
  75877. switch (evt.type) {
  75878. case 'drop':
  75879. case 'dragend':
  75880. this._onDrop(evt);
  75881. break;
  75882. case 'dragenter':
  75883. case 'dragover':
  75884. if (dragEl) {
  75885. this._onDragOver(evt);
  75886. _globalDragOver(evt);
  75887. }
  75888. break;
  75889. case 'selectstart':
  75890. evt.preventDefault();
  75891. break;
  75892. }
  75893. },
  75894. /**
  75895. * Serializes the item into an array of string.
  75896. * @returns {String[]}
  75897. */
  75898. toArray: function toArray() {
  75899. var order = [],
  75900. el,
  75901. children = this.el.children,
  75902. i = 0,
  75903. n = children.length,
  75904. options = this.options;
  75905. for (; i < n; i++) {
  75906. el = children[i];
  75907. if (closest(el, options.draggable, this.el, false)) {
  75908. order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
  75909. }
  75910. }
  75911. return order;
  75912. },
  75913. /**
  75914. * Sorts the elements according to the array.
  75915. * @param {String[]} order order of the items
  75916. */
  75917. sort: function sort(order, useAnimation) {
  75918. var items = {},
  75919. rootEl = this.el;
  75920. this.toArray().forEach(function (id, i) {
  75921. var el = rootEl.children[i];
  75922. if (closest(el, this.options.draggable, rootEl, false)) {
  75923. items[id] = el;
  75924. }
  75925. }, this);
  75926. useAnimation && this.captureAnimationState();
  75927. order.forEach(function (id) {
  75928. if (items[id]) {
  75929. rootEl.removeChild(items[id]);
  75930. rootEl.appendChild(items[id]);
  75931. }
  75932. });
  75933. useAnimation && this.animateAll();
  75934. },
  75935. /**
  75936. * Save the current sorting
  75937. */
  75938. save: function save() {
  75939. var store = this.options.store;
  75940. store && store.set && store.set(this);
  75941. },
  75942. /**
  75943. * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
  75944. * @param {HTMLElement} el
  75945. * @param {String} [selector] default: `options.draggable`
  75946. * @returns {HTMLElement|null}
  75947. */
  75948. closest: function closest$1(el, selector) {
  75949. return closest(el, selector || this.options.draggable, this.el, false);
  75950. },
  75951. /**
  75952. * Set/get option
  75953. * @param {string} name
  75954. * @param {*} [value]
  75955. * @returns {*}
  75956. */
  75957. option: function option(name, value) {
  75958. var options = this.options;
  75959. if (value === void 0) {
  75960. return options[name];
  75961. } else {
  75962. var modifiedValue = PluginManager.modifyOption(this, name, value);
  75963. if (typeof modifiedValue !== 'undefined') {
  75964. options[name] = modifiedValue;
  75965. } else {
  75966. options[name] = value;
  75967. }
  75968. if (name === 'group') {
  75969. _prepareGroup(options);
  75970. }
  75971. }
  75972. },
  75973. /**
  75974. * Destroy
  75975. */
  75976. destroy: function destroy() {
  75977. pluginEvent('destroy', this);
  75978. var el = this.el;
  75979. el[expando] = null;
  75980. off(el, 'mousedown', this._onTapStart);
  75981. off(el, 'touchstart', this._onTapStart);
  75982. off(el, 'pointerdown', this._onTapStart);
  75983. if (this.nativeDraggable) {
  75984. off(el, 'dragover', this);
  75985. off(el, 'dragenter', this);
  75986. } // Remove draggable attributes
  75987. Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
  75988. el.removeAttribute('draggable');
  75989. });
  75990. this._onDrop();
  75991. this._disableDelayedDragEvents();
  75992. sortables.splice(sortables.indexOf(this.el), 1);
  75993. this.el = el = null;
  75994. },
  75995. _hideClone: function _hideClone() {
  75996. if (!cloneHidden) {
  75997. pluginEvent('hideClone', this);
  75998. if (Sortable.eventCanceled) return;
  75999. css(cloneEl, 'display', 'none');
  76000. if (this.options.removeCloneOnHide && cloneEl.parentNode) {
  76001. cloneEl.parentNode.removeChild(cloneEl);
  76002. }
  76003. cloneHidden = true;
  76004. }
  76005. },
  76006. _showClone: function _showClone(putSortable) {
  76007. if (putSortable.lastPutMode !== 'clone') {
  76008. this._hideClone();
  76009. return;
  76010. }
  76011. if (cloneHidden) {
  76012. pluginEvent('showClone', this);
  76013. if (Sortable.eventCanceled) return; // show clone at dragEl or original position
  76014. if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
  76015. rootEl.insertBefore(cloneEl, dragEl);
  76016. } else if (nextEl) {
  76017. rootEl.insertBefore(cloneEl, nextEl);
  76018. } else {
  76019. rootEl.appendChild(cloneEl);
  76020. }
  76021. if (this.options.group.revertClone) {
  76022. this.animate(dragEl, cloneEl);
  76023. }
  76024. css(cloneEl, 'display', '');
  76025. cloneHidden = false;
  76026. }
  76027. }
  76028. };
  76029. function _globalDragOver(
  76030. /**Event*/
  76031. evt) {
  76032. if (evt.dataTransfer) {
  76033. evt.dataTransfer.dropEffect = 'move';
  76034. }
  76035. evt.cancelable && evt.preventDefault();
  76036. }
  76037. function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
  76038. var evt,
  76039. sortable = fromEl[expando],
  76040. onMoveFn = sortable.options.onMove,
  76041. retVal; // Support for new CustomEvent feature
  76042. if (window.CustomEvent && !IE11OrLess && !Edge) {
  76043. evt = new CustomEvent('move', {
  76044. bubbles: true,
  76045. cancelable: true
  76046. });
  76047. } else {
  76048. evt = document.createEvent('Event');
  76049. evt.initEvent('move', true, true);
  76050. }
  76051. evt.to = toEl;
  76052. evt.from = fromEl;
  76053. evt.dragged = dragEl;
  76054. evt.draggedRect = dragRect;
  76055. evt.related = targetEl || toEl;
  76056. evt.relatedRect = targetRect || getRect(toEl);
  76057. evt.willInsertAfter = willInsertAfter;
  76058. evt.originalEvent = originalEvent;
  76059. fromEl.dispatchEvent(evt);
  76060. if (onMoveFn) {
  76061. retVal = onMoveFn.call(sortable, evt, originalEvent);
  76062. }
  76063. return retVal;
  76064. }
  76065. function _disableDraggable(el) {
  76066. el.draggable = false;
  76067. }
  76068. function _unsilent() {
  76069. _silent = false;
  76070. }
  76071. function _ghostIsLast(evt, vertical, sortable) {
  76072. var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
  76073. var spacer = 10;
  76074. return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
  76075. }
  76076. function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
  76077. var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
  76078. targetLength = vertical ? targetRect.height : targetRect.width,
  76079. targetS1 = vertical ? targetRect.top : targetRect.left,
  76080. targetS2 = vertical ? targetRect.bottom : targetRect.right,
  76081. invert = false;
  76082. if (!invertSwap) {
  76083. // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
  76084. if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
  76085. // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
  76086. // check if past first invert threshold on side opposite of lastDirection
  76087. if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
  76088. // past first invert threshold, do not restrict inverted threshold to dragEl shadow
  76089. pastFirstInvertThresh = true;
  76090. }
  76091. if (!pastFirstInvertThresh) {
  76092. // dragEl shadow (target move distance shadow)
  76093. if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
  76094. : mouseOnAxis > targetS2 - targetMoveDistance) {
  76095. return -lastDirection;
  76096. }
  76097. } else {
  76098. invert = true;
  76099. }
  76100. } else {
  76101. // Regular
  76102. if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
  76103. return _getInsertDirection(target);
  76104. }
  76105. }
  76106. }
  76107. invert = invert || invertSwap;
  76108. if (invert) {
  76109. // Invert of regular
  76110. if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
  76111. return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
  76112. }
  76113. }
  76114. return 0;
  76115. }
  76116. /**
  76117. * Gets the direction dragEl must be swapped relative to target in order to make it
  76118. * seem that dragEl has been "inserted" into that element's position
  76119. * @param {HTMLElement} target The target whose position dragEl is being inserted at
  76120. * @return {Number} Direction dragEl must be swapped
  76121. */
  76122. function _getInsertDirection(target) {
  76123. if (index(dragEl) < index(target)) {
  76124. return 1;
  76125. } else {
  76126. return -1;
  76127. }
  76128. }
  76129. /**
  76130. * Generate id
  76131. * @param {HTMLElement} el
  76132. * @returns {String}
  76133. * @private
  76134. */
  76135. function _generateId(el) {
  76136. var str = el.tagName + el.className + el.src + el.href + el.textContent,
  76137. i = str.length,
  76138. sum = 0;
  76139. while (i--) {
  76140. sum += str.charCodeAt(i);
  76141. }
  76142. return sum.toString(36);
  76143. }
  76144. function _saveInputCheckedState(root) {
  76145. savedInputChecked.length = 0;
  76146. var inputs = root.getElementsByTagName('input');
  76147. var idx = inputs.length;
  76148. while (idx--) {
  76149. var el = inputs[idx];
  76150. el.checked && savedInputChecked.push(el);
  76151. }
  76152. }
  76153. function _nextTick(fn) {
  76154. return setTimeout(fn, 0);
  76155. }
  76156. function _cancelNextTick(id) {
  76157. return clearTimeout(id);
  76158. } // Fixed #973:
  76159. if (documentExists) {
  76160. on(document, 'touchmove', function (evt) {
  76161. if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
  76162. evt.preventDefault();
  76163. }
  76164. });
  76165. } // Export utils
  76166. Sortable.utils = {
  76167. on: on,
  76168. off: off,
  76169. css: css,
  76170. find: find,
  76171. is: function is(el, selector) {
  76172. return !!closest(el, selector, el, false);
  76173. },
  76174. extend: extend,
  76175. throttle: throttle,
  76176. closest: closest,
  76177. toggleClass: toggleClass,
  76178. clone: clone,
  76179. index: index,
  76180. nextTick: _nextTick,
  76181. cancelNextTick: _cancelNextTick,
  76182. detectDirection: _detectDirection,
  76183. getChild: getChild
  76184. };
  76185. /**
  76186. * Get the Sortable instance of an element
  76187. * @param {HTMLElement} element The element
  76188. * @return {Sortable|undefined} The instance of Sortable
  76189. */
  76190. Sortable.get = function (element) {
  76191. return element[expando];
  76192. };
  76193. /**
  76194. * Mount a plugin to Sortable
  76195. * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
  76196. */
  76197. Sortable.mount = function () {
  76198. for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
  76199. plugins[_key] = arguments[_key];
  76200. }
  76201. if (plugins[0].constructor === Array) plugins = plugins[0];
  76202. plugins.forEach(function (plugin) {
  76203. if (!plugin.prototype || !plugin.prototype.constructor) {
  76204. throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
  76205. }
  76206. if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);
  76207. PluginManager.mount(plugin);
  76208. });
  76209. };
  76210. /**
  76211. * Create sortable instance
  76212. * @param {HTMLElement} el
  76213. * @param {Object} [options]
  76214. */
  76215. Sortable.create = function (el, options) {
  76216. return new Sortable(el, options);
  76217. }; // Export
  76218. Sortable.version = version;
  76219. var autoScrolls = [],
  76220. scrollEl,
  76221. scrollRootEl,
  76222. scrolling = false,
  76223. lastAutoScrollX,
  76224. lastAutoScrollY,
  76225. touchEvt$1,
  76226. pointerElemChangedInterval;
  76227. function AutoScrollPlugin() {
  76228. function AutoScroll() {
  76229. this.defaults = {
  76230. scroll: true,
  76231. scrollSensitivity: 30,
  76232. scrollSpeed: 10,
  76233. bubbleScroll: true
  76234. }; // Bind all private methods
  76235. for (var fn in this) {
  76236. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  76237. this[fn] = this[fn].bind(this);
  76238. }
  76239. }
  76240. }
  76241. AutoScroll.prototype = {
  76242. dragStarted: function dragStarted(_ref) {
  76243. var originalEvent = _ref.originalEvent;
  76244. if (this.sortable.nativeDraggable) {
  76245. on(document, 'dragover', this._handleAutoScroll);
  76246. } else {
  76247. if (this.options.supportPointer) {
  76248. on(document, 'pointermove', this._handleFallbackAutoScroll);
  76249. } else if (originalEvent.touches) {
  76250. on(document, 'touchmove', this._handleFallbackAutoScroll);
  76251. } else {
  76252. on(document, 'mousemove', this._handleFallbackAutoScroll);
  76253. }
  76254. }
  76255. },
  76256. dragOverCompleted: function dragOverCompleted(_ref2) {
  76257. var originalEvent = _ref2.originalEvent;
  76258. // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
  76259. if (!this.options.dragOverBubble && !originalEvent.rootEl) {
  76260. this._handleAutoScroll(originalEvent);
  76261. }
  76262. },
  76263. drop: function drop() {
  76264. if (this.sortable.nativeDraggable) {
  76265. off(document, 'dragover', this._handleAutoScroll);
  76266. } else {
  76267. off(document, 'pointermove', this._handleFallbackAutoScroll);
  76268. off(document, 'touchmove', this._handleFallbackAutoScroll);
  76269. off(document, 'mousemove', this._handleFallbackAutoScroll);
  76270. }
  76271. clearPointerElemChangedInterval();
  76272. clearAutoScrolls();
  76273. cancelThrottle();
  76274. },
  76275. nulling: function nulling() {
  76276. touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
  76277. autoScrolls.length = 0;
  76278. },
  76279. _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
  76280. this._handleAutoScroll(evt, true);
  76281. },
  76282. _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
  76283. var _this = this;
  76284. var x = (evt.touches ? evt.touches[0] : evt).clientX,
  76285. y = (evt.touches ? evt.touches[0] : evt).clientY,
  76286. elem = document.elementFromPoint(x, y);
  76287. touchEvt$1 = evt; // IE does not seem to have native autoscroll,
  76288. // Edge's autoscroll seems too conditional,
  76289. // MACOS Safari does not have autoscroll,
  76290. // Firefox and Chrome are good
  76291. if (fallback || Edge || IE11OrLess || Safari) {
  76292. autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
  76293. var ogElemScroller = getParentAutoScrollElement(elem, true);
  76294. if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
  76295. pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
  76296. pointerElemChangedInterval = setInterval(function () {
  76297. var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
  76298. if (newElem !== ogElemScroller) {
  76299. ogElemScroller = newElem;
  76300. clearAutoScrolls();
  76301. }
  76302. autoScroll(evt, _this.options, newElem, fallback);
  76303. }, 10);
  76304. lastAutoScrollX = x;
  76305. lastAutoScrollY = y;
  76306. }
  76307. } else {
  76308. // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
  76309. if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
  76310. clearAutoScrolls();
  76311. return;
  76312. }
  76313. autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
  76314. }
  76315. }
  76316. };
  76317. return _extends(AutoScroll, {
  76318. pluginName: 'scroll',
  76319. initializeByDefault: true
  76320. });
  76321. }
  76322. function clearAutoScrolls() {
  76323. autoScrolls.forEach(function (autoScroll) {
  76324. clearInterval(autoScroll.pid);
  76325. });
  76326. autoScrolls = [];
  76327. }
  76328. function clearPointerElemChangedInterval() {
  76329. clearInterval(pointerElemChangedInterval);
  76330. }
  76331. var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
  76332. // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
  76333. if (!options.scroll) return;
  76334. var x = (evt.touches ? evt.touches[0] : evt).clientX,
  76335. y = (evt.touches ? evt.touches[0] : evt).clientY,
  76336. sens = options.scrollSensitivity,
  76337. speed = options.scrollSpeed,
  76338. winScroller = getWindowScrollingElement();
  76339. var scrollThisInstance = false,
  76340. scrollCustomFn; // New scroll root, set scrollEl
  76341. if (scrollRootEl !== rootEl) {
  76342. scrollRootEl = rootEl;
  76343. clearAutoScrolls();
  76344. scrollEl = options.scroll;
  76345. scrollCustomFn = options.scrollFn;
  76346. if (scrollEl === true) {
  76347. scrollEl = getParentAutoScrollElement(rootEl, true);
  76348. }
  76349. }
  76350. var layersOut = 0;
  76351. var currentParent = scrollEl;
  76352. do {
  76353. var el = currentParent,
  76354. rect = getRect(el),
  76355. top = rect.top,
  76356. bottom = rect.bottom,
  76357. left = rect.left,
  76358. right = rect.right,
  76359. width = rect.width,
  76360. height = rect.height,
  76361. canScrollX = void 0,
  76362. canScrollY = void 0,
  76363. scrollWidth = el.scrollWidth,
  76364. scrollHeight = el.scrollHeight,
  76365. elCSS = css(el),
  76366. scrollPosX = el.scrollLeft,
  76367. scrollPosY = el.scrollTop;
  76368. if (el === winScroller) {
  76369. canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
  76370. canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
  76371. } else {
  76372. canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
  76373. canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
  76374. }
  76375. var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
  76376. var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
  76377. if (!autoScrolls[layersOut]) {
  76378. for (var i = 0; i <= layersOut; i++) {
  76379. if (!autoScrolls[i]) {
  76380. autoScrolls[i] = {};
  76381. }
  76382. }
  76383. }
  76384. if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
  76385. autoScrolls[layersOut].el = el;
  76386. autoScrolls[layersOut].vx = vx;
  76387. autoScrolls[layersOut].vy = vy;
  76388. clearInterval(autoScrolls[layersOut].pid);
  76389. if (vx != 0 || vy != 0) {
  76390. scrollThisInstance = true;
  76391. /* jshint loopfunc:true */
  76392. autoScrolls[layersOut].pid = setInterval(function () {
  76393. // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
  76394. if (isFallback && this.layer === 0) {
  76395. Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
  76396. }
  76397. var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
  76398. var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
  76399. if (typeof scrollCustomFn === 'function') {
  76400. if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
  76401. return;
  76402. }
  76403. }
  76404. scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
  76405. }.bind({
  76406. layer: layersOut
  76407. }), 24);
  76408. }
  76409. }
  76410. layersOut++;
  76411. } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
  76412. scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
  76413. }, 30);
  76414. var drop = function drop(_ref) {
  76415. var originalEvent = _ref.originalEvent,
  76416. putSortable = _ref.putSortable,
  76417. dragEl = _ref.dragEl,
  76418. activeSortable = _ref.activeSortable,
  76419. dispatchSortableEvent = _ref.dispatchSortableEvent,
  76420. hideGhostForTarget = _ref.hideGhostForTarget,
  76421. unhideGhostForTarget = _ref.unhideGhostForTarget;
  76422. if (!originalEvent) return;
  76423. var toSortable = putSortable || activeSortable;
  76424. hideGhostForTarget();
  76425. var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
  76426. var target = document.elementFromPoint(touch.clientX, touch.clientY);
  76427. unhideGhostForTarget();
  76428. if (toSortable && !toSortable.el.contains(target)) {
  76429. dispatchSortableEvent('spill');
  76430. this.onSpill({
  76431. dragEl: dragEl,
  76432. putSortable: putSortable
  76433. });
  76434. }
  76435. };
  76436. function Revert() {}
  76437. Revert.prototype = {
  76438. startIndex: null,
  76439. dragStart: function dragStart(_ref2) {
  76440. var oldDraggableIndex = _ref2.oldDraggableIndex;
  76441. this.startIndex = oldDraggableIndex;
  76442. },
  76443. onSpill: function onSpill(_ref3) {
  76444. var dragEl = _ref3.dragEl,
  76445. putSortable = _ref3.putSortable;
  76446. this.sortable.captureAnimationState();
  76447. if (putSortable) {
  76448. putSortable.captureAnimationState();
  76449. }
  76450. var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
  76451. if (nextSibling) {
  76452. this.sortable.el.insertBefore(dragEl, nextSibling);
  76453. } else {
  76454. this.sortable.el.appendChild(dragEl);
  76455. }
  76456. this.sortable.animateAll();
  76457. if (putSortable) {
  76458. putSortable.animateAll();
  76459. }
  76460. },
  76461. drop: drop
  76462. };
  76463. _extends(Revert, {
  76464. pluginName: 'revertOnSpill'
  76465. });
  76466. function Remove() {}
  76467. Remove.prototype = {
  76468. onSpill: function onSpill(_ref4) {
  76469. var dragEl = _ref4.dragEl,
  76470. putSortable = _ref4.putSortable;
  76471. var parentSortable = putSortable || this.sortable;
  76472. parentSortable.captureAnimationState();
  76473. dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
  76474. parentSortable.animateAll();
  76475. },
  76476. drop: drop
  76477. };
  76478. _extends(Remove, {
  76479. pluginName: 'removeOnSpill'
  76480. });
  76481. var lastSwapEl;
  76482. function SwapPlugin() {
  76483. function Swap() {
  76484. this.defaults = {
  76485. swapClass: 'sortable-swap-highlight'
  76486. };
  76487. }
  76488. Swap.prototype = {
  76489. dragStart: function dragStart(_ref) {
  76490. var dragEl = _ref.dragEl;
  76491. lastSwapEl = dragEl;
  76492. },
  76493. dragOverValid: function dragOverValid(_ref2) {
  76494. var completed = _ref2.completed,
  76495. target = _ref2.target,
  76496. onMove = _ref2.onMove,
  76497. activeSortable = _ref2.activeSortable,
  76498. changed = _ref2.changed,
  76499. cancel = _ref2.cancel;
  76500. if (!activeSortable.options.swap) return;
  76501. var el = this.sortable.el,
  76502. options = this.options;
  76503. if (target && target !== el) {
  76504. var prevSwapEl = lastSwapEl;
  76505. if (onMove(target) !== false) {
  76506. toggleClass(target, options.swapClass, true);
  76507. lastSwapEl = target;
  76508. } else {
  76509. lastSwapEl = null;
  76510. }
  76511. if (prevSwapEl && prevSwapEl !== lastSwapEl) {
  76512. toggleClass(prevSwapEl, options.swapClass, false);
  76513. }
  76514. }
  76515. changed();
  76516. completed(true);
  76517. cancel();
  76518. },
  76519. drop: function drop(_ref3) {
  76520. var activeSortable = _ref3.activeSortable,
  76521. putSortable = _ref3.putSortable,
  76522. dragEl = _ref3.dragEl;
  76523. var toSortable = putSortable || this.sortable;
  76524. var options = this.options;
  76525. lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
  76526. if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
  76527. if (dragEl !== lastSwapEl) {
  76528. toSortable.captureAnimationState();
  76529. if (toSortable !== activeSortable) activeSortable.captureAnimationState();
  76530. swapNodes(dragEl, lastSwapEl);
  76531. toSortable.animateAll();
  76532. if (toSortable !== activeSortable) activeSortable.animateAll();
  76533. }
  76534. }
  76535. },
  76536. nulling: function nulling() {
  76537. lastSwapEl = null;
  76538. }
  76539. };
  76540. return _extends(Swap, {
  76541. pluginName: 'swap',
  76542. eventProperties: function eventProperties() {
  76543. return {
  76544. swapItem: lastSwapEl
  76545. };
  76546. }
  76547. });
  76548. }
  76549. function swapNodes(n1, n2) {
  76550. var p1 = n1.parentNode,
  76551. p2 = n2.parentNode,
  76552. i1,
  76553. i2;
  76554. if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
  76555. i1 = index(n1);
  76556. i2 = index(n2);
  76557. if (p1.isEqualNode(p2) && i1 < i2) {
  76558. i2++;
  76559. }
  76560. p1.insertBefore(n2, p1.children[i1]);
  76561. p2.insertBefore(n1, p2.children[i2]);
  76562. }
  76563. var multiDragElements = (/* unused pure expression or super */ null && ([])),
  76564. multiDragClones = (/* unused pure expression or super */ null && ([])),
  76565. lastMultiDragSelect,
  76566. // for selection with modifier key down (SHIFT)
  76567. multiDragSortable,
  76568. initialFolding = false,
  76569. // Initial multi-drag fold when drag started
  76570. folding = false,
  76571. // Folding any other time
  76572. dragStarted = false,
  76573. dragEl$1,
  76574. clonesFromRect,
  76575. clonesHidden;
  76576. function MultiDragPlugin() {
  76577. function MultiDrag(sortable) {
  76578. // Bind all private methods
  76579. for (var fn in this) {
  76580. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  76581. this[fn] = this[fn].bind(this);
  76582. }
  76583. }
  76584. if (sortable.options.supportPointer) {
  76585. on(document, 'pointerup', this._deselectMultiDrag);
  76586. } else {
  76587. on(document, 'mouseup', this._deselectMultiDrag);
  76588. on(document, 'touchend', this._deselectMultiDrag);
  76589. }
  76590. on(document, 'keydown', this._checkKeyDown);
  76591. on(document, 'keyup', this._checkKeyUp);
  76592. this.defaults = {
  76593. selectedClass: 'sortable-selected',
  76594. multiDragKey: null,
  76595. setData: function setData(dataTransfer, dragEl) {
  76596. var data = '';
  76597. if (multiDragElements.length && multiDragSortable === sortable) {
  76598. multiDragElements.forEach(function (multiDragElement, i) {
  76599. data += (!i ? '' : ', ') + multiDragElement.textContent;
  76600. });
  76601. } else {
  76602. data = dragEl.textContent;
  76603. }
  76604. dataTransfer.setData('Text', data);
  76605. }
  76606. };
  76607. }
  76608. MultiDrag.prototype = {
  76609. multiDragKeyDown: false,
  76610. isMultiDrag: false,
  76611. delayStartGlobal: function delayStartGlobal(_ref) {
  76612. var dragged = _ref.dragEl;
  76613. dragEl$1 = dragged;
  76614. },
  76615. delayEnded: function delayEnded() {
  76616. this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
  76617. },
  76618. setupClone: function setupClone(_ref2) {
  76619. var sortable = _ref2.sortable,
  76620. cancel = _ref2.cancel;
  76621. if (!this.isMultiDrag) return;
  76622. for (var i = 0; i < multiDragElements.length; i++) {
  76623. multiDragClones.push(clone(multiDragElements[i]));
  76624. multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
  76625. multiDragClones[i].draggable = false;
  76626. multiDragClones[i].style['will-change'] = '';
  76627. toggleClass(multiDragClones[i], this.options.selectedClass, false);
  76628. multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
  76629. }
  76630. sortable._hideClone();
  76631. cancel();
  76632. },
  76633. clone: function clone(_ref3) {
  76634. var sortable = _ref3.sortable,
  76635. rootEl = _ref3.rootEl,
  76636. dispatchSortableEvent = _ref3.dispatchSortableEvent,
  76637. cancel = _ref3.cancel;
  76638. if (!this.isMultiDrag) return;
  76639. if (!this.options.removeCloneOnHide) {
  76640. if (multiDragElements.length && multiDragSortable === sortable) {
  76641. insertMultiDragClones(true, rootEl);
  76642. dispatchSortableEvent('clone');
  76643. cancel();
  76644. }
  76645. }
  76646. },
  76647. showClone: function showClone(_ref4) {
  76648. var cloneNowShown = _ref4.cloneNowShown,
  76649. rootEl = _ref4.rootEl,
  76650. cancel = _ref4.cancel;
  76651. if (!this.isMultiDrag) return;
  76652. insertMultiDragClones(false, rootEl);
  76653. multiDragClones.forEach(function (clone) {
  76654. css(clone, 'display', '');
  76655. });
  76656. cloneNowShown();
  76657. clonesHidden = false;
  76658. cancel();
  76659. },
  76660. hideClone: function hideClone(_ref5) {
  76661. var _this = this;
  76662. var sortable = _ref5.sortable,
  76663. cloneNowHidden = _ref5.cloneNowHidden,
  76664. cancel = _ref5.cancel;
  76665. if (!this.isMultiDrag) return;
  76666. multiDragClones.forEach(function (clone) {
  76667. css(clone, 'display', 'none');
  76668. if (_this.options.removeCloneOnHide && clone.parentNode) {
  76669. clone.parentNode.removeChild(clone);
  76670. }
  76671. });
  76672. cloneNowHidden();
  76673. clonesHidden = true;
  76674. cancel();
  76675. },
  76676. dragStartGlobal: function dragStartGlobal(_ref6) {
  76677. var sortable = _ref6.sortable;
  76678. if (!this.isMultiDrag && multiDragSortable) {
  76679. multiDragSortable.multiDrag._deselectMultiDrag();
  76680. }
  76681. multiDragElements.forEach(function (multiDragElement) {
  76682. multiDragElement.sortableIndex = index(multiDragElement);
  76683. }); // Sort multi-drag elements
  76684. multiDragElements = multiDragElements.sort(function (a, b) {
  76685. return a.sortableIndex - b.sortableIndex;
  76686. });
  76687. dragStarted = true;
  76688. },
  76689. dragStarted: function dragStarted(_ref7) {
  76690. var _this2 = this;
  76691. var sortable = _ref7.sortable;
  76692. if (!this.isMultiDrag) return;
  76693. if (this.options.sort) {
  76694. // Capture rects,
  76695. // hide multi drag elements (by positioning them absolute),
  76696. // set multi drag elements rects to dragRect,
  76697. // show multi drag elements,
  76698. // animate to rects,
  76699. // unset rects & remove from DOM
  76700. sortable.captureAnimationState();
  76701. if (this.options.animation) {
  76702. multiDragElements.forEach(function (multiDragElement) {
  76703. if (multiDragElement === dragEl$1) return;
  76704. css(multiDragElement, 'position', 'absolute');
  76705. });
  76706. var dragRect = getRect(dragEl$1, false, true, true);
  76707. multiDragElements.forEach(function (multiDragElement) {
  76708. if (multiDragElement === dragEl$1) return;
  76709. setRect(multiDragElement, dragRect);
  76710. });
  76711. folding = true;
  76712. initialFolding = true;
  76713. }
  76714. }
  76715. sortable.animateAll(function () {
  76716. folding = false;
  76717. initialFolding = false;
  76718. if (_this2.options.animation) {
  76719. multiDragElements.forEach(function (multiDragElement) {
  76720. unsetRect(multiDragElement);
  76721. });
  76722. } // Remove all auxiliary multidrag items from el, if sorting enabled
  76723. if (_this2.options.sort) {
  76724. removeMultiDragElements();
  76725. }
  76726. });
  76727. },
  76728. dragOver: function dragOver(_ref8) {
  76729. var target = _ref8.target,
  76730. completed = _ref8.completed,
  76731. cancel = _ref8.cancel;
  76732. if (folding && ~multiDragElements.indexOf(target)) {
  76733. completed(false);
  76734. cancel();
  76735. }
  76736. },
  76737. revert: function revert(_ref9) {
  76738. var fromSortable = _ref9.fromSortable,
  76739. rootEl = _ref9.rootEl,
  76740. sortable = _ref9.sortable,
  76741. dragRect = _ref9.dragRect;
  76742. if (multiDragElements.length > 1) {
  76743. // Setup unfold animation
  76744. multiDragElements.forEach(function (multiDragElement) {
  76745. sortable.addAnimationState({
  76746. target: multiDragElement,
  76747. rect: folding ? getRect(multiDragElement) : dragRect
  76748. });
  76749. unsetRect(multiDragElement);
  76750. multiDragElement.fromRect = dragRect;
  76751. fromSortable.removeAnimationState(multiDragElement);
  76752. });
  76753. folding = false;
  76754. insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
  76755. }
  76756. },
  76757. dragOverCompleted: function dragOverCompleted(_ref10) {
  76758. var sortable = _ref10.sortable,
  76759. isOwner = _ref10.isOwner,
  76760. insertion = _ref10.insertion,
  76761. activeSortable = _ref10.activeSortable,
  76762. parentEl = _ref10.parentEl,
  76763. putSortable = _ref10.putSortable;
  76764. var options = this.options;
  76765. if (insertion) {
  76766. // Clones must be hidden before folding animation to capture dragRectAbsolute properly
  76767. if (isOwner) {
  76768. activeSortable._hideClone();
  76769. }
  76770. initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location
  76771. if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
  76772. // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
  76773. var dragRectAbsolute = getRect(dragEl$1, false, true, true);
  76774. multiDragElements.forEach(function (multiDragElement) {
  76775. if (multiDragElement === dragEl$1) return;
  76776. setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
  76777. // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
  76778. parentEl.appendChild(multiDragElement);
  76779. });
  76780. folding = true;
  76781. } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
  76782. if (!isOwner) {
  76783. // Only remove if not folding (folding will remove them anyways)
  76784. if (!folding) {
  76785. removeMultiDragElements();
  76786. }
  76787. if (multiDragElements.length > 1) {
  76788. var clonesHiddenBefore = clonesHidden;
  76789. activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden
  76790. if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
  76791. multiDragClones.forEach(function (clone) {
  76792. activeSortable.addAnimationState({
  76793. target: clone,
  76794. rect: clonesFromRect
  76795. });
  76796. clone.fromRect = clonesFromRect;
  76797. clone.thisAnimationDuration = null;
  76798. });
  76799. }
  76800. } else {
  76801. activeSortable._showClone(sortable);
  76802. }
  76803. }
  76804. }
  76805. },
  76806. dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
  76807. var dragRect = _ref11.dragRect,
  76808. isOwner = _ref11.isOwner,
  76809. activeSortable = _ref11.activeSortable;
  76810. multiDragElements.forEach(function (multiDragElement) {
  76811. multiDragElement.thisAnimationDuration = null;
  76812. });
  76813. if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
  76814. clonesFromRect = _extends({}, dragRect);
  76815. var dragMatrix = matrix(dragEl$1, true);
  76816. clonesFromRect.top -= dragMatrix.f;
  76817. clonesFromRect.left -= dragMatrix.e;
  76818. }
  76819. },
  76820. dragOverAnimationComplete: function dragOverAnimationComplete() {
  76821. if (folding) {
  76822. folding = false;
  76823. removeMultiDragElements();
  76824. }
  76825. },
  76826. drop: function drop(_ref12) {
  76827. var evt = _ref12.originalEvent,
  76828. rootEl = _ref12.rootEl,
  76829. parentEl = _ref12.parentEl,
  76830. sortable = _ref12.sortable,
  76831. dispatchSortableEvent = _ref12.dispatchSortableEvent,
  76832. oldIndex = _ref12.oldIndex,
  76833. putSortable = _ref12.putSortable;
  76834. var toSortable = putSortable || this.sortable;
  76835. if (!evt) return;
  76836. var options = this.options,
  76837. children = parentEl.children; // Multi-drag selection
  76838. if (!dragStarted) {
  76839. if (options.multiDragKey && !this.multiDragKeyDown) {
  76840. this._deselectMultiDrag();
  76841. }
  76842. toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
  76843. if (!~multiDragElements.indexOf(dragEl$1)) {
  76844. multiDragElements.push(dragEl$1);
  76845. dispatchEvent({
  76846. sortable: sortable,
  76847. rootEl: rootEl,
  76848. name: 'select',
  76849. targetEl: dragEl$1,
  76850. originalEvt: evt
  76851. }); // Modifier activated, select from last to dragEl
  76852. if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
  76853. var lastIndex = index(lastMultiDragSelect),
  76854. currentIndex = index(dragEl$1);
  76855. if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
  76856. // Must include lastMultiDragSelect (select it), in case modified selection from no selection
  76857. // (but previous selection existed)
  76858. var n, i;
  76859. if (currentIndex > lastIndex) {
  76860. i = lastIndex;
  76861. n = currentIndex;
  76862. } else {
  76863. i = currentIndex;
  76864. n = lastIndex + 1;
  76865. }
  76866. for (; i < n; i++) {
  76867. if (~multiDragElements.indexOf(children[i])) continue;
  76868. toggleClass(children[i], options.selectedClass, true);
  76869. multiDragElements.push(children[i]);
  76870. dispatchEvent({
  76871. sortable: sortable,
  76872. rootEl: rootEl,
  76873. name: 'select',
  76874. targetEl: children[i],
  76875. originalEvt: evt
  76876. });
  76877. }
  76878. }
  76879. } else {
  76880. lastMultiDragSelect = dragEl$1;
  76881. }
  76882. multiDragSortable = toSortable;
  76883. } else {
  76884. multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
  76885. lastMultiDragSelect = null;
  76886. dispatchEvent({
  76887. sortable: sortable,
  76888. rootEl: rootEl,
  76889. name: 'deselect',
  76890. targetEl: dragEl$1,
  76891. originalEvt: evt
  76892. });
  76893. }
  76894. } // Multi-drag drop
  76895. if (dragStarted && this.isMultiDrag) {
  76896. // Do not "unfold" after around dragEl if reverted
  76897. if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
  76898. var dragRect = getRect(dragEl$1),
  76899. multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
  76900. if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
  76901. toSortable.captureAnimationState();
  76902. if (!initialFolding) {
  76903. if (options.animation) {
  76904. dragEl$1.fromRect = dragRect;
  76905. multiDragElements.forEach(function (multiDragElement) {
  76906. multiDragElement.thisAnimationDuration = null;
  76907. if (multiDragElement !== dragEl$1) {
  76908. var rect = folding ? getRect(multiDragElement) : dragRect;
  76909. multiDragElement.fromRect = rect; // Prepare unfold animation
  76910. toSortable.addAnimationState({
  76911. target: multiDragElement,
  76912. rect: rect
  76913. });
  76914. }
  76915. });
  76916. } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
  76917. // properly they must all be removed
  76918. removeMultiDragElements();
  76919. multiDragElements.forEach(function (multiDragElement) {
  76920. if (children[multiDragIndex]) {
  76921. parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
  76922. } else {
  76923. parentEl.appendChild(multiDragElement);
  76924. }
  76925. multiDragIndex++;
  76926. }); // If initial folding is done, the elements may have changed position because they are now
  76927. // unfolding around dragEl, even though dragEl may not have his index changed, so update event
  76928. // must be fired here as Sortable will not.
  76929. if (oldIndex === index(dragEl$1)) {
  76930. var update = false;
  76931. multiDragElements.forEach(function (multiDragElement) {
  76932. if (multiDragElement.sortableIndex !== index(multiDragElement)) {
  76933. update = true;
  76934. return;
  76935. }
  76936. });
  76937. if (update) {
  76938. dispatchSortableEvent('update');
  76939. }
  76940. }
  76941. } // Must be done after capturing individual rects (scroll bar)
  76942. multiDragElements.forEach(function (multiDragElement) {
  76943. unsetRect(multiDragElement);
  76944. });
  76945. toSortable.animateAll();
  76946. }
  76947. multiDragSortable = toSortable;
  76948. } // Remove clones if necessary
  76949. if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
  76950. multiDragClones.forEach(function (clone) {
  76951. clone.parentNode && clone.parentNode.removeChild(clone);
  76952. });
  76953. }
  76954. },
  76955. nullingGlobal: function nullingGlobal() {
  76956. this.isMultiDrag = dragStarted = false;
  76957. multiDragClones.length = 0;
  76958. },
  76959. destroyGlobal: function destroyGlobal() {
  76960. this._deselectMultiDrag();
  76961. off(document, 'pointerup', this._deselectMultiDrag);
  76962. off(document, 'mouseup', this._deselectMultiDrag);
  76963. off(document, 'touchend', this._deselectMultiDrag);
  76964. off(document, 'keydown', this._checkKeyDown);
  76965. off(document, 'keyup', this._checkKeyUp);
  76966. },
  76967. _deselectMultiDrag: function _deselectMultiDrag(evt) {
  76968. if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
  76969. if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
  76970. if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click
  76971. if (evt && evt.button !== 0) return;
  76972. while (multiDragElements.length) {
  76973. var el = multiDragElements[0];
  76974. toggleClass(el, this.options.selectedClass, false);
  76975. multiDragElements.shift();
  76976. dispatchEvent({
  76977. sortable: this.sortable,
  76978. rootEl: this.sortable.el,
  76979. name: 'deselect',
  76980. targetEl: el,
  76981. originalEvt: evt
  76982. });
  76983. }
  76984. },
  76985. _checkKeyDown: function _checkKeyDown(evt) {
  76986. if (evt.key === this.options.multiDragKey) {
  76987. this.multiDragKeyDown = true;
  76988. }
  76989. },
  76990. _checkKeyUp: function _checkKeyUp(evt) {
  76991. if (evt.key === this.options.multiDragKey) {
  76992. this.multiDragKeyDown = false;
  76993. }
  76994. }
  76995. };
  76996. return _extends(MultiDrag, {
  76997. // Static methods & properties
  76998. pluginName: 'multiDrag',
  76999. utils: {
  77000. /**
  77001. * Selects the provided multi-drag item
  77002. * @param {HTMLElement} el The element to be selected
  77003. */
  77004. select: function select(el) {
  77005. var sortable = el.parentNode[expando];
  77006. if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
  77007. if (multiDragSortable && multiDragSortable !== sortable) {
  77008. multiDragSortable.multiDrag._deselectMultiDrag();
  77009. multiDragSortable = sortable;
  77010. }
  77011. toggleClass(el, sortable.options.selectedClass, true);
  77012. multiDragElements.push(el);
  77013. },
  77014. /**
  77015. * Deselects the provided multi-drag item
  77016. * @param {HTMLElement} el The element to be deselected
  77017. */
  77018. deselect: function deselect(el) {
  77019. var sortable = el.parentNode[expando],
  77020. index = multiDragElements.indexOf(el);
  77021. if (!sortable || !sortable.options.multiDrag || !~index) return;
  77022. toggleClass(el, sortable.options.selectedClass, false);
  77023. multiDragElements.splice(index, 1);
  77024. }
  77025. },
  77026. eventProperties: function eventProperties() {
  77027. var _this3 = this;
  77028. var oldIndicies = [],
  77029. newIndicies = [];
  77030. multiDragElements.forEach(function (multiDragElement) {
  77031. oldIndicies.push({
  77032. multiDragElement: multiDragElement,
  77033. index: multiDragElement.sortableIndex
  77034. }); // multiDragElements will already be sorted if folding
  77035. var newIndex;
  77036. if (folding && multiDragElement !== dragEl$1) {
  77037. newIndex = -1;
  77038. } else if (folding) {
  77039. newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
  77040. } else {
  77041. newIndex = index(multiDragElement);
  77042. }
  77043. newIndicies.push({
  77044. multiDragElement: multiDragElement,
  77045. index: newIndex
  77046. });
  77047. });
  77048. return {
  77049. items: _toConsumableArray(multiDragElements),
  77050. clones: [].concat(multiDragClones),
  77051. oldIndicies: oldIndicies,
  77052. newIndicies: newIndicies
  77053. };
  77054. },
  77055. optionListeners: {
  77056. multiDragKey: function multiDragKey(key) {
  77057. key = key.toLowerCase();
  77058. if (key === 'ctrl') {
  77059. key = 'Control';
  77060. } else if (key.length > 1) {
  77061. key = key.charAt(0).toUpperCase() + key.substr(1);
  77062. }
  77063. return key;
  77064. }
  77065. }
  77066. });
  77067. }
  77068. function insertMultiDragElements(clonesInserted, rootEl) {
  77069. multiDragElements.forEach(function (multiDragElement, i) {
  77070. var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
  77071. if (target) {
  77072. rootEl.insertBefore(multiDragElement, target);
  77073. } else {
  77074. rootEl.appendChild(multiDragElement);
  77075. }
  77076. });
  77077. }
  77078. /**
  77079. * Insert multi-drag clones
  77080. * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
  77081. * @param {HTMLElement} rootEl
  77082. */
  77083. function insertMultiDragClones(elementsInserted, rootEl) {
  77084. multiDragClones.forEach(function (clone, i) {
  77085. var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
  77086. if (target) {
  77087. rootEl.insertBefore(clone, target);
  77088. } else {
  77089. rootEl.appendChild(clone);
  77090. }
  77091. });
  77092. }
  77093. function removeMultiDragElements() {
  77094. multiDragElements.forEach(function (multiDragElement) {
  77095. if (multiDragElement === dragEl$1) return;
  77096. multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
  77097. });
  77098. }
  77099. Sortable.mount(new AutoScrollPlugin());
  77100. Sortable.mount(Remove, Revert);
  77101. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sortable);
  77102. /***/ }),
  77103. /***/ 989:
  77104. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  77105. module.exports = __webpack_require__(63268);
  77106. /***/ }),
  77107. /***/ 63268:
  77108. /***/ (function(module, exports) {
  77109. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root) {
  77110. 'use strict';
  77111. /**
  77112. * charMap
  77113. * @type {Object}
  77114. */
  77115. var charMap = {
  77116. // latin
  77117. 'À': 'A',
  77118. 'Á': 'A',
  77119. 'Â': 'A',
  77120. 'Ã': 'A',
  77121. 'Ä': 'Ae',
  77122. 'Å': 'A',
  77123. 'Æ': 'AE',
  77124. 'Ç': 'C',
  77125. 'È': 'E',
  77126. 'É': 'E',
  77127. 'Ê': 'E',
  77128. 'Ë': 'E',
  77129. 'Ì': 'I',
  77130. 'Í': 'I',
  77131. 'Î': 'I',
  77132. 'Ï': 'I',
  77133. 'Ð': 'D',
  77134. 'Ñ': 'N',
  77135. 'Ò': 'O',
  77136. 'Ó': 'O',
  77137. 'Ô': 'O',
  77138. 'Õ': 'O',
  77139. 'Ö': 'Oe',
  77140. 'Ő': 'O',
  77141. 'Ø': 'O',
  77142. 'Ù': 'U',
  77143. 'Ú': 'U',
  77144. 'Û': 'U',
  77145. 'Ü': 'Ue',
  77146. 'Ű': 'U',
  77147. 'Ý': 'Y',
  77148. 'Þ': 'TH',
  77149. 'ß': 'ss',
  77150. 'à': 'a',
  77151. 'á': 'a',
  77152. 'â': 'a',
  77153. 'ã': 'a',
  77154. 'ä': 'ae',
  77155. 'å': 'a',
  77156. 'æ': 'ae',
  77157. 'ç': 'c',
  77158. 'è': 'e',
  77159. 'é': 'e',
  77160. 'ê': 'e',
  77161. 'ë': 'e',
  77162. 'ì': 'i',
  77163. 'í': 'i',
  77164. 'î': 'i',
  77165. 'ï': 'i',
  77166. 'ð': 'd',
  77167. 'ñ': 'n',
  77168. 'ò': 'o',
  77169. 'ó': 'o',
  77170. 'ô': 'o',
  77171. 'õ': 'o',
  77172. 'ö': 'oe',
  77173. 'ő': 'o',
  77174. 'ø': 'o',
  77175. 'ù': 'u',
  77176. 'ú': 'u',
  77177. 'û': 'u',
  77178. 'ü': 'ue',
  77179. 'ű': 'u',
  77180. 'ý': 'y',
  77181. 'þ': 'th',
  77182. 'ÿ': 'y',
  77183. 'ẞ': 'SS',
  77184. // language specific
  77185. // Arabic
  77186. 'ا': 'a',
  77187. 'أ': 'a',
  77188. 'إ': 'i',
  77189. 'آ': 'aa',
  77190. 'ؤ': 'u',
  77191. 'ئ': 'e',
  77192. 'ء': 'a',
  77193. 'ب': 'b',
  77194. 'ت': 't',
  77195. 'ث': 'th',
  77196. 'ج': 'j',
  77197. 'ح': 'h',
  77198. 'خ': 'kh',
  77199. 'د': 'd',
  77200. 'ذ': 'th',
  77201. 'ر': 'r',
  77202. 'ز': 'z',
  77203. 'س': 's',
  77204. 'ش': 'sh',
  77205. 'ص': 's',
  77206. 'ض': 'dh',
  77207. 'ط': 't',
  77208. 'ظ': 'z',
  77209. 'ع': 'a',
  77210. 'غ': 'gh',
  77211. 'ف': 'f',
  77212. 'ق': 'q',
  77213. 'ك': 'k',
  77214. 'ل': 'l',
  77215. 'م': 'm',
  77216. 'ن': 'n',
  77217. 'ه': 'h',
  77218. 'و': 'w',
  77219. 'ي': 'y',
  77220. 'ى': 'a',
  77221. 'ة': 'h',
  77222. 'ﻻ': 'la',
  77223. 'ﻷ': 'laa',
  77224. 'ﻹ': 'lai',
  77225. 'ﻵ': 'laa',
  77226. // Persian additional characters than Arabic
  77227. 'گ': 'g',
  77228. 'چ': 'ch',
  77229. 'پ': 'p',
  77230. 'ژ': 'zh',
  77231. 'ک': 'k',
  77232. 'ی': 'y',
  77233. // Arabic diactrics
  77234. 'َ': 'a',
  77235. 'ً': 'an',
  77236. 'ِ': 'e',
  77237. 'ٍ': 'en',
  77238. 'ُ': 'u',
  77239. 'ٌ': 'on',
  77240. 'ْ': '',
  77241. // Arabic numbers
  77242. '٠': '0',
  77243. '١': '1',
  77244. '٢': '2',
  77245. '٣': '3',
  77246. '٤': '4',
  77247. '٥': '5',
  77248. '٦': '6',
  77249. '٧': '7',
  77250. '٨': '8',
  77251. '٩': '9',
  77252. // Persian numbers
  77253. '۰': '0',
  77254. '۱': '1',
  77255. '۲': '2',
  77256. '۳': '3',
  77257. '۴': '4',
  77258. '۵': '5',
  77259. '۶': '6',
  77260. '۷': '7',
  77261. '۸': '8',
  77262. '۹': '9',
  77263. // Burmese consonants
  77264. 'က': 'k',
  77265. 'ခ': 'kh',
  77266. 'ဂ': 'g',
  77267. 'ဃ': 'ga',
  77268. 'င': 'ng',
  77269. 'စ': 's',
  77270. 'ဆ': 'sa',
  77271. 'ဇ': 'z',
  77272. 'စျ': 'za',
  77273. 'ည': 'ny',
  77274. 'ဋ': 't',
  77275. 'ဌ': 'ta',
  77276. 'ဍ': 'd',
  77277. 'ဎ': 'da',
  77278. 'ဏ': 'na',
  77279. 'တ': 't',
  77280. 'ထ': 'ta',
  77281. 'ဒ': 'd',
  77282. 'ဓ': 'da',
  77283. 'န': 'n',
  77284. 'ပ': 'p',
  77285. 'ဖ': 'pa',
  77286. 'ဗ': 'b',
  77287. 'ဘ': 'ba',
  77288. 'မ': 'm',
  77289. 'ယ': 'y',
  77290. 'ရ': 'ya',
  77291. 'လ': 'l',
  77292. 'ဝ': 'w',
  77293. 'သ': 'th',
  77294. 'ဟ': 'h',
  77295. 'ဠ': 'la',
  77296. 'အ': 'a',
  77297. // consonant character combos
  77298. 'ြ': 'y',
  77299. 'ျ': 'ya',
  77300. 'ွ': 'w',
  77301. 'ြွ': 'yw',
  77302. 'ျွ': 'ywa',
  77303. 'ှ': 'h',
  77304. // independent vowels
  77305. 'ဧ': 'e',
  77306. '၏': '-e',
  77307. 'ဣ': 'i',
  77308. 'ဤ': '-i',
  77309. 'ဉ': 'u',
  77310. 'ဦ': '-u',
  77311. 'ဩ': 'aw',
  77312. 'သြော': 'aw',
  77313. 'ဪ': 'aw',
  77314. // numbers
  77315. '၀': '0',
  77316. '၁': '1',
  77317. '၂': '2',
  77318. '၃': '3',
  77319. '၄': '4',
  77320. '၅': '5',
  77321. '၆': '6',
  77322. '၇': '7',
  77323. '၈': '8',
  77324. '၉': '9',
  77325. // virama and tone marks which are silent in transliteration
  77326. '္': '',
  77327. '့': '',
  77328. 'း': '',
  77329. // Czech
  77330. 'č': 'c',
  77331. 'ď': 'd',
  77332. 'ě': 'e',
  77333. 'ň': 'n',
  77334. 'ř': 'r',
  77335. 'š': 's',
  77336. 'ť': 't',
  77337. 'ů': 'u',
  77338. 'ž': 'z',
  77339. 'Č': 'C',
  77340. 'Ď': 'D',
  77341. 'Ě': 'E',
  77342. 'Ň': 'N',
  77343. 'Ř': 'R',
  77344. 'Š': 'S',
  77345. 'Ť': 'T',
  77346. 'Ů': 'U',
  77347. 'Ž': 'Z',
  77348. // Dhivehi
  77349. 'ހ': 'h',
  77350. 'ށ': 'sh',
  77351. 'ނ': 'n',
  77352. 'ރ': 'r',
  77353. 'ބ': 'b',
  77354. 'ޅ': 'lh',
  77355. 'ކ': 'k',
  77356. 'އ': 'a',
  77357. 'ވ': 'v',
  77358. 'މ': 'm',
  77359. 'ފ': 'f',
  77360. 'ދ': 'dh',
  77361. 'ތ': 'th',
  77362. 'ލ': 'l',
  77363. 'ގ': 'g',
  77364. 'ޏ': 'gn',
  77365. 'ސ': 's',
  77366. 'ޑ': 'd',
  77367. 'ޒ': 'z',
  77368. 'ޓ': 't',
  77369. 'ޔ': 'y',
  77370. 'ޕ': 'p',
  77371. 'ޖ': 'j',
  77372. 'ޗ': 'ch',
  77373. 'ޘ': 'tt',
  77374. 'ޙ': 'hh',
  77375. 'ޚ': 'kh',
  77376. 'ޛ': 'th',
  77377. 'ޜ': 'z',
  77378. 'ޝ': 'sh',
  77379. 'ޞ': 's',
  77380. 'ޟ': 'd',
  77381. 'ޠ': 't',
  77382. 'ޡ': 'z',
  77383. 'ޢ': 'a',
  77384. 'ޣ': 'gh',
  77385. 'ޤ': 'q',
  77386. 'ޥ': 'w',
  77387. 'ަ': 'a',
  77388. 'ާ': 'aa',
  77389. 'ި': 'i',
  77390. 'ީ': 'ee',
  77391. 'ު': 'u',
  77392. 'ޫ': 'oo',
  77393. 'ެ': 'e',
  77394. 'ޭ': 'ey',
  77395. 'ޮ': 'o',
  77396. 'ޯ': 'oa',
  77397. 'ް': '',
  77398. // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
  77399. // National system (2002)
  77400. 'ა': 'a',
  77401. 'ბ': 'b',
  77402. 'გ': 'g',
  77403. 'დ': 'd',
  77404. 'ე': 'e',
  77405. 'ვ': 'v',
  77406. 'ზ': 'z',
  77407. 'თ': 't',
  77408. 'ი': 'i',
  77409. 'კ': 'k',
  77410. 'ლ': 'l',
  77411. 'მ': 'm',
  77412. 'ნ': 'n',
  77413. 'ო': 'o',
  77414. 'პ': 'p',
  77415. 'ჟ': 'zh',
  77416. 'რ': 'r',
  77417. 'ს': 's',
  77418. 'ტ': 't',
  77419. 'უ': 'u',
  77420. 'ფ': 'p',
  77421. 'ქ': 'k',
  77422. 'ღ': 'gh',
  77423. 'ყ': 'q',
  77424. 'შ': 'sh',
  77425. 'ჩ': 'ch',
  77426. 'ც': 'ts',
  77427. 'ძ': 'dz',
  77428. 'წ': 'ts',
  77429. 'ჭ': 'ch',
  77430. 'ხ': 'kh',
  77431. 'ჯ': 'j',
  77432. 'ჰ': 'h',
  77433. // Greek
  77434. 'α': 'a',
  77435. 'β': 'v',
  77436. 'γ': 'g',
  77437. 'δ': 'd',
  77438. 'ε': 'e',
  77439. 'ζ': 'z',
  77440. 'η': 'i',
  77441. 'θ': 'th',
  77442. 'ι': 'i',
  77443. 'κ': 'k',
  77444. 'λ': 'l',
  77445. 'μ': 'm',
  77446. 'ν': 'n',
  77447. 'ξ': 'ks',
  77448. 'ο': 'o',
  77449. 'π': 'p',
  77450. 'ρ': 'r',
  77451. 'σ': 's',
  77452. 'τ': 't',
  77453. 'υ': 'y',
  77454. 'φ': 'f',
  77455. 'χ': 'x',
  77456. 'ψ': 'ps',
  77457. 'ω': 'o',
  77458. 'ά': 'a',
  77459. 'έ': 'e',
  77460. 'ί': 'i',
  77461. 'ό': 'o',
  77462. 'ύ': 'y',
  77463. 'ή': 'i',
  77464. 'ώ': 'o',
  77465. 'ς': 's',
  77466. 'ϊ': 'i',
  77467. 'ΰ': 'y',
  77468. 'ϋ': 'y',
  77469. 'ΐ': 'i',
  77470. 'Α': 'A',
  77471. 'Β': 'B',
  77472. 'Γ': 'G',
  77473. 'Δ': 'D',
  77474. 'Ε': 'E',
  77475. 'Ζ': 'Z',
  77476. 'Η': 'I',
  77477. 'Θ': 'TH',
  77478. 'Ι': 'I',
  77479. 'Κ': 'K',
  77480. 'Λ': 'L',
  77481. 'Μ': 'M',
  77482. 'Ν': 'N',
  77483. 'Ξ': 'KS',
  77484. 'Ο': 'O',
  77485. 'Π': 'P',
  77486. 'Ρ': 'R',
  77487. 'Σ': 'S',
  77488. 'Τ': 'T',
  77489. 'Υ': 'Y',
  77490. 'Φ': 'F',
  77491. 'Χ': 'X',
  77492. 'Ψ': 'PS',
  77493. 'Ω': 'O',
  77494. 'Ά': 'A',
  77495. 'Έ': 'E',
  77496. 'Ί': 'I',
  77497. 'Ό': 'O',
  77498. 'Ύ': 'Y',
  77499. 'Ή': 'I',
  77500. 'Ώ': 'O',
  77501. 'Ϊ': 'I',
  77502. 'Ϋ': 'Y',
  77503. // Latvian
  77504. 'ā': 'a',
  77505. // 'č': 'c', // duplicate
  77506. 'ē': 'e',
  77507. 'ģ': 'g',
  77508. 'ī': 'i',
  77509. 'ķ': 'k',
  77510. 'ļ': 'l',
  77511. 'ņ': 'n',
  77512. // 'š': 's', // duplicate
  77513. 'ū': 'u',
  77514. // 'ž': 'z', // duplicate
  77515. 'Ā': 'A',
  77516. // 'Č': 'C', // duplicate
  77517. 'Ē': 'E',
  77518. 'Ģ': 'G',
  77519. 'Ī': 'I',
  77520. 'Ķ': 'k',
  77521. 'Ļ': 'L',
  77522. 'Ņ': 'N',
  77523. // 'Š': 'S', // duplicate
  77524. 'Ū': 'U',
  77525. // 'Ž': 'Z', // duplicate
  77526. // Macedonian
  77527. 'Ќ': 'Kj',
  77528. 'ќ': 'kj',
  77529. 'Љ': 'Lj',
  77530. 'љ': 'lj',
  77531. 'Њ': 'Nj',
  77532. 'њ': 'nj',
  77533. 'Тс': 'Ts',
  77534. 'тс': 'ts',
  77535. // Polish
  77536. 'ą': 'a',
  77537. 'ć': 'c',
  77538. 'ę': 'e',
  77539. 'ł': 'l',
  77540. 'ń': 'n',
  77541. // 'ó': 'o', // duplicate
  77542. 'ś': 's',
  77543. 'ź': 'z',
  77544. 'ż': 'z',
  77545. 'Ą': 'A',
  77546. 'Ć': 'C',
  77547. 'Ę': 'E',
  77548. 'Ł': 'L',
  77549. 'Ń': 'N',
  77550. 'Ś': 'S',
  77551. 'Ź': 'Z',
  77552. 'Ż': 'Z',
  77553. // Ukranian
  77554. 'Є': 'Ye',
  77555. 'І': 'I',
  77556. 'Ї': 'Yi',
  77557. 'Ґ': 'G',
  77558. 'є': 'ye',
  77559. 'і': 'i',
  77560. 'ї': 'yi',
  77561. 'ґ': 'g',
  77562. // Romanian
  77563. 'ă': 'a',
  77564. 'Ă': 'A',
  77565. 'ș': 's',
  77566. 'Ș': 'S',
  77567. // 'ş': 's', // duplicate
  77568. // 'Ş': 'S', // duplicate
  77569. 'ț': 't',
  77570. 'Ț': 'T',
  77571. 'ţ': 't',
  77572. 'Ţ': 'T',
  77573. // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
  77574. // ICAO
  77575. 'а': 'a',
  77576. 'б': 'b',
  77577. 'в': 'v',
  77578. 'г': 'g',
  77579. 'д': 'd',
  77580. 'е': 'e',
  77581. 'ё': 'yo',
  77582. 'ж': 'zh',
  77583. 'з': 'z',
  77584. 'и': 'i',
  77585. 'й': 'i',
  77586. 'к': 'k',
  77587. 'л': 'l',
  77588. 'м': 'm',
  77589. 'н': 'n',
  77590. 'о': 'o',
  77591. 'п': 'p',
  77592. 'р': 'r',
  77593. 'с': 's',
  77594. 'т': 't',
  77595. 'у': 'u',
  77596. 'ф': 'f',
  77597. 'х': 'kh',
  77598. 'ц': 'c',
  77599. 'ч': 'ch',
  77600. 'ш': 'sh',
  77601. 'щ': 'sh',
  77602. 'ъ': '',
  77603. 'ы': 'y',
  77604. 'ь': '',
  77605. 'э': 'e',
  77606. 'ю': 'yu',
  77607. 'я': 'ya',
  77608. 'А': 'A',
  77609. 'Б': 'B',
  77610. 'В': 'V',
  77611. 'Г': 'G',
  77612. 'Д': 'D',
  77613. 'Е': 'E',
  77614. 'Ё': 'Yo',
  77615. 'Ж': 'Zh',
  77616. 'З': 'Z',
  77617. 'И': 'I',
  77618. 'Й': 'I',
  77619. 'К': 'K',
  77620. 'Л': 'L',
  77621. 'М': 'M',
  77622. 'Н': 'N',
  77623. 'О': 'O',
  77624. 'П': 'P',
  77625. 'Р': 'R',
  77626. 'С': 'S',
  77627. 'Т': 'T',
  77628. 'У': 'U',
  77629. 'Ф': 'F',
  77630. 'Х': 'Kh',
  77631. 'Ц': 'C',
  77632. 'Ч': 'Ch',
  77633. 'Ш': 'Sh',
  77634. 'Щ': 'Sh',
  77635. 'Ъ': '',
  77636. 'Ы': 'Y',
  77637. 'Ь': '',
  77638. 'Э': 'E',
  77639. 'Ю': 'Yu',
  77640. 'Я': 'Ya',
  77641. // Serbian
  77642. 'ђ': 'dj',
  77643. 'ј': 'j',
  77644. // 'љ': 'lj', // duplicate
  77645. // 'њ': 'nj', // duplicate
  77646. 'ћ': 'c',
  77647. 'џ': 'dz',
  77648. 'Ђ': 'Dj',
  77649. 'Ј': 'j',
  77650. // 'Љ': 'Lj', // duplicate
  77651. // 'Њ': 'Nj', // duplicate
  77652. 'Ћ': 'C',
  77653. 'Џ': 'Dz',
  77654. // Slovak
  77655. 'ľ': 'l',
  77656. 'ĺ': 'l',
  77657. 'ŕ': 'r',
  77658. 'Ľ': 'L',
  77659. 'Ĺ': 'L',
  77660. 'Ŕ': 'R',
  77661. // Turkish
  77662. 'ş': 's',
  77663. 'Ş': 'S',
  77664. 'ı': 'i',
  77665. 'İ': 'I',
  77666. // 'ç': 'c', // duplicate
  77667. // 'Ç': 'C', // duplicate
  77668. // 'ü': 'u', // duplicate, see langCharMap
  77669. // 'Ü': 'U', // duplicate, see langCharMap
  77670. // 'ö': 'o', // duplicate, see langCharMap
  77671. // 'Ö': 'O', // duplicate, see langCharMap
  77672. 'ğ': 'g',
  77673. 'Ğ': 'G',
  77674. // Vietnamese
  77675. 'ả': 'a',
  77676. 'Ả': 'A',
  77677. 'ẳ': 'a',
  77678. 'Ẳ': 'A',
  77679. 'ẩ': 'a',
  77680. 'Ẩ': 'A',
  77681. 'đ': 'd',
  77682. 'Đ': 'D',
  77683. 'ẹ': 'e',
  77684. 'Ẹ': 'E',
  77685. 'ẽ': 'e',
  77686. 'Ẽ': 'E',
  77687. 'ẻ': 'e',
  77688. 'Ẻ': 'E',
  77689. 'ế': 'e',
  77690. 'Ế': 'E',
  77691. 'ề': 'e',
  77692. 'Ề': 'E',
  77693. 'ệ': 'e',
  77694. 'Ệ': 'E',
  77695. 'ễ': 'e',
  77696. 'Ễ': 'E',
  77697. 'ể': 'e',
  77698. 'Ể': 'E',
  77699. 'ỏ': 'o',
  77700. 'ọ': 'o',
  77701. 'Ọ': 'o',
  77702. 'ố': 'o',
  77703. 'Ố': 'O',
  77704. 'ồ': 'o',
  77705. 'Ồ': 'O',
  77706. 'ổ': 'o',
  77707. 'Ổ': 'O',
  77708. 'ộ': 'o',
  77709. 'Ộ': 'O',
  77710. 'ỗ': 'o',
  77711. 'Ỗ': 'O',
  77712. 'ơ': 'o',
  77713. 'Ơ': 'O',
  77714. 'ớ': 'o',
  77715. 'Ớ': 'O',
  77716. 'ờ': 'o',
  77717. 'Ờ': 'O',
  77718. 'ợ': 'o',
  77719. 'Ợ': 'O',
  77720. 'ỡ': 'o',
  77721. 'Ỡ': 'O',
  77722. 'Ở': 'o',
  77723. 'ở': 'o',
  77724. 'ị': 'i',
  77725. 'Ị': 'I',
  77726. 'ĩ': 'i',
  77727. 'Ĩ': 'I',
  77728. 'ỉ': 'i',
  77729. 'Ỉ': 'i',
  77730. 'ủ': 'u',
  77731. 'Ủ': 'U',
  77732. 'ụ': 'u',
  77733. 'Ụ': 'U',
  77734. 'ũ': 'u',
  77735. 'Ũ': 'U',
  77736. 'ư': 'u',
  77737. 'Ư': 'U',
  77738. 'ứ': 'u',
  77739. 'Ứ': 'U',
  77740. 'ừ': 'u',
  77741. 'Ừ': 'U',
  77742. 'ự': 'u',
  77743. 'Ự': 'U',
  77744. 'ữ': 'u',
  77745. 'Ữ': 'U',
  77746. 'ử': 'u',
  77747. 'Ử': 'ư',
  77748. 'ỷ': 'y',
  77749. 'Ỷ': 'y',
  77750. 'ỳ': 'y',
  77751. 'Ỳ': 'Y',
  77752. 'ỵ': 'y',
  77753. 'Ỵ': 'Y',
  77754. 'ỹ': 'y',
  77755. 'Ỹ': 'Y',
  77756. 'ạ': 'a',
  77757. 'Ạ': 'A',
  77758. 'ấ': 'a',
  77759. 'Ấ': 'A',
  77760. 'ầ': 'a',
  77761. 'Ầ': 'A',
  77762. 'ậ': 'a',
  77763. 'Ậ': 'A',
  77764. 'ẫ': 'a',
  77765. 'Ẫ': 'A',
  77766. // 'ă': 'a', // duplicate
  77767. // 'Ă': 'A', // duplicate
  77768. 'ắ': 'a',
  77769. 'Ắ': 'A',
  77770. 'ằ': 'a',
  77771. 'Ằ': 'A',
  77772. 'ặ': 'a',
  77773. 'Ặ': 'A',
  77774. 'ẵ': 'a',
  77775. 'Ẵ': 'A',
  77776. "⓪": "0",
  77777. "①": "1",
  77778. "②": "2",
  77779. "③": "3",
  77780. "④": "4",
  77781. "⑤": "5",
  77782. "⑥": "6",
  77783. "⑦": "7",
  77784. "⑧": "8",
  77785. "⑨": "9",
  77786. "⑩": "10",
  77787. "⑪": "11",
  77788. "⑫": "12",
  77789. "⑬": "13",
  77790. "⑭": "14",
  77791. "⑮": "15",
  77792. "⑯": "16",
  77793. "⑰": "17",
  77794. "⑱": "18",
  77795. "⑲": "18",
  77796. "⑳": "18",
  77797. "⓵": "1",
  77798. "⓶": "2",
  77799. "⓷": "3",
  77800. "⓸": "4",
  77801. "⓹": "5",
  77802. "⓺": "6",
  77803. "⓻": "7",
  77804. "⓼": "8",
  77805. "⓽": "9",
  77806. "⓾": "10",
  77807. "⓿": "0",
  77808. "⓫": "11",
  77809. "⓬": "12",
  77810. "⓭": "13",
  77811. "⓮": "14",
  77812. "⓯": "15",
  77813. "⓰": "16",
  77814. "⓱": "17",
  77815. "⓲": "18",
  77816. "⓳": "19",
  77817. "⓴": "20",
  77818. "Ⓐ": "A",
  77819. "Ⓑ": "B",
  77820. "Ⓒ": "C",
  77821. "Ⓓ": "D",
  77822. "Ⓔ": "E",
  77823. "Ⓕ": "F",
  77824. "Ⓖ": "G",
  77825. "Ⓗ": "H",
  77826. "Ⓘ": "I",
  77827. "Ⓙ": "J",
  77828. "Ⓚ": "K",
  77829. "Ⓛ": "L",
  77830. "Ⓜ": "M",
  77831. "Ⓝ": "N",
  77832. "Ⓞ": "O",
  77833. "Ⓟ": "P",
  77834. "Ⓠ": "Q",
  77835. "Ⓡ": "R",
  77836. "Ⓢ": "S",
  77837. "Ⓣ": "T",
  77838. "Ⓤ": "U",
  77839. "Ⓥ": "V",
  77840. "Ⓦ": "W",
  77841. "Ⓧ": "X",
  77842. "Ⓨ": "Y",
  77843. "Ⓩ": "Z",
  77844. "ⓐ": "a",
  77845. "ⓑ": "b",
  77846. "ⓒ": "c",
  77847. "ⓓ": "d",
  77848. "ⓔ": "e",
  77849. "ⓕ": "f",
  77850. "ⓖ": "g",
  77851. "ⓗ": "h",
  77852. "ⓘ": "i",
  77853. "ⓙ": "j",
  77854. "ⓚ": "k",
  77855. "ⓛ": "l",
  77856. "ⓜ": "m",
  77857. "ⓝ": "n",
  77858. "ⓞ": "o",
  77859. "ⓟ": "p",
  77860. "ⓠ": "q",
  77861. "ⓡ": "r",
  77862. "ⓢ": "s",
  77863. "ⓣ": "t",
  77864. "ⓤ": "u",
  77865. "ⓦ": "v",
  77866. "ⓥ": "w",
  77867. "ⓧ": "x",
  77868. "ⓨ": "y",
  77869. "ⓩ": "z",
  77870. // symbols
  77871. '“': '"',
  77872. '”': '"',
  77873. '‘': "'",
  77874. '’': "'",
  77875. '∂': 'd',
  77876. 'ƒ': 'f',
  77877. '™': '(TM)',
  77878. '©': '(C)',
  77879. 'œ': 'oe',
  77880. 'Œ': 'OE',
  77881. '®': '(R)',
  77882. '†': '+',
  77883. '℠': '(SM)',
  77884. '…': '...',
  77885. '˚': 'o',
  77886. 'º': 'o',
  77887. 'ª': 'a',
  77888. '•': '*',
  77889. '၊': ',',
  77890. '။': '.',
  77891. // currency
  77892. '$': 'USD',
  77893. '€': 'EUR',
  77894. '₢': 'BRN',
  77895. '₣': 'FRF',
  77896. '£': 'GBP',
  77897. '₤': 'ITL',
  77898. '₦': 'NGN',
  77899. '₧': 'ESP',
  77900. '₩': 'KRW',
  77901. '₪': 'ILS',
  77902. '₫': 'VND',
  77903. '₭': 'LAK',
  77904. '₮': 'MNT',
  77905. '₯': 'GRD',
  77906. '₱': 'ARS',
  77907. '₲': 'PYG',
  77908. '₳': 'ARA',
  77909. '₴': 'UAH',
  77910. '₵': 'GHS',
  77911. '¢': 'cent',
  77912. '¥': 'CNY',
  77913. '元': 'CNY',
  77914. '円': 'YEN',
  77915. '﷼': 'IRR',
  77916. '₠': 'EWE',
  77917. '฿': 'THB',
  77918. '₨': 'INR',
  77919. '₹': 'INR',
  77920. '₰': 'PF',
  77921. '₺': 'TRY',
  77922. '؋': 'AFN',
  77923. '₼': 'AZN',
  77924. 'лв': 'BGN',
  77925. '៛': 'KHR',
  77926. '₡': 'CRC',
  77927. '₸': 'KZT',
  77928. 'ден': 'MKD',
  77929. 'zł': 'PLN',
  77930. '₽': 'RUB',
  77931. '₾': 'GEL'
  77932. };
  77933. /**
  77934. * special look ahead character array
  77935. * These characters form with consonants to become 'single'/consonant combo
  77936. * @type [Array]
  77937. */
  77938. var lookAheadCharArray = [
  77939. // burmese
  77940. '်',
  77941. // Dhivehi
  77942. 'ް'
  77943. ];
  77944. /**
  77945. * diatricMap for languages where transliteration changes entirely as more diatrics are added
  77946. * @type {Object}
  77947. */
  77948. var diatricMap = {
  77949. // Burmese
  77950. // dependent vowels
  77951. 'ာ': 'a',
  77952. 'ါ': 'a',
  77953. 'ေ': 'e',
  77954. 'ဲ': 'e',
  77955. 'ိ': 'i',
  77956. 'ီ': 'i',
  77957. 'ို': 'o',
  77958. 'ု': 'u',
  77959. 'ူ': 'u',
  77960. 'ေါင်': 'aung',
  77961. 'ော': 'aw',
  77962. 'ော်': 'aw',
  77963. 'ေါ': 'aw',
  77964. 'ေါ်': 'aw',
  77965. '်': '်', // this is special case but the character will be converted to latin in the code
  77966. 'က်': 'et',
  77967. 'ိုက်': 'aik',
  77968. 'ောက်': 'auk',
  77969. 'င်': 'in',
  77970. 'ိုင်': 'aing',
  77971. 'ောင်': 'aung',
  77972. 'စ်': 'it',
  77973. 'ည်': 'i',
  77974. 'တ်': 'at',
  77975. 'ိတ်': 'eik',
  77976. 'ုတ်': 'ok',
  77977. 'ွတ်': 'ut',
  77978. 'ေတ်': 'it',
  77979. 'ဒ်': 'd',
  77980. 'ိုဒ်': 'ok',
  77981. 'ုဒ်': 'ait',
  77982. 'န်': 'an',
  77983. 'ာန်': 'an',
  77984. 'ိန်': 'ein',
  77985. 'ုန်': 'on',
  77986. 'ွန်': 'un',
  77987. 'ပ်': 'at',
  77988. 'ိပ်': 'eik',
  77989. 'ုပ်': 'ok',
  77990. 'ွပ်': 'ut',
  77991. 'န်ုပ်': 'nub',
  77992. 'မ်': 'an',
  77993. 'ိမ်': 'ein',
  77994. 'ုမ်': 'on',
  77995. 'ွမ်': 'un',
  77996. 'ယ်': 'e',
  77997. 'ိုလ်': 'ol',
  77998. 'ဉ်': 'in',
  77999. 'ံ': 'an',
  78000. 'ိံ': 'ein',
  78001. 'ုံ': 'on',
  78002. // Dhivehi
  78003. 'ައް': 'ah',
  78004. 'ަށް': 'ah'
  78005. };
  78006. /**
  78007. * langCharMap language specific characters translations
  78008. * @type {Object}
  78009. */
  78010. var langCharMap = {
  78011. 'en': {}, // default language
  78012. 'az': { // Azerbaijani
  78013. 'ç': 'c',
  78014. 'ə': 'e',
  78015. 'ğ': 'g',
  78016. 'ı': 'i',
  78017. 'ö': 'o',
  78018. 'ş': 's',
  78019. 'ü': 'u',
  78020. 'Ç': 'C',
  78021. 'Ə': 'E',
  78022. 'Ğ': 'G',
  78023. 'İ': 'I',
  78024. 'Ö': 'O',
  78025. 'Ş': 'S',
  78026. 'Ü': 'U'
  78027. },
  78028. 'cs': { // Czech
  78029. 'č': 'c',
  78030. 'ď': 'd',
  78031. 'ě': 'e',
  78032. 'ň': 'n',
  78033. 'ř': 'r',
  78034. 'š': 's',
  78035. 'ť': 't',
  78036. 'ů': 'u',
  78037. 'ž': 'z',
  78038. 'Č': 'C',
  78039. 'Ď': 'D',
  78040. 'Ě': 'E',
  78041. 'Ň': 'N',
  78042. 'Ř': 'R',
  78043. 'Š': 'S',
  78044. 'Ť': 'T',
  78045. 'Ů': 'U',
  78046. 'Ž': 'Z'
  78047. },
  78048. 'fi': { // Finnish
  78049. // 'å': 'a', duplicate see charMap/latin
  78050. // 'Å': 'A', duplicate see charMap/latin
  78051. 'ä': 'a', // ok
  78052. 'Ä': 'A', // ok
  78053. 'ö': 'o', // ok
  78054. 'Ö': 'O' // ok
  78055. },
  78056. 'hu': { // Hungarian
  78057. 'ä': 'a', // ok
  78058. 'Ä': 'A', // ok
  78059. // 'á': 'a', duplicate see charMap/latin
  78060. // 'Á': 'A', duplicate see charMap/latin
  78061. 'ö': 'o', // ok
  78062. 'Ö': 'O', // ok
  78063. // 'ő': 'o', duplicate see charMap/latin
  78064. // 'Ő': 'O', duplicate see charMap/latin
  78065. 'ü': 'u',
  78066. 'Ü': 'U',
  78067. 'ű': 'u',
  78068. 'Ű': 'U'
  78069. },
  78070. 'lt': { // Lithuanian
  78071. 'ą': 'a',
  78072. 'č': 'c',
  78073. 'ę': 'e',
  78074. 'ė': 'e',
  78075. 'į': 'i',
  78076. 'š': 's',
  78077. 'ų': 'u',
  78078. 'ū': 'u',
  78079. 'ž': 'z',
  78080. 'Ą': 'A',
  78081. 'Č': 'C',
  78082. 'Ę': 'E',
  78083. 'Ė': 'E',
  78084. 'Į': 'I',
  78085. 'Š': 'S',
  78086. 'Ų': 'U',
  78087. 'Ū': 'U'
  78088. },
  78089. 'lv': { // Latvian
  78090. 'ā': 'a',
  78091. 'č': 'c',
  78092. 'ē': 'e',
  78093. 'ģ': 'g',
  78094. 'ī': 'i',
  78095. 'ķ': 'k',
  78096. 'ļ': 'l',
  78097. 'ņ': 'n',
  78098. 'š': 's',
  78099. 'ū': 'u',
  78100. 'ž': 'z',
  78101. 'Ā': 'A',
  78102. 'Č': 'C',
  78103. 'Ē': 'E',
  78104. 'Ģ': 'G',
  78105. 'Ī': 'i',
  78106. 'Ķ': 'k',
  78107. 'Ļ': 'L',
  78108. 'Ņ': 'N',
  78109. 'Š': 'S',
  78110. 'Ū': 'u',
  78111. 'Ž': 'Z'
  78112. },
  78113. 'pl': { // Polish
  78114. 'ą': 'a',
  78115. 'ć': 'c',
  78116. 'ę': 'e',
  78117. 'ł': 'l',
  78118. 'ń': 'n',
  78119. 'ó': 'o',
  78120. 'ś': 's',
  78121. 'ź': 'z',
  78122. 'ż': 'z',
  78123. 'Ą': 'A',
  78124. 'Ć': 'C',
  78125. 'Ę': 'e',
  78126. 'Ł': 'L',
  78127. 'Ń': 'N',
  78128. 'Ó': 'O',
  78129. 'Ś': 'S',
  78130. 'Ź': 'Z',
  78131. 'Ż': 'Z'
  78132. },
  78133. 'sv': { // Swedish
  78134. // 'å': 'a', duplicate see charMap/latin
  78135. // 'Å': 'A', duplicate see charMap/latin
  78136. 'ä': 'a', // ok
  78137. 'Ä': 'A', // ok
  78138. 'ö': 'o', // ok
  78139. 'Ö': 'O' // ok
  78140. },
  78141. 'sk': { // Slovak
  78142. 'ä': 'a',
  78143. 'Ä': 'A'
  78144. },
  78145. 'sr': { // Serbian
  78146. 'љ': 'lj',
  78147. 'њ': 'nj',
  78148. 'Љ': 'Lj',
  78149. 'Њ': 'Nj',
  78150. 'đ': 'dj',
  78151. 'Đ': 'Dj'
  78152. },
  78153. 'tr': { // Turkish
  78154. 'Ü': 'U',
  78155. 'Ö': 'O',
  78156. 'ü': 'u',
  78157. 'ö': 'o'
  78158. }
  78159. };
  78160. /**
  78161. * symbolMap language specific symbol translations
  78162. * translations must be transliterated already
  78163. * @type {Object}
  78164. */
  78165. var symbolMap = {
  78166. 'ar': {
  78167. '∆': 'delta',
  78168. '∞': 'la-nihaya',
  78169. '♥': 'hob',
  78170. '&': 'wa',
  78171. '|': 'aw',
  78172. '<': 'aqal-men',
  78173. '>': 'akbar-men',
  78174. '∑': 'majmou',
  78175. '¤': 'omla'
  78176. },
  78177. 'az': {},
  78178. 'ca': {
  78179. '∆': 'delta',
  78180. '∞': 'infinit',
  78181. '♥': 'amor',
  78182. '&': 'i',
  78183. '|': 'o',
  78184. '<': 'menys que',
  78185. '>': 'mes que',
  78186. '∑': 'suma dels',
  78187. '¤': 'moneda'
  78188. },
  78189. 'cs': {
  78190. '∆': 'delta',
  78191. '∞': 'nekonecno',
  78192. '♥': 'laska',
  78193. '&': 'a',
  78194. '|': 'nebo',
  78195. '<': 'mensi nez',
  78196. '>': 'vetsi nez',
  78197. '∑': 'soucet',
  78198. '¤': 'mena'
  78199. },
  78200. 'de': {
  78201. '∆': 'delta',
  78202. '∞': 'unendlich',
  78203. '♥': 'Liebe',
  78204. '&': 'und',
  78205. '|': 'oder',
  78206. '<': 'kleiner als',
  78207. '>': 'groesser als',
  78208. '∑': 'Summe von',
  78209. '¤': 'Waehrung'
  78210. },
  78211. 'dv': {
  78212. '∆': 'delta',
  78213. '∞': 'kolunulaa',
  78214. '♥': 'loabi',
  78215. '&': 'aai',
  78216. '|': 'noonee',
  78217. '<': 'ah vure kuda',
  78218. '>': 'ah vure bodu',
  78219. '∑': 'jumula',
  78220. '¤': 'faisaa'
  78221. },
  78222. 'en': {
  78223. '∆': 'delta',
  78224. '∞': 'infinity',
  78225. '♥': 'love',
  78226. '&': 'and',
  78227. '|': 'or',
  78228. '<': 'less than',
  78229. '>': 'greater than',
  78230. '∑': 'sum',
  78231. '¤': 'currency'
  78232. },
  78233. 'es': {
  78234. '∆': 'delta',
  78235. '∞': 'infinito',
  78236. '♥': 'amor',
  78237. '&': 'y',
  78238. '|': 'u',
  78239. '<': 'menos que',
  78240. '>': 'mas que',
  78241. '∑': 'suma de los',
  78242. '¤': 'moneda'
  78243. },
  78244. 'fa': {
  78245. '∆': 'delta',
  78246. '∞': 'bi-nahayat',
  78247. '♥': 'eshgh',
  78248. '&': 'va',
  78249. '|': 'ya',
  78250. '<': 'kamtar-az',
  78251. '>': 'bishtar-az',
  78252. '∑': 'majmooe',
  78253. '¤': 'vahed'
  78254. },
  78255. 'fi': {
  78256. '∆': 'delta',
  78257. '∞': 'aarettomyys',
  78258. '♥': 'rakkaus',
  78259. '&': 'ja',
  78260. '|': 'tai',
  78261. '<': 'pienempi kuin',
  78262. '>': 'suurempi kuin',
  78263. '∑': 'summa',
  78264. '¤': 'valuutta'
  78265. },
  78266. 'fr': {
  78267. '∆': 'delta',
  78268. '∞': 'infiniment',
  78269. '♥': 'Amour',
  78270. '&': 'et',
  78271. '|': 'ou',
  78272. '<': 'moins que',
  78273. '>': 'superieure a',
  78274. '∑': 'somme des',
  78275. '¤': 'monnaie'
  78276. },
  78277. 'ge': {
  78278. '∆': 'delta',
  78279. '∞': 'usasruloba',
  78280. '♥': 'siqvaruli',
  78281. '&': 'da',
  78282. '|': 'an',
  78283. '<': 'naklebi',
  78284. '>': 'meti',
  78285. '∑': 'jami',
  78286. '¤': 'valuta'
  78287. },
  78288. 'gr': {},
  78289. 'hu': {
  78290. '∆': 'delta',
  78291. '∞': 'vegtelen',
  78292. '♥': 'szerelem',
  78293. '&': 'es',
  78294. '|': 'vagy',
  78295. '<': 'kisebb mint',
  78296. '>': 'nagyobb mint',
  78297. '∑': 'szumma',
  78298. '¤': 'penznem'
  78299. },
  78300. 'it': {
  78301. '∆': 'delta',
  78302. '∞': 'infinito',
  78303. '♥': 'amore',
  78304. '&': 'e',
  78305. '|': 'o',
  78306. '<': 'minore di',
  78307. '>': 'maggiore di',
  78308. '∑': 'somma',
  78309. '¤': 'moneta'
  78310. },
  78311. 'lt': {
  78312. '∆': 'delta',
  78313. '∞': 'begalybe',
  78314. '♥': 'meile',
  78315. '&': 'ir',
  78316. '|': 'ar',
  78317. '<': 'maziau nei',
  78318. '>': 'daugiau nei',
  78319. '∑': 'suma',
  78320. '¤': 'valiuta'
  78321. },
  78322. 'lv': {
  78323. '∆': 'delta',
  78324. '∞': 'bezgaliba',
  78325. '♥': 'milestiba',
  78326. '&': 'un',
  78327. '|': 'vai',
  78328. '<': 'mazak neka',
  78329. '>': 'lielaks neka',
  78330. '∑': 'summa',
  78331. '¤': 'valuta'
  78332. },
  78333. 'my': {
  78334. '∆': 'kwahkhyaet',
  78335. '∞': 'asaonasme',
  78336. '♥': 'akhyait',
  78337. '&': 'nhin',
  78338. '|': 'tho',
  78339. '<': 'ngethaw',
  78340. '>': 'kyithaw',
  78341. '∑': 'paungld',
  78342. '¤': 'ngwekye'
  78343. },
  78344. 'mk': {},
  78345. 'nl': {
  78346. '∆': 'delta',
  78347. '∞': 'oneindig',
  78348. '♥': 'liefde',
  78349. '&': 'en',
  78350. '|': 'of',
  78351. '<': 'kleiner dan',
  78352. '>': 'groter dan',
  78353. '∑': 'som',
  78354. '¤': 'valuta'
  78355. },
  78356. 'pl': {
  78357. '∆': 'delta',
  78358. '∞': 'nieskonczonosc',
  78359. '♥': 'milosc',
  78360. '&': 'i',
  78361. '|': 'lub',
  78362. '<': 'mniejsze niz',
  78363. '>': 'wieksze niz',
  78364. '∑': 'suma',
  78365. '¤': 'waluta'
  78366. },
  78367. 'pt': {
  78368. '∆': 'delta',
  78369. '∞': 'infinito',
  78370. '♥': 'amor',
  78371. '&': 'e',
  78372. '|': 'ou',
  78373. '<': 'menor que',
  78374. '>': 'maior que',
  78375. '∑': 'soma',
  78376. '¤': 'moeda'
  78377. },
  78378. 'ro': {
  78379. '∆': 'delta',
  78380. '∞': 'infinit',
  78381. '♥': 'dragoste',
  78382. '&': 'si',
  78383. '|': 'sau',
  78384. '<': 'mai mic ca',
  78385. '>': 'mai mare ca',
  78386. '∑': 'suma',
  78387. '¤': 'valuta'
  78388. },
  78389. 'ru': {
  78390. '∆': 'delta',
  78391. '∞': 'beskonechno',
  78392. '♥': 'lubov',
  78393. '&': 'i',
  78394. '|': 'ili',
  78395. '<': 'menshe',
  78396. '>': 'bolshe',
  78397. '∑': 'summa',
  78398. '¤': 'valjuta'
  78399. },
  78400. 'sk': {
  78401. '∆': 'delta',
  78402. '∞': 'nekonecno',
  78403. '♥': 'laska',
  78404. '&': 'a',
  78405. '|': 'alebo',
  78406. '<': 'menej ako',
  78407. '>': 'viac ako',
  78408. '∑': 'sucet',
  78409. '¤': 'mena'
  78410. },
  78411. 'sr': {},
  78412. 'tr': {
  78413. '∆': 'delta',
  78414. '∞': 'sonsuzluk',
  78415. '♥': 'ask',
  78416. '&': 've',
  78417. '|': 'veya',
  78418. '<': 'kucuktur',
  78419. '>': 'buyuktur',
  78420. '∑': 'toplam',
  78421. '¤': 'para birimi'
  78422. },
  78423. 'uk': {
  78424. '∆': 'delta',
  78425. '∞': 'bezkinechnist',
  78426. '♥': 'lubov',
  78427. '&': 'i',
  78428. '|': 'abo',
  78429. '<': 'menshe',
  78430. '>': 'bilshe',
  78431. '∑': 'suma',
  78432. '¤': 'valjuta'
  78433. },
  78434. 'vn': {
  78435. '∆': 'delta',
  78436. '∞': 'vo cuc',
  78437. '♥': 'yeu',
  78438. '&': 'va',
  78439. '|': 'hoac',
  78440. '<': 'nho hon',
  78441. '>': 'lon hon',
  78442. '∑': 'tong',
  78443. '¤': 'tien te'
  78444. }
  78445. };
  78446. var uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'].join('');
  78447. var uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','].join('');
  78448. var markChars = ['.', '!', '~', '*', "'", '(', ')'].join('');
  78449. /**
  78450. * getSlug
  78451. * @param {string} input input string
  78452. * @param {object|string} opts config object or separator string/char
  78453. * @api public
  78454. * @return {string} sluggified string
  78455. */
  78456. var getSlug = function getSlug(input, opts) {
  78457. var separator = '-';
  78458. var result = '';
  78459. var diatricString = '';
  78460. var convertSymbols = true;
  78461. var customReplacements = {};
  78462. var maintainCase;
  78463. var titleCase;
  78464. var truncate;
  78465. var uricFlag;
  78466. var uricNoSlashFlag;
  78467. var markFlag;
  78468. var symbol;
  78469. var langChar;
  78470. var lucky;
  78471. var i;
  78472. var ch;
  78473. var l;
  78474. var lastCharWasSymbol;
  78475. var lastCharWasDiatric;
  78476. var allowedChars = '';
  78477. if (typeof input !== 'string') {
  78478. return '';
  78479. }
  78480. if (typeof opts === 'string') {
  78481. separator = opts;
  78482. }
  78483. symbol = symbolMap.en;
  78484. langChar = langCharMap.en;
  78485. if (typeof opts === 'object') {
  78486. maintainCase = opts.maintainCase || false;
  78487. customReplacements = (opts.custom && typeof opts.custom === 'object') ? opts.custom : customReplacements;
  78488. truncate = (+opts.truncate > 1 && opts.truncate) || false;
  78489. uricFlag = opts.uric || false;
  78490. uricNoSlashFlag = opts.uricNoSlash || false;
  78491. markFlag = opts.mark || false;
  78492. convertSymbols = (opts.symbols === false || opts.lang === false) ? false : true;
  78493. separator = opts.separator || separator;
  78494. if (uricFlag) {
  78495. allowedChars += uricChars;
  78496. }
  78497. if (uricNoSlashFlag) {
  78498. allowedChars += uricNoSlashChars;
  78499. }
  78500. if (markFlag) {
  78501. allowedChars += markChars;
  78502. }
  78503. symbol = (opts.lang && symbolMap[opts.lang] && convertSymbols) ?
  78504. symbolMap[opts.lang] : (convertSymbols ? symbolMap.en : {});
  78505. langChar = (opts.lang && langCharMap[opts.lang]) ?
  78506. langCharMap[opts.lang] :
  78507. opts.lang === false || opts.lang === true ? {} : langCharMap.en;
  78508. // if titleCase config is an Array, rewrite to object format
  78509. if (opts.titleCase && typeof opts.titleCase.length === 'number' && Array.prototype.toString.call(opts.titleCase)) {
  78510. opts.titleCase.forEach(function (v) {
  78511. customReplacements[v + ''] = v + '';
  78512. });
  78513. titleCase = true;
  78514. } else {
  78515. titleCase = !!opts.titleCase;
  78516. }
  78517. // if custom config is an Array, rewrite to object format
  78518. if (opts.custom && typeof opts.custom.length === 'number' && Array.prototype.toString.call(opts.custom)) {
  78519. opts.custom.forEach(function (v) {
  78520. customReplacements[v + ''] = v + '';
  78521. });
  78522. }
  78523. // custom replacements
  78524. Object.keys(customReplacements).forEach(function (v) {
  78525. var r;
  78526. if (v.length > 1) {
  78527. r = new RegExp('\\b' + escapeChars(v) + '\\b', 'gi');
  78528. } else {
  78529. r = new RegExp(escapeChars(v), 'gi');
  78530. }
  78531. input = input.replace(r, customReplacements[v]);
  78532. });
  78533. // add all custom replacement to allowed charlist
  78534. for (ch in customReplacements) {
  78535. allowedChars += ch;
  78536. }
  78537. }
  78538. allowedChars += separator;
  78539. // escape all necessary chars
  78540. allowedChars = escapeChars(allowedChars);
  78541. // trim whitespaces
  78542. input = input.replace(/(^\s+|\s+$)/g, '');
  78543. lastCharWasSymbol = false;
  78544. lastCharWasDiatric = false;
  78545. for (i = 0, l = input.length; i < l; i++) {
  78546. ch = input[i];
  78547. if (isReplacedCustomChar(ch, customReplacements)) {
  78548. // don't convert a already converted char
  78549. lastCharWasSymbol = false;
  78550. } else if (langChar[ch]) {
  78551. // process language specific diactrics chars conversion
  78552. ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? ' ' + langChar[ch] : langChar[ch];
  78553. lastCharWasSymbol = false;
  78554. } else if (ch in charMap) {
  78555. // the transliteration changes entirely when some special characters are added
  78556. if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
  78557. diatricString += ch;
  78558. ch = '';
  78559. } else if (lastCharWasDiatric === true) {
  78560. ch = diatricMap[diatricString] + charMap[ch];
  78561. diatricString = '';
  78562. } else {
  78563. // process diactrics chars
  78564. ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? ' ' + charMap[ch] : charMap[ch];
  78565. }
  78566. lastCharWasSymbol = false;
  78567. lastCharWasDiatric = false;
  78568. } else if (ch in diatricMap) {
  78569. diatricString += ch;
  78570. ch = '';
  78571. // end of string, put the whole meaningful word
  78572. if (i === l - 1) {
  78573. ch = diatricMap[diatricString];
  78574. }
  78575. lastCharWasDiatric = true;
  78576. } else if (
  78577. // process symbol chars
  78578. symbol[ch] && !(uricFlag && uricChars
  78579. .indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars
  78580. // .indexOf(ch) !== -1) && !(markFlag && markChars
  78581. .indexOf(ch) !== -1)) {
  78582. ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
  78583. ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : '';
  78584. lastCharWasSymbol = true;
  78585. } else {
  78586. if (lastCharWasDiatric === true) {
  78587. ch = diatricMap[diatricString] + ch;
  78588. diatricString = '';
  78589. lastCharWasDiatric = false;
  78590. } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) {
  78591. // process latin chars
  78592. ch = ' ' + ch;
  78593. }
  78594. lastCharWasSymbol = false;
  78595. }
  78596. // add allowed chars
  78597. result += ch.replace(new RegExp('[^\\w\\s' + allowedChars + '_-]', 'g'), separator);
  78598. }
  78599. if (titleCase) {
  78600. result = result.replace(/(\w)(\S*)/g, function (_, i, r) {
  78601. var j = i.toUpperCase() + (r !== null ? r : '');
  78602. return (Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0) ? j : j.toLowerCase();
  78603. });
  78604. }
  78605. // eliminate duplicate separators
  78606. // add separator
  78607. // trim separators from start and end
  78608. result = result.replace(/\s+/g, separator)
  78609. .replace(new RegExp('\\' + separator + '+', 'g'), separator)
  78610. .replace(new RegExp('(^\\' + separator + '+|\\' + separator + '+$)', 'g'), '');
  78611. if (truncate && result.length > truncate) {
  78612. lucky = result.charAt(truncate) === separator;
  78613. result = result.slice(0, truncate);
  78614. if (!lucky) {
  78615. result = result.slice(0, result.lastIndexOf(separator));
  78616. }
  78617. }
  78618. if (!maintainCase && !titleCase) {
  78619. result = result.toLowerCase();
  78620. }
  78621. return result;
  78622. };
  78623. /**
  78624. * createSlug curried(opts)(input)
  78625. * @param {object|string} opts config object or input string
  78626. * @return {Function} function getSlugWithConfig()
  78627. **/
  78628. var createSlug = function createSlug(opts) {
  78629. /**
  78630. * getSlugWithConfig
  78631. * @param {string} input string
  78632. * @return {string} slug string
  78633. */
  78634. return function getSlugWithConfig(input) {
  78635. return getSlug(input, opts);
  78636. };
  78637. };
  78638. /**
  78639. * escape Chars
  78640. * @param {string} input string
  78641. */
  78642. var escapeChars = function escapeChars(input) {
  78643. return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, '\\$&');
  78644. };
  78645. /**
  78646. * check if the char is an already converted char from custom list
  78647. * @param {char} ch character to check
  78648. * @param {object} customReplacements custom translation map
  78649. */
  78650. var isReplacedCustomChar = function (ch, customReplacements) {
  78651. for (var c in customReplacements) {
  78652. if (customReplacements[c] === ch) {
  78653. return true;
  78654. }
  78655. }
  78656. };
  78657. if ( true && module.exports) {
  78658. // export functions for use in Node
  78659. module.exports = getSlug;
  78660. module.exports.createSlug = createSlug;
  78661. } else if (true) {
  78662. // export function for use in AMD
  78663. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  78664. return getSlug;
  78665. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  78666. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  78667. } else {}
  78668. })(this);
  78669. /***/ }),
  78670. /***/ 46226:
  78671. /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
  78672. "use strict";
  78673. /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93379);
  78674. /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  78675. /* harmony import */ var _css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39735);
  78676. var options = {};
  78677. options.insert = "head";
  78678. options.singleton = false;
  78679. var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_1__/* .default */ .Z, options);
  78680. /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_1__/* .default.locals */ .Z.locals || {});
  78681. /***/ }),
  78682. /***/ 93379:
  78683. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  78684. "use strict";
  78685. var isOldIE = function isOldIE() {
  78686. var memo;
  78687. return function memorize() {
  78688. if (typeof memo === 'undefined') {
  78689. // Test for IE <= 9 as proposed by Browserhacks
  78690. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  78691. // Tests for existence of standard globals is to allow style-loader
  78692. // to operate correctly into non-standard environments
  78693. // @see https://github.com/webpack-contrib/style-loader/issues/177
  78694. memo = Boolean(window && document && document.all && !window.atob);
  78695. }
  78696. return memo;
  78697. };
  78698. }();
  78699. var getTarget = function getTarget() {
  78700. var memo = {};
  78701. return function memorize(target) {
  78702. if (typeof memo[target] === 'undefined') {
  78703. var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
  78704. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  78705. try {
  78706. // This will throw an exception if access to iframe is blocked
  78707. // due to cross-origin restrictions
  78708. styleTarget = styleTarget.contentDocument.head;
  78709. } catch (e) {
  78710. // istanbul ignore next
  78711. styleTarget = null;
  78712. }
  78713. }
  78714. memo[target] = styleTarget;
  78715. }
  78716. return memo[target];
  78717. };
  78718. }();
  78719. var stylesInDom = [];
  78720. function getIndexByIdentifier(identifier) {
  78721. var result = -1;
  78722. for (var i = 0; i < stylesInDom.length; i++) {
  78723. if (stylesInDom[i].identifier === identifier) {
  78724. result = i;
  78725. break;
  78726. }
  78727. }
  78728. return result;
  78729. }
  78730. function modulesToDom(list, options) {
  78731. var idCountMap = {};
  78732. var identifiers = [];
  78733. for (var i = 0; i < list.length; i++) {
  78734. var item = list[i];
  78735. var id = options.base ? item[0] + options.base : item[0];
  78736. var count = idCountMap[id] || 0;
  78737. var identifier = "".concat(id, " ").concat(count);
  78738. idCountMap[id] = count + 1;
  78739. var index = getIndexByIdentifier(identifier);
  78740. var obj = {
  78741. css: item[1],
  78742. media: item[2],
  78743. sourceMap: item[3]
  78744. };
  78745. if (index !== -1) {
  78746. stylesInDom[index].references++;
  78747. stylesInDom[index].updater(obj);
  78748. } else {
  78749. stylesInDom.push({
  78750. identifier: identifier,
  78751. updater: addStyle(obj, options),
  78752. references: 1
  78753. });
  78754. }
  78755. identifiers.push(identifier);
  78756. }
  78757. return identifiers;
  78758. }
  78759. function insertStyleElement(options) {
  78760. var style = document.createElement('style');
  78761. var attributes = options.attributes || {};
  78762. if (typeof attributes.nonce === 'undefined') {
  78763. var nonce = true ? __webpack_require__.nc : 0;
  78764. if (nonce) {
  78765. attributes.nonce = nonce;
  78766. }
  78767. }
  78768. Object.keys(attributes).forEach(function (key) {
  78769. style.setAttribute(key, attributes[key]);
  78770. });
  78771. if (typeof options.insert === 'function') {
  78772. options.insert(style);
  78773. } else {
  78774. var target = getTarget(options.insert || 'head');
  78775. if (!target) {
  78776. throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  78777. }
  78778. target.appendChild(style);
  78779. }
  78780. return style;
  78781. }
  78782. function removeStyleElement(style) {
  78783. // istanbul ignore if
  78784. if (style.parentNode === null) {
  78785. return false;
  78786. }
  78787. style.parentNode.removeChild(style);
  78788. }
  78789. /* istanbul ignore next */
  78790. var replaceText = function replaceText() {
  78791. var textStore = [];
  78792. return function replace(index, replacement) {
  78793. textStore[index] = replacement;
  78794. return textStore.filter(Boolean).join('\n');
  78795. };
  78796. }();
  78797. function applyToSingletonTag(style, index, remove, obj) {
  78798. var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE
  78799. /* istanbul ignore if */
  78800. if (style.styleSheet) {
  78801. style.styleSheet.cssText = replaceText(index, css);
  78802. } else {
  78803. var cssNode = document.createTextNode(css);
  78804. var childNodes = style.childNodes;
  78805. if (childNodes[index]) {
  78806. style.removeChild(childNodes[index]);
  78807. }
  78808. if (childNodes.length) {
  78809. style.insertBefore(cssNode, childNodes[index]);
  78810. } else {
  78811. style.appendChild(cssNode);
  78812. }
  78813. }
  78814. }
  78815. function applyToTag(style, options, obj) {
  78816. var css = obj.css;
  78817. var media = obj.media;
  78818. var sourceMap = obj.sourceMap;
  78819. if (media) {
  78820. style.setAttribute('media', media);
  78821. } else {
  78822. style.removeAttribute('media');
  78823. }
  78824. if (sourceMap && typeof btoa !== 'undefined') {
  78825. css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  78826. } // For old IE
  78827. /* istanbul ignore if */
  78828. if (style.styleSheet) {
  78829. style.styleSheet.cssText = css;
  78830. } else {
  78831. while (style.firstChild) {
  78832. style.removeChild(style.firstChild);
  78833. }
  78834. style.appendChild(document.createTextNode(css));
  78835. }
  78836. }
  78837. var singleton = null;
  78838. var singletonCounter = 0;
  78839. function addStyle(obj, options) {
  78840. var style;
  78841. var update;
  78842. var remove;
  78843. if (options.singleton) {
  78844. var styleIndex = singletonCounter++;
  78845. style = singleton || (singleton = insertStyleElement(options));
  78846. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  78847. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  78848. } else {
  78849. style = insertStyleElement(options);
  78850. update = applyToTag.bind(null, style, options);
  78851. remove = function remove() {
  78852. removeStyleElement(style);
  78853. };
  78854. }
  78855. update(obj);
  78856. return function updateStyle(newObj) {
  78857. if (newObj) {
  78858. if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
  78859. return;
  78860. }
  78861. update(obj = newObj);
  78862. } else {
  78863. remove();
  78864. }
  78865. };
  78866. }
  78867. module.exports = function (list, options) {
  78868. options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  78869. // tags it will allow on a page
  78870. if (!options.singleton && typeof options.singleton !== 'boolean') {
  78871. options.singleton = isOldIE();
  78872. }
  78873. list = list || [];
  78874. var lastIdentifiers = modulesToDom(list, options);
  78875. return function update(newList) {
  78876. newList = newList || [];
  78877. if (Object.prototype.toString.call(newList) !== '[object Array]') {
  78878. return;
  78879. }
  78880. for (var i = 0; i < lastIdentifiers.length; i++) {
  78881. var identifier = lastIdentifiers[i];
  78882. var index = getIndexByIdentifier(identifier);
  78883. stylesInDom[index].references--;
  78884. }
  78885. var newLastIdentifiers = modulesToDom(newList, options);
  78886. for (var _i = 0; _i < lastIdentifiers.length; _i++) {
  78887. var _identifier = lastIdentifiers[_i];
  78888. var _index = getIndexByIdentifier(_identifier);
  78889. if (stylesInDom[_index].references === 0) {
  78890. stylesInDom[_index].updater();
  78891. stylesInDom.splice(_index, 1);
  78892. }
  78893. }
  78894. lastIdentifiers = newLastIdentifiers;
  78895. };
  78896. };
  78897. /***/ }),
  78898. /***/ 8901:
  78899. /***/ ((module, exports, __webpack_require__) => {
  78900. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
  78901. * Toastr
  78902. * Copyright 2012-2015
  78903. * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.
  78904. * All Rights Reserved.
  78905. * Use, reproduction, distribution, and modification of this code is subject to the terms and
  78906. * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
  78907. *
  78908. * ARIA Support: Greta Krafsig
  78909. *
  78910. * Project: https://github.com/CodeSeven/toastr
  78911. */
  78912. /* global define */
  78913. (function (define) {
  78914. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(73609)], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($) {
  78915. return (function () {
  78916. var $container;
  78917. var listener;
  78918. var toastId = 0;
  78919. var toastType = {
  78920. error: 'error',
  78921. info: 'info',
  78922. success: 'success',
  78923. warning: 'warning'
  78924. };
  78925. var toastr = {
  78926. clear: clear,
  78927. remove: remove,
  78928. error: error,
  78929. getContainer: getContainer,
  78930. info: info,
  78931. options: {},
  78932. subscribe: subscribe,
  78933. success: success,
  78934. version: '2.1.4',
  78935. warning: warning
  78936. };
  78937. var previousToast;
  78938. return toastr;
  78939. ////////////////
  78940. function error(message, title, optionsOverride) {
  78941. return notify({
  78942. type: toastType.error,
  78943. iconClass: getOptions().iconClasses.error,
  78944. message: message,
  78945. optionsOverride: optionsOverride,
  78946. title: title
  78947. });
  78948. }
  78949. function getContainer(options, create) {
  78950. if (!options) { options = getOptions(); }
  78951. $container = $('#' + options.containerId);
  78952. if ($container.length) {
  78953. return $container;
  78954. }
  78955. if (create) {
  78956. $container = createContainer(options);
  78957. }
  78958. return $container;
  78959. }
  78960. function info(message, title, optionsOverride) {
  78961. return notify({
  78962. type: toastType.info,
  78963. iconClass: getOptions().iconClasses.info,
  78964. message: message,
  78965. optionsOverride: optionsOverride,
  78966. title: title
  78967. });
  78968. }
  78969. function subscribe(callback) {
  78970. listener = callback;
  78971. }
  78972. function success(message, title, optionsOverride) {
  78973. return notify({
  78974. type: toastType.success,
  78975. iconClass: getOptions().iconClasses.success,
  78976. message: message,
  78977. optionsOverride: optionsOverride,
  78978. title: title
  78979. });
  78980. }
  78981. function warning(message, title, optionsOverride) {
  78982. return notify({
  78983. type: toastType.warning,
  78984. iconClass: getOptions().iconClasses.warning,
  78985. message: message,
  78986. optionsOverride: optionsOverride,
  78987. title: title
  78988. });
  78989. }
  78990. function clear($toastElement, clearOptions) {
  78991. var options = getOptions();
  78992. if (!$container) { getContainer(options); }
  78993. if (!clearToast($toastElement, options, clearOptions)) {
  78994. clearContainer(options);
  78995. }
  78996. }
  78997. function remove($toastElement) {
  78998. var options = getOptions();
  78999. if (!$container) { getContainer(options); }
  79000. if ($toastElement && $(':focus', $toastElement).length === 0) {
  79001. removeToast($toastElement);
  79002. return;
  79003. }
  79004. if ($container.children().length) {
  79005. $container.remove();
  79006. }
  79007. }
  79008. // internal functions
  79009. function clearContainer (options) {
  79010. var toastsToClear = $container.children();
  79011. for (var i = toastsToClear.length - 1; i >= 0; i--) {
  79012. clearToast($(toastsToClear[i]), options);
  79013. }
  79014. }
  79015. function clearToast ($toastElement, options, clearOptions) {
  79016. var force = clearOptions && clearOptions.force ? clearOptions.force : false;
  79017. if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {
  79018. $toastElement[options.hideMethod]({
  79019. duration: options.hideDuration,
  79020. easing: options.hideEasing,
  79021. complete: function () { removeToast($toastElement); }
  79022. });
  79023. return true;
  79024. }
  79025. return false;
  79026. }
  79027. function createContainer(options) {
  79028. $container = $('<div/>')
  79029. .attr('id', options.containerId)
  79030. .addClass(options.positionClass);
  79031. $container.appendTo($(options.target));
  79032. return $container;
  79033. }
  79034. function getDefaults() {
  79035. return {
  79036. tapToDismiss: true,
  79037. toastClass: 'toast',
  79038. containerId: 'toast-container',
  79039. debug: false,
  79040. showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
  79041. showDuration: 300,
  79042. showEasing: 'swing', //swing and linear are built into jQuery
  79043. onShown: undefined,
  79044. hideMethod: 'fadeOut',
  79045. hideDuration: 1000,
  79046. hideEasing: 'swing',
  79047. onHidden: undefined,
  79048. closeMethod: false,
  79049. closeDuration: false,
  79050. closeEasing: false,
  79051. closeOnHover: true,
  79052. extendedTimeOut: 1000,
  79053. iconClasses: {
  79054. error: 'toast-error',
  79055. info: 'toast-info',
  79056. success: 'toast-success',
  79057. warning: 'toast-warning'
  79058. },
  79059. iconClass: 'toast-info',
  79060. positionClass: 'toast-top-right',
  79061. timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky
  79062. titleClass: 'toast-title',
  79063. messageClass: 'toast-message',
  79064. escapeHtml: false,
  79065. target: 'body',
  79066. closeHtml: '<button type="button">&times;</button>',
  79067. closeClass: 'toast-close-button',
  79068. newestOnTop: true,
  79069. preventDuplicates: false,
  79070. progressBar: false,
  79071. progressClass: 'toast-progress',
  79072. rtl: false
  79073. };
  79074. }
  79075. function publish(args) {
  79076. if (!listener) { return; }
  79077. listener(args);
  79078. }
  79079. function notify(map) {
  79080. var options = getOptions();
  79081. var iconClass = map.iconClass || options.iconClass;
  79082. if (typeof (map.optionsOverride) !== 'undefined') {
  79083. options = $.extend(options, map.optionsOverride);
  79084. iconClass = map.optionsOverride.iconClass || iconClass;
  79085. }
  79086. if (shouldExit(options, map)) { return; }
  79087. toastId++;
  79088. $container = getContainer(options, true);
  79089. var intervalId = null;
  79090. var $toastElement = $('<div/>');
  79091. var $titleElement = $('<div/>');
  79092. var $messageElement = $('<div/>');
  79093. var $progressElement = $('<div/>');
  79094. var $closeElement = $(options.closeHtml);
  79095. var progressBar = {
  79096. intervalId: null,
  79097. hideEta: null,
  79098. maxHideTime: null
  79099. };
  79100. var response = {
  79101. toastId: toastId,
  79102. state: 'visible',
  79103. startTime: new Date(),
  79104. options: options,
  79105. map: map
  79106. };
  79107. personalizeToast();
  79108. displayToast();
  79109. handleEvents();
  79110. publish(response);
  79111. if (options.debug && console) {
  79112. console.log(response);
  79113. }
  79114. return $toastElement;
  79115. function escapeHtml(source) {
  79116. if (source == null) {
  79117. source = '';
  79118. }
  79119. return source
  79120. .replace(/&/g, '&amp;')
  79121. .replace(/"/g, '&quot;')
  79122. .replace(/'/g, '&#39;')
  79123. .replace(/</g, '&lt;')
  79124. .replace(/>/g, '&gt;');
  79125. }
  79126. function personalizeToast() {
  79127. setIcon();
  79128. setTitle();
  79129. setMessage();
  79130. setCloseButton();
  79131. setProgressBar();
  79132. setRTL();
  79133. setSequence();
  79134. setAria();
  79135. }
  79136. function setAria() {
  79137. var ariaValue = '';
  79138. switch (map.iconClass) {
  79139. case 'toast-success':
  79140. case 'toast-info':
  79141. ariaValue = 'polite';
  79142. break;
  79143. default:
  79144. ariaValue = 'assertive';
  79145. }
  79146. $toastElement.attr('aria-live', ariaValue);
  79147. }
  79148. function handleEvents() {
  79149. if (options.closeOnHover) {
  79150. $toastElement.hover(stickAround, delayedHideToast);
  79151. }
  79152. if (!options.onclick && options.tapToDismiss) {
  79153. $toastElement.click(hideToast);
  79154. }
  79155. if (options.closeButton && $closeElement) {
  79156. $closeElement.click(function (event) {
  79157. if (event.stopPropagation) {
  79158. event.stopPropagation();
  79159. } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {
  79160. event.cancelBubble = true;
  79161. }
  79162. if (options.onCloseClick) {
  79163. options.onCloseClick(event);
  79164. }
  79165. hideToast(true);
  79166. });
  79167. }
  79168. if (options.onclick) {
  79169. $toastElement.click(function (event) {
  79170. options.onclick(event);
  79171. hideToast();
  79172. });
  79173. }
  79174. }
  79175. function displayToast() {
  79176. $toastElement.hide();
  79177. $toastElement[options.showMethod](
  79178. {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}
  79179. );
  79180. if (options.timeOut > 0) {
  79181. intervalId = setTimeout(hideToast, options.timeOut);
  79182. progressBar.maxHideTime = parseFloat(options.timeOut);
  79183. progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
  79184. if (options.progressBar) {
  79185. progressBar.intervalId = setInterval(updateProgress, 10);
  79186. }
  79187. }
  79188. }
  79189. function setIcon() {
  79190. if (map.iconClass) {
  79191. $toastElement.addClass(options.toastClass).addClass(iconClass);
  79192. }
  79193. }
  79194. function setSequence() {
  79195. if (options.newestOnTop) {
  79196. $container.prepend($toastElement);
  79197. } else {
  79198. $container.append($toastElement);
  79199. }
  79200. }
  79201. function setTitle() {
  79202. if (map.title) {
  79203. var suffix = map.title;
  79204. if (options.escapeHtml) {
  79205. suffix = escapeHtml(map.title);
  79206. }
  79207. $titleElement.append(suffix).addClass(options.titleClass);
  79208. $toastElement.append($titleElement);
  79209. }
  79210. }
  79211. function setMessage() {
  79212. if (map.message) {
  79213. var suffix = map.message;
  79214. if (options.escapeHtml) {
  79215. suffix = escapeHtml(map.message);
  79216. }
  79217. $messageElement.append(suffix).addClass(options.messageClass);
  79218. $toastElement.append($messageElement);
  79219. }
  79220. }
  79221. function setCloseButton() {
  79222. if (options.closeButton) {
  79223. $closeElement.addClass(options.closeClass).attr('role', 'button');
  79224. $toastElement.prepend($closeElement);
  79225. }
  79226. }
  79227. function setProgressBar() {
  79228. if (options.progressBar) {
  79229. $progressElement.addClass(options.progressClass);
  79230. $toastElement.prepend($progressElement);
  79231. }
  79232. }
  79233. function setRTL() {
  79234. if (options.rtl) {
  79235. $toastElement.addClass('rtl');
  79236. }
  79237. }
  79238. function shouldExit(options, map) {
  79239. if (options.preventDuplicates) {
  79240. if (map.message === previousToast) {
  79241. return true;
  79242. } else {
  79243. previousToast = map.message;
  79244. }
  79245. }
  79246. return false;
  79247. }
  79248. function hideToast(override) {
  79249. var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;
  79250. var duration = override && options.closeDuration !== false ?
  79251. options.closeDuration : options.hideDuration;
  79252. var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;
  79253. if ($(':focus', $toastElement).length && !override) {
  79254. return;
  79255. }
  79256. clearTimeout(progressBar.intervalId);
  79257. return $toastElement[method]({
  79258. duration: duration,
  79259. easing: easing,
  79260. complete: function () {
  79261. removeToast($toastElement);
  79262. clearTimeout(intervalId);
  79263. if (options.onHidden && response.state !== 'hidden') {
  79264. options.onHidden();
  79265. }
  79266. response.state = 'hidden';
  79267. response.endTime = new Date();
  79268. publish(response);
  79269. }
  79270. });
  79271. }
  79272. function delayedHideToast() {
  79273. if (options.timeOut > 0 || options.extendedTimeOut > 0) {
  79274. intervalId = setTimeout(hideToast, options.extendedTimeOut);
  79275. progressBar.maxHideTime = parseFloat(options.extendedTimeOut);
  79276. progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
  79277. }
  79278. }
  79279. function stickAround() {
  79280. clearTimeout(intervalId);
  79281. progressBar.hideEta = 0;
  79282. $toastElement.stop(true, true)[options.showMethod](
  79283. {duration: options.showDuration, easing: options.showEasing}
  79284. );
  79285. }
  79286. function updateProgress() {
  79287. var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;
  79288. $progressElement.width(percentage + '%');
  79289. }
  79290. }
  79291. function getOptions() {
  79292. return $.extend({}, getDefaults(), toastr.options);
  79293. }
  79294. function removeToast($toastElement) {
  79295. if (!$container) { $container = getContainer(); }
  79296. if ($toastElement.is(':visible')) {
  79297. return;
  79298. }
  79299. $toastElement.remove();
  79300. $toastElement = null;
  79301. if ($container.children().length === 0) {
  79302. $container.remove();
  79303. previousToast = undefined;
  79304. }
  79305. }
  79306. })();
  79307. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  79308. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  79309. }(__webpack_require__.amdD));
  79310. /***/ }),
  79311. /***/ 40372:
  79312. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79313. "use strict";
  79314. var isPrototype = __webpack_require__(36060);
  79315. module.exports = function (value) {
  79316. if (typeof value !== "function") return false;
  79317. if (!hasOwnProperty.call(value, "length")) return false;
  79318. try {
  79319. if (typeof value.length !== "number") return false;
  79320. if (typeof value.call !== "function") return false;
  79321. if (typeof value.apply !== "function") return false;
  79322. } catch (error) {
  79323. return false;
  79324. }
  79325. return !isPrototype(value);
  79326. };
  79327. /***/ }),
  79328. /***/ 83875:
  79329. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79330. "use strict";
  79331. var isValue = __webpack_require__(75618)
  79332. , isObject = __webpack_require__(13940)
  79333. , stringCoerce = __webpack_require__(84281)
  79334. , toShortString = __webpack_require__(17088);
  79335. var resolveMessage = function (message, value) {
  79336. return message.replace("%v", toShortString(value));
  79337. };
  79338. module.exports = function (value, defaultMessage, inputOptions) {
  79339. if (!isObject(inputOptions)) throw new TypeError(resolveMessage(defaultMessage, value));
  79340. if (!isValue(value)) {
  79341. if ("default" in inputOptions) return inputOptions["default"];
  79342. if (inputOptions.isOptional) return null;
  79343. }
  79344. var errorMessage = stringCoerce(inputOptions.errorMessage);
  79345. if (!isValue(errorMessage)) errorMessage = defaultMessage;
  79346. throw new TypeError(resolveMessage(errorMessage, value));
  79347. };
  79348. /***/ }),
  79349. /***/ 88237:
  79350. /***/ ((module) => {
  79351. "use strict";
  79352. module.exports = function (value) {
  79353. try {
  79354. return value.toString();
  79355. } catch (error) {
  79356. try { return String(value); }
  79357. catch (error2) { return null; }
  79358. }
  79359. };
  79360. /***/ }),
  79361. /***/ 17088:
  79362. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79363. "use strict";
  79364. var safeToString = __webpack_require__(88237);
  79365. var reNewLine = /[\n\r\u2028\u2029]/g;
  79366. module.exports = function (value) {
  79367. var string = safeToString(value);
  79368. if (string === null) return "<Non-coercible to string value>";
  79369. // Trim if too long
  79370. if (string.length > 100) string = string.slice(0, 99) + "…";
  79371. // Replace eventual new lines
  79372. string = string.replace(reNewLine, function (char) {
  79373. switch (char) {
  79374. case "\n":
  79375. return "\\n";
  79376. case "\r":
  79377. return "\\r";
  79378. case "\u2028":
  79379. return "\\u2028";
  79380. case "\u2029":
  79381. return "\\u2029";
  79382. /* istanbul ignore next */
  79383. default:
  79384. throw new Error("Unexpected character");
  79385. }
  79386. });
  79387. return string;
  79388. };
  79389. /***/ }),
  79390. /***/ 13940:
  79391. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79392. "use strict";
  79393. var isValue = __webpack_require__(75618);
  79394. // prettier-ignore
  79395. var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ };
  79396. module.exports = function (value) {
  79397. if (!isValue(value)) return false;
  79398. return hasOwnProperty.call(possibleTypes, typeof value);
  79399. };
  79400. /***/ }),
  79401. /***/ 81516:
  79402. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79403. "use strict";
  79404. var resolveException = __webpack_require__(83875)
  79405. , is = __webpack_require__(17205);
  79406. module.exports = function (value/*, options*/) {
  79407. if (is(value)) return value;
  79408. return resolveException(value, "%v is not a plain function", arguments[1]);
  79409. };
  79410. /***/ }),
  79411. /***/ 17205:
  79412. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79413. "use strict";
  79414. var isFunction = __webpack_require__(40372);
  79415. var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString;
  79416. module.exports = function (value) {
  79417. if (!isFunction(value)) return false;
  79418. if (classRe.test(functionToString.call(value))) return false;
  79419. return true;
  79420. };
  79421. /***/ }),
  79422. /***/ 36060:
  79423. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79424. "use strict";
  79425. var isObject = __webpack_require__(13940);
  79426. module.exports = function (value) {
  79427. if (!isObject(value)) return false;
  79428. try {
  79429. if (!value.constructor) return false;
  79430. return value.constructor.prototype === value;
  79431. } catch (error) {
  79432. return false;
  79433. }
  79434. };
  79435. /***/ }),
  79436. /***/ 84281:
  79437. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79438. "use strict";
  79439. var isValue = __webpack_require__(75618)
  79440. , isObject = __webpack_require__(13940);
  79441. var objectToString = Object.prototype.toString;
  79442. module.exports = function (value) {
  79443. if (!isValue(value)) return null;
  79444. if (isObject(value)) {
  79445. // Reject Object.prototype.toString coercion
  79446. var valueToString = value.toString;
  79447. if (typeof valueToString !== "function") return null;
  79448. if (valueToString === objectToString) return null;
  79449. // Note: It can be object coming from other realm, still as there's no ES3 and CSP compliant
  79450. // way to resolve its realm's Object.prototype.toString it's left as not addressed edge case
  79451. }
  79452. try {
  79453. return "" + value; // Ensure implicit coercion
  79454. } catch (error) {
  79455. return null;
  79456. }
  79457. };
  79458. /***/ }),
  79459. /***/ 55536:
  79460. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  79461. "use strict";
  79462. var resolveException = __webpack_require__(83875)
  79463. , is = __webpack_require__(75618);
  79464. module.exports = function (value/*, options*/) {
  79465. if (is(value)) return value;
  79466. return resolveException(value, "Cannot use %v", arguments[1]);
  79467. };
  79468. /***/ }),
  79469. /***/ 75618:
  79470. /***/ ((module) => {
  79471. "use strict";
  79472. // ES3 safe
  79473. var _undefined = void 0;
  79474. module.exports = function (value) { return value !== _undefined && value !== null; };
  79475. /***/ }),
  79476. /***/ 29950:
  79477. /***/ ((module) => {
  79478. "use strict";
  79479. /**
  79480. * DEVELOPED BY
  79481. * GIL LOPES BUENO
  79482. * gilbueno.mail@gmail.com
  79483. *
  79484. * WORKS WITH:
  79485. * IE 9+, FF 4+, SF 5+, WebKit, CH 7+, OP 12+, BESEN, Rhino 1.7+
  79486. *
  79487. * FORK:
  79488. * https://github.com/melanke/Watch.JS
  79489. */
  79490. (function (factory) {
  79491. if (true) {
  79492. // Node. Does not work with strict CommonJS, but
  79493. // only CommonJS-like enviroments that support module.exports,
  79494. // like Node.
  79495. module.exports = factory();
  79496. } else {}
  79497. }(function () {
  79498. var WatchJS = {
  79499. noMore: false
  79500. },
  79501. defineWatcher,
  79502. unwatchOne,
  79503. callWatchers;
  79504. var isFunction = function (functionToCheck) {
  79505. var getType = {};
  79506. return functionToCheck && getType.toString.call(functionToCheck) == '[object Function]';
  79507. };
  79508. var isInt = function (x) {
  79509. return x % 1 === 0;
  79510. };
  79511. var isArray = function(obj) {
  79512. return Object.prototype.toString.call(obj) === '[object Array]';
  79513. };
  79514. var isModernBrowser = function () {
  79515. return Object.defineProperty || Object.prototype.__defineGetter__;
  79516. };
  79517. var defineGetAndSet = function (obj, propName, getter, setter) {
  79518. try {
  79519. Object.defineProperty(obj, propName, {
  79520. get: getter,
  79521. set: setter,
  79522. enumerable: true,
  79523. configurable: true
  79524. });
  79525. } catch(error) {
  79526. try{
  79527. Object.prototype.__defineGetter__.call(obj, propName, getter);
  79528. Object.prototype.__defineSetter__.call(obj, propName, setter);
  79529. }catch(error2){
  79530. throw "watchJS error: browser not supported :/"
  79531. }
  79532. }
  79533. };
  79534. var defineProp = function (obj, propName, value) {
  79535. try {
  79536. Object.defineProperty(obj, propName, {
  79537. enumerable: false,
  79538. configurable: true,
  79539. writable: false,
  79540. value: value
  79541. });
  79542. } catch(error) {
  79543. obj[propName] = value;
  79544. }
  79545. };
  79546. var watch = function () {
  79547. if (isFunction(arguments[1])) {
  79548. watchAll.apply(this, arguments);
  79549. } else if (isArray(arguments[1])) {
  79550. watchMany.apply(this, arguments);
  79551. } else {
  79552. watchOne.apply(this, arguments);
  79553. }
  79554. };
  79555. var watchAll = function (obj, watcher, level) {
  79556. if (obj instanceof String || (!(obj instanceof Object) && !isArray(obj))) { //accepts only objects and array (not string)
  79557. return;
  79558. }
  79559. var props = [];
  79560. if(isArray(obj)) {
  79561. for (var prop = 0; prop < obj.length; prop++) { //for each item if obj is an array
  79562. props.push(prop); //put in the props
  79563. }
  79564. } else {
  79565. for (var prop2 in obj) { //for each attribute if obj is an object
  79566. props.push(prop2); //put in the props
  79567. }
  79568. }
  79569. watchMany(obj, props, watcher, level); //watch all itens of the props
  79570. };
  79571. var watchMany = function (obj, props, watcher, level) {
  79572. for (var prop in props) { //watch each attribute of "props" if is an object
  79573. watchOne(obj, props[prop], watcher, level);
  79574. }
  79575. };
  79576. var watchOne = function (obj, prop, watcher, level) {
  79577. if(isFunction(obj[prop])) { //dont watch if it is a function
  79578. return;
  79579. }
  79580. if(obj[prop] != null && (level === undefined || level > 0)){
  79581. if(level !== undefined){
  79582. level--;
  79583. }
  79584. watchAll(obj[prop], watcher, level); //recursively watch all attributes of this
  79585. }
  79586. defineWatcher(obj, prop, watcher);
  79587. };
  79588. var unwatch = function () {
  79589. if (isFunction(arguments[1])) {
  79590. unwatchAll.apply(this, arguments);
  79591. } else if (isArray(arguments[1])) {
  79592. unwatchMany.apply(this, arguments);
  79593. } else {
  79594. unwatchOne.apply(this, arguments);
  79595. }
  79596. };
  79597. var unwatchAll = function (obj, watcher) {
  79598. if (obj instanceof String || (!(obj instanceof Object) && !isArray(obj))) { //accepts only objects and array (not string)
  79599. return;
  79600. }
  79601. var props = [];
  79602. if (isArray(obj)) {
  79603. for (var prop = 0; prop < obj.length; prop++) { //for each item if obj is an array
  79604. props.push(prop); //put in the props
  79605. }
  79606. } else {
  79607. for (var prop2 in obj) { //for each attribute if obj is an object
  79608. props.push(prop2); //put in the props
  79609. }
  79610. }
  79611. unwatchMany(obj, props, watcher); //watch all itens of the props
  79612. };
  79613. var unwatchMany = function (obj, props, watcher) {
  79614. for (var prop2 in props) { //watch each attribute of "props" if is an object
  79615. unwatchOne(obj, props[prop2], watcher);
  79616. }
  79617. };
  79618. if(isModernBrowser()){
  79619. defineWatcher = function (obj, prop, watcher) {
  79620. var val = obj[prop];
  79621. watchFunctions(obj, prop);
  79622. if (!obj.watchers) {
  79623. defineProp(obj, "watchers", {});
  79624. }
  79625. if (!obj.watchers[prop]) {
  79626. obj.watchers[prop] = [];
  79627. }
  79628. obj.watchers[prop].push(watcher); //add the new watcher in the watchers array
  79629. var getter = function () {
  79630. return val;
  79631. };
  79632. var setter = function (newval) {
  79633. var oldval = val;
  79634. val = newval;
  79635. if (obj[prop]){
  79636. watchAll(obj[prop], watcher);
  79637. }
  79638. watchFunctions(obj, prop);
  79639. if (!WatchJS.noMore){
  79640. if (JSON.stringify(oldval) !== JSON.stringify(newval)) {
  79641. callWatchers(obj, prop, "set", newval, oldval);
  79642. WatchJS.noMore = false;
  79643. }
  79644. }
  79645. };
  79646. defineGetAndSet(obj, prop, getter, setter);
  79647. };
  79648. callWatchers = function (obj, prop, action, newval, oldval) {
  79649. for (var wr in obj.watchers[prop]) {
  79650. if (isInt(wr)){
  79651. obj.watchers[prop][wr].call(obj, prop, action, newval, oldval);
  79652. }
  79653. }
  79654. };
  79655. // @todo code related to "watchFunctions" is certainly buggy
  79656. var methodNames = ['pop', 'push', 'reverse', 'shift', 'sort', 'slice', 'unshift'];
  79657. var defineArrayMethodWatcher = function (obj, prop, original, methodName) {
  79658. defineProp(obj[prop], methodName, function () {
  79659. var response = original.apply(obj[prop], arguments);
  79660. watchOne(obj, obj[prop]);
  79661. if (methodName !== 'slice') {
  79662. callWatchers(obj, prop, methodName,arguments);
  79663. }
  79664. return response;
  79665. });
  79666. };
  79667. var watchFunctions = function(obj, prop) {
  79668. if ((!obj[prop]) || (obj[prop] instanceof String) || (!isArray(obj[prop]))) {
  79669. return;
  79670. }
  79671. for (var i = methodNames.length, methodName; i--;) {
  79672. methodName = methodNames[i];
  79673. defineArrayMethodWatcher(obj, prop, obj[prop][methodName], methodName);
  79674. }
  79675. };
  79676. unwatchOne = function (obj, prop, watcher) {
  79677. for(var i in obj.watchers[prop]){
  79678. var w = obj.watchers[prop][i];
  79679. if(w == watcher) {
  79680. obj.watchers[prop].splice(i, 1);
  79681. }
  79682. }
  79683. };
  79684. } else {
  79685. //this implementation dont work because it cant handle the gap between "settings".
  79686. //I mean, if you use a setter for an attribute after another setter of the same attribute it will only fire the second
  79687. //but I think we could think something to fix it
  79688. var subjects = [];
  79689. defineWatcher = function(obj, prop, watcher){
  79690. subjects.push({
  79691. obj: obj,
  79692. prop: prop,
  79693. serialized: JSON.stringify(obj[prop]),
  79694. watcher: watcher
  79695. });
  79696. };
  79697. unwatchOne = function (obj, prop, watcher) {
  79698. for (var i in subjects) {
  79699. var subj = subjects[i];
  79700. if (subj.obj == obj && subj.prop == prop && subj.watcher == watcher) {
  79701. subjects.splice(i, 1);
  79702. }
  79703. }
  79704. };
  79705. callWatchers = function (obj, prop, action, value) {
  79706. for (var i in subjects) {
  79707. var subj = subjects[i];
  79708. if (subj.obj == obj && subj.prop == prop) {
  79709. subj.watcher.call(obj, prop, action, value);
  79710. }
  79711. }
  79712. };
  79713. var loop = function(){
  79714. for(var i in subjects){
  79715. var subj = subjects[i];
  79716. var newSer = JSON.stringify(subj.obj[subj.prop]);
  79717. if(newSer != subj.serialized){
  79718. subj.watcher.call(subj.obj, subj.prop, subj.obj[subj.prop], JSON.parse(subj.serialized));
  79719. subj.serialized = newSer;
  79720. }
  79721. }
  79722. };
  79723. setInterval(loop, 50);
  79724. }
  79725. WatchJS.watch = watch;
  79726. WatchJS.unwatch = unwatch;
  79727. WatchJS.callWatchers = callWatchers;
  79728. return WatchJS;
  79729. }));
  79730. /***/ })
  79731. }]);