hls-demo.js 1.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766
  1. typeof window !== "undefined" &&
  2. (function webpackUniversalModuleDefinition(root, factory) {
  3. if(typeof exports === 'object' && typeof module === 'object')
  4. module.exports = factory();
  5. else if(typeof define === 'function' && define.amd)
  6. define([], factory);
  7. else if(typeof exports === 'object')
  8. exports["HlsDemo"] = factory();
  9. else
  10. root["HlsDemo"] = factory();
  11. })(this, () => {
  12. return /******/ (() => { // webpackBootstrap
  13. /******/ var __webpack_modules__ = ({
  14. /***/ "./demo/chart/chartjs-horizontal-bar.ts":
  15. /*!**********************************************!*\
  16. !*** ./demo/chart/chartjs-horizontal-bar.ts ***!
  17. \**********************************************/
  18. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  19. "use strict";
  20. __webpack_require__.r(__webpack_exports__);
  21. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  22. /* harmony export */ "applyChartInstanceOverrides": () => (/* binding */ applyChartInstanceOverrides),
  23. /* harmony export */ "hhmmss": () => (/* binding */ hhmmss)
  24. /* harmony export */ });
  25. /* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! chart.js */ "./node_modules/.pnpm/chart.js@2.9.4/node_modules/chart.js/dist/Chart.js");
  26. /* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_0__);
  27. function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  28. // Modify horizontalBar so that each dataset (fragments, timeRanges) draws on the same row (level, track or buffer)
  29. (chart_js__WEBPACK_IMPORTED_MODULE_0___default().controllers.horizontalBar.prototype.calculateBarValuePixels) = function (datasetIndex, index, options) {
  30. var chart = this.chart;
  31. var scale = this._getValueScale();
  32. var datasets = chart.data.datasets;
  33. if (!datasets) {
  34. throw new Error("Chart datasets are " + datasets);
  35. }
  36. scale._parseValue = scaleParseValue;
  37. var obj = datasets[datasetIndex].data[index];
  38. var value = scale._parseValue(obj);
  39. var start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;
  40. var length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;
  41. var base = scale.getPixelForValue(start);
  42. var head = scale.getPixelForValue(start + length);
  43. var size = head - base;
  44. return {
  45. size: size,
  46. base: base,
  47. head: head,
  48. center: head + size / 2
  49. };
  50. };
  51. (chart_js__WEBPACK_IMPORTED_MODULE_0___default().controllers.horizontalBar.prototype.calculateBarIndexPixels) = function (datasetIndex, index, ruler, options) {
  52. var rowHeight = options.barThickness;
  53. var size = rowHeight * options.categoryPercentage;
  54. var center = ruler.start + (datasetIndex * rowHeight + rowHeight / 2);
  55. return {
  56. base: center - size / 2,
  57. head: center + size / 2,
  58. center: center,
  59. size: size
  60. };
  61. };
  62. (chart_js__WEBPACK_IMPORTED_MODULE_0___default().controllers.horizontalBar.prototype.draw) = function () {
  63. var rects = this.getMeta().data;
  64. var len = rects.length;
  65. var dataset = this.getDataset();
  66. if (len !== dataset.data.length) {
  67. // View does not match dataset (wait for redraw)
  68. return;
  69. }
  70. var chart = this.chart;
  71. var scale = this._getValueScale();
  72. scale._parseValue = scaleParseValue;
  73. var ctx = chart.ctx;
  74. var chartArea = chart.chartArea;
  75. chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.canvas.clipArea(ctx, chartArea);
  76. if (!this.lineHeight) {
  77. this.lineHeight = Math.ceil(ctx.measureText('0').actualBoundingBoxAscent) + 2;
  78. }
  79. var lineHeight = this.lineHeight;
  80. var range = 0;
  81. for (var i = 0; i < len; ++i) {
  82. var rect = rects[i];
  83. var view = rect._view;
  84. if (!intersects(view.base, view.x, chartArea.left, chartArea.right)) {
  85. // Do not draw elements outside of the chart's viewport
  86. continue;
  87. }
  88. var obj = dataset.data[i];
  89. var val = scale._parseValue(obj);
  90. if (!isNaN(val.min) && !isNaN(val.max)) {
  91. var dataType = obj.dataType;
  92. var stats = obj.stats;
  93. var isPart = dataType === 'part';
  94. var isFragmentHint = dataType === 'fragmentHint';
  95. var isFragment = dataType === 'fragment' || isPart || isFragmentHint;
  96. var isCue = dataType === 'cue';
  97. if (isCue) {
  98. view.y += view.height * 0.5 * (i % 2) - view.height * 0.25;
  99. } else if (isPart) {
  100. view.height -= 22;
  101. }
  102. var bounds = boundingRects(view);
  103. var drawText = bounds.w > lineHeight * 1.5 && !isFragmentHint;
  104. if (isFragment || isCue) {
  105. if (drawText) {
  106. view.borderWidth = 1;
  107. if (i === 0) {
  108. view.borderSkipped = false;
  109. }
  110. } else {
  111. range = range || scale.getValueForPixel(chartArea.right) - scale.getValueForPixel(chartArea.left);
  112. if (range > 300 || isCue) {
  113. view.borderWidth = 0;
  114. }
  115. }
  116. if (isFragmentHint) {
  117. view.borderWidth = 0;
  118. view.backgroundColor = 'rgba(0, 0, 0, 0.1)';
  119. } else {
  120. view.backgroundColor = "rgba(0, 0, 0, " + (0.05 + i % 2 / 12) + ")";
  121. }
  122. }
  123. rect.draw();
  124. if (isFragment) {
  125. if (!stats) {
  126. stats = {};
  127. }
  128. if (isPart) {
  129. ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
  130. ctx.fillRect(bounds.x, bounds.y, bounds.w, bounds.h);
  131. }
  132. if (stats.aborted) {
  133. ctx.fillStyle = 'rgba(100, 0, 0, 0.3)';
  134. ctx.fillRect(bounds.x, bounds.y, bounds.w, bounds.h);
  135. }
  136. if (stats.loaded && stats.total) {
  137. ctx.fillStyle = 'rgba(50, 20, 100, 0.3)';
  138. ctx.fillRect(bounds.x, bounds.y, bounds.w * stats.loaded / stats.total, bounds.h);
  139. }
  140. } else if (isCue) {
  141. if (obj.active) {
  142. ctx.fillStyle = 'rgba(100, 100, 10, 0.4)';
  143. ctx.fillRect(bounds.x, bounds.y, bounds.w, bounds.h);
  144. }
  145. }
  146. if (drawText) {
  147. var start = val.start; // obj.start;
  148. ctx.fillStyle = 'rgb(0, 0, 0)';
  149. if (stats) {
  150. var snBounds = _extends({}, bounds);
  151. if (obj.cc) {
  152. var ccLabel = "cc:" + obj.cc;
  153. var ccWidth = Math.min(ctx.measureText(ccLabel).width + 2, snBounds.w / 2 - 2);
  154. if (ccWidth) {
  155. ctx.fillText(ccLabel, snBounds.x + 2, snBounds.y + lineHeight, snBounds.w / 2 - 4);
  156. snBounds.x += ccWidth;
  157. snBounds.w -= ccWidth;
  158. }
  159. }
  160. var snLabel = isPart ? "part: " + obj.index : "sn: " + obj.sn;
  161. var textWidth = Math.min(ctx.measureText(snLabel).width + 2, snBounds.w - 2);
  162. ctx.fillText(snLabel, snBounds.x + snBounds.w - textWidth, snBounds.y + lineHeight, snBounds.w - 4);
  163. }
  164. if (isCue) {
  165. var strLength = Math.min(30, Math.ceil(bounds.w / (lineHeight / 3)));
  166. ctx.fillText(('' + obj.content).slice(0, strLength), bounds.x + 2, bounds.y + bounds.h - 3, bounds.w - 5);
  167. } else if (!isPart) {
  168. var _float = start !== (start | 0);
  169. var fixedDigits = _float ? Math.min(5, Math.max(1, Math.floor(bounds.w / 10 - 1))) : 0;
  170. var startString = hhmmss(start, fixedDigits);
  171. ctx.fillText(startString, bounds.x + 2, bounds.y + bounds.h - 3, bounds.w - 5);
  172. }
  173. }
  174. }
  175. }
  176. chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.canvas.unclipArea(chart.ctx);
  177. };
  178. function applyChartInstanceOverrides(chart) {
  179. Object.keys(chart.scales).forEach(function (axis) {
  180. var scale = chart.scales[axis];
  181. scale._parseValue = scaleParseValue;
  182. });
  183. }
  184. function scaleParseValue(value) {
  185. if (value === undefined) {
  186. console.warn('Chart values undefined (update chart)');
  187. return {};
  188. }
  189. var start;
  190. var end;
  191. var min;
  192. var max;
  193. if (Array.isArray(value)) {
  194. start = +this.getRightValue(value[0]);
  195. end = +this.getRightValue(value[1]);
  196. min = Math.min(start, end);
  197. max = Math.max(start, end);
  198. } else {
  199. start = +this.getRightValue(value.start);
  200. if ('end' in value) {
  201. end = +this.getRightValue(value.end);
  202. } else {
  203. end = +this.getRightValue(value.start + value.duration);
  204. }
  205. min = Math.min(start, end);
  206. max = Math.max(start, end);
  207. }
  208. return {
  209. min: min,
  210. max: max,
  211. start: start,
  212. end: end
  213. };
  214. }
  215. function intersects(x1, x2, x3, x4) {
  216. return x2 > x3 && x1 < x4;
  217. }
  218. function boundingRects(vm) {
  219. var half = vm.height / 2;
  220. var left = Math.min(vm.x, vm.base);
  221. var right = Math.max(vm.x, vm.base);
  222. var top = vm.y - half;
  223. var bottom = vm.y + half;
  224. return {
  225. x: left,
  226. y: top,
  227. w: right - left,
  228. h: bottom - top
  229. };
  230. }
  231. function hhmmss(value, fixedDigits) {
  232. var h = value / 3600 | 0;
  233. var m = (value / 60 | 0) % 60;
  234. var s = value % 60;
  235. return (h + ":" + pad(m, 2) + ":" + pad(s.toFixed(fixedDigits), fixedDigits ? fixedDigits + 3 : 2)).replace(/^(?:0+:?)*(\d.*?)(?:\.0*)?$/, '$1');
  236. }
  237. function pad(str, length) {
  238. str = '' + str;
  239. while (str.length < length) {
  240. str = '0' + str;
  241. }
  242. return str;
  243. }
  244. /***/ }),
  245. /***/ "./demo/chart/timeline-chart.ts":
  246. /*!**************************************!*\
  247. !*** ./demo/chart/timeline-chart.ts ***!
  248. \**************************************/
  249. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  250. "use strict";
  251. __webpack_require__.r(__webpack_exports__);
  252. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  253. /* harmony export */ "TimelineChart": () => (/* binding */ TimelineChart)
  254. /* harmony export */ });
  255. /* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! chart.js */ "./node_modules/.pnpm/chart.js@2.9.4/node_modules/chart.js/dist/Chart.js");
  256. /* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_0__);
  257. /* harmony import */ var _chartjs_horizontal_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chartjs-horizontal-bar */ "./demo/chart/chartjs-horizontal-bar.ts");
  258. function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  259. 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, _toPropertyKey(descriptor.key), descriptor); } }
  260. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  261. function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
  262. function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
  263. var X_AXIS_SECONDS = 'x-axis-seconds';
  264. var TimelineChart = /*#__PURE__*/function () {
  265. function TimelineChart(canvas, chartJsOptions) {
  266. var _this = this;
  267. this.chart = void 0;
  268. this.rafDebounceRequestId = -1;
  269. this.imageDataBuffer = null;
  270. this.media = null;
  271. this.tracksChangeHandler = void 0;
  272. this.cuesChangeHandler = void 0;
  273. this.hidden = true;
  274. this.zoom100 = 60;
  275. var ctx = canvas.getContext('2d');
  276. if (!ctx) {
  277. throw new Error("Could not get CanvasRenderingContext2D from canvas: " + canvas);
  278. }
  279. var chart = this.chart = self.chart = new (chart_js__WEBPACK_IMPORTED_MODULE_0___default())(ctx, {
  280. type: 'horizontalBar',
  281. data: {
  282. labels: [],
  283. datasets: []
  284. },
  285. options: _extends(getChartOptions(), chartJsOptions),
  286. plugins: [{
  287. afterRender: function afterRender(chart) {
  288. _this.imageDataBuffer = null;
  289. _this.drawCurrentTime();
  290. }
  291. }]
  292. });
  293. (0,_chartjs_horizontal_bar__WEBPACK_IMPORTED_MODULE_1__.applyChartInstanceOverrides)(chart);
  294. canvas.ondblclick = function (event) {
  295. var chart = _this.chart;
  296. var chartArea = chart.chartArea;
  297. var element = chart.getElementAtEvent(event);
  298. var pos = chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.getRelativePosition(event, chart);
  299. var scale = _this.chartScales[X_AXIS_SECONDS];
  300. // zoom in when double clicking near elements in chart area
  301. if (element.length || pos.x > chartArea.left) {
  302. var amount = event.getModifierState('Shift') ? -1.0 : 0.5;
  303. _this.zoom(scale, pos, amount);
  304. } else {
  305. scale.options.ticks.min = 0;
  306. scale.options.ticks.max = _this.zoom100;
  307. }
  308. _this.update();
  309. };
  310. canvas.onwheel = function (event) {
  311. if (event.deltaMode) {
  312. // exit if wheel is in page or line scrolling mode
  313. return;
  314. }
  315. var chart = _this.chart;
  316. var chartArea = chart.chartArea;
  317. var pos = chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.getRelativePosition(event, chart);
  318. // zoom when scrolling over chart elements
  319. if (pos.x > chartArea.left - 11) {
  320. var scale = _this.chartScales[X_AXIS_SECONDS];
  321. if (event.deltaY) {
  322. var direction = -event.deltaY / Math.abs(event.deltaY);
  323. var normal = Math.min(333, Math.abs(event.deltaY)) / 1000;
  324. var ease = 1 - (1 - normal) * (1 - normal);
  325. _this.zoom(scale, pos, ease * direction);
  326. } else if (event.deltaX) {
  327. _this.pan(scale, event.deltaX / 10, scale.min, scale.max);
  328. }
  329. event.preventDefault();
  330. }
  331. };
  332. var moved = false;
  333. var gestureScale = 1;
  334. canvas.onpointerdown = function (downEvent) {
  335. if (!downEvent.isPrimary || gestureScale !== 1) {
  336. return;
  337. }
  338. var chart = _this.chart;
  339. var chartArea = chart.chartArea;
  340. var pos = chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.getRelativePosition(downEvent, chart);
  341. // pan when dragging over chart elements
  342. if (pos.x > chartArea.left) {
  343. var scale = _this.chartScales[X_AXIS_SECONDS];
  344. var startX = downEvent.clientX;
  345. var min = scale.min,
  346. max = scale.max;
  347. var xToVal = (max - min) / scale.width;
  348. moved = false;
  349. canvas.setPointerCapture(downEvent.pointerId);
  350. canvas.onpointermove = function (moveEvent) {
  351. if (!downEvent.isPrimary || gestureScale !== 1) {
  352. return;
  353. }
  354. var movedX = startX - moveEvent.clientX;
  355. var movedValue = movedX * xToVal;
  356. moved = moved || Math.abs(movedX) > 8;
  357. _this.pan(scale, movedValue, min, max);
  358. };
  359. }
  360. };
  361. canvas.onpointerup = canvas.onpointercancel = function (upEvent) {
  362. if (canvas.onpointermove) {
  363. canvas.onpointermove = null;
  364. canvas.releasePointerCapture(upEvent.pointerId);
  365. }
  366. if (!moved && upEvent.isPrimary) {
  367. _this.click(upEvent);
  368. }
  369. };
  370. // Gesture events are for iOS and easier to implement than pinch-zoom with multiple pointers for all browsers
  371. // @ts-ignore
  372. canvas.ongesturestart = function (event) {
  373. gestureScale = 1;
  374. event.preventDefault();
  375. };
  376. // @ts-ignore
  377. canvas.ongestureend = function (event) {
  378. gestureScale = 1;
  379. };
  380. // @ts-ignore
  381. canvas.ongesturechange = function (event) {
  382. var chart = _this.chart;
  383. var chartArea = chart.chartArea;
  384. var pos = chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.getRelativePosition(event, chart);
  385. // zoom when scrolling over chart elements
  386. if (pos.x > chartArea.left) {
  387. var scale = _this.chartScales[X_AXIS_SECONDS];
  388. var amount = event.scale - gestureScale;
  389. _this.zoom(scale, pos, amount);
  390. gestureScale = event.scale;
  391. }
  392. };
  393. }
  394. var _proto = TimelineChart.prototype;
  395. _proto.click = function click(event) {
  396. // Log object on click and seek to position
  397. var chart = this.chart;
  398. var element = chart.getElementAtEvent(event);
  399. if (element.length && chart.data.datasets) {
  400. var _self$hls;
  401. var dataset = chart.data.datasets[element[0]._datasetIndex];
  402. var obj = dataset.data[element[0]._index];
  403. // eslint-disable-next-line no-console
  404. console.log(obj);
  405. if ((_self$hls = self.hls) !== null && _self$hls !== void 0 && _self$hls.media) {
  406. var scale = this.chartScales[X_AXIS_SECONDS];
  407. var pos = chart_js__WEBPACK_IMPORTED_MODULE_0___default().helpers.getRelativePosition(event, chart);
  408. self.hls.media.currentTime = scale.getValueForPixel(pos.x);
  409. }
  410. }
  411. };
  412. _proto.pan = function pan(scale, amount, min, max) {
  413. if (amount === 0) {
  414. return;
  415. }
  416. var pan = amount;
  417. if (amount > 0) {
  418. pan = Math.min(this.zoom100 + 10 - max, amount);
  419. } else {
  420. pan = Math.max(-10 - min, amount);
  421. }
  422. scale.options.ticks.min = min + pan;
  423. scale.options.ticks.max = max + pan;
  424. this.updateOnRepaint();
  425. };
  426. _proto.zoom = function zoom(scale, pos, amount) {
  427. var range = scale.max - scale.min;
  428. var diff = range * amount;
  429. var minPercent = (scale.getValueForPixel(pos.x) - scale.min) / range;
  430. var maxPercent = 1 - minPercent;
  431. var minDelta = diff * minPercent;
  432. var maxDelta = diff * maxPercent;
  433. scale.options.ticks.min = Math.max(-10, scale.min + minDelta);
  434. scale.options.ticks.max = Math.min(this.zoom100 + 10, scale.max - maxDelta);
  435. this.updateOnRepaint();
  436. };
  437. _proto.reset = function reset() {
  438. var scale = this.chartScales[X_AXIS_SECONDS];
  439. scale.options.ticks.min = 0;
  440. scale.options.ticks.max = 60;
  441. var _this$chart$data = this.chart.data,
  442. labels = _this$chart$data.labels,
  443. datasets = _this$chart$data.datasets;
  444. if (labels && datasets) {
  445. labels.length = 0;
  446. datasets.length = 0;
  447. this.resize(datasets);
  448. }
  449. };
  450. _proto.update = function update() {
  451. var _this$chart$ctx;
  452. if (this.hidden || !((_this$chart$ctx = this.chart.ctx) !== null && _this$chart$ctx !== void 0 && _this$chart$ctx.canvas.width)) {
  453. return;
  454. }
  455. self.cancelAnimationFrame(this.rafDebounceRequestId);
  456. this.chart.update({
  457. duration: 0,
  458. lazy: true
  459. });
  460. };
  461. _proto.updateOnRepaint = function updateOnRepaint() {
  462. var _this2 = this;
  463. if (this.hidden) {
  464. return;
  465. }
  466. self.cancelAnimationFrame(this.rafDebounceRequestId);
  467. this.rafDebounceRequestId = self.requestAnimationFrame(function () {
  468. return _this2.update();
  469. });
  470. };
  471. _proto.resize = function resize(datasets) {
  472. var _this3 = this;
  473. if (this.hidden) {
  474. return;
  475. }
  476. if (datasets !== null && datasets !== void 0 && datasets.length) {
  477. var _this$chart$canvas;
  478. var scale = this.chartScales[X_AXIS_SECONDS];
  479. var top = this.chart.chartArea.top;
  480. var height = top + datasets.reduce(function (val, dataset) {
  481. return val + dataset.barThickness;
  482. }, 0) + scale.height + 5;
  483. var container = (_this$chart$canvas = this.chart.canvas) === null || _this$chart$canvas === void 0 ? void 0 : _this$chart$canvas.parentElement;
  484. if (container) {
  485. container.style.height = height + "px";
  486. }
  487. }
  488. self.cancelAnimationFrame(this.rafDebounceRequestId);
  489. this.rafDebounceRequestId = self.requestAnimationFrame(function () {
  490. _this3.chart.resize();
  491. });
  492. };
  493. _proto.show = function show() {
  494. this.hidden = false;
  495. };
  496. _proto.hide = function hide() {
  497. this.hidden = true;
  498. };
  499. _proto.updateLevels = function updateLevels(levels, levelSwitched) {
  500. var _this4 = this;
  501. var _this$chart$data2 = this.chart.data,
  502. labels = _this$chart$data2.labels,
  503. datasets = _this$chart$data2.datasets;
  504. if (!labels || !datasets) {
  505. return;
  506. }
  507. var _self$hls2 = self.hls,
  508. loadLevel = _self$hls2.loadLevel,
  509. nextLoadLevel = _self$hls2.nextLoadLevel,
  510. nextAutoLevel = _self$hls2.nextAutoLevel;
  511. // eslint-disable-next-line no-undefined
  512. var currentLevel = levelSwitched !== undefined ? levelSwitched : self.hls.currentLevel;
  513. levels.forEach(function (level, i) {
  514. var index = level.id || i;
  515. labels.push(getLevelName(level, index));
  516. var borderColor = null;
  517. if (currentLevel === i) {
  518. borderColor = 'rgba(32, 32, 240, 1.0)';
  519. } else if (loadLevel === i) {
  520. borderColor = 'rgba(255, 128, 0, 1.0)';
  521. } else if (nextLoadLevel === i) {
  522. borderColor = 'rgba(200, 200, 64, 1.0)';
  523. } else if (nextAutoLevel === i) {
  524. borderColor = 'rgba(160, 0, 160, 1.0)';
  525. }
  526. datasets.push(datasetWithDefaults({
  527. url: Array.isArray(level.url) ? level.url[level.urlId || 0] : level.url,
  528. trackType: 'level',
  529. borderColor: borderColor,
  530. level: index
  531. }));
  532. if (level.details) {
  533. _this4.updateLevelOrTrack(level.details);
  534. }
  535. });
  536. this.resize(datasets);
  537. };
  538. _proto.updateAudioTracks = function updateAudioTracks(audioTracks) {
  539. var _this5 = this;
  540. var _this$chart$data3 = this.chart.data,
  541. labels = _this$chart$data3.labels,
  542. datasets = _this$chart$data3.datasets;
  543. if (!labels || !datasets) {
  544. return;
  545. }
  546. var audioTrack = self.hls.audioTrack;
  547. audioTracks.forEach(function (track, i) {
  548. labels.push(getAudioTrackName(track, i));
  549. datasets.push(datasetWithDefaults({
  550. url: track.url,
  551. trackType: 'audioTrack',
  552. borderColor: audioTrack === i ? 'rgba(32, 32, 240, 1.0)' : null,
  553. audioTrack: i
  554. }));
  555. if (track.details) {
  556. _this5.updateLevelOrTrack(track.details);
  557. }
  558. });
  559. this.resize(datasets);
  560. };
  561. _proto.updateSubtitleTracks = function updateSubtitleTracks(subtitles) {
  562. var _this6 = this;
  563. var _this$chart$data4 = this.chart.data,
  564. labels = _this$chart$data4.labels,
  565. datasets = _this$chart$data4.datasets;
  566. if (!labels || !datasets) {
  567. return;
  568. }
  569. var subtitleTrack = self.hls.subtitleTrack;
  570. subtitles.forEach(function (track, i) {
  571. labels.push(getSubtitlesName(track, i));
  572. datasets.push(datasetWithDefaults({
  573. url: track.url,
  574. trackType: 'subtitleTrack',
  575. borderColor: subtitleTrack === i ? 'rgba(32, 32, 240, 1.0)' : null,
  576. subtitleTrack: i
  577. }));
  578. if (track.details) {
  579. _this6.updateLevelOrTrack(track.details);
  580. }
  581. });
  582. this.resize(datasets);
  583. };
  584. _proto.removeType = function removeType(trackType) {
  585. var _this$chart$data5 = this.chart.data,
  586. labels = _this$chart$data5.labels,
  587. datasets = _this$chart$data5.datasets;
  588. if (!labels || !datasets) {
  589. return;
  590. }
  591. var i = datasets.length;
  592. while (i--) {
  593. if (datasets[i].trackType === trackType) {
  594. datasets.splice(i, 1);
  595. labels.splice(i, 1);
  596. }
  597. }
  598. };
  599. _proto.updateLevelOrTrack = function updateLevelOrTrack(details) {
  600. var targetduration = details.targetduration,
  601. totalduration = details.totalduration,
  602. url = details.url;
  603. var datasets = this.chart.data.datasets;
  604. var levelDataSet = arrayFind(datasets, function (dataset) {
  605. return stripDeliveryDirectives(url) === stripDeliveryDirectives(dataset.url || '');
  606. });
  607. if (!levelDataSet) {
  608. levelDataSet = arrayFind(datasets, function (dataset) {
  609. var _details$fragments$;
  610. return ((_details$fragments$ = details.fragments[0]) === null || _details$fragments$ === void 0 ? void 0 : _details$fragments$.level) === dataset.level;
  611. });
  612. }
  613. if (!levelDataSet) {
  614. return;
  615. }
  616. var data = levelDataSet.data;
  617. data.length = 0;
  618. if (details.fragments) {
  619. details.fragments.forEach(function (fragment) {
  620. // TODO: keep track of initial playlist start and duration so that we can show drift and pts offset
  621. // (Make that a feature of hls.js v1.0.0 fragments)
  622. var chartFragment = _extends({
  623. dataType: 'fragment'
  624. }, fragment,
  625. // Remove loader references for GC
  626. {
  627. loader: null
  628. });
  629. data.push(chartFragment);
  630. });
  631. }
  632. if (details.partList) {
  633. details.partList.forEach(function (part) {
  634. var chartPart = _extends({
  635. dataType: 'part',
  636. start: part.fragment.start + part.fragOffset
  637. }, part, {
  638. fragment: _extends({}, part.fragment, {
  639. loader: null
  640. })
  641. });
  642. data.push(chartPart);
  643. });
  644. if (details.fragmentHint) {
  645. var chartFragment = _extends({
  646. dataType: 'fragmentHint'
  647. }, details.fragmentHint,
  648. // Remove loader references for GC
  649. {
  650. loader: null
  651. });
  652. data.push(chartFragment);
  653. }
  654. }
  655. var start = getPlaylistStart(details);
  656. this.maxZoom = this.zoom100 = Math.max(start + totalduration + targetduration * 3, this.zoom100);
  657. this.updateOnRepaint();
  658. }
  659. // @ts-ignore
  660. ;
  661. _proto.updateFragment = function updateFragment(data) {
  662. var datasets = this.chart.data.datasets;
  663. var frag = data.frag;
  664. var levelDataSet = arrayFind(datasets, function (dataset) {
  665. return frag.baseurl === dataset.url;
  666. });
  667. if (!levelDataSet) {
  668. levelDataSet = arrayFind(datasets, function (dataset) {
  669. return frag.level === dataset.level;
  670. });
  671. }
  672. if (!levelDataSet) {
  673. return;
  674. }
  675. // eslint-disable-next-line no-restricted-properties
  676. var fragData = arrayFind(levelDataSet.data, function (fragData) {
  677. return fragData.relurl === frag.relurl && fragData.sn === frag.sn;
  678. });
  679. if (fragData && fragData !== frag) {
  680. _extends(fragData, frag);
  681. }
  682. this.updateOnRepaint();
  683. };
  684. _proto.updateSourceBuffers = function updateSourceBuffers(tracks, media) {
  685. var _this7 = this;
  686. var _this$chart$data6 = this.chart.data,
  687. labels = _this$chart$data6.labels,
  688. datasets = _this$chart$data6.datasets;
  689. if (!labels || !datasets) {
  690. return;
  691. }
  692. var trackTypes = Object.keys(tracks).sort(function (type) {
  693. return type === 'video' ? 1 : -1;
  694. });
  695. var mediaBufferData = [];
  696. this.removeSourceBuffers();
  697. this.media = media;
  698. trackTypes.forEach(function (type) {
  699. var track = tracks[type];
  700. var data = [];
  701. var sourceBuffer = track.buffer;
  702. var backgroundColor = {
  703. video: 'rgba(0, 0, 255, 0.2)',
  704. audio: 'rgba(128, 128, 0, 0.2)',
  705. audiovideo: 'rgba(128, 128, 255, 0.2)'
  706. }[type];
  707. labels.unshift(type + " buffer (" + track.id + ")");
  708. datasets.unshift(datasetWithDefaults({
  709. data: data,
  710. categoryPercentage: 0.5,
  711. backgroundColor: backgroundColor,
  712. sourceBuffer: sourceBuffer
  713. }));
  714. sourceBuffer.addEventListener('update', function () {
  715. try {
  716. replaceTimeRangeTuples(sourceBuffer.buffered, data);
  717. } catch (error) {
  718. // eslint-disable-next-line no-console
  719. console.warn(error);
  720. return;
  721. }
  722. replaceTimeRangeTuples(media.buffered, mediaBufferData);
  723. _this7.update();
  724. });
  725. });
  726. if (trackTypes.length === 0) {
  727. media.onprogress = function () {
  728. replaceTimeRangeTuples(media.buffered, mediaBufferData);
  729. _this7.update();
  730. };
  731. }
  732. labels.unshift('media buffer');
  733. datasets.unshift(datasetWithDefaults({
  734. data: mediaBufferData,
  735. categoryPercentage: 0.5,
  736. backgroundColor: 'rgba(0, 255, 0, 0.2)',
  737. media: media
  738. }));
  739. media.ontimeupdate = function () {
  740. return _this7.drawCurrentTime();
  741. };
  742. // TextTrackList
  743. var textTracks = media.textTracks;
  744. this.tracksChangeHandler = this.tracksChangeHandler || function (e) {
  745. return _this7.setTextTracks(e.currentTarget);
  746. };
  747. textTracks.removeEventListener('addtrack', this.tracksChangeHandler);
  748. textTracks.removeEventListener('removetrack', this.tracksChangeHandler);
  749. textTracks.removeEventListener('change', this.tracksChangeHandler);
  750. textTracks.addEventListener('addtrack', this.tracksChangeHandler);
  751. textTracks.addEventListener('removetrack', this.tracksChangeHandler);
  752. textTracks.addEventListener('change', this.tracksChangeHandler);
  753. this.setTextTracks(textTracks);
  754. this.resize(datasets);
  755. };
  756. _proto.removeSourceBuffers = function removeSourceBuffers() {
  757. var _this$chart$data7 = this.chart.data,
  758. labels = _this$chart$data7.labels,
  759. datasets = _this$chart$data7.datasets;
  760. if (!labels || !datasets) {
  761. return;
  762. }
  763. var i = datasets.length;
  764. while (i--) {
  765. if ((labels[0] || '').toString().indexOf('buffer') > -1) {
  766. datasets.splice(i, 1);
  767. labels.splice(i, 1);
  768. }
  769. }
  770. };
  771. _proto.setTextTracks = function setTextTracks(textTracks) {
  772. var _this8 = this;
  773. var _this$chart$data8 = this.chart.data,
  774. labels = _this$chart$data8.labels,
  775. datasets = _this$chart$data8.datasets;
  776. if (!labels || !datasets) {
  777. return;
  778. }
  779. this.removeType('textTrack');
  780. [].forEach.call(textTracks, function (textTrack, i) {
  781. // Uncomment to disable rending of subtitle/caption cues in the timeline
  782. // if (textTrack.kind === 'subtitles' || textTrack.kind === 'captions') {
  783. // return;
  784. // }
  785. var data = [];
  786. labels.push((textTrack.name || textTrack.label) + " " + textTrack.kind + " (" + textTrack.mode + ")");
  787. datasets.push(datasetWithDefaults({
  788. data: data,
  789. categoryPercentage: 0.5,
  790. url: '',
  791. trackType: 'textTrack',
  792. borderColor: textTrack.mode !== 'hidden' === i ? 'rgba(32, 32, 240, 1.0)' : null,
  793. textTrack: i
  794. }));
  795. _this8.cuesChangeHandler = _this8.cuesChangeHandler || function (e) {
  796. return _this8.updateTextTrackCues(e.currentTarget);
  797. };
  798. textTrack._data = data;
  799. textTrack.removeEventListener('cuechange', _this8.cuesChangeHandler);
  800. textTrack.addEventListener('cuechange', _this8.cuesChangeHandler);
  801. _this8.updateTextTrackCues(textTrack);
  802. });
  803. this.resize(datasets);
  804. };
  805. _proto.updateTextTrackCues = function updateTextTrackCues(textTrack) {
  806. var data = textTrack._data;
  807. if (!data) {
  808. return;
  809. }
  810. var activeCues = textTrack.activeCues,
  811. cues = textTrack.cues;
  812. data.length = 0;
  813. if (!cues) {
  814. return;
  815. }
  816. var length = cues.length;
  817. var activeLength = 0;
  818. var activeMin = Infinity;
  819. var activeMax = 0;
  820. if (activeCues) {
  821. activeLength = activeCues.length;
  822. for (var i = 0; i < activeLength; i++) {
  823. var cue = activeCues[i];
  824. if (!cue && activeCues.item) {
  825. cue = activeCues.item(i);
  826. }
  827. if (cue) {
  828. activeMin = Math.min(activeMin, cue.startTime);
  829. activeMax = cue.endTime ? Math.max(activeMax, cue.endTime) : activeMax;
  830. } else {
  831. activeLength--;
  832. }
  833. }
  834. }
  835. var _loop = function _loop(_i) {
  836. var cue = cues[_i];
  837. if (!cue && cues.item) {
  838. cue = cues.item(_i);
  839. }
  840. if (!cue) {
  841. return "continue";
  842. }
  843. var start = cue.startTime;
  844. var end = cue.endTime;
  845. var content = getCueLabel(cue);
  846. var active = false;
  847. if (activeLength && end >= activeMin && start <= activeMax) {
  848. active = [].some.call(activeCues, function (activeCue) {
  849. return cuesMatch(activeCue, cue);
  850. });
  851. }
  852. data.push({
  853. start: start,
  854. end: end,
  855. content: content,
  856. active: active,
  857. dataType: 'cue'
  858. });
  859. };
  860. for (var _i = 0; _i < length; _i++) {
  861. var _ret = _loop(_i);
  862. if (_ret === "continue") continue;
  863. }
  864. this.updateOnRepaint();
  865. };
  866. _proto.drawCurrentTime = function drawCurrentTime() {
  867. var _self$hls3;
  868. var chart = this.chart;
  869. if ((_self$hls3 = self.hls) !== null && _self$hls3 !== void 0 && _self$hls3.media && chart.data.datasets.length) {
  870. var currentTime = self.hls.media.currentTime;
  871. var scale = this.chartScales[X_AXIS_SECONDS];
  872. var ctx = chart.ctx;
  873. if (this.hidden || !ctx || !ctx.canvas.width) {
  874. return;
  875. }
  876. var chartArea = chart.chartArea;
  877. var x = scale.getPixelForValue(currentTime);
  878. ctx.restore();
  879. ctx.save();
  880. this.drawLineX(ctx, x, chartArea);
  881. if (x > chartArea.left && x < chartArea.right) {
  882. ctx.fillStyle = this.getCurrentTimeColor(self.hls.media);
  883. var y = chartArea.top + chart.data.datasets[0].barThickness + 1;
  884. ctx.fillText((0,_chartjs_horizontal_bar__WEBPACK_IMPORTED_MODULE_1__.hhmmss)(currentTime, 5), x + 2, y, 100);
  885. }
  886. ctx.restore();
  887. }
  888. };
  889. _proto.getCurrentTimeColor = function getCurrentTimeColor(video) {
  890. if (!video.readyState || video.ended) {
  891. return 'rgba(0, 0, 0, 0.9)';
  892. }
  893. if (video.seeking || video.readyState < 3) {
  894. return 'rgba(255, 128, 0, 0.9)';
  895. }
  896. if (video.paused) {
  897. return 'rgba(128, 0, 255, 0.9)';
  898. }
  899. return 'rgba(0, 0, 255, 0.9)';
  900. };
  901. _proto.drawLineX = function drawLineX(ctx, x, chartArea) {
  902. if (!this.imageDataBuffer) {
  903. var devicePixelRatio = self.devicePixelRatio || 1;
  904. this.imageDataBuffer = ctx.getImageData(0, 0, chartArea.right * devicePixelRatio, chartArea.bottom * devicePixelRatio);
  905. } else {
  906. ctx.fillStyle = '#ffffff';
  907. ctx.fillRect(0, 0, chartArea.right, chartArea.bottom);
  908. ctx.putImageData(this.imageDataBuffer, 0, 0);
  909. }
  910. if (x > chartArea.left && x < chartArea.right) {
  911. ctx.lineWidth = 1;
  912. ctx.strokeStyle = this.getCurrentTimeColor(self.hls.media); // alpha '0.5'
  913. ctx.beginPath();
  914. ctx.moveTo(x, chartArea.top);
  915. ctx.lineTo(x, chartArea.bottom);
  916. ctx.stroke();
  917. }
  918. };
  919. _createClass(TimelineChart, [{
  920. key: "chartScales",
  921. get: function get() {
  922. return this.chart.scales;
  923. }
  924. }, {
  925. key: "minZoom",
  926. get: function get() {
  927. var scale = this.chartScales[X_AXIS_SECONDS];
  928. if (scale) {
  929. return scale.options.ticks.min;
  930. }
  931. return 1;
  932. }
  933. // @ts-ignore
  934. }, {
  935. key: "maxZoom",
  936. get: function get() {
  937. var scale = this.chartScales[X_AXIS_SECONDS];
  938. if (scale) {
  939. return scale.options.ticks.max;
  940. }
  941. return this.zoom100;
  942. }
  943. // @ts-ignore
  944. ,
  945. set: function set(x) {
  946. var currentZoom = this.maxZoom;
  947. var newZoom = Math.max(x, currentZoom);
  948. if (currentZoom === 60 && newZoom !== currentZoom) {
  949. var scale = this.chartScales[X_AXIS_SECONDS];
  950. scale.options.ticks.max = newZoom;
  951. }
  952. }
  953. }]);
  954. return TimelineChart;
  955. }();
  956. function stripDeliveryDirectives(url) {
  957. if (url === '') {
  958. return url;
  959. }
  960. try {
  961. var webUrl = new self.URL(url);
  962. webUrl.searchParams.delete('_HLS_msn');
  963. webUrl.searchParams.delete('_HLS_part');
  964. webUrl.searchParams.delete('_HLS_skip');
  965. webUrl.searchParams.sort();
  966. return webUrl.href;
  967. } catch (e) {
  968. return url.replace(/[?&]_HLS_(?:msn|part|skip)=[^?&]+/g, '');
  969. }
  970. }
  971. function datasetWithDefaults(options) {
  972. return _extends({
  973. data: [],
  974. xAxisID: X_AXIS_SECONDS,
  975. barThickness: 35,
  976. categoryPercentage: 1
  977. }, options);
  978. }
  979. function getPlaylistStart(details) {
  980. var _details$fragments;
  981. return (_details$fragments = details.fragments) !== null && _details$fragments !== void 0 && _details$fragments.length ? details.fragments[0].start : 0;
  982. }
  983. function getLevelName(level, index) {
  984. var _level$attrs;
  985. var label = '(main playlist)';
  986. if ((_level$attrs = level.attrs) !== null && _level$attrs !== void 0 && _level$attrs.BANDWIDTH) {
  987. label = getMainLevelAttribute(level) + "@" + level.attrs.BANDWIDTH;
  988. if (level.name) {
  989. label = label + " (" + level.name + ")";
  990. }
  991. } else if (level.name) {
  992. label = level.name;
  993. }
  994. return label + " L-" + index;
  995. }
  996. function getMainLevelAttribute(level) {
  997. return level.attrs.RESOLUTION || level.attrs.CODECS || level.attrs.AUDIO;
  998. }
  999. function getAudioTrackName(track, index) {
  1000. var label = track.lang ? track.name + "/" + track.lang : track.name;
  1001. return label + " (" + (track.groupId || track.attrs['GROUP-ID']) + ") A-" + index;
  1002. }
  1003. function getSubtitlesName(track, index) {
  1004. var label = track.lang ? track.name + "/" + track.lang : track.name;
  1005. return label + " (" + (track.groupId || track.attrs['GROUP-ID']) + ") S-" + index;
  1006. }
  1007. function replaceTimeRangeTuples(timeRanges, data) {
  1008. data.length = 0;
  1009. var length = timeRanges.length;
  1010. for (var i = 0; i < length; i++) {
  1011. data.push([timeRanges.start(i), timeRanges.end(i)]);
  1012. }
  1013. }
  1014. function cuesMatch(cue1, cue2) {
  1015. return cue1.startTime === cue2.startTime && cue1.endTime === cue2.endTime && cue1.text === cue2.text && cue1.data === cue2.data && JSON.stringify(cue1.value) === JSON.stringify(cue2.value);
  1016. }
  1017. function getCueLabel(cue) {
  1018. if (cue.text) {
  1019. return cue.text;
  1020. }
  1021. var result = parseDataCue(cue);
  1022. return JSON.stringify(result);
  1023. }
  1024. function parseDataCue(cue) {
  1025. var data = {};
  1026. var value = cue.value;
  1027. if (value) {
  1028. if (value.info) {
  1029. var collection = data[value.key];
  1030. if (collection !== Object(collection)) {
  1031. collection = {};
  1032. data[value.key] = collection;
  1033. }
  1034. collection[value.info] = value.data;
  1035. } else {
  1036. data[value.key] = value.data;
  1037. }
  1038. }
  1039. return data;
  1040. }
  1041. function getChartOptions() {
  1042. return {
  1043. animation: {
  1044. duration: 0
  1045. },
  1046. elements: {
  1047. rectangle: {
  1048. borderWidth: 1,
  1049. borderColor: 'rgba(20, 20, 20, 1)'
  1050. }
  1051. },
  1052. events: ['click', 'touchstart'],
  1053. hover: {
  1054. mode: null,
  1055. animationDuration: 0
  1056. },
  1057. legend: {
  1058. display: false
  1059. },
  1060. maintainAspectRatio: false,
  1061. responsiveAnimationDuration: 0,
  1062. scales: {
  1063. // TODO: additional xAxes for PTS and PDT
  1064. xAxes: [{
  1065. id: X_AXIS_SECONDS,
  1066. ticks: {
  1067. beginAtZero: true,
  1068. sampleSize: 0,
  1069. maxRotation: 0,
  1070. callback: function callback(tickValue, i, ticks) {
  1071. if (i === 0 || i === ticks.length - 1) {
  1072. return tickValue ? '' : '0';
  1073. } else {
  1074. return (0,_chartjs_horizontal_bar__WEBPACK_IMPORTED_MODULE_1__.hhmmss)(tickValue, 2);
  1075. }
  1076. }
  1077. }
  1078. }],
  1079. yAxes: [{
  1080. gridLines: {
  1081. display: false
  1082. }
  1083. }]
  1084. },
  1085. tooltips: {
  1086. enabled: false
  1087. }
  1088. };
  1089. }
  1090. function arrayFind(array, predicate) {
  1091. var len = array.length >>> 0;
  1092. if (typeof predicate !== 'function') {
  1093. throw TypeError('predicate must be a function');
  1094. }
  1095. var thisArg = arguments[2];
  1096. var k = 0;
  1097. while (k < len) {
  1098. var kValue = array[k];
  1099. if (predicate.call(thisArg, kValue, k, array)) {
  1100. return kValue;
  1101. }
  1102. k++;
  1103. }
  1104. // eslint-disable-next-line no-undefined
  1105. return undefined;
  1106. }
  1107. /***/ }),
  1108. /***/ "./demo/demo-utils.js":
  1109. /*!****************************!*\
  1110. !*** ./demo/demo-utils.js ***!
  1111. \****************************/
  1112. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1113. "use strict";
  1114. __webpack_require__.r(__webpack_exports__);
  1115. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1116. /* harmony export */ "copyTextToClipboard": () => (/* binding */ copyTextToClipboard),
  1117. /* harmony export */ "sortObject": () => (/* binding */ sortObject)
  1118. /* harmony export */ });
  1119. function sortObject(obj) {
  1120. if (typeof obj !== 'object') {
  1121. return obj;
  1122. }
  1123. var temp = {};
  1124. var keys = [];
  1125. for (var key in obj) {
  1126. keys.push(key);
  1127. }
  1128. keys.sort();
  1129. for (var index in keys) {
  1130. temp[keys[index]] = sortObject(obj[keys[index]]);
  1131. }
  1132. return temp;
  1133. }
  1134. function copyTextToClipboard(text) {
  1135. var textArea = document.createElement('textarea');
  1136. textArea.value = text;
  1137. document.body.appendChild(textArea);
  1138. textArea.select();
  1139. try {
  1140. var successful = document.execCommand('copy');
  1141. var msg = successful ? 'successful' : 'unsuccessful';
  1142. console.log('Copying text command was ' + msg);
  1143. } catch (err) {
  1144. console.log('Oops, unable to copy');
  1145. }
  1146. document.body.removeChild(textArea);
  1147. }
  1148. /***/ }),
  1149. /***/ "./tests/test-streams.js":
  1150. /*!*******************************!*\
  1151. !*** ./tests/test-streams.js ***!
  1152. \*******************************/
  1153. /***/ ((module) => {
  1154. /**
  1155. * Create test stream
  1156. * @param {string} url
  1157. * @param {string} description
  1158. * @param {boolean} [live]
  1159. * @param {boolean} [abr]
  1160. * @param {string[]} [skip_ua]
  1161. * @returns {{url: string, description: string, live: boolean, abr: boolean, skip_ua: string[]}}
  1162. */
  1163. function createTestStream(url, description, live, abr, skip_ua) {
  1164. if (live === void 0) {
  1165. live = false;
  1166. }
  1167. if (abr === void 0) {
  1168. abr = true;
  1169. }
  1170. if (skip_ua === void 0) {
  1171. skip_ua = [];
  1172. }
  1173. return {
  1174. url: url,
  1175. description: description,
  1176. live: live,
  1177. abr: abr,
  1178. skip_ua: skip_ua
  1179. };
  1180. }
  1181. /**
  1182. * @param {Object} target
  1183. * @param {Object} [config]
  1184. * @returns {{url: string, description: string, live: boolean, abr: boolean, skip_ua: string[]}}
  1185. */
  1186. function createTestStreamWithConfig(target, config) {
  1187. if (typeof target !== 'object') {
  1188. throw new Error('target should be object');
  1189. }
  1190. var testStream = createTestStream(target.url, target.description, target.live, target.abr, target.skip_ua);
  1191. testStream.config = config;
  1192. return testStream;
  1193. }
  1194. module.exports = {
  1195. live: {
  1196. url: 'http://localhost:8080/hls/live/test.m3u8',
  1197. description: 'live/test'
  1198. },
  1199. ll: {
  1200. url: 'http://localhost:8080/llhls/live/test/index.m3u8',
  1201. description: 'llhls/live/test'
  1202. }
  1203. // bbb: {
  1204. // url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
  1205. // description: 'Big Buck Bunny - adaptive qualities',
  1206. // abr: true,
  1207. // },
  1208. // fdr: {
  1209. // url: 'https://cdn.jwplayer.com/manifests/pZxWPRg4.m3u8',
  1210. // description: 'FDR - CDN packaged, 4s segments, 180p - 1080p',
  1211. // abr: true,
  1212. // },
  1213. // bigBuckBunny480p: {
  1214. // url: 'https://test-streams.mux.dev/x36xhzz/url_6/193039199_mp4_h264_aac_hq_7.m3u8',
  1215. // description: 'Big Buck Bunny - 480p only',
  1216. // abr: false,
  1217. // },
  1218. // arte: {
  1219. // url: 'https://test-streams.mux.dev/test_001/stream.m3u8',
  1220. // description: 'ARTE China,ABR',
  1221. // abr: true,
  1222. // },
  1223. // deltatreDAI: {
  1224. // url: 'https://test-streams.mux.dev/dai-discontinuity-deltatre/manifest.m3u8',
  1225. // description: 'Ad-insertion in event stream',
  1226. // abr: false,
  1227. // },
  1228. // issue666: {
  1229. // url: 'https://playertest.longtailvideo.com/adaptive/issue666/playlists/cisq0gim60007xzvi505emlxx.m3u8',
  1230. // description:
  1231. // 'Surveillance footage - https://github.com/video-dev/hls.js/issues/666',
  1232. // abr: false,
  1233. // },
  1234. // closedCaptions: {
  1235. // url: 'https://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8',
  1236. // description: 'CNN special report, with CC',
  1237. // abr: false,
  1238. // },
  1239. // customIvBadDts: {
  1240. // url: 'https://playertest.longtailvideo.com/adaptive/customIV/prog_index.m3u8',
  1241. // description: 'Custom IV with bad PTS DTS',
  1242. // abr: false,
  1243. // },
  1244. // oceansAES: {
  1245. // url: 'https://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8',
  1246. // description: 'AES-128 encrypted, ABR',
  1247. // abr: true,
  1248. // },
  1249. // tracksWithAES: {
  1250. // url: 'https://playertest.longtailvideo.com/adaptive/aes-with-tracks/master.m3u8',
  1251. // description: 'AES-128 encrypted, TS main with AAC audio track',
  1252. // abr: false,
  1253. // },
  1254. // mp3Audio: {
  1255. // url: 'https://playertest.longtailvideo.com/adaptive/vod-with-mp3/manifest.m3u8',
  1256. // description: 'MP3 VOD demo',
  1257. // abr: false,
  1258. // },
  1259. // mpegAudioOnly: {
  1260. // url: 'https://pl.streamingvideoprovider.com/mp3-playlist/playlist.m3u8',
  1261. // description: 'MPEG Audio Only demo',
  1262. // abr: false,
  1263. // skip_ua: ['MicrosoftEdge', 'firefox'],
  1264. // },
  1265. // fmp4: {
  1266. // url: 'https://storage.googleapis.com/shaka-demo-assets/angel-one-hls/hls.m3u8',
  1267. // description: 'HLS fMP4 Angel-One multiple audio-tracks',
  1268. // abr: true,
  1269. // },
  1270. // fmp4Bitmovin: {
  1271. // url: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s-fmp4/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
  1272. // description: 'HLS fMP4 by Bitmovin',
  1273. // abr: true,
  1274. // },
  1275. // fmp4BitmovinHevc: {
  1276. // url: 'https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/stream_fmp4.m3u8',
  1277. // description:
  1278. // 'HLS HEVC fMP4 by Bitmovin (Safari and Edge? only as of 2020-08)',
  1279. // abr: true,
  1280. // skipFunctionalTests: true,
  1281. // },
  1282. // offset_pts: {
  1283. // url: 'https://test-streams.mux.dev/pts_shift/master.m3u8',
  1284. // description: 'DK Turntable, PTS shifted by 2.3s',
  1285. // abr: true,
  1286. // },
  1287. // angelOneShakaWidevine: createTestStreamWithConfig(
  1288. // {
  1289. // url: 'https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8',
  1290. // description:
  1291. // 'Shaka-packager Widevine DRM (EME) HLS-fMP4 - Angel One Demo',
  1292. // abr: true,
  1293. // skip_ua: [
  1294. // 'firefox',
  1295. // 'safari',
  1296. // { name: 'chrome', version: '75.0' },
  1297. // { name: 'chrome', version: '79.0' },
  1298. // ],
  1299. // },
  1300. // {
  1301. // widevineLicenseUrl: 'https://cwip-shaka-proxy.appspot.com/no_auth',
  1302. // emeEnabled: true,
  1303. // }
  1304. // ),
  1305. // audioOnlyMultipleLevels: {
  1306. // url: 'https://s3.amazonaws.com/qa.jwplayer.com/~alex/121628/new_master.m3u8',
  1307. // description: 'Multiple non-alternate audio levels',
  1308. // abr: true,
  1309. // },
  1310. // pdtDuplicate: {
  1311. // url: 'https://playertest.longtailvideo.com/adaptive/artbeats/manifest.m3u8',
  1312. // description: 'Duplicate sequential PDT values',
  1313. // abr: false,
  1314. // },
  1315. // pdtLargeGap: {
  1316. // url: 'https://playertest.longtailvideo.com/adaptive/boxee/playlist.m3u8',
  1317. // description: 'PDTs with large gaps following discontinuities',
  1318. // abr: false,
  1319. // },
  1320. // pdtBadValues: {
  1321. // url: 'https://playertest.longtailvideo.com/adaptive/progdatime/playlist2.m3u8',
  1322. // description: 'PDTs with bad values',
  1323. // abr: false,
  1324. // },
  1325. // pdtOneValue: {
  1326. // url: 'https://playertest.longtailvideo.com/adaptive/aviion/manifest.m3u8',
  1327. // description: 'One PDT, no discontinuities',
  1328. // abr: false,
  1329. // },
  1330. // noTrackIntersection: createTestStreamWithConfig(
  1331. // {
  1332. // url: 'https://s3.amazonaws.com/qa.jwplayer.com/~alex/123633/new_master.m3u8',
  1333. // description:
  1334. // 'Audio/video track PTS values do not intersect; 10 second start gap',
  1335. // abr: false,
  1336. // },
  1337. // {
  1338. // avBufferOffset: 10.5,
  1339. // }
  1340. // ),
  1341. // altAudioAndTracks: {
  1342. // // url: 'https://wowzaec2demo.streamlock.net/vod-multitrack/_definst_/smil:ElephantsDream/elephantsdream2.smil/playlist.m3u',
  1343. // url: 'https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/index.m3u8',
  1344. // description: 'Alternate audio tracks, and multiple VTT tracks',
  1345. // vendor: 'wowza',
  1346. // abr: true,
  1347. // },
  1348. // altAudioAudioOnly: createTestStreamWithConfig(
  1349. // {
  1350. // url: 'https://playertest.longtailvideo.com/adaptive/alt-audio-no-video/sintel/playlist.m3u8',
  1351. // description: 'Audio only with alternate audio track (Sintel)',
  1352. // abr: false,
  1353. // },
  1354. // {
  1355. // // the playlist segment durations are longer than the media. So much so, that when seeking near the end,
  1356. // // the timeline shifts roughly 10 seconds seconds back, and as a result buffering skips several segments
  1357. // // to adjust for the currentTime now being places at the very end of the stream.
  1358. // allowedBufferedRangesInSeekTest: 3,
  1359. // }
  1360. // ),
  1361. // altAudioMultiAudioOnly: {
  1362. // url: 'https://playertest.longtailvideo.com/adaptive/alt-audio-no-video/angel-one.m3u8',
  1363. // description: 'Audio only with multiple alternate audio tracks (Angel One)',
  1364. // abr: false,
  1365. // },
  1366. // muxedFmp4: {
  1367. // url: 'https://s3.amazonaws.com/qa.jwplayer.com/hlsjs/muxed-fmp4/hls.m3u8',
  1368. // description: 'Muxed av fmp4 - appended to "audiovideo" SourceBuffer',
  1369. // abr: false,
  1370. // },
  1371. // altAudioWithPdtAndStartGap: {
  1372. // url: 'https://playertest.longtailvideo.com/adaptive/hls-test-streams/test-audio-pdt/playlist.m3u8',
  1373. // description: 'PDT before each segment, 1.59s start gap',
  1374. // // Disable smooth switch on this stream. Test is flakey because of what looks like (auto)play issue. To be expected with this large a gap (for now).
  1375. // // abr: true,
  1376. // startSeek: true,
  1377. // },
  1378. // AppleAdvancedHevcAvcHls: {
  1379. // url: 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8',
  1380. // description:
  1381. // 'Advanced stream (HEVC/H.264, AC-3/AAC, WebVTT, fMP4 segments)',
  1382. // },
  1383. // MuxLowLatencyHls: {
  1384. // url: 'https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8',
  1385. // description:
  1386. // 'Low-Latency HLS sample of Big Buck Bunny loop and a timer. Restarts every 12 hours. (fMP4 segments)',
  1387. // live: true,
  1388. // },
  1389. // // AppleLowLatencyHls: {
  1390. // // url: 'https://ll-hls-test.apple.com/master.m3u8',
  1391. // // description: 'Apple Low-Latency HLS sample (TS segments)',
  1392. // // live: true,
  1393. // // },
  1394. // // AppleLowLatencyCmafHls: {
  1395. // // url: 'https://ll-hls-test.apple.com/cmaf/master.m3u8',
  1396. // // description: 'Apple Low-Latency HLS sample (fMP4 segments)',
  1397. // // live: true,
  1398. // // },
  1399. // groupIds: {
  1400. // url: 'https://mtoczko.github.io/hls-test-streams/test-group/playlist.m3u8',
  1401. // description: 'Group-id: subtitle and audio',
  1402. // abr: true,
  1403. // skipFunctionalTests: true,
  1404. // },
  1405. // redundantLevelsWithTrackGroups: {
  1406. // url: 'https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/redundant.m3u8',
  1407. // description: 'Redundant levels with subtitle and audio track groups',
  1408. // abr: true,
  1409. // skipFunctionalTests: true,
  1410. // },
  1411. // startDelimiterOverlappingBetweenPESPackets: {
  1412. // url: 'https://hlsjs-test-streams-wistia.s3.amazonaws.com/start-delimiter.m3u8',
  1413. // description: `A stream with the start delimiter overlapping between PES packets.
  1414. // Related to https://github.com/video-dev/hls.js/issues/3834, where Apple Silicon chips throw decoding errors if
  1415. // NAL units are not starting right at the beginning of the PES packet when using hardware accelerated decoding.`,
  1416. // abr: false,
  1417. // },
  1418. };
  1419. /***/ }),
  1420. /***/ "./node_modules/.pnpm/chart.js@2.9.4/node_modules/chart.js/dist/Chart.js":
  1421. /*!*******************************************************************************!*\
  1422. !*** ./node_modules/.pnpm/chart.js@2.9.4/node_modules/chart.js/dist/Chart.js ***!
  1423. \*******************************************************************************/
  1424. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1425. /*!
  1426. * Chart.js v2.9.4
  1427. * https://www.chartjs.org
  1428. * (c) 2020 Chart.js Contributors
  1429. * Released under the MIT License
  1430. */
  1431. (function (global, factory) {
  1432. true ? module.exports = factory(function() { try { return __webpack_require__(/*! moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js"); } catch(e) { } }()) :
  1433. 0;
  1434. }(this, (function (moment) { 'use strict';
  1435. moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
  1436. function createCommonjsModule(fn, module) {
  1437. return module = { exports: {} }, fn(module, module.exports), module.exports;
  1438. }
  1439. function getCjsExportFromNamespace (n) {
  1440. return n && n['default'] || n;
  1441. }
  1442. var colorName = {
  1443. "aliceblue": [240, 248, 255],
  1444. "antiquewhite": [250, 235, 215],
  1445. "aqua": [0, 255, 255],
  1446. "aquamarine": [127, 255, 212],
  1447. "azure": [240, 255, 255],
  1448. "beige": [245, 245, 220],
  1449. "bisque": [255, 228, 196],
  1450. "black": [0, 0, 0],
  1451. "blanchedalmond": [255, 235, 205],
  1452. "blue": [0, 0, 255],
  1453. "blueviolet": [138, 43, 226],
  1454. "brown": [165, 42, 42],
  1455. "burlywood": [222, 184, 135],
  1456. "cadetblue": [95, 158, 160],
  1457. "chartreuse": [127, 255, 0],
  1458. "chocolate": [210, 105, 30],
  1459. "coral": [255, 127, 80],
  1460. "cornflowerblue": [100, 149, 237],
  1461. "cornsilk": [255, 248, 220],
  1462. "crimson": [220, 20, 60],
  1463. "cyan": [0, 255, 255],
  1464. "darkblue": [0, 0, 139],
  1465. "darkcyan": [0, 139, 139],
  1466. "darkgoldenrod": [184, 134, 11],
  1467. "darkgray": [169, 169, 169],
  1468. "darkgreen": [0, 100, 0],
  1469. "darkgrey": [169, 169, 169],
  1470. "darkkhaki": [189, 183, 107],
  1471. "darkmagenta": [139, 0, 139],
  1472. "darkolivegreen": [85, 107, 47],
  1473. "darkorange": [255, 140, 0],
  1474. "darkorchid": [153, 50, 204],
  1475. "darkred": [139, 0, 0],
  1476. "darksalmon": [233, 150, 122],
  1477. "darkseagreen": [143, 188, 143],
  1478. "darkslateblue": [72, 61, 139],
  1479. "darkslategray": [47, 79, 79],
  1480. "darkslategrey": [47, 79, 79],
  1481. "darkturquoise": [0, 206, 209],
  1482. "darkviolet": [148, 0, 211],
  1483. "deeppink": [255, 20, 147],
  1484. "deepskyblue": [0, 191, 255],
  1485. "dimgray": [105, 105, 105],
  1486. "dimgrey": [105, 105, 105],
  1487. "dodgerblue": [30, 144, 255],
  1488. "firebrick": [178, 34, 34],
  1489. "floralwhite": [255, 250, 240],
  1490. "forestgreen": [34, 139, 34],
  1491. "fuchsia": [255, 0, 255],
  1492. "gainsboro": [220, 220, 220],
  1493. "ghostwhite": [248, 248, 255],
  1494. "gold": [255, 215, 0],
  1495. "goldenrod": [218, 165, 32],
  1496. "gray": [128, 128, 128],
  1497. "green": [0, 128, 0],
  1498. "greenyellow": [173, 255, 47],
  1499. "grey": [128, 128, 128],
  1500. "honeydew": [240, 255, 240],
  1501. "hotpink": [255, 105, 180],
  1502. "indianred": [205, 92, 92],
  1503. "indigo": [75, 0, 130],
  1504. "ivory": [255, 255, 240],
  1505. "khaki": [240, 230, 140],
  1506. "lavender": [230, 230, 250],
  1507. "lavenderblush": [255, 240, 245],
  1508. "lawngreen": [124, 252, 0],
  1509. "lemonchiffon": [255, 250, 205],
  1510. "lightblue": [173, 216, 230],
  1511. "lightcoral": [240, 128, 128],
  1512. "lightcyan": [224, 255, 255],
  1513. "lightgoldenrodyellow": [250, 250, 210],
  1514. "lightgray": [211, 211, 211],
  1515. "lightgreen": [144, 238, 144],
  1516. "lightgrey": [211, 211, 211],
  1517. "lightpink": [255, 182, 193],
  1518. "lightsalmon": [255, 160, 122],
  1519. "lightseagreen": [32, 178, 170],
  1520. "lightskyblue": [135, 206, 250],
  1521. "lightslategray": [119, 136, 153],
  1522. "lightslategrey": [119, 136, 153],
  1523. "lightsteelblue": [176, 196, 222],
  1524. "lightyellow": [255, 255, 224],
  1525. "lime": [0, 255, 0],
  1526. "limegreen": [50, 205, 50],
  1527. "linen": [250, 240, 230],
  1528. "magenta": [255, 0, 255],
  1529. "maroon": [128, 0, 0],
  1530. "mediumaquamarine": [102, 205, 170],
  1531. "mediumblue": [0, 0, 205],
  1532. "mediumorchid": [186, 85, 211],
  1533. "mediumpurple": [147, 112, 219],
  1534. "mediumseagreen": [60, 179, 113],
  1535. "mediumslateblue": [123, 104, 238],
  1536. "mediumspringgreen": [0, 250, 154],
  1537. "mediumturquoise": [72, 209, 204],
  1538. "mediumvioletred": [199, 21, 133],
  1539. "midnightblue": [25, 25, 112],
  1540. "mintcream": [245, 255, 250],
  1541. "mistyrose": [255, 228, 225],
  1542. "moccasin": [255, 228, 181],
  1543. "navajowhite": [255, 222, 173],
  1544. "navy": [0, 0, 128],
  1545. "oldlace": [253, 245, 230],
  1546. "olive": [128, 128, 0],
  1547. "olivedrab": [107, 142, 35],
  1548. "orange": [255, 165, 0],
  1549. "orangered": [255, 69, 0],
  1550. "orchid": [218, 112, 214],
  1551. "palegoldenrod": [238, 232, 170],
  1552. "palegreen": [152, 251, 152],
  1553. "paleturquoise": [175, 238, 238],
  1554. "palevioletred": [219, 112, 147],
  1555. "papayawhip": [255, 239, 213],
  1556. "peachpuff": [255, 218, 185],
  1557. "peru": [205, 133, 63],
  1558. "pink": [255, 192, 203],
  1559. "plum": [221, 160, 221],
  1560. "powderblue": [176, 224, 230],
  1561. "purple": [128, 0, 128],
  1562. "rebeccapurple": [102, 51, 153],
  1563. "red": [255, 0, 0],
  1564. "rosybrown": [188, 143, 143],
  1565. "royalblue": [65, 105, 225],
  1566. "saddlebrown": [139, 69, 19],
  1567. "salmon": [250, 128, 114],
  1568. "sandybrown": [244, 164, 96],
  1569. "seagreen": [46, 139, 87],
  1570. "seashell": [255, 245, 238],
  1571. "sienna": [160, 82, 45],
  1572. "silver": [192, 192, 192],
  1573. "skyblue": [135, 206, 235],
  1574. "slateblue": [106, 90, 205],
  1575. "slategray": [112, 128, 144],
  1576. "slategrey": [112, 128, 144],
  1577. "snow": [255, 250, 250],
  1578. "springgreen": [0, 255, 127],
  1579. "steelblue": [70, 130, 180],
  1580. "tan": [210, 180, 140],
  1581. "teal": [0, 128, 128],
  1582. "thistle": [216, 191, 216],
  1583. "tomato": [255, 99, 71],
  1584. "turquoise": [64, 224, 208],
  1585. "violet": [238, 130, 238],
  1586. "wheat": [245, 222, 179],
  1587. "white": [255, 255, 255],
  1588. "whitesmoke": [245, 245, 245],
  1589. "yellow": [255, 255, 0],
  1590. "yellowgreen": [154, 205, 50]
  1591. };
  1592. var conversions = createCommonjsModule(function (module) {
  1593. /* MIT license */
  1594. // NOTE: conversions should only return primitive values (i.e. arrays, or
  1595. // values that give correct `typeof` results).
  1596. // do not use box values types (i.e. Number(), String(), etc.)
  1597. var reverseKeywords = {};
  1598. for (var key in colorName) {
  1599. if (colorName.hasOwnProperty(key)) {
  1600. reverseKeywords[colorName[key]] = key;
  1601. }
  1602. }
  1603. var convert = module.exports = {
  1604. rgb: {channels: 3, labels: 'rgb'},
  1605. hsl: {channels: 3, labels: 'hsl'},
  1606. hsv: {channels: 3, labels: 'hsv'},
  1607. hwb: {channels: 3, labels: 'hwb'},
  1608. cmyk: {channels: 4, labels: 'cmyk'},
  1609. xyz: {channels: 3, labels: 'xyz'},
  1610. lab: {channels: 3, labels: 'lab'},
  1611. lch: {channels: 3, labels: 'lch'},
  1612. hex: {channels: 1, labels: ['hex']},
  1613. keyword: {channels: 1, labels: ['keyword']},
  1614. ansi16: {channels: 1, labels: ['ansi16']},
  1615. ansi256: {channels: 1, labels: ['ansi256']},
  1616. hcg: {channels: 3, labels: ['h', 'c', 'g']},
  1617. apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
  1618. gray: {channels: 1, labels: ['gray']}
  1619. };
  1620. // hide .channels and .labels properties
  1621. for (var model in convert) {
  1622. if (convert.hasOwnProperty(model)) {
  1623. if (!('channels' in convert[model])) {
  1624. throw new Error('missing channels property: ' + model);
  1625. }
  1626. if (!('labels' in convert[model])) {
  1627. throw new Error('missing channel labels property: ' + model);
  1628. }
  1629. if (convert[model].labels.length !== convert[model].channels) {
  1630. throw new Error('channel and label counts mismatch: ' + model);
  1631. }
  1632. var channels = convert[model].channels;
  1633. var labels = convert[model].labels;
  1634. delete convert[model].channels;
  1635. delete convert[model].labels;
  1636. Object.defineProperty(convert[model], 'channels', {value: channels});
  1637. Object.defineProperty(convert[model], 'labels', {value: labels});
  1638. }
  1639. }
  1640. convert.rgb.hsl = function (rgb) {
  1641. var r = rgb[0] / 255;
  1642. var g = rgb[1] / 255;
  1643. var b = rgb[2] / 255;
  1644. var min = Math.min(r, g, b);
  1645. var max = Math.max(r, g, b);
  1646. var delta = max - min;
  1647. var h;
  1648. var s;
  1649. var l;
  1650. if (max === min) {
  1651. h = 0;
  1652. } else if (r === max) {
  1653. h = (g - b) / delta;
  1654. } else if (g === max) {
  1655. h = 2 + (b - r) / delta;
  1656. } else if (b === max) {
  1657. h = 4 + (r - g) / delta;
  1658. }
  1659. h = Math.min(h * 60, 360);
  1660. if (h < 0) {
  1661. h += 360;
  1662. }
  1663. l = (min + max) / 2;
  1664. if (max === min) {
  1665. s = 0;
  1666. } else if (l <= 0.5) {
  1667. s = delta / (max + min);
  1668. } else {
  1669. s = delta / (2 - max - min);
  1670. }
  1671. return [h, s * 100, l * 100];
  1672. };
  1673. convert.rgb.hsv = function (rgb) {
  1674. var rdif;
  1675. var gdif;
  1676. var bdif;
  1677. var h;
  1678. var s;
  1679. var r = rgb[0] / 255;
  1680. var g = rgb[1] / 255;
  1681. var b = rgb[2] / 255;
  1682. var v = Math.max(r, g, b);
  1683. var diff = v - Math.min(r, g, b);
  1684. var diffc = function (c) {
  1685. return (v - c) / 6 / diff + 1 / 2;
  1686. };
  1687. if (diff === 0) {
  1688. h = s = 0;
  1689. } else {
  1690. s = diff / v;
  1691. rdif = diffc(r);
  1692. gdif = diffc(g);
  1693. bdif = diffc(b);
  1694. if (r === v) {
  1695. h = bdif - gdif;
  1696. } else if (g === v) {
  1697. h = (1 / 3) + rdif - bdif;
  1698. } else if (b === v) {
  1699. h = (2 / 3) + gdif - rdif;
  1700. }
  1701. if (h < 0) {
  1702. h += 1;
  1703. } else if (h > 1) {
  1704. h -= 1;
  1705. }
  1706. }
  1707. return [
  1708. h * 360,
  1709. s * 100,
  1710. v * 100
  1711. ];
  1712. };
  1713. convert.rgb.hwb = function (rgb) {
  1714. var r = rgb[0];
  1715. var g = rgb[1];
  1716. var b = rgb[2];
  1717. var h = convert.rgb.hsl(rgb)[0];
  1718. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  1719. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  1720. return [h, w * 100, b * 100];
  1721. };
  1722. convert.rgb.cmyk = function (rgb) {
  1723. var r = rgb[0] / 255;
  1724. var g = rgb[1] / 255;
  1725. var b = rgb[2] / 255;
  1726. var c;
  1727. var m;
  1728. var y;
  1729. var k;
  1730. k = Math.min(1 - r, 1 - g, 1 - b);
  1731. c = (1 - r - k) / (1 - k) || 0;
  1732. m = (1 - g - k) / (1 - k) || 0;
  1733. y = (1 - b - k) / (1 - k) || 0;
  1734. return [c * 100, m * 100, y * 100, k * 100];
  1735. };
  1736. /**
  1737. * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
  1738. * */
  1739. function comparativeDistance(x, y) {
  1740. return (
  1741. Math.pow(x[0] - y[0], 2) +
  1742. Math.pow(x[1] - y[1], 2) +
  1743. Math.pow(x[2] - y[2], 2)
  1744. );
  1745. }
  1746. convert.rgb.keyword = function (rgb) {
  1747. var reversed = reverseKeywords[rgb];
  1748. if (reversed) {
  1749. return reversed;
  1750. }
  1751. var currentClosestDistance = Infinity;
  1752. var currentClosestKeyword;
  1753. for (var keyword in colorName) {
  1754. if (colorName.hasOwnProperty(keyword)) {
  1755. var value = colorName[keyword];
  1756. // Compute comparative distance
  1757. var distance = comparativeDistance(rgb, value);
  1758. // Check if its less, if so set as closest
  1759. if (distance < currentClosestDistance) {
  1760. currentClosestDistance = distance;
  1761. currentClosestKeyword = keyword;
  1762. }
  1763. }
  1764. }
  1765. return currentClosestKeyword;
  1766. };
  1767. convert.keyword.rgb = function (keyword) {
  1768. return colorName[keyword];
  1769. };
  1770. convert.rgb.xyz = function (rgb) {
  1771. var r = rgb[0] / 255;
  1772. var g = rgb[1] / 255;
  1773. var b = rgb[2] / 255;
  1774. // assume sRGB
  1775. r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
  1776. g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
  1777. b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
  1778. var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
  1779. var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
  1780. var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
  1781. return [x * 100, y * 100, z * 100];
  1782. };
  1783. convert.rgb.lab = function (rgb) {
  1784. var xyz = convert.rgb.xyz(rgb);
  1785. var x = xyz[0];
  1786. var y = xyz[1];
  1787. var z = xyz[2];
  1788. var l;
  1789. var a;
  1790. var b;
  1791. x /= 95.047;
  1792. y /= 100;
  1793. z /= 108.883;
  1794. x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
  1795. y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
  1796. z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
  1797. l = (116 * y) - 16;
  1798. a = 500 * (x - y);
  1799. b = 200 * (y - z);
  1800. return [l, a, b];
  1801. };
  1802. convert.hsl.rgb = function (hsl) {
  1803. var h = hsl[0] / 360;
  1804. var s = hsl[1] / 100;
  1805. var l = hsl[2] / 100;
  1806. var t1;
  1807. var t2;
  1808. var t3;
  1809. var rgb;
  1810. var val;
  1811. if (s === 0) {
  1812. val = l * 255;
  1813. return [val, val, val];
  1814. }
  1815. if (l < 0.5) {
  1816. t2 = l * (1 + s);
  1817. } else {
  1818. t2 = l + s - l * s;
  1819. }
  1820. t1 = 2 * l - t2;
  1821. rgb = [0, 0, 0];
  1822. for (var i = 0; i < 3; i++) {
  1823. t3 = h + 1 / 3 * -(i - 1);
  1824. if (t3 < 0) {
  1825. t3++;
  1826. }
  1827. if (t3 > 1) {
  1828. t3--;
  1829. }
  1830. if (6 * t3 < 1) {
  1831. val = t1 + (t2 - t1) * 6 * t3;
  1832. } else if (2 * t3 < 1) {
  1833. val = t2;
  1834. } else if (3 * t3 < 2) {
  1835. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  1836. } else {
  1837. val = t1;
  1838. }
  1839. rgb[i] = val * 255;
  1840. }
  1841. return rgb;
  1842. };
  1843. convert.hsl.hsv = function (hsl) {
  1844. var h = hsl[0];
  1845. var s = hsl[1] / 100;
  1846. var l = hsl[2] / 100;
  1847. var smin = s;
  1848. var lmin = Math.max(l, 0.01);
  1849. var sv;
  1850. var v;
  1851. l *= 2;
  1852. s *= (l <= 1) ? l : 2 - l;
  1853. smin *= lmin <= 1 ? lmin : 2 - lmin;
  1854. v = (l + s) / 2;
  1855. sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
  1856. return [h, sv * 100, v * 100];
  1857. };
  1858. convert.hsv.rgb = function (hsv) {
  1859. var h = hsv[0] / 60;
  1860. var s = hsv[1] / 100;
  1861. var v = hsv[2] / 100;
  1862. var hi = Math.floor(h) % 6;
  1863. var f = h - Math.floor(h);
  1864. var p = 255 * v * (1 - s);
  1865. var q = 255 * v * (1 - (s * f));
  1866. var t = 255 * v * (1 - (s * (1 - f)));
  1867. v *= 255;
  1868. switch (hi) {
  1869. case 0:
  1870. return [v, t, p];
  1871. case 1:
  1872. return [q, v, p];
  1873. case 2:
  1874. return [p, v, t];
  1875. case 3:
  1876. return [p, q, v];
  1877. case 4:
  1878. return [t, p, v];
  1879. case 5:
  1880. return [v, p, q];
  1881. }
  1882. };
  1883. convert.hsv.hsl = function (hsv) {
  1884. var h = hsv[0];
  1885. var s = hsv[1] / 100;
  1886. var v = hsv[2] / 100;
  1887. var vmin = Math.max(v, 0.01);
  1888. var lmin;
  1889. var sl;
  1890. var l;
  1891. l = (2 - s) * v;
  1892. lmin = (2 - s) * vmin;
  1893. sl = s * vmin;
  1894. sl /= (lmin <= 1) ? lmin : 2 - lmin;
  1895. sl = sl || 0;
  1896. l /= 2;
  1897. return [h, sl * 100, l * 100];
  1898. };
  1899. // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
  1900. convert.hwb.rgb = function (hwb) {
  1901. var h = hwb[0] / 360;
  1902. var wh = hwb[1] / 100;
  1903. var bl = hwb[2] / 100;
  1904. var ratio = wh + bl;
  1905. var i;
  1906. var v;
  1907. var f;
  1908. var n;
  1909. // wh + bl cant be > 1
  1910. if (ratio > 1) {
  1911. wh /= ratio;
  1912. bl /= ratio;
  1913. }
  1914. i = Math.floor(6 * h);
  1915. v = 1 - bl;
  1916. f = 6 * h - i;
  1917. if ((i & 0x01) !== 0) {
  1918. f = 1 - f;
  1919. }
  1920. n = wh + f * (v - wh); // linear interpolation
  1921. var r;
  1922. var g;
  1923. var b;
  1924. switch (i) {
  1925. default:
  1926. case 6:
  1927. case 0: r = v; g = n; b = wh; break;
  1928. case 1: r = n; g = v; b = wh; break;
  1929. case 2: r = wh; g = v; b = n; break;
  1930. case 3: r = wh; g = n; b = v; break;
  1931. case 4: r = n; g = wh; b = v; break;
  1932. case 5: r = v; g = wh; b = n; break;
  1933. }
  1934. return [r * 255, g * 255, b * 255];
  1935. };
  1936. convert.cmyk.rgb = function (cmyk) {
  1937. var c = cmyk[0] / 100;
  1938. var m = cmyk[1] / 100;
  1939. var y = cmyk[2] / 100;
  1940. var k = cmyk[3] / 100;
  1941. var r;
  1942. var g;
  1943. var b;
  1944. r = 1 - Math.min(1, c * (1 - k) + k);
  1945. g = 1 - Math.min(1, m * (1 - k) + k);
  1946. b = 1 - Math.min(1, y * (1 - k) + k);
  1947. return [r * 255, g * 255, b * 255];
  1948. };
  1949. convert.xyz.rgb = function (xyz) {
  1950. var x = xyz[0] / 100;
  1951. var y = xyz[1] / 100;
  1952. var z = xyz[2] / 100;
  1953. var r;
  1954. var g;
  1955. var b;
  1956. r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
  1957. g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
  1958. b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
  1959. // assume sRGB
  1960. r = r > 0.0031308
  1961. ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
  1962. : r * 12.92;
  1963. g = g > 0.0031308
  1964. ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
  1965. : g * 12.92;
  1966. b = b > 0.0031308
  1967. ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
  1968. : b * 12.92;
  1969. r = Math.min(Math.max(0, r), 1);
  1970. g = Math.min(Math.max(0, g), 1);
  1971. b = Math.min(Math.max(0, b), 1);
  1972. return [r * 255, g * 255, b * 255];
  1973. };
  1974. convert.xyz.lab = function (xyz) {
  1975. var x = xyz[0];
  1976. var y = xyz[1];
  1977. var z = xyz[2];
  1978. var l;
  1979. var a;
  1980. var b;
  1981. x /= 95.047;
  1982. y /= 100;
  1983. z /= 108.883;
  1984. x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
  1985. y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
  1986. z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
  1987. l = (116 * y) - 16;
  1988. a = 500 * (x - y);
  1989. b = 200 * (y - z);
  1990. return [l, a, b];
  1991. };
  1992. convert.lab.xyz = function (lab) {
  1993. var l = lab[0];
  1994. var a = lab[1];
  1995. var b = lab[2];
  1996. var x;
  1997. var y;
  1998. var z;
  1999. y = (l + 16) / 116;
  2000. x = a / 500 + y;
  2001. z = y - b / 200;
  2002. var y2 = Math.pow(y, 3);
  2003. var x2 = Math.pow(x, 3);
  2004. var z2 = Math.pow(z, 3);
  2005. y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  2006. x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  2007. z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
  2008. x *= 95.047;
  2009. y *= 100;
  2010. z *= 108.883;
  2011. return [x, y, z];
  2012. };
  2013. convert.lab.lch = function (lab) {
  2014. var l = lab[0];
  2015. var a = lab[1];
  2016. var b = lab[2];
  2017. var hr;
  2018. var h;
  2019. var c;
  2020. hr = Math.atan2(b, a);
  2021. h = hr * 360 / 2 / Math.PI;
  2022. if (h < 0) {
  2023. h += 360;
  2024. }
  2025. c = Math.sqrt(a * a + b * b);
  2026. return [l, c, h];
  2027. };
  2028. convert.lch.lab = function (lch) {
  2029. var l = lch[0];
  2030. var c = lch[1];
  2031. var h = lch[2];
  2032. var a;
  2033. var b;
  2034. var hr;
  2035. hr = h / 360 * 2 * Math.PI;
  2036. a = c * Math.cos(hr);
  2037. b = c * Math.sin(hr);
  2038. return [l, a, b];
  2039. };
  2040. convert.rgb.ansi16 = function (args) {
  2041. var r = args[0];
  2042. var g = args[1];
  2043. var b = args[2];
  2044. var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
  2045. value = Math.round(value / 50);
  2046. if (value === 0) {
  2047. return 30;
  2048. }
  2049. var ansi = 30
  2050. + ((Math.round(b / 255) << 2)
  2051. | (Math.round(g / 255) << 1)
  2052. | Math.round(r / 255));
  2053. if (value === 2) {
  2054. ansi += 60;
  2055. }
  2056. return ansi;
  2057. };
  2058. convert.hsv.ansi16 = function (args) {
  2059. // optimization here; we already know the value and don't need to get
  2060. // it converted for us.
  2061. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  2062. };
  2063. convert.rgb.ansi256 = function (args) {
  2064. var r = args[0];
  2065. var g = args[1];
  2066. var b = args[2];
  2067. // we use the extended greyscale palette here, with the exception of
  2068. // black and white. normal palette only has 4 greyscale shades.
  2069. if (r === g && g === b) {
  2070. if (r < 8) {
  2071. return 16;
  2072. }
  2073. if (r > 248) {
  2074. return 231;
  2075. }
  2076. return Math.round(((r - 8) / 247) * 24) + 232;
  2077. }
  2078. var ansi = 16
  2079. + (36 * Math.round(r / 255 * 5))
  2080. + (6 * Math.round(g / 255 * 5))
  2081. + Math.round(b / 255 * 5);
  2082. return ansi;
  2083. };
  2084. convert.ansi16.rgb = function (args) {
  2085. var color = args % 10;
  2086. // handle greyscale
  2087. if (color === 0 || color === 7) {
  2088. if (args > 50) {
  2089. color += 3.5;
  2090. }
  2091. color = color / 10.5 * 255;
  2092. return [color, color, color];
  2093. }
  2094. var mult = (~~(args > 50) + 1) * 0.5;
  2095. var r = ((color & 1) * mult) * 255;
  2096. var g = (((color >> 1) & 1) * mult) * 255;
  2097. var b = (((color >> 2) & 1) * mult) * 255;
  2098. return [r, g, b];
  2099. };
  2100. convert.ansi256.rgb = function (args) {
  2101. // handle greyscale
  2102. if (args >= 232) {
  2103. var c = (args - 232) * 10 + 8;
  2104. return [c, c, c];
  2105. }
  2106. args -= 16;
  2107. var rem;
  2108. var r = Math.floor(args / 36) / 5 * 255;
  2109. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  2110. var b = (rem % 6) / 5 * 255;
  2111. return [r, g, b];
  2112. };
  2113. convert.rgb.hex = function (args) {
  2114. var integer = ((Math.round(args[0]) & 0xFF) << 16)
  2115. + ((Math.round(args[1]) & 0xFF) << 8)
  2116. + (Math.round(args[2]) & 0xFF);
  2117. var string = integer.toString(16).toUpperCase();
  2118. return '000000'.substring(string.length) + string;
  2119. };
  2120. convert.hex.rgb = function (args) {
  2121. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  2122. if (!match) {
  2123. return [0, 0, 0];
  2124. }
  2125. var colorString = match[0];
  2126. if (match[0].length === 3) {
  2127. colorString = colorString.split('').map(function (char) {
  2128. return char + char;
  2129. }).join('');
  2130. }
  2131. var integer = parseInt(colorString, 16);
  2132. var r = (integer >> 16) & 0xFF;
  2133. var g = (integer >> 8) & 0xFF;
  2134. var b = integer & 0xFF;
  2135. return [r, g, b];
  2136. };
  2137. convert.rgb.hcg = function (rgb) {
  2138. var r = rgb[0] / 255;
  2139. var g = rgb[1] / 255;
  2140. var b = rgb[2] / 255;
  2141. var max = Math.max(Math.max(r, g), b);
  2142. var min = Math.min(Math.min(r, g), b);
  2143. var chroma = (max - min);
  2144. var grayscale;
  2145. var hue;
  2146. if (chroma < 1) {
  2147. grayscale = min / (1 - chroma);
  2148. } else {
  2149. grayscale = 0;
  2150. }
  2151. if (chroma <= 0) {
  2152. hue = 0;
  2153. } else
  2154. if (max === r) {
  2155. hue = ((g - b) / chroma) % 6;
  2156. } else
  2157. if (max === g) {
  2158. hue = 2 + (b - r) / chroma;
  2159. } else {
  2160. hue = 4 + (r - g) / chroma + 4;
  2161. }
  2162. hue /= 6;
  2163. hue %= 1;
  2164. return [hue * 360, chroma * 100, grayscale * 100];
  2165. };
  2166. convert.hsl.hcg = function (hsl) {
  2167. var s = hsl[1] / 100;
  2168. var l = hsl[2] / 100;
  2169. var c = 1;
  2170. var f = 0;
  2171. if (l < 0.5) {
  2172. c = 2.0 * s * l;
  2173. } else {
  2174. c = 2.0 * s * (1.0 - l);
  2175. }
  2176. if (c < 1.0) {
  2177. f = (l - 0.5 * c) / (1.0 - c);
  2178. }
  2179. return [hsl[0], c * 100, f * 100];
  2180. };
  2181. convert.hsv.hcg = function (hsv) {
  2182. var s = hsv[1] / 100;
  2183. var v = hsv[2] / 100;
  2184. var c = s * v;
  2185. var f = 0;
  2186. if (c < 1.0) {
  2187. f = (v - c) / (1 - c);
  2188. }
  2189. return [hsv[0], c * 100, f * 100];
  2190. };
  2191. convert.hcg.rgb = function (hcg) {
  2192. var h = hcg[0] / 360;
  2193. var c = hcg[1] / 100;
  2194. var g = hcg[2] / 100;
  2195. if (c === 0.0) {
  2196. return [g * 255, g * 255, g * 255];
  2197. }
  2198. var pure = [0, 0, 0];
  2199. var hi = (h % 1) * 6;
  2200. var v = hi % 1;
  2201. var w = 1 - v;
  2202. var mg = 0;
  2203. switch (Math.floor(hi)) {
  2204. case 0:
  2205. pure[0] = 1; pure[1] = v; pure[2] = 0; break;
  2206. case 1:
  2207. pure[0] = w; pure[1] = 1; pure[2] = 0; break;
  2208. case 2:
  2209. pure[0] = 0; pure[1] = 1; pure[2] = v; break;
  2210. case 3:
  2211. pure[0] = 0; pure[1] = w; pure[2] = 1; break;
  2212. case 4:
  2213. pure[0] = v; pure[1] = 0; pure[2] = 1; break;
  2214. default:
  2215. pure[0] = 1; pure[1] = 0; pure[2] = w;
  2216. }
  2217. mg = (1.0 - c) * g;
  2218. return [
  2219. (c * pure[0] + mg) * 255,
  2220. (c * pure[1] + mg) * 255,
  2221. (c * pure[2] + mg) * 255
  2222. ];
  2223. };
  2224. convert.hcg.hsv = function (hcg) {
  2225. var c = hcg[1] / 100;
  2226. var g = hcg[2] / 100;
  2227. var v = c + g * (1.0 - c);
  2228. var f = 0;
  2229. if (v > 0.0) {
  2230. f = c / v;
  2231. }
  2232. return [hcg[0], f * 100, v * 100];
  2233. };
  2234. convert.hcg.hsl = function (hcg) {
  2235. var c = hcg[1] / 100;
  2236. var g = hcg[2] / 100;
  2237. var l = g * (1.0 - c) + 0.5 * c;
  2238. var s = 0;
  2239. if (l > 0.0 && l < 0.5) {
  2240. s = c / (2 * l);
  2241. } else
  2242. if (l >= 0.5 && l < 1.0) {
  2243. s = c / (2 * (1 - l));
  2244. }
  2245. return [hcg[0], s * 100, l * 100];
  2246. };
  2247. convert.hcg.hwb = function (hcg) {
  2248. var c = hcg[1] / 100;
  2249. var g = hcg[2] / 100;
  2250. var v = c + g * (1.0 - c);
  2251. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  2252. };
  2253. convert.hwb.hcg = function (hwb) {
  2254. var w = hwb[1] / 100;
  2255. var b = hwb[2] / 100;
  2256. var v = 1 - b;
  2257. var c = v - w;
  2258. var g = 0;
  2259. if (c < 1) {
  2260. g = (v - c) / (1 - c);
  2261. }
  2262. return [hwb[0], c * 100, g * 100];
  2263. };
  2264. convert.apple.rgb = function (apple) {
  2265. return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
  2266. };
  2267. convert.rgb.apple = function (rgb) {
  2268. return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
  2269. };
  2270. convert.gray.rgb = function (args) {
  2271. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  2272. };
  2273. convert.gray.hsl = convert.gray.hsv = function (args) {
  2274. return [0, 0, args[0]];
  2275. };
  2276. convert.gray.hwb = function (gray) {
  2277. return [0, 100, gray[0]];
  2278. };
  2279. convert.gray.cmyk = function (gray) {
  2280. return [0, 0, 0, gray[0]];
  2281. };
  2282. convert.gray.lab = function (gray) {
  2283. return [gray[0], 0, 0];
  2284. };
  2285. convert.gray.hex = function (gray) {
  2286. var val = Math.round(gray[0] / 100 * 255) & 0xFF;
  2287. var integer = (val << 16) + (val << 8) + val;
  2288. var string = integer.toString(16).toUpperCase();
  2289. return '000000'.substring(string.length) + string;
  2290. };
  2291. convert.rgb.gray = function (rgb) {
  2292. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  2293. return [val / 255 * 100];
  2294. };
  2295. });
  2296. var conversions_1 = conversions.rgb;
  2297. var conversions_2 = conversions.hsl;
  2298. var conversions_3 = conversions.hsv;
  2299. var conversions_4 = conversions.hwb;
  2300. var conversions_5 = conversions.cmyk;
  2301. var conversions_6 = conversions.xyz;
  2302. var conversions_7 = conversions.lab;
  2303. var conversions_8 = conversions.lch;
  2304. var conversions_9 = conversions.hex;
  2305. var conversions_10 = conversions.keyword;
  2306. var conversions_11 = conversions.ansi16;
  2307. var conversions_12 = conversions.ansi256;
  2308. var conversions_13 = conversions.hcg;
  2309. var conversions_14 = conversions.apple;
  2310. var conversions_15 = conversions.gray;
  2311. /*
  2312. this function routes a model to all other models.
  2313. all functions that are routed have a property `.conversion` attached
  2314. to the returned synthetic function. This property is an array
  2315. of strings, each with the steps in between the 'from' and 'to'
  2316. color models (inclusive).
  2317. conversions that are not possible simply are not included.
  2318. */
  2319. function buildGraph() {
  2320. var graph = {};
  2321. // https://jsperf.com/object-keys-vs-for-in-with-closure/3
  2322. var models = Object.keys(conversions);
  2323. for (var len = models.length, i = 0; i < len; i++) {
  2324. graph[models[i]] = {
  2325. // http://jsperf.com/1-vs-infinity
  2326. // micro-opt, but this is simple.
  2327. distance: -1,
  2328. parent: null
  2329. };
  2330. }
  2331. return graph;
  2332. }
  2333. // https://en.wikipedia.org/wiki/Breadth-first_search
  2334. function deriveBFS(fromModel) {
  2335. var graph = buildGraph();
  2336. var queue = [fromModel]; // unshift -> queue -> pop
  2337. graph[fromModel].distance = 0;
  2338. while (queue.length) {
  2339. var current = queue.pop();
  2340. var adjacents = Object.keys(conversions[current]);
  2341. for (var len = adjacents.length, i = 0; i < len; i++) {
  2342. var adjacent = adjacents[i];
  2343. var node = graph[adjacent];
  2344. if (node.distance === -1) {
  2345. node.distance = graph[current].distance + 1;
  2346. node.parent = current;
  2347. queue.unshift(adjacent);
  2348. }
  2349. }
  2350. }
  2351. return graph;
  2352. }
  2353. function link(from, to) {
  2354. return function (args) {
  2355. return to(from(args));
  2356. };
  2357. }
  2358. function wrapConversion(toModel, graph) {
  2359. var path = [graph[toModel].parent, toModel];
  2360. var fn = conversions[graph[toModel].parent][toModel];
  2361. var cur = graph[toModel].parent;
  2362. while (graph[cur].parent) {
  2363. path.unshift(graph[cur].parent);
  2364. fn = link(conversions[graph[cur].parent][cur], fn);
  2365. cur = graph[cur].parent;
  2366. }
  2367. fn.conversion = path;
  2368. return fn;
  2369. }
  2370. var route = function (fromModel) {
  2371. var graph = deriveBFS(fromModel);
  2372. var conversion = {};
  2373. var models = Object.keys(graph);
  2374. for (var len = models.length, i = 0; i < len; i++) {
  2375. var toModel = models[i];
  2376. var node = graph[toModel];
  2377. if (node.parent === null) {
  2378. // no possible conversion, or this node is the source model.
  2379. continue;
  2380. }
  2381. conversion[toModel] = wrapConversion(toModel, graph);
  2382. }
  2383. return conversion;
  2384. };
  2385. var convert = {};
  2386. var models = Object.keys(conversions);
  2387. function wrapRaw(fn) {
  2388. var wrappedFn = function (args) {
  2389. if (args === undefined || args === null) {
  2390. return args;
  2391. }
  2392. if (arguments.length > 1) {
  2393. args = Array.prototype.slice.call(arguments);
  2394. }
  2395. return fn(args);
  2396. };
  2397. // preserve .conversion property if there is one
  2398. if ('conversion' in fn) {
  2399. wrappedFn.conversion = fn.conversion;
  2400. }
  2401. return wrappedFn;
  2402. }
  2403. function wrapRounded(fn) {
  2404. var wrappedFn = function (args) {
  2405. if (args === undefined || args === null) {
  2406. return args;
  2407. }
  2408. if (arguments.length > 1) {
  2409. args = Array.prototype.slice.call(arguments);
  2410. }
  2411. var result = fn(args);
  2412. // we're assuming the result is an array here.
  2413. // see notice in conversions.js; don't use box types
  2414. // in conversion functions.
  2415. if (typeof result === 'object') {
  2416. for (var len = result.length, i = 0; i < len; i++) {
  2417. result[i] = Math.round(result[i]);
  2418. }
  2419. }
  2420. return result;
  2421. };
  2422. // preserve .conversion property if there is one
  2423. if ('conversion' in fn) {
  2424. wrappedFn.conversion = fn.conversion;
  2425. }
  2426. return wrappedFn;
  2427. }
  2428. models.forEach(function (fromModel) {
  2429. convert[fromModel] = {};
  2430. Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
  2431. Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
  2432. var routes = route(fromModel);
  2433. var routeModels = Object.keys(routes);
  2434. routeModels.forEach(function (toModel) {
  2435. var fn = routes[toModel];
  2436. convert[fromModel][toModel] = wrapRounded(fn);
  2437. convert[fromModel][toModel].raw = wrapRaw(fn);
  2438. });
  2439. });
  2440. var colorConvert = convert;
  2441. var colorName$1 = {
  2442. "aliceblue": [240, 248, 255],
  2443. "antiquewhite": [250, 235, 215],
  2444. "aqua": [0, 255, 255],
  2445. "aquamarine": [127, 255, 212],
  2446. "azure": [240, 255, 255],
  2447. "beige": [245, 245, 220],
  2448. "bisque": [255, 228, 196],
  2449. "black": [0, 0, 0],
  2450. "blanchedalmond": [255, 235, 205],
  2451. "blue": [0, 0, 255],
  2452. "blueviolet": [138, 43, 226],
  2453. "brown": [165, 42, 42],
  2454. "burlywood": [222, 184, 135],
  2455. "cadetblue": [95, 158, 160],
  2456. "chartreuse": [127, 255, 0],
  2457. "chocolate": [210, 105, 30],
  2458. "coral": [255, 127, 80],
  2459. "cornflowerblue": [100, 149, 237],
  2460. "cornsilk": [255, 248, 220],
  2461. "crimson": [220, 20, 60],
  2462. "cyan": [0, 255, 255],
  2463. "darkblue": [0, 0, 139],
  2464. "darkcyan": [0, 139, 139],
  2465. "darkgoldenrod": [184, 134, 11],
  2466. "darkgray": [169, 169, 169],
  2467. "darkgreen": [0, 100, 0],
  2468. "darkgrey": [169, 169, 169],
  2469. "darkkhaki": [189, 183, 107],
  2470. "darkmagenta": [139, 0, 139],
  2471. "darkolivegreen": [85, 107, 47],
  2472. "darkorange": [255, 140, 0],
  2473. "darkorchid": [153, 50, 204],
  2474. "darkred": [139, 0, 0],
  2475. "darksalmon": [233, 150, 122],
  2476. "darkseagreen": [143, 188, 143],
  2477. "darkslateblue": [72, 61, 139],
  2478. "darkslategray": [47, 79, 79],
  2479. "darkslategrey": [47, 79, 79],
  2480. "darkturquoise": [0, 206, 209],
  2481. "darkviolet": [148, 0, 211],
  2482. "deeppink": [255, 20, 147],
  2483. "deepskyblue": [0, 191, 255],
  2484. "dimgray": [105, 105, 105],
  2485. "dimgrey": [105, 105, 105],
  2486. "dodgerblue": [30, 144, 255],
  2487. "firebrick": [178, 34, 34],
  2488. "floralwhite": [255, 250, 240],
  2489. "forestgreen": [34, 139, 34],
  2490. "fuchsia": [255, 0, 255],
  2491. "gainsboro": [220, 220, 220],
  2492. "ghostwhite": [248, 248, 255],
  2493. "gold": [255, 215, 0],
  2494. "goldenrod": [218, 165, 32],
  2495. "gray": [128, 128, 128],
  2496. "green": [0, 128, 0],
  2497. "greenyellow": [173, 255, 47],
  2498. "grey": [128, 128, 128],
  2499. "honeydew": [240, 255, 240],
  2500. "hotpink": [255, 105, 180],
  2501. "indianred": [205, 92, 92],
  2502. "indigo": [75, 0, 130],
  2503. "ivory": [255, 255, 240],
  2504. "khaki": [240, 230, 140],
  2505. "lavender": [230, 230, 250],
  2506. "lavenderblush": [255, 240, 245],
  2507. "lawngreen": [124, 252, 0],
  2508. "lemonchiffon": [255, 250, 205],
  2509. "lightblue": [173, 216, 230],
  2510. "lightcoral": [240, 128, 128],
  2511. "lightcyan": [224, 255, 255],
  2512. "lightgoldenrodyellow": [250, 250, 210],
  2513. "lightgray": [211, 211, 211],
  2514. "lightgreen": [144, 238, 144],
  2515. "lightgrey": [211, 211, 211],
  2516. "lightpink": [255, 182, 193],
  2517. "lightsalmon": [255, 160, 122],
  2518. "lightseagreen": [32, 178, 170],
  2519. "lightskyblue": [135, 206, 250],
  2520. "lightslategray": [119, 136, 153],
  2521. "lightslategrey": [119, 136, 153],
  2522. "lightsteelblue": [176, 196, 222],
  2523. "lightyellow": [255, 255, 224],
  2524. "lime": [0, 255, 0],
  2525. "limegreen": [50, 205, 50],
  2526. "linen": [250, 240, 230],
  2527. "magenta": [255, 0, 255],
  2528. "maroon": [128, 0, 0],
  2529. "mediumaquamarine": [102, 205, 170],
  2530. "mediumblue": [0, 0, 205],
  2531. "mediumorchid": [186, 85, 211],
  2532. "mediumpurple": [147, 112, 219],
  2533. "mediumseagreen": [60, 179, 113],
  2534. "mediumslateblue": [123, 104, 238],
  2535. "mediumspringgreen": [0, 250, 154],
  2536. "mediumturquoise": [72, 209, 204],
  2537. "mediumvioletred": [199, 21, 133],
  2538. "midnightblue": [25, 25, 112],
  2539. "mintcream": [245, 255, 250],
  2540. "mistyrose": [255, 228, 225],
  2541. "moccasin": [255, 228, 181],
  2542. "navajowhite": [255, 222, 173],
  2543. "navy": [0, 0, 128],
  2544. "oldlace": [253, 245, 230],
  2545. "olive": [128, 128, 0],
  2546. "olivedrab": [107, 142, 35],
  2547. "orange": [255, 165, 0],
  2548. "orangered": [255, 69, 0],
  2549. "orchid": [218, 112, 214],
  2550. "palegoldenrod": [238, 232, 170],
  2551. "palegreen": [152, 251, 152],
  2552. "paleturquoise": [175, 238, 238],
  2553. "palevioletred": [219, 112, 147],
  2554. "papayawhip": [255, 239, 213],
  2555. "peachpuff": [255, 218, 185],
  2556. "peru": [205, 133, 63],
  2557. "pink": [255, 192, 203],
  2558. "plum": [221, 160, 221],
  2559. "powderblue": [176, 224, 230],
  2560. "purple": [128, 0, 128],
  2561. "rebeccapurple": [102, 51, 153],
  2562. "red": [255, 0, 0],
  2563. "rosybrown": [188, 143, 143],
  2564. "royalblue": [65, 105, 225],
  2565. "saddlebrown": [139, 69, 19],
  2566. "salmon": [250, 128, 114],
  2567. "sandybrown": [244, 164, 96],
  2568. "seagreen": [46, 139, 87],
  2569. "seashell": [255, 245, 238],
  2570. "sienna": [160, 82, 45],
  2571. "silver": [192, 192, 192],
  2572. "skyblue": [135, 206, 235],
  2573. "slateblue": [106, 90, 205],
  2574. "slategray": [112, 128, 144],
  2575. "slategrey": [112, 128, 144],
  2576. "snow": [255, 250, 250],
  2577. "springgreen": [0, 255, 127],
  2578. "steelblue": [70, 130, 180],
  2579. "tan": [210, 180, 140],
  2580. "teal": [0, 128, 128],
  2581. "thistle": [216, 191, 216],
  2582. "tomato": [255, 99, 71],
  2583. "turquoise": [64, 224, 208],
  2584. "violet": [238, 130, 238],
  2585. "wheat": [245, 222, 179],
  2586. "white": [255, 255, 255],
  2587. "whitesmoke": [245, 245, 245],
  2588. "yellow": [255, 255, 0],
  2589. "yellowgreen": [154, 205, 50]
  2590. };
  2591. /* MIT license */
  2592. var colorString = {
  2593. getRgba: getRgba,
  2594. getHsla: getHsla,
  2595. getRgb: getRgb,
  2596. getHsl: getHsl,
  2597. getHwb: getHwb,
  2598. getAlpha: getAlpha,
  2599. hexString: hexString,
  2600. rgbString: rgbString,
  2601. rgbaString: rgbaString,
  2602. percentString: percentString,
  2603. percentaString: percentaString,
  2604. hslString: hslString,
  2605. hslaString: hslaString,
  2606. hwbString: hwbString,
  2607. keyword: keyword
  2608. };
  2609. function getRgba(string) {
  2610. if (!string) {
  2611. return;
  2612. }
  2613. var abbr = /^#([a-fA-F0-9]{3,4})$/i,
  2614. hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,
  2615. rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,
  2616. per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,
  2617. keyword = /(\w+)/;
  2618. var rgb = [0, 0, 0],
  2619. a = 1,
  2620. match = string.match(abbr),
  2621. hexAlpha = "";
  2622. if (match) {
  2623. match = match[1];
  2624. hexAlpha = match[3];
  2625. for (var i = 0; i < rgb.length; i++) {
  2626. rgb[i] = parseInt(match[i] + match[i], 16);
  2627. }
  2628. if (hexAlpha) {
  2629. a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;
  2630. }
  2631. }
  2632. else if (match = string.match(hex)) {
  2633. hexAlpha = match[2];
  2634. match = match[1];
  2635. for (var i = 0; i < rgb.length; i++) {
  2636. rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);
  2637. }
  2638. if (hexAlpha) {
  2639. a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;
  2640. }
  2641. }
  2642. else if (match = string.match(rgba)) {
  2643. for (var i = 0; i < rgb.length; i++) {
  2644. rgb[i] = parseInt(match[i + 1]);
  2645. }
  2646. a = parseFloat(match[4]);
  2647. }
  2648. else if (match = string.match(per)) {
  2649. for (var i = 0; i < rgb.length; i++) {
  2650. rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
  2651. }
  2652. a = parseFloat(match[4]);
  2653. }
  2654. else if (match = string.match(keyword)) {
  2655. if (match[1] == "transparent") {
  2656. return [0, 0, 0, 0];
  2657. }
  2658. rgb = colorName$1[match[1]];
  2659. if (!rgb) {
  2660. return;
  2661. }
  2662. }
  2663. for (var i = 0; i < rgb.length; i++) {
  2664. rgb[i] = scale(rgb[i], 0, 255);
  2665. }
  2666. if (!a && a != 0) {
  2667. a = 1;
  2668. }
  2669. else {
  2670. a = scale(a, 0, 1);
  2671. }
  2672. rgb[3] = a;
  2673. return rgb;
  2674. }
  2675. function getHsla(string) {
  2676. if (!string) {
  2677. return;
  2678. }
  2679. var hsl = /^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
  2680. var match = string.match(hsl);
  2681. if (match) {
  2682. var alpha = parseFloat(match[4]);
  2683. var h = scale(parseInt(match[1]), 0, 360),
  2684. s = scale(parseFloat(match[2]), 0, 100),
  2685. l = scale(parseFloat(match[3]), 0, 100),
  2686. a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);
  2687. return [h, s, l, a];
  2688. }
  2689. }
  2690. function getHwb(string) {
  2691. if (!string) {
  2692. return;
  2693. }
  2694. var hwb = /^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
  2695. var match = string.match(hwb);
  2696. if (match) {
  2697. var alpha = parseFloat(match[4]);
  2698. var h = scale(parseInt(match[1]), 0, 360),
  2699. w = scale(parseFloat(match[2]), 0, 100),
  2700. b = scale(parseFloat(match[3]), 0, 100),
  2701. a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);
  2702. return [h, w, b, a];
  2703. }
  2704. }
  2705. function getRgb(string) {
  2706. var rgba = getRgba(string);
  2707. return rgba && rgba.slice(0, 3);
  2708. }
  2709. function getHsl(string) {
  2710. var hsla = getHsla(string);
  2711. return hsla && hsla.slice(0, 3);
  2712. }
  2713. function getAlpha(string) {
  2714. var vals = getRgba(string);
  2715. if (vals) {
  2716. return vals[3];
  2717. }
  2718. else if (vals = getHsla(string)) {
  2719. return vals[3];
  2720. }
  2721. else if (vals = getHwb(string)) {
  2722. return vals[3];
  2723. }
  2724. }
  2725. // generators
  2726. function hexString(rgba, a) {
  2727. var a = (a !== undefined && rgba.length === 3) ? a : rgba[3];
  2728. return "#" + hexDouble(rgba[0])
  2729. + hexDouble(rgba[1])
  2730. + hexDouble(rgba[2])
  2731. + (
  2732. (a >= 0 && a < 1)
  2733. ? hexDouble(Math.round(a * 255))
  2734. : ""
  2735. );
  2736. }
  2737. function rgbString(rgba, alpha) {
  2738. if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
  2739. return rgbaString(rgba, alpha);
  2740. }
  2741. return "rgb(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ")";
  2742. }
  2743. function rgbaString(rgba, alpha) {
  2744. if (alpha === undefined) {
  2745. alpha = (rgba[3] !== undefined ? rgba[3] : 1);
  2746. }
  2747. return "rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2]
  2748. + ", " + alpha + ")";
  2749. }
  2750. function percentString(rgba, alpha) {
  2751. if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
  2752. return percentaString(rgba, alpha);
  2753. }
  2754. var r = Math.round(rgba[0]/255 * 100),
  2755. g = Math.round(rgba[1]/255 * 100),
  2756. b = Math.round(rgba[2]/255 * 100);
  2757. return "rgb(" + r + "%, " + g + "%, " + b + "%)";
  2758. }
  2759. function percentaString(rgba, alpha) {
  2760. var r = Math.round(rgba[0]/255 * 100),
  2761. g = Math.round(rgba[1]/255 * 100),
  2762. b = Math.round(rgba[2]/255 * 100);
  2763. return "rgba(" + r + "%, " + g + "%, " + b + "%, " + (alpha || rgba[3] || 1) + ")";
  2764. }
  2765. function hslString(hsla, alpha) {
  2766. if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {
  2767. return hslaString(hsla, alpha);
  2768. }
  2769. return "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)";
  2770. }
  2771. function hslaString(hsla, alpha) {
  2772. if (alpha === undefined) {
  2773. alpha = (hsla[3] !== undefined ? hsla[3] : 1);
  2774. }
  2775. return "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, "
  2776. + alpha + ")";
  2777. }
  2778. // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
  2779. // (hwb have alpha optional & 1 is default value)
  2780. function hwbString(hwb, alpha) {
  2781. if (alpha === undefined) {
  2782. alpha = (hwb[3] !== undefined ? hwb[3] : 1);
  2783. }
  2784. return "hwb(" + hwb[0] + ", " + hwb[1] + "%, " + hwb[2] + "%"
  2785. + (alpha !== undefined && alpha !== 1 ? ", " + alpha : "") + ")";
  2786. }
  2787. function keyword(rgb) {
  2788. return reverseNames[rgb.slice(0, 3)];
  2789. }
  2790. // helpers
  2791. function scale(num, min, max) {
  2792. return Math.min(Math.max(min, num), max);
  2793. }
  2794. function hexDouble(num) {
  2795. var str = num.toString(16).toUpperCase();
  2796. return (str.length < 2) ? "0" + str : str;
  2797. }
  2798. //create a list of reverse color names
  2799. var reverseNames = {};
  2800. for (var name in colorName$1) {
  2801. reverseNames[colorName$1[name]] = name;
  2802. }
  2803. /* MIT license */
  2804. var Color = function (obj) {
  2805. if (obj instanceof Color) {
  2806. return obj;
  2807. }
  2808. if (!(this instanceof Color)) {
  2809. return new Color(obj);
  2810. }
  2811. this.valid = false;
  2812. this.values = {
  2813. rgb: [0, 0, 0],
  2814. hsl: [0, 0, 0],
  2815. hsv: [0, 0, 0],
  2816. hwb: [0, 0, 0],
  2817. cmyk: [0, 0, 0, 0],
  2818. alpha: 1
  2819. };
  2820. // parse Color() argument
  2821. var vals;
  2822. if (typeof obj === 'string') {
  2823. vals = colorString.getRgba(obj);
  2824. if (vals) {
  2825. this.setValues('rgb', vals);
  2826. } else if (vals = colorString.getHsla(obj)) {
  2827. this.setValues('hsl', vals);
  2828. } else if (vals = colorString.getHwb(obj)) {
  2829. this.setValues('hwb', vals);
  2830. }
  2831. } else if (typeof obj === 'object') {
  2832. vals = obj;
  2833. if (vals.r !== undefined || vals.red !== undefined) {
  2834. this.setValues('rgb', vals);
  2835. } else if (vals.l !== undefined || vals.lightness !== undefined) {
  2836. this.setValues('hsl', vals);
  2837. } else if (vals.v !== undefined || vals.value !== undefined) {
  2838. this.setValues('hsv', vals);
  2839. } else if (vals.w !== undefined || vals.whiteness !== undefined) {
  2840. this.setValues('hwb', vals);
  2841. } else if (vals.c !== undefined || vals.cyan !== undefined) {
  2842. this.setValues('cmyk', vals);
  2843. }
  2844. }
  2845. };
  2846. Color.prototype = {
  2847. isValid: function () {
  2848. return this.valid;
  2849. },
  2850. rgb: function () {
  2851. return this.setSpace('rgb', arguments);
  2852. },
  2853. hsl: function () {
  2854. return this.setSpace('hsl', arguments);
  2855. },
  2856. hsv: function () {
  2857. return this.setSpace('hsv', arguments);
  2858. },
  2859. hwb: function () {
  2860. return this.setSpace('hwb', arguments);
  2861. },
  2862. cmyk: function () {
  2863. return this.setSpace('cmyk', arguments);
  2864. },
  2865. rgbArray: function () {
  2866. return this.values.rgb;
  2867. },
  2868. hslArray: function () {
  2869. return this.values.hsl;
  2870. },
  2871. hsvArray: function () {
  2872. return this.values.hsv;
  2873. },
  2874. hwbArray: function () {
  2875. var values = this.values;
  2876. if (values.alpha !== 1) {
  2877. return values.hwb.concat([values.alpha]);
  2878. }
  2879. return values.hwb;
  2880. },
  2881. cmykArray: function () {
  2882. return this.values.cmyk;
  2883. },
  2884. rgbaArray: function () {
  2885. var values = this.values;
  2886. return values.rgb.concat([values.alpha]);
  2887. },
  2888. hslaArray: function () {
  2889. var values = this.values;
  2890. return values.hsl.concat([values.alpha]);
  2891. },
  2892. alpha: function (val) {
  2893. if (val === undefined) {
  2894. return this.values.alpha;
  2895. }
  2896. this.setValues('alpha', val);
  2897. return this;
  2898. },
  2899. red: function (val) {
  2900. return this.setChannel('rgb', 0, val);
  2901. },
  2902. green: function (val) {
  2903. return this.setChannel('rgb', 1, val);
  2904. },
  2905. blue: function (val) {
  2906. return this.setChannel('rgb', 2, val);
  2907. },
  2908. hue: function (val) {
  2909. if (val) {
  2910. val %= 360;
  2911. val = val < 0 ? 360 + val : val;
  2912. }
  2913. return this.setChannel('hsl', 0, val);
  2914. },
  2915. saturation: function (val) {
  2916. return this.setChannel('hsl', 1, val);
  2917. },
  2918. lightness: function (val) {
  2919. return this.setChannel('hsl', 2, val);
  2920. },
  2921. saturationv: function (val) {
  2922. return this.setChannel('hsv', 1, val);
  2923. },
  2924. whiteness: function (val) {
  2925. return this.setChannel('hwb', 1, val);
  2926. },
  2927. blackness: function (val) {
  2928. return this.setChannel('hwb', 2, val);
  2929. },
  2930. value: function (val) {
  2931. return this.setChannel('hsv', 2, val);
  2932. },
  2933. cyan: function (val) {
  2934. return this.setChannel('cmyk', 0, val);
  2935. },
  2936. magenta: function (val) {
  2937. return this.setChannel('cmyk', 1, val);
  2938. },
  2939. yellow: function (val) {
  2940. return this.setChannel('cmyk', 2, val);
  2941. },
  2942. black: function (val) {
  2943. return this.setChannel('cmyk', 3, val);
  2944. },
  2945. hexString: function () {
  2946. return colorString.hexString(this.values.rgb);
  2947. },
  2948. rgbString: function () {
  2949. return colorString.rgbString(this.values.rgb, this.values.alpha);
  2950. },
  2951. rgbaString: function () {
  2952. return colorString.rgbaString(this.values.rgb, this.values.alpha);
  2953. },
  2954. percentString: function () {
  2955. return colorString.percentString(this.values.rgb, this.values.alpha);
  2956. },
  2957. hslString: function () {
  2958. return colorString.hslString(this.values.hsl, this.values.alpha);
  2959. },
  2960. hslaString: function () {
  2961. return colorString.hslaString(this.values.hsl, this.values.alpha);
  2962. },
  2963. hwbString: function () {
  2964. return colorString.hwbString(this.values.hwb, this.values.alpha);
  2965. },
  2966. keyword: function () {
  2967. return colorString.keyword(this.values.rgb, this.values.alpha);
  2968. },
  2969. rgbNumber: function () {
  2970. var rgb = this.values.rgb;
  2971. return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];
  2972. },
  2973. luminosity: function () {
  2974. // http://www.w3.org/TR/WCAG20/#relativeluminancedef
  2975. var rgb = this.values.rgb;
  2976. var lum = [];
  2977. for (var i = 0; i < rgb.length; i++) {
  2978. var chan = rgb[i] / 255;
  2979. lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
  2980. }
  2981. return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
  2982. },
  2983. contrast: function (color2) {
  2984. // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
  2985. var lum1 = this.luminosity();
  2986. var lum2 = color2.luminosity();
  2987. if (lum1 > lum2) {
  2988. return (lum1 + 0.05) / (lum2 + 0.05);
  2989. }
  2990. return (lum2 + 0.05) / (lum1 + 0.05);
  2991. },
  2992. level: function (color2) {
  2993. var contrastRatio = this.contrast(color2);
  2994. if (contrastRatio >= 7.1) {
  2995. return 'AAA';
  2996. }
  2997. return (contrastRatio >= 4.5) ? 'AA' : '';
  2998. },
  2999. dark: function () {
  3000. // YIQ equation from http://24ways.org/2010/calculating-color-contrast
  3001. var rgb = this.values.rgb;
  3002. var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
  3003. return yiq < 128;
  3004. },
  3005. light: function () {
  3006. return !this.dark();
  3007. },
  3008. negate: function () {
  3009. var rgb = [];
  3010. for (var i = 0; i < 3; i++) {
  3011. rgb[i] = 255 - this.values.rgb[i];
  3012. }
  3013. this.setValues('rgb', rgb);
  3014. return this;
  3015. },
  3016. lighten: function (ratio) {
  3017. var hsl = this.values.hsl;
  3018. hsl[2] += hsl[2] * ratio;
  3019. this.setValues('hsl', hsl);
  3020. return this;
  3021. },
  3022. darken: function (ratio) {
  3023. var hsl = this.values.hsl;
  3024. hsl[2] -= hsl[2] * ratio;
  3025. this.setValues('hsl', hsl);
  3026. return this;
  3027. },
  3028. saturate: function (ratio) {
  3029. var hsl = this.values.hsl;
  3030. hsl[1] += hsl[1] * ratio;
  3031. this.setValues('hsl', hsl);
  3032. return this;
  3033. },
  3034. desaturate: function (ratio) {
  3035. var hsl = this.values.hsl;
  3036. hsl[1] -= hsl[1] * ratio;
  3037. this.setValues('hsl', hsl);
  3038. return this;
  3039. },
  3040. whiten: function (ratio) {
  3041. var hwb = this.values.hwb;
  3042. hwb[1] += hwb[1] * ratio;
  3043. this.setValues('hwb', hwb);
  3044. return this;
  3045. },
  3046. blacken: function (ratio) {
  3047. var hwb = this.values.hwb;
  3048. hwb[2] += hwb[2] * ratio;
  3049. this.setValues('hwb', hwb);
  3050. return this;
  3051. },
  3052. greyscale: function () {
  3053. var rgb = this.values.rgb;
  3054. // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
  3055. var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
  3056. this.setValues('rgb', [val, val, val]);
  3057. return this;
  3058. },
  3059. clearer: function (ratio) {
  3060. var alpha = this.values.alpha;
  3061. this.setValues('alpha', alpha - (alpha * ratio));
  3062. return this;
  3063. },
  3064. opaquer: function (ratio) {
  3065. var alpha = this.values.alpha;
  3066. this.setValues('alpha', alpha + (alpha * ratio));
  3067. return this;
  3068. },
  3069. rotate: function (degrees) {
  3070. var hsl = this.values.hsl;
  3071. var hue = (hsl[0] + degrees) % 360;
  3072. hsl[0] = hue < 0 ? 360 + hue : hue;
  3073. this.setValues('hsl', hsl);
  3074. return this;
  3075. },
  3076. /**
  3077. * Ported from sass implementation in C
  3078. * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
  3079. */
  3080. mix: function (mixinColor, weight) {
  3081. var color1 = this;
  3082. var color2 = mixinColor;
  3083. var p = weight === undefined ? 0.5 : weight;
  3084. var w = 2 * p - 1;
  3085. var a = color1.alpha() - color2.alpha();
  3086. var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
  3087. var w2 = 1 - w1;
  3088. return this
  3089. .rgb(
  3090. w1 * color1.red() + w2 * color2.red(),
  3091. w1 * color1.green() + w2 * color2.green(),
  3092. w1 * color1.blue() + w2 * color2.blue()
  3093. )
  3094. .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
  3095. },
  3096. toJSON: function () {
  3097. return this.rgb();
  3098. },
  3099. clone: function () {
  3100. // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
  3101. // making the final build way to big to embed in Chart.js. So let's do it manually,
  3102. // assuming that values to clone are 1 dimension arrays containing only numbers,
  3103. // except 'alpha' which is a number.
  3104. var result = new Color();
  3105. var source = this.values;
  3106. var target = result.values;
  3107. var value, type;
  3108. for (var prop in source) {
  3109. if (source.hasOwnProperty(prop)) {
  3110. value = source[prop];
  3111. type = ({}).toString.call(value);
  3112. if (type === '[object Array]') {
  3113. target[prop] = value.slice(0);
  3114. } else if (type === '[object Number]') {
  3115. target[prop] = value;
  3116. } else {
  3117. console.error('unexpected color value:', value);
  3118. }
  3119. }
  3120. }
  3121. return result;
  3122. }
  3123. };
  3124. Color.prototype.spaces = {
  3125. rgb: ['red', 'green', 'blue'],
  3126. hsl: ['hue', 'saturation', 'lightness'],
  3127. hsv: ['hue', 'saturation', 'value'],
  3128. hwb: ['hue', 'whiteness', 'blackness'],
  3129. cmyk: ['cyan', 'magenta', 'yellow', 'black']
  3130. };
  3131. Color.prototype.maxes = {
  3132. rgb: [255, 255, 255],
  3133. hsl: [360, 100, 100],
  3134. hsv: [360, 100, 100],
  3135. hwb: [360, 100, 100],
  3136. cmyk: [100, 100, 100, 100]
  3137. };
  3138. Color.prototype.getValues = function (space) {
  3139. var values = this.values;
  3140. var vals = {};
  3141. for (var i = 0; i < space.length; i++) {
  3142. vals[space.charAt(i)] = values[space][i];
  3143. }
  3144. if (values.alpha !== 1) {
  3145. vals.a = values.alpha;
  3146. }
  3147. // {r: 255, g: 255, b: 255, a: 0.4}
  3148. return vals;
  3149. };
  3150. Color.prototype.setValues = function (space, vals) {
  3151. var values = this.values;
  3152. var spaces = this.spaces;
  3153. var maxes = this.maxes;
  3154. var alpha = 1;
  3155. var i;
  3156. this.valid = true;
  3157. if (space === 'alpha') {
  3158. alpha = vals;
  3159. } else if (vals.length) {
  3160. // [10, 10, 10]
  3161. values[space] = vals.slice(0, space.length);
  3162. alpha = vals[space.length];
  3163. } else if (vals[space.charAt(0)] !== undefined) {
  3164. // {r: 10, g: 10, b: 10}
  3165. for (i = 0; i < space.length; i++) {
  3166. values[space][i] = vals[space.charAt(i)];
  3167. }
  3168. alpha = vals.a;
  3169. } else if (vals[spaces[space][0]] !== undefined) {
  3170. // {red: 10, green: 10, blue: 10}
  3171. var chans = spaces[space];
  3172. for (i = 0; i < space.length; i++) {
  3173. values[space][i] = vals[chans[i]];
  3174. }
  3175. alpha = vals.alpha;
  3176. }
  3177. values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
  3178. if (space === 'alpha') {
  3179. return false;
  3180. }
  3181. var capped;
  3182. // cap values of the space prior converting all values
  3183. for (i = 0; i < space.length; i++) {
  3184. capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
  3185. values[space][i] = Math.round(capped);
  3186. }
  3187. // convert to all the other color spaces
  3188. for (var sname in spaces) {
  3189. if (sname !== space) {
  3190. values[sname] = colorConvert[space][sname](values[space]);
  3191. }
  3192. }
  3193. return true;
  3194. };
  3195. Color.prototype.setSpace = function (space, args) {
  3196. var vals = args[0];
  3197. if (vals === undefined) {
  3198. // color.rgb()
  3199. return this.getValues(space);
  3200. }
  3201. // color.rgb(10, 10, 10)
  3202. if (typeof vals === 'number') {
  3203. vals = Array.prototype.slice.call(args);
  3204. }
  3205. this.setValues(space, vals);
  3206. return this;
  3207. };
  3208. Color.prototype.setChannel = function (space, index, val) {
  3209. var svalues = this.values[space];
  3210. if (val === undefined) {
  3211. // color.red()
  3212. return svalues[index];
  3213. } else if (val === svalues[index]) {
  3214. // color.red(color.red())
  3215. return this;
  3216. }
  3217. // color.red(100)
  3218. svalues[index] = val;
  3219. this.setValues(space, svalues);
  3220. return this;
  3221. };
  3222. if (typeof window !== 'undefined') {
  3223. window.Color = Color;
  3224. }
  3225. var chartjsColor = Color;
  3226. function isValidKey(key) {
  3227. return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;
  3228. }
  3229. /**
  3230. * @namespace Chart.helpers
  3231. */
  3232. var helpers = {
  3233. /**
  3234. * An empty function that can be used, for example, for optional callback.
  3235. */
  3236. noop: function() {},
  3237. /**
  3238. * Returns a unique id, sequentially generated from a global variable.
  3239. * @returns {number}
  3240. * @function
  3241. */
  3242. uid: (function() {
  3243. var id = 0;
  3244. return function() {
  3245. return id++;
  3246. };
  3247. }()),
  3248. /**
  3249. * Returns true if `value` is neither null nor undefined, else returns false.
  3250. * @param {*} value - The value to test.
  3251. * @returns {boolean}
  3252. * @since 2.7.0
  3253. */
  3254. isNullOrUndef: function(value) {
  3255. return value === null || typeof value === 'undefined';
  3256. },
  3257. /**
  3258. * Returns true if `value` is an array (including typed arrays), else returns false.
  3259. * @param {*} value - The value to test.
  3260. * @returns {boolean}
  3261. * @function
  3262. */
  3263. isArray: function(value) {
  3264. if (Array.isArray && Array.isArray(value)) {
  3265. return true;
  3266. }
  3267. var type = Object.prototype.toString.call(value);
  3268. if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
  3269. return true;
  3270. }
  3271. return false;
  3272. },
  3273. /**
  3274. * Returns true if `value` is an object (excluding null), else returns false.
  3275. * @param {*} value - The value to test.
  3276. * @returns {boolean}
  3277. * @since 2.7.0
  3278. */
  3279. isObject: function(value) {
  3280. return value !== null && Object.prototype.toString.call(value) === '[object Object]';
  3281. },
  3282. /**
  3283. * Returns true if `value` is a finite number, else returns false
  3284. * @param {*} value - The value to test.
  3285. * @returns {boolean}
  3286. */
  3287. isFinite: function(value) {
  3288. return (typeof value === 'number' || value instanceof Number) && isFinite(value);
  3289. },
  3290. /**
  3291. * Returns `value` if defined, else returns `defaultValue`.
  3292. * @param {*} value - The value to return if defined.
  3293. * @param {*} defaultValue - The value to return if `value` is undefined.
  3294. * @returns {*}
  3295. */
  3296. valueOrDefault: function(value, defaultValue) {
  3297. return typeof value === 'undefined' ? defaultValue : value;
  3298. },
  3299. /**
  3300. * Returns value at the given `index` in array if defined, else returns `defaultValue`.
  3301. * @param {Array} value - The array to lookup for value at `index`.
  3302. * @param {number} index - The index in `value` to lookup for value.
  3303. * @param {*} defaultValue - The value to return if `value[index]` is undefined.
  3304. * @returns {*}
  3305. */
  3306. valueAtIndexOrDefault: function(value, index, defaultValue) {
  3307. return helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);
  3308. },
  3309. /**
  3310. * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the
  3311. * value returned by `fn`. If `fn` is not a function, this method returns undefined.
  3312. * @param {function} fn - The function to call.
  3313. * @param {Array|undefined|null} args - The arguments with which `fn` should be called.
  3314. * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.
  3315. * @returns {*}
  3316. */
  3317. callback: function(fn, args, thisArg) {
  3318. if (fn && typeof fn.call === 'function') {
  3319. return fn.apply(thisArg, args);
  3320. }
  3321. },
  3322. /**
  3323. * Note(SB) for performance sake, this method should only be used when loopable type
  3324. * is unknown or in none intensive code (not called often and small loopable). Else
  3325. * it's preferable to use a regular for() loop and save extra function calls.
  3326. * @param {object|Array} loopable - The object or array to be iterated.
  3327. * @param {function} fn - The function to call for each item.
  3328. * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.
  3329. * @param {boolean} [reverse] - If true, iterates backward on the loopable.
  3330. */
  3331. each: function(loopable, fn, thisArg, reverse) {
  3332. var i, len, keys;
  3333. if (helpers.isArray(loopable)) {
  3334. len = loopable.length;
  3335. if (reverse) {
  3336. for (i = len - 1; i >= 0; i--) {
  3337. fn.call(thisArg, loopable[i], i);
  3338. }
  3339. } else {
  3340. for (i = 0; i < len; i++) {
  3341. fn.call(thisArg, loopable[i], i);
  3342. }
  3343. }
  3344. } else if (helpers.isObject(loopable)) {
  3345. keys = Object.keys(loopable);
  3346. len = keys.length;
  3347. for (i = 0; i < len; i++) {
  3348. fn.call(thisArg, loopable[keys[i]], keys[i]);
  3349. }
  3350. }
  3351. },
  3352. /**
  3353. * Returns true if the `a0` and `a1` arrays have the same content, else returns false.
  3354. * @see https://stackoverflow.com/a/14853974
  3355. * @param {Array} a0 - The array to compare
  3356. * @param {Array} a1 - The array to compare
  3357. * @returns {boolean}
  3358. */
  3359. arrayEquals: function(a0, a1) {
  3360. var i, ilen, v0, v1;
  3361. if (!a0 || !a1 || a0.length !== a1.length) {
  3362. return false;
  3363. }
  3364. for (i = 0, ilen = a0.length; i < ilen; ++i) {
  3365. v0 = a0[i];
  3366. v1 = a1[i];
  3367. if (v0 instanceof Array && v1 instanceof Array) {
  3368. if (!helpers.arrayEquals(v0, v1)) {
  3369. return false;
  3370. }
  3371. } else if (v0 !== v1) {
  3372. // NOTE: two different object instances will never be equal: {x:20} != {x:20}
  3373. return false;
  3374. }
  3375. }
  3376. return true;
  3377. },
  3378. /**
  3379. * Returns a deep copy of `source` without keeping references on objects and arrays.
  3380. * @param {*} source - The value to clone.
  3381. * @returns {*}
  3382. */
  3383. clone: function(source) {
  3384. if (helpers.isArray(source)) {
  3385. return source.map(helpers.clone);
  3386. }
  3387. if (helpers.isObject(source)) {
  3388. var target = Object.create(source);
  3389. var keys = Object.keys(source);
  3390. var klen = keys.length;
  3391. var k = 0;
  3392. for (; k < klen; ++k) {
  3393. target[keys[k]] = helpers.clone(source[keys[k]]);
  3394. }
  3395. return target;
  3396. }
  3397. return source;
  3398. },
  3399. /**
  3400. * The default merger when Chart.helpers.merge is called without merger option.
  3401. * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.
  3402. * @private
  3403. */
  3404. _merger: function(key, target, source, options) {
  3405. if (!isValidKey(key)) {
  3406. // We want to ensure we do not copy prototypes over
  3407. // as this can pollute global namespaces
  3408. return;
  3409. }
  3410. var tval = target[key];
  3411. var sval = source[key];
  3412. if (helpers.isObject(tval) && helpers.isObject(sval)) {
  3413. helpers.merge(tval, sval, options);
  3414. } else {
  3415. target[key] = helpers.clone(sval);
  3416. }
  3417. },
  3418. /**
  3419. * Merges source[key] in target[key] only if target[key] is undefined.
  3420. * @private
  3421. */
  3422. _mergerIf: function(key, target, source) {
  3423. if (!isValidKey(key)) {
  3424. // We want to ensure we do not copy prototypes over
  3425. // as this can pollute global namespaces
  3426. return;
  3427. }
  3428. var tval = target[key];
  3429. var sval = source[key];
  3430. if (helpers.isObject(tval) && helpers.isObject(sval)) {
  3431. helpers.mergeIf(tval, sval);
  3432. } else if (!target.hasOwnProperty(key)) {
  3433. target[key] = helpers.clone(sval);
  3434. }
  3435. },
  3436. /**
  3437. * Recursively deep copies `source` properties into `target` with the given `options`.
  3438. * IMPORTANT: `target` is not cloned and will be updated with `source` properties.
  3439. * @param {object} target - The target object in which all sources are merged into.
  3440. * @param {object|object[]} source - Object(s) to merge into `target`.
  3441. * @param {object} [options] - Merging options:
  3442. * @param {function} [options.merger] - The merge method (key, target, source, options)
  3443. * @returns {object} The `target` object.
  3444. */
  3445. merge: function(target, source, options) {
  3446. var sources = helpers.isArray(source) ? source : [source];
  3447. var ilen = sources.length;
  3448. var merge, i, keys, klen, k;
  3449. if (!helpers.isObject(target)) {
  3450. return target;
  3451. }
  3452. options = options || {};
  3453. merge = options.merger || helpers._merger;
  3454. for (i = 0; i < ilen; ++i) {
  3455. source = sources[i];
  3456. if (!helpers.isObject(source)) {
  3457. continue;
  3458. }
  3459. keys = Object.keys(source);
  3460. for (k = 0, klen = keys.length; k < klen; ++k) {
  3461. merge(keys[k], target, source, options);
  3462. }
  3463. }
  3464. return target;
  3465. },
  3466. /**
  3467. * Recursively deep copies `source` properties into `target` *only* if not defined in target.
  3468. * IMPORTANT: `target` is not cloned and will be updated with `source` properties.
  3469. * @param {object} target - The target object in which all sources are merged into.
  3470. * @param {object|object[]} source - Object(s) to merge into `target`.
  3471. * @returns {object} The `target` object.
  3472. */
  3473. mergeIf: function(target, source) {
  3474. return helpers.merge(target, source, {merger: helpers._mergerIf});
  3475. },
  3476. /**
  3477. * Applies the contents of two or more objects together into the first object.
  3478. * @param {object} target - The target object in which all objects are merged into.
  3479. * @param {object} arg1 - Object containing additional properties to merge in target.
  3480. * @param {object} argN - Additional objects containing properties to merge in target.
  3481. * @returns {object} The `target` object.
  3482. */
  3483. extend: Object.assign || function(target) {
  3484. return helpers.merge(target, [].slice.call(arguments, 1), {
  3485. merger: function(key, dst, src) {
  3486. dst[key] = src[key];
  3487. }
  3488. });
  3489. },
  3490. /**
  3491. * Basic javascript inheritance based on the model created in Backbone.js
  3492. */
  3493. inherits: function(extensions) {
  3494. var me = this;
  3495. var ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {
  3496. return me.apply(this, arguments);
  3497. };
  3498. var Surrogate = function() {
  3499. this.constructor = ChartElement;
  3500. };
  3501. Surrogate.prototype = me.prototype;
  3502. ChartElement.prototype = new Surrogate();
  3503. ChartElement.extend = helpers.inherits;
  3504. if (extensions) {
  3505. helpers.extend(ChartElement.prototype, extensions);
  3506. }
  3507. ChartElement.__super__ = me.prototype;
  3508. return ChartElement;
  3509. },
  3510. _deprecated: function(scope, value, previous, current) {
  3511. if (value !== undefined) {
  3512. console.warn(scope + ': "' + previous +
  3513. '" is deprecated. Please use "' + current + '" instead');
  3514. }
  3515. }
  3516. };
  3517. var helpers_core = helpers;
  3518. // DEPRECATIONS
  3519. /**
  3520. * Provided for backward compatibility, use Chart.helpers.callback instead.
  3521. * @function Chart.helpers.callCallback
  3522. * @deprecated since version 2.6.0
  3523. * @todo remove at version 3
  3524. * @private
  3525. */
  3526. helpers.callCallback = helpers.callback;
  3527. /**
  3528. * Provided for backward compatibility, use Array.prototype.indexOf instead.
  3529. * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+
  3530. * @function Chart.helpers.indexOf
  3531. * @deprecated since version 2.7.0
  3532. * @todo remove at version 3
  3533. * @private
  3534. */
  3535. helpers.indexOf = function(array, item, fromIndex) {
  3536. return Array.prototype.indexOf.call(array, item, fromIndex);
  3537. };
  3538. /**
  3539. * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.
  3540. * @function Chart.helpers.getValueOrDefault
  3541. * @deprecated since version 2.7.0
  3542. * @todo remove at version 3
  3543. * @private
  3544. */
  3545. helpers.getValueOrDefault = helpers.valueOrDefault;
  3546. /**
  3547. * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.
  3548. * @function Chart.helpers.getValueAtIndexOrDefault
  3549. * @deprecated since version 2.7.0
  3550. * @todo remove at version 3
  3551. * @private
  3552. */
  3553. helpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;
  3554. /**
  3555. * Easing functions adapted from Robert Penner's easing equations.
  3556. * @namespace Chart.helpers.easingEffects
  3557. * @see http://www.robertpenner.com/easing/
  3558. */
  3559. var effects = {
  3560. linear: function(t) {
  3561. return t;
  3562. },
  3563. easeInQuad: function(t) {
  3564. return t * t;
  3565. },
  3566. easeOutQuad: function(t) {
  3567. return -t * (t - 2);
  3568. },
  3569. easeInOutQuad: function(t) {
  3570. if ((t /= 0.5) < 1) {
  3571. return 0.5 * t * t;
  3572. }
  3573. return -0.5 * ((--t) * (t - 2) - 1);
  3574. },
  3575. easeInCubic: function(t) {
  3576. return t * t * t;
  3577. },
  3578. easeOutCubic: function(t) {
  3579. return (t = t - 1) * t * t + 1;
  3580. },
  3581. easeInOutCubic: function(t) {
  3582. if ((t /= 0.5) < 1) {
  3583. return 0.5 * t * t * t;
  3584. }
  3585. return 0.5 * ((t -= 2) * t * t + 2);
  3586. },
  3587. easeInQuart: function(t) {
  3588. return t * t * t * t;
  3589. },
  3590. easeOutQuart: function(t) {
  3591. return -((t = t - 1) * t * t * t - 1);
  3592. },
  3593. easeInOutQuart: function(t) {
  3594. if ((t /= 0.5) < 1) {
  3595. return 0.5 * t * t * t * t;
  3596. }
  3597. return -0.5 * ((t -= 2) * t * t * t - 2);
  3598. },
  3599. easeInQuint: function(t) {
  3600. return t * t * t * t * t;
  3601. },
  3602. easeOutQuint: function(t) {
  3603. return (t = t - 1) * t * t * t * t + 1;
  3604. },
  3605. easeInOutQuint: function(t) {
  3606. if ((t /= 0.5) < 1) {
  3607. return 0.5 * t * t * t * t * t;
  3608. }
  3609. return 0.5 * ((t -= 2) * t * t * t * t + 2);
  3610. },
  3611. easeInSine: function(t) {
  3612. return -Math.cos(t * (Math.PI / 2)) + 1;
  3613. },
  3614. easeOutSine: function(t) {
  3615. return Math.sin(t * (Math.PI / 2));
  3616. },
  3617. easeInOutSine: function(t) {
  3618. return -0.5 * (Math.cos(Math.PI * t) - 1);
  3619. },
  3620. easeInExpo: function(t) {
  3621. return (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));
  3622. },
  3623. easeOutExpo: function(t) {
  3624. return (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;
  3625. },
  3626. easeInOutExpo: function(t) {
  3627. if (t === 0) {
  3628. return 0;
  3629. }
  3630. if (t === 1) {
  3631. return 1;
  3632. }
  3633. if ((t /= 0.5) < 1) {
  3634. return 0.5 * Math.pow(2, 10 * (t - 1));
  3635. }
  3636. return 0.5 * (-Math.pow(2, -10 * --t) + 2);
  3637. },
  3638. easeInCirc: function(t) {
  3639. if (t >= 1) {
  3640. return t;
  3641. }
  3642. return -(Math.sqrt(1 - t * t) - 1);
  3643. },
  3644. easeOutCirc: function(t) {
  3645. return Math.sqrt(1 - (t = t - 1) * t);
  3646. },
  3647. easeInOutCirc: function(t) {
  3648. if ((t /= 0.5) < 1) {
  3649. return -0.5 * (Math.sqrt(1 - t * t) - 1);
  3650. }
  3651. return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  3652. },
  3653. easeInElastic: function(t) {
  3654. var s = 1.70158;
  3655. var p = 0;
  3656. var a = 1;
  3657. if (t === 0) {
  3658. return 0;
  3659. }
  3660. if (t === 1) {
  3661. return 1;
  3662. }
  3663. if (!p) {
  3664. p = 0.3;
  3665. }
  3666. if (a < 1) {
  3667. a = 1;
  3668. s = p / 4;
  3669. } else {
  3670. s = p / (2 * Math.PI) * Math.asin(1 / a);
  3671. }
  3672. return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));
  3673. },
  3674. easeOutElastic: function(t) {
  3675. var s = 1.70158;
  3676. var p = 0;
  3677. var a = 1;
  3678. if (t === 0) {
  3679. return 0;
  3680. }
  3681. if (t === 1) {
  3682. return 1;
  3683. }
  3684. if (!p) {
  3685. p = 0.3;
  3686. }
  3687. if (a < 1) {
  3688. a = 1;
  3689. s = p / 4;
  3690. } else {
  3691. s = p / (2 * Math.PI) * Math.asin(1 / a);
  3692. }
  3693. return a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;
  3694. },
  3695. easeInOutElastic: function(t) {
  3696. var s = 1.70158;
  3697. var p = 0;
  3698. var a = 1;
  3699. if (t === 0) {
  3700. return 0;
  3701. }
  3702. if ((t /= 0.5) === 2) {
  3703. return 1;
  3704. }
  3705. if (!p) {
  3706. p = 0.45;
  3707. }
  3708. if (a < 1) {
  3709. a = 1;
  3710. s = p / 4;
  3711. } else {
  3712. s = p / (2 * Math.PI) * Math.asin(1 / a);
  3713. }
  3714. if (t < 1) {
  3715. return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));
  3716. }
  3717. return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;
  3718. },
  3719. easeInBack: function(t) {
  3720. var s = 1.70158;
  3721. return t * t * ((s + 1) * t - s);
  3722. },
  3723. easeOutBack: function(t) {
  3724. var s = 1.70158;
  3725. return (t = t - 1) * t * ((s + 1) * t + s) + 1;
  3726. },
  3727. easeInOutBack: function(t) {
  3728. var s = 1.70158;
  3729. if ((t /= 0.5) < 1) {
  3730. return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));
  3731. }
  3732. return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
  3733. },
  3734. easeInBounce: function(t) {
  3735. return 1 - effects.easeOutBounce(1 - t);
  3736. },
  3737. easeOutBounce: function(t) {
  3738. if (t < (1 / 2.75)) {
  3739. return 7.5625 * t * t;
  3740. }
  3741. if (t < (2 / 2.75)) {
  3742. return 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;
  3743. }
  3744. if (t < (2.5 / 2.75)) {
  3745. return 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;
  3746. }
  3747. return 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;
  3748. },
  3749. easeInOutBounce: function(t) {
  3750. if (t < 0.5) {
  3751. return effects.easeInBounce(t * 2) * 0.5;
  3752. }
  3753. return effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;
  3754. }
  3755. };
  3756. var helpers_easing = {
  3757. effects: effects
  3758. };
  3759. // DEPRECATIONS
  3760. /**
  3761. * Provided for backward compatibility, use Chart.helpers.easing.effects instead.
  3762. * @function Chart.helpers.easingEffects
  3763. * @deprecated since version 2.7.0
  3764. * @todo remove at version 3
  3765. * @private
  3766. */
  3767. helpers_core.easingEffects = effects;
  3768. var PI = Math.PI;
  3769. var RAD_PER_DEG = PI / 180;
  3770. var DOUBLE_PI = PI * 2;
  3771. var HALF_PI = PI / 2;
  3772. var QUARTER_PI = PI / 4;
  3773. var TWO_THIRDS_PI = PI * 2 / 3;
  3774. /**
  3775. * @namespace Chart.helpers.canvas
  3776. */
  3777. var exports$1 = {
  3778. /**
  3779. * Clears the entire canvas associated to the given `chart`.
  3780. * @param {Chart} chart - The chart for which to clear the canvas.
  3781. */
  3782. clear: function(chart) {
  3783. chart.ctx.clearRect(0, 0, chart.width, chart.height);
  3784. },
  3785. /**
  3786. * Creates a "path" for a rectangle with rounded corners at position (x, y) with a
  3787. * given size (width, height) and the same `radius` for all corners.
  3788. * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.
  3789. * @param {number} x - The x axis of the coordinate for the rectangle starting point.
  3790. * @param {number} y - The y axis of the coordinate for the rectangle starting point.
  3791. * @param {number} width - The rectangle's width.
  3792. * @param {number} height - The rectangle's height.
  3793. * @param {number} radius - The rounded amount (in pixels) for the four corners.
  3794. * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?
  3795. */
  3796. roundedRect: function(ctx, x, y, width, height, radius) {
  3797. if (radius) {
  3798. var r = Math.min(radius, height / 2, width / 2);
  3799. var left = x + r;
  3800. var top = y + r;
  3801. var right = x + width - r;
  3802. var bottom = y + height - r;
  3803. ctx.moveTo(x, top);
  3804. if (left < right && top < bottom) {
  3805. ctx.arc(left, top, r, -PI, -HALF_PI);
  3806. ctx.arc(right, top, r, -HALF_PI, 0);
  3807. ctx.arc(right, bottom, r, 0, HALF_PI);
  3808. ctx.arc(left, bottom, r, HALF_PI, PI);
  3809. } else if (left < right) {
  3810. ctx.moveTo(left, y);
  3811. ctx.arc(right, top, r, -HALF_PI, HALF_PI);
  3812. ctx.arc(left, top, r, HALF_PI, PI + HALF_PI);
  3813. } else if (top < bottom) {
  3814. ctx.arc(left, top, r, -PI, 0);
  3815. ctx.arc(left, bottom, r, 0, PI);
  3816. } else {
  3817. ctx.arc(left, top, r, -PI, PI);
  3818. }
  3819. ctx.closePath();
  3820. ctx.moveTo(x, y);
  3821. } else {
  3822. ctx.rect(x, y, width, height);
  3823. }
  3824. },
  3825. drawPoint: function(ctx, style, radius, x, y, rotation) {
  3826. var type, xOffset, yOffset, size, cornerRadius;
  3827. var rad = (rotation || 0) * RAD_PER_DEG;
  3828. if (style && typeof style === 'object') {
  3829. type = style.toString();
  3830. if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {
  3831. ctx.save();
  3832. ctx.translate(x, y);
  3833. ctx.rotate(rad);
  3834. ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);
  3835. ctx.restore();
  3836. return;
  3837. }
  3838. }
  3839. if (isNaN(radius) || radius <= 0) {
  3840. return;
  3841. }
  3842. ctx.beginPath();
  3843. switch (style) {
  3844. // Default includes circle
  3845. default:
  3846. ctx.arc(x, y, radius, 0, DOUBLE_PI);
  3847. ctx.closePath();
  3848. break;
  3849. case 'triangle':
  3850. ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
  3851. rad += TWO_THIRDS_PI;
  3852. ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
  3853. rad += TWO_THIRDS_PI;
  3854. ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
  3855. ctx.closePath();
  3856. break;
  3857. case 'rectRounded':
  3858. // NOTE: the rounded rect implementation changed to use `arc` instead of
  3859. // `quadraticCurveTo` since it generates better results when rect is
  3860. // almost a circle. 0.516 (instead of 0.5) produces results with visually
  3861. // closer proportion to the previous impl and it is inscribed in the
  3862. // circle with `radius`. For more details, see the following PRs:
  3863. // https://github.com/chartjs/Chart.js/issues/5597
  3864. // https://github.com/chartjs/Chart.js/issues/5858
  3865. cornerRadius = radius * 0.516;
  3866. size = radius - cornerRadius;
  3867. xOffset = Math.cos(rad + QUARTER_PI) * size;
  3868. yOffset = Math.sin(rad + QUARTER_PI) * size;
  3869. ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);
  3870. ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);
  3871. ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);
  3872. ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);
  3873. ctx.closePath();
  3874. break;
  3875. case 'rect':
  3876. if (!rotation) {
  3877. size = Math.SQRT1_2 * radius;
  3878. ctx.rect(x - size, y - size, 2 * size, 2 * size);
  3879. break;
  3880. }
  3881. rad += QUARTER_PI;
  3882. /* falls through */
  3883. case 'rectRot':
  3884. xOffset = Math.cos(rad) * radius;
  3885. yOffset = Math.sin(rad) * radius;
  3886. ctx.moveTo(x - xOffset, y - yOffset);
  3887. ctx.lineTo(x + yOffset, y - xOffset);
  3888. ctx.lineTo(x + xOffset, y + yOffset);
  3889. ctx.lineTo(x - yOffset, y + xOffset);
  3890. ctx.closePath();
  3891. break;
  3892. case 'crossRot':
  3893. rad += QUARTER_PI;
  3894. /* falls through */
  3895. case 'cross':
  3896. xOffset = Math.cos(rad) * radius;
  3897. yOffset = Math.sin(rad) * radius;
  3898. ctx.moveTo(x - xOffset, y - yOffset);
  3899. ctx.lineTo(x + xOffset, y + yOffset);
  3900. ctx.moveTo(x + yOffset, y - xOffset);
  3901. ctx.lineTo(x - yOffset, y + xOffset);
  3902. break;
  3903. case 'star':
  3904. xOffset = Math.cos(rad) * radius;
  3905. yOffset = Math.sin(rad) * radius;
  3906. ctx.moveTo(x - xOffset, y - yOffset);
  3907. ctx.lineTo(x + xOffset, y + yOffset);
  3908. ctx.moveTo(x + yOffset, y - xOffset);
  3909. ctx.lineTo(x - yOffset, y + xOffset);
  3910. rad += QUARTER_PI;
  3911. xOffset = Math.cos(rad) * radius;
  3912. yOffset = Math.sin(rad) * radius;
  3913. ctx.moveTo(x - xOffset, y - yOffset);
  3914. ctx.lineTo(x + xOffset, y + yOffset);
  3915. ctx.moveTo(x + yOffset, y - xOffset);
  3916. ctx.lineTo(x - yOffset, y + xOffset);
  3917. break;
  3918. case 'line':
  3919. xOffset = Math.cos(rad) * radius;
  3920. yOffset = Math.sin(rad) * radius;
  3921. ctx.moveTo(x - xOffset, y - yOffset);
  3922. ctx.lineTo(x + xOffset, y + yOffset);
  3923. break;
  3924. case 'dash':
  3925. ctx.moveTo(x, y);
  3926. ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);
  3927. break;
  3928. }
  3929. ctx.fill();
  3930. ctx.stroke();
  3931. },
  3932. /**
  3933. * Returns true if the point is inside the rectangle
  3934. * @param {object} point - The point to test
  3935. * @param {object} area - The rectangle
  3936. * @returns {boolean}
  3937. * @private
  3938. */
  3939. _isPointInArea: function(point, area) {
  3940. var epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.
  3941. return point.x > area.left - epsilon && point.x < area.right + epsilon &&
  3942. point.y > area.top - epsilon && point.y < area.bottom + epsilon;
  3943. },
  3944. clipArea: function(ctx, area) {
  3945. ctx.save();
  3946. ctx.beginPath();
  3947. ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);
  3948. ctx.clip();
  3949. },
  3950. unclipArea: function(ctx) {
  3951. ctx.restore();
  3952. },
  3953. lineTo: function(ctx, previous, target, flip) {
  3954. var stepped = target.steppedLine;
  3955. if (stepped) {
  3956. if (stepped === 'middle') {
  3957. var midpoint = (previous.x + target.x) / 2.0;
  3958. ctx.lineTo(midpoint, flip ? target.y : previous.y);
  3959. ctx.lineTo(midpoint, flip ? previous.y : target.y);
  3960. } else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) {
  3961. ctx.lineTo(previous.x, target.y);
  3962. } else {
  3963. ctx.lineTo(target.x, previous.y);
  3964. }
  3965. ctx.lineTo(target.x, target.y);
  3966. return;
  3967. }
  3968. if (!target.tension) {
  3969. ctx.lineTo(target.x, target.y);
  3970. return;
  3971. }
  3972. ctx.bezierCurveTo(
  3973. flip ? previous.controlPointPreviousX : previous.controlPointNextX,
  3974. flip ? previous.controlPointPreviousY : previous.controlPointNextY,
  3975. flip ? target.controlPointNextX : target.controlPointPreviousX,
  3976. flip ? target.controlPointNextY : target.controlPointPreviousY,
  3977. target.x,
  3978. target.y);
  3979. }
  3980. };
  3981. var helpers_canvas = exports$1;
  3982. // DEPRECATIONS
  3983. /**
  3984. * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.
  3985. * @namespace Chart.helpers.clear
  3986. * @deprecated since version 2.7.0
  3987. * @todo remove at version 3
  3988. * @private
  3989. */
  3990. helpers_core.clear = exports$1.clear;
  3991. /**
  3992. * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.
  3993. * @namespace Chart.helpers.drawRoundedRectangle
  3994. * @deprecated since version 2.7.0
  3995. * @todo remove at version 3
  3996. * @private
  3997. */
  3998. helpers_core.drawRoundedRectangle = function(ctx) {
  3999. ctx.beginPath();
  4000. exports$1.roundedRect.apply(exports$1, arguments);
  4001. };
  4002. var defaults = {
  4003. /**
  4004. * @private
  4005. */
  4006. _set: function(scope, values) {
  4007. return helpers_core.merge(this[scope] || (this[scope] = {}), values);
  4008. }
  4009. };
  4010. // TODO(v3): remove 'global' from namespace. all default are global and
  4011. // there's inconsistency around which options are under 'global'
  4012. defaults._set('global', {
  4013. defaultColor: 'rgba(0,0,0,0.1)',
  4014. defaultFontColor: '#666',
  4015. defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
  4016. defaultFontSize: 12,
  4017. defaultFontStyle: 'normal',
  4018. defaultLineHeight: 1.2,
  4019. showLines: true
  4020. });
  4021. var core_defaults = defaults;
  4022. var valueOrDefault = helpers_core.valueOrDefault;
  4023. /**
  4024. * Converts the given font object into a CSS font string.
  4025. * @param {object} font - A font object.
  4026. * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font
  4027. * @private
  4028. */
  4029. function toFontString(font) {
  4030. if (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {
  4031. return null;
  4032. }
  4033. return (font.style ? font.style + ' ' : '')
  4034. + (font.weight ? font.weight + ' ' : '')
  4035. + font.size + 'px '
  4036. + font.family;
  4037. }
  4038. /**
  4039. * @alias Chart.helpers.options
  4040. * @namespace
  4041. */
  4042. var helpers_options = {
  4043. /**
  4044. * Converts the given line height `value` in pixels for a specific font `size`.
  4045. * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').
  4046. * @param {number} size - The font size (in pixels) used to resolve relative `value`.
  4047. * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).
  4048. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
  4049. * @since 2.7.0
  4050. */
  4051. toLineHeight: function(value, size) {
  4052. var matches = ('' + value).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);
  4053. if (!matches || matches[1] === 'normal') {
  4054. return size * 1.2;
  4055. }
  4056. value = +matches[2];
  4057. switch (matches[3]) {
  4058. case 'px':
  4059. return value;
  4060. case '%':
  4061. value /= 100;
  4062. break;
  4063. }
  4064. return size * value;
  4065. },
  4066. /**
  4067. * Converts the given value into a padding object with pre-computed width/height.
  4068. * @param {number|object} value - If a number, set the value to all TRBL component,
  4069. * else, if and object, use defined properties and sets undefined ones to 0.
  4070. * @returns {object} The padding values (top, right, bottom, left, width, height)
  4071. * @since 2.7.0
  4072. */
  4073. toPadding: function(value) {
  4074. var t, r, b, l;
  4075. if (helpers_core.isObject(value)) {
  4076. t = +value.top || 0;
  4077. r = +value.right || 0;
  4078. b = +value.bottom || 0;
  4079. l = +value.left || 0;
  4080. } else {
  4081. t = r = b = l = +value || 0;
  4082. }
  4083. return {
  4084. top: t,
  4085. right: r,
  4086. bottom: b,
  4087. left: l,
  4088. height: t + b,
  4089. width: l + r
  4090. };
  4091. },
  4092. /**
  4093. * Parses font options and returns the font object.
  4094. * @param {object} options - A object that contains font options to be parsed.
  4095. * @return {object} The font object.
  4096. * @todo Support font.* options and renamed to toFont().
  4097. * @private
  4098. */
  4099. _parseFont: function(options) {
  4100. var globalDefaults = core_defaults.global;
  4101. var size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);
  4102. var font = {
  4103. family: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),
  4104. lineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),
  4105. size: size,
  4106. style: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),
  4107. weight: null,
  4108. string: ''
  4109. };
  4110. font.string = toFontString(font);
  4111. return font;
  4112. },
  4113. /**
  4114. * Evaluates the given `inputs` sequentially and returns the first defined value.
  4115. * @param {Array} inputs - An array of values, falling back to the last value.
  4116. * @param {object} [context] - If defined and the current value is a function, the value
  4117. * is called with `context` as first argument and the result becomes the new input.
  4118. * @param {number} [index] - If defined and the current value is an array, the value
  4119. * at `index` become the new input.
  4120. * @param {object} [info] - object to return information about resolution in
  4121. * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.
  4122. * @since 2.7.0
  4123. */
  4124. resolve: function(inputs, context, index, info) {
  4125. var cacheable = true;
  4126. var i, ilen, value;
  4127. for (i = 0, ilen = inputs.length; i < ilen; ++i) {
  4128. value = inputs[i];
  4129. if (value === undefined) {
  4130. continue;
  4131. }
  4132. if (context !== undefined && typeof value === 'function') {
  4133. value = value(context);
  4134. cacheable = false;
  4135. }
  4136. if (index !== undefined && helpers_core.isArray(value)) {
  4137. value = value[index];
  4138. cacheable = false;
  4139. }
  4140. if (value !== undefined) {
  4141. if (info && !cacheable) {
  4142. info.cacheable = false;
  4143. }
  4144. return value;
  4145. }
  4146. }
  4147. }
  4148. };
  4149. /**
  4150. * @alias Chart.helpers.math
  4151. * @namespace
  4152. */
  4153. var exports$2 = {
  4154. /**
  4155. * Returns an array of factors sorted from 1 to sqrt(value)
  4156. * @private
  4157. */
  4158. _factorize: function(value) {
  4159. var result = [];
  4160. var sqrt = Math.sqrt(value);
  4161. var i;
  4162. for (i = 1; i < sqrt; i++) {
  4163. if (value % i === 0) {
  4164. result.push(i);
  4165. result.push(value / i);
  4166. }
  4167. }
  4168. if (sqrt === (sqrt | 0)) { // if value is a square number
  4169. result.push(sqrt);
  4170. }
  4171. result.sort(function(a, b) {
  4172. return a - b;
  4173. }).pop();
  4174. return result;
  4175. },
  4176. log10: Math.log10 || function(x) {
  4177. var exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.
  4178. // Check for whole powers of 10,
  4179. // which due to floating point rounding error should be corrected.
  4180. var powerOf10 = Math.round(exponent);
  4181. var isPowerOf10 = x === Math.pow(10, powerOf10);
  4182. return isPowerOf10 ? powerOf10 : exponent;
  4183. }
  4184. };
  4185. var helpers_math = exports$2;
  4186. // DEPRECATIONS
  4187. /**
  4188. * Provided for backward compatibility, use Chart.helpers.math.log10 instead.
  4189. * @namespace Chart.helpers.log10
  4190. * @deprecated since version 2.9.0
  4191. * @todo remove at version 3
  4192. * @private
  4193. */
  4194. helpers_core.log10 = exports$2.log10;
  4195. var getRtlAdapter = function(rectX, width) {
  4196. return {
  4197. x: function(x) {
  4198. return rectX + rectX + width - x;
  4199. },
  4200. setWidth: function(w) {
  4201. width = w;
  4202. },
  4203. textAlign: function(align) {
  4204. if (align === 'center') {
  4205. return align;
  4206. }
  4207. return align === 'right' ? 'left' : 'right';
  4208. },
  4209. xPlus: function(x, value) {
  4210. return x - value;
  4211. },
  4212. leftForLtr: function(x, itemWidth) {
  4213. return x - itemWidth;
  4214. },
  4215. };
  4216. };
  4217. var getLtrAdapter = function() {
  4218. return {
  4219. x: function(x) {
  4220. return x;
  4221. },
  4222. setWidth: function(w) { // eslint-disable-line no-unused-vars
  4223. },
  4224. textAlign: function(align) {
  4225. return align;
  4226. },
  4227. xPlus: function(x, value) {
  4228. return x + value;
  4229. },
  4230. leftForLtr: function(x, _itemWidth) { // eslint-disable-line no-unused-vars
  4231. return x;
  4232. },
  4233. };
  4234. };
  4235. var getAdapter = function(rtl, rectX, width) {
  4236. return rtl ? getRtlAdapter(rectX, width) : getLtrAdapter();
  4237. };
  4238. var overrideTextDirection = function(ctx, direction) {
  4239. var style, original;
  4240. if (direction === 'ltr' || direction === 'rtl') {
  4241. style = ctx.canvas.style;
  4242. original = [
  4243. style.getPropertyValue('direction'),
  4244. style.getPropertyPriority('direction'),
  4245. ];
  4246. style.setProperty('direction', direction, 'important');
  4247. ctx.prevTextDirection = original;
  4248. }
  4249. };
  4250. var restoreTextDirection = function(ctx) {
  4251. var original = ctx.prevTextDirection;
  4252. if (original !== undefined) {
  4253. delete ctx.prevTextDirection;
  4254. ctx.canvas.style.setProperty('direction', original[0], original[1]);
  4255. }
  4256. };
  4257. var helpers_rtl = {
  4258. getRtlAdapter: getAdapter,
  4259. overrideTextDirection: overrideTextDirection,
  4260. restoreTextDirection: restoreTextDirection,
  4261. };
  4262. var helpers$1 = helpers_core;
  4263. var easing = helpers_easing;
  4264. var canvas = helpers_canvas;
  4265. var options = helpers_options;
  4266. var math = helpers_math;
  4267. var rtl = helpers_rtl;
  4268. helpers$1.easing = easing;
  4269. helpers$1.canvas = canvas;
  4270. helpers$1.options = options;
  4271. helpers$1.math = math;
  4272. helpers$1.rtl = rtl;
  4273. function interpolate(start, view, model, ease) {
  4274. var keys = Object.keys(model);
  4275. var i, ilen, key, actual, origin, target, type, c0, c1;
  4276. for (i = 0, ilen = keys.length; i < ilen; ++i) {
  4277. key = keys[i];
  4278. target = model[key];
  4279. // if a value is added to the model after pivot() has been called, the view
  4280. // doesn't contain it, so let's initialize the view to the target value.
  4281. if (!view.hasOwnProperty(key)) {
  4282. view[key] = target;
  4283. }
  4284. actual = view[key];
  4285. if (actual === target || key[0] === '_') {
  4286. continue;
  4287. }
  4288. if (!start.hasOwnProperty(key)) {
  4289. start[key] = actual;
  4290. }
  4291. origin = start[key];
  4292. type = typeof target;
  4293. if (type === typeof origin) {
  4294. if (type === 'string') {
  4295. c0 = chartjsColor(origin);
  4296. if (c0.valid) {
  4297. c1 = chartjsColor(target);
  4298. if (c1.valid) {
  4299. view[key] = c1.mix(c0, ease).rgbString();
  4300. continue;
  4301. }
  4302. }
  4303. } else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {
  4304. view[key] = origin + (target - origin) * ease;
  4305. continue;
  4306. }
  4307. }
  4308. view[key] = target;
  4309. }
  4310. }
  4311. var Element = function(configuration) {
  4312. helpers$1.extend(this, configuration);
  4313. this.initialize.apply(this, arguments);
  4314. };
  4315. helpers$1.extend(Element.prototype, {
  4316. _type: undefined,
  4317. initialize: function() {
  4318. this.hidden = false;
  4319. },
  4320. pivot: function() {
  4321. var me = this;
  4322. if (!me._view) {
  4323. me._view = helpers$1.extend({}, me._model);
  4324. }
  4325. me._start = {};
  4326. return me;
  4327. },
  4328. transition: function(ease) {
  4329. var me = this;
  4330. var model = me._model;
  4331. var start = me._start;
  4332. var view = me._view;
  4333. // No animation -> No Transition
  4334. if (!model || ease === 1) {
  4335. me._view = helpers$1.extend({}, model);
  4336. me._start = null;
  4337. return me;
  4338. }
  4339. if (!view) {
  4340. view = me._view = {};
  4341. }
  4342. if (!start) {
  4343. start = me._start = {};
  4344. }
  4345. interpolate(start, view, model, ease);
  4346. return me;
  4347. },
  4348. tooltipPosition: function() {
  4349. return {
  4350. x: this._model.x,
  4351. y: this._model.y
  4352. };
  4353. },
  4354. hasValue: function() {
  4355. return helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);
  4356. }
  4357. });
  4358. Element.extend = helpers$1.inherits;
  4359. var core_element = Element;
  4360. var exports$3 = core_element.extend({
  4361. chart: null, // the animation associated chart instance
  4362. currentStep: 0, // the current animation step
  4363. numSteps: 60, // default number of steps
  4364. easing: '', // the easing to use for this animation
  4365. render: null, // render function used by the animation service
  4366. onAnimationProgress: null, // user specified callback to fire on each step of the animation
  4367. onAnimationComplete: null, // user specified callback to fire when the animation finishes
  4368. });
  4369. var core_animation = exports$3;
  4370. // DEPRECATIONS
  4371. /**
  4372. * Provided for backward compatibility, use Chart.Animation instead
  4373. * @prop Chart.Animation#animationObject
  4374. * @deprecated since version 2.6.0
  4375. * @todo remove at version 3
  4376. */
  4377. Object.defineProperty(exports$3.prototype, 'animationObject', {
  4378. get: function() {
  4379. return this;
  4380. }
  4381. });
  4382. /**
  4383. * Provided for backward compatibility, use Chart.Animation#chart instead
  4384. * @prop Chart.Animation#chartInstance
  4385. * @deprecated since version 2.6.0
  4386. * @todo remove at version 3
  4387. */
  4388. Object.defineProperty(exports$3.prototype, 'chartInstance', {
  4389. get: function() {
  4390. return this.chart;
  4391. },
  4392. set: function(value) {
  4393. this.chart = value;
  4394. }
  4395. });
  4396. core_defaults._set('global', {
  4397. animation: {
  4398. duration: 1000,
  4399. easing: 'easeOutQuart',
  4400. onProgress: helpers$1.noop,
  4401. onComplete: helpers$1.noop
  4402. }
  4403. });
  4404. var core_animations = {
  4405. animations: [],
  4406. request: null,
  4407. /**
  4408. * @param {Chart} chart - The chart to animate.
  4409. * @param {Chart.Animation} animation - The animation that we will animate.
  4410. * @param {number} duration - The animation duration in ms.
  4411. * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions
  4412. */
  4413. addAnimation: function(chart, animation, duration, lazy) {
  4414. var animations = this.animations;
  4415. var i, ilen;
  4416. animation.chart = chart;
  4417. animation.startTime = Date.now();
  4418. animation.duration = duration;
  4419. if (!lazy) {
  4420. chart.animating = true;
  4421. }
  4422. for (i = 0, ilen = animations.length; i < ilen; ++i) {
  4423. if (animations[i].chart === chart) {
  4424. animations[i] = animation;
  4425. return;
  4426. }
  4427. }
  4428. animations.push(animation);
  4429. // If there are no animations queued, manually kickstart a digest, for lack of a better word
  4430. if (animations.length === 1) {
  4431. this.requestAnimationFrame();
  4432. }
  4433. },
  4434. cancelAnimation: function(chart) {
  4435. var index = helpers$1.findIndex(this.animations, function(animation) {
  4436. return animation.chart === chart;
  4437. });
  4438. if (index !== -1) {
  4439. this.animations.splice(index, 1);
  4440. chart.animating = false;
  4441. }
  4442. },
  4443. requestAnimationFrame: function() {
  4444. var me = this;
  4445. if (me.request === null) {
  4446. // Skip animation frame requests until the active one is executed.
  4447. // This can happen when processing mouse events, e.g. 'mousemove'
  4448. // and 'mouseout' events will trigger multiple renders.
  4449. me.request = helpers$1.requestAnimFrame.call(window, function() {
  4450. me.request = null;
  4451. me.startDigest();
  4452. });
  4453. }
  4454. },
  4455. /**
  4456. * @private
  4457. */
  4458. startDigest: function() {
  4459. var me = this;
  4460. me.advance();
  4461. // Do we have more stuff to animate?
  4462. if (me.animations.length > 0) {
  4463. me.requestAnimationFrame();
  4464. }
  4465. },
  4466. /**
  4467. * @private
  4468. */
  4469. advance: function() {
  4470. var animations = this.animations;
  4471. var animation, chart, numSteps, nextStep;
  4472. var i = 0;
  4473. // 1 animation per chart, so we are looping charts here
  4474. while (i < animations.length) {
  4475. animation = animations[i];
  4476. chart = animation.chart;
  4477. numSteps = animation.numSteps;
  4478. // Make sure that currentStep starts at 1
  4479. // https://github.com/chartjs/Chart.js/issues/6104
  4480. nextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;
  4481. animation.currentStep = Math.min(nextStep, numSteps);
  4482. helpers$1.callback(animation.render, [chart, animation], chart);
  4483. helpers$1.callback(animation.onAnimationProgress, [animation], chart);
  4484. if (animation.currentStep >= numSteps) {
  4485. helpers$1.callback(animation.onAnimationComplete, [animation], chart);
  4486. chart.animating = false;
  4487. animations.splice(i, 1);
  4488. } else {
  4489. ++i;
  4490. }
  4491. }
  4492. }
  4493. };
  4494. var resolve = helpers$1.options.resolve;
  4495. var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
  4496. /**
  4497. * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',
  4498. * 'unshift') and notify the listener AFTER the array has been altered. Listeners are
  4499. * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.
  4500. */
  4501. function listenArrayEvents(array, listener) {
  4502. if (array._chartjs) {
  4503. array._chartjs.listeners.push(listener);
  4504. return;
  4505. }
  4506. Object.defineProperty(array, '_chartjs', {
  4507. configurable: true,
  4508. enumerable: false,
  4509. value: {
  4510. listeners: [listener]
  4511. }
  4512. });
  4513. arrayEvents.forEach(function(key) {
  4514. var method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);
  4515. var base = array[key];
  4516. Object.defineProperty(array, key, {
  4517. configurable: true,
  4518. enumerable: false,
  4519. value: function() {
  4520. var args = Array.prototype.slice.call(arguments);
  4521. var res = base.apply(this, args);
  4522. helpers$1.each(array._chartjs.listeners, function(object) {
  4523. if (typeof object[method] === 'function') {
  4524. object[method].apply(object, args);
  4525. }
  4526. });
  4527. return res;
  4528. }
  4529. });
  4530. });
  4531. }
  4532. /**
  4533. * Removes the given array event listener and cleanup extra attached properties (such as
  4534. * the _chartjs stub and overridden methods) if array doesn't have any more listeners.
  4535. */
  4536. function unlistenArrayEvents(array, listener) {
  4537. var stub = array._chartjs;
  4538. if (!stub) {
  4539. return;
  4540. }
  4541. var listeners = stub.listeners;
  4542. var index = listeners.indexOf(listener);
  4543. if (index !== -1) {
  4544. listeners.splice(index, 1);
  4545. }
  4546. if (listeners.length > 0) {
  4547. return;
  4548. }
  4549. arrayEvents.forEach(function(key) {
  4550. delete array[key];
  4551. });
  4552. delete array._chartjs;
  4553. }
  4554. // Base class for all dataset controllers (line, bar, etc)
  4555. var DatasetController = function(chart, datasetIndex) {
  4556. this.initialize(chart, datasetIndex);
  4557. };
  4558. helpers$1.extend(DatasetController.prototype, {
  4559. /**
  4560. * Element type used to generate a meta dataset (e.g. Chart.element.Line).
  4561. * @type {Chart.core.element}
  4562. */
  4563. datasetElementType: null,
  4564. /**
  4565. * Element type used to generate a meta data (e.g. Chart.element.Point).
  4566. * @type {Chart.core.element}
  4567. */
  4568. dataElementType: null,
  4569. /**
  4570. * Dataset element option keys to be resolved in _resolveDatasetElementOptions.
  4571. * A derived controller may override this to resolve controller-specific options.
  4572. * The keys defined here are for backward compatibility for legend styles.
  4573. * @private
  4574. */
  4575. _datasetElementOptions: [
  4576. 'backgroundColor',
  4577. 'borderCapStyle',
  4578. 'borderColor',
  4579. 'borderDash',
  4580. 'borderDashOffset',
  4581. 'borderJoinStyle',
  4582. 'borderWidth'
  4583. ],
  4584. /**
  4585. * Data element option keys to be resolved in _resolveDataElementOptions.
  4586. * A derived controller may override this to resolve controller-specific options.
  4587. * The keys defined here are for backward compatibility for legend styles.
  4588. * @private
  4589. */
  4590. _dataElementOptions: [
  4591. 'backgroundColor',
  4592. 'borderColor',
  4593. 'borderWidth',
  4594. 'pointStyle'
  4595. ],
  4596. initialize: function(chart, datasetIndex) {
  4597. var me = this;
  4598. me.chart = chart;
  4599. me.index = datasetIndex;
  4600. me.linkScales();
  4601. me.addElements();
  4602. me._type = me.getMeta().type;
  4603. },
  4604. updateIndex: function(datasetIndex) {
  4605. this.index = datasetIndex;
  4606. },
  4607. linkScales: function() {
  4608. var me = this;
  4609. var meta = me.getMeta();
  4610. var chart = me.chart;
  4611. var scales = chart.scales;
  4612. var dataset = me.getDataset();
  4613. var scalesOpts = chart.options.scales;
  4614. if (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {
  4615. meta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;
  4616. }
  4617. if (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {
  4618. meta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;
  4619. }
  4620. },
  4621. getDataset: function() {
  4622. return this.chart.data.datasets[this.index];
  4623. },
  4624. getMeta: function() {
  4625. return this.chart.getDatasetMeta(this.index);
  4626. },
  4627. getScaleForId: function(scaleID) {
  4628. return this.chart.scales[scaleID];
  4629. },
  4630. /**
  4631. * @private
  4632. */
  4633. _getValueScaleId: function() {
  4634. return this.getMeta().yAxisID;
  4635. },
  4636. /**
  4637. * @private
  4638. */
  4639. _getIndexScaleId: function() {
  4640. return this.getMeta().xAxisID;
  4641. },
  4642. /**
  4643. * @private
  4644. */
  4645. _getValueScale: function() {
  4646. return this.getScaleForId(this._getValueScaleId());
  4647. },
  4648. /**
  4649. * @private
  4650. */
  4651. _getIndexScale: function() {
  4652. return this.getScaleForId(this._getIndexScaleId());
  4653. },
  4654. reset: function() {
  4655. this._update(true);
  4656. },
  4657. /**
  4658. * @private
  4659. */
  4660. destroy: function() {
  4661. if (this._data) {
  4662. unlistenArrayEvents(this._data, this);
  4663. }
  4664. },
  4665. createMetaDataset: function() {
  4666. var me = this;
  4667. var type = me.datasetElementType;
  4668. return type && new type({
  4669. _chart: me.chart,
  4670. _datasetIndex: me.index
  4671. });
  4672. },
  4673. createMetaData: function(index) {
  4674. var me = this;
  4675. var type = me.dataElementType;
  4676. return type && new type({
  4677. _chart: me.chart,
  4678. _datasetIndex: me.index,
  4679. _index: index
  4680. });
  4681. },
  4682. addElements: function() {
  4683. var me = this;
  4684. var meta = me.getMeta();
  4685. var data = me.getDataset().data || [];
  4686. var metaData = meta.data;
  4687. var i, ilen;
  4688. for (i = 0, ilen = data.length; i < ilen; ++i) {
  4689. metaData[i] = metaData[i] || me.createMetaData(i);
  4690. }
  4691. meta.dataset = meta.dataset || me.createMetaDataset();
  4692. },
  4693. addElementAndReset: function(index) {
  4694. var element = this.createMetaData(index);
  4695. this.getMeta().data.splice(index, 0, element);
  4696. this.updateElement(element, index, true);
  4697. },
  4698. buildOrUpdateElements: function() {
  4699. var me = this;
  4700. var dataset = me.getDataset();
  4701. var data = dataset.data || (dataset.data = []);
  4702. // In order to correctly handle data addition/deletion animation (an thus simulate
  4703. // real-time charts), we need to monitor these data modifications and synchronize
  4704. // the internal meta data accordingly.
  4705. if (me._data !== data) {
  4706. if (me._data) {
  4707. // This case happens when the user replaced the data array instance.
  4708. unlistenArrayEvents(me._data, me);
  4709. }
  4710. if (data && Object.isExtensible(data)) {
  4711. listenArrayEvents(data, me);
  4712. }
  4713. me._data = data;
  4714. }
  4715. // Re-sync meta data in case the user replaced the data array or if we missed
  4716. // any updates and so make sure that we handle number of datapoints changing.
  4717. me.resyncElements();
  4718. },
  4719. /**
  4720. * Returns the merged user-supplied and default dataset-level options
  4721. * @private
  4722. */
  4723. _configure: function() {
  4724. var me = this;
  4725. me._config = helpers$1.merge(Object.create(null), [
  4726. me.chart.options.datasets[me._type],
  4727. me.getDataset(),
  4728. ], {
  4729. merger: function(key, target, source) {
  4730. if (key !== '_meta' && key !== 'data') {
  4731. helpers$1._merger(key, target, source);
  4732. }
  4733. }
  4734. });
  4735. },
  4736. _update: function(reset) {
  4737. var me = this;
  4738. me._configure();
  4739. me._cachedDataOpts = null;
  4740. me.update(reset);
  4741. },
  4742. update: helpers$1.noop,
  4743. transition: function(easingValue) {
  4744. var meta = this.getMeta();
  4745. var elements = meta.data || [];
  4746. var ilen = elements.length;
  4747. var i = 0;
  4748. for (; i < ilen; ++i) {
  4749. elements[i].transition(easingValue);
  4750. }
  4751. if (meta.dataset) {
  4752. meta.dataset.transition(easingValue);
  4753. }
  4754. },
  4755. draw: function() {
  4756. var meta = this.getMeta();
  4757. var elements = meta.data || [];
  4758. var ilen = elements.length;
  4759. var i = 0;
  4760. if (meta.dataset) {
  4761. meta.dataset.draw();
  4762. }
  4763. for (; i < ilen; ++i) {
  4764. elements[i].draw();
  4765. }
  4766. },
  4767. /**
  4768. * Returns a set of predefined style properties that should be used to represent the dataset
  4769. * or the data if the index is specified
  4770. * @param {number} index - data index
  4771. * @return {IStyleInterface} style object
  4772. */
  4773. getStyle: function(index) {
  4774. var me = this;
  4775. var meta = me.getMeta();
  4776. var dataset = meta.dataset;
  4777. var style;
  4778. me._configure();
  4779. if (dataset && index === undefined) {
  4780. style = me._resolveDatasetElementOptions(dataset || {});
  4781. } else {
  4782. index = index || 0;
  4783. style = me._resolveDataElementOptions(meta.data[index] || {}, index);
  4784. }
  4785. if (style.fill === false || style.fill === null) {
  4786. style.backgroundColor = style.borderColor;
  4787. }
  4788. return style;
  4789. },
  4790. /**
  4791. * @private
  4792. */
  4793. _resolveDatasetElementOptions: function(element, hover) {
  4794. var me = this;
  4795. var chart = me.chart;
  4796. var datasetOpts = me._config;
  4797. var custom = element.custom || {};
  4798. var options = chart.options.elements[me.datasetElementType.prototype._type] || {};
  4799. var elementOptions = me._datasetElementOptions;
  4800. var values = {};
  4801. var i, ilen, key, readKey;
  4802. // Scriptable options
  4803. var context = {
  4804. chart: chart,
  4805. dataset: me.getDataset(),
  4806. datasetIndex: me.index,
  4807. hover: hover
  4808. };
  4809. for (i = 0, ilen = elementOptions.length; i < ilen; ++i) {
  4810. key = elementOptions[i];
  4811. readKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key;
  4812. values[key] = resolve([
  4813. custom[readKey],
  4814. datasetOpts[readKey],
  4815. options[readKey]
  4816. ], context);
  4817. }
  4818. return values;
  4819. },
  4820. /**
  4821. * @private
  4822. */
  4823. _resolveDataElementOptions: function(element, index) {
  4824. var me = this;
  4825. var custom = element && element.custom;
  4826. var cached = me._cachedDataOpts;
  4827. if (cached && !custom) {
  4828. return cached;
  4829. }
  4830. var chart = me.chart;
  4831. var datasetOpts = me._config;
  4832. var options = chart.options.elements[me.dataElementType.prototype._type] || {};
  4833. var elementOptions = me._dataElementOptions;
  4834. var values = {};
  4835. // Scriptable options
  4836. var context = {
  4837. chart: chart,
  4838. dataIndex: index,
  4839. dataset: me.getDataset(),
  4840. datasetIndex: me.index
  4841. };
  4842. // `resolve` sets cacheable to `false` if any option is indexed or scripted
  4843. var info = {cacheable: !custom};
  4844. var keys, i, ilen, key;
  4845. custom = custom || {};
  4846. if (helpers$1.isArray(elementOptions)) {
  4847. for (i = 0, ilen = elementOptions.length; i < ilen; ++i) {
  4848. key = elementOptions[i];
  4849. values[key] = resolve([
  4850. custom[key],
  4851. datasetOpts[key],
  4852. options[key]
  4853. ], context, index, info);
  4854. }
  4855. } else {
  4856. keys = Object.keys(elementOptions);
  4857. for (i = 0, ilen = keys.length; i < ilen; ++i) {
  4858. key = keys[i];
  4859. values[key] = resolve([
  4860. custom[key],
  4861. datasetOpts[elementOptions[key]],
  4862. datasetOpts[key],
  4863. options[key]
  4864. ], context, index, info);
  4865. }
  4866. }
  4867. if (info.cacheable) {
  4868. me._cachedDataOpts = Object.freeze(values);
  4869. }
  4870. return values;
  4871. },
  4872. removeHoverStyle: function(element) {
  4873. helpers$1.merge(element._model, element.$previousStyle || {});
  4874. delete element.$previousStyle;
  4875. },
  4876. setHoverStyle: function(element) {
  4877. var dataset = this.chart.data.datasets[element._datasetIndex];
  4878. var index = element._index;
  4879. var custom = element.custom || {};
  4880. var model = element._model;
  4881. var getHoverColor = helpers$1.getHoverColor;
  4882. element.$previousStyle = {
  4883. backgroundColor: model.backgroundColor,
  4884. borderColor: model.borderColor,
  4885. borderWidth: model.borderWidth
  4886. };
  4887. model.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);
  4888. model.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);
  4889. model.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);
  4890. },
  4891. /**
  4892. * @private
  4893. */
  4894. _removeDatasetHoverStyle: function() {
  4895. var element = this.getMeta().dataset;
  4896. if (element) {
  4897. this.removeHoverStyle(element);
  4898. }
  4899. },
  4900. /**
  4901. * @private
  4902. */
  4903. _setDatasetHoverStyle: function() {
  4904. var element = this.getMeta().dataset;
  4905. var prev = {};
  4906. var i, ilen, key, keys, hoverOptions, model;
  4907. if (!element) {
  4908. return;
  4909. }
  4910. model = element._model;
  4911. hoverOptions = this._resolveDatasetElementOptions(element, true);
  4912. keys = Object.keys(hoverOptions);
  4913. for (i = 0, ilen = keys.length; i < ilen; ++i) {
  4914. key = keys[i];
  4915. prev[key] = model[key];
  4916. model[key] = hoverOptions[key];
  4917. }
  4918. element.$previousStyle = prev;
  4919. },
  4920. /**
  4921. * @private
  4922. */
  4923. resyncElements: function() {
  4924. var me = this;
  4925. var meta = me.getMeta();
  4926. var data = me.getDataset().data;
  4927. var numMeta = meta.data.length;
  4928. var numData = data.length;
  4929. if (numData < numMeta) {
  4930. meta.data.splice(numData, numMeta - numData);
  4931. } else if (numData > numMeta) {
  4932. me.insertElements(numMeta, numData - numMeta);
  4933. }
  4934. },
  4935. /**
  4936. * @private
  4937. */
  4938. insertElements: function(start, count) {
  4939. for (var i = 0; i < count; ++i) {
  4940. this.addElementAndReset(start + i);
  4941. }
  4942. },
  4943. /**
  4944. * @private
  4945. */
  4946. onDataPush: function() {
  4947. var count = arguments.length;
  4948. this.insertElements(this.getDataset().data.length - count, count);
  4949. },
  4950. /**
  4951. * @private
  4952. */
  4953. onDataPop: function() {
  4954. this.getMeta().data.pop();
  4955. },
  4956. /**
  4957. * @private
  4958. */
  4959. onDataShift: function() {
  4960. this.getMeta().data.shift();
  4961. },
  4962. /**
  4963. * @private
  4964. */
  4965. onDataSplice: function(start, count) {
  4966. this.getMeta().data.splice(start, count);
  4967. this.insertElements(start, arguments.length - 2);
  4968. },
  4969. /**
  4970. * @private
  4971. */
  4972. onDataUnshift: function() {
  4973. this.insertElements(0, arguments.length);
  4974. }
  4975. });
  4976. DatasetController.extend = helpers$1.inherits;
  4977. var core_datasetController = DatasetController;
  4978. var TAU = Math.PI * 2;
  4979. core_defaults._set('global', {
  4980. elements: {
  4981. arc: {
  4982. backgroundColor: core_defaults.global.defaultColor,
  4983. borderColor: '#fff',
  4984. borderWidth: 2,
  4985. borderAlign: 'center'
  4986. }
  4987. }
  4988. });
  4989. function clipArc(ctx, arc) {
  4990. var startAngle = arc.startAngle;
  4991. var endAngle = arc.endAngle;
  4992. var pixelMargin = arc.pixelMargin;
  4993. var angleMargin = pixelMargin / arc.outerRadius;
  4994. var x = arc.x;
  4995. var y = arc.y;
  4996. // Draw an inner border by cliping the arc and drawing a double-width border
  4997. // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders
  4998. ctx.beginPath();
  4999. ctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin);
  5000. if (arc.innerRadius > pixelMargin) {
  5001. angleMargin = pixelMargin / arc.innerRadius;
  5002. ctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true);
  5003. } else {
  5004. ctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2);
  5005. }
  5006. ctx.closePath();
  5007. ctx.clip();
  5008. }
  5009. function drawFullCircleBorders(ctx, vm, arc, inner) {
  5010. var endAngle = arc.endAngle;
  5011. var i;
  5012. if (inner) {
  5013. arc.endAngle = arc.startAngle + TAU;
  5014. clipArc(ctx, arc);
  5015. arc.endAngle = endAngle;
  5016. if (arc.endAngle === arc.startAngle && arc.fullCircles) {
  5017. arc.endAngle += TAU;
  5018. arc.fullCircles--;
  5019. }
  5020. }
  5021. ctx.beginPath();
  5022. ctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true);
  5023. for (i = 0; i < arc.fullCircles; ++i) {
  5024. ctx.stroke();
  5025. }
  5026. ctx.beginPath();
  5027. ctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU);
  5028. for (i = 0; i < arc.fullCircles; ++i) {
  5029. ctx.stroke();
  5030. }
  5031. }
  5032. function drawBorder(ctx, vm, arc) {
  5033. var inner = vm.borderAlign === 'inner';
  5034. if (inner) {
  5035. ctx.lineWidth = vm.borderWidth * 2;
  5036. ctx.lineJoin = 'round';
  5037. } else {
  5038. ctx.lineWidth = vm.borderWidth;
  5039. ctx.lineJoin = 'bevel';
  5040. }
  5041. if (arc.fullCircles) {
  5042. drawFullCircleBorders(ctx, vm, arc, inner);
  5043. }
  5044. if (inner) {
  5045. clipArc(ctx, arc);
  5046. }
  5047. ctx.beginPath();
  5048. ctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle);
  5049. ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);
  5050. ctx.closePath();
  5051. ctx.stroke();
  5052. }
  5053. var element_arc = core_element.extend({
  5054. _type: 'arc',
  5055. inLabelRange: function(mouseX) {
  5056. var vm = this._view;
  5057. if (vm) {
  5058. return (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));
  5059. }
  5060. return false;
  5061. },
  5062. inRange: function(chartX, chartY) {
  5063. var vm = this._view;
  5064. if (vm) {
  5065. var pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY});
  5066. var angle = pointRelativePosition.angle;
  5067. var distance = pointRelativePosition.distance;
  5068. // Sanitise angle range
  5069. var startAngle = vm.startAngle;
  5070. var endAngle = vm.endAngle;
  5071. while (endAngle < startAngle) {
  5072. endAngle += TAU;
  5073. }
  5074. while (angle > endAngle) {
  5075. angle -= TAU;
  5076. }
  5077. while (angle < startAngle) {
  5078. angle += TAU;
  5079. }
  5080. // Check if within the range of the open/close angle
  5081. var betweenAngles = (angle >= startAngle && angle <= endAngle);
  5082. var withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);
  5083. return (betweenAngles && withinRadius);
  5084. }
  5085. return false;
  5086. },
  5087. getCenterPoint: function() {
  5088. var vm = this._view;
  5089. var halfAngle = (vm.startAngle + vm.endAngle) / 2;
  5090. var halfRadius = (vm.innerRadius + vm.outerRadius) / 2;
  5091. return {
  5092. x: vm.x + Math.cos(halfAngle) * halfRadius,
  5093. y: vm.y + Math.sin(halfAngle) * halfRadius
  5094. };
  5095. },
  5096. getArea: function() {
  5097. var vm = this._view;
  5098. return Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));
  5099. },
  5100. tooltipPosition: function() {
  5101. var vm = this._view;
  5102. var centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);
  5103. var rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;
  5104. return {
  5105. x: vm.x + (Math.cos(centreAngle) * rangeFromCentre),
  5106. y: vm.y + (Math.sin(centreAngle) * rangeFromCentre)
  5107. };
  5108. },
  5109. draw: function() {
  5110. var ctx = this._chart.ctx;
  5111. var vm = this._view;
  5112. var pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;
  5113. var arc = {
  5114. x: vm.x,
  5115. y: vm.y,
  5116. innerRadius: vm.innerRadius,
  5117. outerRadius: Math.max(vm.outerRadius - pixelMargin, 0),
  5118. pixelMargin: pixelMargin,
  5119. startAngle: vm.startAngle,
  5120. endAngle: vm.endAngle,
  5121. fullCircles: Math.floor(vm.circumference / TAU)
  5122. };
  5123. var i;
  5124. ctx.save();
  5125. ctx.fillStyle = vm.backgroundColor;
  5126. ctx.strokeStyle = vm.borderColor;
  5127. if (arc.fullCircles) {
  5128. arc.endAngle = arc.startAngle + TAU;
  5129. ctx.beginPath();
  5130. ctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);
  5131. ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);
  5132. ctx.closePath();
  5133. for (i = 0; i < arc.fullCircles; ++i) {
  5134. ctx.fill();
  5135. }
  5136. arc.endAngle = arc.startAngle + vm.circumference % TAU;
  5137. }
  5138. ctx.beginPath();
  5139. ctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);
  5140. ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);
  5141. ctx.closePath();
  5142. ctx.fill();
  5143. if (vm.borderWidth) {
  5144. drawBorder(ctx, vm, arc);
  5145. }
  5146. ctx.restore();
  5147. }
  5148. });
  5149. var valueOrDefault$1 = helpers$1.valueOrDefault;
  5150. var defaultColor = core_defaults.global.defaultColor;
  5151. core_defaults._set('global', {
  5152. elements: {
  5153. line: {
  5154. tension: 0.4,
  5155. backgroundColor: defaultColor,
  5156. borderWidth: 3,
  5157. borderColor: defaultColor,
  5158. borderCapStyle: 'butt',
  5159. borderDash: [],
  5160. borderDashOffset: 0.0,
  5161. borderJoinStyle: 'miter',
  5162. capBezierPoints: true,
  5163. fill: true, // do we fill in the area between the line and its base axis
  5164. }
  5165. }
  5166. });
  5167. var element_line = core_element.extend({
  5168. _type: 'line',
  5169. draw: function() {
  5170. var me = this;
  5171. var vm = me._view;
  5172. var ctx = me._chart.ctx;
  5173. var spanGaps = vm.spanGaps;
  5174. var points = me._children.slice(); // clone array
  5175. var globalDefaults = core_defaults.global;
  5176. var globalOptionLineElements = globalDefaults.elements.line;
  5177. var lastDrawnIndex = -1;
  5178. var closePath = me._loop;
  5179. var index, previous, currentVM;
  5180. if (!points.length) {
  5181. return;
  5182. }
  5183. if (me._loop) {
  5184. for (index = 0; index < points.length; ++index) {
  5185. previous = helpers$1.previousItem(points, index);
  5186. // If the line has an open path, shift the point array
  5187. if (!points[index]._view.skip && previous._view.skip) {
  5188. points = points.slice(index).concat(points.slice(0, index));
  5189. closePath = spanGaps;
  5190. break;
  5191. }
  5192. }
  5193. // If the line has a close path, add the first point again
  5194. if (closePath) {
  5195. points.push(points[0]);
  5196. }
  5197. }
  5198. ctx.save();
  5199. // Stroke Line Options
  5200. ctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;
  5201. // IE 9 and 10 do not support line dash
  5202. if (ctx.setLineDash) {
  5203. ctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);
  5204. }
  5205. ctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);
  5206. ctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;
  5207. ctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);
  5208. ctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;
  5209. // Stroke Line
  5210. ctx.beginPath();
  5211. // First point moves to it's starting position no matter what
  5212. currentVM = points[0]._view;
  5213. if (!currentVM.skip) {
  5214. ctx.moveTo(currentVM.x, currentVM.y);
  5215. lastDrawnIndex = 0;
  5216. }
  5217. for (index = 1; index < points.length; ++index) {
  5218. currentVM = points[index]._view;
  5219. previous = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex];
  5220. if (!currentVM.skip) {
  5221. if ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {
  5222. // There was a gap and this is the first point after the gap
  5223. ctx.moveTo(currentVM.x, currentVM.y);
  5224. } else {
  5225. // Line to next point
  5226. helpers$1.canvas.lineTo(ctx, previous._view, currentVM);
  5227. }
  5228. lastDrawnIndex = index;
  5229. }
  5230. }
  5231. if (closePath) {
  5232. ctx.closePath();
  5233. }
  5234. ctx.stroke();
  5235. ctx.restore();
  5236. }
  5237. });
  5238. var valueOrDefault$2 = helpers$1.valueOrDefault;
  5239. var defaultColor$1 = core_defaults.global.defaultColor;
  5240. core_defaults._set('global', {
  5241. elements: {
  5242. point: {
  5243. radius: 3,
  5244. pointStyle: 'circle',
  5245. backgroundColor: defaultColor$1,
  5246. borderColor: defaultColor$1,
  5247. borderWidth: 1,
  5248. // Hover
  5249. hitRadius: 1,
  5250. hoverRadius: 4,
  5251. hoverBorderWidth: 1
  5252. }
  5253. }
  5254. });
  5255. function xRange(mouseX) {
  5256. var vm = this._view;
  5257. return vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;
  5258. }
  5259. function yRange(mouseY) {
  5260. var vm = this._view;
  5261. return vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;
  5262. }
  5263. var element_point = core_element.extend({
  5264. _type: 'point',
  5265. inRange: function(mouseX, mouseY) {
  5266. var vm = this._view;
  5267. return vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;
  5268. },
  5269. inLabelRange: xRange,
  5270. inXRange: xRange,
  5271. inYRange: yRange,
  5272. getCenterPoint: function() {
  5273. var vm = this._view;
  5274. return {
  5275. x: vm.x,
  5276. y: vm.y
  5277. };
  5278. },
  5279. getArea: function() {
  5280. return Math.PI * Math.pow(this._view.radius, 2);
  5281. },
  5282. tooltipPosition: function() {
  5283. var vm = this._view;
  5284. return {
  5285. x: vm.x,
  5286. y: vm.y,
  5287. padding: vm.radius + vm.borderWidth
  5288. };
  5289. },
  5290. draw: function(chartArea) {
  5291. var vm = this._view;
  5292. var ctx = this._chart.ctx;
  5293. var pointStyle = vm.pointStyle;
  5294. var rotation = vm.rotation;
  5295. var radius = vm.radius;
  5296. var x = vm.x;
  5297. var y = vm.y;
  5298. var globalDefaults = core_defaults.global;
  5299. var defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow
  5300. if (vm.skip) {
  5301. return;
  5302. }
  5303. // Clipping for Points.
  5304. if (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {
  5305. ctx.strokeStyle = vm.borderColor || defaultColor;
  5306. ctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);
  5307. ctx.fillStyle = vm.backgroundColor || defaultColor;
  5308. helpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);
  5309. }
  5310. }
  5311. });
  5312. var defaultColor$2 = core_defaults.global.defaultColor;
  5313. core_defaults._set('global', {
  5314. elements: {
  5315. rectangle: {
  5316. backgroundColor: defaultColor$2,
  5317. borderColor: defaultColor$2,
  5318. borderSkipped: 'bottom',
  5319. borderWidth: 0
  5320. }
  5321. }
  5322. });
  5323. function isVertical(vm) {
  5324. return vm && vm.width !== undefined;
  5325. }
  5326. /**
  5327. * Helper function to get the bounds of the bar regardless of the orientation
  5328. * @param bar {Chart.Element.Rectangle} the bar
  5329. * @return {Bounds} bounds of the bar
  5330. * @private
  5331. */
  5332. function getBarBounds(vm) {
  5333. var x1, x2, y1, y2, half;
  5334. if (isVertical(vm)) {
  5335. half = vm.width / 2;
  5336. x1 = vm.x - half;
  5337. x2 = vm.x + half;
  5338. y1 = Math.min(vm.y, vm.base);
  5339. y2 = Math.max(vm.y, vm.base);
  5340. } else {
  5341. half = vm.height / 2;
  5342. x1 = Math.min(vm.x, vm.base);
  5343. x2 = Math.max(vm.x, vm.base);
  5344. y1 = vm.y - half;
  5345. y2 = vm.y + half;
  5346. }
  5347. return {
  5348. left: x1,
  5349. top: y1,
  5350. right: x2,
  5351. bottom: y2
  5352. };
  5353. }
  5354. function swap(orig, v1, v2) {
  5355. return orig === v1 ? v2 : orig === v2 ? v1 : orig;
  5356. }
  5357. function parseBorderSkipped(vm) {
  5358. var edge = vm.borderSkipped;
  5359. var res = {};
  5360. if (!edge) {
  5361. return res;
  5362. }
  5363. if (vm.horizontal) {
  5364. if (vm.base > vm.x) {
  5365. edge = swap(edge, 'left', 'right');
  5366. }
  5367. } else if (vm.base < vm.y) {
  5368. edge = swap(edge, 'bottom', 'top');
  5369. }
  5370. res[edge] = true;
  5371. return res;
  5372. }
  5373. function parseBorderWidth(vm, maxW, maxH) {
  5374. var value = vm.borderWidth;
  5375. var skip = parseBorderSkipped(vm);
  5376. var t, r, b, l;
  5377. if (helpers$1.isObject(value)) {
  5378. t = +value.top || 0;
  5379. r = +value.right || 0;
  5380. b = +value.bottom || 0;
  5381. l = +value.left || 0;
  5382. } else {
  5383. t = r = b = l = +value || 0;
  5384. }
  5385. return {
  5386. t: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t,
  5387. r: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r,
  5388. b: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b,
  5389. l: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l
  5390. };
  5391. }
  5392. function boundingRects(vm) {
  5393. var bounds = getBarBounds(vm);
  5394. var width = bounds.right - bounds.left;
  5395. var height = bounds.bottom - bounds.top;
  5396. var border = parseBorderWidth(vm, width / 2, height / 2);
  5397. return {
  5398. outer: {
  5399. x: bounds.left,
  5400. y: bounds.top,
  5401. w: width,
  5402. h: height
  5403. },
  5404. inner: {
  5405. x: bounds.left + border.l,
  5406. y: bounds.top + border.t,
  5407. w: width - border.l - border.r,
  5408. h: height - border.t - border.b
  5409. }
  5410. };
  5411. }
  5412. function inRange(vm, x, y) {
  5413. var skipX = x === null;
  5414. var skipY = y === null;
  5415. var bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm);
  5416. return bounds
  5417. && (skipX || x >= bounds.left && x <= bounds.right)
  5418. && (skipY || y >= bounds.top && y <= bounds.bottom);
  5419. }
  5420. var element_rectangle = core_element.extend({
  5421. _type: 'rectangle',
  5422. draw: function() {
  5423. var ctx = this._chart.ctx;
  5424. var vm = this._view;
  5425. var rects = boundingRects(vm);
  5426. var outer = rects.outer;
  5427. var inner = rects.inner;
  5428. ctx.fillStyle = vm.backgroundColor;
  5429. ctx.fillRect(outer.x, outer.y, outer.w, outer.h);
  5430. if (outer.w === inner.w && outer.h === inner.h) {
  5431. return;
  5432. }
  5433. ctx.save();
  5434. ctx.beginPath();
  5435. ctx.rect(outer.x, outer.y, outer.w, outer.h);
  5436. ctx.clip();
  5437. ctx.fillStyle = vm.borderColor;
  5438. ctx.rect(inner.x, inner.y, inner.w, inner.h);
  5439. ctx.fill('evenodd');
  5440. ctx.restore();
  5441. },
  5442. height: function() {
  5443. var vm = this._view;
  5444. return vm.base - vm.y;
  5445. },
  5446. inRange: function(mouseX, mouseY) {
  5447. return inRange(this._view, mouseX, mouseY);
  5448. },
  5449. inLabelRange: function(mouseX, mouseY) {
  5450. var vm = this._view;
  5451. return isVertical(vm)
  5452. ? inRange(vm, mouseX, null)
  5453. : inRange(vm, null, mouseY);
  5454. },
  5455. inXRange: function(mouseX) {
  5456. return inRange(this._view, mouseX, null);
  5457. },
  5458. inYRange: function(mouseY) {
  5459. return inRange(this._view, null, mouseY);
  5460. },
  5461. getCenterPoint: function() {
  5462. var vm = this._view;
  5463. var x, y;
  5464. if (isVertical(vm)) {
  5465. x = vm.x;
  5466. y = (vm.y + vm.base) / 2;
  5467. } else {
  5468. x = (vm.x + vm.base) / 2;
  5469. y = vm.y;
  5470. }
  5471. return {x: x, y: y};
  5472. },
  5473. getArea: function() {
  5474. var vm = this._view;
  5475. return isVertical(vm)
  5476. ? vm.width * Math.abs(vm.y - vm.base)
  5477. : vm.height * Math.abs(vm.x - vm.base);
  5478. },
  5479. tooltipPosition: function() {
  5480. var vm = this._view;
  5481. return {
  5482. x: vm.x,
  5483. y: vm.y
  5484. };
  5485. }
  5486. });
  5487. var elements = {};
  5488. var Arc = element_arc;
  5489. var Line = element_line;
  5490. var Point = element_point;
  5491. var Rectangle = element_rectangle;
  5492. elements.Arc = Arc;
  5493. elements.Line = Line;
  5494. elements.Point = Point;
  5495. elements.Rectangle = Rectangle;
  5496. var deprecated = helpers$1._deprecated;
  5497. var valueOrDefault$3 = helpers$1.valueOrDefault;
  5498. core_defaults._set('bar', {
  5499. hover: {
  5500. mode: 'label'
  5501. },
  5502. scales: {
  5503. xAxes: [{
  5504. type: 'category',
  5505. offset: true,
  5506. gridLines: {
  5507. offsetGridLines: true
  5508. }
  5509. }],
  5510. yAxes: [{
  5511. type: 'linear'
  5512. }]
  5513. }
  5514. });
  5515. core_defaults._set('global', {
  5516. datasets: {
  5517. bar: {
  5518. categoryPercentage: 0.8,
  5519. barPercentage: 0.9
  5520. }
  5521. }
  5522. });
  5523. /**
  5524. * Computes the "optimal" sample size to maintain bars equally sized while preventing overlap.
  5525. * @private
  5526. */
  5527. function computeMinSampleSize(scale, pixels) {
  5528. var min = scale._length;
  5529. var prev, curr, i, ilen;
  5530. for (i = 1, ilen = pixels.length; i < ilen; ++i) {
  5531. min = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));
  5532. }
  5533. for (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) {
  5534. curr = scale.getPixelForTick(i);
  5535. min = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min;
  5536. prev = curr;
  5537. }
  5538. return min;
  5539. }
  5540. /**
  5541. * Computes an "ideal" category based on the absolute bar thickness or, if undefined or null,
  5542. * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This
  5543. * mode currently always generates bars equally sized (until we introduce scriptable options?).
  5544. * @private
  5545. */
  5546. function computeFitCategoryTraits(index, ruler, options) {
  5547. var thickness = options.barThickness;
  5548. var count = ruler.stackCount;
  5549. var curr = ruler.pixels[index];
  5550. var min = helpers$1.isNullOrUndef(thickness)
  5551. ? computeMinSampleSize(ruler.scale, ruler.pixels)
  5552. : -1;
  5553. var size, ratio;
  5554. if (helpers$1.isNullOrUndef(thickness)) {
  5555. size = min * options.categoryPercentage;
  5556. ratio = options.barPercentage;
  5557. } else {
  5558. // When bar thickness is enforced, category and bar percentages are ignored.
  5559. // Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')
  5560. // and deprecate barPercentage since this value is ignored when thickness is absolute.
  5561. size = thickness * count;
  5562. ratio = 1;
  5563. }
  5564. return {
  5565. chunk: size / count,
  5566. ratio: ratio,
  5567. start: curr - (size / 2)
  5568. };
  5569. }
  5570. /**
  5571. * Computes an "optimal" category that globally arranges bars side by side (no gap when
  5572. * percentage options are 1), based on the previous and following categories. This mode
  5573. * generates bars with different widths when data are not evenly spaced.
  5574. * @private
  5575. */
  5576. function computeFlexCategoryTraits(index, ruler, options) {
  5577. var pixels = ruler.pixels;
  5578. var curr = pixels[index];
  5579. var prev = index > 0 ? pixels[index - 1] : null;
  5580. var next = index < pixels.length - 1 ? pixels[index + 1] : null;
  5581. var percent = options.categoryPercentage;
  5582. var start, size;
  5583. if (prev === null) {
  5584. // first data: its size is double based on the next point or,
  5585. // if it's also the last data, we use the scale size.
  5586. prev = curr - (next === null ? ruler.end - ruler.start : next - curr);
  5587. }
  5588. if (next === null) {
  5589. // last data: its size is also double based on the previous point.
  5590. next = curr + curr - prev;
  5591. }
  5592. start = curr - (curr - Math.min(prev, next)) / 2 * percent;
  5593. size = Math.abs(next - prev) / 2 * percent;
  5594. return {
  5595. chunk: size / ruler.stackCount,
  5596. ratio: options.barPercentage,
  5597. start: start
  5598. };
  5599. }
  5600. var controller_bar = core_datasetController.extend({
  5601. dataElementType: elements.Rectangle,
  5602. /**
  5603. * @private
  5604. */
  5605. _dataElementOptions: [
  5606. 'backgroundColor',
  5607. 'borderColor',
  5608. 'borderSkipped',
  5609. 'borderWidth',
  5610. 'barPercentage',
  5611. 'barThickness',
  5612. 'categoryPercentage',
  5613. 'maxBarThickness',
  5614. 'minBarLength'
  5615. ],
  5616. initialize: function() {
  5617. var me = this;
  5618. var meta, scaleOpts;
  5619. core_datasetController.prototype.initialize.apply(me, arguments);
  5620. meta = me.getMeta();
  5621. meta.stack = me.getDataset().stack;
  5622. meta.bar = true;
  5623. scaleOpts = me._getIndexScale().options;
  5624. deprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage');
  5625. deprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness');
  5626. deprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage');
  5627. deprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength');
  5628. deprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness');
  5629. },
  5630. update: function(reset) {
  5631. var me = this;
  5632. var rects = me.getMeta().data;
  5633. var i, ilen;
  5634. me._ruler = me.getRuler();
  5635. for (i = 0, ilen = rects.length; i < ilen; ++i) {
  5636. me.updateElement(rects[i], i, reset);
  5637. }
  5638. },
  5639. updateElement: function(rectangle, index, reset) {
  5640. var me = this;
  5641. var meta = me.getMeta();
  5642. var dataset = me.getDataset();
  5643. var options = me._resolveDataElementOptions(rectangle, index);
  5644. rectangle._xScale = me.getScaleForId(meta.xAxisID);
  5645. rectangle._yScale = me.getScaleForId(meta.yAxisID);
  5646. rectangle._datasetIndex = me.index;
  5647. rectangle._index = index;
  5648. rectangle._model = {
  5649. backgroundColor: options.backgroundColor,
  5650. borderColor: options.borderColor,
  5651. borderSkipped: options.borderSkipped,
  5652. borderWidth: options.borderWidth,
  5653. datasetLabel: dataset.label,
  5654. label: me.chart.data.labels[index]
  5655. };
  5656. if (helpers$1.isArray(dataset.data[index])) {
  5657. rectangle._model.borderSkipped = null;
  5658. }
  5659. me._updateElementGeometry(rectangle, index, reset, options);
  5660. rectangle.pivot();
  5661. },
  5662. /**
  5663. * @private
  5664. */
  5665. _updateElementGeometry: function(rectangle, index, reset, options) {
  5666. var me = this;
  5667. var model = rectangle._model;
  5668. var vscale = me._getValueScale();
  5669. var base = vscale.getBasePixel();
  5670. var horizontal = vscale.isHorizontal();
  5671. var ruler = me._ruler || me.getRuler();
  5672. var vpixels = me.calculateBarValuePixels(me.index, index, options);
  5673. var ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options);
  5674. model.horizontal = horizontal;
  5675. model.base = reset ? base : vpixels.base;
  5676. model.x = horizontal ? reset ? base : vpixels.head : ipixels.center;
  5677. model.y = horizontal ? ipixels.center : reset ? base : vpixels.head;
  5678. model.height = horizontal ? ipixels.size : undefined;
  5679. model.width = horizontal ? undefined : ipixels.size;
  5680. },
  5681. /**
  5682. * Returns the stacks based on groups and bar visibility.
  5683. * @param {number} [last] - The dataset index
  5684. * @returns {string[]} The list of stack IDs
  5685. * @private
  5686. */
  5687. _getStacks: function(last) {
  5688. var me = this;
  5689. var scale = me._getIndexScale();
  5690. var metasets = scale._getMatchingVisibleMetas(me._type);
  5691. var stacked = scale.options.stacked;
  5692. var ilen = metasets.length;
  5693. var stacks = [];
  5694. var i, meta;
  5695. for (i = 0; i < ilen; ++i) {
  5696. meta = metasets[i];
  5697. // stacked | meta.stack
  5698. // | found | not found | undefined
  5699. // false | x | x | x
  5700. // true | | x |
  5701. // undefined | | x | x
  5702. if (stacked === false || stacks.indexOf(meta.stack) === -1 ||
  5703. (stacked === undefined && meta.stack === undefined)) {
  5704. stacks.push(meta.stack);
  5705. }
  5706. if (meta.index === last) {
  5707. break;
  5708. }
  5709. }
  5710. return stacks;
  5711. },
  5712. /**
  5713. * Returns the effective number of stacks based on groups and bar visibility.
  5714. * @private
  5715. */
  5716. getStackCount: function() {
  5717. return this._getStacks().length;
  5718. },
  5719. /**
  5720. * Returns the stack index for the given dataset based on groups and bar visibility.
  5721. * @param {number} [datasetIndex] - The dataset index
  5722. * @param {string} [name] - The stack name to find
  5723. * @returns {number} The stack index
  5724. * @private
  5725. */
  5726. getStackIndex: function(datasetIndex, name) {
  5727. var stacks = this._getStacks(datasetIndex);
  5728. var index = (name !== undefined)
  5729. ? stacks.indexOf(name)
  5730. : -1; // indexOf returns -1 if element is not present
  5731. return (index === -1)
  5732. ? stacks.length - 1
  5733. : index;
  5734. },
  5735. /**
  5736. * @private
  5737. */
  5738. getRuler: function() {
  5739. var me = this;
  5740. var scale = me._getIndexScale();
  5741. var pixels = [];
  5742. var i, ilen;
  5743. for (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {
  5744. pixels.push(scale.getPixelForValue(null, i, me.index));
  5745. }
  5746. return {
  5747. pixels: pixels,
  5748. start: scale._startPixel,
  5749. end: scale._endPixel,
  5750. stackCount: me.getStackCount(),
  5751. scale: scale
  5752. };
  5753. },
  5754. /**
  5755. * Note: pixel values are not clamped to the scale area.
  5756. * @private
  5757. */
  5758. calculateBarValuePixels: function(datasetIndex, index, options) {
  5759. var me = this;
  5760. var chart = me.chart;
  5761. var scale = me._getValueScale();
  5762. var isHorizontal = scale.isHorizontal();
  5763. var datasets = chart.data.datasets;
  5764. var metasets = scale._getMatchingVisibleMetas(me._type);
  5765. var value = scale._parseValue(datasets[datasetIndex].data[index]);
  5766. var minBarLength = options.minBarLength;
  5767. var stacked = scale.options.stacked;
  5768. var stack = me.getMeta().stack;
  5769. var start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;
  5770. var length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;
  5771. var ilen = metasets.length;
  5772. var i, imeta, ivalue, base, head, size, stackLength;
  5773. if (stacked || (stacked === undefined && stack !== undefined)) {
  5774. for (i = 0; i < ilen; ++i) {
  5775. imeta = metasets[i];
  5776. if (imeta.index === datasetIndex) {
  5777. break;
  5778. }
  5779. if (imeta.stack === stack) {
  5780. stackLength = scale._parseValue(datasets[imeta.index].data[index]);
  5781. ivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min;
  5782. if ((value.min < 0 && ivalue < 0) || (value.max >= 0 && ivalue > 0)) {
  5783. start += ivalue;
  5784. }
  5785. }
  5786. }
  5787. }
  5788. base = scale.getPixelForValue(start);
  5789. head = scale.getPixelForValue(start + length);
  5790. size = head - base;
  5791. if (minBarLength !== undefined && Math.abs(size) < minBarLength) {
  5792. size = minBarLength;
  5793. if (length >= 0 && !isHorizontal || length < 0 && isHorizontal) {
  5794. head = base - minBarLength;
  5795. } else {
  5796. head = base + minBarLength;
  5797. }
  5798. }
  5799. return {
  5800. size: size,
  5801. base: base,
  5802. head: head,
  5803. center: head + size / 2
  5804. };
  5805. },
  5806. /**
  5807. * @private
  5808. */
  5809. calculateBarIndexPixels: function(datasetIndex, index, ruler, options) {
  5810. var me = this;
  5811. var range = options.barThickness === 'flex'
  5812. ? computeFlexCategoryTraits(index, ruler, options)
  5813. : computeFitCategoryTraits(index, ruler, options);
  5814. var stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);
  5815. var center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);
  5816. var size = Math.min(
  5817. valueOrDefault$3(options.maxBarThickness, Infinity),
  5818. range.chunk * range.ratio);
  5819. return {
  5820. base: center - size / 2,
  5821. head: center + size / 2,
  5822. center: center,
  5823. size: size
  5824. };
  5825. },
  5826. draw: function() {
  5827. var me = this;
  5828. var chart = me.chart;
  5829. var scale = me._getValueScale();
  5830. var rects = me.getMeta().data;
  5831. var dataset = me.getDataset();
  5832. var ilen = rects.length;
  5833. var i = 0;
  5834. helpers$1.canvas.clipArea(chart.ctx, chart.chartArea);
  5835. for (; i < ilen; ++i) {
  5836. var val = scale._parseValue(dataset.data[i]);
  5837. if (!isNaN(val.min) && !isNaN(val.max)) {
  5838. rects[i].draw();
  5839. }
  5840. }
  5841. helpers$1.canvas.unclipArea(chart.ctx);
  5842. },
  5843. /**
  5844. * @private
  5845. */
  5846. _resolveDataElementOptions: function() {
  5847. var me = this;
  5848. var values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments));
  5849. var indexOpts = me._getIndexScale().options;
  5850. var valueOpts = me._getValueScale().options;
  5851. values.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage);
  5852. values.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness);
  5853. values.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage);
  5854. values.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness);
  5855. values.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength);
  5856. return values;
  5857. }
  5858. });
  5859. var valueOrDefault$4 = helpers$1.valueOrDefault;
  5860. var resolve$1 = helpers$1.options.resolve;
  5861. core_defaults._set('bubble', {
  5862. hover: {
  5863. mode: 'single'
  5864. },
  5865. scales: {
  5866. xAxes: [{
  5867. type: 'linear', // bubble should probably use a linear scale by default
  5868. position: 'bottom',
  5869. id: 'x-axis-0' // need an ID so datasets can reference the scale
  5870. }],
  5871. yAxes: [{
  5872. type: 'linear',
  5873. position: 'left',
  5874. id: 'y-axis-0'
  5875. }]
  5876. },
  5877. tooltips: {
  5878. callbacks: {
  5879. title: function() {
  5880. // Title doesn't make sense for scatter since we format the data as a point
  5881. return '';
  5882. },
  5883. label: function(item, data) {
  5884. var datasetLabel = data.datasets[item.datasetIndex].label || '';
  5885. var dataPoint = data.datasets[item.datasetIndex].data[item.index];
  5886. return datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';
  5887. }
  5888. }
  5889. }
  5890. });
  5891. var controller_bubble = core_datasetController.extend({
  5892. /**
  5893. * @protected
  5894. */
  5895. dataElementType: elements.Point,
  5896. /**
  5897. * @private
  5898. */
  5899. _dataElementOptions: [
  5900. 'backgroundColor',
  5901. 'borderColor',
  5902. 'borderWidth',
  5903. 'hoverBackgroundColor',
  5904. 'hoverBorderColor',
  5905. 'hoverBorderWidth',
  5906. 'hoverRadius',
  5907. 'hitRadius',
  5908. 'pointStyle',
  5909. 'rotation'
  5910. ],
  5911. /**
  5912. * @protected
  5913. */
  5914. update: function(reset) {
  5915. var me = this;
  5916. var meta = me.getMeta();
  5917. var points = meta.data;
  5918. // Update Points
  5919. helpers$1.each(points, function(point, index) {
  5920. me.updateElement(point, index, reset);
  5921. });
  5922. },
  5923. /**
  5924. * @protected
  5925. */
  5926. updateElement: function(point, index, reset) {
  5927. var me = this;
  5928. var meta = me.getMeta();
  5929. var custom = point.custom || {};
  5930. var xScale = me.getScaleForId(meta.xAxisID);
  5931. var yScale = me.getScaleForId(meta.yAxisID);
  5932. var options = me._resolveDataElementOptions(point, index);
  5933. var data = me.getDataset().data[index];
  5934. var dsIndex = me.index;
  5935. var x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);
  5936. var y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);
  5937. point._xScale = xScale;
  5938. point._yScale = yScale;
  5939. point._options = options;
  5940. point._datasetIndex = dsIndex;
  5941. point._index = index;
  5942. point._model = {
  5943. backgroundColor: options.backgroundColor,
  5944. borderColor: options.borderColor,
  5945. borderWidth: options.borderWidth,
  5946. hitRadius: options.hitRadius,
  5947. pointStyle: options.pointStyle,
  5948. rotation: options.rotation,
  5949. radius: reset ? 0 : options.radius,
  5950. skip: custom.skip || isNaN(x) || isNaN(y),
  5951. x: x,
  5952. y: y,
  5953. };
  5954. point.pivot();
  5955. },
  5956. /**
  5957. * @protected
  5958. */
  5959. setHoverStyle: function(point) {
  5960. var model = point._model;
  5961. var options = point._options;
  5962. var getHoverColor = helpers$1.getHoverColor;
  5963. point.$previousStyle = {
  5964. backgroundColor: model.backgroundColor,
  5965. borderColor: model.borderColor,
  5966. borderWidth: model.borderWidth,
  5967. radius: model.radius
  5968. };
  5969. model.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));
  5970. model.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));
  5971. model.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);
  5972. model.radius = options.radius + options.hoverRadius;
  5973. },
  5974. /**
  5975. * @private
  5976. */
  5977. _resolveDataElementOptions: function(point, index) {
  5978. var me = this;
  5979. var chart = me.chart;
  5980. var dataset = me.getDataset();
  5981. var custom = point.custom || {};
  5982. var data = dataset.data[index] || {};
  5983. var values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments);
  5984. // Scriptable options
  5985. var context = {
  5986. chart: chart,
  5987. dataIndex: index,
  5988. dataset: dataset,
  5989. datasetIndex: me.index
  5990. };
  5991. // In case values were cached (and thus frozen), we need to clone the values
  5992. if (me._cachedDataOpts === values) {
  5993. values = helpers$1.extend({}, values);
  5994. }
  5995. // Custom radius resolution
  5996. values.radius = resolve$1([
  5997. custom.radius,
  5998. data.r,
  5999. me._config.radius,
  6000. chart.options.elements.point.radius
  6001. ], context, index);
  6002. return values;
  6003. }
  6004. });
  6005. var valueOrDefault$5 = helpers$1.valueOrDefault;
  6006. var PI$1 = Math.PI;
  6007. var DOUBLE_PI$1 = PI$1 * 2;
  6008. var HALF_PI$1 = PI$1 / 2;
  6009. core_defaults._set('doughnut', {
  6010. animation: {
  6011. // Boolean - Whether we animate the rotation of the Doughnut
  6012. animateRotate: true,
  6013. // Boolean - Whether we animate scaling the Doughnut from the centre
  6014. animateScale: false
  6015. },
  6016. hover: {
  6017. mode: 'single'
  6018. },
  6019. legendCallback: function(chart) {
  6020. var list = document.createElement('ul');
  6021. var data = chart.data;
  6022. var datasets = data.datasets;
  6023. var labels = data.labels;
  6024. var i, ilen, listItem, listItemSpan;
  6025. list.setAttribute('class', chart.id + '-legend');
  6026. if (datasets.length) {
  6027. for (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {
  6028. listItem = list.appendChild(document.createElement('li'));
  6029. listItemSpan = listItem.appendChild(document.createElement('span'));
  6030. listItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];
  6031. if (labels[i]) {
  6032. listItem.appendChild(document.createTextNode(labels[i]));
  6033. }
  6034. }
  6035. }
  6036. return list.outerHTML;
  6037. },
  6038. legend: {
  6039. labels: {
  6040. generateLabels: function(chart) {
  6041. var data = chart.data;
  6042. if (data.labels.length && data.datasets.length) {
  6043. return data.labels.map(function(label, i) {
  6044. var meta = chart.getDatasetMeta(0);
  6045. var style = meta.controller.getStyle(i);
  6046. return {
  6047. text: label,
  6048. fillStyle: style.backgroundColor,
  6049. strokeStyle: style.borderColor,
  6050. lineWidth: style.borderWidth,
  6051. hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,
  6052. // Extra data used for toggling the correct item
  6053. index: i
  6054. };
  6055. });
  6056. }
  6057. return [];
  6058. }
  6059. },
  6060. onClick: function(e, legendItem) {
  6061. var index = legendItem.index;
  6062. var chart = this.chart;
  6063. var i, ilen, meta;
  6064. for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
  6065. meta = chart.getDatasetMeta(i);
  6066. // toggle visibility of index if exists
  6067. if (meta.data[index]) {
  6068. meta.data[index].hidden = !meta.data[index].hidden;
  6069. }
  6070. }
  6071. chart.update();
  6072. }
  6073. },
  6074. // The percentage of the chart that we cut out of the middle.
  6075. cutoutPercentage: 50,
  6076. // The rotation of the chart, where the first data arc begins.
  6077. rotation: -HALF_PI$1,
  6078. // The total circumference of the chart.
  6079. circumference: DOUBLE_PI$1,
  6080. // Need to override these to give a nice default
  6081. tooltips: {
  6082. callbacks: {
  6083. title: function() {
  6084. return '';
  6085. },
  6086. label: function(tooltipItem, data) {
  6087. var dataLabel = data.labels[tooltipItem.index];
  6088. var value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
  6089. if (helpers$1.isArray(dataLabel)) {
  6090. // show value on first line of multiline label
  6091. // need to clone because we are changing the value
  6092. dataLabel = dataLabel.slice();
  6093. dataLabel[0] += value;
  6094. } else {
  6095. dataLabel += value;
  6096. }
  6097. return dataLabel;
  6098. }
  6099. }
  6100. }
  6101. });
  6102. var controller_doughnut = core_datasetController.extend({
  6103. dataElementType: elements.Arc,
  6104. linkScales: helpers$1.noop,
  6105. /**
  6106. * @private
  6107. */
  6108. _dataElementOptions: [
  6109. 'backgroundColor',
  6110. 'borderColor',
  6111. 'borderWidth',
  6112. 'borderAlign',
  6113. 'hoverBackgroundColor',
  6114. 'hoverBorderColor',
  6115. 'hoverBorderWidth',
  6116. ],
  6117. // Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly
  6118. getRingIndex: function(datasetIndex) {
  6119. var ringIndex = 0;
  6120. for (var j = 0; j < datasetIndex; ++j) {
  6121. if (this.chart.isDatasetVisible(j)) {
  6122. ++ringIndex;
  6123. }
  6124. }
  6125. return ringIndex;
  6126. },
  6127. update: function(reset) {
  6128. var me = this;
  6129. var chart = me.chart;
  6130. var chartArea = chart.chartArea;
  6131. var opts = chart.options;
  6132. var ratioX = 1;
  6133. var ratioY = 1;
  6134. var offsetX = 0;
  6135. var offsetY = 0;
  6136. var meta = me.getMeta();
  6137. var arcs = meta.data;
  6138. var cutout = opts.cutoutPercentage / 100 || 0;
  6139. var circumference = opts.circumference;
  6140. var chartWeight = me._getRingWeight(me.index);
  6141. var maxWidth, maxHeight, i, ilen;
  6142. // If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc
  6143. if (circumference < DOUBLE_PI$1) {
  6144. var startAngle = opts.rotation % DOUBLE_PI$1;
  6145. startAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;
  6146. var endAngle = startAngle + circumference;
  6147. var startX = Math.cos(startAngle);
  6148. var startY = Math.sin(startAngle);
  6149. var endX = Math.cos(endAngle);
  6150. var endY = Math.sin(endAngle);
  6151. var contains0 = (startAngle <= 0 && endAngle >= 0) || endAngle >= DOUBLE_PI$1;
  6152. var contains90 = (startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1) || endAngle >= DOUBLE_PI$1 + HALF_PI$1;
  6153. var contains180 = startAngle === -PI$1 || endAngle >= PI$1;
  6154. var contains270 = (startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1) || endAngle >= PI$1 + HALF_PI$1;
  6155. var minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout);
  6156. var minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout);
  6157. var maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout);
  6158. var maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout);
  6159. ratioX = (maxX - minX) / 2;
  6160. ratioY = (maxY - minY) / 2;
  6161. offsetX = -(maxX + minX) / 2;
  6162. offsetY = -(maxY + minY) / 2;
  6163. }
  6164. for (i = 0, ilen = arcs.length; i < ilen; ++i) {
  6165. arcs[i]._options = me._resolveDataElementOptions(arcs[i], i);
  6166. }
  6167. chart.borderWidth = me.getMaxBorderWidth();
  6168. maxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX;
  6169. maxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY;
  6170. chart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);
  6171. chart.innerRadius = Math.max(chart.outerRadius * cutout, 0);
  6172. chart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);
  6173. chart.offsetX = offsetX * chart.outerRadius;
  6174. chart.offsetY = offsetY * chart.outerRadius;
  6175. meta.total = me.calculateTotal();
  6176. me.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);
  6177. me.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);
  6178. for (i = 0, ilen = arcs.length; i < ilen; ++i) {
  6179. me.updateElement(arcs[i], i, reset);
  6180. }
  6181. },
  6182. updateElement: function(arc, index, reset) {
  6183. var me = this;
  6184. var chart = me.chart;
  6185. var chartArea = chart.chartArea;
  6186. var opts = chart.options;
  6187. var animationOpts = opts.animation;
  6188. var centerX = (chartArea.left + chartArea.right) / 2;
  6189. var centerY = (chartArea.top + chartArea.bottom) / 2;
  6190. var startAngle = opts.rotation; // non reset case handled later
  6191. var endAngle = opts.rotation; // non reset case handled later
  6192. var dataset = me.getDataset();
  6193. var circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1);
  6194. var innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;
  6195. var outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;
  6196. var options = arc._options || {};
  6197. helpers$1.extend(arc, {
  6198. // Utility
  6199. _datasetIndex: me.index,
  6200. _index: index,
  6201. // Desired view properties
  6202. _model: {
  6203. backgroundColor: options.backgroundColor,
  6204. borderColor: options.borderColor,
  6205. borderWidth: options.borderWidth,
  6206. borderAlign: options.borderAlign,
  6207. x: centerX + chart.offsetX,
  6208. y: centerY + chart.offsetY,
  6209. startAngle: startAngle,
  6210. endAngle: endAngle,
  6211. circumference: circumference,
  6212. outerRadius: outerRadius,
  6213. innerRadius: innerRadius,
  6214. label: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])
  6215. }
  6216. });
  6217. var model = arc._model;
  6218. // Set correct angles if not resetting
  6219. if (!reset || !animationOpts.animateRotate) {
  6220. if (index === 0) {
  6221. model.startAngle = opts.rotation;
  6222. } else {
  6223. model.startAngle = me.getMeta().data[index - 1]._model.endAngle;
  6224. }
  6225. model.endAngle = model.startAngle + model.circumference;
  6226. }
  6227. arc.pivot();
  6228. },
  6229. calculateTotal: function() {
  6230. var dataset = this.getDataset();
  6231. var meta = this.getMeta();
  6232. var total = 0;
  6233. var value;
  6234. helpers$1.each(meta.data, function(element, index) {
  6235. value = dataset.data[index];
  6236. if (!isNaN(value) && !element.hidden) {
  6237. total += Math.abs(value);
  6238. }
  6239. });
  6240. /* if (total === 0) {
  6241. total = NaN;
  6242. }*/
  6243. return total;
  6244. },
  6245. calculateCircumference: function(value) {
  6246. var total = this.getMeta().total;
  6247. if (total > 0 && !isNaN(value)) {
  6248. return DOUBLE_PI$1 * (Math.abs(value) / total);
  6249. }
  6250. return 0;
  6251. },
  6252. // gets the max border or hover width to properly scale pie charts
  6253. getMaxBorderWidth: function(arcs) {
  6254. var me = this;
  6255. var max = 0;
  6256. var chart = me.chart;
  6257. var i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;
  6258. if (!arcs) {
  6259. // Find the outmost visible dataset
  6260. for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {
  6261. if (chart.isDatasetVisible(i)) {
  6262. meta = chart.getDatasetMeta(i);
  6263. arcs = meta.data;
  6264. if (i !== me.index) {
  6265. controller = meta.controller;
  6266. }
  6267. break;
  6268. }
  6269. }
  6270. }
  6271. if (!arcs) {
  6272. return 0;
  6273. }
  6274. for (i = 0, ilen = arcs.length; i < ilen; ++i) {
  6275. arc = arcs[i];
  6276. if (controller) {
  6277. controller._configure();
  6278. options = controller._resolveDataElementOptions(arc, i);
  6279. } else {
  6280. options = arc._options;
  6281. }
  6282. if (options.borderAlign !== 'inner') {
  6283. borderWidth = options.borderWidth;
  6284. hoverWidth = options.hoverBorderWidth;
  6285. max = borderWidth > max ? borderWidth : max;
  6286. max = hoverWidth > max ? hoverWidth : max;
  6287. }
  6288. }
  6289. return max;
  6290. },
  6291. /**
  6292. * @protected
  6293. */
  6294. setHoverStyle: function(arc) {
  6295. var model = arc._model;
  6296. var options = arc._options;
  6297. var getHoverColor = helpers$1.getHoverColor;
  6298. arc.$previousStyle = {
  6299. backgroundColor: model.backgroundColor,
  6300. borderColor: model.borderColor,
  6301. borderWidth: model.borderWidth,
  6302. };
  6303. model.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));
  6304. model.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));
  6305. model.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);
  6306. },
  6307. /**
  6308. * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly
  6309. * @private
  6310. */
  6311. _getRingWeightOffset: function(datasetIndex) {
  6312. var ringWeightOffset = 0;
  6313. for (var i = 0; i < datasetIndex; ++i) {
  6314. if (this.chart.isDatasetVisible(i)) {
  6315. ringWeightOffset += this._getRingWeight(i);
  6316. }
  6317. }
  6318. return ringWeightOffset;
  6319. },
  6320. /**
  6321. * @private
  6322. */
  6323. _getRingWeight: function(dataSetIndex) {
  6324. return Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0);
  6325. },
  6326. /**
  6327. * Returns the sum of all visibile data set weights. This value can be 0.
  6328. * @private
  6329. */
  6330. _getVisibleDatasetWeightTotal: function() {
  6331. return this._getRingWeightOffset(this.chart.data.datasets.length);
  6332. }
  6333. });
  6334. core_defaults._set('horizontalBar', {
  6335. hover: {
  6336. mode: 'index',
  6337. axis: 'y'
  6338. },
  6339. scales: {
  6340. xAxes: [{
  6341. type: 'linear',
  6342. position: 'bottom'
  6343. }],
  6344. yAxes: [{
  6345. type: 'category',
  6346. position: 'left',
  6347. offset: true,
  6348. gridLines: {
  6349. offsetGridLines: true
  6350. }
  6351. }]
  6352. },
  6353. elements: {
  6354. rectangle: {
  6355. borderSkipped: 'left'
  6356. }
  6357. },
  6358. tooltips: {
  6359. mode: 'index',
  6360. axis: 'y'
  6361. }
  6362. });
  6363. core_defaults._set('global', {
  6364. datasets: {
  6365. horizontalBar: {
  6366. categoryPercentage: 0.8,
  6367. barPercentage: 0.9
  6368. }
  6369. }
  6370. });
  6371. var controller_horizontalBar = controller_bar.extend({
  6372. /**
  6373. * @private
  6374. */
  6375. _getValueScaleId: function() {
  6376. return this.getMeta().xAxisID;
  6377. },
  6378. /**
  6379. * @private
  6380. */
  6381. _getIndexScaleId: function() {
  6382. return this.getMeta().yAxisID;
  6383. }
  6384. });
  6385. var valueOrDefault$6 = helpers$1.valueOrDefault;
  6386. var resolve$2 = helpers$1.options.resolve;
  6387. var isPointInArea = helpers$1.canvas._isPointInArea;
  6388. core_defaults._set('line', {
  6389. showLines: true,
  6390. spanGaps: false,
  6391. hover: {
  6392. mode: 'label'
  6393. },
  6394. scales: {
  6395. xAxes: [{
  6396. type: 'category',
  6397. id: 'x-axis-0'
  6398. }],
  6399. yAxes: [{
  6400. type: 'linear',
  6401. id: 'y-axis-0'
  6402. }]
  6403. }
  6404. });
  6405. function scaleClip(scale, halfBorderWidth) {
  6406. var tickOpts = scale && scale.options.ticks || {};
  6407. var reverse = tickOpts.reverse;
  6408. var min = tickOpts.min === undefined ? halfBorderWidth : 0;
  6409. var max = tickOpts.max === undefined ? halfBorderWidth : 0;
  6410. return {
  6411. start: reverse ? max : min,
  6412. end: reverse ? min : max
  6413. };
  6414. }
  6415. function defaultClip(xScale, yScale, borderWidth) {
  6416. var halfBorderWidth = borderWidth / 2;
  6417. var x = scaleClip(xScale, halfBorderWidth);
  6418. var y = scaleClip(yScale, halfBorderWidth);
  6419. return {
  6420. top: y.end,
  6421. right: x.end,
  6422. bottom: y.start,
  6423. left: x.start
  6424. };
  6425. }
  6426. function toClip(value) {
  6427. var t, r, b, l;
  6428. if (helpers$1.isObject(value)) {
  6429. t = value.top;
  6430. r = value.right;
  6431. b = value.bottom;
  6432. l = value.left;
  6433. } else {
  6434. t = r = b = l = value;
  6435. }
  6436. return {
  6437. top: t,
  6438. right: r,
  6439. bottom: b,
  6440. left: l
  6441. };
  6442. }
  6443. var controller_line = core_datasetController.extend({
  6444. datasetElementType: elements.Line,
  6445. dataElementType: elements.Point,
  6446. /**
  6447. * @private
  6448. */
  6449. _datasetElementOptions: [
  6450. 'backgroundColor',
  6451. 'borderCapStyle',
  6452. 'borderColor',
  6453. 'borderDash',
  6454. 'borderDashOffset',
  6455. 'borderJoinStyle',
  6456. 'borderWidth',
  6457. 'cubicInterpolationMode',
  6458. 'fill'
  6459. ],
  6460. /**
  6461. * @private
  6462. */
  6463. _dataElementOptions: {
  6464. backgroundColor: 'pointBackgroundColor',
  6465. borderColor: 'pointBorderColor',
  6466. borderWidth: 'pointBorderWidth',
  6467. hitRadius: 'pointHitRadius',
  6468. hoverBackgroundColor: 'pointHoverBackgroundColor',
  6469. hoverBorderColor: 'pointHoverBorderColor',
  6470. hoverBorderWidth: 'pointHoverBorderWidth',
  6471. hoverRadius: 'pointHoverRadius',
  6472. pointStyle: 'pointStyle',
  6473. radius: 'pointRadius',
  6474. rotation: 'pointRotation'
  6475. },
  6476. update: function(reset) {
  6477. var me = this;
  6478. var meta = me.getMeta();
  6479. var line = meta.dataset;
  6480. var points = meta.data || [];
  6481. var options = me.chart.options;
  6482. var config = me._config;
  6483. var showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines);
  6484. var i, ilen;
  6485. me._xScale = me.getScaleForId(meta.xAxisID);
  6486. me._yScale = me.getScaleForId(meta.yAxisID);
  6487. // Update Line
  6488. if (showLine) {
  6489. // Compatibility: If the properties are defined with only the old name, use those values
  6490. if (config.tension !== undefined && config.lineTension === undefined) {
  6491. config.lineTension = config.tension;
  6492. }
  6493. // Utility
  6494. line._scale = me._yScale;
  6495. line._datasetIndex = me.index;
  6496. // Data
  6497. line._children = points;
  6498. // Model
  6499. line._model = me._resolveDatasetElementOptions(line);
  6500. line.pivot();
  6501. }
  6502. // Update Points
  6503. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6504. me.updateElement(points[i], i, reset);
  6505. }
  6506. if (showLine && line._model.tension !== 0) {
  6507. me.updateBezierControlPoints();
  6508. }
  6509. // Now pivot the point for animation
  6510. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6511. points[i].pivot();
  6512. }
  6513. },
  6514. updateElement: function(point, index, reset) {
  6515. var me = this;
  6516. var meta = me.getMeta();
  6517. var custom = point.custom || {};
  6518. var dataset = me.getDataset();
  6519. var datasetIndex = me.index;
  6520. var value = dataset.data[index];
  6521. var xScale = me._xScale;
  6522. var yScale = me._yScale;
  6523. var lineModel = meta.dataset._model;
  6524. var x, y;
  6525. var options = me._resolveDataElementOptions(point, index);
  6526. x = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);
  6527. y = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);
  6528. // Utility
  6529. point._xScale = xScale;
  6530. point._yScale = yScale;
  6531. point._options = options;
  6532. point._datasetIndex = datasetIndex;
  6533. point._index = index;
  6534. // Desired view properties
  6535. point._model = {
  6536. x: x,
  6537. y: y,
  6538. skip: custom.skip || isNaN(x) || isNaN(y),
  6539. // Appearance
  6540. radius: options.radius,
  6541. pointStyle: options.pointStyle,
  6542. rotation: options.rotation,
  6543. backgroundColor: options.backgroundColor,
  6544. borderColor: options.borderColor,
  6545. borderWidth: options.borderWidth,
  6546. tension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),
  6547. steppedLine: lineModel ? lineModel.steppedLine : false,
  6548. // Tooltip
  6549. hitRadius: options.hitRadius
  6550. };
  6551. },
  6552. /**
  6553. * @private
  6554. */
  6555. _resolveDatasetElementOptions: function(element) {
  6556. var me = this;
  6557. var config = me._config;
  6558. var custom = element.custom || {};
  6559. var options = me.chart.options;
  6560. var lineOptions = options.elements.line;
  6561. var values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);
  6562. // The default behavior of lines is to break at null values, according
  6563. // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158
  6564. // This option gives lines the ability to span gaps
  6565. values.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps);
  6566. values.tension = valueOrDefault$6(config.lineTension, lineOptions.tension);
  6567. values.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]);
  6568. values.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth)));
  6569. return values;
  6570. },
  6571. calculatePointY: function(value, index, datasetIndex) {
  6572. var me = this;
  6573. var chart = me.chart;
  6574. var yScale = me._yScale;
  6575. var sumPos = 0;
  6576. var sumNeg = 0;
  6577. var i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen;
  6578. if (yScale.options.stacked) {
  6579. rightValue = +yScale.getRightValue(value);
  6580. metasets = chart._getSortedVisibleDatasetMetas();
  6581. ilen = metasets.length;
  6582. for (i = 0; i < ilen; ++i) {
  6583. dsMeta = metasets[i];
  6584. if (dsMeta.index === datasetIndex) {
  6585. break;
  6586. }
  6587. ds = chart.data.datasets[dsMeta.index];
  6588. if (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) {
  6589. stackedRightValue = +yScale.getRightValue(ds.data[index]);
  6590. if (stackedRightValue < 0) {
  6591. sumNeg += stackedRightValue || 0;
  6592. } else {
  6593. sumPos += stackedRightValue || 0;
  6594. }
  6595. }
  6596. }
  6597. if (rightValue < 0) {
  6598. return yScale.getPixelForValue(sumNeg + rightValue);
  6599. }
  6600. return yScale.getPixelForValue(sumPos + rightValue);
  6601. }
  6602. return yScale.getPixelForValue(value);
  6603. },
  6604. updateBezierControlPoints: function() {
  6605. var me = this;
  6606. var chart = me.chart;
  6607. var meta = me.getMeta();
  6608. var lineModel = meta.dataset._model;
  6609. var area = chart.chartArea;
  6610. var points = meta.data || [];
  6611. var i, ilen, model, controlPoints;
  6612. // Only consider points that are drawn in case the spanGaps option is used
  6613. if (lineModel.spanGaps) {
  6614. points = points.filter(function(pt) {
  6615. return !pt._model.skip;
  6616. });
  6617. }
  6618. function capControlPoint(pt, min, max) {
  6619. return Math.max(Math.min(pt, max), min);
  6620. }
  6621. if (lineModel.cubicInterpolationMode === 'monotone') {
  6622. helpers$1.splineCurveMonotone(points);
  6623. } else {
  6624. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6625. model = points[i]._model;
  6626. controlPoints = helpers$1.splineCurve(
  6627. helpers$1.previousItem(points, i)._model,
  6628. model,
  6629. helpers$1.nextItem(points, i)._model,
  6630. lineModel.tension
  6631. );
  6632. model.controlPointPreviousX = controlPoints.previous.x;
  6633. model.controlPointPreviousY = controlPoints.previous.y;
  6634. model.controlPointNextX = controlPoints.next.x;
  6635. model.controlPointNextY = controlPoints.next.y;
  6636. }
  6637. }
  6638. if (chart.options.elements.line.capBezierPoints) {
  6639. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6640. model = points[i]._model;
  6641. if (isPointInArea(model, area)) {
  6642. if (i > 0 && isPointInArea(points[i - 1]._model, area)) {
  6643. model.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);
  6644. model.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);
  6645. }
  6646. if (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {
  6647. model.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);
  6648. model.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);
  6649. }
  6650. }
  6651. }
  6652. }
  6653. },
  6654. draw: function() {
  6655. var me = this;
  6656. var chart = me.chart;
  6657. var meta = me.getMeta();
  6658. var points = meta.data || [];
  6659. var area = chart.chartArea;
  6660. var canvas = chart.canvas;
  6661. var i = 0;
  6662. var ilen = points.length;
  6663. var clip;
  6664. if (me._showLine) {
  6665. clip = meta.dataset._model.clip;
  6666. helpers$1.canvas.clipArea(chart.ctx, {
  6667. left: clip.left === false ? 0 : area.left - clip.left,
  6668. right: clip.right === false ? canvas.width : area.right + clip.right,
  6669. top: clip.top === false ? 0 : area.top - clip.top,
  6670. bottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom
  6671. });
  6672. meta.dataset.draw();
  6673. helpers$1.canvas.unclipArea(chart.ctx);
  6674. }
  6675. // Draw the points
  6676. for (; i < ilen; ++i) {
  6677. points[i].draw(area);
  6678. }
  6679. },
  6680. /**
  6681. * @protected
  6682. */
  6683. setHoverStyle: function(point) {
  6684. var model = point._model;
  6685. var options = point._options;
  6686. var getHoverColor = helpers$1.getHoverColor;
  6687. point.$previousStyle = {
  6688. backgroundColor: model.backgroundColor,
  6689. borderColor: model.borderColor,
  6690. borderWidth: model.borderWidth,
  6691. radius: model.radius
  6692. };
  6693. model.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));
  6694. model.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));
  6695. model.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);
  6696. model.radius = valueOrDefault$6(options.hoverRadius, options.radius);
  6697. },
  6698. });
  6699. var resolve$3 = helpers$1.options.resolve;
  6700. core_defaults._set('polarArea', {
  6701. scale: {
  6702. type: 'radialLinear',
  6703. angleLines: {
  6704. display: false
  6705. },
  6706. gridLines: {
  6707. circular: true
  6708. },
  6709. pointLabels: {
  6710. display: false
  6711. },
  6712. ticks: {
  6713. beginAtZero: true
  6714. }
  6715. },
  6716. // Boolean - Whether to animate the rotation of the chart
  6717. animation: {
  6718. animateRotate: true,
  6719. animateScale: true
  6720. },
  6721. startAngle: -0.5 * Math.PI,
  6722. legendCallback: function(chart) {
  6723. var list = document.createElement('ul');
  6724. var data = chart.data;
  6725. var datasets = data.datasets;
  6726. var labels = data.labels;
  6727. var i, ilen, listItem, listItemSpan;
  6728. list.setAttribute('class', chart.id + '-legend');
  6729. if (datasets.length) {
  6730. for (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {
  6731. listItem = list.appendChild(document.createElement('li'));
  6732. listItemSpan = listItem.appendChild(document.createElement('span'));
  6733. listItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];
  6734. if (labels[i]) {
  6735. listItem.appendChild(document.createTextNode(labels[i]));
  6736. }
  6737. }
  6738. }
  6739. return list.outerHTML;
  6740. },
  6741. legend: {
  6742. labels: {
  6743. generateLabels: function(chart) {
  6744. var data = chart.data;
  6745. if (data.labels.length && data.datasets.length) {
  6746. return data.labels.map(function(label, i) {
  6747. var meta = chart.getDatasetMeta(0);
  6748. var style = meta.controller.getStyle(i);
  6749. return {
  6750. text: label,
  6751. fillStyle: style.backgroundColor,
  6752. strokeStyle: style.borderColor,
  6753. lineWidth: style.borderWidth,
  6754. hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,
  6755. // Extra data used for toggling the correct item
  6756. index: i
  6757. };
  6758. });
  6759. }
  6760. return [];
  6761. }
  6762. },
  6763. onClick: function(e, legendItem) {
  6764. var index = legendItem.index;
  6765. var chart = this.chart;
  6766. var i, ilen, meta;
  6767. for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
  6768. meta = chart.getDatasetMeta(i);
  6769. meta.data[index].hidden = !meta.data[index].hidden;
  6770. }
  6771. chart.update();
  6772. }
  6773. },
  6774. // Need to override these to give a nice default
  6775. tooltips: {
  6776. callbacks: {
  6777. title: function() {
  6778. return '';
  6779. },
  6780. label: function(item, data) {
  6781. return data.labels[item.index] + ': ' + item.yLabel;
  6782. }
  6783. }
  6784. }
  6785. });
  6786. var controller_polarArea = core_datasetController.extend({
  6787. dataElementType: elements.Arc,
  6788. linkScales: helpers$1.noop,
  6789. /**
  6790. * @private
  6791. */
  6792. _dataElementOptions: [
  6793. 'backgroundColor',
  6794. 'borderColor',
  6795. 'borderWidth',
  6796. 'borderAlign',
  6797. 'hoverBackgroundColor',
  6798. 'hoverBorderColor',
  6799. 'hoverBorderWidth',
  6800. ],
  6801. /**
  6802. * @private
  6803. */
  6804. _getIndexScaleId: function() {
  6805. return this.chart.scale.id;
  6806. },
  6807. /**
  6808. * @private
  6809. */
  6810. _getValueScaleId: function() {
  6811. return this.chart.scale.id;
  6812. },
  6813. update: function(reset) {
  6814. var me = this;
  6815. var dataset = me.getDataset();
  6816. var meta = me.getMeta();
  6817. var start = me.chart.options.startAngle || 0;
  6818. var starts = me._starts = [];
  6819. var angles = me._angles = [];
  6820. var arcs = meta.data;
  6821. var i, ilen, angle;
  6822. me._updateRadius();
  6823. meta.count = me.countVisibleElements();
  6824. for (i = 0, ilen = dataset.data.length; i < ilen; i++) {
  6825. starts[i] = start;
  6826. angle = me._computeAngle(i);
  6827. angles[i] = angle;
  6828. start += angle;
  6829. }
  6830. for (i = 0, ilen = arcs.length; i < ilen; ++i) {
  6831. arcs[i]._options = me._resolveDataElementOptions(arcs[i], i);
  6832. me.updateElement(arcs[i], i, reset);
  6833. }
  6834. },
  6835. /**
  6836. * @private
  6837. */
  6838. _updateRadius: function() {
  6839. var me = this;
  6840. var chart = me.chart;
  6841. var chartArea = chart.chartArea;
  6842. var opts = chart.options;
  6843. var minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);
  6844. chart.outerRadius = Math.max(minSize / 2, 0);
  6845. chart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);
  6846. chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();
  6847. me.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);
  6848. me.innerRadius = me.outerRadius - chart.radiusLength;
  6849. },
  6850. updateElement: function(arc, index, reset) {
  6851. var me = this;
  6852. var chart = me.chart;
  6853. var dataset = me.getDataset();
  6854. var opts = chart.options;
  6855. var animationOpts = opts.animation;
  6856. var scale = chart.scale;
  6857. var labels = chart.data.labels;
  6858. var centerX = scale.xCenter;
  6859. var centerY = scale.yCenter;
  6860. // var negHalfPI = -0.5 * Math.PI;
  6861. var datasetStartAngle = opts.startAngle;
  6862. var distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);
  6863. var startAngle = me._starts[index];
  6864. var endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);
  6865. var resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);
  6866. var options = arc._options || {};
  6867. helpers$1.extend(arc, {
  6868. // Utility
  6869. _datasetIndex: me.index,
  6870. _index: index,
  6871. _scale: scale,
  6872. // Desired view properties
  6873. _model: {
  6874. backgroundColor: options.backgroundColor,
  6875. borderColor: options.borderColor,
  6876. borderWidth: options.borderWidth,
  6877. borderAlign: options.borderAlign,
  6878. x: centerX,
  6879. y: centerY,
  6880. innerRadius: 0,
  6881. outerRadius: reset ? resetRadius : distance,
  6882. startAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,
  6883. endAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,
  6884. label: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])
  6885. }
  6886. });
  6887. arc.pivot();
  6888. },
  6889. countVisibleElements: function() {
  6890. var dataset = this.getDataset();
  6891. var meta = this.getMeta();
  6892. var count = 0;
  6893. helpers$1.each(meta.data, function(element, index) {
  6894. if (!isNaN(dataset.data[index]) && !element.hidden) {
  6895. count++;
  6896. }
  6897. });
  6898. return count;
  6899. },
  6900. /**
  6901. * @protected
  6902. */
  6903. setHoverStyle: function(arc) {
  6904. var model = arc._model;
  6905. var options = arc._options;
  6906. var getHoverColor = helpers$1.getHoverColor;
  6907. var valueOrDefault = helpers$1.valueOrDefault;
  6908. arc.$previousStyle = {
  6909. backgroundColor: model.backgroundColor,
  6910. borderColor: model.borderColor,
  6911. borderWidth: model.borderWidth,
  6912. };
  6913. model.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));
  6914. model.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));
  6915. model.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);
  6916. },
  6917. /**
  6918. * @private
  6919. */
  6920. _computeAngle: function(index) {
  6921. var me = this;
  6922. var count = this.getMeta().count;
  6923. var dataset = me.getDataset();
  6924. var meta = me.getMeta();
  6925. if (isNaN(dataset.data[index]) || meta.data[index].hidden) {
  6926. return 0;
  6927. }
  6928. // Scriptable options
  6929. var context = {
  6930. chart: me.chart,
  6931. dataIndex: index,
  6932. dataset: dataset,
  6933. datasetIndex: me.index
  6934. };
  6935. return resolve$3([
  6936. me.chart.options.elements.arc.angle,
  6937. (2 * Math.PI) / count
  6938. ], context, index);
  6939. }
  6940. });
  6941. core_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));
  6942. core_defaults._set('pie', {
  6943. cutoutPercentage: 0
  6944. });
  6945. // Pie charts are Doughnut chart with different defaults
  6946. var controller_pie = controller_doughnut;
  6947. var valueOrDefault$7 = helpers$1.valueOrDefault;
  6948. core_defaults._set('radar', {
  6949. spanGaps: false,
  6950. scale: {
  6951. type: 'radialLinear'
  6952. },
  6953. elements: {
  6954. line: {
  6955. fill: 'start',
  6956. tension: 0 // no bezier in radar
  6957. }
  6958. }
  6959. });
  6960. var controller_radar = core_datasetController.extend({
  6961. datasetElementType: elements.Line,
  6962. dataElementType: elements.Point,
  6963. linkScales: helpers$1.noop,
  6964. /**
  6965. * @private
  6966. */
  6967. _datasetElementOptions: [
  6968. 'backgroundColor',
  6969. 'borderWidth',
  6970. 'borderColor',
  6971. 'borderCapStyle',
  6972. 'borderDash',
  6973. 'borderDashOffset',
  6974. 'borderJoinStyle',
  6975. 'fill'
  6976. ],
  6977. /**
  6978. * @private
  6979. */
  6980. _dataElementOptions: {
  6981. backgroundColor: 'pointBackgroundColor',
  6982. borderColor: 'pointBorderColor',
  6983. borderWidth: 'pointBorderWidth',
  6984. hitRadius: 'pointHitRadius',
  6985. hoverBackgroundColor: 'pointHoverBackgroundColor',
  6986. hoverBorderColor: 'pointHoverBorderColor',
  6987. hoverBorderWidth: 'pointHoverBorderWidth',
  6988. hoverRadius: 'pointHoverRadius',
  6989. pointStyle: 'pointStyle',
  6990. radius: 'pointRadius',
  6991. rotation: 'pointRotation'
  6992. },
  6993. /**
  6994. * @private
  6995. */
  6996. _getIndexScaleId: function() {
  6997. return this.chart.scale.id;
  6998. },
  6999. /**
  7000. * @private
  7001. */
  7002. _getValueScaleId: function() {
  7003. return this.chart.scale.id;
  7004. },
  7005. update: function(reset) {
  7006. var me = this;
  7007. var meta = me.getMeta();
  7008. var line = meta.dataset;
  7009. var points = meta.data || [];
  7010. var scale = me.chart.scale;
  7011. var config = me._config;
  7012. var i, ilen;
  7013. // Compatibility: If the properties are defined with only the old name, use those values
  7014. if (config.tension !== undefined && config.lineTension === undefined) {
  7015. config.lineTension = config.tension;
  7016. }
  7017. // Utility
  7018. line._scale = scale;
  7019. line._datasetIndex = me.index;
  7020. // Data
  7021. line._children = points;
  7022. line._loop = true;
  7023. // Model
  7024. line._model = me._resolveDatasetElementOptions(line);
  7025. line.pivot();
  7026. // Update Points
  7027. for (i = 0, ilen = points.length; i < ilen; ++i) {
  7028. me.updateElement(points[i], i, reset);
  7029. }
  7030. // Update bezier control points
  7031. me.updateBezierControlPoints();
  7032. // Now pivot the point for animation
  7033. for (i = 0, ilen = points.length; i < ilen; ++i) {
  7034. points[i].pivot();
  7035. }
  7036. },
  7037. updateElement: function(point, index, reset) {
  7038. var me = this;
  7039. var custom = point.custom || {};
  7040. var dataset = me.getDataset();
  7041. var scale = me.chart.scale;
  7042. var pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);
  7043. var options = me._resolveDataElementOptions(point, index);
  7044. var lineModel = me.getMeta().dataset._model;
  7045. var x = reset ? scale.xCenter : pointPosition.x;
  7046. var y = reset ? scale.yCenter : pointPosition.y;
  7047. // Utility
  7048. point._scale = scale;
  7049. point._options = options;
  7050. point._datasetIndex = me.index;
  7051. point._index = index;
  7052. // Desired view properties
  7053. point._model = {
  7054. x: x, // value not used in dataset scale, but we want a consistent API between scales
  7055. y: y,
  7056. skip: custom.skip || isNaN(x) || isNaN(y),
  7057. // Appearance
  7058. radius: options.radius,
  7059. pointStyle: options.pointStyle,
  7060. rotation: options.rotation,
  7061. backgroundColor: options.backgroundColor,
  7062. borderColor: options.borderColor,
  7063. borderWidth: options.borderWidth,
  7064. tension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0),
  7065. // Tooltip
  7066. hitRadius: options.hitRadius
  7067. };
  7068. },
  7069. /**
  7070. * @private
  7071. */
  7072. _resolveDatasetElementOptions: function() {
  7073. var me = this;
  7074. var config = me._config;
  7075. var options = me.chart.options;
  7076. var values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);
  7077. values.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps);
  7078. values.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension);
  7079. return values;
  7080. },
  7081. updateBezierControlPoints: function() {
  7082. var me = this;
  7083. var meta = me.getMeta();
  7084. var area = me.chart.chartArea;
  7085. var points = meta.data || [];
  7086. var i, ilen, model, controlPoints;
  7087. // Only consider points that are drawn in case the spanGaps option is used
  7088. if (meta.dataset._model.spanGaps) {
  7089. points = points.filter(function(pt) {
  7090. return !pt._model.skip;
  7091. });
  7092. }
  7093. function capControlPoint(pt, min, max) {
  7094. return Math.max(Math.min(pt, max), min);
  7095. }
  7096. for (i = 0, ilen = points.length; i < ilen; ++i) {
  7097. model = points[i]._model;
  7098. controlPoints = helpers$1.splineCurve(
  7099. helpers$1.previousItem(points, i, true)._model,
  7100. model,
  7101. helpers$1.nextItem(points, i, true)._model,
  7102. model.tension
  7103. );
  7104. // Prevent the bezier going outside of the bounds of the graph
  7105. model.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);
  7106. model.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);
  7107. model.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);
  7108. model.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);
  7109. }
  7110. },
  7111. setHoverStyle: function(point) {
  7112. var model = point._model;
  7113. var options = point._options;
  7114. var getHoverColor = helpers$1.getHoverColor;
  7115. point.$previousStyle = {
  7116. backgroundColor: model.backgroundColor,
  7117. borderColor: model.borderColor,
  7118. borderWidth: model.borderWidth,
  7119. radius: model.radius
  7120. };
  7121. model.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));
  7122. model.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor));
  7123. model.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth);
  7124. model.radius = valueOrDefault$7(options.hoverRadius, options.radius);
  7125. }
  7126. });
  7127. core_defaults._set('scatter', {
  7128. hover: {
  7129. mode: 'single'
  7130. },
  7131. scales: {
  7132. xAxes: [{
  7133. id: 'x-axis-1', // need an ID so datasets can reference the scale
  7134. type: 'linear', // scatter should not use a category axis
  7135. position: 'bottom'
  7136. }],
  7137. yAxes: [{
  7138. id: 'y-axis-1',
  7139. type: 'linear',
  7140. position: 'left'
  7141. }]
  7142. },
  7143. tooltips: {
  7144. callbacks: {
  7145. title: function() {
  7146. return ''; // doesn't make sense for scatter since data are formatted as a point
  7147. },
  7148. label: function(item) {
  7149. return '(' + item.xLabel + ', ' + item.yLabel + ')';
  7150. }
  7151. }
  7152. }
  7153. });
  7154. core_defaults._set('global', {
  7155. datasets: {
  7156. scatter: {
  7157. showLine: false
  7158. }
  7159. }
  7160. });
  7161. // Scatter charts use line controllers
  7162. var controller_scatter = controller_line;
  7163. // NOTE export a map in which the key represents the controller type, not
  7164. // the class, and so must be CamelCase in order to be correctly retrieved
  7165. // by the controller in core.controller.js (`controllers[meta.type]`).
  7166. var controllers = {
  7167. bar: controller_bar,
  7168. bubble: controller_bubble,
  7169. doughnut: controller_doughnut,
  7170. horizontalBar: controller_horizontalBar,
  7171. line: controller_line,
  7172. polarArea: controller_polarArea,
  7173. pie: controller_pie,
  7174. radar: controller_radar,
  7175. scatter: controller_scatter
  7176. };
  7177. /**
  7178. * Helper function to get relative position for an event
  7179. * @param {Event|IEvent} event - The event to get the position for
  7180. * @param {Chart} chart - The chart
  7181. * @returns {object} the event position
  7182. */
  7183. function getRelativePosition(e, chart) {
  7184. if (e.native) {
  7185. return {
  7186. x: e.x,
  7187. y: e.y
  7188. };
  7189. }
  7190. return helpers$1.getRelativePosition(e, chart);
  7191. }
  7192. /**
  7193. * Helper function to traverse all of the visible elements in the chart
  7194. * @param {Chart} chart - the chart
  7195. * @param {function} handler - the callback to execute for each visible item
  7196. */
  7197. function parseVisibleItems(chart, handler) {
  7198. var metasets = chart._getSortedVisibleDatasetMetas();
  7199. var metadata, i, j, ilen, jlen, element;
  7200. for (i = 0, ilen = metasets.length; i < ilen; ++i) {
  7201. metadata = metasets[i].data;
  7202. for (j = 0, jlen = metadata.length; j < jlen; ++j) {
  7203. element = metadata[j];
  7204. if (!element._view.skip) {
  7205. handler(element);
  7206. }
  7207. }
  7208. }
  7209. }
  7210. /**
  7211. * Helper function to get the items that intersect the event position
  7212. * @param {ChartElement[]} items - elements to filter
  7213. * @param {object} position - the point to be nearest to
  7214. * @return {ChartElement[]} the nearest items
  7215. */
  7216. function getIntersectItems(chart, position) {
  7217. var elements = [];
  7218. parseVisibleItems(chart, function(element) {
  7219. if (element.inRange(position.x, position.y)) {
  7220. elements.push(element);
  7221. }
  7222. });
  7223. return elements;
  7224. }
  7225. /**
  7226. * Helper function to get the items nearest to the event position considering all visible items in teh chart
  7227. * @param {Chart} chart - the chart to look at elements from
  7228. * @param {object} position - the point to be nearest to
  7229. * @param {boolean} intersect - if true, only consider items that intersect the position
  7230. * @param {function} distanceMetric - function to provide the distance between points
  7231. * @return {ChartElement[]} the nearest items
  7232. */
  7233. function getNearestItems(chart, position, intersect, distanceMetric) {
  7234. var minDistance = Number.POSITIVE_INFINITY;
  7235. var nearestItems = [];
  7236. parseVisibleItems(chart, function(element) {
  7237. if (intersect && !element.inRange(position.x, position.y)) {
  7238. return;
  7239. }
  7240. var center = element.getCenterPoint();
  7241. var distance = distanceMetric(position, center);
  7242. if (distance < minDistance) {
  7243. nearestItems = [element];
  7244. minDistance = distance;
  7245. } else if (distance === minDistance) {
  7246. // Can have multiple items at the same distance in which case we sort by size
  7247. nearestItems.push(element);
  7248. }
  7249. });
  7250. return nearestItems;
  7251. }
  7252. /**
  7253. * Get a distance metric function for two points based on the
  7254. * axis mode setting
  7255. * @param {string} axis - the axis mode. x|y|xy
  7256. */
  7257. function getDistanceMetricForAxis(axis) {
  7258. var useX = axis.indexOf('x') !== -1;
  7259. var useY = axis.indexOf('y') !== -1;
  7260. return function(pt1, pt2) {
  7261. var deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;
  7262. var deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;
  7263. return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
  7264. };
  7265. }
  7266. function indexMode(chart, e, options) {
  7267. var position = getRelativePosition(e, chart);
  7268. // Default axis for index mode is 'x' to match old behaviour
  7269. options.axis = options.axis || 'x';
  7270. var distanceMetric = getDistanceMetricForAxis(options.axis);
  7271. var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);
  7272. var elements = [];
  7273. if (!items.length) {
  7274. return [];
  7275. }
  7276. chart._getSortedVisibleDatasetMetas().forEach(function(meta) {
  7277. var element = meta.data[items[0]._index];
  7278. // don't count items that are skipped (null data)
  7279. if (element && !element._view.skip) {
  7280. elements.push(element);
  7281. }
  7282. });
  7283. return elements;
  7284. }
  7285. /**
  7286. * @interface IInteractionOptions
  7287. */
  7288. /**
  7289. * If true, only consider items that intersect the point
  7290. * @name IInterfaceOptions#boolean
  7291. * @type Boolean
  7292. */
  7293. /**
  7294. * Contains interaction related functions
  7295. * @namespace Chart.Interaction
  7296. */
  7297. var core_interaction = {
  7298. // Helper function for different modes
  7299. modes: {
  7300. single: function(chart, e) {
  7301. var position = getRelativePosition(e, chart);
  7302. var elements = [];
  7303. parseVisibleItems(chart, function(element) {
  7304. if (element.inRange(position.x, position.y)) {
  7305. elements.push(element);
  7306. return elements;
  7307. }
  7308. });
  7309. return elements.slice(0, 1);
  7310. },
  7311. /**
  7312. * @function Chart.Interaction.modes.label
  7313. * @deprecated since version 2.4.0
  7314. * @todo remove at version 3
  7315. * @private
  7316. */
  7317. label: indexMode,
  7318. /**
  7319. * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something
  7320. * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item
  7321. * @function Chart.Interaction.modes.index
  7322. * @since v2.4.0
  7323. * @param {Chart} chart - the chart we are returning items from
  7324. * @param {Event} e - the event we are find things at
  7325. * @param {IInteractionOptions} options - options to use during interaction
  7326. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  7327. */
  7328. index: indexMode,
  7329. /**
  7330. * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something
  7331. * If the options.intersect is false, we find the nearest item and return the items in that dataset
  7332. * @function Chart.Interaction.modes.dataset
  7333. * @param {Chart} chart - the chart we are returning items from
  7334. * @param {Event} e - the event we are find things at
  7335. * @param {IInteractionOptions} options - options to use during interaction
  7336. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  7337. */
  7338. dataset: function(chart, e, options) {
  7339. var position = getRelativePosition(e, chart);
  7340. options.axis = options.axis || 'xy';
  7341. var distanceMetric = getDistanceMetricForAxis(options.axis);
  7342. var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);
  7343. if (items.length > 0) {
  7344. items = chart.getDatasetMeta(items[0]._datasetIndex).data;
  7345. }
  7346. return items;
  7347. },
  7348. /**
  7349. * @function Chart.Interaction.modes.x-axis
  7350. * @deprecated since version 2.4.0. Use index mode and intersect == true
  7351. * @todo remove at version 3
  7352. * @private
  7353. */
  7354. 'x-axis': function(chart, e) {
  7355. return indexMode(chart, e, {intersect: false});
  7356. },
  7357. /**
  7358. * Point mode returns all elements that hit test based on the event position
  7359. * of the event
  7360. * @function Chart.Interaction.modes.intersect
  7361. * @param {Chart} chart - the chart we are returning items from
  7362. * @param {Event} e - the event we are find things at
  7363. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  7364. */
  7365. point: function(chart, e) {
  7366. var position = getRelativePosition(e, chart);
  7367. return getIntersectItems(chart, position);
  7368. },
  7369. /**
  7370. * nearest mode returns the element closest to the point
  7371. * @function Chart.Interaction.modes.intersect
  7372. * @param {Chart} chart - the chart we are returning items from
  7373. * @param {Event} e - the event we are find things at
  7374. * @param {IInteractionOptions} options - options to use
  7375. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  7376. */
  7377. nearest: function(chart, e, options) {
  7378. var position = getRelativePosition(e, chart);
  7379. options.axis = options.axis || 'xy';
  7380. var distanceMetric = getDistanceMetricForAxis(options.axis);
  7381. return getNearestItems(chart, position, options.intersect, distanceMetric);
  7382. },
  7383. /**
  7384. * x mode returns the elements that hit-test at the current x coordinate
  7385. * @function Chart.Interaction.modes.x
  7386. * @param {Chart} chart - the chart we are returning items from
  7387. * @param {Event} e - the event we are find things at
  7388. * @param {IInteractionOptions} options - options to use
  7389. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  7390. */
  7391. x: function(chart, e, options) {
  7392. var position = getRelativePosition(e, chart);
  7393. var items = [];
  7394. var intersectsItem = false;
  7395. parseVisibleItems(chart, function(element) {
  7396. if (element.inXRange(position.x)) {
  7397. items.push(element);
  7398. }
  7399. if (element.inRange(position.x, position.y)) {
  7400. intersectsItem = true;
  7401. }
  7402. });
  7403. // If we want to trigger on an intersect and we don't have any items
  7404. // that intersect the position, return nothing
  7405. if (options.intersect && !intersectsItem) {
  7406. items = [];
  7407. }
  7408. return items;
  7409. },
  7410. /**
  7411. * y mode returns the elements that hit-test at the current y coordinate
  7412. * @function Chart.Interaction.modes.y
  7413. * @param {Chart} chart - the chart we are returning items from
  7414. * @param {Event} e - the event we are find things at
  7415. * @param {IInteractionOptions} options - options to use
  7416. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  7417. */
  7418. y: function(chart, e, options) {
  7419. var position = getRelativePosition(e, chart);
  7420. var items = [];
  7421. var intersectsItem = false;
  7422. parseVisibleItems(chart, function(element) {
  7423. if (element.inYRange(position.y)) {
  7424. items.push(element);
  7425. }
  7426. if (element.inRange(position.x, position.y)) {
  7427. intersectsItem = true;
  7428. }
  7429. });
  7430. // If we want to trigger on an intersect and we don't have any items
  7431. // that intersect the position, return nothing
  7432. if (options.intersect && !intersectsItem) {
  7433. items = [];
  7434. }
  7435. return items;
  7436. }
  7437. }
  7438. };
  7439. var extend = helpers$1.extend;
  7440. function filterByPosition(array, position) {
  7441. return helpers$1.where(array, function(v) {
  7442. return v.pos === position;
  7443. });
  7444. }
  7445. function sortByWeight(array, reverse) {
  7446. return array.sort(function(a, b) {
  7447. var v0 = reverse ? b : a;
  7448. var v1 = reverse ? a : b;
  7449. return v0.weight === v1.weight ?
  7450. v0.index - v1.index :
  7451. v0.weight - v1.weight;
  7452. });
  7453. }
  7454. function wrapBoxes(boxes) {
  7455. var layoutBoxes = [];
  7456. var i, ilen, box;
  7457. for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {
  7458. box = boxes[i];
  7459. layoutBoxes.push({
  7460. index: i,
  7461. box: box,
  7462. pos: box.position,
  7463. horizontal: box.isHorizontal(),
  7464. weight: box.weight
  7465. });
  7466. }
  7467. return layoutBoxes;
  7468. }
  7469. function setLayoutDims(layouts, params) {
  7470. var i, ilen, layout;
  7471. for (i = 0, ilen = layouts.length; i < ilen; ++i) {
  7472. layout = layouts[i];
  7473. // store width used instead of chartArea.w in fitBoxes
  7474. layout.width = layout.horizontal
  7475. ? layout.box.fullWidth && params.availableWidth
  7476. : params.vBoxMaxWidth;
  7477. // store height used instead of chartArea.h in fitBoxes
  7478. layout.height = layout.horizontal && params.hBoxMaxHeight;
  7479. }
  7480. }
  7481. function buildLayoutBoxes(boxes) {
  7482. var layoutBoxes = wrapBoxes(boxes);
  7483. var left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);
  7484. var right = sortByWeight(filterByPosition(layoutBoxes, 'right'));
  7485. var top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);
  7486. var bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));
  7487. return {
  7488. leftAndTop: left.concat(top),
  7489. rightAndBottom: right.concat(bottom),
  7490. chartArea: filterByPosition(layoutBoxes, 'chartArea'),
  7491. vertical: left.concat(right),
  7492. horizontal: top.concat(bottom)
  7493. };
  7494. }
  7495. function getCombinedMax(maxPadding, chartArea, a, b) {
  7496. return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);
  7497. }
  7498. function updateDims(chartArea, params, layout) {
  7499. var box = layout.box;
  7500. var maxPadding = chartArea.maxPadding;
  7501. var newWidth, newHeight;
  7502. if (layout.size) {
  7503. // this layout was already counted for, lets first reduce old size
  7504. chartArea[layout.pos] -= layout.size;
  7505. }
  7506. layout.size = layout.horizontal ? box.height : box.width;
  7507. chartArea[layout.pos] += layout.size;
  7508. if (box.getPadding) {
  7509. var boxPadding = box.getPadding();
  7510. maxPadding.top = Math.max(maxPadding.top, boxPadding.top);
  7511. maxPadding.left = Math.max(maxPadding.left, boxPadding.left);
  7512. maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);
  7513. maxPadding.right = Math.max(maxPadding.right, boxPadding.right);
  7514. }
  7515. newWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right');
  7516. newHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom');
  7517. if (newWidth !== chartArea.w || newHeight !== chartArea.h) {
  7518. chartArea.w = newWidth;
  7519. chartArea.h = newHeight;
  7520. // return true if chart area changed in layout's direction
  7521. var sizes = layout.horizontal ? [newWidth, chartArea.w] : [newHeight, chartArea.h];
  7522. return sizes[0] !== sizes[1] && (!isNaN(sizes[0]) || !isNaN(sizes[1]));
  7523. }
  7524. }
  7525. function handleMaxPadding(chartArea) {
  7526. var maxPadding = chartArea.maxPadding;
  7527. function updatePos(pos) {
  7528. var change = Math.max(maxPadding[pos] - chartArea[pos], 0);
  7529. chartArea[pos] += change;
  7530. return change;
  7531. }
  7532. chartArea.y += updatePos('top');
  7533. chartArea.x += updatePos('left');
  7534. updatePos('right');
  7535. updatePos('bottom');
  7536. }
  7537. function getMargins(horizontal, chartArea) {
  7538. var maxPadding = chartArea.maxPadding;
  7539. function marginForPositions(positions) {
  7540. var margin = {left: 0, top: 0, right: 0, bottom: 0};
  7541. positions.forEach(function(pos) {
  7542. margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);
  7543. });
  7544. return margin;
  7545. }
  7546. return horizontal
  7547. ? marginForPositions(['left', 'right'])
  7548. : marginForPositions(['top', 'bottom']);
  7549. }
  7550. function fitBoxes(boxes, chartArea, params) {
  7551. var refitBoxes = [];
  7552. var i, ilen, layout, box, refit, changed;
  7553. for (i = 0, ilen = boxes.length; i < ilen; ++i) {
  7554. layout = boxes[i];
  7555. box = layout.box;
  7556. box.update(
  7557. layout.width || chartArea.w,
  7558. layout.height || chartArea.h,
  7559. getMargins(layout.horizontal, chartArea)
  7560. );
  7561. if (updateDims(chartArea, params, layout)) {
  7562. changed = true;
  7563. if (refitBoxes.length) {
  7564. // Dimensions changed and there were non full width boxes before this
  7565. // -> we have to refit those
  7566. refit = true;
  7567. }
  7568. }
  7569. if (!box.fullWidth) { // fullWidth boxes don't need to be re-fitted in any case
  7570. refitBoxes.push(layout);
  7571. }
  7572. }
  7573. return refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed;
  7574. }
  7575. function placeBoxes(boxes, chartArea, params) {
  7576. var userPadding = params.padding;
  7577. var x = chartArea.x;
  7578. var y = chartArea.y;
  7579. var i, ilen, layout, box;
  7580. for (i = 0, ilen = boxes.length; i < ilen; ++i) {
  7581. layout = boxes[i];
  7582. box = layout.box;
  7583. if (layout.horizontal) {
  7584. box.left = box.fullWidth ? userPadding.left : chartArea.left;
  7585. box.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w;
  7586. box.top = y;
  7587. box.bottom = y + box.height;
  7588. box.width = box.right - box.left;
  7589. y = box.bottom;
  7590. } else {
  7591. box.left = x;
  7592. box.right = x + box.width;
  7593. box.top = chartArea.top;
  7594. box.bottom = chartArea.top + chartArea.h;
  7595. box.height = box.bottom - box.top;
  7596. x = box.right;
  7597. }
  7598. }
  7599. chartArea.x = x;
  7600. chartArea.y = y;
  7601. }
  7602. core_defaults._set('global', {
  7603. layout: {
  7604. padding: {
  7605. top: 0,
  7606. right: 0,
  7607. bottom: 0,
  7608. left: 0
  7609. }
  7610. }
  7611. });
  7612. /**
  7613. * @interface ILayoutItem
  7614. * @prop {string} position - The position of the item in the chart layout. Possible values are
  7615. * 'left', 'top', 'right', 'bottom', and 'chartArea'
  7616. * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area
  7617. * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down
  7618. * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)
  7619. * @prop {function} update - Takes two parameters: width and height. Returns size of item
  7620. * @prop {function} getPadding - Returns an object with padding on the edges
  7621. * @prop {number} width - Width of item. Must be valid after update()
  7622. * @prop {number} height - Height of item. Must be valid after update()
  7623. * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update
  7624. * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update
  7625. * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update
  7626. * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update
  7627. */
  7628. // The layout service is very self explanatory. It's responsible for the layout within a chart.
  7629. // Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need
  7630. // It is this service's responsibility of carrying out that layout.
  7631. var core_layouts = {
  7632. defaults: {},
  7633. /**
  7634. * Register a box to a chart.
  7635. * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.
  7636. * @param {Chart} chart - the chart to use
  7637. * @param {ILayoutItem} item - the item to add to be layed out
  7638. */
  7639. addBox: function(chart, item) {
  7640. if (!chart.boxes) {
  7641. chart.boxes = [];
  7642. }
  7643. // initialize item with default values
  7644. item.fullWidth = item.fullWidth || false;
  7645. item.position = item.position || 'top';
  7646. item.weight = item.weight || 0;
  7647. item._layers = item._layers || function() {
  7648. return [{
  7649. z: 0,
  7650. draw: function() {
  7651. item.draw.apply(item, arguments);
  7652. }
  7653. }];
  7654. };
  7655. chart.boxes.push(item);
  7656. },
  7657. /**
  7658. * Remove a layoutItem from a chart
  7659. * @param {Chart} chart - the chart to remove the box from
  7660. * @param {ILayoutItem} layoutItem - the item to remove from the layout
  7661. */
  7662. removeBox: function(chart, layoutItem) {
  7663. var index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;
  7664. if (index !== -1) {
  7665. chart.boxes.splice(index, 1);
  7666. }
  7667. },
  7668. /**
  7669. * Sets (or updates) options on the given `item`.
  7670. * @param {Chart} chart - the chart in which the item lives (or will be added to)
  7671. * @param {ILayoutItem} item - the item to configure with the given options
  7672. * @param {object} options - the new item options.
  7673. */
  7674. configure: function(chart, item, options) {
  7675. var props = ['fullWidth', 'position', 'weight'];
  7676. var ilen = props.length;
  7677. var i = 0;
  7678. var prop;
  7679. for (; i < ilen; ++i) {
  7680. prop = props[i];
  7681. if (options.hasOwnProperty(prop)) {
  7682. item[prop] = options[prop];
  7683. }
  7684. }
  7685. },
  7686. /**
  7687. * Fits boxes of the given chart into the given size by having each box measure itself
  7688. * then running a fitting algorithm
  7689. * @param {Chart} chart - the chart
  7690. * @param {number} width - the width to fit into
  7691. * @param {number} height - the height to fit into
  7692. */
  7693. update: function(chart, width, height) {
  7694. if (!chart) {
  7695. return;
  7696. }
  7697. var layoutOptions = chart.options.layout || {};
  7698. var padding = helpers$1.options.toPadding(layoutOptions.padding);
  7699. var availableWidth = width - padding.width;
  7700. var availableHeight = height - padding.height;
  7701. var boxes = buildLayoutBoxes(chart.boxes);
  7702. var verticalBoxes = boxes.vertical;
  7703. var horizontalBoxes = boxes.horizontal;
  7704. // Essentially we now have any number of boxes on each of the 4 sides.
  7705. // Our canvas looks like the following.
  7706. // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and
  7707. // B1 is the bottom axis
  7708. // There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays
  7709. // These locations are single-box locations only, when trying to register a chartArea location that is already taken,
  7710. // an error will be thrown.
  7711. //
  7712. // |----------------------------------------------------|
  7713. // | T1 (Full Width) |
  7714. // |----------------------------------------------------|
  7715. // | | | T2 | |
  7716. // | |----|-------------------------------------|----|
  7717. // | | | C1 | | C2 | |
  7718. // | | |----| |----| |
  7719. // | | | | |
  7720. // | L1 | L2 | ChartArea (C0) | R1 |
  7721. // | | | | |
  7722. // | | |----| |----| |
  7723. // | | | C3 | | C4 | |
  7724. // | |----|-------------------------------------|----|
  7725. // | | | B1 | |
  7726. // |----------------------------------------------------|
  7727. // | B2 (Full Width) |
  7728. // |----------------------------------------------------|
  7729. //
  7730. var params = Object.freeze({
  7731. outerWidth: width,
  7732. outerHeight: height,
  7733. padding: padding,
  7734. availableWidth: availableWidth,
  7735. vBoxMaxWidth: availableWidth / 2 / verticalBoxes.length,
  7736. hBoxMaxHeight: availableHeight / 2
  7737. });
  7738. var chartArea = extend({
  7739. maxPadding: extend({}, padding),
  7740. w: availableWidth,
  7741. h: availableHeight,
  7742. x: padding.left,
  7743. y: padding.top
  7744. }, padding);
  7745. setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);
  7746. // First fit vertical boxes
  7747. fitBoxes(verticalBoxes, chartArea, params);
  7748. // Then fit horizontal boxes
  7749. if (fitBoxes(horizontalBoxes, chartArea, params)) {
  7750. // if the area changed, re-fit vertical boxes
  7751. fitBoxes(verticalBoxes, chartArea, params);
  7752. }
  7753. handleMaxPadding(chartArea);
  7754. // Finally place the boxes to correct coordinates
  7755. placeBoxes(boxes.leftAndTop, chartArea, params);
  7756. // Move to opposite side of chart
  7757. chartArea.x += chartArea.w;
  7758. chartArea.y += chartArea.h;
  7759. placeBoxes(boxes.rightAndBottom, chartArea, params);
  7760. chart.chartArea = {
  7761. left: chartArea.left,
  7762. top: chartArea.top,
  7763. right: chartArea.left + chartArea.w,
  7764. bottom: chartArea.top + chartArea.h
  7765. };
  7766. // Finally update boxes in chartArea (radial scale for example)
  7767. helpers$1.each(boxes.chartArea, function(layout) {
  7768. var box = layout.box;
  7769. extend(box, chart.chartArea);
  7770. box.update(chartArea.w, chartArea.h);
  7771. });
  7772. }
  7773. };
  7774. /**
  7775. * Platform fallback implementation (minimal).
  7776. * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939
  7777. */
  7778. var platform_basic = {
  7779. acquireContext: function(item) {
  7780. if (item && item.canvas) {
  7781. // Support for any object associated to a canvas (including a context2d)
  7782. item = item.canvas;
  7783. }
  7784. return item && item.getContext('2d') || null;
  7785. }
  7786. };
  7787. var platform_dom = "/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n";
  7788. var platform_dom$1 = /*#__PURE__*/Object.freeze({
  7789. __proto__: null,
  7790. 'default': platform_dom
  7791. });
  7792. var stylesheet = getCjsExportFromNamespace(platform_dom$1);
  7793. var EXPANDO_KEY = '$chartjs';
  7794. var CSS_PREFIX = 'chartjs-';
  7795. var CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';
  7796. var CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';
  7797. var CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';
  7798. var ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];
  7799. /**
  7800. * DOM event types -> Chart.js event types.
  7801. * Note: only events with different types are mapped.
  7802. * @see https://developer.mozilla.org/en-US/docs/Web/Events
  7803. */
  7804. var EVENT_TYPES = {
  7805. touchstart: 'mousedown',
  7806. touchmove: 'mousemove',
  7807. touchend: 'mouseup',
  7808. pointerenter: 'mouseenter',
  7809. pointerdown: 'mousedown',
  7810. pointermove: 'mousemove',
  7811. pointerup: 'mouseup',
  7812. pointerleave: 'mouseout',
  7813. pointerout: 'mouseout'
  7814. };
  7815. /**
  7816. * The "used" size is the final value of a dimension property after all calculations have
  7817. * been performed. This method uses the computed style of `element` but returns undefined
  7818. * if the computed style is not expressed in pixels. That can happen in some cases where
  7819. * `element` has a size relative to its parent and this last one is not yet displayed,
  7820. * for example because of `display: none` on a parent node.
  7821. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value
  7822. * @returns {number} Size in pixels or undefined if unknown.
  7823. */
  7824. function readUsedSize(element, property) {
  7825. var value = helpers$1.getStyle(element, property);
  7826. var matches = value && value.match(/^(\d+)(\.\d+)?px$/);
  7827. return matches ? Number(matches[1]) : undefined;
  7828. }
  7829. /**
  7830. * Initializes the canvas style and render size without modifying the canvas display size,
  7831. * since responsiveness is handled by the controller.resize() method. The config is used
  7832. * to determine the aspect ratio to apply in case no explicit height has been specified.
  7833. */
  7834. function initCanvas(canvas, config) {
  7835. var style = canvas.style;
  7836. // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it
  7837. // returns null or '' if no explicit value has been set to the canvas attribute.
  7838. var renderHeight = canvas.getAttribute('height');
  7839. var renderWidth = canvas.getAttribute('width');
  7840. // Chart.js modifies some canvas values that we want to restore on destroy
  7841. canvas[EXPANDO_KEY] = {
  7842. initial: {
  7843. height: renderHeight,
  7844. width: renderWidth,
  7845. style: {
  7846. display: style.display,
  7847. height: style.height,
  7848. width: style.width
  7849. }
  7850. }
  7851. };
  7852. // Force canvas to display as block to avoid extra space caused by inline
  7853. // elements, which would interfere with the responsive resize process.
  7854. // https://github.com/chartjs/Chart.js/issues/2538
  7855. style.display = style.display || 'block';
  7856. if (renderWidth === null || renderWidth === '') {
  7857. var displayWidth = readUsedSize(canvas, 'width');
  7858. if (displayWidth !== undefined) {
  7859. canvas.width = displayWidth;
  7860. }
  7861. }
  7862. if (renderHeight === null || renderHeight === '') {
  7863. if (canvas.style.height === '') {
  7864. // If no explicit render height and style height, let's apply the aspect ratio,
  7865. // which one can be specified by the user but also by charts as default option
  7866. // (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.
  7867. canvas.height = canvas.width / (config.options.aspectRatio || 2);
  7868. } else {
  7869. var displayHeight = readUsedSize(canvas, 'height');
  7870. if (displayWidth !== undefined) {
  7871. canvas.height = displayHeight;
  7872. }
  7873. }
  7874. }
  7875. return canvas;
  7876. }
  7877. /**
  7878. * Detects support for options object argument in addEventListener.
  7879. * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
  7880. * @private
  7881. */
  7882. var supportsEventListenerOptions = (function() {
  7883. var supports = false;
  7884. try {
  7885. var options = Object.defineProperty({}, 'passive', {
  7886. // eslint-disable-next-line getter-return
  7887. get: function() {
  7888. supports = true;
  7889. }
  7890. });
  7891. window.addEventListener('e', null, options);
  7892. } catch (e) {
  7893. // continue regardless of error
  7894. }
  7895. return supports;
  7896. }());
  7897. // Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.
  7898. // https://github.com/chartjs/Chart.js/issues/4287
  7899. var eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;
  7900. function addListener(node, type, listener) {
  7901. node.addEventListener(type, listener, eventListenerOptions);
  7902. }
  7903. function removeListener(node, type, listener) {
  7904. node.removeEventListener(type, listener, eventListenerOptions);
  7905. }
  7906. function createEvent(type, chart, x, y, nativeEvent) {
  7907. return {
  7908. type: type,
  7909. chart: chart,
  7910. native: nativeEvent || null,
  7911. x: x !== undefined ? x : null,
  7912. y: y !== undefined ? y : null,
  7913. };
  7914. }
  7915. function fromNativeEvent(event, chart) {
  7916. var type = EVENT_TYPES[event.type] || event.type;
  7917. var pos = helpers$1.getRelativePosition(event, chart);
  7918. return createEvent(type, chart, pos.x, pos.y, event);
  7919. }
  7920. function throttled(fn, thisArg) {
  7921. var ticking = false;
  7922. var args = [];
  7923. return function() {
  7924. args = Array.prototype.slice.call(arguments);
  7925. thisArg = thisArg || this;
  7926. if (!ticking) {
  7927. ticking = true;
  7928. helpers$1.requestAnimFrame.call(window, function() {
  7929. ticking = false;
  7930. fn.apply(thisArg, args);
  7931. });
  7932. }
  7933. };
  7934. }
  7935. function createDiv(cls) {
  7936. var el = document.createElement('div');
  7937. el.className = cls || '';
  7938. return el;
  7939. }
  7940. // Implementation based on https://github.com/marcj/css-element-queries
  7941. function createResizer(handler) {
  7942. var maxSize = 1000000;
  7943. // NOTE(SB) Don't use innerHTML because it could be considered unsafe.
  7944. // https://github.com/chartjs/Chart.js/issues/5902
  7945. var resizer = createDiv(CSS_SIZE_MONITOR);
  7946. var expand = createDiv(CSS_SIZE_MONITOR + '-expand');
  7947. var shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');
  7948. expand.appendChild(createDiv());
  7949. shrink.appendChild(createDiv());
  7950. resizer.appendChild(expand);
  7951. resizer.appendChild(shrink);
  7952. resizer._reset = function() {
  7953. expand.scrollLeft = maxSize;
  7954. expand.scrollTop = maxSize;
  7955. shrink.scrollLeft = maxSize;
  7956. shrink.scrollTop = maxSize;
  7957. };
  7958. var onScroll = function() {
  7959. resizer._reset();
  7960. handler();
  7961. };
  7962. addListener(expand, 'scroll', onScroll.bind(expand, 'expand'));
  7963. addListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));
  7964. return resizer;
  7965. }
  7966. // https://davidwalsh.name/detect-node-insertion
  7967. function watchForRender(node, handler) {
  7968. var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});
  7969. var proxy = expando.renderProxy = function(e) {
  7970. if (e.animationName === CSS_RENDER_ANIMATION) {
  7971. handler();
  7972. }
  7973. };
  7974. helpers$1.each(ANIMATION_START_EVENTS, function(type) {
  7975. addListener(node, type, proxy);
  7976. });
  7977. // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class
  7978. // is removed then added back immediately (same animation frame?). Accessing the
  7979. // `offsetParent` property will force a reflow and re-evaluate the CSS animation.
  7980. // https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics
  7981. // https://github.com/chartjs/Chart.js/issues/4737
  7982. expando.reflow = !!node.offsetParent;
  7983. node.classList.add(CSS_RENDER_MONITOR);
  7984. }
  7985. function unwatchForRender(node) {
  7986. var expando = node[EXPANDO_KEY] || {};
  7987. var proxy = expando.renderProxy;
  7988. if (proxy) {
  7989. helpers$1.each(ANIMATION_START_EVENTS, function(type) {
  7990. removeListener(node, type, proxy);
  7991. });
  7992. delete expando.renderProxy;
  7993. }
  7994. node.classList.remove(CSS_RENDER_MONITOR);
  7995. }
  7996. function addResizeListener(node, listener, chart) {
  7997. var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});
  7998. // Let's keep track of this added resizer and thus avoid DOM query when removing it.
  7999. var resizer = expando.resizer = createResizer(throttled(function() {
  8000. if (expando.resizer) {
  8001. var container = chart.options.maintainAspectRatio && node.parentNode;
  8002. var w = container ? container.clientWidth : 0;
  8003. listener(createEvent('resize', chart));
  8004. if (container && container.clientWidth < w && chart.canvas) {
  8005. // If the container size shrank during chart resize, let's assume
  8006. // scrollbar appeared. So we resize again with the scrollbar visible -
  8007. // effectively making chart smaller and the scrollbar hidden again.
  8008. // Because we are inside `throttled`, and currently `ticking`, scroll
  8009. // events are ignored during this whole 2 resize process.
  8010. // If we assumed wrong and something else happened, we are resizing
  8011. // twice in a frame (potential performance issue)
  8012. listener(createEvent('resize', chart));
  8013. }
  8014. }
  8015. }));
  8016. // The resizer needs to be attached to the node parent, so we first need to be
  8017. // sure that `node` is attached to the DOM before injecting the resizer element.
  8018. watchForRender(node, function() {
  8019. if (expando.resizer) {
  8020. var container = node.parentNode;
  8021. if (container && container !== resizer.parentNode) {
  8022. container.insertBefore(resizer, container.firstChild);
  8023. }
  8024. // The container size might have changed, let's reset the resizer state.
  8025. resizer._reset();
  8026. }
  8027. });
  8028. }
  8029. function removeResizeListener(node) {
  8030. var expando = node[EXPANDO_KEY] || {};
  8031. var resizer = expando.resizer;
  8032. delete expando.resizer;
  8033. unwatchForRender(node);
  8034. if (resizer && resizer.parentNode) {
  8035. resizer.parentNode.removeChild(resizer);
  8036. }
  8037. }
  8038. /**
  8039. * Injects CSS styles inline if the styles are not already present.
  8040. * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the <style>.
  8041. * @param {string} css - the CSS to be injected.
  8042. */
  8043. function injectCSS(rootNode, css) {
  8044. // https://stackoverflow.com/q/3922139
  8045. var expando = rootNode[EXPANDO_KEY] || (rootNode[EXPANDO_KEY] = {});
  8046. if (!expando.containsStyles) {
  8047. expando.containsStyles = true;
  8048. css = '/* Chart.js */\n' + css;
  8049. var style = document.createElement('style');
  8050. style.setAttribute('type', 'text/css');
  8051. style.appendChild(document.createTextNode(css));
  8052. rootNode.appendChild(style);
  8053. }
  8054. }
  8055. var platform_dom$2 = {
  8056. /**
  8057. * When `true`, prevents the automatic injection of the stylesheet required to
  8058. * correctly detect when the chart is added to the DOM and then resized. This
  8059. * switch has been added to allow external stylesheet (`dist/Chart(.min)?.js`)
  8060. * to be manually imported to make this library compatible with any CSP.
  8061. * See https://github.com/chartjs/Chart.js/issues/5208
  8062. */
  8063. disableCSSInjection: false,
  8064. /**
  8065. * This property holds whether this platform is enabled for the current environment.
  8066. * Currently used by platform.js to select the proper implementation.
  8067. * @private
  8068. */
  8069. _enabled: typeof window !== 'undefined' && typeof document !== 'undefined',
  8070. /**
  8071. * Initializes resources that depend on platform options.
  8072. * @param {HTMLCanvasElement} canvas - The Canvas element.
  8073. * @private
  8074. */
  8075. _ensureLoaded: function(canvas) {
  8076. if (!this.disableCSSInjection) {
  8077. // If the canvas is in a shadow DOM, then the styles must also be inserted
  8078. // into the same shadow DOM.
  8079. // https://github.com/chartjs/Chart.js/issues/5763
  8080. var root = canvas.getRootNode ? canvas.getRootNode() : document;
  8081. var targetNode = root.host ? root : document.head;
  8082. injectCSS(targetNode, stylesheet);
  8083. }
  8084. },
  8085. acquireContext: function(item, config) {
  8086. if (typeof item === 'string') {
  8087. item = document.getElementById(item);
  8088. } else if (item.length) {
  8089. // Support for array based queries (such as jQuery)
  8090. item = item[0];
  8091. }
  8092. if (item && item.canvas) {
  8093. // Support for any object associated to a canvas (including a context2d)
  8094. item = item.canvas;
  8095. }
  8096. // To prevent canvas fingerprinting, some add-ons undefine the getContext
  8097. // method, for example: https://github.com/kkapsner/CanvasBlocker
  8098. // https://github.com/chartjs/Chart.js/issues/2807
  8099. var context = item && item.getContext && item.getContext('2d');
  8100. // `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is
  8101. // inside an iframe or when running in a protected environment. We could guess the
  8102. // types from their toString() value but let's keep things flexible and assume it's
  8103. // a sufficient condition if the item has a context2D which has item as `canvas`.
  8104. // https://github.com/chartjs/Chart.js/issues/3887
  8105. // https://github.com/chartjs/Chart.js/issues/4102
  8106. // https://github.com/chartjs/Chart.js/issues/4152
  8107. if (context && context.canvas === item) {
  8108. // Load platform resources on first chart creation, to make it possible to
  8109. // import the library before setting platform options.
  8110. this._ensureLoaded(item);
  8111. initCanvas(item, config);
  8112. return context;
  8113. }
  8114. return null;
  8115. },
  8116. releaseContext: function(context) {
  8117. var canvas = context.canvas;
  8118. if (!canvas[EXPANDO_KEY]) {
  8119. return;
  8120. }
  8121. var initial = canvas[EXPANDO_KEY].initial;
  8122. ['height', 'width'].forEach(function(prop) {
  8123. var value = initial[prop];
  8124. if (helpers$1.isNullOrUndef(value)) {
  8125. canvas.removeAttribute(prop);
  8126. } else {
  8127. canvas.setAttribute(prop, value);
  8128. }
  8129. });
  8130. helpers$1.each(initial.style || {}, function(value, key) {
  8131. canvas.style[key] = value;
  8132. });
  8133. // The canvas render size might have been changed (and thus the state stack discarded),
  8134. // we can't use save() and restore() to restore the initial state. So make sure that at
  8135. // least the canvas context is reset to the default state by setting the canvas width.
  8136. // https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html
  8137. // eslint-disable-next-line no-self-assign
  8138. canvas.width = canvas.width;
  8139. delete canvas[EXPANDO_KEY];
  8140. },
  8141. addEventListener: function(chart, type, listener) {
  8142. var canvas = chart.canvas;
  8143. if (type === 'resize') {
  8144. // Note: the resize event is not supported on all browsers.
  8145. addResizeListener(canvas, listener, chart);
  8146. return;
  8147. }
  8148. var expando = listener[EXPANDO_KEY] || (listener[EXPANDO_KEY] = {});
  8149. var proxies = expando.proxies || (expando.proxies = {});
  8150. var proxy = proxies[chart.id + '_' + type] = function(event) {
  8151. listener(fromNativeEvent(event, chart));
  8152. };
  8153. addListener(canvas, type, proxy);
  8154. },
  8155. removeEventListener: function(chart, type, listener) {
  8156. var canvas = chart.canvas;
  8157. if (type === 'resize') {
  8158. // Note: the resize event is not supported on all browsers.
  8159. removeResizeListener(canvas);
  8160. return;
  8161. }
  8162. var expando = listener[EXPANDO_KEY] || {};
  8163. var proxies = expando.proxies || {};
  8164. var proxy = proxies[chart.id + '_' + type];
  8165. if (!proxy) {
  8166. return;
  8167. }
  8168. removeListener(canvas, type, proxy);
  8169. }
  8170. };
  8171. // DEPRECATIONS
  8172. /**
  8173. * Provided for backward compatibility, use EventTarget.addEventListener instead.
  8174. * EventTarget.addEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+
  8175. * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
  8176. * @function Chart.helpers.addEvent
  8177. * @deprecated since version 2.7.0
  8178. * @todo remove at version 3
  8179. * @private
  8180. */
  8181. helpers$1.addEvent = addListener;
  8182. /**
  8183. * Provided for backward compatibility, use EventTarget.removeEventListener instead.
  8184. * EventTarget.removeEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+
  8185. * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener
  8186. * @function Chart.helpers.removeEvent
  8187. * @deprecated since version 2.7.0
  8188. * @todo remove at version 3
  8189. * @private
  8190. */
  8191. helpers$1.removeEvent = removeListener;
  8192. // @TODO Make possible to select another platform at build time.
  8193. var implementation = platform_dom$2._enabled ? platform_dom$2 : platform_basic;
  8194. /**
  8195. * @namespace Chart.platform
  8196. * @see https://chartjs.gitbooks.io/proposals/content/Platform.html
  8197. * @since 2.4.0
  8198. */
  8199. var platform = helpers$1.extend({
  8200. /**
  8201. * @since 2.7.0
  8202. */
  8203. initialize: function() {},
  8204. /**
  8205. * Called at chart construction time, returns a context2d instance implementing
  8206. * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.
  8207. * @param {*} item - The native item from which to acquire context (platform specific)
  8208. * @param {object} options - The chart options
  8209. * @returns {CanvasRenderingContext2D} context2d instance
  8210. */
  8211. acquireContext: function() {},
  8212. /**
  8213. * Called at chart destruction time, releases any resources associated to the context
  8214. * previously returned by the acquireContext() method.
  8215. * @param {CanvasRenderingContext2D} context - The context2d instance
  8216. * @returns {boolean} true if the method succeeded, else false
  8217. */
  8218. releaseContext: function() {},
  8219. /**
  8220. * Registers the specified listener on the given chart.
  8221. * @param {Chart} chart - Chart from which to listen for event
  8222. * @param {string} type - The ({@link IEvent}) type to listen for
  8223. * @param {function} listener - Receives a notification (an object that implements
  8224. * the {@link IEvent} interface) when an event of the specified type occurs.
  8225. */
  8226. addEventListener: function() {},
  8227. /**
  8228. * Removes the specified listener previously registered with addEventListener.
  8229. * @param {Chart} chart - Chart from which to remove the listener
  8230. * @param {string} type - The ({@link IEvent}) type to remove
  8231. * @param {function} listener - The listener function to remove from the event target.
  8232. */
  8233. removeEventListener: function() {}
  8234. }, implementation);
  8235. core_defaults._set('global', {
  8236. plugins: {}
  8237. });
  8238. /**
  8239. * The plugin service singleton
  8240. * @namespace Chart.plugins
  8241. * @since 2.1.0
  8242. */
  8243. var core_plugins = {
  8244. /**
  8245. * Globally registered plugins.
  8246. * @private
  8247. */
  8248. _plugins: [],
  8249. /**
  8250. * This identifier is used to invalidate the descriptors cache attached to each chart
  8251. * when a global plugin is registered or unregistered. In this case, the cache ID is
  8252. * incremented and descriptors are regenerated during following API calls.
  8253. * @private
  8254. */
  8255. _cacheId: 0,
  8256. /**
  8257. * Registers the given plugin(s) if not already registered.
  8258. * @param {IPlugin[]|IPlugin} plugins plugin instance(s).
  8259. */
  8260. register: function(plugins) {
  8261. var p = this._plugins;
  8262. ([]).concat(plugins).forEach(function(plugin) {
  8263. if (p.indexOf(plugin) === -1) {
  8264. p.push(plugin);
  8265. }
  8266. });
  8267. this._cacheId++;
  8268. },
  8269. /**
  8270. * Unregisters the given plugin(s) only if registered.
  8271. * @param {IPlugin[]|IPlugin} plugins plugin instance(s).
  8272. */
  8273. unregister: function(plugins) {
  8274. var p = this._plugins;
  8275. ([]).concat(plugins).forEach(function(plugin) {
  8276. var idx = p.indexOf(plugin);
  8277. if (idx !== -1) {
  8278. p.splice(idx, 1);
  8279. }
  8280. });
  8281. this._cacheId++;
  8282. },
  8283. /**
  8284. * Remove all registered plugins.
  8285. * @since 2.1.5
  8286. */
  8287. clear: function() {
  8288. this._plugins = [];
  8289. this._cacheId++;
  8290. },
  8291. /**
  8292. * Returns the number of registered plugins?
  8293. * @returns {number}
  8294. * @since 2.1.5
  8295. */
  8296. count: function() {
  8297. return this._plugins.length;
  8298. },
  8299. /**
  8300. * Returns all registered plugin instances.
  8301. * @returns {IPlugin[]} array of plugin objects.
  8302. * @since 2.1.5
  8303. */
  8304. getAll: function() {
  8305. return this._plugins;
  8306. },
  8307. /**
  8308. * Calls enabled plugins for `chart` on the specified hook and with the given args.
  8309. * This method immediately returns as soon as a plugin explicitly returns false. The
  8310. * returned value can be used, for instance, to interrupt the current action.
  8311. * @param {Chart} chart - The chart instance for which plugins should be called.
  8312. * @param {string} hook - The name of the plugin method to call (e.g. 'beforeUpdate').
  8313. * @param {Array} [args] - Extra arguments to apply to the hook call.
  8314. * @returns {boolean} false if any of the plugins return false, else returns true.
  8315. */
  8316. notify: function(chart, hook, args) {
  8317. var descriptors = this.descriptors(chart);
  8318. var ilen = descriptors.length;
  8319. var i, descriptor, plugin, params, method;
  8320. for (i = 0; i < ilen; ++i) {
  8321. descriptor = descriptors[i];
  8322. plugin = descriptor.plugin;
  8323. method = plugin[hook];
  8324. if (typeof method === 'function') {
  8325. params = [chart].concat(args || []);
  8326. params.push(descriptor.options);
  8327. if (method.apply(plugin, params) === false) {
  8328. return false;
  8329. }
  8330. }
  8331. }
  8332. return true;
  8333. },
  8334. /**
  8335. * Returns descriptors of enabled plugins for the given chart.
  8336. * @returns {object[]} [{ plugin, options }]
  8337. * @private
  8338. */
  8339. descriptors: function(chart) {
  8340. var cache = chart.$plugins || (chart.$plugins = {});
  8341. if (cache.id === this._cacheId) {
  8342. return cache.descriptors;
  8343. }
  8344. var plugins = [];
  8345. var descriptors = [];
  8346. var config = (chart && chart.config) || {};
  8347. var options = (config.options && config.options.plugins) || {};
  8348. this._plugins.concat(config.plugins || []).forEach(function(plugin) {
  8349. var idx = plugins.indexOf(plugin);
  8350. if (idx !== -1) {
  8351. return;
  8352. }
  8353. var id = plugin.id;
  8354. var opts = options[id];
  8355. if (opts === false) {
  8356. return;
  8357. }
  8358. if (opts === true) {
  8359. opts = helpers$1.clone(core_defaults.global.plugins[id]);
  8360. }
  8361. plugins.push(plugin);
  8362. descriptors.push({
  8363. plugin: plugin,
  8364. options: opts || {}
  8365. });
  8366. });
  8367. cache.descriptors = descriptors;
  8368. cache.id = this._cacheId;
  8369. return descriptors;
  8370. },
  8371. /**
  8372. * Invalidates cache for the given chart: descriptors hold a reference on plugin option,
  8373. * but in some cases, this reference can be changed by the user when updating options.
  8374. * https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167
  8375. * @private
  8376. */
  8377. _invalidate: function(chart) {
  8378. delete chart.$plugins;
  8379. }
  8380. };
  8381. var core_scaleService = {
  8382. // Scale registration object. Extensions can register new scale types (such as log or DB scales) and then
  8383. // use the new chart options to grab the correct scale
  8384. constructors: {},
  8385. // Use a registration function so that we can move to an ES6 map when we no longer need to support
  8386. // old browsers
  8387. // Scale config defaults
  8388. defaults: {},
  8389. registerScaleType: function(type, scaleConstructor, scaleDefaults) {
  8390. this.constructors[type] = scaleConstructor;
  8391. this.defaults[type] = helpers$1.clone(scaleDefaults);
  8392. },
  8393. getScaleConstructor: function(type) {
  8394. return this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;
  8395. },
  8396. getScaleDefaults: function(type) {
  8397. // Return the scale defaults merged with the global settings so that we always use the latest ones
  8398. return this.defaults.hasOwnProperty(type) ? helpers$1.merge(Object.create(null), [core_defaults.scale, this.defaults[type]]) : {};
  8399. },
  8400. updateScaleDefaults: function(type, additions) {
  8401. var me = this;
  8402. if (me.defaults.hasOwnProperty(type)) {
  8403. me.defaults[type] = helpers$1.extend(me.defaults[type], additions);
  8404. }
  8405. },
  8406. addScalesToLayout: function(chart) {
  8407. // Adds each scale to the chart.boxes array to be sized accordingly
  8408. helpers$1.each(chart.scales, function(scale) {
  8409. // Set ILayoutItem parameters for backwards compatibility
  8410. scale.fullWidth = scale.options.fullWidth;
  8411. scale.position = scale.options.position;
  8412. scale.weight = scale.options.weight;
  8413. core_layouts.addBox(chart, scale);
  8414. });
  8415. }
  8416. };
  8417. var valueOrDefault$8 = helpers$1.valueOrDefault;
  8418. var getRtlHelper = helpers$1.rtl.getRtlAdapter;
  8419. core_defaults._set('global', {
  8420. tooltips: {
  8421. enabled: true,
  8422. custom: null,
  8423. mode: 'nearest',
  8424. position: 'average',
  8425. intersect: true,
  8426. backgroundColor: 'rgba(0,0,0,0.8)',
  8427. titleFontStyle: 'bold',
  8428. titleSpacing: 2,
  8429. titleMarginBottom: 6,
  8430. titleFontColor: '#fff',
  8431. titleAlign: 'left',
  8432. bodySpacing: 2,
  8433. bodyFontColor: '#fff',
  8434. bodyAlign: 'left',
  8435. footerFontStyle: 'bold',
  8436. footerSpacing: 2,
  8437. footerMarginTop: 6,
  8438. footerFontColor: '#fff',
  8439. footerAlign: 'left',
  8440. yPadding: 6,
  8441. xPadding: 6,
  8442. caretPadding: 2,
  8443. caretSize: 5,
  8444. cornerRadius: 6,
  8445. multiKeyBackground: '#fff',
  8446. displayColors: true,
  8447. borderColor: 'rgba(0,0,0,0)',
  8448. borderWidth: 0,
  8449. callbacks: {
  8450. // Args are: (tooltipItems, data)
  8451. beforeTitle: helpers$1.noop,
  8452. title: function(tooltipItems, data) {
  8453. var title = '';
  8454. var labels = data.labels;
  8455. var labelCount = labels ? labels.length : 0;
  8456. if (tooltipItems.length > 0) {
  8457. var item = tooltipItems[0];
  8458. if (item.label) {
  8459. title = item.label;
  8460. } else if (item.xLabel) {
  8461. title = item.xLabel;
  8462. } else if (labelCount > 0 && item.index < labelCount) {
  8463. title = labels[item.index];
  8464. }
  8465. }
  8466. return title;
  8467. },
  8468. afterTitle: helpers$1.noop,
  8469. // Args are: (tooltipItems, data)
  8470. beforeBody: helpers$1.noop,
  8471. // Args are: (tooltipItem, data)
  8472. beforeLabel: helpers$1.noop,
  8473. label: function(tooltipItem, data) {
  8474. var label = data.datasets[tooltipItem.datasetIndex].label || '';
  8475. if (label) {
  8476. label += ': ';
  8477. }
  8478. if (!helpers$1.isNullOrUndef(tooltipItem.value)) {
  8479. label += tooltipItem.value;
  8480. } else {
  8481. label += tooltipItem.yLabel;
  8482. }
  8483. return label;
  8484. },
  8485. labelColor: function(tooltipItem, chart) {
  8486. var meta = chart.getDatasetMeta(tooltipItem.datasetIndex);
  8487. var activeElement = meta.data[tooltipItem.index];
  8488. var view = activeElement._view;
  8489. return {
  8490. borderColor: view.borderColor,
  8491. backgroundColor: view.backgroundColor
  8492. };
  8493. },
  8494. labelTextColor: function() {
  8495. return this._options.bodyFontColor;
  8496. },
  8497. afterLabel: helpers$1.noop,
  8498. // Args are: (tooltipItems, data)
  8499. afterBody: helpers$1.noop,
  8500. // Args are: (tooltipItems, data)
  8501. beforeFooter: helpers$1.noop,
  8502. footer: helpers$1.noop,
  8503. afterFooter: helpers$1.noop
  8504. }
  8505. }
  8506. });
  8507. var positioners = {
  8508. /**
  8509. * Average mode places the tooltip at the average position of the elements shown
  8510. * @function Chart.Tooltip.positioners.average
  8511. * @param elements {ChartElement[]} the elements being displayed in the tooltip
  8512. * @returns {object} tooltip position
  8513. */
  8514. average: function(elements) {
  8515. if (!elements.length) {
  8516. return false;
  8517. }
  8518. var i, len;
  8519. var x = 0;
  8520. var y = 0;
  8521. var count = 0;
  8522. for (i = 0, len = elements.length; i < len; ++i) {
  8523. var el = elements[i];
  8524. if (el && el.hasValue()) {
  8525. var pos = el.tooltipPosition();
  8526. x += pos.x;
  8527. y += pos.y;
  8528. ++count;
  8529. }
  8530. }
  8531. return {
  8532. x: x / count,
  8533. y: y / count
  8534. };
  8535. },
  8536. /**
  8537. * Gets the tooltip position nearest of the item nearest to the event position
  8538. * @function Chart.Tooltip.positioners.nearest
  8539. * @param elements {Chart.Element[]} the tooltip elements
  8540. * @param eventPosition {object} the position of the event in canvas coordinates
  8541. * @returns {object} the tooltip position
  8542. */
  8543. nearest: function(elements, eventPosition) {
  8544. var x = eventPosition.x;
  8545. var y = eventPosition.y;
  8546. var minDistance = Number.POSITIVE_INFINITY;
  8547. var i, len, nearestElement;
  8548. for (i = 0, len = elements.length; i < len; ++i) {
  8549. var el = elements[i];
  8550. if (el && el.hasValue()) {
  8551. var center = el.getCenterPoint();
  8552. var d = helpers$1.distanceBetweenPoints(eventPosition, center);
  8553. if (d < minDistance) {
  8554. minDistance = d;
  8555. nearestElement = el;
  8556. }
  8557. }
  8558. }
  8559. if (nearestElement) {
  8560. var tp = nearestElement.tooltipPosition();
  8561. x = tp.x;
  8562. y = tp.y;
  8563. }
  8564. return {
  8565. x: x,
  8566. y: y
  8567. };
  8568. }
  8569. };
  8570. // Helper to push or concat based on if the 2nd parameter is an array or not
  8571. function pushOrConcat(base, toPush) {
  8572. if (toPush) {
  8573. if (helpers$1.isArray(toPush)) {
  8574. // base = base.concat(toPush);
  8575. Array.prototype.push.apply(base, toPush);
  8576. } else {
  8577. base.push(toPush);
  8578. }
  8579. }
  8580. return base;
  8581. }
  8582. /**
  8583. * Returns array of strings split by newline
  8584. * @param {string} value - The value to split by newline.
  8585. * @returns {string[]} value if newline present - Returned from String split() method
  8586. * @function
  8587. */
  8588. function splitNewlines(str) {
  8589. if ((typeof str === 'string' || str instanceof String) && str.indexOf('\n') > -1) {
  8590. return str.split('\n');
  8591. }
  8592. return str;
  8593. }
  8594. /**
  8595. * Private helper to create a tooltip item model
  8596. * @param element - the chart element (point, arc, bar) to create the tooltip item for
  8597. * @return new tooltip item
  8598. */
  8599. function createTooltipItem(element) {
  8600. var xScale = element._xScale;
  8601. var yScale = element._yScale || element._scale; // handle radar || polarArea charts
  8602. var index = element._index;
  8603. var datasetIndex = element._datasetIndex;
  8604. var controller = element._chart.getDatasetMeta(datasetIndex).controller;
  8605. var indexScale = controller._getIndexScale();
  8606. var valueScale = controller._getValueScale();
  8607. return {
  8608. xLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',
  8609. yLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',
  8610. label: indexScale ? '' + indexScale.getLabelForIndex(index, datasetIndex) : '',
  8611. value: valueScale ? '' + valueScale.getLabelForIndex(index, datasetIndex) : '',
  8612. index: index,
  8613. datasetIndex: datasetIndex,
  8614. x: element._model.x,
  8615. y: element._model.y
  8616. };
  8617. }
  8618. /**
  8619. * Helper to get the reset model for the tooltip
  8620. * @param tooltipOpts {object} the tooltip options
  8621. */
  8622. function getBaseModel(tooltipOpts) {
  8623. var globalDefaults = core_defaults.global;
  8624. return {
  8625. // Positioning
  8626. xPadding: tooltipOpts.xPadding,
  8627. yPadding: tooltipOpts.yPadding,
  8628. xAlign: tooltipOpts.xAlign,
  8629. yAlign: tooltipOpts.yAlign,
  8630. // Drawing direction and text direction
  8631. rtl: tooltipOpts.rtl,
  8632. textDirection: tooltipOpts.textDirection,
  8633. // Body
  8634. bodyFontColor: tooltipOpts.bodyFontColor,
  8635. _bodyFontFamily: valueOrDefault$8(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),
  8636. _bodyFontStyle: valueOrDefault$8(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),
  8637. _bodyAlign: tooltipOpts.bodyAlign,
  8638. bodyFontSize: valueOrDefault$8(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),
  8639. bodySpacing: tooltipOpts.bodySpacing,
  8640. // Title
  8641. titleFontColor: tooltipOpts.titleFontColor,
  8642. _titleFontFamily: valueOrDefault$8(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),
  8643. _titleFontStyle: valueOrDefault$8(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),
  8644. titleFontSize: valueOrDefault$8(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),
  8645. _titleAlign: tooltipOpts.titleAlign,
  8646. titleSpacing: tooltipOpts.titleSpacing,
  8647. titleMarginBottom: tooltipOpts.titleMarginBottom,
  8648. // Footer
  8649. footerFontColor: tooltipOpts.footerFontColor,
  8650. _footerFontFamily: valueOrDefault$8(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),
  8651. _footerFontStyle: valueOrDefault$8(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),
  8652. footerFontSize: valueOrDefault$8(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),
  8653. _footerAlign: tooltipOpts.footerAlign,
  8654. footerSpacing: tooltipOpts.footerSpacing,
  8655. footerMarginTop: tooltipOpts.footerMarginTop,
  8656. // Appearance
  8657. caretSize: tooltipOpts.caretSize,
  8658. cornerRadius: tooltipOpts.cornerRadius,
  8659. backgroundColor: tooltipOpts.backgroundColor,
  8660. opacity: 0,
  8661. legendColorBackground: tooltipOpts.multiKeyBackground,
  8662. displayColors: tooltipOpts.displayColors,
  8663. borderColor: tooltipOpts.borderColor,
  8664. borderWidth: tooltipOpts.borderWidth
  8665. };
  8666. }
  8667. /**
  8668. * Get the size of the tooltip
  8669. */
  8670. function getTooltipSize(tooltip, model) {
  8671. var ctx = tooltip._chart.ctx;
  8672. var height = model.yPadding * 2; // Tooltip Padding
  8673. var width = 0;
  8674. // Count of all lines in the body
  8675. var body = model.body;
  8676. var combinedBodyLength = body.reduce(function(count, bodyItem) {
  8677. return count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;
  8678. }, 0);
  8679. combinedBodyLength += model.beforeBody.length + model.afterBody.length;
  8680. var titleLineCount = model.title.length;
  8681. var footerLineCount = model.footer.length;
  8682. var titleFontSize = model.titleFontSize;
  8683. var bodyFontSize = model.bodyFontSize;
  8684. var footerFontSize = model.footerFontSize;
  8685. height += titleLineCount * titleFontSize; // Title Lines
  8686. height += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing
  8687. height += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin
  8688. height += combinedBodyLength * bodyFontSize; // Body Lines
  8689. height += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing
  8690. height += footerLineCount ? model.footerMarginTop : 0; // Footer Margin
  8691. height += footerLineCount * (footerFontSize); // Footer Lines
  8692. height += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing
  8693. // Title width
  8694. var widthPadding = 0;
  8695. var maxLineWidth = function(line) {
  8696. width = Math.max(width, ctx.measureText(line).width + widthPadding);
  8697. };
  8698. ctx.font = helpers$1.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily);
  8699. helpers$1.each(model.title, maxLineWidth);
  8700. // Body width
  8701. ctx.font = helpers$1.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily);
  8702. helpers$1.each(model.beforeBody.concat(model.afterBody), maxLineWidth);
  8703. // Body lines may include some extra width due to the color box
  8704. widthPadding = model.displayColors ? (bodyFontSize + 2) : 0;
  8705. helpers$1.each(body, function(bodyItem) {
  8706. helpers$1.each(bodyItem.before, maxLineWidth);
  8707. helpers$1.each(bodyItem.lines, maxLineWidth);
  8708. helpers$1.each(bodyItem.after, maxLineWidth);
  8709. });
  8710. // Reset back to 0
  8711. widthPadding = 0;
  8712. // Footer width
  8713. ctx.font = helpers$1.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily);
  8714. helpers$1.each(model.footer, maxLineWidth);
  8715. // Add padding
  8716. width += 2 * model.xPadding;
  8717. return {
  8718. width: width,
  8719. height: height
  8720. };
  8721. }
  8722. /**
  8723. * Helper to get the alignment of a tooltip given the size
  8724. */
  8725. function determineAlignment(tooltip, size) {
  8726. var model = tooltip._model;
  8727. var chart = tooltip._chart;
  8728. var chartArea = tooltip._chart.chartArea;
  8729. var xAlign = 'center';
  8730. var yAlign = 'center';
  8731. if (model.y < size.height) {
  8732. yAlign = 'top';
  8733. } else if (model.y > (chart.height - size.height)) {
  8734. yAlign = 'bottom';
  8735. }
  8736. var lf, rf; // functions to determine left, right alignment
  8737. var olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart
  8738. var yf; // function to get the y alignment if the tooltip goes outside of the left or right edges
  8739. var midX = (chartArea.left + chartArea.right) / 2;
  8740. var midY = (chartArea.top + chartArea.bottom) / 2;
  8741. if (yAlign === 'center') {
  8742. lf = function(x) {
  8743. return x <= midX;
  8744. };
  8745. rf = function(x) {
  8746. return x > midX;
  8747. };
  8748. } else {
  8749. lf = function(x) {
  8750. return x <= (size.width / 2);
  8751. };
  8752. rf = function(x) {
  8753. return x >= (chart.width - (size.width / 2));
  8754. };
  8755. }
  8756. olf = function(x) {
  8757. return x + size.width + model.caretSize + model.caretPadding > chart.width;
  8758. };
  8759. orf = function(x) {
  8760. return x - size.width - model.caretSize - model.caretPadding < 0;
  8761. };
  8762. yf = function(y) {
  8763. return y <= midY ? 'top' : 'bottom';
  8764. };
  8765. if (lf(model.x)) {
  8766. xAlign = 'left';
  8767. // Is tooltip too wide and goes over the right side of the chart.?
  8768. if (olf(model.x)) {
  8769. xAlign = 'center';
  8770. yAlign = yf(model.y);
  8771. }
  8772. } else if (rf(model.x)) {
  8773. xAlign = 'right';
  8774. // Is tooltip too wide and goes outside left edge of canvas?
  8775. if (orf(model.x)) {
  8776. xAlign = 'center';
  8777. yAlign = yf(model.y);
  8778. }
  8779. }
  8780. var opts = tooltip._options;
  8781. return {
  8782. xAlign: opts.xAlign ? opts.xAlign : xAlign,
  8783. yAlign: opts.yAlign ? opts.yAlign : yAlign
  8784. };
  8785. }
  8786. /**
  8787. * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment
  8788. */
  8789. function getBackgroundPoint(vm, size, alignment, chart) {
  8790. // Background Position
  8791. var x = vm.x;
  8792. var y = vm.y;
  8793. var caretSize = vm.caretSize;
  8794. var caretPadding = vm.caretPadding;
  8795. var cornerRadius = vm.cornerRadius;
  8796. var xAlign = alignment.xAlign;
  8797. var yAlign = alignment.yAlign;
  8798. var paddingAndSize = caretSize + caretPadding;
  8799. var radiusAndPadding = cornerRadius + caretPadding;
  8800. if (xAlign === 'right') {
  8801. x -= size.width;
  8802. } else if (xAlign === 'center') {
  8803. x -= (size.width / 2);
  8804. if (x + size.width > chart.width) {
  8805. x = chart.width - size.width;
  8806. }
  8807. if (x < 0) {
  8808. x = 0;
  8809. }
  8810. }
  8811. if (yAlign === 'top') {
  8812. y += paddingAndSize;
  8813. } else if (yAlign === 'bottom') {
  8814. y -= size.height + paddingAndSize;
  8815. } else {
  8816. y -= (size.height / 2);
  8817. }
  8818. if (yAlign === 'center') {
  8819. if (xAlign === 'left') {
  8820. x += paddingAndSize;
  8821. } else if (xAlign === 'right') {
  8822. x -= paddingAndSize;
  8823. }
  8824. } else if (xAlign === 'left') {
  8825. x -= radiusAndPadding;
  8826. } else if (xAlign === 'right') {
  8827. x += radiusAndPadding;
  8828. }
  8829. return {
  8830. x: x,
  8831. y: y
  8832. };
  8833. }
  8834. function getAlignedX(vm, align) {
  8835. return align === 'center'
  8836. ? vm.x + vm.width / 2
  8837. : align === 'right'
  8838. ? vm.x + vm.width - vm.xPadding
  8839. : vm.x + vm.xPadding;
  8840. }
  8841. /**
  8842. * Helper to build before and after body lines
  8843. */
  8844. function getBeforeAfterBodyLines(callback) {
  8845. return pushOrConcat([], splitNewlines(callback));
  8846. }
  8847. var exports$4 = core_element.extend({
  8848. initialize: function() {
  8849. this._model = getBaseModel(this._options);
  8850. this._lastActive = [];
  8851. },
  8852. // Get the title
  8853. // Args are: (tooltipItem, data)
  8854. getTitle: function() {
  8855. var me = this;
  8856. var opts = me._options;
  8857. var callbacks = opts.callbacks;
  8858. var beforeTitle = callbacks.beforeTitle.apply(me, arguments);
  8859. var title = callbacks.title.apply(me, arguments);
  8860. var afterTitle = callbacks.afterTitle.apply(me, arguments);
  8861. var lines = [];
  8862. lines = pushOrConcat(lines, splitNewlines(beforeTitle));
  8863. lines = pushOrConcat(lines, splitNewlines(title));
  8864. lines = pushOrConcat(lines, splitNewlines(afterTitle));
  8865. return lines;
  8866. },
  8867. // Args are: (tooltipItem, data)
  8868. getBeforeBody: function() {
  8869. return getBeforeAfterBodyLines(this._options.callbacks.beforeBody.apply(this, arguments));
  8870. },
  8871. // Args are: (tooltipItem, data)
  8872. getBody: function(tooltipItems, data) {
  8873. var me = this;
  8874. var callbacks = me._options.callbacks;
  8875. var bodyItems = [];
  8876. helpers$1.each(tooltipItems, function(tooltipItem) {
  8877. var bodyItem = {
  8878. before: [],
  8879. lines: [],
  8880. after: []
  8881. };
  8882. pushOrConcat(bodyItem.before, splitNewlines(callbacks.beforeLabel.call(me, tooltipItem, data)));
  8883. pushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));
  8884. pushOrConcat(bodyItem.after, splitNewlines(callbacks.afterLabel.call(me, tooltipItem, data)));
  8885. bodyItems.push(bodyItem);
  8886. });
  8887. return bodyItems;
  8888. },
  8889. // Args are: (tooltipItem, data)
  8890. getAfterBody: function() {
  8891. return getBeforeAfterBodyLines(this._options.callbacks.afterBody.apply(this, arguments));
  8892. },
  8893. // Get the footer and beforeFooter and afterFooter lines
  8894. // Args are: (tooltipItem, data)
  8895. getFooter: function() {
  8896. var me = this;
  8897. var callbacks = me._options.callbacks;
  8898. var beforeFooter = callbacks.beforeFooter.apply(me, arguments);
  8899. var footer = callbacks.footer.apply(me, arguments);
  8900. var afterFooter = callbacks.afterFooter.apply(me, arguments);
  8901. var lines = [];
  8902. lines = pushOrConcat(lines, splitNewlines(beforeFooter));
  8903. lines = pushOrConcat(lines, splitNewlines(footer));
  8904. lines = pushOrConcat(lines, splitNewlines(afterFooter));
  8905. return lines;
  8906. },
  8907. update: function(changed) {
  8908. var me = this;
  8909. var opts = me._options;
  8910. // Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition
  8911. // that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time
  8912. // which breaks any animations.
  8913. var existingModel = me._model;
  8914. var model = me._model = getBaseModel(opts);
  8915. var active = me._active;
  8916. var data = me._data;
  8917. // In the case where active.length === 0 we need to keep these at existing values for good animations
  8918. var alignment = {
  8919. xAlign: existingModel.xAlign,
  8920. yAlign: existingModel.yAlign
  8921. };
  8922. var backgroundPoint = {
  8923. x: existingModel.x,
  8924. y: existingModel.y
  8925. };
  8926. var tooltipSize = {
  8927. width: existingModel.width,
  8928. height: existingModel.height
  8929. };
  8930. var tooltipPosition = {
  8931. x: existingModel.caretX,
  8932. y: existingModel.caretY
  8933. };
  8934. var i, len;
  8935. if (active.length) {
  8936. model.opacity = 1;
  8937. var labelColors = [];
  8938. var labelTextColors = [];
  8939. tooltipPosition = positioners[opts.position].call(me, active, me._eventPosition);
  8940. var tooltipItems = [];
  8941. for (i = 0, len = active.length; i < len; ++i) {
  8942. tooltipItems.push(createTooltipItem(active[i]));
  8943. }
  8944. // If the user provided a filter function, use it to modify the tooltip items
  8945. if (opts.filter) {
  8946. tooltipItems = tooltipItems.filter(function(a) {
  8947. return opts.filter(a, data);
  8948. });
  8949. }
  8950. // If the user provided a sorting function, use it to modify the tooltip items
  8951. if (opts.itemSort) {
  8952. tooltipItems = tooltipItems.sort(function(a, b) {
  8953. return opts.itemSort(a, b, data);
  8954. });
  8955. }
  8956. // Determine colors for boxes
  8957. helpers$1.each(tooltipItems, function(tooltipItem) {
  8958. labelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, me._chart));
  8959. labelTextColors.push(opts.callbacks.labelTextColor.call(me, tooltipItem, me._chart));
  8960. });
  8961. // Build the Text Lines
  8962. model.title = me.getTitle(tooltipItems, data);
  8963. model.beforeBody = me.getBeforeBody(tooltipItems, data);
  8964. model.body = me.getBody(tooltipItems, data);
  8965. model.afterBody = me.getAfterBody(tooltipItems, data);
  8966. model.footer = me.getFooter(tooltipItems, data);
  8967. // Initial positioning and colors
  8968. model.x = tooltipPosition.x;
  8969. model.y = tooltipPosition.y;
  8970. model.caretPadding = opts.caretPadding;
  8971. model.labelColors = labelColors;
  8972. model.labelTextColors = labelTextColors;
  8973. // data points
  8974. model.dataPoints = tooltipItems;
  8975. // We need to determine alignment of the tooltip
  8976. tooltipSize = getTooltipSize(this, model);
  8977. alignment = determineAlignment(this, tooltipSize);
  8978. // Final Size and Position
  8979. backgroundPoint = getBackgroundPoint(model, tooltipSize, alignment, me._chart);
  8980. } else {
  8981. model.opacity = 0;
  8982. }
  8983. model.xAlign = alignment.xAlign;
  8984. model.yAlign = alignment.yAlign;
  8985. model.x = backgroundPoint.x;
  8986. model.y = backgroundPoint.y;
  8987. model.width = tooltipSize.width;
  8988. model.height = tooltipSize.height;
  8989. // Point where the caret on the tooltip points to
  8990. model.caretX = tooltipPosition.x;
  8991. model.caretY = tooltipPosition.y;
  8992. me._model = model;
  8993. if (changed && opts.custom) {
  8994. opts.custom.call(me, model);
  8995. }
  8996. return me;
  8997. },
  8998. drawCaret: function(tooltipPoint, size) {
  8999. var ctx = this._chart.ctx;
  9000. var vm = this._view;
  9001. var caretPosition = this.getCaretPosition(tooltipPoint, size, vm);
  9002. ctx.lineTo(caretPosition.x1, caretPosition.y1);
  9003. ctx.lineTo(caretPosition.x2, caretPosition.y2);
  9004. ctx.lineTo(caretPosition.x3, caretPosition.y3);
  9005. },
  9006. getCaretPosition: function(tooltipPoint, size, vm) {
  9007. var x1, x2, x3, y1, y2, y3;
  9008. var caretSize = vm.caretSize;
  9009. var cornerRadius = vm.cornerRadius;
  9010. var xAlign = vm.xAlign;
  9011. var yAlign = vm.yAlign;
  9012. var ptX = tooltipPoint.x;
  9013. var ptY = tooltipPoint.y;
  9014. var width = size.width;
  9015. var height = size.height;
  9016. if (yAlign === 'center') {
  9017. y2 = ptY + (height / 2);
  9018. if (xAlign === 'left') {
  9019. x1 = ptX;
  9020. x2 = x1 - caretSize;
  9021. x3 = x1;
  9022. y1 = y2 + caretSize;
  9023. y3 = y2 - caretSize;
  9024. } else {
  9025. x1 = ptX + width;
  9026. x2 = x1 + caretSize;
  9027. x3 = x1;
  9028. y1 = y2 - caretSize;
  9029. y3 = y2 + caretSize;
  9030. }
  9031. } else {
  9032. if (xAlign === 'left') {
  9033. x2 = ptX + cornerRadius + (caretSize);
  9034. x1 = x2 - caretSize;
  9035. x3 = x2 + caretSize;
  9036. } else if (xAlign === 'right') {
  9037. x2 = ptX + width - cornerRadius - caretSize;
  9038. x1 = x2 - caretSize;
  9039. x3 = x2 + caretSize;
  9040. } else {
  9041. x2 = vm.caretX;
  9042. x1 = x2 - caretSize;
  9043. x3 = x2 + caretSize;
  9044. }
  9045. if (yAlign === 'top') {
  9046. y1 = ptY;
  9047. y2 = y1 - caretSize;
  9048. y3 = y1;
  9049. } else {
  9050. y1 = ptY + height;
  9051. y2 = y1 + caretSize;
  9052. y3 = y1;
  9053. // invert drawing order
  9054. var tmp = x3;
  9055. x3 = x1;
  9056. x1 = tmp;
  9057. }
  9058. }
  9059. return {x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3};
  9060. },
  9061. drawTitle: function(pt, vm, ctx) {
  9062. var title = vm.title;
  9063. var length = title.length;
  9064. var titleFontSize, titleSpacing, i;
  9065. if (length) {
  9066. var rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);
  9067. pt.x = getAlignedX(vm, vm._titleAlign);
  9068. ctx.textAlign = rtlHelper.textAlign(vm._titleAlign);
  9069. ctx.textBaseline = 'middle';
  9070. titleFontSize = vm.titleFontSize;
  9071. titleSpacing = vm.titleSpacing;
  9072. ctx.fillStyle = vm.titleFontColor;
  9073. ctx.font = helpers$1.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);
  9074. for (i = 0; i < length; ++i) {
  9075. ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFontSize / 2);
  9076. pt.y += titleFontSize + titleSpacing; // Line Height and spacing
  9077. if (i + 1 === length) {
  9078. pt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing
  9079. }
  9080. }
  9081. }
  9082. },
  9083. drawBody: function(pt, vm, ctx) {
  9084. var bodyFontSize = vm.bodyFontSize;
  9085. var bodySpacing = vm.bodySpacing;
  9086. var bodyAlign = vm._bodyAlign;
  9087. var body = vm.body;
  9088. var drawColorBoxes = vm.displayColors;
  9089. var xLinePadding = 0;
  9090. var colorX = drawColorBoxes ? getAlignedX(vm, 'left') : 0;
  9091. var rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);
  9092. var fillLineOfText = function(line) {
  9093. ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyFontSize / 2);
  9094. pt.y += bodyFontSize + bodySpacing;
  9095. };
  9096. var bodyItem, textColor, labelColors, lines, i, j, ilen, jlen;
  9097. var bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);
  9098. ctx.textAlign = bodyAlign;
  9099. ctx.textBaseline = 'middle';
  9100. ctx.font = helpers$1.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);
  9101. pt.x = getAlignedX(vm, bodyAlignForCalculation);
  9102. // Before body lines
  9103. ctx.fillStyle = vm.bodyFontColor;
  9104. helpers$1.each(vm.beforeBody, fillLineOfText);
  9105. xLinePadding = drawColorBoxes && bodyAlignForCalculation !== 'right'
  9106. ? bodyAlign === 'center' ? (bodyFontSize / 2 + 1) : (bodyFontSize + 2)
  9107. : 0;
  9108. // Draw body lines now
  9109. for (i = 0, ilen = body.length; i < ilen; ++i) {
  9110. bodyItem = body[i];
  9111. textColor = vm.labelTextColors[i];
  9112. labelColors = vm.labelColors[i];
  9113. ctx.fillStyle = textColor;
  9114. helpers$1.each(bodyItem.before, fillLineOfText);
  9115. lines = bodyItem.lines;
  9116. for (j = 0, jlen = lines.length; j < jlen; ++j) {
  9117. // Draw Legend-like boxes if needed
  9118. if (drawColorBoxes) {
  9119. var rtlColorX = rtlHelper.x(colorX);
  9120. // Fill a white rect so that colours merge nicely if the opacity is < 1
  9121. ctx.fillStyle = vm.legendColorBackground;
  9122. ctx.fillRect(rtlHelper.leftForLtr(rtlColorX, bodyFontSize), pt.y, bodyFontSize, bodyFontSize);
  9123. // Border
  9124. ctx.lineWidth = 1;
  9125. ctx.strokeStyle = labelColors.borderColor;
  9126. ctx.strokeRect(rtlHelper.leftForLtr(rtlColorX, bodyFontSize), pt.y, bodyFontSize, bodyFontSize);
  9127. // Inner square
  9128. ctx.fillStyle = labelColors.backgroundColor;
  9129. ctx.fillRect(rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), bodyFontSize - 2), pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);
  9130. ctx.fillStyle = textColor;
  9131. }
  9132. fillLineOfText(lines[j]);
  9133. }
  9134. helpers$1.each(bodyItem.after, fillLineOfText);
  9135. }
  9136. // Reset back to 0 for after body
  9137. xLinePadding = 0;
  9138. // After body lines
  9139. helpers$1.each(vm.afterBody, fillLineOfText);
  9140. pt.y -= bodySpacing; // Remove last body spacing
  9141. },
  9142. drawFooter: function(pt, vm, ctx) {
  9143. var footer = vm.footer;
  9144. var length = footer.length;
  9145. var footerFontSize, i;
  9146. if (length) {
  9147. var rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);
  9148. pt.x = getAlignedX(vm, vm._footerAlign);
  9149. pt.y += vm.footerMarginTop;
  9150. ctx.textAlign = rtlHelper.textAlign(vm._footerAlign);
  9151. ctx.textBaseline = 'middle';
  9152. footerFontSize = vm.footerFontSize;
  9153. ctx.fillStyle = vm.footerFontColor;
  9154. ctx.font = helpers$1.fontString(footerFontSize, vm._footerFontStyle, vm._footerFontFamily);
  9155. for (i = 0; i < length; ++i) {
  9156. ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFontSize / 2);
  9157. pt.y += footerFontSize + vm.footerSpacing;
  9158. }
  9159. }
  9160. },
  9161. drawBackground: function(pt, vm, ctx, tooltipSize) {
  9162. ctx.fillStyle = vm.backgroundColor;
  9163. ctx.strokeStyle = vm.borderColor;
  9164. ctx.lineWidth = vm.borderWidth;
  9165. var xAlign = vm.xAlign;
  9166. var yAlign = vm.yAlign;
  9167. var x = pt.x;
  9168. var y = pt.y;
  9169. var width = tooltipSize.width;
  9170. var height = tooltipSize.height;
  9171. var radius = vm.cornerRadius;
  9172. ctx.beginPath();
  9173. ctx.moveTo(x + radius, y);
  9174. if (yAlign === 'top') {
  9175. this.drawCaret(pt, tooltipSize);
  9176. }
  9177. ctx.lineTo(x + width - radius, y);
  9178. ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
  9179. if (yAlign === 'center' && xAlign === 'right') {
  9180. this.drawCaret(pt, tooltipSize);
  9181. }
  9182. ctx.lineTo(x + width, y + height - radius);
  9183. ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
  9184. if (yAlign === 'bottom') {
  9185. this.drawCaret(pt, tooltipSize);
  9186. }
  9187. ctx.lineTo(x + radius, y + height);
  9188. ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
  9189. if (yAlign === 'center' && xAlign === 'left') {
  9190. this.drawCaret(pt, tooltipSize);
  9191. }
  9192. ctx.lineTo(x, y + radius);
  9193. ctx.quadraticCurveTo(x, y, x + radius, y);
  9194. ctx.closePath();
  9195. ctx.fill();
  9196. if (vm.borderWidth > 0) {
  9197. ctx.stroke();
  9198. }
  9199. },
  9200. draw: function() {
  9201. var ctx = this._chart.ctx;
  9202. var vm = this._view;
  9203. if (vm.opacity === 0) {
  9204. return;
  9205. }
  9206. var tooltipSize = {
  9207. width: vm.width,
  9208. height: vm.height
  9209. };
  9210. var pt = {
  9211. x: vm.x,
  9212. y: vm.y
  9213. };
  9214. // IE11/Edge does not like very small opacities, so snap to 0
  9215. var opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;
  9216. // Truthy/falsey value for empty tooltip
  9217. var hasTooltipContent = vm.title.length || vm.beforeBody.length || vm.body.length || vm.afterBody.length || vm.footer.length;
  9218. if (this._options.enabled && hasTooltipContent) {
  9219. ctx.save();
  9220. ctx.globalAlpha = opacity;
  9221. // Draw Background
  9222. this.drawBackground(pt, vm, ctx, tooltipSize);
  9223. // Draw Title, Body, and Footer
  9224. pt.y += vm.yPadding;
  9225. helpers$1.rtl.overrideTextDirection(ctx, vm.textDirection);
  9226. // Titles
  9227. this.drawTitle(pt, vm, ctx);
  9228. // Body
  9229. this.drawBody(pt, vm, ctx);
  9230. // Footer
  9231. this.drawFooter(pt, vm, ctx);
  9232. helpers$1.rtl.restoreTextDirection(ctx, vm.textDirection);
  9233. ctx.restore();
  9234. }
  9235. },
  9236. /**
  9237. * Handle an event
  9238. * @private
  9239. * @param {IEvent} event - The event to handle
  9240. * @returns {boolean} true if the tooltip changed
  9241. */
  9242. handleEvent: function(e) {
  9243. var me = this;
  9244. var options = me._options;
  9245. var changed = false;
  9246. me._lastActive = me._lastActive || [];
  9247. // Find Active Elements for tooltips
  9248. if (e.type === 'mouseout') {
  9249. me._active = [];
  9250. } else {
  9251. me._active = me._chart.getElementsAtEventForMode(e, options.mode, options);
  9252. if (options.reverse) {
  9253. me._active.reverse();
  9254. }
  9255. }
  9256. // Remember Last Actives
  9257. changed = !helpers$1.arrayEquals(me._active, me._lastActive);
  9258. // Only handle target event on tooltip change
  9259. if (changed) {
  9260. me._lastActive = me._active;
  9261. if (options.enabled || options.custom) {
  9262. me._eventPosition = {
  9263. x: e.x,
  9264. y: e.y
  9265. };
  9266. me.update(true);
  9267. me.pivot();
  9268. }
  9269. }
  9270. return changed;
  9271. }
  9272. });
  9273. /**
  9274. * @namespace Chart.Tooltip.positioners
  9275. */
  9276. var positioners_1 = positioners;
  9277. var core_tooltip = exports$4;
  9278. core_tooltip.positioners = positioners_1;
  9279. var valueOrDefault$9 = helpers$1.valueOrDefault;
  9280. core_defaults._set('global', {
  9281. elements: {},
  9282. events: [
  9283. 'mousemove',
  9284. 'mouseout',
  9285. 'click',
  9286. 'touchstart',
  9287. 'touchmove'
  9288. ],
  9289. hover: {
  9290. onHover: null,
  9291. mode: 'nearest',
  9292. intersect: true,
  9293. animationDuration: 400
  9294. },
  9295. onClick: null,
  9296. maintainAspectRatio: true,
  9297. responsive: true,
  9298. responsiveAnimationDuration: 0
  9299. });
  9300. /**
  9301. * Recursively merge the given config objects representing the `scales` option
  9302. * by incorporating scale defaults in `xAxes` and `yAxes` array items, then
  9303. * returns a deep copy of the result, thus doesn't alter inputs.
  9304. */
  9305. function mergeScaleConfig(/* config objects ... */) {
  9306. return helpers$1.merge(Object.create(null), [].slice.call(arguments), {
  9307. merger: function(key, target, source, options) {
  9308. if (key === 'xAxes' || key === 'yAxes') {
  9309. var slen = source[key].length;
  9310. var i, type, scale;
  9311. if (!target[key]) {
  9312. target[key] = [];
  9313. }
  9314. for (i = 0; i < slen; ++i) {
  9315. scale = source[key][i];
  9316. type = valueOrDefault$9(scale.type, key === 'xAxes' ? 'category' : 'linear');
  9317. if (i >= target[key].length) {
  9318. target[key].push({});
  9319. }
  9320. if (!target[key][i].type || (scale.type && scale.type !== target[key][i].type)) {
  9321. // new/untyped scale or type changed: let's apply the new defaults
  9322. // then merge source scale to correctly overwrite the defaults.
  9323. helpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);
  9324. } else {
  9325. // scales type are the same
  9326. helpers$1.merge(target[key][i], scale);
  9327. }
  9328. }
  9329. } else {
  9330. helpers$1._merger(key, target, source, options);
  9331. }
  9332. }
  9333. });
  9334. }
  9335. /**
  9336. * Recursively merge the given config objects as the root options by handling
  9337. * default scale options for the `scales` and `scale` properties, then returns
  9338. * a deep copy of the result, thus doesn't alter inputs.
  9339. */
  9340. function mergeConfig(/* config objects ... */) {
  9341. return helpers$1.merge(Object.create(null), [].slice.call(arguments), {
  9342. merger: function(key, target, source, options) {
  9343. var tval = target[key] || Object.create(null);
  9344. var sval = source[key];
  9345. if (key === 'scales') {
  9346. // scale config merging is complex. Add our own function here for that
  9347. target[key] = mergeScaleConfig(tval, sval);
  9348. } else if (key === 'scale') {
  9349. // used in polar area & radar charts since there is only one scale
  9350. target[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);
  9351. } else {
  9352. helpers$1._merger(key, target, source, options);
  9353. }
  9354. }
  9355. });
  9356. }
  9357. function initConfig(config) {
  9358. config = config || Object.create(null);
  9359. // Do NOT use mergeConfig for the data object because this method merges arrays
  9360. // and so would change references to labels and datasets, preventing data updates.
  9361. var data = config.data = config.data || {};
  9362. data.datasets = data.datasets || [];
  9363. data.labels = data.labels || [];
  9364. config.options = mergeConfig(
  9365. core_defaults.global,
  9366. core_defaults[config.type],
  9367. config.options || {});
  9368. return config;
  9369. }
  9370. function updateConfig(chart) {
  9371. var newOptions = chart.options;
  9372. helpers$1.each(chart.scales, function(scale) {
  9373. core_layouts.removeBox(chart, scale);
  9374. });
  9375. newOptions = mergeConfig(
  9376. core_defaults.global,
  9377. core_defaults[chart.config.type],
  9378. newOptions);
  9379. chart.options = chart.config.options = newOptions;
  9380. chart.ensureScalesHaveIDs();
  9381. chart.buildOrUpdateScales();
  9382. // Tooltip
  9383. chart.tooltip._options = newOptions.tooltips;
  9384. chart.tooltip.initialize();
  9385. }
  9386. function nextAvailableScaleId(axesOpts, prefix, index) {
  9387. var id;
  9388. var hasId = function(obj) {
  9389. return obj.id === id;
  9390. };
  9391. do {
  9392. id = prefix + index++;
  9393. } while (helpers$1.findIndex(axesOpts, hasId) >= 0);
  9394. return id;
  9395. }
  9396. function positionIsHorizontal(position) {
  9397. return position === 'top' || position === 'bottom';
  9398. }
  9399. function compare2Level(l1, l2) {
  9400. return function(a, b) {
  9401. return a[l1] === b[l1]
  9402. ? a[l2] - b[l2]
  9403. : a[l1] - b[l1];
  9404. };
  9405. }
  9406. var Chart = function(item, config) {
  9407. this.construct(item, config);
  9408. return this;
  9409. };
  9410. helpers$1.extend(Chart.prototype, /** @lends Chart */ {
  9411. /**
  9412. * @private
  9413. */
  9414. construct: function(item, config) {
  9415. var me = this;
  9416. config = initConfig(config);
  9417. var context = platform.acquireContext(item, config);
  9418. var canvas = context && context.canvas;
  9419. var height = canvas && canvas.height;
  9420. var width = canvas && canvas.width;
  9421. me.id = helpers$1.uid();
  9422. me.ctx = context;
  9423. me.canvas = canvas;
  9424. me.config = config;
  9425. me.width = width;
  9426. me.height = height;
  9427. me.aspectRatio = height ? width / height : null;
  9428. me.options = config.options;
  9429. me._bufferedRender = false;
  9430. me._layers = [];
  9431. /**
  9432. * Provided for backward compatibility, Chart and Chart.Controller have been merged,
  9433. * the "instance" still need to be defined since it might be called from plugins.
  9434. * @prop Chart#chart
  9435. * @deprecated since version 2.6.0
  9436. * @todo remove at version 3
  9437. * @private
  9438. */
  9439. me.chart = me;
  9440. me.controller = me; // chart.chart.controller #inception
  9441. // Add the chart instance to the global namespace
  9442. Chart.instances[me.id] = me;
  9443. // Define alias to the config data: `chart.data === chart.config.data`
  9444. Object.defineProperty(me, 'data', {
  9445. get: function() {
  9446. return me.config.data;
  9447. },
  9448. set: function(value) {
  9449. me.config.data = value;
  9450. }
  9451. });
  9452. if (!context || !canvas) {
  9453. // The given item is not a compatible context2d element, let's return before finalizing
  9454. // the chart initialization but after setting basic chart / controller properties that
  9455. // can help to figure out that the chart is not valid (e.g chart.canvas !== null);
  9456. // https://github.com/chartjs/Chart.js/issues/2807
  9457. console.error("Failed to create chart: can't acquire context from the given item");
  9458. return;
  9459. }
  9460. me.initialize();
  9461. me.update();
  9462. },
  9463. /**
  9464. * @private
  9465. */
  9466. initialize: function() {
  9467. var me = this;
  9468. // Before init plugin notification
  9469. core_plugins.notify(me, 'beforeInit');
  9470. helpers$1.retinaScale(me, me.options.devicePixelRatio);
  9471. me.bindEvents();
  9472. if (me.options.responsive) {
  9473. // Initial resize before chart draws (must be silent to preserve initial animations).
  9474. me.resize(true);
  9475. }
  9476. me.initToolTip();
  9477. // After init plugin notification
  9478. core_plugins.notify(me, 'afterInit');
  9479. return me;
  9480. },
  9481. clear: function() {
  9482. helpers$1.canvas.clear(this);
  9483. return this;
  9484. },
  9485. stop: function() {
  9486. // Stops any current animation loop occurring
  9487. core_animations.cancelAnimation(this);
  9488. return this;
  9489. },
  9490. resize: function(silent) {
  9491. var me = this;
  9492. var options = me.options;
  9493. var canvas = me.canvas;
  9494. var aspectRatio = (options.maintainAspectRatio && me.aspectRatio) || null;
  9495. // the canvas render width and height will be casted to integers so make sure that
  9496. // the canvas display style uses the same integer values to avoid blurring effect.
  9497. // Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collapsed
  9498. var newWidth = Math.max(0, Math.floor(helpers$1.getMaximumWidth(canvas)));
  9499. var newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : helpers$1.getMaximumHeight(canvas)));
  9500. if (me.width === newWidth && me.height === newHeight) {
  9501. return;
  9502. }
  9503. canvas.width = me.width = newWidth;
  9504. canvas.height = me.height = newHeight;
  9505. canvas.style.width = newWidth + 'px';
  9506. canvas.style.height = newHeight + 'px';
  9507. helpers$1.retinaScale(me, options.devicePixelRatio);
  9508. if (!silent) {
  9509. // Notify any plugins about the resize
  9510. var newSize = {width: newWidth, height: newHeight};
  9511. core_plugins.notify(me, 'resize', [newSize]);
  9512. // Notify of resize
  9513. if (options.onResize) {
  9514. options.onResize(me, newSize);
  9515. }
  9516. me.stop();
  9517. me.update({
  9518. duration: options.responsiveAnimationDuration
  9519. });
  9520. }
  9521. },
  9522. ensureScalesHaveIDs: function() {
  9523. var options = this.options;
  9524. var scalesOptions = options.scales || {};
  9525. var scaleOptions = options.scale;
  9526. helpers$1.each(scalesOptions.xAxes, function(xAxisOptions, index) {
  9527. if (!xAxisOptions.id) {
  9528. xAxisOptions.id = nextAvailableScaleId(scalesOptions.xAxes, 'x-axis-', index);
  9529. }
  9530. });
  9531. helpers$1.each(scalesOptions.yAxes, function(yAxisOptions, index) {
  9532. if (!yAxisOptions.id) {
  9533. yAxisOptions.id = nextAvailableScaleId(scalesOptions.yAxes, 'y-axis-', index);
  9534. }
  9535. });
  9536. if (scaleOptions) {
  9537. scaleOptions.id = scaleOptions.id || 'scale';
  9538. }
  9539. },
  9540. /**
  9541. * Builds a map of scale ID to scale object for future lookup.
  9542. */
  9543. buildOrUpdateScales: function() {
  9544. var me = this;
  9545. var options = me.options;
  9546. var scales = me.scales || {};
  9547. var items = [];
  9548. var updated = Object.keys(scales).reduce(function(obj, id) {
  9549. obj[id] = false;
  9550. return obj;
  9551. }, {});
  9552. if (options.scales) {
  9553. items = items.concat(
  9554. (options.scales.xAxes || []).map(function(xAxisOptions) {
  9555. return {options: xAxisOptions, dtype: 'category', dposition: 'bottom'};
  9556. }),
  9557. (options.scales.yAxes || []).map(function(yAxisOptions) {
  9558. return {options: yAxisOptions, dtype: 'linear', dposition: 'left'};
  9559. })
  9560. );
  9561. }
  9562. if (options.scale) {
  9563. items.push({
  9564. options: options.scale,
  9565. dtype: 'radialLinear',
  9566. isDefault: true,
  9567. dposition: 'chartArea'
  9568. });
  9569. }
  9570. helpers$1.each(items, function(item) {
  9571. var scaleOptions = item.options;
  9572. var id = scaleOptions.id;
  9573. var scaleType = valueOrDefault$9(scaleOptions.type, item.dtype);
  9574. if (positionIsHorizontal(scaleOptions.position) !== positionIsHorizontal(item.dposition)) {
  9575. scaleOptions.position = item.dposition;
  9576. }
  9577. updated[id] = true;
  9578. var scale = null;
  9579. if (id in scales && scales[id].type === scaleType) {
  9580. scale = scales[id];
  9581. scale.options = scaleOptions;
  9582. scale.ctx = me.ctx;
  9583. scale.chart = me;
  9584. } else {
  9585. var scaleClass = core_scaleService.getScaleConstructor(scaleType);
  9586. if (!scaleClass) {
  9587. return;
  9588. }
  9589. scale = new scaleClass({
  9590. id: id,
  9591. type: scaleType,
  9592. options: scaleOptions,
  9593. ctx: me.ctx,
  9594. chart: me
  9595. });
  9596. scales[scale.id] = scale;
  9597. }
  9598. scale.mergeTicksOptions();
  9599. // TODO(SB): I think we should be able to remove this custom case (options.scale)
  9600. // and consider it as a regular scale part of the "scales"" map only! This would
  9601. // make the logic easier and remove some useless? custom code.
  9602. if (item.isDefault) {
  9603. me.scale = scale;
  9604. }
  9605. });
  9606. // clear up discarded scales
  9607. helpers$1.each(updated, function(hasUpdated, id) {
  9608. if (!hasUpdated) {
  9609. delete scales[id];
  9610. }
  9611. });
  9612. me.scales = scales;
  9613. core_scaleService.addScalesToLayout(this);
  9614. },
  9615. buildOrUpdateControllers: function() {
  9616. var me = this;
  9617. var newControllers = [];
  9618. var datasets = me.data.datasets;
  9619. var i, ilen;
  9620. for (i = 0, ilen = datasets.length; i < ilen; i++) {
  9621. var dataset = datasets[i];
  9622. var meta = me.getDatasetMeta(i);
  9623. var type = dataset.type || me.config.type;
  9624. if (meta.type && meta.type !== type) {
  9625. me.destroyDatasetMeta(i);
  9626. meta = me.getDatasetMeta(i);
  9627. }
  9628. meta.type = type;
  9629. meta.order = dataset.order || 0;
  9630. meta.index = i;
  9631. if (meta.controller) {
  9632. meta.controller.updateIndex(i);
  9633. meta.controller.linkScales();
  9634. } else {
  9635. var ControllerClass = controllers[meta.type];
  9636. if (ControllerClass === undefined) {
  9637. throw new Error('"' + meta.type + '" is not a chart type.');
  9638. }
  9639. meta.controller = new ControllerClass(me, i);
  9640. newControllers.push(meta.controller);
  9641. }
  9642. }
  9643. return newControllers;
  9644. },
  9645. /**
  9646. * Reset the elements of all datasets
  9647. * @private
  9648. */
  9649. resetElements: function() {
  9650. var me = this;
  9651. helpers$1.each(me.data.datasets, function(dataset, datasetIndex) {
  9652. me.getDatasetMeta(datasetIndex).controller.reset();
  9653. }, me);
  9654. },
  9655. /**
  9656. * Resets the chart back to it's state before the initial animation
  9657. */
  9658. reset: function() {
  9659. this.resetElements();
  9660. this.tooltip.initialize();
  9661. },
  9662. update: function(config) {
  9663. var me = this;
  9664. var i, ilen;
  9665. if (!config || typeof config !== 'object') {
  9666. // backwards compatibility
  9667. config = {
  9668. duration: config,
  9669. lazy: arguments[1]
  9670. };
  9671. }
  9672. updateConfig(me);
  9673. // plugins options references might have change, let's invalidate the cache
  9674. // https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167
  9675. core_plugins._invalidate(me);
  9676. if (core_plugins.notify(me, 'beforeUpdate') === false) {
  9677. return;
  9678. }
  9679. // In case the entire data object changed
  9680. me.tooltip._data = me.data;
  9681. // Make sure dataset controllers are updated and new controllers are reset
  9682. var newControllers = me.buildOrUpdateControllers();
  9683. // Make sure all dataset controllers have correct meta data counts
  9684. for (i = 0, ilen = me.data.datasets.length; i < ilen; i++) {
  9685. me.getDatasetMeta(i).controller.buildOrUpdateElements();
  9686. }
  9687. me.updateLayout();
  9688. // Can only reset the new controllers after the scales have been updated
  9689. if (me.options.animation && me.options.animation.duration) {
  9690. helpers$1.each(newControllers, function(controller) {
  9691. controller.reset();
  9692. });
  9693. }
  9694. me.updateDatasets();
  9695. // Need to reset tooltip in case it is displayed with elements that are removed
  9696. // after update.
  9697. me.tooltip.initialize();
  9698. // Last active contains items that were previously in the tooltip.
  9699. // When we reset the tooltip, we need to clear it
  9700. me.lastActive = [];
  9701. // Do this before render so that any plugins that need final scale updates can use it
  9702. core_plugins.notify(me, 'afterUpdate');
  9703. me._layers.sort(compare2Level('z', '_idx'));
  9704. if (me._bufferedRender) {
  9705. me._bufferedRequest = {
  9706. duration: config.duration,
  9707. easing: config.easing,
  9708. lazy: config.lazy
  9709. };
  9710. } else {
  9711. me.render(config);
  9712. }
  9713. },
  9714. /**
  9715. * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`
  9716. * hook, in which case, plugins will not be called on `afterLayout`.
  9717. * @private
  9718. */
  9719. updateLayout: function() {
  9720. var me = this;
  9721. if (core_plugins.notify(me, 'beforeLayout') === false) {
  9722. return;
  9723. }
  9724. core_layouts.update(this, this.width, this.height);
  9725. me._layers = [];
  9726. helpers$1.each(me.boxes, function(box) {
  9727. // _configure is called twice, once in core.scale.update and once here.
  9728. // Here the boxes are fully updated and at their final positions.
  9729. if (box._configure) {
  9730. box._configure();
  9731. }
  9732. me._layers.push.apply(me._layers, box._layers());
  9733. }, me);
  9734. me._layers.forEach(function(item, index) {
  9735. item._idx = index;
  9736. });
  9737. /**
  9738. * Provided for backward compatibility, use `afterLayout` instead.
  9739. * @method IPlugin#afterScaleUpdate
  9740. * @deprecated since version 2.5.0
  9741. * @todo remove at version 3
  9742. * @private
  9743. */
  9744. core_plugins.notify(me, 'afterScaleUpdate');
  9745. core_plugins.notify(me, 'afterLayout');
  9746. },
  9747. /**
  9748. * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`
  9749. * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.
  9750. * @private
  9751. */
  9752. updateDatasets: function() {
  9753. var me = this;
  9754. if (core_plugins.notify(me, 'beforeDatasetsUpdate') === false) {
  9755. return;
  9756. }
  9757. for (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {
  9758. me.updateDataset(i);
  9759. }
  9760. core_plugins.notify(me, 'afterDatasetsUpdate');
  9761. },
  9762. /**
  9763. * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate`
  9764. * hook, in which case, plugins will not be called on `afterDatasetUpdate`.
  9765. * @private
  9766. */
  9767. updateDataset: function(index) {
  9768. var me = this;
  9769. var meta = me.getDatasetMeta(index);
  9770. var args = {
  9771. meta: meta,
  9772. index: index
  9773. };
  9774. if (core_plugins.notify(me, 'beforeDatasetUpdate', [args]) === false) {
  9775. return;
  9776. }
  9777. meta.controller._update();
  9778. core_plugins.notify(me, 'afterDatasetUpdate', [args]);
  9779. },
  9780. render: function(config) {
  9781. var me = this;
  9782. if (!config || typeof config !== 'object') {
  9783. // backwards compatibility
  9784. config = {
  9785. duration: config,
  9786. lazy: arguments[1]
  9787. };
  9788. }
  9789. var animationOptions = me.options.animation;
  9790. var duration = valueOrDefault$9(config.duration, animationOptions && animationOptions.duration);
  9791. var lazy = config.lazy;
  9792. if (core_plugins.notify(me, 'beforeRender') === false) {
  9793. return;
  9794. }
  9795. var onComplete = function(animation) {
  9796. core_plugins.notify(me, 'afterRender');
  9797. helpers$1.callback(animationOptions && animationOptions.onComplete, [animation], me);
  9798. };
  9799. if (animationOptions && duration) {
  9800. var animation = new core_animation({
  9801. numSteps: duration / 16.66, // 60 fps
  9802. easing: config.easing || animationOptions.easing,
  9803. render: function(chart, animationObject) {
  9804. var easingFunction = helpers$1.easing.effects[animationObject.easing];
  9805. var currentStep = animationObject.currentStep;
  9806. var stepDecimal = currentStep / animationObject.numSteps;
  9807. chart.draw(easingFunction(stepDecimal), stepDecimal, currentStep);
  9808. },
  9809. onAnimationProgress: animationOptions.onProgress,
  9810. onAnimationComplete: onComplete
  9811. });
  9812. core_animations.addAnimation(me, animation, duration, lazy);
  9813. } else {
  9814. me.draw();
  9815. // See https://github.com/chartjs/Chart.js/issues/3781
  9816. onComplete(new core_animation({numSteps: 0, chart: me}));
  9817. }
  9818. return me;
  9819. },
  9820. draw: function(easingValue) {
  9821. var me = this;
  9822. var i, layers;
  9823. me.clear();
  9824. if (helpers$1.isNullOrUndef(easingValue)) {
  9825. easingValue = 1;
  9826. }
  9827. me.transition(easingValue);
  9828. if (me.width <= 0 || me.height <= 0) {
  9829. return;
  9830. }
  9831. if (core_plugins.notify(me, 'beforeDraw', [easingValue]) === false) {
  9832. return;
  9833. }
  9834. // Because of plugin hooks (before/afterDatasetsDraw), datasets can't
  9835. // currently be part of layers. Instead, we draw
  9836. // layers <= 0 before(default, backward compat), and the rest after
  9837. layers = me._layers;
  9838. for (i = 0; i < layers.length && layers[i].z <= 0; ++i) {
  9839. layers[i].draw(me.chartArea);
  9840. }
  9841. me.drawDatasets(easingValue);
  9842. // Rest of layers
  9843. for (; i < layers.length; ++i) {
  9844. layers[i].draw(me.chartArea);
  9845. }
  9846. me._drawTooltip(easingValue);
  9847. core_plugins.notify(me, 'afterDraw', [easingValue]);
  9848. },
  9849. /**
  9850. * @private
  9851. */
  9852. transition: function(easingValue) {
  9853. var me = this;
  9854. for (var i = 0, ilen = (me.data.datasets || []).length; i < ilen; ++i) {
  9855. if (me.isDatasetVisible(i)) {
  9856. me.getDatasetMeta(i).controller.transition(easingValue);
  9857. }
  9858. }
  9859. me.tooltip.transition(easingValue);
  9860. },
  9861. /**
  9862. * @private
  9863. */
  9864. _getSortedDatasetMetas: function(filterVisible) {
  9865. var me = this;
  9866. var datasets = me.data.datasets || [];
  9867. var result = [];
  9868. var i, ilen;
  9869. for (i = 0, ilen = datasets.length; i < ilen; ++i) {
  9870. if (!filterVisible || me.isDatasetVisible(i)) {
  9871. result.push(me.getDatasetMeta(i));
  9872. }
  9873. }
  9874. result.sort(compare2Level('order', 'index'));
  9875. return result;
  9876. },
  9877. /**
  9878. * @private
  9879. */
  9880. _getSortedVisibleDatasetMetas: function() {
  9881. return this._getSortedDatasetMetas(true);
  9882. },
  9883. /**
  9884. * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`
  9885. * hook, in which case, plugins will not be called on `afterDatasetsDraw`.
  9886. * @private
  9887. */
  9888. drawDatasets: function(easingValue) {
  9889. var me = this;
  9890. var metasets, i;
  9891. if (core_plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) {
  9892. return;
  9893. }
  9894. metasets = me._getSortedVisibleDatasetMetas();
  9895. for (i = metasets.length - 1; i >= 0; --i) {
  9896. me.drawDataset(metasets[i], easingValue);
  9897. }
  9898. core_plugins.notify(me, 'afterDatasetsDraw', [easingValue]);
  9899. },
  9900. /**
  9901. * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw`
  9902. * hook, in which case, plugins will not be called on `afterDatasetDraw`.
  9903. * @private
  9904. */
  9905. drawDataset: function(meta, easingValue) {
  9906. var me = this;
  9907. var args = {
  9908. meta: meta,
  9909. index: meta.index,
  9910. easingValue: easingValue
  9911. };
  9912. if (core_plugins.notify(me, 'beforeDatasetDraw', [args]) === false) {
  9913. return;
  9914. }
  9915. meta.controller.draw(easingValue);
  9916. core_plugins.notify(me, 'afterDatasetDraw', [args]);
  9917. },
  9918. /**
  9919. * Draws tooltip unless a plugin returns `false` to the `beforeTooltipDraw`
  9920. * hook, in which case, plugins will not be called on `afterTooltipDraw`.
  9921. * @private
  9922. */
  9923. _drawTooltip: function(easingValue) {
  9924. var me = this;
  9925. var tooltip = me.tooltip;
  9926. var args = {
  9927. tooltip: tooltip,
  9928. easingValue: easingValue
  9929. };
  9930. if (core_plugins.notify(me, 'beforeTooltipDraw', [args]) === false) {
  9931. return;
  9932. }
  9933. tooltip.draw();
  9934. core_plugins.notify(me, 'afterTooltipDraw', [args]);
  9935. },
  9936. /**
  9937. * Get the single element that was clicked on
  9938. * @return An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw
  9939. */
  9940. getElementAtEvent: function(e) {
  9941. return core_interaction.modes.single(this, e);
  9942. },
  9943. getElementsAtEvent: function(e) {
  9944. return core_interaction.modes.label(this, e, {intersect: true});
  9945. },
  9946. getElementsAtXAxis: function(e) {
  9947. return core_interaction.modes['x-axis'](this, e, {intersect: true});
  9948. },
  9949. getElementsAtEventForMode: function(e, mode, options) {
  9950. var method = core_interaction.modes[mode];
  9951. if (typeof method === 'function') {
  9952. return method(this, e, options);
  9953. }
  9954. return [];
  9955. },
  9956. getDatasetAtEvent: function(e) {
  9957. return core_interaction.modes.dataset(this, e, {intersect: true});
  9958. },
  9959. getDatasetMeta: function(datasetIndex) {
  9960. var me = this;
  9961. var dataset = me.data.datasets[datasetIndex];
  9962. if (!dataset._meta) {
  9963. dataset._meta = {};
  9964. }
  9965. var meta = dataset._meta[me.id];
  9966. if (!meta) {
  9967. meta = dataset._meta[me.id] = {
  9968. type: null,
  9969. data: [],
  9970. dataset: null,
  9971. controller: null,
  9972. hidden: null, // See isDatasetVisible() comment
  9973. xAxisID: null,
  9974. yAxisID: null,
  9975. order: dataset.order || 0,
  9976. index: datasetIndex
  9977. };
  9978. }
  9979. return meta;
  9980. },
  9981. getVisibleDatasetCount: function() {
  9982. var count = 0;
  9983. for (var i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {
  9984. if (this.isDatasetVisible(i)) {
  9985. count++;
  9986. }
  9987. }
  9988. return count;
  9989. },
  9990. isDatasetVisible: function(datasetIndex) {
  9991. var meta = this.getDatasetMeta(datasetIndex);
  9992. // meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,
  9993. // the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.
  9994. return typeof meta.hidden === 'boolean' ? !meta.hidden : !this.data.datasets[datasetIndex].hidden;
  9995. },
  9996. generateLegend: function() {
  9997. return this.options.legendCallback(this);
  9998. },
  9999. /**
  10000. * @private
  10001. */
  10002. destroyDatasetMeta: function(datasetIndex) {
  10003. var id = this.id;
  10004. var dataset = this.data.datasets[datasetIndex];
  10005. var meta = dataset._meta && dataset._meta[id];
  10006. if (meta) {
  10007. meta.controller.destroy();
  10008. delete dataset._meta[id];
  10009. }
  10010. },
  10011. destroy: function() {
  10012. var me = this;
  10013. var canvas = me.canvas;
  10014. var i, ilen;
  10015. me.stop();
  10016. // dataset controllers need to cleanup associated data
  10017. for (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {
  10018. me.destroyDatasetMeta(i);
  10019. }
  10020. if (canvas) {
  10021. me.unbindEvents();
  10022. helpers$1.canvas.clear(me);
  10023. platform.releaseContext(me.ctx);
  10024. me.canvas = null;
  10025. me.ctx = null;
  10026. }
  10027. core_plugins.notify(me, 'destroy');
  10028. delete Chart.instances[me.id];
  10029. },
  10030. toBase64Image: function() {
  10031. return this.canvas.toDataURL.apply(this.canvas, arguments);
  10032. },
  10033. initToolTip: function() {
  10034. var me = this;
  10035. me.tooltip = new core_tooltip({
  10036. _chart: me,
  10037. _chartInstance: me, // deprecated, backward compatibility
  10038. _data: me.data,
  10039. _options: me.options.tooltips
  10040. }, me);
  10041. },
  10042. /**
  10043. * @private
  10044. */
  10045. bindEvents: function() {
  10046. var me = this;
  10047. var listeners = me._listeners = {};
  10048. var listener = function() {
  10049. me.eventHandler.apply(me, arguments);
  10050. };
  10051. helpers$1.each(me.options.events, function(type) {
  10052. platform.addEventListener(me, type, listener);
  10053. listeners[type] = listener;
  10054. });
  10055. // Elements used to detect size change should not be injected for non responsive charts.
  10056. // See https://github.com/chartjs/Chart.js/issues/2210
  10057. if (me.options.responsive) {
  10058. listener = function() {
  10059. me.resize();
  10060. };
  10061. platform.addEventListener(me, 'resize', listener);
  10062. listeners.resize = listener;
  10063. }
  10064. },
  10065. /**
  10066. * @private
  10067. */
  10068. unbindEvents: function() {
  10069. var me = this;
  10070. var listeners = me._listeners;
  10071. if (!listeners) {
  10072. return;
  10073. }
  10074. delete me._listeners;
  10075. helpers$1.each(listeners, function(listener, type) {
  10076. platform.removeEventListener(me, type, listener);
  10077. });
  10078. },
  10079. updateHoverStyle: function(elements, mode, enabled) {
  10080. var prefix = enabled ? 'set' : 'remove';
  10081. var element, i, ilen;
  10082. for (i = 0, ilen = elements.length; i < ilen; ++i) {
  10083. element = elements[i];
  10084. if (element) {
  10085. this.getDatasetMeta(element._datasetIndex).controller[prefix + 'HoverStyle'](element);
  10086. }
  10087. }
  10088. if (mode === 'dataset') {
  10089. this.getDatasetMeta(elements[0]._datasetIndex).controller['_' + prefix + 'DatasetHoverStyle']();
  10090. }
  10091. },
  10092. /**
  10093. * @private
  10094. */
  10095. eventHandler: function(e) {
  10096. var me = this;
  10097. var tooltip = me.tooltip;
  10098. if (core_plugins.notify(me, 'beforeEvent', [e]) === false) {
  10099. return;
  10100. }
  10101. // Buffer any update calls so that renders do not occur
  10102. me._bufferedRender = true;
  10103. me._bufferedRequest = null;
  10104. var changed = me.handleEvent(e);
  10105. // for smooth tooltip animations issue #4989
  10106. // the tooltip should be the source of change
  10107. // Animation check workaround:
  10108. // tooltip._start will be null when tooltip isn't animating
  10109. if (tooltip) {
  10110. changed = tooltip._start
  10111. ? tooltip.handleEvent(e)
  10112. : changed | tooltip.handleEvent(e);
  10113. }
  10114. core_plugins.notify(me, 'afterEvent', [e]);
  10115. var bufferedRequest = me._bufferedRequest;
  10116. if (bufferedRequest) {
  10117. // If we have an update that was triggered, we need to do a normal render
  10118. me.render(bufferedRequest);
  10119. } else if (changed && !me.animating) {
  10120. // If entering, leaving, or changing elements, animate the change via pivot
  10121. me.stop();
  10122. // We only need to render at this point. Updating will cause scales to be
  10123. // recomputed generating flicker & using more memory than necessary.
  10124. me.render({
  10125. duration: me.options.hover.animationDuration,
  10126. lazy: true
  10127. });
  10128. }
  10129. me._bufferedRender = false;
  10130. me._bufferedRequest = null;
  10131. return me;
  10132. },
  10133. /**
  10134. * Handle an event
  10135. * @private
  10136. * @param {IEvent} event the event to handle
  10137. * @return {boolean} true if the chart needs to re-render
  10138. */
  10139. handleEvent: function(e) {
  10140. var me = this;
  10141. var options = me.options || {};
  10142. var hoverOptions = options.hover;
  10143. var changed = false;
  10144. me.lastActive = me.lastActive || [];
  10145. // Find Active Elements for hover and tooltips
  10146. if (e.type === 'mouseout') {
  10147. me.active = [];
  10148. } else {
  10149. me.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);
  10150. }
  10151. // Invoke onHover hook
  10152. // Need to call with native event here to not break backwards compatibility
  10153. helpers$1.callback(options.onHover || options.hover.onHover, [e.native, me.active], me);
  10154. if (e.type === 'mouseup' || e.type === 'click') {
  10155. if (options.onClick) {
  10156. // Use e.native here for backwards compatibility
  10157. options.onClick.call(me, e.native, me.active);
  10158. }
  10159. }
  10160. // Remove styling for last active (even if it may still be active)
  10161. if (me.lastActive.length) {
  10162. me.updateHoverStyle(me.lastActive, hoverOptions.mode, false);
  10163. }
  10164. // Built in hover styling
  10165. if (me.active.length && hoverOptions.mode) {
  10166. me.updateHoverStyle(me.active, hoverOptions.mode, true);
  10167. }
  10168. changed = !helpers$1.arrayEquals(me.active, me.lastActive);
  10169. // Remember Last Actives
  10170. me.lastActive = me.active;
  10171. return changed;
  10172. }
  10173. });
  10174. /**
  10175. * NOTE(SB) We actually don't use this container anymore but we need to keep it
  10176. * for backward compatibility. Though, it can still be useful for plugins that
  10177. * would need to work on multiple charts?!
  10178. */
  10179. Chart.instances = {};
  10180. var core_controller = Chart;
  10181. // DEPRECATIONS
  10182. /**
  10183. * Provided for backward compatibility, use Chart instead.
  10184. * @class Chart.Controller
  10185. * @deprecated since version 2.6
  10186. * @todo remove at version 3
  10187. * @private
  10188. */
  10189. Chart.Controller = Chart;
  10190. /**
  10191. * Provided for backward compatibility, not available anymore.
  10192. * @namespace Chart
  10193. * @deprecated since version 2.8
  10194. * @todo remove at version 3
  10195. * @private
  10196. */
  10197. Chart.types = {};
  10198. /**
  10199. * Provided for backward compatibility, not available anymore.
  10200. * @namespace Chart.helpers.configMerge
  10201. * @deprecated since version 2.8.0
  10202. * @todo remove at version 3
  10203. * @private
  10204. */
  10205. helpers$1.configMerge = mergeConfig;
  10206. /**
  10207. * Provided for backward compatibility, not available anymore.
  10208. * @namespace Chart.helpers.scaleMerge
  10209. * @deprecated since version 2.8.0
  10210. * @todo remove at version 3
  10211. * @private
  10212. */
  10213. helpers$1.scaleMerge = mergeScaleConfig;
  10214. var core_helpers = function() {
  10215. // -- Basic js utility methods
  10216. helpers$1.where = function(collection, filterCallback) {
  10217. if (helpers$1.isArray(collection) && Array.prototype.filter) {
  10218. return collection.filter(filterCallback);
  10219. }
  10220. var filtered = [];
  10221. helpers$1.each(collection, function(item) {
  10222. if (filterCallback(item)) {
  10223. filtered.push(item);
  10224. }
  10225. });
  10226. return filtered;
  10227. };
  10228. helpers$1.findIndex = Array.prototype.findIndex ?
  10229. function(array, callback, scope) {
  10230. return array.findIndex(callback, scope);
  10231. } :
  10232. function(array, callback, scope) {
  10233. scope = scope === undefined ? array : scope;
  10234. for (var i = 0, ilen = array.length; i < ilen; ++i) {
  10235. if (callback.call(scope, array[i], i, array)) {
  10236. return i;
  10237. }
  10238. }
  10239. return -1;
  10240. };
  10241. helpers$1.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {
  10242. // Default to start of the array
  10243. if (helpers$1.isNullOrUndef(startIndex)) {
  10244. startIndex = -1;
  10245. }
  10246. for (var i = startIndex + 1; i < arrayToSearch.length; i++) {
  10247. var currentItem = arrayToSearch[i];
  10248. if (filterCallback(currentItem)) {
  10249. return currentItem;
  10250. }
  10251. }
  10252. };
  10253. helpers$1.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {
  10254. // Default to end of the array
  10255. if (helpers$1.isNullOrUndef(startIndex)) {
  10256. startIndex = arrayToSearch.length;
  10257. }
  10258. for (var i = startIndex - 1; i >= 0; i--) {
  10259. var currentItem = arrayToSearch[i];
  10260. if (filterCallback(currentItem)) {
  10261. return currentItem;
  10262. }
  10263. }
  10264. };
  10265. // -- Math methods
  10266. helpers$1.isNumber = function(n) {
  10267. return !isNaN(parseFloat(n)) && isFinite(n);
  10268. };
  10269. helpers$1.almostEquals = function(x, y, epsilon) {
  10270. return Math.abs(x - y) < epsilon;
  10271. };
  10272. helpers$1.almostWhole = function(x, epsilon) {
  10273. var rounded = Math.round(x);
  10274. return ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);
  10275. };
  10276. helpers$1.max = function(array) {
  10277. return array.reduce(function(max, value) {
  10278. if (!isNaN(value)) {
  10279. return Math.max(max, value);
  10280. }
  10281. return max;
  10282. }, Number.NEGATIVE_INFINITY);
  10283. };
  10284. helpers$1.min = function(array) {
  10285. return array.reduce(function(min, value) {
  10286. if (!isNaN(value)) {
  10287. return Math.min(min, value);
  10288. }
  10289. return min;
  10290. }, Number.POSITIVE_INFINITY);
  10291. };
  10292. helpers$1.sign = Math.sign ?
  10293. function(x) {
  10294. return Math.sign(x);
  10295. } :
  10296. function(x) {
  10297. x = +x; // convert to a number
  10298. if (x === 0 || isNaN(x)) {
  10299. return x;
  10300. }
  10301. return x > 0 ? 1 : -1;
  10302. };
  10303. helpers$1.toRadians = function(degrees) {
  10304. return degrees * (Math.PI / 180);
  10305. };
  10306. helpers$1.toDegrees = function(radians) {
  10307. return radians * (180 / Math.PI);
  10308. };
  10309. /**
  10310. * Returns the number of decimal places
  10311. * i.e. the number of digits after the decimal point, of the value of this Number.
  10312. * @param {number} x - A number.
  10313. * @returns {number} The number of decimal places.
  10314. * @private
  10315. */
  10316. helpers$1._decimalPlaces = function(x) {
  10317. if (!helpers$1.isFinite(x)) {
  10318. return;
  10319. }
  10320. var e = 1;
  10321. var p = 0;
  10322. while (Math.round(x * e) / e !== x) {
  10323. e *= 10;
  10324. p++;
  10325. }
  10326. return p;
  10327. };
  10328. // Gets the angle from vertical upright to the point about a centre.
  10329. helpers$1.getAngleFromPoint = function(centrePoint, anglePoint) {
  10330. var distanceFromXCenter = anglePoint.x - centrePoint.x;
  10331. var distanceFromYCenter = anglePoint.y - centrePoint.y;
  10332. var radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
  10333. var angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);
  10334. if (angle < (-0.5 * Math.PI)) {
  10335. angle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]
  10336. }
  10337. return {
  10338. angle: angle,
  10339. distance: radialDistanceFromCenter
  10340. };
  10341. };
  10342. helpers$1.distanceBetweenPoints = function(pt1, pt2) {
  10343. return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));
  10344. };
  10345. /**
  10346. * Provided for backward compatibility, not available anymore
  10347. * @function Chart.helpers.aliasPixel
  10348. * @deprecated since version 2.8.0
  10349. * @todo remove at version 3
  10350. */
  10351. helpers$1.aliasPixel = function(pixelWidth) {
  10352. return (pixelWidth % 2 === 0) ? 0 : 0.5;
  10353. };
  10354. /**
  10355. * Returns the aligned pixel value to avoid anti-aliasing blur
  10356. * @param {Chart} chart - The chart instance.
  10357. * @param {number} pixel - A pixel value.
  10358. * @param {number} width - The width of the element.
  10359. * @returns {number} The aligned pixel value.
  10360. * @private
  10361. */
  10362. helpers$1._alignPixel = function(chart, pixel, width) {
  10363. var devicePixelRatio = chart.currentDevicePixelRatio;
  10364. var halfWidth = width / 2;
  10365. return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;
  10366. };
  10367. helpers$1.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {
  10368. // Props to Rob Spencer at scaled innovation for his post on splining between points
  10369. // http://scaledinnovation.com/analytics/splines/aboutSplines.html
  10370. // This function must also respect "skipped" points
  10371. var previous = firstPoint.skip ? middlePoint : firstPoint;
  10372. var current = middlePoint;
  10373. var next = afterPoint.skip ? middlePoint : afterPoint;
  10374. var d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));
  10375. var d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));
  10376. var s01 = d01 / (d01 + d12);
  10377. var s12 = d12 / (d01 + d12);
  10378. // If all points are the same, s01 & s02 will be inf
  10379. s01 = isNaN(s01) ? 0 : s01;
  10380. s12 = isNaN(s12) ? 0 : s12;
  10381. var fa = t * s01; // scaling factor for triangle Ta
  10382. var fb = t * s12;
  10383. return {
  10384. previous: {
  10385. x: current.x - fa * (next.x - previous.x),
  10386. y: current.y - fa * (next.y - previous.y)
  10387. },
  10388. next: {
  10389. x: current.x + fb * (next.x - previous.x),
  10390. y: current.y + fb * (next.y - previous.y)
  10391. }
  10392. };
  10393. };
  10394. helpers$1.EPSILON = Number.EPSILON || 1e-14;
  10395. helpers$1.splineCurveMonotone = function(points) {
  10396. // This function calculates Bézier control points in a similar way than |splineCurve|,
  10397. // but preserves monotonicity of the provided data and ensures no local extremums are added
  10398. // between the dataset discrete points due to the interpolation.
  10399. // See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
  10400. var pointsWithTangents = (points || []).map(function(point) {
  10401. return {
  10402. model: point._model,
  10403. deltaK: 0,
  10404. mK: 0
  10405. };
  10406. });
  10407. // Calculate slopes (deltaK) and initialize tangents (mK)
  10408. var pointsLen = pointsWithTangents.length;
  10409. var i, pointBefore, pointCurrent, pointAfter;
  10410. for (i = 0; i < pointsLen; ++i) {
  10411. pointCurrent = pointsWithTangents[i];
  10412. if (pointCurrent.model.skip) {
  10413. continue;
  10414. }
  10415. pointBefore = i > 0 ? pointsWithTangents[i - 1] : null;
  10416. pointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;
  10417. if (pointAfter && !pointAfter.model.skip) {
  10418. var slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x);
  10419. // In the case of two points that appear at the same x pixel, slopeDeltaX is 0
  10420. pointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0;
  10421. }
  10422. if (!pointBefore || pointBefore.model.skip) {
  10423. pointCurrent.mK = pointCurrent.deltaK;
  10424. } else if (!pointAfter || pointAfter.model.skip) {
  10425. pointCurrent.mK = pointBefore.deltaK;
  10426. } else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) {
  10427. pointCurrent.mK = 0;
  10428. } else {
  10429. pointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;
  10430. }
  10431. }
  10432. // Adjust tangents to ensure monotonic properties
  10433. var alphaK, betaK, tauK, squaredMagnitude;
  10434. for (i = 0; i < pointsLen - 1; ++i) {
  10435. pointCurrent = pointsWithTangents[i];
  10436. pointAfter = pointsWithTangents[i + 1];
  10437. if (pointCurrent.model.skip || pointAfter.model.skip) {
  10438. continue;
  10439. }
  10440. if (helpers$1.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) {
  10441. pointCurrent.mK = pointAfter.mK = 0;
  10442. continue;
  10443. }
  10444. alphaK = pointCurrent.mK / pointCurrent.deltaK;
  10445. betaK = pointAfter.mK / pointCurrent.deltaK;
  10446. squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);
  10447. if (squaredMagnitude <= 9) {
  10448. continue;
  10449. }
  10450. tauK = 3 / Math.sqrt(squaredMagnitude);
  10451. pointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;
  10452. pointAfter.mK = betaK * tauK * pointCurrent.deltaK;
  10453. }
  10454. // Compute control points
  10455. var deltaX;
  10456. for (i = 0; i < pointsLen; ++i) {
  10457. pointCurrent = pointsWithTangents[i];
  10458. if (pointCurrent.model.skip) {
  10459. continue;
  10460. }
  10461. pointBefore = i > 0 ? pointsWithTangents[i - 1] : null;
  10462. pointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;
  10463. if (pointBefore && !pointBefore.model.skip) {
  10464. deltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;
  10465. pointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;
  10466. pointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;
  10467. }
  10468. if (pointAfter && !pointAfter.model.skip) {
  10469. deltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;
  10470. pointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;
  10471. pointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;
  10472. }
  10473. }
  10474. };
  10475. helpers$1.nextItem = function(collection, index, loop) {
  10476. if (loop) {
  10477. return index >= collection.length - 1 ? collection[0] : collection[index + 1];
  10478. }
  10479. return index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];
  10480. };
  10481. helpers$1.previousItem = function(collection, index, loop) {
  10482. if (loop) {
  10483. return index <= 0 ? collection[collection.length - 1] : collection[index - 1];
  10484. }
  10485. return index <= 0 ? collection[0] : collection[index - 1];
  10486. };
  10487. // Implementation of the nice number algorithm used in determining where axis labels will go
  10488. helpers$1.niceNum = function(range, round) {
  10489. var exponent = Math.floor(helpers$1.log10(range));
  10490. var fraction = range / Math.pow(10, exponent);
  10491. var niceFraction;
  10492. if (round) {
  10493. if (fraction < 1.5) {
  10494. niceFraction = 1;
  10495. } else if (fraction < 3) {
  10496. niceFraction = 2;
  10497. } else if (fraction < 7) {
  10498. niceFraction = 5;
  10499. } else {
  10500. niceFraction = 10;
  10501. }
  10502. } else if (fraction <= 1.0) {
  10503. niceFraction = 1;
  10504. } else if (fraction <= 2) {
  10505. niceFraction = 2;
  10506. } else if (fraction <= 5) {
  10507. niceFraction = 5;
  10508. } else {
  10509. niceFraction = 10;
  10510. }
  10511. return niceFraction * Math.pow(10, exponent);
  10512. };
  10513. // Request animation polyfill - https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
  10514. helpers$1.requestAnimFrame = (function() {
  10515. if (typeof window === 'undefined') {
  10516. return function(callback) {
  10517. callback();
  10518. };
  10519. }
  10520. return window.requestAnimationFrame ||
  10521. window.webkitRequestAnimationFrame ||
  10522. window.mozRequestAnimationFrame ||
  10523. window.oRequestAnimationFrame ||
  10524. window.msRequestAnimationFrame ||
  10525. function(callback) {
  10526. return window.setTimeout(callback, 1000 / 60);
  10527. };
  10528. }());
  10529. // -- DOM methods
  10530. helpers$1.getRelativePosition = function(evt, chart) {
  10531. var mouseX, mouseY;
  10532. var e = evt.originalEvent || evt;
  10533. var canvas = evt.target || evt.srcElement;
  10534. var boundingRect = canvas.getBoundingClientRect();
  10535. var touches = e.touches;
  10536. if (touches && touches.length > 0) {
  10537. mouseX = touches[0].clientX;
  10538. mouseY = touches[0].clientY;
  10539. } else {
  10540. mouseX = e.clientX;
  10541. mouseY = e.clientY;
  10542. }
  10543. // Scale mouse coordinates into canvas coordinates
  10544. // by following the pattern laid out by 'jerryj' in the comments of
  10545. // https://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/
  10546. var paddingLeft = parseFloat(helpers$1.getStyle(canvas, 'padding-left'));
  10547. var paddingTop = parseFloat(helpers$1.getStyle(canvas, 'padding-top'));
  10548. var paddingRight = parseFloat(helpers$1.getStyle(canvas, 'padding-right'));
  10549. var paddingBottom = parseFloat(helpers$1.getStyle(canvas, 'padding-bottom'));
  10550. var width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;
  10551. var height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;
  10552. // We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However
  10553. // the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here
  10554. mouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);
  10555. mouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);
  10556. return {
  10557. x: mouseX,
  10558. y: mouseY
  10559. };
  10560. };
  10561. // Private helper function to convert max-width/max-height values that may be percentages into a number
  10562. function parseMaxStyle(styleValue, node, parentProperty) {
  10563. var valueInPixels;
  10564. if (typeof styleValue === 'string') {
  10565. valueInPixels = parseInt(styleValue, 10);
  10566. if (styleValue.indexOf('%') !== -1) {
  10567. // percentage * size in dimension
  10568. valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];
  10569. }
  10570. } else {
  10571. valueInPixels = styleValue;
  10572. }
  10573. return valueInPixels;
  10574. }
  10575. /**
  10576. * Returns if the given value contains an effective constraint.
  10577. * @private
  10578. */
  10579. function isConstrainedValue(value) {
  10580. return value !== undefined && value !== null && value !== 'none';
  10581. }
  10582. /**
  10583. * Returns the max width or height of the given DOM node in a cross-browser compatible fashion
  10584. * @param {HTMLElement} domNode - the node to check the constraint on
  10585. * @param {string} maxStyle - the style that defines the maximum for the direction we are using ('max-width' / 'max-height')
  10586. * @param {string} percentageProperty - property of parent to use when calculating width as a percentage
  10587. * @see {@link https://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser}
  10588. */
  10589. function getConstraintDimension(domNode, maxStyle, percentageProperty) {
  10590. var view = document.defaultView;
  10591. var parentNode = helpers$1._getParentNode(domNode);
  10592. var constrainedNode = view.getComputedStyle(domNode)[maxStyle];
  10593. var constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];
  10594. var hasCNode = isConstrainedValue(constrainedNode);
  10595. var hasCContainer = isConstrainedValue(constrainedContainer);
  10596. var infinity = Number.POSITIVE_INFINITY;
  10597. if (hasCNode || hasCContainer) {
  10598. return Math.min(
  10599. hasCNode ? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,
  10600. hasCContainer ? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);
  10601. }
  10602. return 'none';
  10603. }
  10604. // returns Number or undefined if no constraint
  10605. helpers$1.getConstraintWidth = function(domNode) {
  10606. return getConstraintDimension(domNode, 'max-width', 'clientWidth');
  10607. };
  10608. // returns Number or undefined if no constraint
  10609. helpers$1.getConstraintHeight = function(domNode) {
  10610. return getConstraintDimension(domNode, 'max-height', 'clientHeight');
  10611. };
  10612. /**
  10613. * @private
  10614. */
  10615. helpers$1._calculatePadding = function(container, padding, parentDimension) {
  10616. padding = helpers$1.getStyle(container, padding);
  10617. return padding.indexOf('%') > -1 ? parentDimension * parseInt(padding, 10) / 100 : parseInt(padding, 10);
  10618. };
  10619. /**
  10620. * @private
  10621. */
  10622. helpers$1._getParentNode = function(domNode) {
  10623. var parent = domNode.parentNode;
  10624. if (parent && parent.toString() === '[object ShadowRoot]') {
  10625. parent = parent.host;
  10626. }
  10627. return parent;
  10628. };
  10629. helpers$1.getMaximumWidth = function(domNode) {
  10630. var container = helpers$1._getParentNode(domNode);
  10631. if (!container) {
  10632. return domNode.clientWidth;
  10633. }
  10634. var clientWidth = container.clientWidth;
  10635. var paddingLeft = helpers$1._calculatePadding(container, 'padding-left', clientWidth);
  10636. var paddingRight = helpers$1._calculatePadding(container, 'padding-right', clientWidth);
  10637. var w = clientWidth - paddingLeft - paddingRight;
  10638. var cw = helpers$1.getConstraintWidth(domNode);
  10639. return isNaN(cw) ? w : Math.min(w, cw);
  10640. };
  10641. helpers$1.getMaximumHeight = function(domNode) {
  10642. var container = helpers$1._getParentNode(domNode);
  10643. if (!container) {
  10644. return domNode.clientHeight;
  10645. }
  10646. var clientHeight = container.clientHeight;
  10647. var paddingTop = helpers$1._calculatePadding(container, 'padding-top', clientHeight);
  10648. var paddingBottom = helpers$1._calculatePadding(container, 'padding-bottom', clientHeight);
  10649. var h = clientHeight - paddingTop - paddingBottom;
  10650. var ch = helpers$1.getConstraintHeight(domNode);
  10651. return isNaN(ch) ? h : Math.min(h, ch);
  10652. };
  10653. helpers$1.getStyle = function(el, property) {
  10654. return el.currentStyle ?
  10655. el.currentStyle[property] :
  10656. document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
  10657. };
  10658. helpers$1.retinaScale = function(chart, forceRatio) {
  10659. var pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1;
  10660. if (pixelRatio === 1) {
  10661. return;
  10662. }
  10663. var canvas = chart.canvas;
  10664. var height = chart.height;
  10665. var width = chart.width;
  10666. canvas.height = height * pixelRatio;
  10667. canvas.width = width * pixelRatio;
  10668. chart.ctx.scale(pixelRatio, pixelRatio);
  10669. // If no style has been set on the canvas, the render size is used as display size,
  10670. // making the chart visually bigger, so let's enforce it to the "correct" values.
  10671. // See https://github.com/chartjs/Chart.js/issues/3575
  10672. if (!canvas.style.height && !canvas.style.width) {
  10673. canvas.style.height = height + 'px';
  10674. canvas.style.width = width + 'px';
  10675. }
  10676. };
  10677. // -- Canvas methods
  10678. helpers$1.fontString = function(pixelSize, fontStyle, fontFamily) {
  10679. return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;
  10680. };
  10681. helpers$1.longestText = function(ctx, font, arrayOfThings, cache) {
  10682. cache = cache || {};
  10683. var data = cache.data = cache.data || {};
  10684. var gc = cache.garbageCollect = cache.garbageCollect || [];
  10685. if (cache.font !== font) {
  10686. data = cache.data = {};
  10687. gc = cache.garbageCollect = [];
  10688. cache.font = font;
  10689. }
  10690. ctx.font = font;
  10691. var longest = 0;
  10692. var ilen = arrayOfThings.length;
  10693. var i, j, jlen, thing, nestedThing;
  10694. for (i = 0; i < ilen; i++) {
  10695. thing = arrayOfThings[i];
  10696. // Undefined strings and arrays should not be measured
  10697. if (thing !== undefined && thing !== null && helpers$1.isArray(thing) !== true) {
  10698. longest = helpers$1.measureText(ctx, data, gc, longest, thing);
  10699. } else if (helpers$1.isArray(thing)) {
  10700. // if it is an array lets measure each element
  10701. // to do maybe simplify this function a bit so we can do this more recursively?
  10702. for (j = 0, jlen = thing.length; j < jlen; j++) {
  10703. nestedThing = thing[j];
  10704. // Undefined strings and arrays should not be measured
  10705. if (nestedThing !== undefined && nestedThing !== null && !helpers$1.isArray(nestedThing)) {
  10706. longest = helpers$1.measureText(ctx, data, gc, longest, nestedThing);
  10707. }
  10708. }
  10709. }
  10710. }
  10711. var gcLen = gc.length / 2;
  10712. if (gcLen > arrayOfThings.length) {
  10713. for (i = 0; i < gcLen; i++) {
  10714. delete data[gc[i]];
  10715. }
  10716. gc.splice(0, gcLen);
  10717. }
  10718. return longest;
  10719. };
  10720. helpers$1.measureText = function(ctx, data, gc, longest, string) {
  10721. var textWidth = data[string];
  10722. if (!textWidth) {
  10723. textWidth = data[string] = ctx.measureText(string).width;
  10724. gc.push(string);
  10725. }
  10726. if (textWidth > longest) {
  10727. longest = textWidth;
  10728. }
  10729. return longest;
  10730. };
  10731. /**
  10732. * @deprecated
  10733. */
  10734. helpers$1.numberOfLabelLines = function(arrayOfThings) {
  10735. var numberOfLines = 1;
  10736. helpers$1.each(arrayOfThings, function(thing) {
  10737. if (helpers$1.isArray(thing)) {
  10738. if (thing.length > numberOfLines) {
  10739. numberOfLines = thing.length;
  10740. }
  10741. }
  10742. });
  10743. return numberOfLines;
  10744. };
  10745. helpers$1.color = !chartjsColor ?
  10746. function(value) {
  10747. console.error('Color.js not found!');
  10748. return value;
  10749. } :
  10750. function(value) {
  10751. /* global CanvasGradient */
  10752. if (value instanceof CanvasGradient) {
  10753. value = core_defaults.global.defaultColor;
  10754. }
  10755. return chartjsColor(value);
  10756. };
  10757. helpers$1.getHoverColor = function(colorValue) {
  10758. /* global CanvasPattern */
  10759. return (colorValue instanceof CanvasPattern || colorValue instanceof CanvasGradient) ?
  10760. colorValue :
  10761. helpers$1.color(colorValue).saturate(0.5).darken(0.1).rgbString();
  10762. };
  10763. };
  10764. function abstract() {
  10765. throw new Error(
  10766. 'This method is not implemented: either no adapter can ' +
  10767. 'be found or an incomplete integration was provided.'
  10768. );
  10769. }
  10770. /**
  10771. * Date adapter (current used by the time scale)
  10772. * @namespace Chart._adapters._date
  10773. * @memberof Chart._adapters
  10774. * @private
  10775. */
  10776. /**
  10777. * Currently supported unit string values.
  10778. * @typedef {('millisecond'|'second'|'minute'|'hour'|'day'|'week'|'month'|'quarter'|'year')}
  10779. * @memberof Chart._adapters._date
  10780. * @name Unit
  10781. */
  10782. /**
  10783. * @class
  10784. */
  10785. function DateAdapter(options) {
  10786. this.options = options || {};
  10787. }
  10788. helpers$1.extend(DateAdapter.prototype, /** @lends DateAdapter */ {
  10789. /**
  10790. * Returns a map of time formats for the supported formatting units defined
  10791. * in Unit as well as 'datetime' representing a detailed date/time string.
  10792. * @returns {{string: string}}
  10793. */
  10794. formats: abstract,
  10795. /**
  10796. * Parses the given `value` and return the associated timestamp.
  10797. * @param {any} value - the value to parse (usually comes from the data)
  10798. * @param {string} [format] - the expected data format
  10799. * @returns {(number|null)}
  10800. * @function
  10801. */
  10802. parse: abstract,
  10803. /**
  10804. * Returns the formatted date in the specified `format` for a given `timestamp`.
  10805. * @param {number} timestamp - the timestamp to format
  10806. * @param {string} format - the date/time token
  10807. * @return {string}
  10808. * @function
  10809. */
  10810. format: abstract,
  10811. /**
  10812. * Adds the specified `amount` of `unit` to the given `timestamp`.
  10813. * @param {number} timestamp - the input timestamp
  10814. * @param {number} amount - the amount to add
  10815. * @param {Unit} unit - the unit as string
  10816. * @return {number}
  10817. * @function
  10818. */
  10819. add: abstract,
  10820. /**
  10821. * Returns the number of `unit` between the given timestamps.
  10822. * @param {number} max - the input timestamp (reference)
  10823. * @param {number} min - the timestamp to substract
  10824. * @param {Unit} unit - the unit as string
  10825. * @return {number}
  10826. * @function
  10827. */
  10828. diff: abstract,
  10829. /**
  10830. * Returns start of `unit` for the given `timestamp`.
  10831. * @param {number} timestamp - the input timestamp
  10832. * @param {Unit} unit - the unit as string
  10833. * @param {number} [weekday] - the ISO day of the week with 1 being Monday
  10834. * and 7 being Sunday (only needed if param *unit* is `isoWeek`).
  10835. * @function
  10836. */
  10837. startOf: abstract,
  10838. /**
  10839. * Returns end of `unit` for the given `timestamp`.
  10840. * @param {number} timestamp - the input timestamp
  10841. * @param {Unit} unit - the unit as string
  10842. * @function
  10843. */
  10844. endOf: abstract,
  10845. // DEPRECATIONS
  10846. /**
  10847. * Provided for backward compatibility for scale.getValueForPixel(),
  10848. * this method should be overridden only by the moment adapter.
  10849. * @deprecated since version 2.8.0
  10850. * @todo remove at version 3
  10851. * @private
  10852. */
  10853. _create: function(value) {
  10854. return value;
  10855. }
  10856. });
  10857. DateAdapter.override = function(members) {
  10858. helpers$1.extend(DateAdapter.prototype, members);
  10859. };
  10860. var _date = DateAdapter;
  10861. var core_adapters = {
  10862. _date: _date
  10863. };
  10864. /**
  10865. * Namespace to hold static tick generation functions
  10866. * @namespace Chart.Ticks
  10867. */
  10868. var core_ticks = {
  10869. /**
  10870. * Namespace to hold formatters for different types of ticks
  10871. * @namespace Chart.Ticks.formatters
  10872. */
  10873. formatters: {
  10874. /**
  10875. * Formatter for value labels
  10876. * @method Chart.Ticks.formatters.values
  10877. * @param value the value to display
  10878. * @return {string|string[]} the label to display
  10879. */
  10880. values: function(value) {
  10881. return helpers$1.isArray(value) ? value : '' + value;
  10882. },
  10883. /**
  10884. * Formatter for linear numeric ticks
  10885. * @method Chart.Ticks.formatters.linear
  10886. * @param tickValue {number} the value to be formatted
  10887. * @param index {number} the position of the tickValue parameter in the ticks array
  10888. * @param ticks {number[]} the list of ticks being converted
  10889. * @return {string} string representation of the tickValue parameter
  10890. */
  10891. linear: function(tickValue, index, ticks) {
  10892. // If we have lots of ticks, don't use the ones
  10893. var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];
  10894. // If we have a number like 2.5 as the delta, figure out how many decimal places we need
  10895. if (Math.abs(delta) > 1) {
  10896. if (tickValue !== Math.floor(tickValue)) {
  10897. // not an integer
  10898. delta = tickValue - Math.floor(tickValue);
  10899. }
  10900. }
  10901. var logDelta = helpers$1.log10(Math.abs(delta));
  10902. var tickString = '';
  10903. if (tickValue !== 0) {
  10904. var maxTick = Math.max(Math.abs(ticks[0]), Math.abs(ticks[ticks.length - 1]));
  10905. if (maxTick < 1e-4) { // all ticks are small numbers; use scientific notation
  10906. var logTick = helpers$1.log10(Math.abs(tickValue));
  10907. var numExponential = Math.floor(logTick) - Math.floor(logDelta);
  10908. numExponential = Math.max(Math.min(numExponential, 20), 0);
  10909. tickString = tickValue.toExponential(numExponential);
  10910. } else {
  10911. var numDecimal = -1 * Math.floor(logDelta);
  10912. numDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places
  10913. tickString = tickValue.toFixed(numDecimal);
  10914. }
  10915. } else {
  10916. tickString = '0'; // never show decimal places for 0
  10917. }
  10918. return tickString;
  10919. },
  10920. logarithmic: function(tickValue, index, ticks) {
  10921. var remain = tickValue / (Math.pow(10, Math.floor(helpers$1.log10(tickValue))));
  10922. if (tickValue === 0) {
  10923. return '0';
  10924. } else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) {
  10925. return tickValue.toExponential();
  10926. }
  10927. return '';
  10928. }
  10929. }
  10930. };
  10931. var isArray = helpers$1.isArray;
  10932. var isNullOrUndef = helpers$1.isNullOrUndef;
  10933. var valueOrDefault$a = helpers$1.valueOrDefault;
  10934. var valueAtIndexOrDefault = helpers$1.valueAtIndexOrDefault;
  10935. core_defaults._set('scale', {
  10936. display: true,
  10937. position: 'left',
  10938. offset: false,
  10939. // grid line settings
  10940. gridLines: {
  10941. display: true,
  10942. color: 'rgba(0,0,0,0.1)',
  10943. lineWidth: 1,
  10944. drawBorder: true,
  10945. drawOnChartArea: true,
  10946. drawTicks: true,
  10947. tickMarkLength: 10,
  10948. zeroLineWidth: 1,
  10949. zeroLineColor: 'rgba(0,0,0,0.25)',
  10950. zeroLineBorderDash: [],
  10951. zeroLineBorderDashOffset: 0.0,
  10952. offsetGridLines: false,
  10953. borderDash: [],
  10954. borderDashOffset: 0.0
  10955. },
  10956. // scale label
  10957. scaleLabel: {
  10958. // display property
  10959. display: false,
  10960. // actual label
  10961. labelString: '',
  10962. // top/bottom padding
  10963. padding: {
  10964. top: 4,
  10965. bottom: 4
  10966. }
  10967. },
  10968. // label settings
  10969. ticks: {
  10970. beginAtZero: false,
  10971. minRotation: 0,
  10972. maxRotation: 50,
  10973. mirror: false,
  10974. padding: 0,
  10975. reverse: false,
  10976. display: true,
  10977. autoSkip: true,
  10978. autoSkipPadding: 0,
  10979. labelOffset: 0,
  10980. // We pass through arrays to be rendered as multiline labels, we convert Others to strings here.
  10981. callback: core_ticks.formatters.values,
  10982. minor: {},
  10983. major: {}
  10984. }
  10985. });
  10986. /** Returns a new array containing numItems from arr */
  10987. function sample(arr, numItems) {
  10988. var result = [];
  10989. var increment = arr.length / numItems;
  10990. var i = 0;
  10991. var len = arr.length;
  10992. for (; i < len; i += increment) {
  10993. result.push(arr[Math.floor(i)]);
  10994. }
  10995. return result;
  10996. }
  10997. function getPixelForGridLine(scale, index, offsetGridLines) {
  10998. var length = scale.getTicks().length;
  10999. var validIndex = Math.min(index, length - 1);
  11000. var lineValue = scale.getPixelForTick(validIndex);
  11001. var start = scale._startPixel;
  11002. var end = scale._endPixel;
  11003. var epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.
  11004. var offset;
  11005. if (offsetGridLines) {
  11006. if (length === 1) {
  11007. offset = Math.max(lineValue - start, end - lineValue);
  11008. } else if (index === 0) {
  11009. offset = (scale.getPixelForTick(1) - lineValue) / 2;
  11010. } else {
  11011. offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;
  11012. }
  11013. lineValue += validIndex < index ? offset : -offset;
  11014. // Return undefined if the pixel is out of the range
  11015. if (lineValue < start - epsilon || lineValue > end + epsilon) {
  11016. return;
  11017. }
  11018. }
  11019. return lineValue;
  11020. }
  11021. function garbageCollect(caches, length) {
  11022. helpers$1.each(caches, function(cache) {
  11023. var gc = cache.gc;
  11024. var gcLen = gc.length / 2;
  11025. var i;
  11026. if (gcLen > length) {
  11027. for (i = 0; i < gcLen; ++i) {
  11028. delete cache.data[gc[i]];
  11029. }
  11030. gc.splice(0, gcLen);
  11031. }
  11032. });
  11033. }
  11034. /**
  11035. * Returns {width, height, offset} objects for the first, last, widest, highest tick
  11036. * labels where offset indicates the anchor point offset from the top in pixels.
  11037. */
  11038. function computeLabelSizes(ctx, tickFonts, ticks, caches) {
  11039. var length = ticks.length;
  11040. var widths = [];
  11041. var heights = [];
  11042. var offsets = [];
  11043. var widestLabelSize = 0;
  11044. var highestLabelSize = 0;
  11045. var i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel, widest, highest;
  11046. for (i = 0; i < length; ++i) {
  11047. label = ticks[i].label;
  11048. tickFont = ticks[i].major ? tickFonts.major : tickFonts.minor;
  11049. ctx.font = fontString = tickFont.string;
  11050. cache = caches[fontString] = caches[fontString] || {data: {}, gc: []};
  11051. lineHeight = tickFont.lineHeight;
  11052. width = height = 0;
  11053. // Undefined labels and arrays should not be measured
  11054. if (!isNullOrUndef(label) && !isArray(label)) {
  11055. width = helpers$1.measureText(ctx, cache.data, cache.gc, width, label);
  11056. height = lineHeight;
  11057. } else if (isArray(label)) {
  11058. // if it is an array let's measure each element
  11059. for (j = 0, jlen = label.length; j < jlen; ++j) {
  11060. nestedLabel = label[j];
  11061. // Undefined labels and arrays should not be measured
  11062. if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {
  11063. width = helpers$1.measureText(ctx, cache.data, cache.gc, width, nestedLabel);
  11064. height += lineHeight;
  11065. }
  11066. }
  11067. }
  11068. widths.push(width);
  11069. heights.push(height);
  11070. offsets.push(lineHeight / 2);
  11071. widestLabelSize = Math.max(width, widestLabelSize);
  11072. highestLabelSize = Math.max(height, highestLabelSize);
  11073. }
  11074. garbageCollect(caches, length);
  11075. widest = widths.indexOf(widestLabelSize);
  11076. highest = heights.indexOf(highestLabelSize);
  11077. function valueAt(idx) {
  11078. return {
  11079. width: widths[idx] || 0,
  11080. height: heights[idx] || 0,
  11081. offset: offsets[idx] || 0
  11082. };
  11083. }
  11084. return {
  11085. first: valueAt(0),
  11086. last: valueAt(length - 1),
  11087. widest: valueAt(widest),
  11088. highest: valueAt(highest)
  11089. };
  11090. }
  11091. function getTickMarkLength(options) {
  11092. return options.drawTicks ? options.tickMarkLength : 0;
  11093. }
  11094. function getScaleLabelHeight(options) {
  11095. var font, padding;
  11096. if (!options.display) {
  11097. return 0;
  11098. }
  11099. font = helpers$1.options._parseFont(options);
  11100. padding = helpers$1.options.toPadding(options.padding);
  11101. return font.lineHeight + padding.height;
  11102. }
  11103. function parseFontOptions(options, nestedOpts) {
  11104. return helpers$1.extend(helpers$1.options._parseFont({
  11105. fontFamily: valueOrDefault$a(nestedOpts.fontFamily, options.fontFamily),
  11106. fontSize: valueOrDefault$a(nestedOpts.fontSize, options.fontSize),
  11107. fontStyle: valueOrDefault$a(nestedOpts.fontStyle, options.fontStyle),
  11108. lineHeight: valueOrDefault$a(nestedOpts.lineHeight, options.lineHeight)
  11109. }), {
  11110. color: helpers$1.options.resolve([nestedOpts.fontColor, options.fontColor, core_defaults.global.defaultFontColor])
  11111. });
  11112. }
  11113. function parseTickFontOptions(options) {
  11114. var minor = parseFontOptions(options, options.minor);
  11115. var major = options.major.enabled ? parseFontOptions(options, options.major) : minor;
  11116. return {minor: minor, major: major};
  11117. }
  11118. function nonSkipped(ticksToFilter) {
  11119. var filtered = [];
  11120. var item, index, len;
  11121. for (index = 0, len = ticksToFilter.length; index < len; ++index) {
  11122. item = ticksToFilter[index];
  11123. if (typeof item._index !== 'undefined') {
  11124. filtered.push(item);
  11125. }
  11126. }
  11127. return filtered;
  11128. }
  11129. function getEvenSpacing(arr) {
  11130. var len = arr.length;
  11131. var i, diff;
  11132. if (len < 2) {
  11133. return false;
  11134. }
  11135. for (diff = arr[0], i = 1; i < len; ++i) {
  11136. if (arr[i] - arr[i - 1] !== diff) {
  11137. return false;
  11138. }
  11139. }
  11140. return diff;
  11141. }
  11142. function calculateSpacing(majorIndices, ticks, axisLength, ticksLimit) {
  11143. var evenMajorSpacing = getEvenSpacing(majorIndices);
  11144. var spacing = (ticks.length - 1) / ticksLimit;
  11145. var factors, factor, i, ilen;
  11146. // If the major ticks are evenly spaced apart, place the minor ticks
  11147. // so that they divide the major ticks into even chunks
  11148. if (!evenMajorSpacing) {
  11149. return Math.max(spacing, 1);
  11150. }
  11151. factors = helpers$1.math._factorize(evenMajorSpacing);
  11152. for (i = 0, ilen = factors.length - 1; i < ilen; i++) {
  11153. factor = factors[i];
  11154. if (factor > spacing) {
  11155. return factor;
  11156. }
  11157. }
  11158. return Math.max(spacing, 1);
  11159. }
  11160. function getMajorIndices(ticks) {
  11161. var result = [];
  11162. var i, ilen;
  11163. for (i = 0, ilen = ticks.length; i < ilen; i++) {
  11164. if (ticks[i].major) {
  11165. result.push(i);
  11166. }
  11167. }
  11168. return result;
  11169. }
  11170. function skipMajors(ticks, majorIndices, spacing) {
  11171. var count = 0;
  11172. var next = majorIndices[0];
  11173. var i, tick;
  11174. spacing = Math.ceil(spacing);
  11175. for (i = 0; i < ticks.length; i++) {
  11176. tick = ticks[i];
  11177. if (i === next) {
  11178. tick._index = i;
  11179. count++;
  11180. next = majorIndices[count * spacing];
  11181. } else {
  11182. delete tick.label;
  11183. }
  11184. }
  11185. }
  11186. function skip(ticks, spacing, majorStart, majorEnd) {
  11187. var start = valueOrDefault$a(majorStart, 0);
  11188. var end = Math.min(valueOrDefault$a(majorEnd, ticks.length), ticks.length);
  11189. var count = 0;
  11190. var length, i, tick, next;
  11191. spacing = Math.ceil(spacing);
  11192. if (majorEnd) {
  11193. length = majorEnd - majorStart;
  11194. spacing = length / Math.floor(length / spacing);
  11195. }
  11196. next = start;
  11197. while (next < 0) {
  11198. count++;
  11199. next = Math.round(start + count * spacing);
  11200. }
  11201. for (i = Math.max(start, 0); i < end; i++) {
  11202. tick = ticks[i];
  11203. if (i === next) {
  11204. tick._index = i;
  11205. count++;
  11206. next = Math.round(start + count * spacing);
  11207. } else {
  11208. delete tick.label;
  11209. }
  11210. }
  11211. }
  11212. var Scale = core_element.extend({
  11213. zeroLineIndex: 0,
  11214. /**
  11215. * Get the padding needed for the scale
  11216. * @method getPadding
  11217. * @private
  11218. * @returns {Padding} the necessary padding
  11219. */
  11220. getPadding: function() {
  11221. var me = this;
  11222. return {
  11223. left: me.paddingLeft || 0,
  11224. top: me.paddingTop || 0,
  11225. right: me.paddingRight || 0,
  11226. bottom: me.paddingBottom || 0
  11227. };
  11228. },
  11229. /**
  11230. * Returns the scale tick objects ({label, major})
  11231. * @since 2.7
  11232. */
  11233. getTicks: function() {
  11234. return this._ticks;
  11235. },
  11236. /**
  11237. * @private
  11238. */
  11239. _getLabels: function() {
  11240. var data = this.chart.data;
  11241. return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];
  11242. },
  11243. // These methods are ordered by lifecyle. Utilities then follow.
  11244. // Any function defined here is inherited by all scale types.
  11245. // Any function can be extended by the scale type
  11246. /**
  11247. * Provided for backward compatibility, not available anymore
  11248. * @function Chart.Scale.mergeTicksOptions
  11249. * @deprecated since version 2.8.0
  11250. * @todo remove at version 3
  11251. */
  11252. mergeTicksOptions: function() {
  11253. // noop
  11254. },
  11255. beforeUpdate: function() {
  11256. helpers$1.callback(this.options.beforeUpdate, [this]);
  11257. },
  11258. /**
  11259. * @param {number} maxWidth - the max width in pixels
  11260. * @param {number} maxHeight - the max height in pixels
  11261. * @param {object} margins - the space between the edge of the other scales and edge of the chart
  11262. * This space comes from two sources:
  11263. * - padding - space that's required to show the labels at the edges of the scale
  11264. * - thickness of scales or legends in another orientation
  11265. */
  11266. update: function(maxWidth, maxHeight, margins) {
  11267. var me = this;
  11268. var tickOpts = me.options.ticks;
  11269. var sampleSize = tickOpts.sampleSize;
  11270. var i, ilen, labels, ticks, samplingEnabled;
  11271. // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
  11272. me.beforeUpdate();
  11273. // Absorb the master measurements
  11274. me.maxWidth = maxWidth;
  11275. me.maxHeight = maxHeight;
  11276. me.margins = helpers$1.extend({
  11277. left: 0,
  11278. right: 0,
  11279. top: 0,
  11280. bottom: 0
  11281. }, margins);
  11282. me._ticks = null;
  11283. me.ticks = null;
  11284. me._labelSizes = null;
  11285. me._maxLabelLines = 0;
  11286. me.longestLabelWidth = 0;
  11287. me.longestTextCache = me.longestTextCache || {};
  11288. me._gridLineItems = null;
  11289. me._labelItems = null;
  11290. // Dimensions
  11291. me.beforeSetDimensions();
  11292. me.setDimensions();
  11293. me.afterSetDimensions();
  11294. // Data min/max
  11295. me.beforeDataLimits();
  11296. me.determineDataLimits();
  11297. me.afterDataLimits();
  11298. // Ticks - `this.ticks` is now DEPRECATED!
  11299. // Internal ticks are now stored as objects in the PRIVATE `this._ticks` member
  11300. // and must not be accessed directly from outside this class. `this.ticks` being
  11301. // around for long time and not marked as private, we can't change its structure
  11302. // without unexpected breaking changes. If you need to access the scale ticks,
  11303. // use scale.getTicks() instead.
  11304. me.beforeBuildTicks();
  11305. // New implementations should return an array of objects but for BACKWARD COMPAT,
  11306. // we still support no return (`this.ticks` internally set by calling this method).
  11307. ticks = me.buildTicks() || [];
  11308. // Allow modification of ticks in callback.
  11309. ticks = me.afterBuildTicks(ticks) || ticks;
  11310. // Ensure ticks contains ticks in new tick format
  11311. if ((!ticks || !ticks.length) && me.ticks) {
  11312. ticks = [];
  11313. for (i = 0, ilen = me.ticks.length; i < ilen; ++i) {
  11314. ticks.push({
  11315. value: me.ticks[i],
  11316. major: false
  11317. });
  11318. }
  11319. }
  11320. me._ticks = ticks;
  11321. // Compute tick rotation and fit using a sampled subset of labels
  11322. // We generally don't need to compute the size of every single label for determining scale size
  11323. samplingEnabled = sampleSize < ticks.length;
  11324. labels = me._convertTicksToLabels(samplingEnabled ? sample(ticks, sampleSize) : ticks);
  11325. // _configure is called twice, once here, once from core.controller.updateLayout.
  11326. // Here we haven't been positioned yet, but dimensions are correct.
  11327. // Variables set in _configure are needed for calculateTickRotation, and
  11328. // it's ok that coordinates are not correct there, only dimensions matter.
  11329. me._configure();
  11330. // Tick Rotation
  11331. me.beforeCalculateTickRotation();
  11332. me.calculateTickRotation();
  11333. me.afterCalculateTickRotation();
  11334. me.beforeFit();
  11335. me.fit();
  11336. me.afterFit();
  11337. // Auto-skip
  11338. me._ticksToDraw = tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto') ? me._autoSkip(ticks) : ticks;
  11339. if (samplingEnabled) {
  11340. // Generate labels using all non-skipped ticks
  11341. labels = me._convertTicksToLabels(me._ticksToDraw);
  11342. }
  11343. me.ticks = labels; // BACKWARD COMPATIBILITY
  11344. // IMPORTANT: after this point, we consider that `this.ticks` will NEVER change!
  11345. me.afterUpdate();
  11346. // TODO(v3): remove minSize as a public property and return value from all layout boxes. It is unused
  11347. // make maxWidth and maxHeight private
  11348. return me.minSize;
  11349. },
  11350. /**
  11351. * @private
  11352. */
  11353. _configure: function() {
  11354. var me = this;
  11355. var reversePixels = me.options.ticks.reverse;
  11356. var startPixel, endPixel;
  11357. if (me.isHorizontal()) {
  11358. startPixel = me.left;
  11359. endPixel = me.right;
  11360. } else {
  11361. startPixel = me.top;
  11362. endPixel = me.bottom;
  11363. // by default vertical scales are from bottom to top, so pixels are reversed
  11364. reversePixels = !reversePixels;
  11365. }
  11366. me._startPixel = startPixel;
  11367. me._endPixel = endPixel;
  11368. me._reversePixels = reversePixels;
  11369. me._length = endPixel - startPixel;
  11370. },
  11371. afterUpdate: function() {
  11372. helpers$1.callback(this.options.afterUpdate, [this]);
  11373. },
  11374. //
  11375. beforeSetDimensions: function() {
  11376. helpers$1.callback(this.options.beforeSetDimensions, [this]);
  11377. },
  11378. setDimensions: function() {
  11379. var me = this;
  11380. // Set the unconstrained dimension before label rotation
  11381. if (me.isHorizontal()) {
  11382. // Reset position before calculating rotation
  11383. me.width = me.maxWidth;
  11384. me.left = 0;
  11385. me.right = me.width;
  11386. } else {
  11387. me.height = me.maxHeight;
  11388. // Reset position before calculating rotation
  11389. me.top = 0;
  11390. me.bottom = me.height;
  11391. }
  11392. // Reset padding
  11393. me.paddingLeft = 0;
  11394. me.paddingTop = 0;
  11395. me.paddingRight = 0;
  11396. me.paddingBottom = 0;
  11397. },
  11398. afterSetDimensions: function() {
  11399. helpers$1.callback(this.options.afterSetDimensions, [this]);
  11400. },
  11401. // Data limits
  11402. beforeDataLimits: function() {
  11403. helpers$1.callback(this.options.beforeDataLimits, [this]);
  11404. },
  11405. determineDataLimits: helpers$1.noop,
  11406. afterDataLimits: function() {
  11407. helpers$1.callback(this.options.afterDataLimits, [this]);
  11408. },
  11409. //
  11410. beforeBuildTicks: function() {
  11411. helpers$1.callback(this.options.beforeBuildTicks, [this]);
  11412. },
  11413. buildTicks: helpers$1.noop,
  11414. afterBuildTicks: function(ticks) {
  11415. var me = this;
  11416. // ticks is empty for old axis implementations here
  11417. if (isArray(ticks) && ticks.length) {
  11418. return helpers$1.callback(me.options.afterBuildTicks, [me, ticks]);
  11419. }
  11420. // Support old implementations (that modified `this.ticks` directly in buildTicks)
  11421. me.ticks = helpers$1.callback(me.options.afterBuildTicks, [me, me.ticks]) || me.ticks;
  11422. return ticks;
  11423. },
  11424. beforeTickToLabelConversion: function() {
  11425. helpers$1.callback(this.options.beforeTickToLabelConversion, [this]);
  11426. },
  11427. convertTicksToLabels: function() {
  11428. var me = this;
  11429. // Convert ticks to strings
  11430. var tickOpts = me.options.ticks;
  11431. me.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this);
  11432. },
  11433. afterTickToLabelConversion: function() {
  11434. helpers$1.callback(this.options.afterTickToLabelConversion, [this]);
  11435. },
  11436. //
  11437. beforeCalculateTickRotation: function() {
  11438. helpers$1.callback(this.options.beforeCalculateTickRotation, [this]);
  11439. },
  11440. calculateTickRotation: function() {
  11441. var me = this;
  11442. var options = me.options;
  11443. var tickOpts = options.ticks;
  11444. var numTicks = me.getTicks().length;
  11445. var minRotation = tickOpts.minRotation || 0;
  11446. var maxRotation = tickOpts.maxRotation;
  11447. var labelRotation = minRotation;
  11448. var labelSizes, maxLabelWidth, maxLabelHeight, maxWidth, tickWidth, maxHeight, maxLabelDiagonal;
  11449. if (!me._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !me.isHorizontal()) {
  11450. me.labelRotation = minRotation;
  11451. return;
  11452. }
  11453. labelSizes = me._getLabelSizes();
  11454. maxLabelWidth = labelSizes.widest.width;
  11455. maxLabelHeight = labelSizes.highest.height - labelSizes.highest.offset;
  11456. // Estimate the width of each grid based on the canvas width, the maximum
  11457. // label width and the number of tick intervals
  11458. maxWidth = Math.min(me.maxWidth, me.chart.width - maxLabelWidth);
  11459. tickWidth = options.offset ? me.maxWidth / numTicks : maxWidth / (numTicks - 1);
  11460. // Allow 3 pixels x2 padding either side for label readability
  11461. if (maxLabelWidth + 6 > tickWidth) {
  11462. tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));
  11463. maxHeight = me.maxHeight - getTickMarkLength(options.gridLines)
  11464. - tickOpts.padding - getScaleLabelHeight(options.scaleLabel);
  11465. maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);
  11466. labelRotation = helpers$1.toDegrees(Math.min(
  11467. Math.asin(Math.min((labelSizes.highest.height + 6) / tickWidth, 1)),
  11468. Math.asin(Math.min(maxHeight / maxLabelDiagonal, 1)) - Math.asin(maxLabelHeight / maxLabelDiagonal)
  11469. ));
  11470. labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));
  11471. }
  11472. me.labelRotation = labelRotation;
  11473. },
  11474. afterCalculateTickRotation: function() {
  11475. helpers$1.callback(this.options.afterCalculateTickRotation, [this]);
  11476. },
  11477. //
  11478. beforeFit: function() {
  11479. helpers$1.callback(this.options.beforeFit, [this]);
  11480. },
  11481. fit: function() {
  11482. var me = this;
  11483. // Reset
  11484. var minSize = me.minSize = {
  11485. width: 0,
  11486. height: 0
  11487. };
  11488. var chart = me.chart;
  11489. var opts = me.options;
  11490. var tickOpts = opts.ticks;
  11491. var scaleLabelOpts = opts.scaleLabel;
  11492. var gridLineOpts = opts.gridLines;
  11493. var display = me._isVisible();
  11494. var isBottom = opts.position === 'bottom';
  11495. var isHorizontal = me.isHorizontal();
  11496. // Width
  11497. if (isHorizontal) {
  11498. minSize.width = me.maxWidth;
  11499. } else if (display) {
  11500. minSize.width = getTickMarkLength(gridLineOpts) + getScaleLabelHeight(scaleLabelOpts);
  11501. }
  11502. // height
  11503. if (!isHorizontal) {
  11504. minSize.height = me.maxHeight; // fill all the height
  11505. } else if (display) {
  11506. minSize.height = getTickMarkLength(gridLineOpts) + getScaleLabelHeight(scaleLabelOpts);
  11507. }
  11508. // Don't bother fitting the ticks if we are not showing the labels
  11509. if (tickOpts.display && display) {
  11510. var tickFonts = parseTickFontOptions(tickOpts);
  11511. var labelSizes = me._getLabelSizes();
  11512. var firstLabelSize = labelSizes.first;
  11513. var lastLabelSize = labelSizes.last;
  11514. var widestLabelSize = labelSizes.widest;
  11515. var highestLabelSize = labelSizes.highest;
  11516. var lineSpace = tickFonts.minor.lineHeight * 0.4;
  11517. var tickPadding = tickOpts.padding;
  11518. if (isHorizontal) {
  11519. // A horizontal axis is more constrained by the height.
  11520. var isRotated = me.labelRotation !== 0;
  11521. var angleRadians = helpers$1.toRadians(me.labelRotation);
  11522. var cosRotation = Math.cos(angleRadians);
  11523. var sinRotation = Math.sin(angleRadians);
  11524. var labelHeight = sinRotation * widestLabelSize.width
  11525. + cosRotation * (highestLabelSize.height - (isRotated ? highestLabelSize.offset : 0))
  11526. + (isRotated ? 0 : lineSpace); // padding
  11527. minSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding);
  11528. var offsetLeft = me.getPixelForTick(0) - me.left;
  11529. var offsetRight = me.right - me.getPixelForTick(me.getTicks().length - 1);
  11530. var paddingLeft, paddingRight;
  11531. // Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned
  11532. // which means that the right padding is dominated by the font height
  11533. if (isRotated) {
  11534. paddingLeft = isBottom ?
  11535. cosRotation * firstLabelSize.width + sinRotation * firstLabelSize.offset :
  11536. sinRotation * (firstLabelSize.height - firstLabelSize.offset);
  11537. paddingRight = isBottom ?
  11538. sinRotation * (lastLabelSize.height - lastLabelSize.offset) :
  11539. cosRotation * lastLabelSize.width + sinRotation * lastLabelSize.offset;
  11540. } else {
  11541. paddingLeft = firstLabelSize.width / 2;
  11542. paddingRight = lastLabelSize.width / 2;
  11543. }
  11544. // Adjust padding taking into account changes in offsets
  11545. // and add 3 px to move away from canvas edges
  11546. me.paddingLeft = Math.max((paddingLeft - offsetLeft) * me.width / (me.width - offsetLeft), 0) + 3;
  11547. me.paddingRight = Math.max((paddingRight - offsetRight) * me.width / (me.width - offsetRight), 0) + 3;
  11548. } else {
  11549. // A vertical axis is more constrained by the width. Labels are the
  11550. // dominant factor here, so get that length first and account for padding
  11551. var labelWidth = tickOpts.mirror ? 0 :
  11552. // use lineSpace for consistency with horizontal axis
  11553. // tickPadding is not implemented for horizontal
  11554. widestLabelSize.width + tickPadding + lineSpace;
  11555. minSize.width = Math.min(me.maxWidth, minSize.width + labelWidth);
  11556. me.paddingTop = firstLabelSize.height / 2;
  11557. me.paddingBottom = lastLabelSize.height / 2;
  11558. }
  11559. }
  11560. me.handleMargins();
  11561. if (isHorizontal) {
  11562. me.width = me._length = chart.width - me.margins.left - me.margins.right;
  11563. me.height = minSize.height;
  11564. } else {
  11565. me.width = minSize.width;
  11566. me.height = me._length = chart.height - me.margins.top - me.margins.bottom;
  11567. }
  11568. },
  11569. /**
  11570. * Handle margins and padding interactions
  11571. * @private
  11572. */
  11573. handleMargins: function() {
  11574. var me = this;
  11575. if (me.margins) {
  11576. me.margins.left = Math.max(me.paddingLeft, me.margins.left);
  11577. me.margins.top = Math.max(me.paddingTop, me.margins.top);
  11578. me.margins.right = Math.max(me.paddingRight, me.margins.right);
  11579. me.margins.bottom = Math.max(me.paddingBottom, me.margins.bottom);
  11580. }
  11581. },
  11582. afterFit: function() {
  11583. helpers$1.callback(this.options.afterFit, [this]);
  11584. },
  11585. // Shared Methods
  11586. isHorizontal: function() {
  11587. var pos = this.options.position;
  11588. return pos === 'top' || pos === 'bottom';
  11589. },
  11590. isFullWidth: function() {
  11591. return this.options.fullWidth;
  11592. },
  11593. // Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not
  11594. getRightValue: function(rawValue) {
  11595. // Null and undefined values first
  11596. if (isNullOrUndef(rawValue)) {
  11597. return NaN;
  11598. }
  11599. // isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values
  11600. if ((typeof rawValue === 'number' || rawValue instanceof Number) && !isFinite(rawValue)) {
  11601. return NaN;
  11602. }
  11603. // If it is in fact an object, dive in one more level
  11604. if (rawValue) {
  11605. if (this.isHorizontal()) {
  11606. if (rawValue.x !== undefined) {
  11607. return this.getRightValue(rawValue.x);
  11608. }
  11609. } else if (rawValue.y !== undefined) {
  11610. return this.getRightValue(rawValue.y);
  11611. }
  11612. }
  11613. // Value is good, return it
  11614. return rawValue;
  11615. },
  11616. _convertTicksToLabels: function(ticks) {
  11617. var me = this;
  11618. var labels, i, ilen;
  11619. me.ticks = ticks.map(function(tick) {
  11620. return tick.value;
  11621. });
  11622. me.beforeTickToLabelConversion();
  11623. // New implementations should return the formatted tick labels but for BACKWARD
  11624. // COMPAT, we still support no return (`this.ticks` internally changed by calling
  11625. // this method and supposed to contain only string values).
  11626. labels = me.convertTicksToLabels(ticks) || me.ticks;
  11627. me.afterTickToLabelConversion();
  11628. // BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`)
  11629. for (i = 0, ilen = ticks.length; i < ilen; ++i) {
  11630. ticks[i].label = labels[i];
  11631. }
  11632. return labels;
  11633. },
  11634. /**
  11635. * @private
  11636. */
  11637. _getLabelSizes: function() {
  11638. var me = this;
  11639. var labelSizes = me._labelSizes;
  11640. if (!labelSizes) {
  11641. me._labelSizes = labelSizes = computeLabelSizes(me.ctx, parseTickFontOptions(me.options.ticks), me.getTicks(), me.longestTextCache);
  11642. me.longestLabelWidth = labelSizes.widest.width;
  11643. }
  11644. return labelSizes;
  11645. },
  11646. /**
  11647. * @private
  11648. */
  11649. _parseValue: function(value) {
  11650. var start, end, min, max;
  11651. if (isArray(value)) {
  11652. start = +this.getRightValue(value[0]);
  11653. end = +this.getRightValue(value[1]);
  11654. min = Math.min(start, end);
  11655. max = Math.max(start, end);
  11656. } else {
  11657. value = +this.getRightValue(value);
  11658. start = undefined;
  11659. end = value;
  11660. min = value;
  11661. max = value;
  11662. }
  11663. return {
  11664. min: min,
  11665. max: max,
  11666. start: start,
  11667. end: end
  11668. };
  11669. },
  11670. /**
  11671. * @private
  11672. */
  11673. _getScaleLabel: function(rawValue) {
  11674. var v = this._parseValue(rawValue);
  11675. if (v.start !== undefined) {
  11676. return '[' + v.start + ', ' + v.end + ']';
  11677. }
  11678. return +this.getRightValue(rawValue);
  11679. },
  11680. /**
  11681. * Used to get the value to display in the tooltip for the data at the given index
  11682. * @param index
  11683. * @param datasetIndex
  11684. */
  11685. getLabelForIndex: helpers$1.noop,
  11686. /**
  11687. * Returns the location of the given data point. Value can either be an index or a numerical value
  11688. * The coordinate (0, 0) is at the upper-left corner of the canvas
  11689. * @param value
  11690. * @param index
  11691. * @param datasetIndex
  11692. */
  11693. getPixelForValue: helpers$1.noop,
  11694. /**
  11695. * Used to get the data value from a given pixel. This is the inverse of getPixelForValue
  11696. * The coordinate (0, 0) is at the upper-left corner of the canvas
  11697. * @param pixel
  11698. */
  11699. getValueForPixel: helpers$1.noop,
  11700. /**
  11701. * Returns the location of the tick at the given index
  11702. * The coordinate (0, 0) is at the upper-left corner of the canvas
  11703. */
  11704. getPixelForTick: function(index) {
  11705. var me = this;
  11706. var offset = me.options.offset;
  11707. var numTicks = me._ticks.length;
  11708. var tickWidth = 1 / Math.max(numTicks - (offset ? 0 : 1), 1);
  11709. return index < 0 || index > numTicks - 1
  11710. ? null
  11711. : me.getPixelForDecimal(index * tickWidth + (offset ? tickWidth / 2 : 0));
  11712. },
  11713. /**
  11714. * Utility for getting the pixel location of a percentage of scale
  11715. * The coordinate (0, 0) is at the upper-left corner of the canvas
  11716. */
  11717. getPixelForDecimal: function(decimal) {
  11718. var me = this;
  11719. if (me._reversePixels) {
  11720. decimal = 1 - decimal;
  11721. }
  11722. return me._startPixel + decimal * me._length;
  11723. },
  11724. getDecimalForPixel: function(pixel) {
  11725. var decimal = (pixel - this._startPixel) / this._length;
  11726. return this._reversePixels ? 1 - decimal : decimal;
  11727. },
  11728. /**
  11729. * Returns the pixel for the minimum chart value
  11730. * The coordinate (0, 0) is at the upper-left corner of the canvas
  11731. */
  11732. getBasePixel: function() {
  11733. return this.getPixelForValue(this.getBaseValue());
  11734. },
  11735. getBaseValue: function() {
  11736. var me = this;
  11737. var min = me.min;
  11738. var max = me.max;
  11739. return me.beginAtZero ? 0 :
  11740. min < 0 && max < 0 ? max :
  11741. min > 0 && max > 0 ? min :
  11742. 0;
  11743. },
  11744. /**
  11745. * Returns a subset of ticks to be plotted to avoid overlapping labels.
  11746. * @private
  11747. */
  11748. _autoSkip: function(ticks) {
  11749. var me = this;
  11750. var tickOpts = me.options.ticks;
  11751. var axisLength = me._length;
  11752. var ticksLimit = tickOpts.maxTicksLimit || axisLength / me._tickSize() + 1;
  11753. var majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];
  11754. var numMajorIndices = majorIndices.length;
  11755. var first = majorIndices[0];
  11756. var last = majorIndices[numMajorIndices - 1];
  11757. var i, ilen, spacing, avgMajorSpacing;
  11758. // If there are too many major ticks to display them all
  11759. if (numMajorIndices > ticksLimit) {
  11760. skipMajors(ticks, majorIndices, numMajorIndices / ticksLimit);
  11761. return nonSkipped(ticks);
  11762. }
  11763. spacing = calculateSpacing(majorIndices, ticks, axisLength, ticksLimit);
  11764. if (numMajorIndices > 0) {
  11765. for (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {
  11766. skip(ticks, spacing, majorIndices[i], majorIndices[i + 1]);
  11767. }
  11768. avgMajorSpacing = numMajorIndices > 1 ? (last - first) / (numMajorIndices - 1) : null;
  11769. skip(ticks, spacing, helpers$1.isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);
  11770. skip(ticks, spacing, last, helpers$1.isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);
  11771. return nonSkipped(ticks);
  11772. }
  11773. skip(ticks, spacing);
  11774. return nonSkipped(ticks);
  11775. },
  11776. /**
  11777. * @private
  11778. */
  11779. _tickSize: function() {
  11780. var me = this;
  11781. var optionTicks = me.options.ticks;
  11782. // Calculate space needed by label in axis direction.
  11783. var rot = helpers$1.toRadians(me.labelRotation);
  11784. var cos = Math.abs(Math.cos(rot));
  11785. var sin = Math.abs(Math.sin(rot));
  11786. var labelSizes = me._getLabelSizes();
  11787. var padding = optionTicks.autoSkipPadding || 0;
  11788. var w = labelSizes ? labelSizes.widest.width + padding : 0;
  11789. var h = labelSizes ? labelSizes.highest.height + padding : 0;
  11790. // Calculate space needed for 1 tick in axis direction.
  11791. return me.isHorizontal()
  11792. ? h * cos > w * sin ? w / cos : h / sin
  11793. : h * sin < w * cos ? h / cos : w / sin;
  11794. },
  11795. /**
  11796. * @private
  11797. */
  11798. _isVisible: function() {
  11799. var me = this;
  11800. var chart = me.chart;
  11801. var display = me.options.display;
  11802. var i, ilen, meta;
  11803. if (display !== 'auto') {
  11804. return !!display;
  11805. }
  11806. // When 'auto', the scale is visible if at least one associated dataset is visible.
  11807. for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {
  11808. if (chart.isDatasetVisible(i)) {
  11809. meta = chart.getDatasetMeta(i);
  11810. if (meta.xAxisID === me.id || meta.yAxisID === me.id) {
  11811. return true;
  11812. }
  11813. }
  11814. }
  11815. return false;
  11816. },
  11817. /**
  11818. * @private
  11819. */
  11820. _computeGridLineItems: function(chartArea) {
  11821. var me = this;
  11822. var chart = me.chart;
  11823. var options = me.options;
  11824. var gridLines = options.gridLines;
  11825. var position = options.position;
  11826. var offsetGridLines = gridLines.offsetGridLines;
  11827. var isHorizontal = me.isHorizontal();
  11828. var ticks = me._ticksToDraw;
  11829. var ticksLength = ticks.length + (offsetGridLines ? 1 : 0);
  11830. var tl = getTickMarkLength(gridLines);
  11831. var items = [];
  11832. var axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;
  11833. var axisHalfWidth = axisWidth / 2;
  11834. var alignPixel = helpers$1._alignPixel;
  11835. var alignBorderValue = function(pixel) {
  11836. return alignPixel(chart, pixel, axisWidth);
  11837. };
  11838. var borderValue, i, tick, lineValue, alignedLineValue;
  11839. var tx1, ty1, tx2, ty2, x1, y1, x2, y2, lineWidth, lineColor, borderDash, borderDashOffset;
  11840. if (position === 'top') {
  11841. borderValue = alignBorderValue(me.bottom);
  11842. ty1 = me.bottom - tl;
  11843. ty2 = borderValue - axisHalfWidth;
  11844. y1 = alignBorderValue(chartArea.top) + axisHalfWidth;
  11845. y2 = chartArea.bottom;
  11846. } else if (position === 'bottom') {
  11847. borderValue = alignBorderValue(me.top);
  11848. y1 = chartArea.top;
  11849. y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;
  11850. ty1 = borderValue + axisHalfWidth;
  11851. ty2 = me.top + tl;
  11852. } else if (position === 'left') {
  11853. borderValue = alignBorderValue(me.right);
  11854. tx1 = me.right - tl;
  11855. tx2 = borderValue - axisHalfWidth;
  11856. x1 = alignBorderValue(chartArea.left) + axisHalfWidth;
  11857. x2 = chartArea.right;
  11858. } else {
  11859. borderValue = alignBorderValue(me.left);
  11860. x1 = chartArea.left;
  11861. x2 = alignBorderValue(chartArea.right) - axisHalfWidth;
  11862. tx1 = borderValue + axisHalfWidth;
  11863. tx2 = me.left + tl;
  11864. }
  11865. for (i = 0; i < ticksLength; ++i) {
  11866. tick = ticks[i] || {};
  11867. // autoskipper skipped this tick (#4635)
  11868. if (isNullOrUndef(tick.label) && i < ticks.length) {
  11869. continue;
  11870. }
  11871. if (i === me.zeroLineIndex && options.offset === offsetGridLines) {
  11872. // Draw the first index specially
  11873. lineWidth = gridLines.zeroLineWidth;
  11874. lineColor = gridLines.zeroLineColor;
  11875. borderDash = gridLines.zeroLineBorderDash || [];
  11876. borderDashOffset = gridLines.zeroLineBorderDashOffset || 0.0;
  11877. } else {
  11878. lineWidth = valueAtIndexOrDefault(gridLines.lineWidth, i, 1);
  11879. lineColor = valueAtIndexOrDefault(gridLines.color, i, 'rgba(0,0,0,0.1)');
  11880. borderDash = gridLines.borderDash || [];
  11881. borderDashOffset = gridLines.borderDashOffset || 0.0;
  11882. }
  11883. lineValue = getPixelForGridLine(me, tick._index || i, offsetGridLines);
  11884. // Skip if the pixel is out of the range
  11885. if (lineValue === undefined) {
  11886. continue;
  11887. }
  11888. alignedLineValue = alignPixel(chart, lineValue, lineWidth);
  11889. if (isHorizontal) {
  11890. tx1 = tx2 = x1 = x2 = alignedLineValue;
  11891. } else {
  11892. ty1 = ty2 = y1 = y2 = alignedLineValue;
  11893. }
  11894. items.push({
  11895. tx1: tx1,
  11896. ty1: ty1,
  11897. tx2: tx2,
  11898. ty2: ty2,
  11899. x1: x1,
  11900. y1: y1,
  11901. x2: x2,
  11902. y2: y2,
  11903. width: lineWidth,
  11904. color: lineColor,
  11905. borderDash: borderDash,
  11906. borderDashOffset: borderDashOffset,
  11907. });
  11908. }
  11909. items.ticksLength = ticksLength;
  11910. items.borderValue = borderValue;
  11911. return items;
  11912. },
  11913. /**
  11914. * @private
  11915. */
  11916. _computeLabelItems: function() {
  11917. var me = this;
  11918. var options = me.options;
  11919. var optionTicks = options.ticks;
  11920. var position = options.position;
  11921. var isMirrored = optionTicks.mirror;
  11922. var isHorizontal = me.isHorizontal();
  11923. var ticks = me._ticksToDraw;
  11924. var fonts = parseTickFontOptions(optionTicks);
  11925. var tickPadding = optionTicks.padding;
  11926. var tl = getTickMarkLength(options.gridLines);
  11927. var rotation = -helpers$1.toRadians(me.labelRotation);
  11928. var items = [];
  11929. var i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;
  11930. if (position === 'top') {
  11931. y = me.bottom - tl - tickPadding;
  11932. textAlign = !rotation ? 'center' : 'left';
  11933. } else if (position === 'bottom') {
  11934. y = me.top + tl + tickPadding;
  11935. textAlign = !rotation ? 'center' : 'right';
  11936. } else if (position === 'left') {
  11937. x = me.right - (isMirrored ? 0 : tl) - tickPadding;
  11938. textAlign = isMirrored ? 'left' : 'right';
  11939. } else {
  11940. x = me.left + (isMirrored ? 0 : tl) + tickPadding;
  11941. textAlign = isMirrored ? 'right' : 'left';
  11942. }
  11943. for (i = 0, ilen = ticks.length; i < ilen; ++i) {
  11944. tick = ticks[i];
  11945. label = tick.label;
  11946. // autoskipper skipped this tick (#4635)
  11947. if (isNullOrUndef(label)) {
  11948. continue;
  11949. }
  11950. pixel = me.getPixelForTick(tick._index || i) + optionTicks.labelOffset;
  11951. font = tick.major ? fonts.major : fonts.minor;
  11952. lineHeight = font.lineHeight;
  11953. lineCount = isArray(label) ? label.length : 1;
  11954. if (isHorizontal) {
  11955. x = pixel;
  11956. textOffset = position === 'top'
  11957. ? ((!rotation ? 0.5 : 1) - lineCount) * lineHeight
  11958. : (!rotation ? 0.5 : 0) * lineHeight;
  11959. } else {
  11960. y = pixel;
  11961. textOffset = (1 - lineCount) * lineHeight / 2;
  11962. }
  11963. items.push({
  11964. x: x,
  11965. y: y,
  11966. rotation: rotation,
  11967. label: label,
  11968. font: font,
  11969. textOffset: textOffset,
  11970. textAlign: textAlign
  11971. });
  11972. }
  11973. return items;
  11974. },
  11975. /**
  11976. * @private
  11977. */
  11978. _drawGrid: function(chartArea) {
  11979. var me = this;
  11980. var gridLines = me.options.gridLines;
  11981. if (!gridLines.display) {
  11982. return;
  11983. }
  11984. var ctx = me.ctx;
  11985. var chart = me.chart;
  11986. var alignPixel = helpers$1._alignPixel;
  11987. var axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;
  11988. var items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));
  11989. var width, color, i, ilen, item;
  11990. for (i = 0, ilen = items.length; i < ilen; ++i) {
  11991. item = items[i];
  11992. width = item.width;
  11993. color = item.color;
  11994. if (width && color) {
  11995. ctx.save();
  11996. ctx.lineWidth = width;
  11997. ctx.strokeStyle = color;
  11998. if (ctx.setLineDash) {
  11999. ctx.setLineDash(item.borderDash);
  12000. ctx.lineDashOffset = item.borderDashOffset;
  12001. }
  12002. ctx.beginPath();
  12003. if (gridLines.drawTicks) {
  12004. ctx.moveTo(item.tx1, item.ty1);
  12005. ctx.lineTo(item.tx2, item.ty2);
  12006. }
  12007. if (gridLines.drawOnChartArea) {
  12008. ctx.moveTo(item.x1, item.y1);
  12009. ctx.lineTo(item.x2, item.y2);
  12010. }
  12011. ctx.stroke();
  12012. ctx.restore();
  12013. }
  12014. }
  12015. if (axisWidth) {
  12016. // Draw the line at the edge of the axis
  12017. var firstLineWidth = axisWidth;
  12018. var lastLineWidth = valueAtIndexOrDefault(gridLines.lineWidth, items.ticksLength - 1, 1);
  12019. var borderValue = items.borderValue;
  12020. var x1, x2, y1, y2;
  12021. if (me.isHorizontal()) {
  12022. x1 = alignPixel(chart, me.left, firstLineWidth) - firstLineWidth / 2;
  12023. x2 = alignPixel(chart, me.right, lastLineWidth) + lastLineWidth / 2;
  12024. y1 = y2 = borderValue;
  12025. } else {
  12026. y1 = alignPixel(chart, me.top, firstLineWidth) - firstLineWidth / 2;
  12027. y2 = alignPixel(chart, me.bottom, lastLineWidth) + lastLineWidth / 2;
  12028. x1 = x2 = borderValue;
  12029. }
  12030. ctx.lineWidth = axisWidth;
  12031. ctx.strokeStyle = valueAtIndexOrDefault(gridLines.color, 0);
  12032. ctx.beginPath();
  12033. ctx.moveTo(x1, y1);
  12034. ctx.lineTo(x2, y2);
  12035. ctx.stroke();
  12036. }
  12037. },
  12038. /**
  12039. * @private
  12040. */
  12041. _drawLabels: function() {
  12042. var me = this;
  12043. var optionTicks = me.options.ticks;
  12044. if (!optionTicks.display) {
  12045. return;
  12046. }
  12047. var ctx = me.ctx;
  12048. var items = me._labelItems || (me._labelItems = me._computeLabelItems());
  12049. var i, j, ilen, jlen, item, tickFont, label, y;
  12050. for (i = 0, ilen = items.length; i < ilen; ++i) {
  12051. item = items[i];
  12052. tickFont = item.font;
  12053. // Make sure we draw text in the correct color and font
  12054. ctx.save();
  12055. ctx.translate(item.x, item.y);
  12056. ctx.rotate(item.rotation);
  12057. ctx.font = tickFont.string;
  12058. ctx.fillStyle = tickFont.color;
  12059. ctx.textBaseline = 'middle';
  12060. ctx.textAlign = item.textAlign;
  12061. label = item.label;
  12062. y = item.textOffset;
  12063. if (isArray(label)) {
  12064. for (j = 0, jlen = label.length; j < jlen; ++j) {
  12065. // We just make sure the multiline element is a string here..
  12066. ctx.fillText('' + label[j], 0, y);
  12067. y += tickFont.lineHeight;
  12068. }
  12069. } else {
  12070. ctx.fillText(label, 0, y);
  12071. }
  12072. ctx.restore();
  12073. }
  12074. },
  12075. /**
  12076. * @private
  12077. */
  12078. _drawTitle: function() {
  12079. var me = this;
  12080. var ctx = me.ctx;
  12081. var options = me.options;
  12082. var scaleLabel = options.scaleLabel;
  12083. if (!scaleLabel.display) {
  12084. return;
  12085. }
  12086. var scaleLabelFontColor = valueOrDefault$a(scaleLabel.fontColor, core_defaults.global.defaultFontColor);
  12087. var scaleLabelFont = helpers$1.options._parseFont(scaleLabel);
  12088. var scaleLabelPadding = helpers$1.options.toPadding(scaleLabel.padding);
  12089. var halfLineHeight = scaleLabelFont.lineHeight / 2;
  12090. var position = options.position;
  12091. var rotation = 0;
  12092. var scaleLabelX, scaleLabelY;
  12093. if (me.isHorizontal()) {
  12094. scaleLabelX = me.left + me.width / 2; // midpoint of the width
  12095. scaleLabelY = position === 'bottom'
  12096. ? me.bottom - halfLineHeight - scaleLabelPadding.bottom
  12097. : me.top + halfLineHeight + scaleLabelPadding.top;
  12098. } else {
  12099. var isLeft = position === 'left';
  12100. scaleLabelX = isLeft
  12101. ? me.left + halfLineHeight + scaleLabelPadding.top
  12102. : me.right - halfLineHeight - scaleLabelPadding.top;
  12103. scaleLabelY = me.top + me.height / 2;
  12104. rotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;
  12105. }
  12106. ctx.save();
  12107. ctx.translate(scaleLabelX, scaleLabelY);
  12108. ctx.rotate(rotation);
  12109. ctx.textAlign = 'center';
  12110. ctx.textBaseline = 'middle';
  12111. ctx.fillStyle = scaleLabelFontColor; // render in correct colour
  12112. ctx.font = scaleLabelFont.string;
  12113. ctx.fillText(scaleLabel.labelString, 0, 0);
  12114. ctx.restore();
  12115. },
  12116. draw: function(chartArea) {
  12117. var me = this;
  12118. if (!me._isVisible()) {
  12119. return;
  12120. }
  12121. me._drawGrid(chartArea);
  12122. me._drawTitle();
  12123. me._drawLabels();
  12124. },
  12125. /**
  12126. * @private
  12127. */
  12128. _layers: function() {
  12129. var me = this;
  12130. var opts = me.options;
  12131. var tz = opts.ticks && opts.ticks.z || 0;
  12132. var gz = opts.gridLines && opts.gridLines.z || 0;
  12133. if (!me._isVisible() || tz === gz || me.draw !== me._draw) {
  12134. // backward compatibility: draw has been overridden by custom scale
  12135. return [{
  12136. z: tz,
  12137. draw: function() {
  12138. me.draw.apply(me, arguments);
  12139. }
  12140. }];
  12141. }
  12142. return [{
  12143. z: gz,
  12144. draw: function() {
  12145. me._drawGrid.apply(me, arguments);
  12146. me._drawTitle.apply(me, arguments);
  12147. }
  12148. }, {
  12149. z: tz,
  12150. draw: function() {
  12151. me._drawLabels.apply(me, arguments);
  12152. }
  12153. }];
  12154. },
  12155. /**
  12156. * @private
  12157. */
  12158. _getMatchingVisibleMetas: function(type) {
  12159. var me = this;
  12160. var isHorizontal = me.isHorizontal();
  12161. return me.chart._getSortedVisibleDatasetMetas()
  12162. .filter(function(meta) {
  12163. return (!type || meta.type === type)
  12164. && (isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id);
  12165. });
  12166. }
  12167. });
  12168. Scale.prototype._draw = Scale.prototype.draw;
  12169. var core_scale = Scale;
  12170. var isNullOrUndef$1 = helpers$1.isNullOrUndef;
  12171. var defaultConfig = {
  12172. position: 'bottom'
  12173. };
  12174. var scale_category = core_scale.extend({
  12175. determineDataLimits: function() {
  12176. var me = this;
  12177. var labels = me._getLabels();
  12178. var ticksOpts = me.options.ticks;
  12179. var min = ticksOpts.min;
  12180. var max = ticksOpts.max;
  12181. var minIndex = 0;
  12182. var maxIndex = labels.length - 1;
  12183. var findIndex;
  12184. if (min !== undefined) {
  12185. // user specified min value
  12186. findIndex = labels.indexOf(min);
  12187. if (findIndex >= 0) {
  12188. minIndex = findIndex;
  12189. }
  12190. }
  12191. if (max !== undefined) {
  12192. // user specified max value
  12193. findIndex = labels.indexOf(max);
  12194. if (findIndex >= 0) {
  12195. maxIndex = findIndex;
  12196. }
  12197. }
  12198. me.minIndex = minIndex;
  12199. me.maxIndex = maxIndex;
  12200. me.min = labels[minIndex];
  12201. me.max = labels[maxIndex];
  12202. },
  12203. buildTicks: function() {
  12204. var me = this;
  12205. var labels = me._getLabels();
  12206. var minIndex = me.minIndex;
  12207. var maxIndex = me.maxIndex;
  12208. // If we are viewing some subset of labels, slice the original array
  12209. me.ticks = (minIndex === 0 && maxIndex === labels.length - 1) ? labels : labels.slice(minIndex, maxIndex + 1);
  12210. },
  12211. getLabelForIndex: function(index, datasetIndex) {
  12212. var me = this;
  12213. var chart = me.chart;
  12214. if (chart.getDatasetMeta(datasetIndex).controller._getValueScaleId() === me.id) {
  12215. return me.getRightValue(chart.data.datasets[datasetIndex].data[index]);
  12216. }
  12217. return me._getLabels()[index];
  12218. },
  12219. _configure: function() {
  12220. var me = this;
  12221. var offset = me.options.offset;
  12222. var ticks = me.ticks;
  12223. core_scale.prototype._configure.call(me);
  12224. if (!me.isHorizontal()) {
  12225. // For backward compatibility, vertical category scale reverse is inverted.
  12226. me._reversePixels = !me._reversePixels;
  12227. }
  12228. if (!ticks) {
  12229. return;
  12230. }
  12231. me._startValue = me.minIndex - (offset ? 0.5 : 0);
  12232. me._valueRange = Math.max(ticks.length - (offset ? 0 : 1), 1);
  12233. },
  12234. // Used to get data value locations. Value can either be an index or a numerical value
  12235. getPixelForValue: function(value, index, datasetIndex) {
  12236. var me = this;
  12237. var valueCategory, labels, idx;
  12238. if (!isNullOrUndef$1(index) && !isNullOrUndef$1(datasetIndex)) {
  12239. value = me.chart.data.datasets[datasetIndex].data[index];
  12240. }
  12241. // If value is a data object, then index is the index in the data array,
  12242. // not the index of the scale. We need to change that.
  12243. if (!isNullOrUndef$1(value)) {
  12244. valueCategory = me.isHorizontal() ? value.x : value.y;
  12245. }
  12246. if (valueCategory !== undefined || (value !== undefined && isNaN(index))) {
  12247. labels = me._getLabels();
  12248. value = helpers$1.valueOrDefault(valueCategory, value);
  12249. idx = labels.indexOf(value);
  12250. index = idx !== -1 ? idx : index;
  12251. if (isNaN(index)) {
  12252. index = value;
  12253. }
  12254. }
  12255. return me.getPixelForDecimal((index - me._startValue) / me._valueRange);
  12256. },
  12257. getPixelForTick: function(index) {
  12258. var ticks = this.ticks;
  12259. return index < 0 || index > ticks.length - 1
  12260. ? null
  12261. : this.getPixelForValue(ticks[index], index + this.minIndex);
  12262. },
  12263. getValueForPixel: function(pixel) {
  12264. var me = this;
  12265. var value = Math.round(me._startValue + me.getDecimalForPixel(pixel) * me._valueRange);
  12266. return Math.min(Math.max(value, 0), me.ticks.length - 1);
  12267. },
  12268. getBasePixel: function() {
  12269. return this.bottom;
  12270. }
  12271. });
  12272. // INTERNAL: static default options, registered in src/index.js
  12273. var _defaults = defaultConfig;
  12274. scale_category._defaults = _defaults;
  12275. var noop = helpers$1.noop;
  12276. var isNullOrUndef$2 = helpers$1.isNullOrUndef;
  12277. /**
  12278. * Generate a set of linear ticks
  12279. * @param generationOptions the options used to generate the ticks
  12280. * @param dataRange the range of the data
  12281. * @returns {number[]} array of tick values
  12282. */
  12283. function generateTicks(generationOptions, dataRange) {
  12284. var ticks = [];
  12285. // To get a "nice" value for the tick spacing, we will use the appropriately named
  12286. // "nice number" algorithm. See https://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
  12287. // for details.
  12288. var MIN_SPACING = 1e-14;
  12289. var stepSize = generationOptions.stepSize;
  12290. var unit = stepSize || 1;
  12291. var maxNumSpaces = generationOptions.maxTicks - 1;
  12292. var min = generationOptions.min;
  12293. var max = generationOptions.max;
  12294. var precision = generationOptions.precision;
  12295. var rmin = dataRange.min;
  12296. var rmax = dataRange.max;
  12297. var spacing = helpers$1.niceNum((rmax - rmin) / maxNumSpaces / unit) * unit;
  12298. var factor, niceMin, niceMax, numSpaces;
  12299. // Beyond MIN_SPACING floating point numbers being to lose precision
  12300. // such that we can't do the math necessary to generate ticks
  12301. if (spacing < MIN_SPACING && isNullOrUndef$2(min) && isNullOrUndef$2(max)) {
  12302. return [rmin, rmax];
  12303. }
  12304. numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);
  12305. if (numSpaces > maxNumSpaces) {
  12306. // If the calculated num of spaces exceeds maxNumSpaces, recalculate it
  12307. spacing = helpers$1.niceNum(numSpaces * spacing / maxNumSpaces / unit) * unit;
  12308. }
  12309. if (stepSize || isNullOrUndef$2(precision)) {
  12310. // If a precision is not specified, calculate factor based on spacing
  12311. factor = Math.pow(10, helpers$1._decimalPlaces(spacing));
  12312. } else {
  12313. // If the user specified a precision, round to that number of decimal places
  12314. factor = Math.pow(10, precision);
  12315. spacing = Math.ceil(spacing * factor) / factor;
  12316. }
  12317. niceMin = Math.floor(rmin / spacing) * spacing;
  12318. niceMax = Math.ceil(rmax / spacing) * spacing;
  12319. // If min, max and stepSize is set and they make an evenly spaced scale use it.
  12320. if (stepSize) {
  12321. // If very close to our whole number, use it.
  12322. if (!isNullOrUndef$2(min) && helpers$1.almostWhole(min / spacing, spacing / 1000)) {
  12323. niceMin = min;
  12324. }
  12325. if (!isNullOrUndef$2(max) && helpers$1.almostWhole(max / spacing, spacing / 1000)) {
  12326. niceMax = max;
  12327. }
  12328. }
  12329. numSpaces = (niceMax - niceMin) / spacing;
  12330. // If very close to our rounded value, use it.
  12331. if (helpers$1.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {
  12332. numSpaces = Math.round(numSpaces);
  12333. } else {
  12334. numSpaces = Math.ceil(numSpaces);
  12335. }
  12336. niceMin = Math.round(niceMin * factor) / factor;
  12337. niceMax = Math.round(niceMax * factor) / factor;
  12338. ticks.push(isNullOrUndef$2(min) ? niceMin : min);
  12339. for (var j = 1; j < numSpaces; ++j) {
  12340. ticks.push(Math.round((niceMin + j * spacing) * factor) / factor);
  12341. }
  12342. ticks.push(isNullOrUndef$2(max) ? niceMax : max);
  12343. return ticks;
  12344. }
  12345. var scale_linearbase = core_scale.extend({
  12346. getRightValue: function(value) {
  12347. if (typeof value === 'string') {
  12348. return +value;
  12349. }
  12350. return core_scale.prototype.getRightValue.call(this, value);
  12351. },
  12352. handleTickRangeOptions: function() {
  12353. var me = this;
  12354. var opts = me.options;
  12355. var tickOpts = opts.ticks;
  12356. // If we are forcing it to begin at 0, but 0 will already be rendered on the chart,
  12357. // do nothing since that would make the chart weird. If the user really wants a weird chart
  12358. // axis, they can manually override it
  12359. if (tickOpts.beginAtZero) {
  12360. var minSign = helpers$1.sign(me.min);
  12361. var maxSign = helpers$1.sign(me.max);
  12362. if (minSign < 0 && maxSign < 0) {
  12363. // move the top up to 0
  12364. me.max = 0;
  12365. } else if (minSign > 0 && maxSign > 0) {
  12366. // move the bottom down to 0
  12367. me.min = 0;
  12368. }
  12369. }
  12370. var setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined;
  12371. var setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined;
  12372. if (tickOpts.min !== undefined) {
  12373. me.min = tickOpts.min;
  12374. } else if (tickOpts.suggestedMin !== undefined) {
  12375. if (me.min === null) {
  12376. me.min = tickOpts.suggestedMin;
  12377. } else {
  12378. me.min = Math.min(me.min, tickOpts.suggestedMin);
  12379. }
  12380. }
  12381. if (tickOpts.max !== undefined) {
  12382. me.max = tickOpts.max;
  12383. } else if (tickOpts.suggestedMax !== undefined) {
  12384. if (me.max === null) {
  12385. me.max = tickOpts.suggestedMax;
  12386. } else {
  12387. me.max = Math.max(me.max, tickOpts.suggestedMax);
  12388. }
  12389. }
  12390. if (setMin !== setMax) {
  12391. // We set the min or the max but not both.
  12392. // So ensure that our range is good
  12393. // Inverted or 0 length range can happen when
  12394. // ticks.min is set, and no datasets are visible
  12395. if (me.min >= me.max) {
  12396. if (setMin) {
  12397. me.max = me.min + 1;
  12398. } else {
  12399. me.min = me.max - 1;
  12400. }
  12401. }
  12402. }
  12403. if (me.min === me.max) {
  12404. me.max++;
  12405. if (!tickOpts.beginAtZero) {
  12406. me.min--;
  12407. }
  12408. }
  12409. },
  12410. getTickLimit: function() {
  12411. var me = this;
  12412. var tickOpts = me.options.ticks;
  12413. var stepSize = tickOpts.stepSize;
  12414. var maxTicksLimit = tickOpts.maxTicksLimit;
  12415. var maxTicks;
  12416. if (stepSize) {
  12417. maxTicks = Math.ceil(me.max / stepSize) - Math.floor(me.min / stepSize) + 1;
  12418. } else {
  12419. maxTicks = me._computeTickLimit();
  12420. maxTicksLimit = maxTicksLimit || 11;
  12421. }
  12422. if (maxTicksLimit) {
  12423. maxTicks = Math.min(maxTicksLimit, maxTicks);
  12424. }
  12425. return maxTicks;
  12426. },
  12427. _computeTickLimit: function() {
  12428. return Number.POSITIVE_INFINITY;
  12429. },
  12430. handleDirectionalChanges: noop,
  12431. buildTicks: function() {
  12432. var me = this;
  12433. var opts = me.options;
  12434. var tickOpts = opts.ticks;
  12435. // Figure out what the max number of ticks we can support it is based on the size of
  12436. // the axis area. For now, we say that the minimum tick spacing in pixels must be 40
  12437. // We also limit the maximum number of ticks to 11 which gives a nice 10 squares on
  12438. // the graph. Make sure we always have at least 2 ticks
  12439. var maxTicks = me.getTickLimit();
  12440. maxTicks = Math.max(2, maxTicks);
  12441. var numericGeneratorOptions = {
  12442. maxTicks: maxTicks,
  12443. min: tickOpts.min,
  12444. max: tickOpts.max,
  12445. precision: tickOpts.precision,
  12446. stepSize: helpers$1.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)
  12447. };
  12448. var ticks = me.ticks = generateTicks(numericGeneratorOptions, me);
  12449. me.handleDirectionalChanges();
  12450. // At this point, we need to update our max and min given the tick values since we have expanded the
  12451. // range of the scale
  12452. me.max = helpers$1.max(ticks);
  12453. me.min = helpers$1.min(ticks);
  12454. if (tickOpts.reverse) {
  12455. ticks.reverse();
  12456. me.start = me.max;
  12457. me.end = me.min;
  12458. } else {
  12459. me.start = me.min;
  12460. me.end = me.max;
  12461. }
  12462. },
  12463. convertTicksToLabels: function() {
  12464. var me = this;
  12465. me.ticksAsNumbers = me.ticks.slice();
  12466. me.zeroLineIndex = me.ticks.indexOf(0);
  12467. core_scale.prototype.convertTicksToLabels.call(me);
  12468. },
  12469. _configure: function() {
  12470. var me = this;
  12471. var ticks = me.getTicks();
  12472. var start = me.min;
  12473. var end = me.max;
  12474. var offset;
  12475. core_scale.prototype._configure.call(me);
  12476. if (me.options.offset && ticks.length) {
  12477. offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;
  12478. start -= offset;
  12479. end += offset;
  12480. }
  12481. me._startValue = start;
  12482. me._endValue = end;
  12483. me._valueRange = end - start;
  12484. }
  12485. });
  12486. var defaultConfig$1 = {
  12487. position: 'left',
  12488. ticks: {
  12489. callback: core_ticks.formatters.linear
  12490. }
  12491. };
  12492. var DEFAULT_MIN = 0;
  12493. var DEFAULT_MAX = 1;
  12494. function getOrCreateStack(stacks, stacked, meta) {
  12495. var key = [
  12496. meta.type,
  12497. // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined
  12498. stacked === undefined && meta.stack === undefined ? meta.index : '',
  12499. meta.stack
  12500. ].join('.');
  12501. if (stacks[key] === undefined) {
  12502. stacks[key] = {
  12503. pos: [],
  12504. neg: []
  12505. };
  12506. }
  12507. return stacks[key];
  12508. }
  12509. function stackData(scale, stacks, meta, data) {
  12510. var opts = scale.options;
  12511. var stacked = opts.stacked;
  12512. var stack = getOrCreateStack(stacks, stacked, meta);
  12513. var pos = stack.pos;
  12514. var neg = stack.neg;
  12515. var ilen = data.length;
  12516. var i, value;
  12517. for (i = 0; i < ilen; ++i) {
  12518. value = scale._parseValue(data[i]);
  12519. if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden) {
  12520. continue;
  12521. }
  12522. pos[i] = pos[i] || 0;
  12523. neg[i] = neg[i] || 0;
  12524. if (opts.relativePoints) {
  12525. pos[i] = 100;
  12526. } else if (value.min < 0 || value.max < 0) {
  12527. neg[i] += value.min;
  12528. } else {
  12529. pos[i] += value.max;
  12530. }
  12531. }
  12532. }
  12533. function updateMinMax(scale, meta, data) {
  12534. var ilen = data.length;
  12535. var i, value;
  12536. for (i = 0; i < ilen; ++i) {
  12537. value = scale._parseValue(data[i]);
  12538. if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden) {
  12539. continue;
  12540. }
  12541. scale.min = Math.min(scale.min, value.min);
  12542. scale.max = Math.max(scale.max, value.max);
  12543. }
  12544. }
  12545. var scale_linear = scale_linearbase.extend({
  12546. determineDataLimits: function() {
  12547. var me = this;
  12548. var opts = me.options;
  12549. var chart = me.chart;
  12550. var datasets = chart.data.datasets;
  12551. var metasets = me._getMatchingVisibleMetas();
  12552. var hasStacks = opts.stacked;
  12553. var stacks = {};
  12554. var ilen = metasets.length;
  12555. var i, meta, data, values;
  12556. me.min = Number.POSITIVE_INFINITY;
  12557. me.max = Number.NEGATIVE_INFINITY;
  12558. if (hasStacks === undefined) {
  12559. for (i = 0; !hasStacks && i < ilen; ++i) {
  12560. meta = metasets[i];
  12561. hasStacks = meta.stack !== undefined;
  12562. }
  12563. }
  12564. for (i = 0; i < ilen; ++i) {
  12565. meta = metasets[i];
  12566. data = datasets[meta.index].data;
  12567. if (hasStacks) {
  12568. stackData(me, stacks, meta, data);
  12569. } else {
  12570. updateMinMax(me, meta, data);
  12571. }
  12572. }
  12573. helpers$1.each(stacks, function(stackValues) {
  12574. values = stackValues.pos.concat(stackValues.neg);
  12575. me.min = Math.min(me.min, helpers$1.min(values));
  12576. me.max = Math.max(me.max, helpers$1.max(values));
  12577. });
  12578. me.min = helpers$1.isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN;
  12579. me.max = helpers$1.isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX;
  12580. // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
  12581. me.handleTickRangeOptions();
  12582. },
  12583. // Returns the maximum number of ticks based on the scale dimension
  12584. _computeTickLimit: function() {
  12585. var me = this;
  12586. var tickFont;
  12587. if (me.isHorizontal()) {
  12588. return Math.ceil(me.width / 40);
  12589. }
  12590. tickFont = helpers$1.options._parseFont(me.options.ticks);
  12591. return Math.ceil(me.height / tickFont.lineHeight);
  12592. },
  12593. // Called after the ticks are built. We need
  12594. handleDirectionalChanges: function() {
  12595. if (!this.isHorizontal()) {
  12596. // We are in a vertical orientation. The top value is the highest. So reverse the array
  12597. this.ticks.reverse();
  12598. }
  12599. },
  12600. getLabelForIndex: function(index, datasetIndex) {
  12601. return this._getScaleLabel(this.chart.data.datasets[datasetIndex].data[index]);
  12602. },
  12603. // Utils
  12604. getPixelForValue: function(value) {
  12605. var me = this;
  12606. return me.getPixelForDecimal((+me.getRightValue(value) - me._startValue) / me._valueRange);
  12607. },
  12608. getValueForPixel: function(pixel) {
  12609. return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;
  12610. },
  12611. getPixelForTick: function(index) {
  12612. var ticks = this.ticksAsNumbers;
  12613. if (index < 0 || index > ticks.length - 1) {
  12614. return null;
  12615. }
  12616. return this.getPixelForValue(ticks[index]);
  12617. }
  12618. });
  12619. // INTERNAL: static default options, registered in src/index.js
  12620. var _defaults$1 = defaultConfig$1;
  12621. scale_linear._defaults = _defaults$1;
  12622. var valueOrDefault$b = helpers$1.valueOrDefault;
  12623. var log10 = helpers$1.math.log10;
  12624. /**
  12625. * Generate a set of logarithmic ticks
  12626. * @param generationOptions the options used to generate the ticks
  12627. * @param dataRange the range of the data
  12628. * @returns {number[]} array of tick values
  12629. */
  12630. function generateTicks$1(generationOptions, dataRange) {
  12631. var ticks = [];
  12632. var tickVal = valueOrDefault$b(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));
  12633. var endExp = Math.floor(log10(dataRange.max));
  12634. var endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));
  12635. var exp, significand;
  12636. if (tickVal === 0) {
  12637. exp = Math.floor(log10(dataRange.minNotZero));
  12638. significand = Math.floor(dataRange.minNotZero / Math.pow(10, exp));
  12639. ticks.push(tickVal);
  12640. tickVal = significand * Math.pow(10, exp);
  12641. } else {
  12642. exp = Math.floor(log10(tickVal));
  12643. significand = Math.floor(tickVal / Math.pow(10, exp));
  12644. }
  12645. var precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;
  12646. do {
  12647. ticks.push(tickVal);
  12648. ++significand;
  12649. if (significand === 10) {
  12650. significand = 1;
  12651. ++exp;
  12652. precision = exp >= 0 ? 1 : precision;
  12653. }
  12654. tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;
  12655. } while (exp < endExp || (exp === endExp && significand < endSignificand));
  12656. var lastTick = valueOrDefault$b(generationOptions.max, tickVal);
  12657. ticks.push(lastTick);
  12658. return ticks;
  12659. }
  12660. var defaultConfig$2 = {
  12661. position: 'left',
  12662. // label settings
  12663. ticks: {
  12664. callback: core_ticks.formatters.logarithmic
  12665. }
  12666. };
  12667. // TODO(v3): change this to positiveOrDefault
  12668. function nonNegativeOrDefault(value, defaultValue) {
  12669. return helpers$1.isFinite(value) && value >= 0 ? value : defaultValue;
  12670. }
  12671. var scale_logarithmic = core_scale.extend({
  12672. determineDataLimits: function() {
  12673. var me = this;
  12674. var opts = me.options;
  12675. var chart = me.chart;
  12676. var datasets = chart.data.datasets;
  12677. var isHorizontal = me.isHorizontal();
  12678. function IDMatches(meta) {
  12679. return isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;
  12680. }
  12681. var datasetIndex, meta, value, data, i, ilen;
  12682. // Calculate Range
  12683. me.min = Number.POSITIVE_INFINITY;
  12684. me.max = Number.NEGATIVE_INFINITY;
  12685. me.minNotZero = Number.POSITIVE_INFINITY;
  12686. var hasStacks = opts.stacked;
  12687. if (hasStacks === undefined) {
  12688. for (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {
  12689. meta = chart.getDatasetMeta(datasetIndex);
  12690. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&
  12691. meta.stack !== undefined) {
  12692. hasStacks = true;
  12693. break;
  12694. }
  12695. }
  12696. }
  12697. if (opts.stacked || hasStacks) {
  12698. var valuesPerStack = {};
  12699. for (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {
  12700. meta = chart.getDatasetMeta(datasetIndex);
  12701. var key = [
  12702. meta.type,
  12703. // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined
  12704. ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),
  12705. meta.stack
  12706. ].join('.');
  12707. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {
  12708. if (valuesPerStack[key] === undefined) {
  12709. valuesPerStack[key] = [];
  12710. }
  12711. data = datasets[datasetIndex].data;
  12712. for (i = 0, ilen = data.length; i < ilen; i++) {
  12713. var values = valuesPerStack[key];
  12714. value = me._parseValue(data[i]);
  12715. // invalid, hidden and negative values are ignored
  12716. if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
  12717. continue;
  12718. }
  12719. values[i] = values[i] || 0;
  12720. values[i] += value.max;
  12721. }
  12722. }
  12723. }
  12724. helpers$1.each(valuesPerStack, function(valuesForType) {
  12725. if (valuesForType.length > 0) {
  12726. var minVal = helpers$1.min(valuesForType);
  12727. var maxVal = helpers$1.max(valuesForType);
  12728. me.min = Math.min(me.min, minVal);
  12729. me.max = Math.max(me.max, maxVal);
  12730. }
  12731. });
  12732. } else {
  12733. for (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {
  12734. meta = chart.getDatasetMeta(datasetIndex);
  12735. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {
  12736. data = datasets[datasetIndex].data;
  12737. for (i = 0, ilen = data.length; i < ilen; i++) {
  12738. value = me._parseValue(data[i]);
  12739. // invalid, hidden and negative values are ignored
  12740. if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
  12741. continue;
  12742. }
  12743. me.min = Math.min(value.min, me.min);
  12744. me.max = Math.max(value.max, me.max);
  12745. if (value.min !== 0) {
  12746. me.minNotZero = Math.min(value.min, me.minNotZero);
  12747. }
  12748. }
  12749. }
  12750. }
  12751. }
  12752. me.min = helpers$1.isFinite(me.min) ? me.min : null;
  12753. me.max = helpers$1.isFinite(me.max) ? me.max : null;
  12754. me.minNotZero = helpers$1.isFinite(me.minNotZero) ? me.minNotZero : null;
  12755. // Common base implementation to handle ticks.min, ticks.max
  12756. this.handleTickRangeOptions();
  12757. },
  12758. handleTickRangeOptions: function() {
  12759. var me = this;
  12760. var tickOpts = me.options.ticks;
  12761. var DEFAULT_MIN = 1;
  12762. var DEFAULT_MAX = 10;
  12763. me.min = nonNegativeOrDefault(tickOpts.min, me.min);
  12764. me.max = nonNegativeOrDefault(tickOpts.max, me.max);
  12765. if (me.min === me.max) {
  12766. if (me.min !== 0 && me.min !== null) {
  12767. me.min = Math.pow(10, Math.floor(log10(me.min)) - 1);
  12768. me.max = Math.pow(10, Math.floor(log10(me.max)) + 1);
  12769. } else {
  12770. me.min = DEFAULT_MIN;
  12771. me.max = DEFAULT_MAX;
  12772. }
  12773. }
  12774. if (me.min === null) {
  12775. me.min = Math.pow(10, Math.floor(log10(me.max)) - 1);
  12776. }
  12777. if (me.max === null) {
  12778. me.max = me.min !== 0
  12779. ? Math.pow(10, Math.floor(log10(me.min)) + 1)
  12780. : DEFAULT_MAX;
  12781. }
  12782. if (me.minNotZero === null) {
  12783. if (me.min > 0) {
  12784. me.minNotZero = me.min;
  12785. } else if (me.max < 1) {
  12786. me.minNotZero = Math.pow(10, Math.floor(log10(me.max)));
  12787. } else {
  12788. me.minNotZero = DEFAULT_MIN;
  12789. }
  12790. }
  12791. },
  12792. buildTicks: function() {
  12793. var me = this;
  12794. var tickOpts = me.options.ticks;
  12795. var reverse = !me.isHorizontal();
  12796. var generationOptions = {
  12797. min: nonNegativeOrDefault(tickOpts.min),
  12798. max: nonNegativeOrDefault(tickOpts.max)
  12799. };
  12800. var ticks = me.ticks = generateTicks$1(generationOptions, me);
  12801. // At this point, we need to update our max and min given the tick values since we have expanded the
  12802. // range of the scale
  12803. me.max = helpers$1.max(ticks);
  12804. me.min = helpers$1.min(ticks);
  12805. if (tickOpts.reverse) {
  12806. reverse = !reverse;
  12807. me.start = me.max;
  12808. me.end = me.min;
  12809. } else {
  12810. me.start = me.min;
  12811. me.end = me.max;
  12812. }
  12813. if (reverse) {
  12814. ticks.reverse();
  12815. }
  12816. },
  12817. convertTicksToLabels: function() {
  12818. this.tickValues = this.ticks.slice();
  12819. core_scale.prototype.convertTicksToLabels.call(this);
  12820. },
  12821. // Get the correct tooltip label
  12822. getLabelForIndex: function(index, datasetIndex) {
  12823. return this._getScaleLabel(this.chart.data.datasets[datasetIndex].data[index]);
  12824. },
  12825. getPixelForTick: function(index) {
  12826. var ticks = this.tickValues;
  12827. if (index < 0 || index > ticks.length - 1) {
  12828. return null;
  12829. }
  12830. return this.getPixelForValue(ticks[index]);
  12831. },
  12832. /**
  12833. * Returns the value of the first tick.
  12834. * @param {number} value - The minimum not zero value.
  12835. * @return {number} The first tick value.
  12836. * @private
  12837. */
  12838. _getFirstTickValue: function(value) {
  12839. var exp = Math.floor(log10(value));
  12840. var significand = Math.floor(value / Math.pow(10, exp));
  12841. return significand * Math.pow(10, exp);
  12842. },
  12843. _configure: function() {
  12844. var me = this;
  12845. var start = me.min;
  12846. var offset = 0;
  12847. core_scale.prototype._configure.call(me);
  12848. if (start === 0) {
  12849. start = me._getFirstTickValue(me.minNotZero);
  12850. offset = valueOrDefault$b(me.options.ticks.fontSize, core_defaults.global.defaultFontSize) / me._length;
  12851. }
  12852. me._startValue = log10(start);
  12853. me._valueOffset = offset;
  12854. me._valueRange = (log10(me.max) - log10(start)) / (1 - offset);
  12855. },
  12856. getPixelForValue: function(value) {
  12857. var me = this;
  12858. var decimal = 0;
  12859. value = +me.getRightValue(value);
  12860. if (value > me.min && value > 0) {
  12861. decimal = (log10(value) - me._startValue) / me._valueRange + me._valueOffset;
  12862. }
  12863. return me.getPixelForDecimal(decimal);
  12864. },
  12865. getValueForPixel: function(pixel) {
  12866. var me = this;
  12867. var decimal = me.getDecimalForPixel(pixel);
  12868. return decimal === 0 && me.min === 0
  12869. ? 0
  12870. : Math.pow(10, me._startValue + (decimal - me._valueOffset) * me._valueRange);
  12871. }
  12872. });
  12873. // INTERNAL: static default options, registered in src/index.js
  12874. var _defaults$2 = defaultConfig$2;
  12875. scale_logarithmic._defaults = _defaults$2;
  12876. var valueOrDefault$c = helpers$1.valueOrDefault;
  12877. var valueAtIndexOrDefault$1 = helpers$1.valueAtIndexOrDefault;
  12878. var resolve$4 = helpers$1.options.resolve;
  12879. var defaultConfig$3 = {
  12880. display: true,
  12881. // Boolean - Whether to animate scaling the chart from the centre
  12882. animate: true,
  12883. position: 'chartArea',
  12884. angleLines: {
  12885. display: true,
  12886. color: 'rgba(0,0,0,0.1)',
  12887. lineWidth: 1,
  12888. borderDash: [],
  12889. borderDashOffset: 0.0
  12890. },
  12891. gridLines: {
  12892. circular: false
  12893. },
  12894. // label settings
  12895. ticks: {
  12896. // Boolean - Show a backdrop to the scale label
  12897. showLabelBackdrop: true,
  12898. // String - The colour of the label backdrop
  12899. backdropColor: 'rgba(255,255,255,0.75)',
  12900. // Number - The backdrop padding above & below the label in pixels
  12901. backdropPaddingY: 2,
  12902. // Number - The backdrop padding to the side of the label in pixels
  12903. backdropPaddingX: 2,
  12904. callback: core_ticks.formatters.linear
  12905. },
  12906. pointLabels: {
  12907. // Boolean - if true, show point labels
  12908. display: true,
  12909. // Number - Point label font size in pixels
  12910. fontSize: 10,
  12911. // Function - Used to convert point labels
  12912. callback: function(label) {
  12913. return label;
  12914. }
  12915. }
  12916. };
  12917. function getTickBackdropHeight(opts) {
  12918. var tickOpts = opts.ticks;
  12919. if (tickOpts.display && opts.display) {
  12920. return valueOrDefault$c(tickOpts.fontSize, core_defaults.global.defaultFontSize) + tickOpts.backdropPaddingY * 2;
  12921. }
  12922. return 0;
  12923. }
  12924. function measureLabelSize(ctx, lineHeight, label) {
  12925. if (helpers$1.isArray(label)) {
  12926. return {
  12927. w: helpers$1.longestText(ctx, ctx.font, label),
  12928. h: label.length * lineHeight
  12929. };
  12930. }
  12931. return {
  12932. w: ctx.measureText(label).width,
  12933. h: lineHeight
  12934. };
  12935. }
  12936. function determineLimits(angle, pos, size, min, max) {
  12937. if (angle === min || angle === max) {
  12938. return {
  12939. start: pos - (size / 2),
  12940. end: pos + (size / 2)
  12941. };
  12942. } else if (angle < min || angle > max) {
  12943. return {
  12944. start: pos - size,
  12945. end: pos
  12946. };
  12947. }
  12948. return {
  12949. start: pos,
  12950. end: pos + size
  12951. };
  12952. }
  12953. /**
  12954. * Helper function to fit a radial linear scale with point labels
  12955. */
  12956. function fitWithPointLabels(scale) {
  12957. // Right, this is really confusing and there is a lot of maths going on here
  12958. // The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
  12959. //
  12960. // Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif
  12961. //
  12962. // Solution:
  12963. //
  12964. // We assume the radius of the polygon is half the size of the canvas at first
  12965. // at each index we check if the text overlaps.
  12966. //
  12967. // Where it does, we store that angle and that index.
  12968. //
  12969. // After finding the largest index and angle we calculate how much we need to remove
  12970. // from the shape radius to move the point inwards by that x.
  12971. //
  12972. // We average the left and right distances to get the maximum shape radius that can fit in the box
  12973. // along with labels.
  12974. //
  12975. // Once we have that, we can find the centre point for the chart, by taking the x text protrusion
  12976. // on each side, removing that from the size, halving it and adding the left x protrusion width.
  12977. //
  12978. // This will mean we have a shape fitted to the canvas, as large as it can be with the labels
  12979. // and position it in the most space efficient manner
  12980. //
  12981. // https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif
  12982. var plFont = helpers$1.options._parseFont(scale.options.pointLabels);
  12983. // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.
  12984. // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points
  12985. var furthestLimits = {
  12986. l: 0,
  12987. r: scale.width,
  12988. t: 0,
  12989. b: scale.height - scale.paddingTop
  12990. };
  12991. var furthestAngles = {};
  12992. var i, textSize, pointPosition;
  12993. scale.ctx.font = plFont.string;
  12994. scale._pointLabelSizes = [];
  12995. var valueCount = scale.chart.data.labels.length;
  12996. for (i = 0; i < valueCount; i++) {
  12997. pointPosition = scale.getPointPosition(i, scale.drawingArea + 5);
  12998. textSize = measureLabelSize(scale.ctx, plFont.lineHeight, scale.pointLabels[i]);
  12999. scale._pointLabelSizes[i] = textSize;
  13000. // Add quarter circle to make degree 0 mean top of circle
  13001. var angleRadians = scale.getIndexAngle(i);
  13002. var angle = helpers$1.toDegrees(angleRadians) % 360;
  13003. var hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);
  13004. var vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);
  13005. if (hLimits.start < furthestLimits.l) {
  13006. furthestLimits.l = hLimits.start;
  13007. furthestAngles.l = angleRadians;
  13008. }
  13009. if (hLimits.end > furthestLimits.r) {
  13010. furthestLimits.r = hLimits.end;
  13011. furthestAngles.r = angleRadians;
  13012. }
  13013. if (vLimits.start < furthestLimits.t) {
  13014. furthestLimits.t = vLimits.start;
  13015. furthestAngles.t = angleRadians;
  13016. }
  13017. if (vLimits.end > furthestLimits.b) {
  13018. furthestLimits.b = vLimits.end;
  13019. furthestAngles.b = angleRadians;
  13020. }
  13021. }
  13022. scale.setReductions(scale.drawingArea, furthestLimits, furthestAngles);
  13023. }
  13024. function getTextAlignForAngle(angle) {
  13025. if (angle === 0 || angle === 180) {
  13026. return 'center';
  13027. } else if (angle < 180) {
  13028. return 'left';
  13029. }
  13030. return 'right';
  13031. }
  13032. function fillText(ctx, text, position, lineHeight) {
  13033. var y = position.y + lineHeight / 2;
  13034. var i, ilen;
  13035. if (helpers$1.isArray(text)) {
  13036. for (i = 0, ilen = text.length; i < ilen; ++i) {
  13037. ctx.fillText(text[i], position.x, y);
  13038. y += lineHeight;
  13039. }
  13040. } else {
  13041. ctx.fillText(text, position.x, y);
  13042. }
  13043. }
  13044. function adjustPointPositionForLabelHeight(angle, textSize, position) {
  13045. if (angle === 90 || angle === 270) {
  13046. position.y -= (textSize.h / 2);
  13047. } else if (angle > 270 || angle < 90) {
  13048. position.y -= textSize.h;
  13049. }
  13050. }
  13051. function drawPointLabels(scale) {
  13052. var ctx = scale.ctx;
  13053. var opts = scale.options;
  13054. var pointLabelOpts = opts.pointLabels;
  13055. var tickBackdropHeight = getTickBackdropHeight(opts);
  13056. var outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);
  13057. var plFont = helpers$1.options._parseFont(pointLabelOpts);
  13058. ctx.save();
  13059. ctx.font = plFont.string;
  13060. ctx.textBaseline = 'middle';
  13061. for (var i = scale.chart.data.labels.length - 1; i >= 0; i--) {
  13062. // Extra pixels out for some label spacing
  13063. var extra = (i === 0 ? tickBackdropHeight / 2 : 0);
  13064. var pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + 5);
  13065. // Keep this in loop since we may support array properties here
  13066. var pointLabelFontColor = valueAtIndexOrDefault$1(pointLabelOpts.fontColor, i, core_defaults.global.defaultFontColor);
  13067. ctx.fillStyle = pointLabelFontColor;
  13068. var angleRadians = scale.getIndexAngle(i);
  13069. var angle = helpers$1.toDegrees(angleRadians);
  13070. ctx.textAlign = getTextAlignForAngle(angle);
  13071. adjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition);
  13072. fillText(ctx, scale.pointLabels[i], pointLabelPosition, plFont.lineHeight);
  13073. }
  13074. ctx.restore();
  13075. }
  13076. function drawRadiusLine(scale, gridLineOpts, radius, index) {
  13077. var ctx = scale.ctx;
  13078. var circular = gridLineOpts.circular;
  13079. var valueCount = scale.chart.data.labels.length;
  13080. var lineColor = valueAtIndexOrDefault$1(gridLineOpts.color, index - 1);
  13081. var lineWidth = valueAtIndexOrDefault$1(gridLineOpts.lineWidth, index - 1);
  13082. var pointPosition;
  13083. if ((!circular && !valueCount) || !lineColor || !lineWidth) {
  13084. return;
  13085. }
  13086. ctx.save();
  13087. ctx.strokeStyle = lineColor;
  13088. ctx.lineWidth = lineWidth;
  13089. if (ctx.setLineDash) {
  13090. ctx.setLineDash(gridLineOpts.borderDash || []);
  13091. ctx.lineDashOffset = gridLineOpts.borderDashOffset || 0.0;
  13092. }
  13093. ctx.beginPath();
  13094. if (circular) {
  13095. // Draw circular arcs between the points
  13096. ctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2);
  13097. } else {
  13098. // Draw straight lines connecting each index
  13099. pointPosition = scale.getPointPosition(0, radius);
  13100. ctx.moveTo(pointPosition.x, pointPosition.y);
  13101. for (var i = 1; i < valueCount; i++) {
  13102. pointPosition = scale.getPointPosition(i, radius);
  13103. ctx.lineTo(pointPosition.x, pointPosition.y);
  13104. }
  13105. }
  13106. ctx.closePath();
  13107. ctx.stroke();
  13108. ctx.restore();
  13109. }
  13110. function numberOrZero(param) {
  13111. return helpers$1.isNumber(param) ? param : 0;
  13112. }
  13113. var scale_radialLinear = scale_linearbase.extend({
  13114. setDimensions: function() {
  13115. var me = this;
  13116. // Set the unconstrained dimension before label rotation
  13117. me.width = me.maxWidth;
  13118. me.height = me.maxHeight;
  13119. me.paddingTop = getTickBackdropHeight(me.options) / 2;
  13120. me.xCenter = Math.floor(me.width / 2);
  13121. me.yCenter = Math.floor((me.height - me.paddingTop) / 2);
  13122. me.drawingArea = Math.min(me.height - me.paddingTop, me.width) / 2;
  13123. },
  13124. determineDataLimits: function() {
  13125. var me = this;
  13126. var chart = me.chart;
  13127. var min = Number.POSITIVE_INFINITY;
  13128. var max = Number.NEGATIVE_INFINITY;
  13129. helpers$1.each(chart.data.datasets, function(dataset, datasetIndex) {
  13130. if (chart.isDatasetVisible(datasetIndex)) {
  13131. var meta = chart.getDatasetMeta(datasetIndex);
  13132. helpers$1.each(dataset.data, function(rawValue, index) {
  13133. var value = +me.getRightValue(rawValue);
  13134. if (isNaN(value) || meta.data[index].hidden) {
  13135. return;
  13136. }
  13137. min = Math.min(value, min);
  13138. max = Math.max(value, max);
  13139. });
  13140. }
  13141. });
  13142. me.min = (min === Number.POSITIVE_INFINITY ? 0 : min);
  13143. me.max = (max === Number.NEGATIVE_INFINITY ? 0 : max);
  13144. // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
  13145. me.handleTickRangeOptions();
  13146. },
  13147. // Returns the maximum number of ticks based on the scale dimension
  13148. _computeTickLimit: function() {
  13149. return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));
  13150. },
  13151. convertTicksToLabels: function() {
  13152. var me = this;
  13153. scale_linearbase.prototype.convertTicksToLabels.call(me);
  13154. // Point labels
  13155. me.pointLabels = me.chart.data.labels.map(function() {
  13156. var label = helpers$1.callback(me.options.pointLabels.callback, arguments, me);
  13157. return label || label === 0 ? label : '';
  13158. });
  13159. },
  13160. getLabelForIndex: function(index, datasetIndex) {
  13161. return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);
  13162. },
  13163. fit: function() {
  13164. var me = this;
  13165. var opts = me.options;
  13166. if (opts.display && opts.pointLabels.display) {
  13167. fitWithPointLabels(me);
  13168. } else {
  13169. me.setCenterPoint(0, 0, 0, 0);
  13170. }
  13171. },
  13172. /**
  13173. * Set radius reductions and determine new radius and center point
  13174. * @private
  13175. */
  13176. setReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) {
  13177. var me = this;
  13178. var radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);
  13179. var radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);
  13180. var radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);
  13181. var radiusReductionBottom = -Math.max(furthestLimits.b - (me.height - me.paddingTop), 0) / Math.cos(furthestAngles.b);
  13182. radiusReductionLeft = numberOrZero(radiusReductionLeft);
  13183. radiusReductionRight = numberOrZero(radiusReductionRight);
  13184. radiusReductionTop = numberOrZero(radiusReductionTop);
  13185. radiusReductionBottom = numberOrZero(radiusReductionBottom);
  13186. me.drawingArea = Math.min(
  13187. Math.floor(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),
  13188. Math.floor(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2));
  13189. me.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);
  13190. },
  13191. setCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) {
  13192. var me = this;
  13193. var maxRight = me.width - rightMovement - me.drawingArea;
  13194. var maxLeft = leftMovement + me.drawingArea;
  13195. var maxTop = topMovement + me.drawingArea;
  13196. var maxBottom = (me.height - me.paddingTop) - bottomMovement - me.drawingArea;
  13197. me.xCenter = Math.floor(((maxLeft + maxRight) / 2) + me.left);
  13198. me.yCenter = Math.floor(((maxTop + maxBottom) / 2) + me.top + me.paddingTop);
  13199. },
  13200. getIndexAngle: function(index) {
  13201. var chart = this.chart;
  13202. var angleMultiplier = 360 / chart.data.labels.length;
  13203. var options = chart.options || {};
  13204. var startAngle = options.startAngle || 0;
  13205. // Start from the top instead of right, so remove a quarter of the circle
  13206. var angle = (index * angleMultiplier + startAngle) % 360;
  13207. return (angle < 0 ? angle + 360 : angle) * Math.PI * 2 / 360;
  13208. },
  13209. getDistanceFromCenterForValue: function(value) {
  13210. var me = this;
  13211. if (helpers$1.isNullOrUndef(value)) {
  13212. return NaN;
  13213. }
  13214. // Take into account half font size + the yPadding of the top value
  13215. var scalingFactor = me.drawingArea / (me.max - me.min);
  13216. if (me.options.ticks.reverse) {
  13217. return (me.max - value) * scalingFactor;
  13218. }
  13219. return (value - me.min) * scalingFactor;
  13220. },
  13221. getPointPosition: function(index, distanceFromCenter) {
  13222. var me = this;
  13223. var thisAngle = me.getIndexAngle(index) - (Math.PI / 2);
  13224. return {
  13225. x: Math.cos(thisAngle) * distanceFromCenter + me.xCenter,
  13226. y: Math.sin(thisAngle) * distanceFromCenter + me.yCenter
  13227. };
  13228. },
  13229. getPointPositionForValue: function(index, value) {
  13230. return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));
  13231. },
  13232. getBasePosition: function(index) {
  13233. var me = this;
  13234. var min = me.min;
  13235. var max = me.max;
  13236. return me.getPointPositionForValue(index || 0,
  13237. me.beginAtZero ? 0 :
  13238. min < 0 && max < 0 ? max :
  13239. min > 0 && max > 0 ? min :
  13240. 0);
  13241. },
  13242. /**
  13243. * @private
  13244. */
  13245. _drawGrid: function() {
  13246. var me = this;
  13247. var ctx = me.ctx;
  13248. var opts = me.options;
  13249. var gridLineOpts = opts.gridLines;
  13250. var angleLineOpts = opts.angleLines;
  13251. var lineWidth = valueOrDefault$c(angleLineOpts.lineWidth, gridLineOpts.lineWidth);
  13252. var lineColor = valueOrDefault$c(angleLineOpts.color, gridLineOpts.color);
  13253. var i, offset, position;
  13254. if (opts.pointLabels.display) {
  13255. drawPointLabels(me);
  13256. }
  13257. if (gridLineOpts.display) {
  13258. helpers$1.each(me.ticks, function(label, index) {
  13259. if (index !== 0) {
  13260. offset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);
  13261. drawRadiusLine(me, gridLineOpts, offset, index);
  13262. }
  13263. });
  13264. }
  13265. if (angleLineOpts.display && lineWidth && lineColor) {
  13266. ctx.save();
  13267. ctx.lineWidth = lineWidth;
  13268. ctx.strokeStyle = lineColor;
  13269. if (ctx.setLineDash) {
  13270. ctx.setLineDash(resolve$4([angleLineOpts.borderDash, gridLineOpts.borderDash, []]));
  13271. ctx.lineDashOffset = resolve$4([angleLineOpts.borderDashOffset, gridLineOpts.borderDashOffset, 0.0]);
  13272. }
  13273. for (i = me.chart.data.labels.length - 1; i >= 0; i--) {
  13274. offset = me.getDistanceFromCenterForValue(opts.ticks.reverse ? me.min : me.max);
  13275. position = me.getPointPosition(i, offset);
  13276. ctx.beginPath();
  13277. ctx.moveTo(me.xCenter, me.yCenter);
  13278. ctx.lineTo(position.x, position.y);
  13279. ctx.stroke();
  13280. }
  13281. ctx.restore();
  13282. }
  13283. },
  13284. /**
  13285. * @private
  13286. */
  13287. _drawLabels: function() {
  13288. var me = this;
  13289. var ctx = me.ctx;
  13290. var opts = me.options;
  13291. var tickOpts = opts.ticks;
  13292. if (!tickOpts.display) {
  13293. return;
  13294. }
  13295. var startAngle = me.getIndexAngle(0);
  13296. var tickFont = helpers$1.options._parseFont(tickOpts);
  13297. var tickFontColor = valueOrDefault$c(tickOpts.fontColor, core_defaults.global.defaultFontColor);
  13298. var offset, width;
  13299. ctx.save();
  13300. ctx.font = tickFont.string;
  13301. ctx.translate(me.xCenter, me.yCenter);
  13302. ctx.rotate(startAngle);
  13303. ctx.textAlign = 'center';
  13304. ctx.textBaseline = 'middle';
  13305. helpers$1.each(me.ticks, function(label, index) {
  13306. if (index === 0 && !tickOpts.reverse) {
  13307. return;
  13308. }
  13309. offset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);
  13310. if (tickOpts.showLabelBackdrop) {
  13311. width = ctx.measureText(label).width;
  13312. ctx.fillStyle = tickOpts.backdropColor;
  13313. ctx.fillRect(
  13314. -width / 2 - tickOpts.backdropPaddingX,
  13315. -offset - tickFont.size / 2 - tickOpts.backdropPaddingY,
  13316. width + tickOpts.backdropPaddingX * 2,
  13317. tickFont.size + tickOpts.backdropPaddingY * 2
  13318. );
  13319. }
  13320. ctx.fillStyle = tickFontColor;
  13321. ctx.fillText(label, 0, -offset);
  13322. });
  13323. ctx.restore();
  13324. },
  13325. /**
  13326. * @private
  13327. */
  13328. _drawTitle: helpers$1.noop
  13329. });
  13330. // INTERNAL: static default options, registered in src/index.js
  13331. var _defaults$3 = defaultConfig$3;
  13332. scale_radialLinear._defaults = _defaults$3;
  13333. var deprecated$1 = helpers$1._deprecated;
  13334. var resolve$5 = helpers$1.options.resolve;
  13335. var valueOrDefault$d = helpers$1.valueOrDefault;
  13336. // Integer constants are from the ES6 spec.
  13337. var MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;
  13338. var MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  13339. var INTERVALS = {
  13340. millisecond: {
  13341. common: true,
  13342. size: 1,
  13343. steps: 1000
  13344. },
  13345. second: {
  13346. common: true,
  13347. size: 1000,
  13348. steps: 60
  13349. },
  13350. minute: {
  13351. common: true,
  13352. size: 60000,
  13353. steps: 60
  13354. },
  13355. hour: {
  13356. common: true,
  13357. size: 3600000,
  13358. steps: 24
  13359. },
  13360. day: {
  13361. common: true,
  13362. size: 86400000,
  13363. steps: 30
  13364. },
  13365. week: {
  13366. common: false,
  13367. size: 604800000,
  13368. steps: 4
  13369. },
  13370. month: {
  13371. common: true,
  13372. size: 2.628e9,
  13373. steps: 12
  13374. },
  13375. quarter: {
  13376. common: false,
  13377. size: 7.884e9,
  13378. steps: 4
  13379. },
  13380. year: {
  13381. common: true,
  13382. size: 3.154e10
  13383. }
  13384. };
  13385. var UNITS = Object.keys(INTERVALS);
  13386. function sorter(a, b) {
  13387. return a - b;
  13388. }
  13389. function arrayUnique(items) {
  13390. var hash = {};
  13391. var out = [];
  13392. var i, ilen, item;
  13393. for (i = 0, ilen = items.length; i < ilen; ++i) {
  13394. item = items[i];
  13395. if (!hash[item]) {
  13396. hash[item] = true;
  13397. out.push(item);
  13398. }
  13399. }
  13400. return out;
  13401. }
  13402. function getMin(options) {
  13403. return helpers$1.valueOrDefault(options.time.min, options.ticks.min);
  13404. }
  13405. function getMax(options) {
  13406. return helpers$1.valueOrDefault(options.time.max, options.ticks.max);
  13407. }
  13408. /**
  13409. * Returns an array of {time, pos} objects used to interpolate a specific `time` or position
  13410. * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is
  13411. * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other
  13412. * extremity (left + width or top + height). Note that it would be more optimized to directly
  13413. * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need
  13414. * to create the lookup table. The table ALWAYS contains at least two items: min and max.
  13415. *
  13416. * @param {number[]} timestamps - timestamps sorted from lowest to highest.
  13417. * @param {string} distribution - If 'linear', timestamps will be spread linearly along the min
  13418. * and max range, so basically, the table will contains only two items: {min, 0} and {max, 1}.
  13419. * If 'series', timestamps will be positioned at the same distance from each other. In this
  13420. * case, only timestamps that break the time linearity are registered, meaning that in the
  13421. * best case, all timestamps are linear, the table contains only min and max.
  13422. */
  13423. function buildLookupTable(timestamps, min, max, distribution) {
  13424. if (distribution === 'linear' || !timestamps.length) {
  13425. return [
  13426. {time: min, pos: 0},
  13427. {time: max, pos: 1}
  13428. ];
  13429. }
  13430. var table = [];
  13431. var items = [min];
  13432. var i, ilen, prev, curr, next;
  13433. for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
  13434. curr = timestamps[i];
  13435. if (curr > min && curr < max) {
  13436. items.push(curr);
  13437. }
  13438. }
  13439. items.push(max);
  13440. for (i = 0, ilen = items.length; i < ilen; ++i) {
  13441. next = items[i + 1];
  13442. prev = items[i - 1];
  13443. curr = items[i];
  13444. // only add points that breaks the scale linearity
  13445. if (prev === undefined || next === undefined || Math.round((next + prev) / 2) !== curr) {
  13446. table.push({time: curr, pos: i / (ilen - 1)});
  13447. }
  13448. }
  13449. return table;
  13450. }
  13451. // @see adapted from https://www.anujgakhar.com/2014/03/01/binary-search-in-javascript/
  13452. function lookup(table, key, value) {
  13453. var lo = 0;
  13454. var hi = table.length - 1;
  13455. var mid, i0, i1;
  13456. while (lo >= 0 && lo <= hi) {
  13457. mid = (lo + hi) >> 1;
  13458. i0 = table[mid - 1] || null;
  13459. i1 = table[mid];
  13460. if (!i0) {
  13461. // given value is outside table (before first item)
  13462. return {lo: null, hi: i1};
  13463. } else if (i1[key] < value) {
  13464. lo = mid + 1;
  13465. } else if (i0[key] > value) {
  13466. hi = mid - 1;
  13467. } else {
  13468. return {lo: i0, hi: i1};
  13469. }
  13470. }
  13471. // given value is outside table (after last item)
  13472. return {lo: i1, hi: null};
  13473. }
  13474. /**
  13475. * Linearly interpolates the given source `value` using the table items `skey` values and
  13476. * returns the associated `tkey` value. For example, interpolate(table, 'time', 42, 'pos')
  13477. * returns the position for a timestamp equal to 42. If value is out of bounds, values at
  13478. * index [0, 1] or [n - 1, n] are used for the interpolation.
  13479. */
  13480. function interpolate$1(table, skey, sval, tkey) {
  13481. var range = lookup(table, skey, sval);
  13482. // Note: the lookup table ALWAYS contains at least 2 items (min and max)
  13483. var prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo;
  13484. var next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi;
  13485. var span = next[skey] - prev[skey];
  13486. var ratio = span ? (sval - prev[skey]) / span : 0;
  13487. var offset = (next[tkey] - prev[tkey]) * ratio;
  13488. return prev[tkey] + offset;
  13489. }
  13490. function toTimestamp(scale, input) {
  13491. var adapter = scale._adapter;
  13492. var options = scale.options.time;
  13493. var parser = options.parser;
  13494. var format = parser || options.format;
  13495. var value = input;
  13496. if (typeof parser === 'function') {
  13497. value = parser(value);
  13498. }
  13499. // Only parse if its not a timestamp already
  13500. if (!helpers$1.isFinite(value)) {
  13501. value = typeof format === 'string'
  13502. ? adapter.parse(value, format)
  13503. : adapter.parse(value);
  13504. }
  13505. if (value !== null) {
  13506. return +value;
  13507. }
  13508. // Labels are in an incompatible format and no `parser` has been provided.
  13509. // The user might still use the deprecated `format` option for parsing.
  13510. if (!parser && typeof format === 'function') {
  13511. value = format(input);
  13512. // `format` could return something else than a timestamp, if so, parse it
  13513. if (!helpers$1.isFinite(value)) {
  13514. value = adapter.parse(value);
  13515. }
  13516. }
  13517. return value;
  13518. }
  13519. function parse(scale, input) {
  13520. if (helpers$1.isNullOrUndef(input)) {
  13521. return null;
  13522. }
  13523. var options = scale.options.time;
  13524. var value = toTimestamp(scale, scale.getRightValue(input));
  13525. if (value === null) {
  13526. return value;
  13527. }
  13528. if (options.round) {
  13529. value = +scale._adapter.startOf(value, options.round);
  13530. }
  13531. return value;
  13532. }
  13533. /**
  13534. * Figures out what unit results in an appropriate number of auto-generated ticks
  13535. */
  13536. function determineUnitForAutoTicks(minUnit, min, max, capacity) {
  13537. var ilen = UNITS.length;
  13538. var i, interval, factor;
  13539. for (i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {
  13540. interval = INTERVALS[UNITS[i]];
  13541. factor = interval.steps ? interval.steps : MAX_INTEGER;
  13542. if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {
  13543. return UNITS[i];
  13544. }
  13545. }
  13546. return UNITS[ilen - 1];
  13547. }
  13548. /**
  13549. * Figures out what unit to format a set of ticks with
  13550. */
  13551. function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {
  13552. var i, unit;
  13553. for (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {
  13554. unit = UNITS[i];
  13555. if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {
  13556. return unit;
  13557. }
  13558. }
  13559. return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];
  13560. }
  13561. function determineMajorUnit(unit) {
  13562. for (var i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {
  13563. if (INTERVALS[UNITS[i]].common) {
  13564. return UNITS[i];
  13565. }
  13566. }
  13567. }
  13568. /**
  13569. * Generates a maximum of `capacity` timestamps between min and max, rounded to the
  13570. * `minor` unit using the given scale time `options`.
  13571. * Important: this method can return ticks outside the min and max range, it's the
  13572. * responsibility of the calling code to clamp values if needed.
  13573. */
  13574. function generate(scale, min, max, capacity) {
  13575. var adapter = scale._adapter;
  13576. var options = scale.options;
  13577. var timeOpts = options.time;
  13578. var minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity);
  13579. var stepSize = resolve$5([timeOpts.stepSize, timeOpts.unitStepSize, 1]);
  13580. var weekday = minor === 'week' ? timeOpts.isoWeekday : false;
  13581. var first = min;
  13582. var ticks = [];
  13583. var time;
  13584. // For 'week' unit, handle the first day of week option
  13585. if (weekday) {
  13586. first = +adapter.startOf(first, 'isoWeek', weekday);
  13587. }
  13588. // Align first ticks on unit
  13589. first = +adapter.startOf(first, weekday ? 'day' : minor);
  13590. // Prevent browser from freezing in case user options request millions of milliseconds
  13591. if (adapter.diff(max, min, minor) > 100000 * stepSize) {
  13592. throw min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor;
  13593. }
  13594. for (time = first; time < max; time = +adapter.add(time, stepSize, minor)) {
  13595. ticks.push(time);
  13596. }
  13597. if (time === max || options.bounds === 'ticks') {
  13598. ticks.push(time);
  13599. }
  13600. return ticks;
  13601. }
  13602. /**
  13603. * Returns the start and end offsets from edges in the form of {start, end}
  13604. * where each value is a relative width to the scale and ranges between 0 and 1.
  13605. * They add extra margins on the both sides by scaling down the original scale.
  13606. * Offsets are added when the `offset` option is true.
  13607. */
  13608. function computeOffsets(table, ticks, min, max, options) {
  13609. var start = 0;
  13610. var end = 0;
  13611. var first, last;
  13612. if (options.offset && ticks.length) {
  13613. first = interpolate$1(table, 'time', ticks[0], 'pos');
  13614. if (ticks.length === 1) {
  13615. start = 1 - first;
  13616. } else {
  13617. start = (interpolate$1(table, 'time', ticks[1], 'pos') - first) / 2;
  13618. }
  13619. last = interpolate$1(table, 'time', ticks[ticks.length - 1], 'pos');
  13620. if (ticks.length === 1) {
  13621. end = last;
  13622. } else {
  13623. end = (last - interpolate$1(table, 'time', ticks[ticks.length - 2], 'pos')) / 2;
  13624. }
  13625. }
  13626. return {start: start, end: end, factor: 1 / (start + 1 + end)};
  13627. }
  13628. function setMajorTicks(scale, ticks, map, majorUnit) {
  13629. var adapter = scale._adapter;
  13630. var first = +adapter.startOf(ticks[0].value, majorUnit);
  13631. var last = ticks[ticks.length - 1].value;
  13632. var major, index;
  13633. for (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {
  13634. index = map[major];
  13635. if (index >= 0) {
  13636. ticks[index].major = true;
  13637. }
  13638. }
  13639. return ticks;
  13640. }
  13641. function ticksFromTimestamps(scale, values, majorUnit) {
  13642. var ticks = [];
  13643. var map = {};
  13644. var ilen = values.length;
  13645. var i, value;
  13646. for (i = 0; i < ilen; ++i) {
  13647. value = values[i];
  13648. map[value] = i;
  13649. ticks.push({
  13650. value: value,
  13651. major: false
  13652. });
  13653. }
  13654. // We set the major ticks separately from the above loop because calling startOf for every tick
  13655. // is expensive when there is a large number of ticks
  13656. return (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);
  13657. }
  13658. var defaultConfig$4 = {
  13659. position: 'bottom',
  13660. /**
  13661. * Data distribution along the scale:
  13662. * - 'linear': data are spread according to their time (distances can vary),
  13663. * - 'series': data are spread at the same distance from each other.
  13664. * @see https://github.com/chartjs/Chart.js/pull/4507
  13665. * @since 2.7.0
  13666. */
  13667. distribution: 'linear',
  13668. /**
  13669. * Scale boundary strategy (bypassed by min/max time options)
  13670. * - `data`: make sure data are fully visible, ticks outside are removed
  13671. * - `ticks`: make sure ticks are fully visible, data outside are truncated
  13672. * @see https://github.com/chartjs/Chart.js/pull/4556
  13673. * @since 2.7.0
  13674. */
  13675. bounds: 'data',
  13676. adapters: {},
  13677. time: {
  13678. parser: false, // false == a pattern string from https://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment
  13679. unit: false, // false == automatic or override with week, month, year, etc.
  13680. round: false, // none, or override with week, month, year, etc.
  13681. displayFormat: false, // DEPRECATED
  13682. isoWeekday: false, // override week start day - see https://momentjs.com/docs/#/get-set/iso-weekday/
  13683. minUnit: 'millisecond',
  13684. displayFormats: {}
  13685. },
  13686. ticks: {
  13687. autoSkip: false,
  13688. /**
  13689. * Ticks generation input values:
  13690. * - 'auto': generates "optimal" ticks based on scale size and time options.
  13691. * - 'data': generates ticks from data (including labels from data {t|x|y} objects).
  13692. * - 'labels': generates ticks from user given `data.labels` values ONLY.
  13693. * @see https://github.com/chartjs/Chart.js/pull/4507
  13694. * @since 2.7.0
  13695. */
  13696. source: 'auto',
  13697. major: {
  13698. enabled: false
  13699. }
  13700. }
  13701. };
  13702. var scale_time = core_scale.extend({
  13703. initialize: function() {
  13704. this.mergeTicksOptions();
  13705. core_scale.prototype.initialize.call(this);
  13706. },
  13707. update: function() {
  13708. var me = this;
  13709. var options = me.options;
  13710. var time = options.time || (options.time = {});
  13711. var adapter = me._adapter = new core_adapters._date(options.adapters.date);
  13712. // DEPRECATIONS: output a message only one time per update
  13713. deprecated$1('time scale', time.format, 'time.format', 'time.parser');
  13714. deprecated$1('time scale', time.min, 'time.min', 'ticks.min');
  13715. deprecated$1('time scale', time.max, 'time.max', 'ticks.max');
  13716. // Backward compatibility: before introducing adapter, `displayFormats` was
  13717. // supposed to contain *all* unit/string pairs but this can't be resolved
  13718. // when loading the scale (adapters are loaded afterward), so let's populate
  13719. // missing formats on update
  13720. helpers$1.mergeIf(time.displayFormats, adapter.formats());
  13721. return core_scale.prototype.update.apply(me, arguments);
  13722. },
  13723. /**
  13724. * Allows data to be referenced via 't' attribute
  13725. */
  13726. getRightValue: function(rawValue) {
  13727. if (rawValue && rawValue.t !== undefined) {
  13728. rawValue = rawValue.t;
  13729. }
  13730. return core_scale.prototype.getRightValue.call(this, rawValue);
  13731. },
  13732. determineDataLimits: function() {
  13733. var me = this;
  13734. var chart = me.chart;
  13735. var adapter = me._adapter;
  13736. var options = me.options;
  13737. var unit = options.time.unit || 'day';
  13738. var min = MAX_INTEGER;
  13739. var max = MIN_INTEGER;
  13740. var timestamps = [];
  13741. var datasets = [];
  13742. var labels = [];
  13743. var i, j, ilen, jlen, data, timestamp, labelsAdded;
  13744. var dataLabels = me._getLabels();
  13745. for (i = 0, ilen = dataLabels.length; i < ilen; ++i) {
  13746. labels.push(parse(me, dataLabels[i]));
  13747. }
  13748. for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
  13749. if (chart.isDatasetVisible(i)) {
  13750. data = chart.data.datasets[i].data;
  13751. // Let's consider that all data have the same format.
  13752. if (helpers$1.isObject(data[0])) {
  13753. datasets[i] = [];
  13754. for (j = 0, jlen = data.length; j < jlen; ++j) {
  13755. timestamp = parse(me, data[j]);
  13756. timestamps.push(timestamp);
  13757. datasets[i][j] = timestamp;
  13758. }
  13759. } else {
  13760. datasets[i] = labels.slice(0);
  13761. if (!labelsAdded) {
  13762. timestamps = timestamps.concat(labels);
  13763. labelsAdded = true;
  13764. }
  13765. }
  13766. } else {
  13767. datasets[i] = [];
  13768. }
  13769. }
  13770. if (labels.length) {
  13771. min = Math.min(min, labels[0]);
  13772. max = Math.max(max, labels[labels.length - 1]);
  13773. }
  13774. if (timestamps.length) {
  13775. timestamps = ilen > 1 ? arrayUnique(timestamps).sort(sorter) : timestamps.sort(sorter);
  13776. min = Math.min(min, timestamps[0]);
  13777. max = Math.max(max, timestamps[timestamps.length - 1]);
  13778. }
  13779. min = parse(me, getMin(options)) || min;
  13780. max = parse(me, getMax(options)) || max;
  13781. // In case there is no valid min/max, set limits based on unit time option
  13782. min = min === MAX_INTEGER ? +adapter.startOf(Date.now(), unit) : min;
  13783. max = max === MIN_INTEGER ? +adapter.endOf(Date.now(), unit) + 1 : max;
  13784. // Make sure that max is strictly higher than min (required by the lookup table)
  13785. me.min = Math.min(min, max);
  13786. me.max = Math.max(min + 1, max);
  13787. // PRIVATE
  13788. me._table = [];
  13789. me._timestamps = {
  13790. data: timestamps,
  13791. datasets: datasets,
  13792. labels: labels
  13793. };
  13794. },
  13795. buildTicks: function() {
  13796. var me = this;
  13797. var min = me.min;
  13798. var max = me.max;
  13799. var options = me.options;
  13800. var tickOpts = options.ticks;
  13801. var timeOpts = options.time;
  13802. var timestamps = me._timestamps;
  13803. var ticks = [];
  13804. var capacity = me.getLabelCapacity(min);
  13805. var source = tickOpts.source;
  13806. var distribution = options.distribution;
  13807. var i, ilen, timestamp;
  13808. if (source === 'data' || (source === 'auto' && distribution === 'series')) {
  13809. timestamps = timestamps.data;
  13810. } else if (source === 'labels') {
  13811. timestamps = timestamps.labels;
  13812. } else {
  13813. timestamps = generate(me, min, max, capacity);
  13814. }
  13815. if (options.bounds === 'ticks' && timestamps.length) {
  13816. min = timestamps[0];
  13817. max = timestamps[timestamps.length - 1];
  13818. }
  13819. // Enforce limits with user min/max options
  13820. min = parse(me, getMin(options)) || min;
  13821. max = parse(me, getMax(options)) || max;
  13822. // Remove ticks outside the min/max range
  13823. for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
  13824. timestamp = timestamps[i];
  13825. if (timestamp >= min && timestamp <= max) {
  13826. ticks.push(timestamp);
  13827. }
  13828. }
  13829. me.min = min;
  13830. me.max = max;
  13831. // PRIVATE
  13832. // determineUnitForFormatting relies on the number of ticks so we don't use it when
  13833. // autoSkip is enabled because we don't yet know what the final number of ticks will be
  13834. me._unit = timeOpts.unit || (tickOpts.autoSkip
  13835. ? determineUnitForAutoTicks(timeOpts.minUnit, me.min, me.max, capacity)
  13836. : determineUnitForFormatting(me, ticks.length, timeOpts.minUnit, me.min, me.max));
  13837. me._majorUnit = !tickOpts.major.enabled || me._unit === 'year' ? undefined
  13838. : determineMajorUnit(me._unit);
  13839. me._table = buildLookupTable(me._timestamps.data, min, max, distribution);
  13840. me._offsets = computeOffsets(me._table, ticks, min, max, options);
  13841. if (tickOpts.reverse) {
  13842. ticks.reverse();
  13843. }
  13844. return ticksFromTimestamps(me, ticks, me._majorUnit);
  13845. },
  13846. getLabelForIndex: function(index, datasetIndex) {
  13847. var me = this;
  13848. var adapter = me._adapter;
  13849. var data = me.chart.data;
  13850. var timeOpts = me.options.time;
  13851. var label = data.labels && index < data.labels.length ? data.labels[index] : '';
  13852. var value = data.datasets[datasetIndex].data[index];
  13853. if (helpers$1.isObject(value)) {
  13854. label = me.getRightValue(value);
  13855. }
  13856. if (timeOpts.tooltipFormat) {
  13857. return adapter.format(toTimestamp(me, label), timeOpts.tooltipFormat);
  13858. }
  13859. if (typeof label === 'string') {
  13860. return label;
  13861. }
  13862. return adapter.format(toTimestamp(me, label), timeOpts.displayFormats.datetime);
  13863. },
  13864. /**
  13865. * Function to format an individual tick mark
  13866. * @private
  13867. */
  13868. tickFormatFunction: function(time, index, ticks, format) {
  13869. var me = this;
  13870. var adapter = me._adapter;
  13871. var options = me.options;
  13872. var formats = options.time.displayFormats;
  13873. var minorFormat = formats[me._unit];
  13874. var majorUnit = me._majorUnit;
  13875. var majorFormat = formats[majorUnit];
  13876. var tick = ticks[index];
  13877. var tickOpts = options.ticks;
  13878. var major = majorUnit && majorFormat && tick && tick.major;
  13879. var label = adapter.format(time, format ? format : major ? majorFormat : minorFormat);
  13880. var nestedTickOpts = major ? tickOpts.major : tickOpts.minor;
  13881. var formatter = resolve$5([
  13882. nestedTickOpts.callback,
  13883. nestedTickOpts.userCallback,
  13884. tickOpts.callback,
  13885. tickOpts.userCallback
  13886. ]);
  13887. return formatter ? formatter(label, index, ticks) : label;
  13888. },
  13889. convertTicksToLabels: function(ticks) {
  13890. var labels = [];
  13891. var i, ilen;
  13892. for (i = 0, ilen = ticks.length; i < ilen; ++i) {
  13893. labels.push(this.tickFormatFunction(ticks[i].value, i, ticks));
  13894. }
  13895. return labels;
  13896. },
  13897. /**
  13898. * @private
  13899. */
  13900. getPixelForOffset: function(time) {
  13901. var me = this;
  13902. var offsets = me._offsets;
  13903. var pos = interpolate$1(me._table, 'time', time, 'pos');
  13904. return me.getPixelForDecimal((offsets.start + pos) * offsets.factor);
  13905. },
  13906. getPixelForValue: function(value, index, datasetIndex) {
  13907. var me = this;
  13908. var time = null;
  13909. if (index !== undefined && datasetIndex !== undefined) {
  13910. time = me._timestamps.datasets[datasetIndex][index];
  13911. }
  13912. if (time === null) {
  13913. time = parse(me, value);
  13914. }
  13915. if (time !== null) {
  13916. return me.getPixelForOffset(time);
  13917. }
  13918. },
  13919. getPixelForTick: function(index) {
  13920. var ticks = this.getTicks();
  13921. return index >= 0 && index < ticks.length ?
  13922. this.getPixelForOffset(ticks[index].value) :
  13923. null;
  13924. },
  13925. getValueForPixel: function(pixel) {
  13926. var me = this;
  13927. var offsets = me._offsets;
  13928. var pos = me.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
  13929. var time = interpolate$1(me._table, 'pos', pos, 'time');
  13930. // DEPRECATION, we should return time directly
  13931. return me._adapter._create(time);
  13932. },
  13933. /**
  13934. * @private
  13935. */
  13936. _getLabelSize: function(label) {
  13937. var me = this;
  13938. var ticksOpts = me.options.ticks;
  13939. var tickLabelWidth = me.ctx.measureText(label).width;
  13940. var angle = helpers$1.toRadians(me.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);
  13941. var cosRotation = Math.cos(angle);
  13942. var sinRotation = Math.sin(angle);
  13943. var tickFontSize = valueOrDefault$d(ticksOpts.fontSize, core_defaults.global.defaultFontSize);
  13944. return {
  13945. w: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),
  13946. h: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)
  13947. };
  13948. },
  13949. /**
  13950. * Crude approximation of what the label width might be
  13951. * @private
  13952. */
  13953. getLabelWidth: function(label) {
  13954. return this._getLabelSize(label).w;
  13955. },
  13956. /**
  13957. * @private
  13958. */
  13959. getLabelCapacity: function(exampleTime) {
  13960. var me = this;
  13961. var timeOpts = me.options.time;
  13962. var displayFormats = timeOpts.displayFormats;
  13963. // pick the longest format (milliseconds) for guestimation
  13964. var format = displayFormats[timeOpts.unit] || displayFormats.millisecond;
  13965. var exampleLabel = me.tickFormatFunction(exampleTime, 0, ticksFromTimestamps(me, [exampleTime], me._majorUnit), format);
  13966. var size = me._getLabelSize(exampleLabel);
  13967. var capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h);
  13968. if (me.options.offset) {
  13969. capacity--;
  13970. }
  13971. return capacity > 0 ? capacity : 1;
  13972. }
  13973. });
  13974. // INTERNAL: static default options, registered in src/index.js
  13975. var _defaults$4 = defaultConfig$4;
  13976. scale_time._defaults = _defaults$4;
  13977. var scales = {
  13978. category: scale_category,
  13979. linear: scale_linear,
  13980. logarithmic: scale_logarithmic,
  13981. radialLinear: scale_radialLinear,
  13982. time: scale_time
  13983. };
  13984. var FORMATS = {
  13985. datetime: 'MMM D, YYYY, h:mm:ss a',
  13986. millisecond: 'h:mm:ss.SSS a',
  13987. second: 'h:mm:ss a',
  13988. minute: 'h:mm a',
  13989. hour: 'hA',
  13990. day: 'MMM D',
  13991. week: 'll',
  13992. month: 'MMM YYYY',
  13993. quarter: '[Q]Q - YYYY',
  13994. year: 'YYYY'
  13995. };
  13996. core_adapters._date.override(typeof moment === 'function' ? {
  13997. _id: 'moment', // DEBUG ONLY
  13998. formats: function() {
  13999. return FORMATS;
  14000. },
  14001. parse: function(value, format) {
  14002. if (typeof value === 'string' && typeof format === 'string') {
  14003. value = moment(value, format);
  14004. } else if (!(value instanceof moment)) {
  14005. value = moment(value);
  14006. }
  14007. return value.isValid() ? value.valueOf() : null;
  14008. },
  14009. format: function(time, format) {
  14010. return moment(time).format(format);
  14011. },
  14012. add: function(time, amount, unit) {
  14013. return moment(time).add(amount, unit).valueOf();
  14014. },
  14015. diff: function(max, min, unit) {
  14016. return moment(max).diff(moment(min), unit);
  14017. },
  14018. startOf: function(time, unit, weekday) {
  14019. time = moment(time);
  14020. if (unit === 'isoWeek') {
  14021. return time.isoWeekday(weekday).valueOf();
  14022. }
  14023. return time.startOf(unit).valueOf();
  14024. },
  14025. endOf: function(time, unit) {
  14026. return moment(time).endOf(unit).valueOf();
  14027. },
  14028. // DEPRECATIONS
  14029. /**
  14030. * Provided for backward compatibility with scale.getValueForPixel().
  14031. * @deprecated since version 2.8.0
  14032. * @todo remove at version 3
  14033. * @private
  14034. */
  14035. _create: function(time) {
  14036. return moment(time);
  14037. },
  14038. } : {});
  14039. core_defaults._set('global', {
  14040. plugins: {
  14041. filler: {
  14042. propagate: true
  14043. }
  14044. }
  14045. });
  14046. var mappers = {
  14047. dataset: function(source) {
  14048. var index = source.fill;
  14049. var chart = source.chart;
  14050. var meta = chart.getDatasetMeta(index);
  14051. var visible = meta && chart.isDatasetVisible(index);
  14052. var points = (visible && meta.dataset._children) || [];
  14053. var length = points.length || 0;
  14054. return !length ? null : function(point, i) {
  14055. return (i < length && points[i]._view) || null;
  14056. };
  14057. },
  14058. boundary: function(source) {
  14059. var boundary = source.boundary;
  14060. var x = boundary ? boundary.x : null;
  14061. var y = boundary ? boundary.y : null;
  14062. if (helpers$1.isArray(boundary)) {
  14063. return function(point, i) {
  14064. return boundary[i];
  14065. };
  14066. }
  14067. return function(point) {
  14068. return {
  14069. x: x === null ? point.x : x,
  14070. y: y === null ? point.y : y,
  14071. };
  14072. };
  14073. }
  14074. };
  14075. // @todo if (fill[0] === '#')
  14076. function decodeFill(el, index, count) {
  14077. var model = el._model || {};
  14078. var fill = model.fill;
  14079. var target;
  14080. if (fill === undefined) {
  14081. fill = !!model.backgroundColor;
  14082. }
  14083. if (fill === false || fill === null) {
  14084. return false;
  14085. }
  14086. if (fill === true) {
  14087. return 'origin';
  14088. }
  14089. target = parseFloat(fill, 10);
  14090. if (isFinite(target) && Math.floor(target) === target) {
  14091. if (fill[0] === '-' || fill[0] === '+') {
  14092. target = index + target;
  14093. }
  14094. if (target === index || target < 0 || target >= count) {
  14095. return false;
  14096. }
  14097. return target;
  14098. }
  14099. switch (fill) {
  14100. // compatibility
  14101. case 'bottom':
  14102. return 'start';
  14103. case 'top':
  14104. return 'end';
  14105. case 'zero':
  14106. return 'origin';
  14107. // supported boundaries
  14108. case 'origin':
  14109. case 'start':
  14110. case 'end':
  14111. return fill;
  14112. // invalid fill values
  14113. default:
  14114. return false;
  14115. }
  14116. }
  14117. function computeLinearBoundary(source) {
  14118. var model = source.el._model || {};
  14119. var scale = source.el._scale || {};
  14120. var fill = source.fill;
  14121. var target = null;
  14122. var horizontal;
  14123. if (isFinite(fill)) {
  14124. return null;
  14125. }
  14126. // Backward compatibility: until v3, we still need to support boundary values set on
  14127. // the model (scaleTop, scaleBottom and scaleZero) because some external plugins and
  14128. // controllers might still use it (e.g. the Smith chart).
  14129. if (fill === 'start') {
  14130. target = model.scaleBottom === undefined ? scale.bottom : model.scaleBottom;
  14131. } else if (fill === 'end') {
  14132. target = model.scaleTop === undefined ? scale.top : model.scaleTop;
  14133. } else if (model.scaleZero !== undefined) {
  14134. target = model.scaleZero;
  14135. } else if (scale.getBasePixel) {
  14136. target = scale.getBasePixel();
  14137. }
  14138. if (target !== undefined && target !== null) {
  14139. if (target.x !== undefined && target.y !== undefined) {
  14140. return target;
  14141. }
  14142. if (helpers$1.isFinite(target)) {
  14143. horizontal = scale.isHorizontal();
  14144. return {
  14145. x: horizontal ? target : null,
  14146. y: horizontal ? null : target
  14147. };
  14148. }
  14149. }
  14150. return null;
  14151. }
  14152. function computeCircularBoundary(source) {
  14153. var scale = source.el._scale;
  14154. var options = scale.options;
  14155. var length = scale.chart.data.labels.length;
  14156. var fill = source.fill;
  14157. var target = [];
  14158. var start, end, center, i, point;
  14159. if (!length) {
  14160. return null;
  14161. }
  14162. start = options.ticks.reverse ? scale.max : scale.min;
  14163. end = options.ticks.reverse ? scale.min : scale.max;
  14164. center = scale.getPointPositionForValue(0, start);
  14165. for (i = 0; i < length; ++i) {
  14166. point = fill === 'start' || fill === 'end'
  14167. ? scale.getPointPositionForValue(i, fill === 'start' ? start : end)
  14168. : scale.getBasePosition(i);
  14169. if (options.gridLines.circular) {
  14170. point.cx = center.x;
  14171. point.cy = center.y;
  14172. point.angle = scale.getIndexAngle(i) - Math.PI / 2;
  14173. }
  14174. target.push(point);
  14175. }
  14176. return target;
  14177. }
  14178. function computeBoundary(source) {
  14179. var scale = source.el._scale || {};
  14180. if (scale.getPointPositionForValue) {
  14181. return computeCircularBoundary(source);
  14182. }
  14183. return computeLinearBoundary(source);
  14184. }
  14185. function resolveTarget(sources, index, propagate) {
  14186. var source = sources[index];
  14187. var fill = source.fill;
  14188. var visited = [index];
  14189. var target;
  14190. if (!propagate) {
  14191. return fill;
  14192. }
  14193. while (fill !== false && visited.indexOf(fill) === -1) {
  14194. if (!isFinite(fill)) {
  14195. return fill;
  14196. }
  14197. target = sources[fill];
  14198. if (!target) {
  14199. return false;
  14200. }
  14201. if (target.visible) {
  14202. return fill;
  14203. }
  14204. visited.push(fill);
  14205. fill = target.fill;
  14206. }
  14207. return false;
  14208. }
  14209. function createMapper(source) {
  14210. var fill = source.fill;
  14211. var type = 'dataset';
  14212. if (fill === false) {
  14213. return null;
  14214. }
  14215. if (!isFinite(fill)) {
  14216. type = 'boundary';
  14217. }
  14218. return mappers[type](source);
  14219. }
  14220. function isDrawable(point) {
  14221. return point && !point.skip;
  14222. }
  14223. function drawArea(ctx, curve0, curve1, len0, len1) {
  14224. var i, cx, cy, r;
  14225. if (!len0 || !len1) {
  14226. return;
  14227. }
  14228. // building first area curve (normal)
  14229. ctx.moveTo(curve0[0].x, curve0[0].y);
  14230. for (i = 1; i < len0; ++i) {
  14231. helpers$1.canvas.lineTo(ctx, curve0[i - 1], curve0[i]);
  14232. }
  14233. if (curve1[0].angle !== undefined) {
  14234. cx = curve1[0].cx;
  14235. cy = curve1[0].cy;
  14236. r = Math.sqrt(Math.pow(curve1[0].x - cx, 2) + Math.pow(curve1[0].y - cy, 2));
  14237. for (i = len1 - 1; i > 0; --i) {
  14238. ctx.arc(cx, cy, r, curve1[i].angle, curve1[i - 1].angle, true);
  14239. }
  14240. return;
  14241. }
  14242. // joining the two area curves
  14243. ctx.lineTo(curve1[len1 - 1].x, curve1[len1 - 1].y);
  14244. // building opposite area curve (reverse)
  14245. for (i = len1 - 1; i > 0; --i) {
  14246. helpers$1.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true);
  14247. }
  14248. }
  14249. function doFill(ctx, points, mapper, view, color, loop) {
  14250. var count = points.length;
  14251. var span = view.spanGaps;
  14252. var curve0 = [];
  14253. var curve1 = [];
  14254. var len0 = 0;
  14255. var len1 = 0;
  14256. var i, ilen, index, p0, p1, d0, d1, loopOffset;
  14257. ctx.beginPath();
  14258. for (i = 0, ilen = count; i < ilen; ++i) {
  14259. index = i % count;
  14260. p0 = points[index]._view;
  14261. p1 = mapper(p0, index, view);
  14262. d0 = isDrawable(p0);
  14263. d1 = isDrawable(p1);
  14264. if (loop && loopOffset === undefined && d0) {
  14265. loopOffset = i + 1;
  14266. ilen = count + loopOffset;
  14267. }
  14268. if (d0 && d1) {
  14269. len0 = curve0.push(p0);
  14270. len1 = curve1.push(p1);
  14271. } else if (len0 && len1) {
  14272. if (!span) {
  14273. drawArea(ctx, curve0, curve1, len0, len1);
  14274. len0 = len1 = 0;
  14275. curve0 = [];
  14276. curve1 = [];
  14277. } else {
  14278. if (d0) {
  14279. curve0.push(p0);
  14280. }
  14281. if (d1) {
  14282. curve1.push(p1);
  14283. }
  14284. }
  14285. }
  14286. }
  14287. drawArea(ctx, curve0, curve1, len0, len1);
  14288. ctx.closePath();
  14289. ctx.fillStyle = color;
  14290. ctx.fill();
  14291. }
  14292. var plugin_filler = {
  14293. id: 'filler',
  14294. afterDatasetsUpdate: function(chart, options) {
  14295. var count = (chart.data.datasets || []).length;
  14296. var propagate = options.propagate;
  14297. var sources = [];
  14298. var meta, i, el, source;
  14299. for (i = 0; i < count; ++i) {
  14300. meta = chart.getDatasetMeta(i);
  14301. el = meta.dataset;
  14302. source = null;
  14303. if (el && el._model && el instanceof elements.Line) {
  14304. source = {
  14305. visible: chart.isDatasetVisible(i),
  14306. fill: decodeFill(el, i, count),
  14307. chart: chart,
  14308. el: el
  14309. };
  14310. }
  14311. meta.$filler = source;
  14312. sources.push(source);
  14313. }
  14314. for (i = 0; i < count; ++i) {
  14315. source = sources[i];
  14316. if (!source) {
  14317. continue;
  14318. }
  14319. source.fill = resolveTarget(sources, i, propagate);
  14320. source.boundary = computeBoundary(source);
  14321. source.mapper = createMapper(source);
  14322. }
  14323. },
  14324. beforeDatasetsDraw: function(chart) {
  14325. var metasets = chart._getSortedVisibleDatasetMetas();
  14326. var ctx = chart.ctx;
  14327. var meta, i, el, view, points, mapper, color;
  14328. for (i = metasets.length - 1; i >= 0; --i) {
  14329. meta = metasets[i].$filler;
  14330. if (!meta || !meta.visible) {
  14331. continue;
  14332. }
  14333. el = meta.el;
  14334. view = el._view;
  14335. points = el._children || [];
  14336. mapper = meta.mapper;
  14337. color = view.backgroundColor || core_defaults.global.defaultColor;
  14338. if (mapper && color && points.length) {
  14339. helpers$1.canvas.clipArea(ctx, chart.chartArea);
  14340. doFill(ctx, points, mapper, view, color, el._loop);
  14341. helpers$1.canvas.unclipArea(ctx);
  14342. }
  14343. }
  14344. }
  14345. };
  14346. var getRtlHelper$1 = helpers$1.rtl.getRtlAdapter;
  14347. var noop$1 = helpers$1.noop;
  14348. var valueOrDefault$e = helpers$1.valueOrDefault;
  14349. core_defaults._set('global', {
  14350. legend: {
  14351. display: true,
  14352. position: 'top',
  14353. align: 'center',
  14354. fullWidth: true,
  14355. reverse: false,
  14356. weight: 1000,
  14357. // a callback that will handle
  14358. onClick: function(e, legendItem) {
  14359. var index = legendItem.datasetIndex;
  14360. var ci = this.chart;
  14361. var meta = ci.getDatasetMeta(index);
  14362. // See controller.isDatasetVisible comment
  14363. meta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null;
  14364. // We hid a dataset ... rerender the chart
  14365. ci.update();
  14366. },
  14367. onHover: null,
  14368. onLeave: null,
  14369. labels: {
  14370. boxWidth: 40,
  14371. padding: 10,
  14372. // Generates labels shown in the legend
  14373. // Valid properties to return:
  14374. // text : text to display
  14375. // fillStyle : fill of coloured box
  14376. // strokeStyle: stroke of coloured box
  14377. // hidden : if this legend item refers to a hidden item
  14378. // lineCap : cap style for line
  14379. // lineDash
  14380. // lineDashOffset :
  14381. // lineJoin :
  14382. // lineWidth :
  14383. generateLabels: function(chart) {
  14384. var datasets = chart.data.datasets;
  14385. var options = chart.options.legend || {};
  14386. var usePointStyle = options.labels && options.labels.usePointStyle;
  14387. return chart._getSortedDatasetMetas().map(function(meta) {
  14388. var style = meta.controller.getStyle(usePointStyle ? 0 : undefined);
  14389. return {
  14390. text: datasets[meta.index].label,
  14391. fillStyle: style.backgroundColor,
  14392. hidden: !chart.isDatasetVisible(meta.index),
  14393. lineCap: style.borderCapStyle,
  14394. lineDash: style.borderDash,
  14395. lineDashOffset: style.borderDashOffset,
  14396. lineJoin: style.borderJoinStyle,
  14397. lineWidth: style.borderWidth,
  14398. strokeStyle: style.borderColor,
  14399. pointStyle: style.pointStyle,
  14400. rotation: style.rotation,
  14401. // Below is extra data used for toggling the datasets
  14402. datasetIndex: meta.index
  14403. };
  14404. }, this);
  14405. }
  14406. }
  14407. },
  14408. legendCallback: function(chart) {
  14409. var list = document.createElement('ul');
  14410. var datasets = chart.data.datasets;
  14411. var i, ilen, listItem, listItemSpan;
  14412. list.setAttribute('class', chart.id + '-legend');
  14413. for (i = 0, ilen = datasets.length; i < ilen; i++) {
  14414. listItem = list.appendChild(document.createElement('li'));
  14415. listItemSpan = listItem.appendChild(document.createElement('span'));
  14416. listItemSpan.style.backgroundColor = datasets[i].backgroundColor;
  14417. if (datasets[i].label) {
  14418. listItem.appendChild(document.createTextNode(datasets[i].label));
  14419. }
  14420. }
  14421. return list.outerHTML;
  14422. }
  14423. });
  14424. /**
  14425. * Helper function to get the box width based on the usePointStyle option
  14426. * @param {object} labelopts - the label options on the legend
  14427. * @param {number} fontSize - the label font size
  14428. * @return {number} width of the color box area
  14429. */
  14430. function getBoxWidth(labelOpts, fontSize) {
  14431. return labelOpts.usePointStyle && labelOpts.boxWidth > fontSize ?
  14432. fontSize :
  14433. labelOpts.boxWidth;
  14434. }
  14435. /**
  14436. * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!
  14437. */
  14438. var Legend = core_element.extend({
  14439. initialize: function(config) {
  14440. var me = this;
  14441. helpers$1.extend(me, config);
  14442. // Contains hit boxes for each dataset (in dataset order)
  14443. me.legendHitBoxes = [];
  14444. /**
  14445. * @private
  14446. */
  14447. me._hoveredItem = null;
  14448. // Are we in doughnut mode which has a different data type
  14449. me.doughnutMode = false;
  14450. },
  14451. // These methods are ordered by lifecycle. Utilities then follow.
  14452. // Any function defined here is inherited by all legend types.
  14453. // Any function can be extended by the legend type
  14454. beforeUpdate: noop$1,
  14455. update: function(maxWidth, maxHeight, margins) {
  14456. var me = this;
  14457. // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
  14458. me.beforeUpdate();
  14459. // Absorb the master measurements
  14460. me.maxWidth = maxWidth;
  14461. me.maxHeight = maxHeight;
  14462. me.margins = margins;
  14463. // Dimensions
  14464. me.beforeSetDimensions();
  14465. me.setDimensions();
  14466. me.afterSetDimensions();
  14467. // Labels
  14468. me.beforeBuildLabels();
  14469. me.buildLabels();
  14470. me.afterBuildLabels();
  14471. // Fit
  14472. me.beforeFit();
  14473. me.fit();
  14474. me.afterFit();
  14475. //
  14476. me.afterUpdate();
  14477. return me.minSize;
  14478. },
  14479. afterUpdate: noop$1,
  14480. //
  14481. beforeSetDimensions: noop$1,
  14482. setDimensions: function() {
  14483. var me = this;
  14484. // Set the unconstrained dimension before label rotation
  14485. if (me.isHorizontal()) {
  14486. // Reset position before calculating rotation
  14487. me.width = me.maxWidth;
  14488. me.left = 0;
  14489. me.right = me.width;
  14490. } else {
  14491. me.height = me.maxHeight;
  14492. // Reset position before calculating rotation
  14493. me.top = 0;
  14494. me.bottom = me.height;
  14495. }
  14496. // Reset padding
  14497. me.paddingLeft = 0;
  14498. me.paddingTop = 0;
  14499. me.paddingRight = 0;
  14500. me.paddingBottom = 0;
  14501. // Reset minSize
  14502. me.minSize = {
  14503. width: 0,
  14504. height: 0
  14505. };
  14506. },
  14507. afterSetDimensions: noop$1,
  14508. //
  14509. beforeBuildLabels: noop$1,
  14510. buildLabels: function() {
  14511. var me = this;
  14512. var labelOpts = me.options.labels || {};
  14513. var legendItems = helpers$1.callback(labelOpts.generateLabels, [me.chart], me) || [];
  14514. if (labelOpts.filter) {
  14515. legendItems = legendItems.filter(function(item) {
  14516. return labelOpts.filter(item, me.chart.data);
  14517. });
  14518. }
  14519. if (me.options.reverse) {
  14520. legendItems.reverse();
  14521. }
  14522. me.legendItems = legendItems;
  14523. },
  14524. afterBuildLabels: noop$1,
  14525. //
  14526. beforeFit: noop$1,
  14527. fit: function() {
  14528. var me = this;
  14529. var opts = me.options;
  14530. var labelOpts = opts.labels;
  14531. var display = opts.display;
  14532. var ctx = me.ctx;
  14533. var labelFont = helpers$1.options._parseFont(labelOpts);
  14534. var fontSize = labelFont.size;
  14535. // Reset hit boxes
  14536. var hitboxes = me.legendHitBoxes = [];
  14537. var minSize = me.minSize;
  14538. var isHorizontal = me.isHorizontal();
  14539. if (isHorizontal) {
  14540. minSize.width = me.maxWidth; // fill all the width
  14541. minSize.height = display ? 10 : 0;
  14542. } else {
  14543. minSize.width = display ? 10 : 0;
  14544. minSize.height = me.maxHeight; // fill all the height
  14545. }
  14546. // Increase sizes here
  14547. if (!display) {
  14548. me.width = minSize.width = me.height = minSize.height = 0;
  14549. return;
  14550. }
  14551. ctx.font = labelFont.string;
  14552. if (isHorizontal) {
  14553. // Labels
  14554. // Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one
  14555. var lineWidths = me.lineWidths = [0];
  14556. var totalHeight = 0;
  14557. ctx.textAlign = 'left';
  14558. ctx.textBaseline = 'middle';
  14559. helpers$1.each(me.legendItems, function(legendItem, i) {
  14560. var boxWidth = getBoxWidth(labelOpts, fontSize);
  14561. var width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
  14562. if (i === 0 || lineWidths[lineWidths.length - 1] + width + 2 * labelOpts.padding > minSize.width) {
  14563. totalHeight += fontSize + labelOpts.padding;
  14564. lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;
  14565. }
  14566. // Store the hitbox width and height here. Final position will be updated in `draw`
  14567. hitboxes[i] = {
  14568. left: 0,
  14569. top: 0,
  14570. width: width,
  14571. height: fontSize
  14572. };
  14573. lineWidths[lineWidths.length - 1] += width + labelOpts.padding;
  14574. });
  14575. minSize.height += totalHeight;
  14576. } else {
  14577. var vPadding = labelOpts.padding;
  14578. var columnWidths = me.columnWidths = [];
  14579. var columnHeights = me.columnHeights = [];
  14580. var totalWidth = labelOpts.padding;
  14581. var currentColWidth = 0;
  14582. var currentColHeight = 0;
  14583. helpers$1.each(me.legendItems, function(legendItem, i) {
  14584. var boxWidth = getBoxWidth(labelOpts, fontSize);
  14585. var itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
  14586. // If too tall, go to new column
  14587. if (i > 0 && currentColHeight + fontSize + 2 * vPadding > minSize.height) {
  14588. totalWidth += currentColWidth + labelOpts.padding;
  14589. columnWidths.push(currentColWidth); // previous column width
  14590. columnHeights.push(currentColHeight);
  14591. currentColWidth = 0;
  14592. currentColHeight = 0;
  14593. }
  14594. // Get max width
  14595. currentColWidth = Math.max(currentColWidth, itemWidth);
  14596. currentColHeight += fontSize + vPadding;
  14597. // Store the hitbox width and height here. Final position will be updated in `draw`
  14598. hitboxes[i] = {
  14599. left: 0,
  14600. top: 0,
  14601. width: itemWidth,
  14602. height: fontSize
  14603. };
  14604. });
  14605. totalWidth += currentColWidth;
  14606. columnWidths.push(currentColWidth);
  14607. columnHeights.push(currentColHeight);
  14608. minSize.width += totalWidth;
  14609. }
  14610. me.width = minSize.width;
  14611. me.height = minSize.height;
  14612. },
  14613. afterFit: noop$1,
  14614. // Shared Methods
  14615. isHorizontal: function() {
  14616. return this.options.position === 'top' || this.options.position === 'bottom';
  14617. },
  14618. // Actually draw the legend on the canvas
  14619. draw: function() {
  14620. var me = this;
  14621. var opts = me.options;
  14622. var labelOpts = opts.labels;
  14623. var globalDefaults = core_defaults.global;
  14624. var defaultColor = globalDefaults.defaultColor;
  14625. var lineDefault = globalDefaults.elements.line;
  14626. var legendHeight = me.height;
  14627. var columnHeights = me.columnHeights;
  14628. var legendWidth = me.width;
  14629. var lineWidths = me.lineWidths;
  14630. if (!opts.display) {
  14631. return;
  14632. }
  14633. var rtlHelper = getRtlHelper$1(opts.rtl, me.left, me.minSize.width);
  14634. var ctx = me.ctx;
  14635. var fontColor = valueOrDefault$e(labelOpts.fontColor, globalDefaults.defaultFontColor);
  14636. var labelFont = helpers$1.options._parseFont(labelOpts);
  14637. var fontSize = labelFont.size;
  14638. var cursor;
  14639. // Canvas setup
  14640. ctx.textAlign = rtlHelper.textAlign('left');
  14641. ctx.textBaseline = 'middle';
  14642. ctx.lineWidth = 0.5;
  14643. ctx.strokeStyle = fontColor; // for strikethrough effect
  14644. ctx.fillStyle = fontColor; // render in correct colour
  14645. ctx.font = labelFont.string;
  14646. var boxWidth = getBoxWidth(labelOpts, fontSize);
  14647. var hitboxes = me.legendHitBoxes;
  14648. // current position
  14649. var drawLegendBox = function(x, y, legendItem) {
  14650. if (isNaN(boxWidth) || boxWidth <= 0) {
  14651. return;
  14652. }
  14653. // Set the ctx for the box
  14654. ctx.save();
  14655. var lineWidth = valueOrDefault$e(legendItem.lineWidth, lineDefault.borderWidth);
  14656. ctx.fillStyle = valueOrDefault$e(legendItem.fillStyle, defaultColor);
  14657. ctx.lineCap = valueOrDefault$e(legendItem.lineCap, lineDefault.borderCapStyle);
  14658. ctx.lineDashOffset = valueOrDefault$e(legendItem.lineDashOffset, lineDefault.borderDashOffset);
  14659. ctx.lineJoin = valueOrDefault$e(legendItem.lineJoin, lineDefault.borderJoinStyle);
  14660. ctx.lineWidth = lineWidth;
  14661. ctx.strokeStyle = valueOrDefault$e(legendItem.strokeStyle, defaultColor);
  14662. if (ctx.setLineDash) {
  14663. // IE 9 and 10 do not support line dash
  14664. ctx.setLineDash(valueOrDefault$e(legendItem.lineDash, lineDefault.borderDash));
  14665. }
  14666. if (labelOpts && labelOpts.usePointStyle) {
  14667. // Recalculate x and y for drawPoint() because its expecting
  14668. // x and y to be center of figure (instead of top left)
  14669. var radius = boxWidth * Math.SQRT2 / 2;
  14670. var centerX = rtlHelper.xPlus(x, boxWidth / 2);
  14671. var centerY = y + fontSize / 2;
  14672. // Draw pointStyle as legend symbol
  14673. helpers$1.canvas.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY, legendItem.rotation);
  14674. } else {
  14675. // Draw box as legend symbol
  14676. ctx.fillRect(rtlHelper.leftForLtr(x, boxWidth), y, boxWidth, fontSize);
  14677. if (lineWidth !== 0) {
  14678. ctx.strokeRect(rtlHelper.leftForLtr(x, boxWidth), y, boxWidth, fontSize);
  14679. }
  14680. }
  14681. ctx.restore();
  14682. };
  14683. var fillText = function(x, y, legendItem, textWidth) {
  14684. var halfFontSize = fontSize / 2;
  14685. var xLeft = rtlHelper.xPlus(x, boxWidth + halfFontSize);
  14686. var yMiddle = y + halfFontSize;
  14687. ctx.fillText(legendItem.text, xLeft, yMiddle);
  14688. if (legendItem.hidden) {
  14689. // Strikethrough the text if hidden
  14690. ctx.beginPath();
  14691. ctx.lineWidth = 2;
  14692. ctx.moveTo(xLeft, yMiddle);
  14693. ctx.lineTo(rtlHelper.xPlus(xLeft, textWidth), yMiddle);
  14694. ctx.stroke();
  14695. }
  14696. };
  14697. var alignmentOffset = function(dimension, blockSize) {
  14698. switch (opts.align) {
  14699. case 'start':
  14700. return labelOpts.padding;
  14701. case 'end':
  14702. return dimension - blockSize;
  14703. default: // center
  14704. return (dimension - blockSize + labelOpts.padding) / 2;
  14705. }
  14706. };
  14707. // Horizontal
  14708. var isHorizontal = me.isHorizontal();
  14709. if (isHorizontal) {
  14710. cursor = {
  14711. x: me.left + alignmentOffset(legendWidth, lineWidths[0]),
  14712. y: me.top + labelOpts.padding,
  14713. line: 0
  14714. };
  14715. } else {
  14716. cursor = {
  14717. x: me.left + labelOpts.padding,
  14718. y: me.top + alignmentOffset(legendHeight, columnHeights[0]),
  14719. line: 0
  14720. };
  14721. }
  14722. helpers$1.rtl.overrideTextDirection(me.ctx, opts.textDirection);
  14723. var itemHeight = fontSize + labelOpts.padding;
  14724. helpers$1.each(me.legendItems, function(legendItem, i) {
  14725. var textWidth = ctx.measureText(legendItem.text).width;
  14726. var width = boxWidth + (fontSize / 2) + textWidth;
  14727. var x = cursor.x;
  14728. var y = cursor.y;
  14729. rtlHelper.setWidth(me.minSize.width);
  14730. // Use (me.left + me.minSize.width) and (me.top + me.minSize.height)
  14731. // instead of me.right and me.bottom because me.width and me.height
  14732. // may have been changed since me.minSize was calculated
  14733. if (isHorizontal) {
  14734. if (i > 0 && x + width + labelOpts.padding > me.left + me.minSize.width) {
  14735. y = cursor.y += itemHeight;
  14736. cursor.line++;
  14737. x = cursor.x = me.left + alignmentOffset(legendWidth, lineWidths[cursor.line]);
  14738. }
  14739. } else if (i > 0 && y + itemHeight > me.top + me.minSize.height) {
  14740. x = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;
  14741. cursor.line++;
  14742. y = cursor.y = me.top + alignmentOffset(legendHeight, columnHeights[cursor.line]);
  14743. }
  14744. var realX = rtlHelper.x(x);
  14745. drawLegendBox(realX, y, legendItem);
  14746. hitboxes[i].left = rtlHelper.leftForLtr(realX, hitboxes[i].width);
  14747. hitboxes[i].top = y;
  14748. // Fill the actual label
  14749. fillText(realX, y, legendItem, textWidth);
  14750. if (isHorizontal) {
  14751. cursor.x += width + labelOpts.padding;
  14752. } else {
  14753. cursor.y += itemHeight;
  14754. }
  14755. });
  14756. helpers$1.rtl.restoreTextDirection(me.ctx, opts.textDirection);
  14757. },
  14758. /**
  14759. * @private
  14760. */
  14761. _getLegendItemAt: function(x, y) {
  14762. var me = this;
  14763. var i, hitBox, lh;
  14764. if (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {
  14765. // See if we are touching one of the dataset boxes
  14766. lh = me.legendHitBoxes;
  14767. for (i = 0; i < lh.length; ++i) {
  14768. hitBox = lh[i];
  14769. if (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {
  14770. // Touching an element
  14771. return me.legendItems[i];
  14772. }
  14773. }
  14774. }
  14775. return null;
  14776. },
  14777. /**
  14778. * Handle an event
  14779. * @private
  14780. * @param {IEvent} event - The event to handle
  14781. */
  14782. handleEvent: function(e) {
  14783. var me = this;
  14784. var opts = me.options;
  14785. var type = e.type === 'mouseup' ? 'click' : e.type;
  14786. var hoveredItem;
  14787. if (type === 'mousemove') {
  14788. if (!opts.onHover && !opts.onLeave) {
  14789. return;
  14790. }
  14791. } else if (type === 'click') {
  14792. if (!opts.onClick) {
  14793. return;
  14794. }
  14795. } else {
  14796. return;
  14797. }
  14798. // Chart event already has relative position in it
  14799. hoveredItem = me._getLegendItemAt(e.x, e.y);
  14800. if (type === 'click') {
  14801. if (hoveredItem && opts.onClick) {
  14802. // use e.native for backwards compatibility
  14803. opts.onClick.call(me, e.native, hoveredItem);
  14804. }
  14805. } else {
  14806. if (opts.onLeave && hoveredItem !== me._hoveredItem) {
  14807. if (me._hoveredItem) {
  14808. opts.onLeave.call(me, e.native, me._hoveredItem);
  14809. }
  14810. me._hoveredItem = hoveredItem;
  14811. }
  14812. if (opts.onHover && hoveredItem) {
  14813. // use e.native for backwards compatibility
  14814. opts.onHover.call(me, e.native, hoveredItem);
  14815. }
  14816. }
  14817. }
  14818. });
  14819. function createNewLegendAndAttach(chart, legendOpts) {
  14820. var legend = new Legend({
  14821. ctx: chart.ctx,
  14822. options: legendOpts,
  14823. chart: chart
  14824. });
  14825. core_layouts.configure(chart, legend, legendOpts);
  14826. core_layouts.addBox(chart, legend);
  14827. chart.legend = legend;
  14828. }
  14829. var plugin_legend = {
  14830. id: 'legend',
  14831. /**
  14832. * Backward compatibility: since 2.1.5, the legend is registered as a plugin, making
  14833. * Chart.Legend obsolete. To avoid a breaking change, we export the Legend as part of
  14834. * the plugin, which one will be re-exposed in the chart.js file.
  14835. * https://github.com/chartjs/Chart.js/pull/2640
  14836. * @private
  14837. */
  14838. _element: Legend,
  14839. beforeInit: function(chart) {
  14840. var legendOpts = chart.options.legend;
  14841. if (legendOpts) {
  14842. createNewLegendAndAttach(chart, legendOpts);
  14843. }
  14844. },
  14845. beforeUpdate: function(chart) {
  14846. var legendOpts = chart.options.legend;
  14847. var legend = chart.legend;
  14848. if (legendOpts) {
  14849. helpers$1.mergeIf(legendOpts, core_defaults.global.legend);
  14850. if (legend) {
  14851. core_layouts.configure(chart, legend, legendOpts);
  14852. legend.options = legendOpts;
  14853. } else {
  14854. createNewLegendAndAttach(chart, legendOpts);
  14855. }
  14856. } else if (legend) {
  14857. core_layouts.removeBox(chart, legend);
  14858. delete chart.legend;
  14859. }
  14860. },
  14861. afterEvent: function(chart, e) {
  14862. var legend = chart.legend;
  14863. if (legend) {
  14864. legend.handleEvent(e);
  14865. }
  14866. }
  14867. };
  14868. var noop$2 = helpers$1.noop;
  14869. core_defaults._set('global', {
  14870. title: {
  14871. display: false,
  14872. fontStyle: 'bold',
  14873. fullWidth: true,
  14874. padding: 10,
  14875. position: 'top',
  14876. text: '',
  14877. weight: 2000 // by default greater than legend (1000) to be above
  14878. }
  14879. });
  14880. /**
  14881. * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!
  14882. */
  14883. var Title = core_element.extend({
  14884. initialize: function(config) {
  14885. var me = this;
  14886. helpers$1.extend(me, config);
  14887. // Contains hit boxes for each dataset (in dataset order)
  14888. me.legendHitBoxes = [];
  14889. },
  14890. // These methods are ordered by lifecycle. Utilities then follow.
  14891. beforeUpdate: noop$2,
  14892. update: function(maxWidth, maxHeight, margins) {
  14893. var me = this;
  14894. // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
  14895. me.beforeUpdate();
  14896. // Absorb the master measurements
  14897. me.maxWidth = maxWidth;
  14898. me.maxHeight = maxHeight;
  14899. me.margins = margins;
  14900. // Dimensions
  14901. me.beforeSetDimensions();
  14902. me.setDimensions();
  14903. me.afterSetDimensions();
  14904. // Labels
  14905. me.beforeBuildLabels();
  14906. me.buildLabels();
  14907. me.afterBuildLabels();
  14908. // Fit
  14909. me.beforeFit();
  14910. me.fit();
  14911. me.afterFit();
  14912. //
  14913. me.afterUpdate();
  14914. return me.minSize;
  14915. },
  14916. afterUpdate: noop$2,
  14917. //
  14918. beforeSetDimensions: noop$2,
  14919. setDimensions: function() {
  14920. var me = this;
  14921. // Set the unconstrained dimension before label rotation
  14922. if (me.isHorizontal()) {
  14923. // Reset position before calculating rotation
  14924. me.width = me.maxWidth;
  14925. me.left = 0;
  14926. me.right = me.width;
  14927. } else {
  14928. me.height = me.maxHeight;
  14929. // Reset position before calculating rotation
  14930. me.top = 0;
  14931. me.bottom = me.height;
  14932. }
  14933. // Reset padding
  14934. me.paddingLeft = 0;
  14935. me.paddingTop = 0;
  14936. me.paddingRight = 0;
  14937. me.paddingBottom = 0;
  14938. // Reset minSize
  14939. me.minSize = {
  14940. width: 0,
  14941. height: 0
  14942. };
  14943. },
  14944. afterSetDimensions: noop$2,
  14945. //
  14946. beforeBuildLabels: noop$2,
  14947. buildLabels: noop$2,
  14948. afterBuildLabels: noop$2,
  14949. //
  14950. beforeFit: noop$2,
  14951. fit: function() {
  14952. var me = this;
  14953. var opts = me.options;
  14954. var minSize = me.minSize = {};
  14955. var isHorizontal = me.isHorizontal();
  14956. var lineCount, textSize;
  14957. if (!opts.display) {
  14958. me.width = minSize.width = me.height = minSize.height = 0;
  14959. return;
  14960. }
  14961. lineCount = helpers$1.isArray(opts.text) ? opts.text.length : 1;
  14962. textSize = lineCount * helpers$1.options._parseFont(opts).lineHeight + opts.padding * 2;
  14963. me.width = minSize.width = isHorizontal ? me.maxWidth : textSize;
  14964. me.height = minSize.height = isHorizontal ? textSize : me.maxHeight;
  14965. },
  14966. afterFit: noop$2,
  14967. // Shared Methods
  14968. isHorizontal: function() {
  14969. var pos = this.options.position;
  14970. return pos === 'top' || pos === 'bottom';
  14971. },
  14972. // Actually draw the title block on the canvas
  14973. draw: function() {
  14974. var me = this;
  14975. var ctx = me.ctx;
  14976. var opts = me.options;
  14977. if (!opts.display) {
  14978. return;
  14979. }
  14980. var fontOpts = helpers$1.options._parseFont(opts);
  14981. var lineHeight = fontOpts.lineHeight;
  14982. var offset = lineHeight / 2 + opts.padding;
  14983. var rotation = 0;
  14984. var top = me.top;
  14985. var left = me.left;
  14986. var bottom = me.bottom;
  14987. var right = me.right;
  14988. var maxWidth, titleX, titleY;
  14989. ctx.fillStyle = helpers$1.valueOrDefault(opts.fontColor, core_defaults.global.defaultFontColor); // render in correct colour
  14990. ctx.font = fontOpts.string;
  14991. // Horizontal
  14992. if (me.isHorizontal()) {
  14993. titleX = left + ((right - left) / 2); // midpoint of the width
  14994. titleY = top + offset;
  14995. maxWidth = right - left;
  14996. } else {
  14997. titleX = opts.position === 'left' ? left + offset : right - offset;
  14998. titleY = top + ((bottom - top) / 2);
  14999. maxWidth = bottom - top;
  15000. rotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);
  15001. }
  15002. ctx.save();
  15003. ctx.translate(titleX, titleY);
  15004. ctx.rotate(rotation);
  15005. ctx.textAlign = 'center';
  15006. ctx.textBaseline = 'middle';
  15007. var text = opts.text;
  15008. if (helpers$1.isArray(text)) {
  15009. var y = 0;
  15010. for (var i = 0; i < text.length; ++i) {
  15011. ctx.fillText(text[i], 0, y, maxWidth);
  15012. y += lineHeight;
  15013. }
  15014. } else {
  15015. ctx.fillText(text, 0, 0, maxWidth);
  15016. }
  15017. ctx.restore();
  15018. }
  15019. });
  15020. function createNewTitleBlockAndAttach(chart, titleOpts) {
  15021. var title = new Title({
  15022. ctx: chart.ctx,
  15023. options: titleOpts,
  15024. chart: chart
  15025. });
  15026. core_layouts.configure(chart, title, titleOpts);
  15027. core_layouts.addBox(chart, title);
  15028. chart.titleBlock = title;
  15029. }
  15030. var plugin_title = {
  15031. id: 'title',
  15032. /**
  15033. * Backward compatibility: since 2.1.5, the title is registered as a plugin, making
  15034. * Chart.Title obsolete. To avoid a breaking change, we export the Title as part of
  15035. * the plugin, which one will be re-exposed in the chart.js file.
  15036. * https://github.com/chartjs/Chart.js/pull/2640
  15037. * @private
  15038. */
  15039. _element: Title,
  15040. beforeInit: function(chart) {
  15041. var titleOpts = chart.options.title;
  15042. if (titleOpts) {
  15043. createNewTitleBlockAndAttach(chart, titleOpts);
  15044. }
  15045. },
  15046. beforeUpdate: function(chart) {
  15047. var titleOpts = chart.options.title;
  15048. var titleBlock = chart.titleBlock;
  15049. if (titleOpts) {
  15050. helpers$1.mergeIf(titleOpts, core_defaults.global.title);
  15051. if (titleBlock) {
  15052. core_layouts.configure(chart, titleBlock, titleOpts);
  15053. titleBlock.options = titleOpts;
  15054. } else {
  15055. createNewTitleBlockAndAttach(chart, titleOpts);
  15056. }
  15057. } else if (titleBlock) {
  15058. core_layouts.removeBox(chart, titleBlock);
  15059. delete chart.titleBlock;
  15060. }
  15061. }
  15062. };
  15063. var plugins = {};
  15064. var filler = plugin_filler;
  15065. var legend = plugin_legend;
  15066. var title = plugin_title;
  15067. plugins.filler = filler;
  15068. plugins.legend = legend;
  15069. plugins.title = title;
  15070. /**
  15071. * @namespace Chart
  15072. */
  15073. core_controller.helpers = helpers$1;
  15074. // @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!
  15075. core_helpers();
  15076. core_controller._adapters = core_adapters;
  15077. core_controller.Animation = core_animation;
  15078. core_controller.animationService = core_animations;
  15079. core_controller.controllers = controllers;
  15080. core_controller.DatasetController = core_datasetController;
  15081. core_controller.defaults = core_defaults;
  15082. core_controller.Element = core_element;
  15083. core_controller.elements = elements;
  15084. core_controller.Interaction = core_interaction;
  15085. core_controller.layouts = core_layouts;
  15086. core_controller.platform = platform;
  15087. core_controller.plugins = core_plugins;
  15088. core_controller.Scale = core_scale;
  15089. core_controller.scaleService = core_scaleService;
  15090. core_controller.Ticks = core_ticks;
  15091. core_controller.Tooltip = core_tooltip;
  15092. // Register built-in scales
  15093. core_controller.helpers.each(scales, function(scale, type) {
  15094. core_controller.scaleService.registerScaleType(type, scale, scale._defaults);
  15095. });
  15096. // Load to register built-in adapters (as side effects)
  15097. // Loading built-in plugins
  15098. for (var k in plugins) {
  15099. if (plugins.hasOwnProperty(k)) {
  15100. core_controller.plugins.register(plugins[k]);
  15101. }
  15102. }
  15103. core_controller.platform.initialize();
  15104. var src = core_controller;
  15105. if (typeof window !== 'undefined') {
  15106. window.Chart = core_controller;
  15107. }
  15108. // DEPRECATIONS
  15109. /**
  15110. * Provided for backward compatibility, not available anymore
  15111. * @namespace Chart.Chart
  15112. * @deprecated since version 2.8.0
  15113. * @todo remove at version 3
  15114. * @private
  15115. */
  15116. core_controller.Chart = core_controller;
  15117. /**
  15118. * Provided for backward compatibility, not available anymore
  15119. * @namespace Chart.Legend
  15120. * @deprecated since version 2.1.5
  15121. * @todo remove at version 3
  15122. * @private
  15123. */
  15124. core_controller.Legend = plugins.legend._element;
  15125. /**
  15126. * Provided for backward compatibility, not available anymore
  15127. * @namespace Chart.Title
  15128. * @deprecated since version 2.1.5
  15129. * @todo remove at version 3
  15130. * @private
  15131. */
  15132. core_controller.Title = plugins.title._element;
  15133. /**
  15134. * Provided for backward compatibility, use Chart.plugins instead
  15135. * @namespace Chart.pluginService
  15136. * @deprecated since version 2.1.5
  15137. * @todo remove at version 3
  15138. * @private
  15139. */
  15140. core_controller.pluginService = core_controller.plugins;
  15141. /**
  15142. * Provided for backward compatibility, inheriting from Chart.PlugingBase has no
  15143. * effect, instead simply create/register plugins via plain JavaScript objects.
  15144. * @interface Chart.PluginBase
  15145. * @deprecated since version 2.5.0
  15146. * @todo remove at version 3
  15147. * @private
  15148. */
  15149. core_controller.PluginBase = core_controller.Element.extend({});
  15150. /**
  15151. * Provided for backward compatibility, use Chart.helpers.canvas instead.
  15152. * @namespace Chart.canvasHelpers
  15153. * @deprecated since version 2.6.0
  15154. * @todo remove at version 3
  15155. * @private
  15156. */
  15157. core_controller.canvasHelpers = core_controller.helpers.canvas;
  15158. /**
  15159. * Provided for backward compatibility, use Chart.layouts instead.
  15160. * @namespace Chart.layoutService
  15161. * @deprecated since version 2.7.3
  15162. * @todo remove at version 3
  15163. * @private
  15164. */
  15165. core_controller.layoutService = core_controller.layouts;
  15166. /**
  15167. * Provided for backward compatibility, not available anymore.
  15168. * @namespace Chart.LinearScaleBase
  15169. * @deprecated since version 2.8
  15170. * @todo remove at version 3
  15171. * @private
  15172. */
  15173. core_controller.LinearScaleBase = scale_linearbase;
  15174. /**
  15175. * Provided for backward compatibility, instead we should create a new Chart
  15176. * by setting the type in the config (`new Chart(id, {type: '{chart-type}'}`).
  15177. * @deprecated since version 2.8.0
  15178. * @todo remove at version 3
  15179. */
  15180. core_controller.helpers.each(
  15181. [
  15182. 'Bar',
  15183. 'Bubble',
  15184. 'Doughnut',
  15185. 'Line',
  15186. 'PolarArea',
  15187. 'Radar',
  15188. 'Scatter'
  15189. ],
  15190. function(klass) {
  15191. core_controller[klass] = function(ctx, cfg) {
  15192. return new core_controller(ctx, core_controller.helpers.merge(cfg || {}, {
  15193. type: klass.charAt(0).toLowerCase() + klass.slice(1)
  15194. }));
  15195. };
  15196. }
  15197. );
  15198. return src;
  15199. })));
  15200. /***/ }),
  15201. /***/ "./node_modules/.pnpm/jsonpack@1.1.5/node_modules/jsonpack/main.js":
  15202. /*!*************************************************************************!*\
  15203. !*** ./node_modules/.pnpm/jsonpack@1.1.5/node_modules/jsonpack/main.js ***!
  15204. \*************************************************************************/
  15205. /***/ ((module, exports, __webpack_require__) => {
  15206. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
  15207. Copyright (c) 2013, Rodrigo González, Sapienlab All Rights Reserved.
  15208. Available via MIT LICENSE. See https://github.com/roro89/jsonpack/blob/master/LICENSE.md for details.
  15209. */
  15210. (function(define) {
  15211. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  15212. var TOKEN_TRUE = -1;
  15213. var TOKEN_FALSE = -2;
  15214. var TOKEN_NULL = -3;
  15215. var TOKEN_EMPTY_STRING = -4;
  15216. var TOKEN_UNDEFINED = -5;
  15217. var pack = function(json, options) {
  15218. // Canonizes the options
  15219. options = options || {};
  15220. // A shorthand for debugging
  15221. var verbose = options.verbose || false;
  15222. verbose && console.log('Normalize the JSON Object');
  15223. // JSON as Javascript Object (Not string representation)
  15224. json = typeof json === 'string' ? this.JSON.parse(json) : json;
  15225. verbose && console.log('Creating a empty dictionary');
  15226. // The dictionary
  15227. var dictionary = {
  15228. strings : [],
  15229. integers : [],
  15230. floats : []
  15231. };
  15232. verbose && console.log('Creating the AST');
  15233. // The AST
  15234. var ast = (function recursiveAstBuilder(item) {
  15235. verbose && console.log('Calling recursiveAstBuilder with ' + this.JSON.stringify(item));
  15236. // The type of the item
  15237. var type = typeof item;
  15238. // Case 7: The item is null
  15239. if (item === null) {
  15240. return {
  15241. type : 'null',
  15242. index : TOKEN_NULL
  15243. };
  15244. }
  15245. //add undefined
  15246. if (typeof item === 'undefined') {
  15247. return {
  15248. type : 'undefined',
  15249. index : TOKEN_UNDEFINED
  15250. };
  15251. }
  15252. // Case 1: The item is Array Object
  15253. if ( item instanceof Array) {
  15254. // Create a new sub-AST of type Array (@)
  15255. var ast = ['@'];
  15256. // Add each items
  15257. for (var i in item) {
  15258. if (!item.hasOwnProperty(i)) continue;
  15259. ast.push(recursiveAstBuilder(item[i]));
  15260. }
  15261. // And return
  15262. return ast;
  15263. }
  15264. // Case 2: The item is Object
  15265. if (type === 'object') {
  15266. // Create a new sub-AST of type Object ($)
  15267. var ast = ['$'];
  15268. // Add each items
  15269. for (var key in item) {
  15270. if (!item.hasOwnProperty(key))
  15271. continue;
  15272. ast.push(recursiveAstBuilder(key));
  15273. ast.push(recursiveAstBuilder(item[key]));
  15274. }
  15275. // And return
  15276. return ast;
  15277. }
  15278. // Case 3: The item empty string
  15279. if (item === '') {
  15280. return {
  15281. type : 'empty',
  15282. index : TOKEN_EMPTY_STRING
  15283. };
  15284. }
  15285. // Case 4: The item is String
  15286. if (type === 'string') {
  15287. // The index of that word in the dictionary
  15288. var index = _indexOf.call(dictionary.strings, item);
  15289. // If not, add to the dictionary and actualize the index
  15290. if (index == -1) {
  15291. dictionary.strings.push(_encode(item));
  15292. index = dictionary.strings.length - 1;
  15293. }
  15294. // Return the token
  15295. return {
  15296. type : 'strings',
  15297. index : index
  15298. };
  15299. }
  15300. // Case 5: The item is integer
  15301. if (type === 'number' && item % 1 === 0) {
  15302. // The index of that number in the dictionary
  15303. var index = _indexOf.call(dictionary.integers, item);
  15304. // If not, add to the dictionary and actualize the index
  15305. if (index == -1) {
  15306. dictionary.integers.push(_base10To36(item));
  15307. index = dictionary.integers.length - 1;
  15308. }
  15309. // Return the token
  15310. return {
  15311. type : 'integers',
  15312. index : index
  15313. };
  15314. }
  15315. // Case 6: The item is float
  15316. if (type === 'number') {
  15317. // The index of that number in the dictionary
  15318. var index = _indexOf.call(dictionary.floats, item);
  15319. // If not, add to the dictionary and actualize the index
  15320. if (index == -1) {
  15321. // Float not use base 36
  15322. dictionary.floats.push(item);
  15323. index = dictionary.floats.length - 1;
  15324. }
  15325. // Return the token
  15326. return {
  15327. type : 'floats',
  15328. index : index
  15329. };
  15330. }
  15331. // Case 7: The item is boolean
  15332. if (type === 'boolean') {
  15333. return {
  15334. type : 'boolean',
  15335. index : item ? TOKEN_TRUE : TOKEN_FALSE
  15336. };
  15337. }
  15338. // Default
  15339. throw new Error('Unexpected argument of type ' + typeof (item));
  15340. })(json);
  15341. // A set of shorthands proxies for the length of the dictionaries
  15342. var stringLength = dictionary.strings.length;
  15343. var integerLength = dictionary.integers.length;
  15344. var floatLength = dictionary.floats.length;
  15345. verbose && console.log('Parsing the dictionary');
  15346. // Create a raw dictionary
  15347. var packed = dictionary.strings.join('|');
  15348. packed += '^' + dictionary.integers.join('|');
  15349. packed += '^' + dictionary.floats.join('|');
  15350. verbose && console.log('Parsing the structure');
  15351. // And add the structure
  15352. packed += '^' + (function recursiveParser(item) {
  15353. verbose && console.log('Calling a recursiveParser with ' + this.JSON.stringify(item));
  15354. // If the item is Array, then is a object of
  15355. // type [object Object] or [object Array]
  15356. if ( item instanceof Array) {
  15357. // The packed resulting
  15358. var packed = item.shift();
  15359. for (var i in item) {
  15360. if (!item.hasOwnProperty(i))
  15361. continue;
  15362. packed += recursiveParser(item[i]) + '|';
  15363. }
  15364. return (packed[packed.length - 1] === '|' ? packed.slice(0, -1) : packed) + ']';
  15365. }
  15366. // A shorthand proxies
  15367. var type = item.type, index = item.index;
  15368. if (type === 'strings') {
  15369. // Just return the base 36 of index
  15370. return _base10To36(index);
  15371. }
  15372. if (type === 'integers') {
  15373. // Return a base 36 of index plus stringLength offset
  15374. return _base10To36(stringLength + index);
  15375. }
  15376. if (type === 'floats') {
  15377. // Return a base 36 of index plus stringLength and integerLength offset
  15378. return _base10To36(stringLength + integerLength + index);
  15379. }
  15380. if (type === 'boolean') {
  15381. return item.index;
  15382. }
  15383. if (type === 'null') {
  15384. return TOKEN_NULL;
  15385. }
  15386. if (type === 'undefined') {
  15387. return TOKEN_UNDEFINED;
  15388. }
  15389. if (type === 'empty') {
  15390. return TOKEN_EMPTY_STRING;
  15391. }
  15392. throw new TypeError('The item is alien!');
  15393. })(ast);
  15394. verbose && console.log('Ending parser');
  15395. // If debug, return a internal representation of dictionary and stuff
  15396. if (options.debug)
  15397. return {
  15398. dictionary : dictionary,
  15399. ast : ast,
  15400. packed : packed
  15401. };
  15402. return packed;
  15403. };
  15404. var unpack = function(packed, options) {
  15405. // Canonizes the options
  15406. options = options || {};
  15407. // A raw buffer
  15408. var rawBuffers = packed.split('^');
  15409. // Create a dictionary
  15410. options.verbose && console.log('Building dictionary');
  15411. var dictionary = [];
  15412. // Add the strings values
  15413. var buffer = rawBuffers[0];
  15414. if (buffer !== '') {
  15415. buffer = buffer.split('|');
  15416. options.verbose && console.log('Parse the strings dictionary');
  15417. for (var i=0, n=buffer.length; i<n; i++){
  15418. dictionary.push(_decode(buffer[i]));
  15419. }
  15420. }
  15421. // Add the integers values
  15422. buffer = rawBuffers[1];
  15423. if (buffer !== '') {
  15424. buffer = buffer.split('|');
  15425. options.verbose && console.log('Parse the integers dictionary');
  15426. for (var i=0, n=buffer.length; i<n; i++){
  15427. dictionary.push(_base36To10(buffer[i]));
  15428. }
  15429. }
  15430. // Add the floats values
  15431. buffer = rawBuffers[2];
  15432. if (buffer !== '') {
  15433. buffer = buffer.split('|')
  15434. options.verbose && console.log('Parse the floats dictionary');
  15435. for (var i=0, n=buffer.length; i<n; i++){
  15436. dictionary.push(parseFloat(buffer[i]));
  15437. }
  15438. }
  15439. // Free memory
  15440. buffer = null;
  15441. options.verbose && console.log('Tokenizing the structure');
  15442. // Tokenizer the structure
  15443. var number36 = '';
  15444. var tokens = [];
  15445. var len=rawBuffers[3].length;
  15446. for (var i = 0; i < len; i++) {
  15447. var symbol = rawBuffers[3].charAt(i);
  15448. if (symbol === '|' || symbol === '$' || symbol === '@' || symbol === ']') {
  15449. if (number36) {
  15450. tokens.push(_base36To10(number36));
  15451. number36 = '';
  15452. }
  15453. symbol !== '|' && tokens.push(symbol);
  15454. } else {
  15455. number36 += symbol;
  15456. }
  15457. }
  15458. // A shorthand proxy for tokens.length
  15459. var tokensLength = tokens.length;
  15460. // The index of the next token to read
  15461. var tokensIndex = 0;
  15462. options.verbose && console.log('Starting recursive parser');
  15463. return (function recursiveUnpackerParser() {
  15464. // Maybe '$' (object) or '@' (array)
  15465. var type = tokens[tokensIndex++];
  15466. options.verbose && console.log('Reading collection type ' + (type === '$' ? 'object' : 'Array'));
  15467. // Parse an array
  15468. if (type === '@') {
  15469. var node = [];
  15470. for (; tokensIndex < tokensLength; tokensIndex++) {
  15471. var value = tokens[tokensIndex];
  15472. options.verbose && console.log('Read ' + value + ' symbol');
  15473. if (value === ']')
  15474. return node;
  15475. if (value === '@' || value === '$') {
  15476. node.push(recursiveUnpackerParser());
  15477. } else {
  15478. switch(value) {
  15479. case TOKEN_TRUE:
  15480. node.push(true);
  15481. break;
  15482. case TOKEN_FALSE:
  15483. node.push(false);
  15484. break;
  15485. case TOKEN_NULL:
  15486. node.push(null);
  15487. break;
  15488. case TOKEN_UNDEFINED:
  15489. node.push(undefined);
  15490. break;
  15491. case TOKEN_EMPTY_STRING:
  15492. node.push('');
  15493. break;
  15494. default:
  15495. node.push(dictionary[value]);
  15496. }
  15497. }
  15498. }
  15499. options.verbose && console.log('Parsed ' + this.JSON.stringify(node));
  15500. return node;
  15501. }
  15502. // Parse a object
  15503. if (type === '$') {
  15504. var node = {};
  15505. for (; tokensIndex < tokensLength; tokensIndex++) {
  15506. var key = tokens[tokensIndex];
  15507. if (key === ']')
  15508. return node;
  15509. if (key === TOKEN_EMPTY_STRING)
  15510. key = '';
  15511. else
  15512. key = dictionary[key];
  15513. var value = tokens[++tokensIndex];
  15514. if (value === '@' || value === '$') {
  15515. node[key] = recursiveUnpackerParser();
  15516. } else {
  15517. switch(value) {
  15518. case TOKEN_TRUE:
  15519. node[key] = true;
  15520. break;
  15521. case TOKEN_FALSE:
  15522. node[key] = false;
  15523. break;
  15524. case TOKEN_NULL:
  15525. node[key] = null;
  15526. break;
  15527. case TOKEN_UNDEFINED:
  15528. node[key] = undefined;
  15529. break;
  15530. case TOKEN_EMPTY_STRING:
  15531. node[key] = '';
  15532. break;
  15533. default:
  15534. node[key] = dictionary[value];
  15535. }
  15536. }
  15537. }
  15538. options.verbose && console.log('Parsed ' + this.JSON.stringify(node));
  15539. return node;
  15540. }
  15541. throw new TypeError('Bad token ' + type + ' isn\'t a type');
  15542. })();
  15543. }
  15544. /**
  15545. * Get the index value of the dictionary
  15546. * @param {Object} dictionary a object that have two array attributes: 'string' and 'number'
  15547. * @param {Object} data
  15548. */
  15549. var _indexOfDictionary = function(dictionary, value) {
  15550. // The type of the value
  15551. var type = typeof value;
  15552. // If is boolean, return a boolean token
  15553. if (type === 'boolean')
  15554. return value ? TOKEN_TRUE : TOKEN_FALSE;
  15555. // If is null, return a... yes! the null token
  15556. if (value === null)
  15557. return TOKEN_NULL;
  15558. //add undefined
  15559. if (typeof value === 'undefined')
  15560. return TOKEN_UNDEFINED;
  15561. if (value === '') {
  15562. return TOKEN_EMPTY_STRING;
  15563. }
  15564. if (type === 'string') {
  15565. value = _encode(value);
  15566. var index = _indexOf.call(dictionary.strings, value);
  15567. if (index === -1) {
  15568. dictionary.strings.push(value);
  15569. index = dictionary.strings.length - 1;
  15570. }
  15571. }
  15572. // If has an invalid JSON type (example a function)
  15573. if (type !== 'string' && type !== 'number') {
  15574. throw new Error('The type is not a JSON type');
  15575. };
  15576. if (type === 'string') {// string
  15577. value = _encode(value);
  15578. } else if (value % 1 === 0) {// integer
  15579. value = _base10To36(value);
  15580. } else {// float
  15581. }
  15582. // If is number, "serialize" the value
  15583. value = type === 'number' ? _base10To36(value) : _encode(value);
  15584. // Retrieve the index of that value in the dictionary
  15585. var index = _indexOf.call(dictionary[type], value);
  15586. // If that value is not in the dictionary
  15587. if (index === -1) {
  15588. // Push the value
  15589. dictionary[type].push(value);
  15590. // And return their index
  15591. index = dictionary[type].length - 1;
  15592. }
  15593. // If the type is a number, then add the '+' prefix character
  15594. // to differentiate that they is a number index. If not, then
  15595. // just return a 36-based representation of the index
  15596. return type === 'number' ? '+' + index : index;
  15597. };
  15598. var _encode = function(str) {
  15599. if ( typeof str !== 'string')
  15600. return str;
  15601. return str.replace(/[\+ \|\^\%]/g, function(a) {
  15602. return ({
  15603. ' ' : '+',
  15604. '+' : '%2B',
  15605. '|' : '%7C',
  15606. '^' : '%5E',
  15607. '%' : '%25'
  15608. })[a]
  15609. });
  15610. };
  15611. var _decode = function(str) {
  15612. if ( typeof str !== 'string')
  15613. return str;
  15614. return str.replace(/\+|%2B|%7C|%5E|%25/g, function(a) {
  15615. return ({
  15616. '+' : ' ',
  15617. '%2B' : '+',
  15618. '%7C' : '|',
  15619. '%5E' : '^',
  15620. '%25' : '%'
  15621. })[a]
  15622. })
  15623. };
  15624. var _base10To36 = function(number) {
  15625. return Number.prototype.toString.call(number, 36).toUpperCase();
  15626. };
  15627. var _base36To10 = function(number) {
  15628. return parseInt(number, 36);
  15629. };
  15630. var _indexOf = Array.prototype.indexOf ||
  15631. function(obj, start) {
  15632. for (var i = (start || 0), j = this.length; i < j; i++) {
  15633. if (this[i] === obj) {
  15634. return i;
  15635. }
  15636. }
  15637. return -1;
  15638. };
  15639. return {
  15640. JSON : JSON,
  15641. pack : pack,
  15642. unpack : unpack
  15643. };
  15644. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  15645. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  15646. })( __webpack_require__.amdD);
  15647. /***/ }),
  15648. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/af.js":
  15649. /*!***************************************************************************!*\
  15650. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/af.js ***!
  15651. \***************************************************************************/
  15652. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  15653. //! moment.js locale configuration
  15654. //! locale : Afrikaans [af]
  15655. //! author : Werner Mollentze : https://github.com/wernerm
  15656. ;(function (global, factory) {
  15657. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  15658. 0
  15659. }(this, (function (moment) { 'use strict';
  15660. //! moment.js locale configuration
  15661. var af = moment.defineLocale('af', {
  15662. months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
  15663. '_'
  15664. ),
  15665. monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
  15666. weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
  15667. '_'
  15668. ),
  15669. weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
  15670. weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
  15671. meridiemParse: /vm|nm/i,
  15672. isPM: function (input) {
  15673. return /^nm$/i.test(input);
  15674. },
  15675. meridiem: function (hours, minutes, isLower) {
  15676. if (hours < 12) {
  15677. return isLower ? 'vm' : 'VM';
  15678. } else {
  15679. return isLower ? 'nm' : 'NM';
  15680. }
  15681. },
  15682. longDateFormat: {
  15683. LT: 'HH:mm',
  15684. LTS: 'HH:mm:ss',
  15685. L: 'DD/MM/YYYY',
  15686. LL: 'D MMMM YYYY',
  15687. LLL: 'D MMMM YYYY HH:mm',
  15688. LLLL: 'dddd, D MMMM YYYY HH:mm',
  15689. },
  15690. calendar: {
  15691. sameDay: '[Vandag om] LT',
  15692. nextDay: '[Môre om] LT',
  15693. nextWeek: 'dddd [om] LT',
  15694. lastDay: '[Gister om] LT',
  15695. lastWeek: '[Laas] dddd [om] LT',
  15696. sameElse: 'L',
  15697. },
  15698. relativeTime: {
  15699. future: 'oor %s',
  15700. past: '%s gelede',
  15701. s: "'n paar sekondes",
  15702. ss: '%d sekondes',
  15703. m: "'n minuut",
  15704. mm: '%d minute',
  15705. h: "'n uur",
  15706. hh: '%d ure',
  15707. d: "'n dag",
  15708. dd: '%d dae',
  15709. M: "'n maand",
  15710. MM: '%d maande',
  15711. y: "'n jaar",
  15712. yy: '%d jaar',
  15713. },
  15714. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  15715. ordinal: function (number) {
  15716. return (
  15717. number +
  15718. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  15719. ); // Thanks to Joris Röling : https://github.com/jjupiter
  15720. },
  15721. week: {
  15722. dow: 1, // Maandag is die eerste dag van die week.
  15723. doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
  15724. },
  15725. });
  15726. return af;
  15727. })));
  15728. /***/ }),
  15729. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-dz.js":
  15730. /*!******************************************************************************!*\
  15731. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-dz.js ***!
  15732. \******************************************************************************/
  15733. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  15734. //! moment.js locale configuration
  15735. //! locale : Arabic (Algeria) [ar-dz]
  15736. //! author : Amine Roukh: https://github.com/Amine27
  15737. //! author : Abdel Said: https://github.com/abdelsaid
  15738. //! author : Ahmed Elkhatib
  15739. //! author : forabi https://github.com/forabi
  15740. //! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
  15741. ;(function (global, factory) {
  15742. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  15743. 0
  15744. }(this, (function (moment) { 'use strict';
  15745. //! moment.js locale configuration
  15746. var pluralForm = function (n) {
  15747. return n === 0
  15748. ? 0
  15749. : n === 1
  15750. ? 1
  15751. : n === 2
  15752. ? 2
  15753. : n % 100 >= 3 && n % 100 <= 10
  15754. ? 3
  15755. : n % 100 >= 11
  15756. ? 4
  15757. : 5;
  15758. },
  15759. plurals = {
  15760. s: [
  15761. 'أقل من ثانية',
  15762. 'ثانية واحدة',
  15763. ['ثانيتان', 'ثانيتين'],
  15764. '%d ثوان',
  15765. '%d ثانية',
  15766. '%d ثانية',
  15767. ],
  15768. m: [
  15769. 'أقل من دقيقة',
  15770. 'دقيقة واحدة',
  15771. ['دقيقتان', 'دقيقتين'],
  15772. '%d دقائق',
  15773. '%d دقيقة',
  15774. '%d دقيقة',
  15775. ],
  15776. h: [
  15777. 'أقل من ساعة',
  15778. 'ساعة واحدة',
  15779. ['ساعتان', 'ساعتين'],
  15780. '%d ساعات',
  15781. '%d ساعة',
  15782. '%d ساعة',
  15783. ],
  15784. d: [
  15785. 'أقل من يوم',
  15786. 'يوم واحد',
  15787. ['يومان', 'يومين'],
  15788. '%d أيام',
  15789. '%d يومًا',
  15790. '%d يوم',
  15791. ],
  15792. M: [
  15793. 'أقل من شهر',
  15794. 'شهر واحد',
  15795. ['شهران', 'شهرين'],
  15796. '%d أشهر',
  15797. '%d شهرا',
  15798. '%d شهر',
  15799. ],
  15800. y: [
  15801. 'أقل من عام',
  15802. 'عام واحد',
  15803. ['عامان', 'عامين'],
  15804. '%d أعوام',
  15805. '%d عامًا',
  15806. '%d عام',
  15807. ],
  15808. },
  15809. pluralize = function (u) {
  15810. return function (number, withoutSuffix, string, isFuture) {
  15811. var f = pluralForm(number),
  15812. str = plurals[u][pluralForm(number)];
  15813. if (f === 2) {
  15814. str = str[withoutSuffix ? 0 : 1];
  15815. }
  15816. return str.replace(/%d/i, number);
  15817. };
  15818. },
  15819. months = [
  15820. 'جانفي',
  15821. 'فيفري',
  15822. 'مارس',
  15823. 'أفريل',
  15824. 'ماي',
  15825. 'جوان',
  15826. 'جويلية',
  15827. 'أوت',
  15828. 'سبتمبر',
  15829. 'أكتوبر',
  15830. 'نوفمبر',
  15831. 'ديسمبر',
  15832. ];
  15833. var arDz = moment.defineLocale('ar-dz', {
  15834. months: months,
  15835. monthsShort: months,
  15836. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  15837. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  15838. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  15839. weekdaysParseExact: true,
  15840. longDateFormat: {
  15841. LT: 'HH:mm',
  15842. LTS: 'HH:mm:ss',
  15843. L: 'D/\u200FM/\u200FYYYY',
  15844. LL: 'D MMMM YYYY',
  15845. LLL: 'D MMMM YYYY HH:mm',
  15846. LLLL: 'dddd D MMMM YYYY HH:mm',
  15847. },
  15848. meridiemParse: /ص|م/,
  15849. isPM: function (input) {
  15850. return 'م' === input;
  15851. },
  15852. meridiem: function (hour, minute, isLower) {
  15853. if (hour < 12) {
  15854. return 'ص';
  15855. } else {
  15856. return 'م';
  15857. }
  15858. },
  15859. calendar: {
  15860. sameDay: '[اليوم عند الساعة] LT',
  15861. nextDay: '[غدًا عند الساعة] LT',
  15862. nextWeek: 'dddd [عند الساعة] LT',
  15863. lastDay: '[أمس عند الساعة] LT',
  15864. lastWeek: 'dddd [عند الساعة] LT',
  15865. sameElse: 'L',
  15866. },
  15867. relativeTime: {
  15868. future: 'بعد %s',
  15869. past: 'منذ %s',
  15870. s: pluralize('s'),
  15871. ss: pluralize('s'),
  15872. m: pluralize('m'),
  15873. mm: pluralize('m'),
  15874. h: pluralize('h'),
  15875. hh: pluralize('h'),
  15876. d: pluralize('d'),
  15877. dd: pluralize('d'),
  15878. M: pluralize('M'),
  15879. MM: pluralize('M'),
  15880. y: pluralize('y'),
  15881. yy: pluralize('y'),
  15882. },
  15883. postformat: function (string) {
  15884. return string.replace(/,/g, '،');
  15885. },
  15886. week: {
  15887. dow: 0, // Sunday is the first day of the week.
  15888. doy: 4, // The week that contains Jan 4th is the first week of the year.
  15889. },
  15890. });
  15891. return arDz;
  15892. })));
  15893. /***/ }),
  15894. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-kw.js":
  15895. /*!******************************************************************************!*\
  15896. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-kw.js ***!
  15897. \******************************************************************************/
  15898. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  15899. //! moment.js locale configuration
  15900. //! locale : Arabic (Kuwait) [ar-kw]
  15901. //! author : Nusret Parlak: https://github.com/nusretparlak
  15902. ;(function (global, factory) {
  15903. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  15904. 0
  15905. }(this, (function (moment) { 'use strict';
  15906. //! moment.js locale configuration
  15907. var arKw = moment.defineLocale('ar-kw', {
  15908. months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  15909. '_'
  15910. ),
  15911. monthsShort:
  15912. 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  15913. '_'
  15914. ),
  15915. weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  15916. weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  15917. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  15918. weekdaysParseExact: true,
  15919. longDateFormat: {
  15920. LT: 'HH:mm',
  15921. LTS: 'HH:mm:ss',
  15922. L: 'DD/MM/YYYY',
  15923. LL: 'D MMMM YYYY',
  15924. LLL: 'D MMMM YYYY HH:mm',
  15925. LLLL: 'dddd D MMMM YYYY HH:mm',
  15926. },
  15927. calendar: {
  15928. sameDay: '[اليوم على الساعة] LT',
  15929. nextDay: '[غدا على الساعة] LT',
  15930. nextWeek: 'dddd [على الساعة] LT',
  15931. lastDay: '[أمس على الساعة] LT',
  15932. lastWeek: 'dddd [على الساعة] LT',
  15933. sameElse: 'L',
  15934. },
  15935. relativeTime: {
  15936. future: 'في %s',
  15937. past: 'منذ %s',
  15938. s: 'ثوان',
  15939. ss: '%d ثانية',
  15940. m: 'دقيقة',
  15941. mm: '%d دقائق',
  15942. h: 'ساعة',
  15943. hh: '%d ساعات',
  15944. d: 'يوم',
  15945. dd: '%d أيام',
  15946. M: 'شهر',
  15947. MM: '%d أشهر',
  15948. y: 'سنة',
  15949. yy: '%d سنوات',
  15950. },
  15951. week: {
  15952. dow: 0, // Sunday is the first day of the week.
  15953. doy: 12, // The week that contains Jan 12th is the first week of the year.
  15954. },
  15955. });
  15956. return arKw;
  15957. })));
  15958. /***/ }),
  15959. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ly.js":
  15960. /*!******************************************************************************!*\
  15961. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ly.js ***!
  15962. \******************************************************************************/
  15963. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  15964. //! moment.js locale configuration
  15965. //! locale : Arabic (Libya) [ar-ly]
  15966. //! author : Ali Hmer: https://github.com/kikoanis
  15967. ;(function (global, factory) {
  15968. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  15969. 0
  15970. }(this, (function (moment) { 'use strict';
  15971. //! moment.js locale configuration
  15972. var symbolMap = {
  15973. 1: '1',
  15974. 2: '2',
  15975. 3: '3',
  15976. 4: '4',
  15977. 5: '5',
  15978. 6: '6',
  15979. 7: '7',
  15980. 8: '8',
  15981. 9: '9',
  15982. 0: '0',
  15983. },
  15984. pluralForm = function (n) {
  15985. return n === 0
  15986. ? 0
  15987. : n === 1
  15988. ? 1
  15989. : n === 2
  15990. ? 2
  15991. : n % 100 >= 3 && n % 100 <= 10
  15992. ? 3
  15993. : n % 100 >= 11
  15994. ? 4
  15995. : 5;
  15996. },
  15997. plurals = {
  15998. s: [
  15999. 'أقل من ثانية',
  16000. 'ثانية واحدة',
  16001. ['ثانيتان', 'ثانيتين'],
  16002. '%d ثوان',
  16003. '%d ثانية',
  16004. '%d ثانية',
  16005. ],
  16006. m: [
  16007. 'أقل من دقيقة',
  16008. 'دقيقة واحدة',
  16009. ['دقيقتان', 'دقيقتين'],
  16010. '%d دقائق',
  16011. '%d دقيقة',
  16012. '%d دقيقة',
  16013. ],
  16014. h: [
  16015. 'أقل من ساعة',
  16016. 'ساعة واحدة',
  16017. ['ساعتان', 'ساعتين'],
  16018. '%d ساعات',
  16019. '%d ساعة',
  16020. '%d ساعة',
  16021. ],
  16022. d: [
  16023. 'أقل من يوم',
  16024. 'يوم واحد',
  16025. ['يومان', 'يومين'],
  16026. '%d أيام',
  16027. '%d يومًا',
  16028. '%d يوم',
  16029. ],
  16030. M: [
  16031. 'أقل من شهر',
  16032. 'شهر واحد',
  16033. ['شهران', 'شهرين'],
  16034. '%d أشهر',
  16035. '%d شهرا',
  16036. '%d شهر',
  16037. ],
  16038. y: [
  16039. 'أقل من عام',
  16040. 'عام واحد',
  16041. ['عامان', 'عامين'],
  16042. '%d أعوام',
  16043. '%d عامًا',
  16044. '%d عام',
  16045. ],
  16046. },
  16047. pluralize = function (u) {
  16048. return function (number, withoutSuffix, string, isFuture) {
  16049. var f = pluralForm(number),
  16050. str = plurals[u][pluralForm(number)];
  16051. if (f === 2) {
  16052. str = str[withoutSuffix ? 0 : 1];
  16053. }
  16054. return str.replace(/%d/i, number);
  16055. };
  16056. },
  16057. months = [
  16058. 'يناير',
  16059. 'فبراير',
  16060. 'مارس',
  16061. 'أبريل',
  16062. 'مايو',
  16063. 'يونيو',
  16064. 'يوليو',
  16065. 'أغسطس',
  16066. 'سبتمبر',
  16067. 'أكتوبر',
  16068. 'نوفمبر',
  16069. 'ديسمبر',
  16070. ];
  16071. var arLy = moment.defineLocale('ar-ly', {
  16072. months: months,
  16073. monthsShort: months,
  16074. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  16075. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  16076. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  16077. weekdaysParseExact: true,
  16078. longDateFormat: {
  16079. LT: 'HH:mm',
  16080. LTS: 'HH:mm:ss',
  16081. L: 'D/\u200FM/\u200FYYYY',
  16082. LL: 'D MMMM YYYY',
  16083. LLL: 'D MMMM YYYY HH:mm',
  16084. LLLL: 'dddd D MMMM YYYY HH:mm',
  16085. },
  16086. meridiemParse: /ص|م/,
  16087. isPM: function (input) {
  16088. return 'م' === input;
  16089. },
  16090. meridiem: function (hour, minute, isLower) {
  16091. if (hour < 12) {
  16092. return 'ص';
  16093. } else {
  16094. return 'م';
  16095. }
  16096. },
  16097. calendar: {
  16098. sameDay: '[اليوم عند الساعة] LT',
  16099. nextDay: '[غدًا عند الساعة] LT',
  16100. nextWeek: 'dddd [عند الساعة] LT',
  16101. lastDay: '[أمس عند الساعة] LT',
  16102. lastWeek: 'dddd [عند الساعة] LT',
  16103. sameElse: 'L',
  16104. },
  16105. relativeTime: {
  16106. future: 'بعد %s',
  16107. past: 'منذ %s',
  16108. s: pluralize('s'),
  16109. ss: pluralize('s'),
  16110. m: pluralize('m'),
  16111. mm: pluralize('m'),
  16112. h: pluralize('h'),
  16113. hh: pluralize('h'),
  16114. d: pluralize('d'),
  16115. dd: pluralize('d'),
  16116. M: pluralize('M'),
  16117. MM: pluralize('M'),
  16118. y: pluralize('y'),
  16119. yy: pluralize('y'),
  16120. },
  16121. preparse: function (string) {
  16122. return string.replace(/،/g, ',');
  16123. },
  16124. postformat: function (string) {
  16125. return string
  16126. .replace(/\d/g, function (match) {
  16127. return symbolMap[match];
  16128. })
  16129. .replace(/,/g, '،');
  16130. },
  16131. week: {
  16132. dow: 6, // Saturday is the first day of the week.
  16133. doy: 12, // The week that contains Jan 12th is the first week of the year.
  16134. },
  16135. });
  16136. return arLy;
  16137. })));
  16138. /***/ }),
  16139. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ma.js":
  16140. /*!******************************************************************************!*\
  16141. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ma.js ***!
  16142. \******************************************************************************/
  16143. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16144. //! moment.js locale configuration
  16145. //! locale : Arabic (Morocco) [ar-ma]
  16146. //! author : ElFadili Yassine : https://github.com/ElFadiliY
  16147. //! author : Abdel Said : https://github.com/abdelsaid
  16148. ;(function (global, factory) {
  16149. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16150. 0
  16151. }(this, (function (moment) { 'use strict';
  16152. //! moment.js locale configuration
  16153. var arMa = moment.defineLocale('ar-ma', {
  16154. months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  16155. '_'
  16156. ),
  16157. monthsShort:
  16158. 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  16159. '_'
  16160. ),
  16161. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  16162. weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  16163. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  16164. weekdaysParseExact: true,
  16165. longDateFormat: {
  16166. LT: 'HH:mm',
  16167. LTS: 'HH:mm:ss',
  16168. L: 'DD/MM/YYYY',
  16169. LL: 'D MMMM YYYY',
  16170. LLL: 'D MMMM YYYY HH:mm',
  16171. LLLL: 'dddd D MMMM YYYY HH:mm',
  16172. },
  16173. calendar: {
  16174. sameDay: '[اليوم على الساعة] LT',
  16175. nextDay: '[غدا على الساعة] LT',
  16176. nextWeek: 'dddd [على الساعة] LT',
  16177. lastDay: '[أمس على الساعة] LT',
  16178. lastWeek: 'dddd [على الساعة] LT',
  16179. sameElse: 'L',
  16180. },
  16181. relativeTime: {
  16182. future: 'في %s',
  16183. past: 'منذ %s',
  16184. s: 'ثوان',
  16185. ss: '%d ثانية',
  16186. m: 'دقيقة',
  16187. mm: '%d دقائق',
  16188. h: 'ساعة',
  16189. hh: '%d ساعات',
  16190. d: 'يوم',
  16191. dd: '%d أيام',
  16192. M: 'شهر',
  16193. MM: '%d أشهر',
  16194. y: 'سنة',
  16195. yy: '%d سنوات',
  16196. },
  16197. week: {
  16198. dow: 1, // Monday is the first day of the week.
  16199. doy: 4, // The week that contains Jan 4th is the first week of the year.
  16200. },
  16201. });
  16202. return arMa;
  16203. })));
  16204. /***/ }),
  16205. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-sa.js":
  16206. /*!******************************************************************************!*\
  16207. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-sa.js ***!
  16208. \******************************************************************************/
  16209. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16210. //! moment.js locale configuration
  16211. //! locale : Arabic (Saudi Arabia) [ar-sa]
  16212. //! author : Suhail Alkowaileet : https://github.com/xsoh
  16213. ;(function (global, factory) {
  16214. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16215. 0
  16216. }(this, (function (moment) { 'use strict';
  16217. //! moment.js locale configuration
  16218. var symbolMap = {
  16219. 1: '١',
  16220. 2: '٢',
  16221. 3: '٣',
  16222. 4: '٤',
  16223. 5: '٥',
  16224. 6: '٦',
  16225. 7: '٧',
  16226. 8: '٨',
  16227. 9: '٩',
  16228. 0: '٠',
  16229. },
  16230. numberMap = {
  16231. '١': '1',
  16232. '٢': '2',
  16233. '٣': '3',
  16234. '٤': '4',
  16235. '٥': '5',
  16236. '٦': '6',
  16237. '٧': '7',
  16238. '٨': '8',
  16239. '٩': '9',
  16240. '٠': '0',
  16241. };
  16242. var arSa = moment.defineLocale('ar-sa', {
  16243. months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  16244. '_'
  16245. ),
  16246. monthsShort:
  16247. 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  16248. '_'
  16249. ),
  16250. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  16251. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  16252. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  16253. weekdaysParseExact: true,
  16254. longDateFormat: {
  16255. LT: 'HH:mm',
  16256. LTS: 'HH:mm:ss',
  16257. L: 'DD/MM/YYYY',
  16258. LL: 'D MMMM YYYY',
  16259. LLL: 'D MMMM YYYY HH:mm',
  16260. LLLL: 'dddd D MMMM YYYY HH:mm',
  16261. },
  16262. meridiemParse: /ص|م/,
  16263. isPM: function (input) {
  16264. return 'م' === input;
  16265. },
  16266. meridiem: function (hour, minute, isLower) {
  16267. if (hour < 12) {
  16268. return 'ص';
  16269. } else {
  16270. return 'م';
  16271. }
  16272. },
  16273. calendar: {
  16274. sameDay: '[اليوم على الساعة] LT',
  16275. nextDay: '[غدا على الساعة] LT',
  16276. nextWeek: 'dddd [على الساعة] LT',
  16277. lastDay: '[أمس على الساعة] LT',
  16278. lastWeek: 'dddd [على الساعة] LT',
  16279. sameElse: 'L',
  16280. },
  16281. relativeTime: {
  16282. future: 'في %s',
  16283. past: 'منذ %s',
  16284. s: 'ثوان',
  16285. ss: '%d ثانية',
  16286. m: 'دقيقة',
  16287. mm: '%d دقائق',
  16288. h: 'ساعة',
  16289. hh: '%d ساعات',
  16290. d: 'يوم',
  16291. dd: '%d أيام',
  16292. M: 'شهر',
  16293. MM: '%d أشهر',
  16294. y: 'سنة',
  16295. yy: '%d سنوات',
  16296. },
  16297. preparse: function (string) {
  16298. return string
  16299. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  16300. return numberMap[match];
  16301. })
  16302. .replace(/،/g, ',');
  16303. },
  16304. postformat: function (string) {
  16305. return string
  16306. .replace(/\d/g, function (match) {
  16307. return symbolMap[match];
  16308. })
  16309. .replace(/,/g, '،');
  16310. },
  16311. week: {
  16312. dow: 0, // Sunday is the first day of the week.
  16313. doy: 6, // The week that contains Jan 6th is the first week of the year.
  16314. },
  16315. });
  16316. return arSa;
  16317. })));
  16318. /***/ }),
  16319. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-tn.js":
  16320. /*!******************************************************************************!*\
  16321. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-tn.js ***!
  16322. \******************************************************************************/
  16323. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16324. //! moment.js locale configuration
  16325. //! locale : Arabic (Tunisia) [ar-tn]
  16326. //! author : Nader Toukabri : https://github.com/naderio
  16327. ;(function (global, factory) {
  16328. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16329. 0
  16330. }(this, (function (moment) { 'use strict';
  16331. //! moment.js locale configuration
  16332. var arTn = moment.defineLocale('ar-tn', {
  16333. months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  16334. '_'
  16335. ),
  16336. monthsShort:
  16337. 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  16338. '_'
  16339. ),
  16340. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  16341. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  16342. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  16343. weekdaysParseExact: true,
  16344. longDateFormat: {
  16345. LT: 'HH:mm',
  16346. LTS: 'HH:mm:ss',
  16347. L: 'DD/MM/YYYY',
  16348. LL: 'D MMMM YYYY',
  16349. LLL: 'D MMMM YYYY HH:mm',
  16350. LLLL: 'dddd D MMMM YYYY HH:mm',
  16351. },
  16352. calendar: {
  16353. sameDay: '[اليوم على الساعة] LT',
  16354. nextDay: '[غدا على الساعة] LT',
  16355. nextWeek: 'dddd [على الساعة] LT',
  16356. lastDay: '[أمس على الساعة] LT',
  16357. lastWeek: 'dddd [على الساعة] LT',
  16358. sameElse: 'L',
  16359. },
  16360. relativeTime: {
  16361. future: 'في %s',
  16362. past: 'منذ %s',
  16363. s: 'ثوان',
  16364. ss: '%d ثانية',
  16365. m: 'دقيقة',
  16366. mm: '%d دقائق',
  16367. h: 'ساعة',
  16368. hh: '%d ساعات',
  16369. d: 'يوم',
  16370. dd: '%d أيام',
  16371. M: 'شهر',
  16372. MM: '%d أشهر',
  16373. y: 'سنة',
  16374. yy: '%d سنوات',
  16375. },
  16376. week: {
  16377. dow: 1, // Monday is the first day of the week.
  16378. doy: 4, // The week that contains Jan 4th is the first week of the year.
  16379. },
  16380. });
  16381. return arTn;
  16382. })));
  16383. /***/ }),
  16384. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar.js":
  16385. /*!***************************************************************************!*\
  16386. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar.js ***!
  16387. \***************************************************************************/
  16388. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16389. //! moment.js locale configuration
  16390. //! locale : Arabic [ar]
  16391. //! author : Abdel Said: https://github.com/abdelsaid
  16392. //! author : Ahmed Elkhatib
  16393. //! author : forabi https://github.com/forabi
  16394. ;(function (global, factory) {
  16395. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16396. 0
  16397. }(this, (function (moment) { 'use strict';
  16398. //! moment.js locale configuration
  16399. var symbolMap = {
  16400. 1: '١',
  16401. 2: '٢',
  16402. 3: '٣',
  16403. 4: '٤',
  16404. 5: '٥',
  16405. 6: '٦',
  16406. 7: '٧',
  16407. 8: '٨',
  16408. 9: '٩',
  16409. 0: '٠',
  16410. },
  16411. numberMap = {
  16412. '١': '1',
  16413. '٢': '2',
  16414. '٣': '3',
  16415. '٤': '4',
  16416. '٥': '5',
  16417. '٦': '6',
  16418. '٧': '7',
  16419. '٨': '8',
  16420. '٩': '9',
  16421. '٠': '0',
  16422. },
  16423. pluralForm = function (n) {
  16424. return n === 0
  16425. ? 0
  16426. : n === 1
  16427. ? 1
  16428. : n === 2
  16429. ? 2
  16430. : n % 100 >= 3 && n % 100 <= 10
  16431. ? 3
  16432. : n % 100 >= 11
  16433. ? 4
  16434. : 5;
  16435. },
  16436. plurals = {
  16437. s: [
  16438. 'أقل من ثانية',
  16439. 'ثانية واحدة',
  16440. ['ثانيتان', 'ثانيتين'],
  16441. '%d ثوان',
  16442. '%d ثانية',
  16443. '%d ثانية',
  16444. ],
  16445. m: [
  16446. 'أقل من دقيقة',
  16447. 'دقيقة واحدة',
  16448. ['دقيقتان', 'دقيقتين'],
  16449. '%d دقائق',
  16450. '%d دقيقة',
  16451. '%d دقيقة',
  16452. ],
  16453. h: [
  16454. 'أقل من ساعة',
  16455. 'ساعة واحدة',
  16456. ['ساعتان', 'ساعتين'],
  16457. '%d ساعات',
  16458. '%d ساعة',
  16459. '%d ساعة',
  16460. ],
  16461. d: [
  16462. 'أقل من يوم',
  16463. 'يوم واحد',
  16464. ['يومان', 'يومين'],
  16465. '%d أيام',
  16466. '%d يومًا',
  16467. '%d يوم',
  16468. ],
  16469. M: [
  16470. 'أقل من شهر',
  16471. 'شهر واحد',
  16472. ['شهران', 'شهرين'],
  16473. '%d أشهر',
  16474. '%d شهرا',
  16475. '%d شهر',
  16476. ],
  16477. y: [
  16478. 'أقل من عام',
  16479. 'عام واحد',
  16480. ['عامان', 'عامين'],
  16481. '%d أعوام',
  16482. '%d عامًا',
  16483. '%d عام',
  16484. ],
  16485. },
  16486. pluralize = function (u) {
  16487. return function (number, withoutSuffix, string, isFuture) {
  16488. var f = pluralForm(number),
  16489. str = plurals[u][pluralForm(number)];
  16490. if (f === 2) {
  16491. str = str[withoutSuffix ? 0 : 1];
  16492. }
  16493. return str.replace(/%d/i, number);
  16494. };
  16495. },
  16496. months = [
  16497. 'يناير',
  16498. 'فبراير',
  16499. 'مارس',
  16500. 'أبريل',
  16501. 'مايو',
  16502. 'يونيو',
  16503. 'يوليو',
  16504. 'أغسطس',
  16505. 'سبتمبر',
  16506. 'أكتوبر',
  16507. 'نوفمبر',
  16508. 'ديسمبر',
  16509. ];
  16510. var ar = moment.defineLocale('ar', {
  16511. months: months,
  16512. monthsShort: months,
  16513. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  16514. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  16515. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  16516. weekdaysParseExact: true,
  16517. longDateFormat: {
  16518. LT: 'HH:mm',
  16519. LTS: 'HH:mm:ss',
  16520. L: 'D/\u200FM/\u200FYYYY',
  16521. LL: 'D MMMM YYYY',
  16522. LLL: 'D MMMM YYYY HH:mm',
  16523. LLLL: 'dddd D MMMM YYYY HH:mm',
  16524. },
  16525. meridiemParse: /ص|م/,
  16526. isPM: function (input) {
  16527. return 'م' === input;
  16528. },
  16529. meridiem: function (hour, minute, isLower) {
  16530. if (hour < 12) {
  16531. return 'ص';
  16532. } else {
  16533. return 'م';
  16534. }
  16535. },
  16536. calendar: {
  16537. sameDay: '[اليوم عند الساعة] LT',
  16538. nextDay: '[غدًا عند الساعة] LT',
  16539. nextWeek: 'dddd [عند الساعة] LT',
  16540. lastDay: '[أمس عند الساعة] LT',
  16541. lastWeek: 'dddd [عند الساعة] LT',
  16542. sameElse: 'L',
  16543. },
  16544. relativeTime: {
  16545. future: 'بعد %s',
  16546. past: 'منذ %s',
  16547. s: pluralize('s'),
  16548. ss: pluralize('s'),
  16549. m: pluralize('m'),
  16550. mm: pluralize('m'),
  16551. h: pluralize('h'),
  16552. hh: pluralize('h'),
  16553. d: pluralize('d'),
  16554. dd: pluralize('d'),
  16555. M: pluralize('M'),
  16556. MM: pluralize('M'),
  16557. y: pluralize('y'),
  16558. yy: pluralize('y'),
  16559. },
  16560. preparse: function (string) {
  16561. return string
  16562. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  16563. return numberMap[match];
  16564. })
  16565. .replace(/،/g, ',');
  16566. },
  16567. postformat: function (string) {
  16568. return string
  16569. .replace(/\d/g, function (match) {
  16570. return symbolMap[match];
  16571. })
  16572. .replace(/,/g, '،');
  16573. },
  16574. week: {
  16575. dow: 6, // Saturday is the first day of the week.
  16576. doy: 12, // The week that contains Jan 12th is the first week of the year.
  16577. },
  16578. });
  16579. return ar;
  16580. })));
  16581. /***/ }),
  16582. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/az.js":
  16583. /*!***************************************************************************!*\
  16584. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/az.js ***!
  16585. \***************************************************************************/
  16586. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16587. //! moment.js locale configuration
  16588. //! locale : Azerbaijani [az]
  16589. //! author : topchiyev : https://github.com/topchiyev
  16590. ;(function (global, factory) {
  16591. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16592. 0
  16593. }(this, (function (moment) { 'use strict';
  16594. //! moment.js locale configuration
  16595. var suffixes = {
  16596. 1: '-inci',
  16597. 5: '-inci',
  16598. 8: '-inci',
  16599. 70: '-inci',
  16600. 80: '-inci',
  16601. 2: '-nci',
  16602. 7: '-nci',
  16603. 20: '-nci',
  16604. 50: '-nci',
  16605. 3: '-üncü',
  16606. 4: '-üncü',
  16607. 100: '-üncü',
  16608. 6: '-ncı',
  16609. 9: '-uncu',
  16610. 10: '-uncu',
  16611. 30: '-uncu',
  16612. 60: '-ıncı',
  16613. 90: '-ıncı',
  16614. };
  16615. var az = moment.defineLocale('az', {
  16616. months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
  16617. '_'
  16618. ),
  16619. monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
  16620. weekdays:
  16621. 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
  16622. '_'
  16623. ),
  16624. weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
  16625. weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
  16626. weekdaysParseExact: true,
  16627. longDateFormat: {
  16628. LT: 'HH:mm',
  16629. LTS: 'HH:mm:ss',
  16630. L: 'DD.MM.YYYY',
  16631. LL: 'D MMMM YYYY',
  16632. LLL: 'D MMMM YYYY HH:mm',
  16633. LLLL: 'dddd, D MMMM YYYY HH:mm',
  16634. },
  16635. calendar: {
  16636. sameDay: '[bugün saat] LT',
  16637. nextDay: '[sabah saat] LT',
  16638. nextWeek: '[gələn həftə] dddd [saat] LT',
  16639. lastDay: '[dünən] LT',
  16640. lastWeek: '[keçən həftə] dddd [saat] LT',
  16641. sameElse: 'L',
  16642. },
  16643. relativeTime: {
  16644. future: '%s sonra',
  16645. past: '%s əvvəl',
  16646. s: 'bir neçə saniyə',
  16647. ss: '%d saniyə',
  16648. m: 'bir dəqiqə',
  16649. mm: '%d dəqiqə',
  16650. h: 'bir saat',
  16651. hh: '%d saat',
  16652. d: 'bir gün',
  16653. dd: '%d gün',
  16654. M: 'bir ay',
  16655. MM: '%d ay',
  16656. y: 'bir il',
  16657. yy: '%d il',
  16658. },
  16659. meridiemParse: /gecə|səhər|gündüz|axşam/,
  16660. isPM: function (input) {
  16661. return /^(gündüz|axşam)$/.test(input);
  16662. },
  16663. meridiem: function (hour, minute, isLower) {
  16664. if (hour < 4) {
  16665. return 'gecə';
  16666. } else if (hour < 12) {
  16667. return 'səhər';
  16668. } else if (hour < 17) {
  16669. return 'gündüz';
  16670. } else {
  16671. return 'axşam';
  16672. }
  16673. },
  16674. dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
  16675. ordinal: function (number) {
  16676. if (number === 0) {
  16677. // special case for zero
  16678. return number + '-ıncı';
  16679. }
  16680. var a = number % 10,
  16681. b = (number % 100) - a,
  16682. c = number >= 100 ? 100 : null;
  16683. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  16684. },
  16685. week: {
  16686. dow: 1, // Monday is the first day of the week.
  16687. doy: 7, // The week that contains Jan 7th is the first week of the year.
  16688. },
  16689. });
  16690. return az;
  16691. })));
  16692. /***/ }),
  16693. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/be.js":
  16694. /*!***************************************************************************!*\
  16695. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/be.js ***!
  16696. \***************************************************************************/
  16697. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16698. //! moment.js locale configuration
  16699. //! locale : Belarusian [be]
  16700. //! author : Dmitry Demidov : https://github.com/demidov91
  16701. //! author: Praleska: http://praleska.pro/
  16702. //! Author : Menelion Elensúle : https://github.com/Oire
  16703. ;(function (global, factory) {
  16704. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16705. 0
  16706. }(this, (function (moment) { 'use strict';
  16707. //! moment.js locale configuration
  16708. function plural(word, num) {
  16709. var forms = word.split('_');
  16710. return num % 10 === 1 && num % 100 !== 11
  16711. ? forms[0]
  16712. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  16713. ? forms[1]
  16714. : forms[2];
  16715. }
  16716. function relativeTimeWithPlural(number, withoutSuffix, key) {
  16717. var format = {
  16718. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  16719. mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
  16720. hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
  16721. dd: 'дзень_дні_дзён',
  16722. MM: 'месяц_месяцы_месяцаў',
  16723. yy: 'год_гады_гадоў',
  16724. };
  16725. if (key === 'm') {
  16726. return withoutSuffix ? 'хвіліна' : 'хвіліну';
  16727. } else if (key === 'h') {
  16728. return withoutSuffix ? 'гадзіна' : 'гадзіну';
  16729. } else {
  16730. return number + ' ' + plural(format[key], +number);
  16731. }
  16732. }
  16733. var be = moment.defineLocale('be', {
  16734. months: {
  16735. format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
  16736. '_'
  16737. ),
  16738. standalone:
  16739. 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
  16740. '_'
  16741. ),
  16742. },
  16743. monthsShort:
  16744. 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
  16745. weekdays: {
  16746. format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
  16747. '_'
  16748. ),
  16749. standalone:
  16750. 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
  16751. '_'
  16752. ),
  16753. isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
  16754. },
  16755. weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  16756. weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  16757. longDateFormat: {
  16758. LT: 'HH:mm',
  16759. LTS: 'HH:mm:ss',
  16760. L: 'DD.MM.YYYY',
  16761. LL: 'D MMMM YYYY г.',
  16762. LLL: 'D MMMM YYYY г., HH:mm',
  16763. LLLL: 'dddd, D MMMM YYYY г., HH:mm',
  16764. },
  16765. calendar: {
  16766. sameDay: '[Сёння ў] LT',
  16767. nextDay: '[Заўтра ў] LT',
  16768. lastDay: '[Учора ў] LT',
  16769. nextWeek: function () {
  16770. return '[У] dddd [ў] LT';
  16771. },
  16772. lastWeek: function () {
  16773. switch (this.day()) {
  16774. case 0:
  16775. case 3:
  16776. case 5:
  16777. case 6:
  16778. return '[У мінулую] dddd [ў] LT';
  16779. case 1:
  16780. case 2:
  16781. case 4:
  16782. return '[У мінулы] dddd [ў] LT';
  16783. }
  16784. },
  16785. sameElse: 'L',
  16786. },
  16787. relativeTime: {
  16788. future: 'праз %s',
  16789. past: '%s таму',
  16790. s: 'некалькі секунд',
  16791. m: relativeTimeWithPlural,
  16792. mm: relativeTimeWithPlural,
  16793. h: relativeTimeWithPlural,
  16794. hh: relativeTimeWithPlural,
  16795. d: 'дзень',
  16796. dd: relativeTimeWithPlural,
  16797. M: 'месяц',
  16798. MM: relativeTimeWithPlural,
  16799. y: 'год',
  16800. yy: relativeTimeWithPlural,
  16801. },
  16802. meridiemParse: /ночы|раніцы|дня|вечара/,
  16803. isPM: function (input) {
  16804. return /^(дня|вечара)$/.test(input);
  16805. },
  16806. meridiem: function (hour, minute, isLower) {
  16807. if (hour < 4) {
  16808. return 'ночы';
  16809. } else if (hour < 12) {
  16810. return 'раніцы';
  16811. } else if (hour < 17) {
  16812. return 'дня';
  16813. } else {
  16814. return 'вечара';
  16815. }
  16816. },
  16817. dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
  16818. ordinal: function (number, period) {
  16819. switch (period) {
  16820. case 'M':
  16821. case 'd':
  16822. case 'DDD':
  16823. case 'w':
  16824. case 'W':
  16825. return (number % 10 === 2 || number % 10 === 3) &&
  16826. number % 100 !== 12 &&
  16827. number % 100 !== 13
  16828. ? number + '-і'
  16829. : number + '-ы';
  16830. case 'D':
  16831. return number + '-га';
  16832. default:
  16833. return number;
  16834. }
  16835. },
  16836. week: {
  16837. dow: 1, // Monday is the first day of the week.
  16838. doy: 7, // The week that contains Jan 7th is the first week of the year.
  16839. },
  16840. });
  16841. return be;
  16842. })));
  16843. /***/ }),
  16844. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bg.js":
  16845. /*!***************************************************************************!*\
  16846. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bg.js ***!
  16847. \***************************************************************************/
  16848. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16849. //! moment.js locale configuration
  16850. //! locale : Bulgarian [bg]
  16851. //! author : Krasen Borisov : https://github.com/kraz
  16852. ;(function (global, factory) {
  16853. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16854. 0
  16855. }(this, (function (moment) { 'use strict';
  16856. //! moment.js locale configuration
  16857. var bg = moment.defineLocale('bg', {
  16858. months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
  16859. '_'
  16860. ),
  16861. monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  16862. weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
  16863. '_'
  16864. ),
  16865. weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  16866. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  16867. longDateFormat: {
  16868. LT: 'H:mm',
  16869. LTS: 'H:mm:ss',
  16870. L: 'D.MM.YYYY',
  16871. LL: 'D MMMM YYYY',
  16872. LLL: 'D MMMM YYYY H:mm',
  16873. LLLL: 'dddd, D MMMM YYYY H:mm',
  16874. },
  16875. calendar: {
  16876. sameDay: '[Днес в] LT',
  16877. nextDay: '[Утре в] LT',
  16878. nextWeek: 'dddd [в] LT',
  16879. lastDay: '[Вчера в] LT',
  16880. lastWeek: function () {
  16881. switch (this.day()) {
  16882. case 0:
  16883. case 3:
  16884. case 6:
  16885. return '[Миналата] dddd [в] LT';
  16886. case 1:
  16887. case 2:
  16888. case 4:
  16889. case 5:
  16890. return '[Миналия] dddd [в] LT';
  16891. }
  16892. },
  16893. sameElse: 'L',
  16894. },
  16895. relativeTime: {
  16896. future: 'след %s',
  16897. past: 'преди %s',
  16898. s: 'няколко секунди',
  16899. ss: '%d секунди',
  16900. m: 'минута',
  16901. mm: '%d минути',
  16902. h: 'час',
  16903. hh: '%d часа',
  16904. d: 'ден',
  16905. dd: '%d дена',
  16906. w: 'седмица',
  16907. ww: '%d седмици',
  16908. M: 'месец',
  16909. MM: '%d месеца',
  16910. y: 'година',
  16911. yy: '%d години',
  16912. },
  16913. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  16914. ordinal: function (number) {
  16915. var lastDigit = number % 10,
  16916. last2Digits = number % 100;
  16917. if (number === 0) {
  16918. return number + '-ев';
  16919. } else if (last2Digits === 0) {
  16920. return number + '-ен';
  16921. } else if (last2Digits > 10 && last2Digits < 20) {
  16922. return number + '-ти';
  16923. } else if (lastDigit === 1) {
  16924. return number + '-ви';
  16925. } else if (lastDigit === 2) {
  16926. return number + '-ри';
  16927. } else if (lastDigit === 7 || lastDigit === 8) {
  16928. return number + '-ми';
  16929. } else {
  16930. return number + '-ти';
  16931. }
  16932. },
  16933. week: {
  16934. dow: 1, // Monday is the first day of the week.
  16935. doy: 7, // The week that contains Jan 7th is the first week of the year.
  16936. },
  16937. });
  16938. return bg;
  16939. })));
  16940. /***/ }),
  16941. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bm.js":
  16942. /*!***************************************************************************!*\
  16943. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bm.js ***!
  16944. \***************************************************************************/
  16945. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  16946. //! moment.js locale configuration
  16947. //! locale : Bambara [bm]
  16948. //! author : Estelle Comment : https://github.com/estellecomment
  16949. ;(function (global, factory) {
  16950. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  16951. 0
  16952. }(this, (function (moment) { 'use strict';
  16953. //! moment.js locale configuration
  16954. var bm = moment.defineLocale('bm', {
  16955. months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
  16956. '_'
  16957. ),
  16958. monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
  16959. weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
  16960. weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
  16961. weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
  16962. longDateFormat: {
  16963. LT: 'HH:mm',
  16964. LTS: 'HH:mm:ss',
  16965. L: 'DD/MM/YYYY',
  16966. LL: 'MMMM [tile] D [san] YYYY',
  16967. LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  16968. LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  16969. },
  16970. calendar: {
  16971. sameDay: '[Bi lɛrɛ] LT',
  16972. nextDay: '[Sini lɛrɛ] LT',
  16973. nextWeek: 'dddd [don lɛrɛ] LT',
  16974. lastDay: '[Kunu lɛrɛ] LT',
  16975. lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
  16976. sameElse: 'L',
  16977. },
  16978. relativeTime: {
  16979. future: '%s kɔnɔ',
  16980. past: 'a bɛ %s bɔ',
  16981. s: 'sanga dama dama',
  16982. ss: 'sekondi %d',
  16983. m: 'miniti kelen',
  16984. mm: 'miniti %d',
  16985. h: 'lɛrɛ kelen',
  16986. hh: 'lɛrɛ %d',
  16987. d: 'tile kelen',
  16988. dd: 'tile %d',
  16989. M: 'kalo kelen',
  16990. MM: 'kalo %d',
  16991. y: 'san kelen',
  16992. yy: 'san %d',
  16993. },
  16994. week: {
  16995. dow: 1, // Monday is the first day of the week.
  16996. doy: 4, // The week that contains Jan 4th is the first week of the year.
  16997. },
  16998. });
  16999. return bm;
  17000. })));
  17001. /***/ }),
  17002. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn-bd.js":
  17003. /*!******************************************************************************!*\
  17004. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn-bd.js ***!
  17005. \******************************************************************************/
  17006. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17007. //! moment.js locale configuration
  17008. //! locale : Bengali (Bangladesh) [bn-bd]
  17009. //! author : Asraf Hossain Patoary : https://github.com/ashwoolford
  17010. ;(function (global, factory) {
  17011. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17012. 0
  17013. }(this, (function (moment) { 'use strict';
  17014. //! moment.js locale configuration
  17015. var symbolMap = {
  17016. 1: '১',
  17017. 2: '২',
  17018. 3: '৩',
  17019. 4: '৪',
  17020. 5: '৫',
  17021. 6: '৬',
  17022. 7: '৭',
  17023. 8: '৮',
  17024. 9: '৯',
  17025. 0: '০',
  17026. },
  17027. numberMap = {
  17028. '১': '1',
  17029. '২': '2',
  17030. '৩': '3',
  17031. '৪': '4',
  17032. '৫': '5',
  17033. '৬': '6',
  17034. '৭': '7',
  17035. '৮': '8',
  17036. '৯': '9',
  17037. '০': '0',
  17038. };
  17039. var bnBd = moment.defineLocale('bn-bd', {
  17040. months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
  17041. '_'
  17042. ),
  17043. monthsShort:
  17044. 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
  17045. '_'
  17046. ),
  17047. weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
  17048. '_'
  17049. ),
  17050. weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  17051. weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
  17052. longDateFormat: {
  17053. LT: 'A h:mm সময়',
  17054. LTS: 'A h:mm:ss সময়',
  17055. L: 'DD/MM/YYYY',
  17056. LL: 'D MMMM YYYY',
  17057. LLL: 'D MMMM YYYY, A h:mm সময়',
  17058. LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
  17059. },
  17060. calendar: {
  17061. sameDay: '[আজ] LT',
  17062. nextDay: '[আগামীকাল] LT',
  17063. nextWeek: 'dddd, LT',
  17064. lastDay: '[গতকাল] LT',
  17065. lastWeek: '[গত] dddd, LT',
  17066. sameElse: 'L',
  17067. },
  17068. relativeTime: {
  17069. future: '%s পরে',
  17070. past: '%s আগে',
  17071. s: 'কয়েক সেকেন্ড',
  17072. ss: '%d সেকেন্ড',
  17073. m: 'এক মিনিট',
  17074. mm: '%d মিনিট',
  17075. h: 'এক ঘন্টা',
  17076. hh: '%d ঘন্টা',
  17077. d: 'এক দিন',
  17078. dd: '%d দিন',
  17079. M: 'এক মাস',
  17080. MM: '%d মাস',
  17081. y: 'এক বছর',
  17082. yy: '%d বছর',
  17083. },
  17084. preparse: function (string) {
  17085. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  17086. return numberMap[match];
  17087. });
  17088. },
  17089. postformat: function (string) {
  17090. return string.replace(/\d/g, function (match) {
  17091. return symbolMap[match];
  17092. });
  17093. },
  17094. meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
  17095. meridiemHour: function (hour, meridiem) {
  17096. if (hour === 12) {
  17097. hour = 0;
  17098. }
  17099. if (meridiem === 'রাত') {
  17100. return hour < 4 ? hour : hour + 12;
  17101. } else if (meridiem === 'ভোর') {
  17102. return hour;
  17103. } else if (meridiem === 'সকাল') {
  17104. return hour;
  17105. } else if (meridiem === 'দুপুর') {
  17106. return hour >= 3 ? hour : hour + 12;
  17107. } else if (meridiem === 'বিকাল') {
  17108. return hour + 12;
  17109. } else if (meridiem === 'সন্ধ্যা') {
  17110. return hour + 12;
  17111. }
  17112. },
  17113. meridiem: function (hour, minute, isLower) {
  17114. if (hour < 4) {
  17115. return 'রাত';
  17116. } else if (hour < 6) {
  17117. return 'ভোর';
  17118. } else if (hour < 12) {
  17119. return 'সকাল';
  17120. } else if (hour < 15) {
  17121. return 'দুপুর';
  17122. } else if (hour < 18) {
  17123. return 'বিকাল';
  17124. } else if (hour < 20) {
  17125. return 'সন্ধ্যা';
  17126. } else {
  17127. return 'রাত';
  17128. }
  17129. },
  17130. week: {
  17131. dow: 0, // Sunday is the first day of the week.
  17132. doy: 6, // The week that contains Jan 6th is the first week of the year.
  17133. },
  17134. });
  17135. return bnBd;
  17136. })));
  17137. /***/ }),
  17138. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn.js":
  17139. /*!***************************************************************************!*\
  17140. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn.js ***!
  17141. \***************************************************************************/
  17142. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17143. //! moment.js locale configuration
  17144. //! locale : Bengali [bn]
  17145. //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
  17146. ;(function (global, factory) {
  17147. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17148. 0
  17149. }(this, (function (moment) { 'use strict';
  17150. //! moment.js locale configuration
  17151. var symbolMap = {
  17152. 1: '১',
  17153. 2: '২',
  17154. 3: '৩',
  17155. 4: '৪',
  17156. 5: '৫',
  17157. 6: '৬',
  17158. 7: '৭',
  17159. 8: '৮',
  17160. 9: '৯',
  17161. 0: '০',
  17162. },
  17163. numberMap = {
  17164. '১': '1',
  17165. '২': '2',
  17166. '৩': '3',
  17167. '৪': '4',
  17168. '৫': '5',
  17169. '৬': '6',
  17170. '৭': '7',
  17171. '৮': '8',
  17172. '৯': '9',
  17173. '০': '0',
  17174. };
  17175. var bn = moment.defineLocale('bn', {
  17176. months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
  17177. '_'
  17178. ),
  17179. monthsShort:
  17180. 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
  17181. '_'
  17182. ),
  17183. weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
  17184. '_'
  17185. ),
  17186. weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  17187. weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
  17188. longDateFormat: {
  17189. LT: 'A h:mm সময়',
  17190. LTS: 'A h:mm:ss সময়',
  17191. L: 'DD/MM/YYYY',
  17192. LL: 'D MMMM YYYY',
  17193. LLL: 'D MMMM YYYY, A h:mm সময়',
  17194. LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
  17195. },
  17196. calendar: {
  17197. sameDay: '[আজ] LT',
  17198. nextDay: '[আগামীকাল] LT',
  17199. nextWeek: 'dddd, LT',
  17200. lastDay: '[গতকাল] LT',
  17201. lastWeek: '[গত] dddd, LT',
  17202. sameElse: 'L',
  17203. },
  17204. relativeTime: {
  17205. future: '%s পরে',
  17206. past: '%s আগে',
  17207. s: 'কয়েক সেকেন্ড',
  17208. ss: '%d সেকেন্ড',
  17209. m: 'এক মিনিট',
  17210. mm: '%d মিনিট',
  17211. h: 'এক ঘন্টা',
  17212. hh: '%d ঘন্টা',
  17213. d: 'এক দিন',
  17214. dd: '%d দিন',
  17215. M: 'এক মাস',
  17216. MM: '%d মাস',
  17217. y: 'এক বছর',
  17218. yy: '%d বছর',
  17219. },
  17220. preparse: function (string) {
  17221. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  17222. return numberMap[match];
  17223. });
  17224. },
  17225. postformat: function (string) {
  17226. return string.replace(/\d/g, function (match) {
  17227. return symbolMap[match];
  17228. });
  17229. },
  17230. meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
  17231. meridiemHour: function (hour, meridiem) {
  17232. if (hour === 12) {
  17233. hour = 0;
  17234. }
  17235. if (
  17236. (meridiem === 'রাত' && hour >= 4) ||
  17237. (meridiem === 'দুপুর' && hour < 5) ||
  17238. meridiem === 'বিকাল'
  17239. ) {
  17240. return hour + 12;
  17241. } else {
  17242. return hour;
  17243. }
  17244. },
  17245. meridiem: function (hour, minute, isLower) {
  17246. if (hour < 4) {
  17247. return 'রাত';
  17248. } else if (hour < 10) {
  17249. return 'সকাল';
  17250. } else if (hour < 17) {
  17251. return 'দুপুর';
  17252. } else if (hour < 20) {
  17253. return 'বিকাল';
  17254. } else {
  17255. return 'রাত';
  17256. }
  17257. },
  17258. week: {
  17259. dow: 0, // Sunday is the first day of the week.
  17260. doy: 6, // The week that contains Jan 6th is the first week of the year.
  17261. },
  17262. });
  17263. return bn;
  17264. })));
  17265. /***/ }),
  17266. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bo.js":
  17267. /*!***************************************************************************!*\
  17268. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bo.js ***!
  17269. \***************************************************************************/
  17270. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17271. //! moment.js locale configuration
  17272. //! locale : Tibetan [bo]
  17273. //! author : Thupten N. Chakrishar : https://github.com/vajradog
  17274. ;(function (global, factory) {
  17275. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17276. 0
  17277. }(this, (function (moment) { 'use strict';
  17278. //! moment.js locale configuration
  17279. var symbolMap = {
  17280. 1: '༡',
  17281. 2: '༢',
  17282. 3: '༣',
  17283. 4: '༤',
  17284. 5: '༥',
  17285. 6: '༦',
  17286. 7: '༧',
  17287. 8: '༨',
  17288. 9: '༩',
  17289. 0: '༠',
  17290. },
  17291. numberMap = {
  17292. '༡': '1',
  17293. '༢': '2',
  17294. '༣': '3',
  17295. '༤': '4',
  17296. '༥': '5',
  17297. '༦': '6',
  17298. '༧': '7',
  17299. '༨': '8',
  17300. '༩': '9',
  17301. '༠': '0',
  17302. };
  17303. var bo = moment.defineLocale('bo', {
  17304. months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
  17305. '_'
  17306. ),
  17307. monthsShort:
  17308. 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
  17309. '_'
  17310. ),
  17311. monthsShortRegex: /^(ཟླ་\d{1,2})/,
  17312. monthsParseExact: true,
  17313. weekdays:
  17314. 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
  17315. '_'
  17316. ),
  17317. weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
  17318. '_'
  17319. ),
  17320. weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
  17321. longDateFormat: {
  17322. LT: 'A h:mm',
  17323. LTS: 'A h:mm:ss',
  17324. L: 'DD/MM/YYYY',
  17325. LL: 'D MMMM YYYY',
  17326. LLL: 'D MMMM YYYY, A h:mm',
  17327. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  17328. },
  17329. calendar: {
  17330. sameDay: '[དི་རིང] LT',
  17331. nextDay: '[སང་ཉིན] LT',
  17332. nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
  17333. lastDay: '[ཁ་སང] LT',
  17334. lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
  17335. sameElse: 'L',
  17336. },
  17337. relativeTime: {
  17338. future: '%s ལ་',
  17339. past: '%s སྔན་ལ',
  17340. s: 'ལམ་སང',
  17341. ss: '%d སྐར་ཆ།',
  17342. m: 'སྐར་མ་གཅིག',
  17343. mm: '%d སྐར་མ',
  17344. h: 'ཆུ་ཚོད་གཅིག',
  17345. hh: '%d ཆུ་ཚོད',
  17346. d: 'ཉིན་གཅིག',
  17347. dd: '%d ཉིན་',
  17348. M: 'ཟླ་བ་གཅིག',
  17349. MM: '%d ཟླ་བ',
  17350. y: 'ལོ་གཅིག',
  17351. yy: '%d ལོ',
  17352. },
  17353. preparse: function (string) {
  17354. return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
  17355. return numberMap[match];
  17356. });
  17357. },
  17358. postformat: function (string) {
  17359. return string.replace(/\d/g, function (match) {
  17360. return symbolMap[match];
  17361. });
  17362. },
  17363. meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
  17364. meridiemHour: function (hour, meridiem) {
  17365. if (hour === 12) {
  17366. hour = 0;
  17367. }
  17368. if (
  17369. (meridiem === 'མཚན་མོ' && hour >= 4) ||
  17370. (meridiem === 'ཉིན་གུང' && hour < 5) ||
  17371. meridiem === 'དགོང་དག'
  17372. ) {
  17373. return hour + 12;
  17374. } else {
  17375. return hour;
  17376. }
  17377. },
  17378. meridiem: function (hour, minute, isLower) {
  17379. if (hour < 4) {
  17380. return 'མཚན་མོ';
  17381. } else if (hour < 10) {
  17382. return 'ཞོགས་ཀས';
  17383. } else if (hour < 17) {
  17384. return 'ཉིན་གུང';
  17385. } else if (hour < 20) {
  17386. return 'དགོང་དག';
  17387. } else {
  17388. return 'མཚན་མོ';
  17389. }
  17390. },
  17391. week: {
  17392. dow: 0, // Sunday is the first day of the week.
  17393. doy: 6, // The week that contains Jan 6th is the first week of the year.
  17394. },
  17395. });
  17396. return bo;
  17397. })));
  17398. /***/ }),
  17399. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/br.js":
  17400. /*!***************************************************************************!*\
  17401. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/br.js ***!
  17402. \***************************************************************************/
  17403. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17404. //! moment.js locale configuration
  17405. //! locale : Breton [br]
  17406. //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
  17407. ;(function (global, factory) {
  17408. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17409. 0
  17410. }(this, (function (moment) { 'use strict';
  17411. //! moment.js locale configuration
  17412. function relativeTimeWithMutation(number, withoutSuffix, key) {
  17413. var format = {
  17414. mm: 'munutenn',
  17415. MM: 'miz',
  17416. dd: 'devezh',
  17417. };
  17418. return number + ' ' + mutation(format[key], number);
  17419. }
  17420. function specialMutationForYears(number) {
  17421. switch (lastNumber(number)) {
  17422. case 1:
  17423. case 3:
  17424. case 4:
  17425. case 5:
  17426. case 9:
  17427. return number + ' bloaz';
  17428. default:
  17429. return number + ' vloaz';
  17430. }
  17431. }
  17432. function lastNumber(number) {
  17433. if (number > 9) {
  17434. return lastNumber(number % 10);
  17435. }
  17436. return number;
  17437. }
  17438. function mutation(text, number) {
  17439. if (number === 2) {
  17440. return softMutation(text);
  17441. }
  17442. return text;
  17443. }
  17444. function softMutation(text) {
  17445. var mutationTable = {
  17446. m: 'v',
  17447. b: 'v',
  17448. d: 'z',
  17449. };
  17450. if (mutationTable[text.charAt(0)] === undefined) {
  17451. return text;
  17452. }
  17453. return mutationTable[text.charAt(0)] + text.substring(1);
  17454. }
  17455. var monthsParse = [
  17456. /^gen/i,
  17457. /^c[ʼ\']hwe/i,
  17458. /^meu/i,
  17459. /^ebr/i,
  17460. /^mae/i,
  17461. /^(mez|eve)/i,
  17462. /^gou/i,
  17463. /^eos/i,
  17464. /^gwe/i,
  17465. /^her/i,
  17466. /^du/i,
  17467. /^ker/i,
  17468. ],
  17469. monthsRegex =
  17470. /^(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,
  17471. monthsStrictRegex =
  17472. /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
  17473. monthsShortStrictRegex =
  17474. /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
  17475. fullWeekdaysParse = [
  17476. /^sul/i,
  17477. /^lun/i,
  17478. /^meurzh/i,
  17479. /^merc[ʼ\']her/i,
  17480. /^yaou/i,
  17481. /^gwener/i,
  17482. /^sadorn/i,
  17483. ],
  17484. shortWeekdaysParse = [
  17485. /^Sul/i,
  17486. /^Lun/i,
  17487. /^Meu/i,
  17488. /^Mer/i,
  17489. /^Yao/i,
  17490. /^Gwe/i,
  17491. /^Sad/i,
  17492. ],
  17493. minWeekdaysParse = [
  17494. /^Su/i,
  17495. /^Lu/i,
  17496. /^Me([^r]|$)/i,
  17497. /^Mer/i,
  17498. /^Ya/i,
  17499. /^Gw/i,
  17500. /^Sa/i,
  17501. ];
  17502. var br = moment.defineLocale('br', {
  17503. months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
  17504. '_'
  17505. ),
  17506. monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
  17507. weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
  17508. weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
  17509. weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
  17510. weekdaysParse: minWeekdaysParse,
  17511. fullWeekdaysParse: fullWeekdaysParse,
  17512. shortWeekdaysParse: shortWeekdaysParse,
  17513. minWeekdaysParse: minWeekdaysParse,
  17514. monthsRegex: monthsRegex,
  17515. monthsShortRegex: monthsRegex,
  17516. monthsStrictRegex: monthsStrictRegex,
  17517. monthsShortStrictRegex: monthsShortStrictRegex,
  17518. monthsParse: monthsParse,
  17519. longMonthsParse: monthsParse,
  17520. shortMonthsParse: monthsParse,
  17521. longDateFormat: {
  17522. LT: 'HH:mm',
  17523. LTS: 'HH:mm:ss',
  17524. L: 'DD/MM/YYYY',
  17525. LL: 'D [a viz] MMMM YYYY',
  17526. LLL: 'D [a viz] MMMM YYYY HH:mm',
  17527. LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
  17528. },
  17529. calendar: {
  17530. sameDay: '[Hiziv da] LT',
  17531. nextDay: '[Warcʼhoazh da] LT',
  17532. nextWeek: 'dddd [da] LT',
  17533. lastDay: '[Decʼh da] LT',
  17534. lastWeek: 'dddd [paset da] LT',
  17535. sameElse: 'L',
  17536. },
  17537. relativeTime: {
  17538. future: 'a-benn %s',
  17539. past: '%s ʼzo',
  17540. s: 'un nebeud segondennoù',
  17541. ss: '%d eilenn',
  17542. m: 'ur vunutenn',
  17543. mm: relativeTimeWithMutation,
  17544. h: 'un eur',
  17545. hh: '%d eur',
  17546. d: 'un devezh',
  17547. dd: relativeTimeWithMutation,
  17548. M: 'ur miz',
  17549. MM: relativeTimeWithMutation,
  17550. y: 'ur bloaz',
  17551. yy: specialMutationForYears,
  17552. },
  17553. dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
  17554. ordinal: function (number) {
  17555. var output = number === 1 ? 'añ' : 'vet';
  17556. return number + output;
  17557. },
  17558. week: {
  17559. dow: 1, // Monday is the first day of the week.
  17560. doy: 4, // The week that contains Jan 4th is the first week of the year.
  17561. },
  17562. meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
  17563. isPM: function (token) {
  17564. return token === 'g.m.';
  17565. },
  17566. meridiem: function (hour, minute, isLower) {
  17567. return hour < 12 ? 'a.m.' : 'g.m.';
  17568. },
  17569. });
  17570. return br;
  17571. })));
  17572. /***/ }),
  17573. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bs.js":
  17574. /*!***************************************************************************!*\
  17575. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bs.js ***!
  17576. \***************************************************************************/
  17577. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17578. //! moment.js locale configuration
  17579. //! locale : Bosnian [bs]
  17580. //! author : Nedim Cholich : https://github.com/frontyard
  17581. //! based on (hr) translation by Bojan Marković
  17582. ;(function (global, factory) {
  17583. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17584. 0
  17585. }(this, (function (moment) { 'use strict';
  17586. //! moment.js locale configuration
  17587. function translate(number, withoutSuffix, key) {
  17588. var result = number + ' ';
  17589. switch (key) {
  17590. case 'ss':
  17591. if (number === 1) {
  17592. result += 'sekunda';
  17593. } else if (number === 2 || number === 3 || number === 4) {
  17594. result += 'sekunde';
  17595. } else {
  17596. result += 'sekundi';
  17597. }
  17598. return result;
  17599. case 'm':
  17600. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  17601. case 'mm':
  17602. if (number === 1) {
  17603. result += 'minuta';
  17604. } else if (number === 2 || number === 3 || number === 4) {
  17605. result += 'minute';
  17606. } else {
  17607. result += 'minuta';
  17608. }
  17609. return result;
  17610. case 'h':
  17611. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  17612. case 'hh':
  17613. if (number === 1) {
  17614. result += 'sat';
  17615. } else if (number === 2 || number === 3 || number === 4) {
  17616. result += 'sata';
  17617. } else {
  17618. result += 'sati';
  17619. }
  17620. return result;
  17621. case 'dd':
  17622. if (number === 1) {
  17623. result += 'dan';
  17624. } else {
  17625. result += 'dana';
  17626. }
  17627. return result;
  17628. case 'MM':
  17629. if (number === 1) {
  17630. result += 'mjesec';
  17631. } else if (number === 2 || number === 3 || number === 4) {
  17632. result += 'mjeseca';
  17633. } else {
  17634. result += 'mjeseci';
  17635. }
  17636. return result;
  17637. case 'yy':
  17638. if (number === 1) {
  17639. result += 'godina';
  17640. } else if (number === 2 || number === 3 || number === 4) {
  17641. result += 'godine';
  17642. } else {
  17643. result += 'godina';
  17644. }
  17645. return result;
  17646. }
  17647. }
  17648. var bs = moment.defineLocale('bs', {
  17649. months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
  17650. '_'
  17651. ),
  17652. monthsShort:
  17653. 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
  17654. '_'
  17655. ),
  17656. monthsParseExact: true,
  17657. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  17658. '_'
  17659. ),
  17660. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  17661. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  17662. weekdaysParseExact: true,
  17663. longDateFormat: {
  17664. LT: 'H:mm',
  17665. LTS: 'H:mm:ss',
  17666. L: 'DD.MM.YYYY',
  17667. LL: 'D. MMMM YYYY',
  17668. LLL: 'D. MMMM YYYY H:mm',
  17669. LLLL: 'dddd, D. MMMM YYYY H:mm',
  17670. },
  17671. calendar: {
  17672. sameDay: '[danas u] LT',
  17673. nextDay: '[sutra u] LT',
  17674. nextWeek: function () {
  17675. switch (this.day()) {
  17676. case 0:
  17677. return '[u] [nedjelju] [u] LT';
  17678. case 3:
  17679. return '[u] [srijedu] [u] LT';
  17680. case 6:
  17681. return '[u] [subotu] [u] LT';
  17682. case 1:
  17683. case 2:
  17684. case 4:
  17685. case 5:
  17686. return '[u] dddd [u] LT';
  17687. }
  17688. },
  17689. lastDay: '[jučer u] LT',
  17690. lastWeek: function () {
  17691. switch (this.day()) {
  17692. case 0:
  17693. case 3:
  17694. return '[prošlu] dddd [u] LT';
  17695. case 6:
  17696. return '[prošle] [subote] [u] LT';
  17697. case 1:
  17698. case 2:
  17699. case 4:
  17700. case 5:
  17701. return '[prošli] dddd [u] LT';
  17702. }
  17703. },
  17704. sameElse: 'L',
  17705. },
  17706. relativeTime: {
  17707. future: 'za %s',
  17708. past: 'prije %s',
  17709. s: 'par sekundi',
  17710. ss: translate,
  17711. m: translate,
  17712. mm: translate,
  17713. h: translate,
  17714. hh: translate,
  17715. d: 'dan',
  17716. dd: translate,
  17717. M: 'mjesec',
  17718. MM: translate,
  17719. y: 'godinu',
  17720. yy: translate,
  17721. },
  17722. dayOfMonthOrdinalParse: /\d{1,2}\./,
  17723. ordinal: '%d.',
  17724. week: {
  17725. dow: 1, // Monday is the first day of the week.
  17726. doy: 7, // The week that contains Jan 7th is the first week of the year.
  17727. },
  17728. });
  17729. return bs;
  17730. })));
  17731. /***/ }),
  17732. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ca.js":
  17733. /*!***************************************************************************!*\
  17734. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ca.js ***!
  17735. \***************************************************************************/
  17736. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17737. //! moment.js locale configuration
  17738. //! locale : Catalan [ca]
  17739. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  17740. ;(function (global, factory) {
  17741. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17742. 0
  17743. }(this, (function (moment) { 'use strict';
  17744. //! moment.js locale configuration
  17745. var ca = moment.defineLocale('ca', {
  17746. months: {
  17747. standalone:
  17748. 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
  17749. '_'
  17750. ),
  17751. 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(
  17752. '_'
  17753. ),
  17754. isFormat: /D[oD]?(\s)+MMMM/,
  17755. },
  17756. monthsShort:
  17757. 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
  17758. '_'
  17759. ),
  17760. monthsParseExact: true,
  17761. weekdays:
  17762. 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
  17763. '_'
  17764. ),
  17765. weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  17766. weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  17767. weekdaysParseExact: true,
  17768. longDateFormat: {
  17769. LT: 'H:mm',
  17770. LTS: 'H:mm:ss',
  17771. L: 'DD/MM/YYYY',
  17772. LL: 'D MMMM [de] YYYY',
  17773. ll: 'D MMM YYYY',
  17774. LLL: 'D MMMM [de] YYYY [a les] H:mm',
  17775. lll: 'D MMM YYYY, H:mm',
  17776. LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
  17777. llll: 'ddd D MMM YYYY, H:mm',
  17778. },
  17779. calendar: {
  17780. sameDay: function () {
  17781. return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  17782. },
  17783. nextDay: function () {
  17784. return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  17785. },
  17786. nextWeek: function () {
  17787. return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  17788. },
  17789. lastDay: function () {
  17790. return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  17791. },
  17792. lastWeek: function () {
  17793. return (
  17794. '[el] dddd [passat a ' +
  17795. (this.hours() !== 1 ? 'les' : 'la') +
  17796. '] LT'
  17797. );
  17798. },
  17799. sameElse: 'L',
  17800. },
  17801. relativeTime: {
  17802. future: "d'aquí %s",
  17803. past: 'fa %s',
  17804. s: 'uns segons',
  17805. ss: '%d segons',
  17806. m: 'un minut',
  17807. mm: '%d minuts',
  17808. h: 'una hora',
  17809. hh: '%d hores',
  17810. d: 'un dia',
  17811. dd: '%d dies',
  17812. M: 'un mes',
  17813. MM: '%d mesos',
  17814. y: 'un any',
  17815. yy: '%d anys',
  17816. },
  17817. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  17818. ordinal: function (number, period) {
  17819. var output =
  17820. number === 1
  17821. ? 'r'
  17822. : number === 2
  17823. ? 'n'
  17824. : number === 3
  17825. ? 'r'
  17826. : number === 4
  17827. ? 't'
  17828. : 'è';
  17829. if (period === 'w' || period === 'W') {
  17830. output = 'a';
  17831. }
  17832. return number + output;
  17833. },
  17834. week: {
  17835. dow: 1, // Monday is the first day of the week.
  17836. doy: 4, // The week that contains Jan 4th is the first week of the year.
  17837. },
  17838. });
  17839. return ca;
  17840. })));
  17841. /***/ }),
  17842. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cs.js":
  17843. /*!***************************************************************************!*\
  17844. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cs.js ***!
  17845. \***************************************************************************/
  17846. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  17847. //! moment.js locale configuration
  17848. //! locale : Czech [cs]
  17849. //! author : petrbela : https://github.com/petrbela
  17850. ;(function (global, factory) {
  17851. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  17852. 0
  17853. }(this, (function (moment) { 'use strict';
  17854. //! moment.js locale configuration
  17855. var months = {
  17856. format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
  17857. '_'
  17858. ),
  17859. standalone:
  17860. 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
  17861. '_'
  17862. ),
  17863. },
  17864. monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
  17865. monthsParse = [
  17866. /^led/i,
  17867. /^úno/i,
  17868. /^bře/i,
  17869. /^dub/i,
  17870. /^kvě/i,
  17871. /^(čvn|červen$|června)/i,
  17872. /^(čvc|červenec|července)/i,
  17873. /^srp/i,
  17874. /^zář/i,
  17875. /^říj/i,
  17876. /^lis/i,
  17877. /^pro/i,
  17878. ],
  17879. // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
  17880. // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
  17881. monthsRegex =
  17882. /^(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;
  17883. function plural(n) {
  17884. return n > 1 && n < 5 && ~~(n / 10) !== 1;
  17885. }
  17886. function translate(number, withoutSuffix, key, isFuture) {
  17887. var result = number + ' ';
  17888. switch (key) {
  17889. case 's': // a few seconds / in a few seconds / a few seconds ago
  17890. return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
  17891. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  17892. if (withoutSuffix || isFuture) {
  17893. return result + (plural(number) ? 'sekundy' : 'sekund');
  17894. } else {
  17895. return result + 'sekundami';
  17896. }
  17897. case 'm': // a minute / in a minute / a minute ago
  17898. return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
  17899. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  17900. if (withoutSuffix || isFuture) {
  17901. return result + (plural(number) ? 'minuty' : 'minut');
  17902. } else {
  17903. return result + 'minutami';
  17904. }
  17905. case 'h': // an hour / in an hour / an hour ago
  17906. return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
  17907. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  17908. if (withoutSuffix || isFuture) {
  17909. return result + (plural(number) ? 'hodiny' : 'hodin');
  17910. } else {
  17911. return result + 'hodinami';
  17912. }
  17913. case 'd': // a day / in a day / a day ago
  17914. return withoutSuffix || isFuture ? 'den' : 'dnem';
  17915. case 'dd': // 9 days / in 9 days / 9 days ago
  17916. if (withoutSuffix || isFuture) {
  17917. return result + (plural(number) ? 'dny' : 'dní');
  17918. } else {
  17919. return result + 'dny';
  17920. }
  17921. case 'M': // a month / in a month / a month ago
  17922. return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
  17923. case 'MM': // 9 months / in 9 months / 9 months ago
  17924. if (withoutSuffix || isFuture) {
  17925. return result + (plural(number) ? 'měsíce' : 'měsíců');
  17926. } else {
  17927. return result + 'měsíci';
  17928. }
  17929. case 'y': // a year / in a year / a year ago
  17930. return withoutSuffix || isFuture ? 'rok' : 'rokem';
  17931. case 'yy': // 9 years / in 9 years / 9 years ago
  17932. if (withoutSuffix || isFuture) {
  17933. return result + (plural(number) ? 'roky' : 'let');
  17934. } else {
  17935. return result + 'lety';
  17936. }
  17937. }
  17938. }
  17939. var cs = moment.defineLocale('cs', {
  17940. months: months,
  17941. monthsShort: monthsShort,
  17942. monthsRegex: monthsRegex,
  17943. monthsShortRegex: monthsRegex,
  17944. // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
  17945. // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
  17946. monthsStrictRegex:
  17947. /^(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,
  17948. monthsShortStrictRegex:
  17949. /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
  17950. monthsParse: monthsParse,
  17951. longMonthsParse: monthsParse,
  17952. shortMonthsParse: monthsParse,
  17953. weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  17954. weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
  17955. weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
  17956. longDateFormat: {
  17957. LT: 'H:mm',
  17958. LTS: 'H:mm:ss',
  17959. L: 'DD.MM.YYYY',
  17960. LL: 'D. MMMM YYYY',
  17961. LLL: 'D. MMMM YYYY H:mm',
  17962. LLLL: 'dddd D. MMMM YYYY H:mm',
  17963. l: 'D. M. YYYY',
  17964. },
  17965. calendar: {
  17966. sameDay: '[dnes v] LT',
  17967. nextDay: '[zítra v] LT',
  17968. nextWeek: function () {
  17969. switch (this.day()) {
  17970. case 0:
  17971. return '[v neděli v] LT';
  17972. case 1:
  17973. case 2:
  17974. return '[v] dddd [v] LT';
  17975. case 3:
  17976. return '[ve středu v] LT';
  17977. case 4:
  17978. return '[ve čtvrtek v] LT';
  17979. case 5:
  17980. return '[v pátek v] LT';
  17981. case 6:
  17982. return '[v sobotu v] LT';
  17983. }
  17984. },
  17985. lastDay: '[včera v] LT',
  17986. lastWeek: function () {
  17987. switch (this.day()) {
  17988. case 0:
  17989. return '[minulou neděli v] LT';
  17990. case 1:
  17991. case 2:
  17992. return '[minulé] dddd [v] LT';
  17993. case 3:
  17994. return '[minulou středu v] LT';
  17995. case 4:
  17996. case 5:
  17997. return '[minulý] dddd [v] LT';
  17998. case 6:
  17999. return '[minulou sobotu v] LT';
  18000. }
  18001. },
  18002. sameElse: 'L',
  18003. },
  18004. relativeTime: {
  18005. future: 'za %s',
  18006. past: 'před %s',
  18007. s: translate,
  18008. ss: translate,
  18009. m: translate,
  18010. mm: translate,
  18011. h: translate,
  18012. hh: translate,
  18013. d: translate,
  18014. dd: translate,
  18015. M: translate,
  18016. MM: translate,
  18017. y: translate,
  18018. yy: translate,
  18019. },
  18020. dayOfMonthOrdinalParse: /\d{1,2}\./,
  18021. ordinal: '%d.',
  18022. week: {
  18023. dow: 1, // Monday is the first day of the week.
  18024. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18025. },
  18026. });
  18027. return cs;
  18028. })));
  18029. /***/ }),
  18030. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cv.js":
  18031. /*!***************************************************************************!*\
  18032. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cv.js ***!
  18033. \***************************************************************************/
  18034. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18035. //! moment.js locale configuration
  18036. //! locale : Chuvash [cv]
  18037. //! author : Anatoly Mironov : https://github.com/mirontoli
  18038. ;(function (global, factory) {
  18039. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18040. 0
  18041. }(this, (function (moment) { 'use strict';
  18042. //! moment.js locale configuration
  18043. var cv = moment.defineLocale('cv', {
  18044. months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
  18045. '_'
  18046. ),
  18047. monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
  18048. weekdays:
  18049. 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
  18050. '_'
  18051. ),
  18052. weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
  18053. weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
  18054. longDateFormat: {
  18055. LT: 'HH:mm',
  18056. LTS: 'HH:mm:ss',
  18057. L: 'DD-MM-YYYY',
  18058. LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
  18059. LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  18060. LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  18061. },
  18062. calendar: {
  18063. sameDay: '[Паян] LT [сехетре]',
  18064. nextDay: '[Ыран] LT [сехетре]',
  18065. lastDay: '[Ӗнер] LT [сехетре]',
  18066. nextWeek: '[Ҫитес] dddd LT [сехетре]',
  18067. lastWeek: '[Иртнӗ] dddd LT [сехетре]',
  18068. sameElse: 'L',
  18069. },
  18070. relativeTime: {
  18071. future: function (output) {
  18072. var affix = /сехет$/i.exec(output)
  18073. ? 'рен'
  18074. : /ҫул$/i.exec(output)
  18075. ? 'тан'
  18076. : 'ран';
  18077. return output + affix;
  18078. },
  18079. past: '%s каялла',
  18080. s: 'пӗр-ик ҫеккунт',
  18081. ss: '%d ҫеккунт',
  18082. m: 'пӗр минут',
  18083. mm: '%d минут',
  18084. h: 'пӗр сехет',
  18085. hh: '%d сехет',
  18086. d: 'пӗр кун',
  18087. dd: '%d кун',
  18088. M: 'пӗр уйӑх',
  18089. MM: '%d уйӑх',
  18090. y: 'пӗр ҫул',
  18091. yy: '%d ҫул',
  18092. },
  18093. dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
  18094. ordinal: '%d-мӗш',
  18095. week: {
  18096. dow: 1, // Monday is the first day of the week.
  18097. doy: 7, // The week that contains Jan 7th is the first week of the year.
  18098. },
  18099. });
  18100. return cv;
  18101. })));
  18102. /***/ }),
  18103. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cy.js":
  18104. /*!***************************************************************************!*\
  18105. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cy.js ***!
  18106. \***************************************************************************/
  18107. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18108. //! moment.js locale configuration
  18109. //! locale : Welsh [cy]
  18110. //! author : Robert Allen : https://github.com/robgallen
  18111. //! author : https://github.com/ryangreaves
  18112. ;(function (global, factory) {
  18113. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18114. 0
  18115. }(this, (function (moment) { 'use strict';
  18116. //! moment.js locale configuration
  18117. var cy = moment.defineLocale('cy', {
  18118. months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
  18119. '_'
  18120. ),
  18121. monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
  18122. '_'
  18123. ),
  18124. weekdays:
  18125. 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
  18126. '_'
  18127. ),
  18128. weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
  18129. weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
  18130. weekdaysParseExact: true,
  18131. // time formats are the same as en-gb
  18132. longDateFormat: {
  18133. LT: 'HH:mm',
  18134. LTS: 'HH:mm:ss',
  18135. L: 'DD/MM/YYYY',
  18136. LL: 'D MMMM YYYY',
  18137. LLL: 'D MMMM YYYY HH:mm',
  18138. LLLL: 'dddd, D MMMM YYYY HH:mm',
  18139. },
  18140. calendar: {
  18141. sameDay: '[Heddiw am] LT',
  18142. nextDay: '[Yfory am] LT',
  18143. nextWeek: 'dddd [am] LT',
  18144. lastDay: '[Ddoe am] LT',
  18145. lastWeek: 'dddd [diwethaf am] LT',
  18146. sameElse: 'L',
  18147. },
  18148. relativeTime: {
  18149. future: 'mewn %s',
  18150. past: '%s yn ôl',
  18151. s: 'ychydig eiliadau',
  18152. ss: '%d eiliad',
  18153. m: 'munud',
  18154. mm: '%d munud',
  18155. h: 'awr',
  18156. hh: '%d awr',
  18157. d: 'diwrnod',
  18158. dd: '%d diwrnod',
  18159. M: 'mis',
  18160. MM: '%d mis',
  18161. y: 'blwyddyn',
  18162. yy: '%d flynedd',
  18163. },
  18164. dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
  18165. // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  18166. ordinal: function (number) {
  18167. var b = number,
  18168. output = '',
  18169. lookup = [
  18170. '',
  18171. 'af',
  18172. 'il',
  18173. 'ydd',
  18174. 'ydd',
  18175. 'ed',
  18176. 'ed',
  18177. 'ed',
  18178. 'fed',
  18179. 'fed',
  18180. 'fed', // 1af to 10fed
  18181. 'eg',
  18182. 'fed',
  18183. 'eg',
  18184. 'eg',
  18185. 'fed',
  18186. 'eg',
  18187. 'eg',
  18188. 'fed',
  18189. 'eg',
  18190. 'fed', // 11eg to 20fed
  18191. ];
  18192. if (b > 20) {
  18193. if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  18194. output = 'fed'; // not 30ain, 70ain or 90ain
  18195. } else {
  18196. output = 'ain';
  18197. }
  18198. } else if (b > 0) {
  18199. output = lookup[b];
  18200. }
  18201. return number + output;
  18202. },
  18203. week: {
  18204. dow: 1, // Monday is the first day of the week.
  18205. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18206. },
  18207. });
  18208. return cy;
  18209. })));
  18210. /***/ }),
  18211. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/da.js":
  18212. /*!***************************************************************************!*\
  18213. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/da.js ***!
  18214. \***************************************************************************/
  18215. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18216. //! moment.js locale configuration
  18217. //! locale : Danish [da]
  18218. //! author : Ulrik Nielsen : https://github.com/mrbase
  18219. ;(function (global, factory) {
  18220. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18221. 0
  18222. }(this, (function (moment) { 'use strict';
  18223. //! moment.js locale configuration
  18224. var da = moment.defineLocale('da', {
  18225. months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
  18226. '_'
  18227. ),
  18228. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  18229. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  18230. weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
  18231. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  18232. longDateFormat: {
  18233. LT: 'HH:mm',
  18234. LTS: 'HH:mm:ss',
  18235. L: 'DD.MM.YYYY',
  18236. LL: 'D. MMMM YYYY',
  18237. LLL: 'D. MMMM YYYY HH:mm',
  18238. LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
  18239. },
  18240. calendar: {
  18241. sameDay: '[i dag kl.] LT',
  18242. nextDay: '[i morgen kl.] LT',
  18243. nextWeek: 'på dddd [kl.] LT',
  18244. lastDay: '[i går kl.] LT',
  18245. lastWeek: '[i] dddd[s kl.] LT',
  18246. sameElse: 'L',
  18247. },
  18248. relativeTime: {
  18249. future: 'om %s',
  18250. past: '%s siden',
  18251. s: 'få sekunder',
  18252. ss: '%d sekunder',
  18253. m: 'et minut',
  18254. mm: '%d minutter',
  18255. h: 'en time',
  18256. hh: '%d timer',
  18257. d: 'en dag',
  18258. dd: '%d dage',
  18259. M: 'en måned',
  18260. MM: '%d måneder',
  18261. y: 'et år',
  18262. yy: '%d år',
  18263. },
  18264. dayOfMonthOrdinalParse: /\d{1,2}\./,
  18265. ordinal: '%d.',
  18266. week: {
  18267. dow: 1, // Monday is the first day of the week.
  18268. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18269. },
  18270. });
  18271. return da;
  18272. })));
  18273. /***/ }),
  18274. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-at.js":
  18275. /*!******************************************************************************!*\
  18276. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-at.js ***!
  18277. \******************************************************************************/
  18278. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18279. //! moment.js locale configuration
  18280. //! locale : German (Austria) [de-at]
  18281. //! author : lluchs : https://github.com/lluchs
  18282. //! author: Menelion Elensúle: https://github.com/Oire
  18283. //! author : Martin Groller : https://github.com/MadMG
  18284. //! author : Mikolaj Dadela : https://github.com/mik01aj
  18285. ;(function (global, factory) {
  18286. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18287. 0
  18288. }(this, (function (moment) { 'use strict';
  18289. //! moment.js locale configuration
  18290. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  18291. var format = {
  18292. m: ['eine Minute', 'einer Minute'],
  18293. h: ['eine Stunde', 'einer Stunde'],
  18294. d: ['ein Tag', 'einem Tag'],
  18295. dd: [number + ' Tage', number + ' Tagen'],
  18296. w: ['eine Woche', 'einer Woche'],
  18297. M: ['ein Monat', 'einem Monat'],
  18298. MM: [number + ' Monate', number + ' Monaten'],
  18299. y: ['ein Jahr', 'einem Jahr'],
  18300. yy: [number + ' Jahre', number + ' Jahren'],
  18301. };
  18302. return withoutSuffix ? format[key][0] : format[key][1];
  18303. }
  18304. var deAt = moment.defineLocale('de-at', {
  18305. months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  18306. '_'
  18307. ),
  18308. monthsShort:
  18309. 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  18310. monthsParseExact: true,
  18311. weekdays:
  18312. 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  18313. '_'
  18314. ),
  18315. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  18316. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  18317. weekdaysParseExact: true,
  18318. longDateFormat: {
  18319. LT: 'HH:mm',
  18320. LTS: 'HH:mm:ss',
  18321. L: 'DD.MM.YYYY',
  18322. LL: 'D. MMMM YYYY',
  18323. LLL: 'D. MMMM YYYY HH:mm',
  18324. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  18325. },
  18326. calendar: {
  18327. sameDay: '[heute um] LT [Uhr]',
  18328. sameElse: 'L',
  18329. nextDay: '[morgen um] LT [Uhr]',
  18330. nextWeek: 'dddd [um] LT [Uhr]',
  18331. lastDay: '[gestern um] LT [Uhr]',
  18332. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  18333. },
  18334. relativeTime: {
  18335. future: 'in %s',
  18336. past: 'vor %s',
  18337. s: 'ein paar Sekunden',
  18338. ss: '%d Sekunden',
  18339. m: processRelativeTime,
  18340. mm: '%d Minuten',
  18341. h: processRelativeTime,
  18342. hh: '%d Stunden',
  18343. d: processRelativeTime,
  18344. dd: processRelativeTime,
  18345. w: processRelativeTime,
  18346. ww: '%d Wochen',
  18347. M: processRelativeTime,
  18348. MM: processRelativeTime,
  18349. y: processRelativeTime,
  18350. yy: processRelativeTime,
  18351. },
  18352. dayOfMonthOrdinalParse: /\d{1,2}\./,
  18353. ordinal: '%d.',
  18354. week: {
  18355. dow: 1, // Monday is the first day of the week.
  18356. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18357. },
  18358. });
  18359. return deAt;
  18360. })));
  18361. /***/ }),
  18362. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-ch.js":
  18363. /*!******************************************************************************!*\
  18364. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-ch.js ***!
  18365. \******************************************************************************/
  18366. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18367. //! moment.js locale configuration
  18368. //! locale : German (Switzerland) [de-ch]
  18369. //! author : sschueller : https://github.com/sschueller
  18370. ;(function (global, factory) {
  18371. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18372. 0
  18373. }(this, (function (moment) { 'use strict';
  18374. //! moment.js locale configuration
  18375. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  18376. var format = {
  18377. m: ['eine Minute', 'einer Minute'],
  18378. h: ['eine Stunde', 'einer Stunde'],
  18379. d: ['ein Tag', 'einem Tag'],
  18380. dd: [number + ' Tage', number + ' Tagen'],
  18381. w: ['eine Woche', 'einer Woche'],
  18382. M: ['ein Monat', 'einem Monat'],
  18383. MM: [number + ' Monate', number + ' Monaten'],
  18384. y: ['ein Jahr', 'einem Jahr'],
  18385. yy: [number + ' Jahre', number + ' Jahren'],
  18386. };
  18387. return withoutSuffix ? format[key][0] : format[key][1];
  18388. }
  18389. var deCh = moment.defineLocale('de-ch', {
  18390. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  18391. '_'
  18392. ),
  18393. monthsShort:
  18394. 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  18395. monthsParseExact: true,
  18396. weekdays:
  18397. 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  18398. '_'
  18399. ),
  18400. weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  18401. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  18402. weekdaysParseExact: true,
  18403. longDateFormat: {
  18404. LT: 'HH:mm',
  18405. LTS: 'HH:mm:ss',
  18406. L: 'DD.MM.YYYY',
  18407. LL: 'D. MMMM YYYY',
  18408. LLL: 'D. MMMM YYYY HH:mm',
  18409. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  18410. },
  18411. calendar: {
  18412. sameDay: '[heute um] LT [Uhr]',
  18413. sameElse: 'L',
  18414. nextDay: '[morgen um] LT [Uhr]',
  18415. nextWeek: 'dddd [um] LT [Uhr]',
  18416. lastDay: '[gestern um] LT [Uhr]',
  18417. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  18418. },
  18419. relativeTime: {
  18420. future: 'in %s',
  18421. past: 'vor %s',
  18422. s: 'ein paar Sekunden',
  18423. ss: '%d Sekunden',
  18424. m: processRelativeTime,
  18425. mm: '%d Minuten',
  18426. h: processRelativeTime,
  18427. hh: '%d Stunden',
  18428. d: processRelativeTime,
  18429. dd: processRelativeTime,
  18430. w: processRelativeTime,
  18431. ww: '%d Wochen',
  18432. M: processRelativeTime,
  18433. MM: processRelativeTime,
  18434. y: processRelativeTime,
  18435. yy: processRelativeTime,
  18436. },
  18437. dayOfMonthOrdinalParse: /\d{1,2}\./,
  18438. ordinal: '%d.',
  18439. week: {
  18440. dow: 1, // Monday is the first day of the week.
  18441. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18442. },
  18443. });
  18444. return deCh;
  18445. })));
  18446. /***/ }),
  18447. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de.js":
  18448. /*!***************************************************************************!*\
  18449. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de.js ***!
  18450. \***************************************************************************/
  18451. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18452. //! moment.js locale configuration
  18453. //! locale : German [de]
  18454. //! author : lluchs : https://github.com/lluchs
  18455. //! author: Menelion Elensúle: https://github.com/Oire
  18456. //! author : Mikolaj Dadela : https://github.com/mik01aj
  18457. ;(function (global, factory) {
  18458. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18459. 0
  18460. }(this, (function (moment) { 'use strict';
  18461. //! moment.js locale configuration
  18462. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  18463. var format = {
  18464. m: ['eine Minute', 'einer Minute'],
  18465. h: ['eine Stunde', 'einer Stunde'],
  18466. d: ['ein Tag', 'einem Tag'],
  18467. dd: [number + ' Tage', number + ' Tagen'],
  18468. w: ['eine Woche', 'einer Woche'],
  18469. M: ['ein Monat', 'einem Monat'],
  18470. MM: [number + ' Monate', number + ' Monaten'],
  18471. y: ['ein Jahr', 'einem Jahr'],
  18472. yy: [number + ' Jahre', number + ' Jahren'],
  18473. };
  18474. return withoutSuffix ? format[key][0] : format[key][1];
  18475. }
  18476. var de = moment.defineLocale('de', {
  18477. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  18478. '_'
  18479. ),
  18480. monthsShort:
  18481. 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  18482. monthsParseExact: true,
  18483. weekdays:
  18484. 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  18485. '_'
  18486. ),
  18487. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  18488. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  18489. weekdaysParseExact: true,
  18490. longDateFormat: {
  18491. LT: 'HH:mm',
  18492. LTS: 'HH:mm:ss',
  18493. L: 'DD.MM.YYYY',
  18494. LL: 'D. MMMM YYYY',
  18495. LLL: 'D. MMMM YYYY HH:mm',
  18496. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  18497. },
  18498. calendar: {
  18499. sameDay: '[heute um] LT [Uhr]',
  18500. sameElse: 'L',
  18501. nextDay: '[morgen um] LT [Uhr]',
  18502. nextWeek: 'dddd [um] LT [Uhr]',
  18503. lastDay: '[gestern um] LT [Uhr]',
  18504. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  18505. },
  18506. relativeTime: {
  18507. future: 'in %s',
  18508. past: 'vor %s',
  18509. s: 'ein paar Sekunden',
  18510. ss: '%d Sekunden',
  18511. m: processRelativeTime,
  18512. mm: '%d Minuten',
  18513. h: processRelativeTime,
  18514. hh: '%d Stunden',
  18515. d: processRelativeTime,
  18516. dd: processRelativeTime,
  18517. w: processRelativeTime,
  18518. ww: '%d Wochen',
  18519. M: processRelativeTime,
  18520. MM: processRelativeTime,
  18521. y: processRelativeTime,
  18522. yy: processRelativeTime,
  18523. },
  18524. dayOfMonthOrdinalParse: /\d{1,2}\./,
  18525. ordinal: '%d.',
  18526. week: {
  18527. dow: 1, // Monday is the first day of the week.
  18528. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18529. },
  18530. });
  18531. return de;
  18532. })));
  18533. /***/ }),
  18534. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/dv.js":
  18535. /*!***************************************************************************!*\
  18536. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/dv.js ***!
  18537. \***************************************************************************/
  18538. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18539. //! moment.js locale configuration
  18540. //! locale : Maldivian [dv]
  18541. //! author : Jawish Hameed : https://github.com/jawish
  18542. ;(function (global, factory) {
  18543. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18544. 0
  18545. }(this, (function (moment) { 'use strict';
  18546. //! moment.js locale configuration
  18547. var months = [
  18548. 'ޖެނުއަރީ',
  18549. 'ފެބްރުއަރީ',
  18550. 'މާރިޗު',
  18551. 'އޭޕްރީލު',
  18552. 'މޭ',
  18553. 'ޖޫން',
  18554. 'ޖުލައި',
  18555. 'އޯގަސްޓު',
  18556. 'ސެޕްޓެމްބަރު',
  18557. 'އޮކްޓޯބަރު',
  18558. 'ނޮވެމްބަރު',
  18559. 'ޑިސެމްބަރު',
  18560. ],
  18561. weekdays = [
  18562. 'އާދިއްތަ',
  18563. 'ހޯމަ',
  18564. 'އަންގާރަ',
  18565. 'ބުދަ',
  18566. 'ބުރާސްފަތި',
  18567. 'ހުކުރު',
  18568. 'ހޮނިހިރު',
  18569. ];
  18570. var dv = moment.defineLocale('dv', {
  18571. months: months,
  18572. monthsShort: months,
  18573. weekdays: weekdays,
  18574. weekdaysShort: weekdays,
  18575. weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
  18576. longDateFormat: {
  18577. LT: 'HH:mm',
  18578. LTS: 'HH:mm:ss',
  18579. L: 'D/M/YYYY',
  18580. LL: 'D MMMM YYYY',
  18581. LLL: 'D MMMM YYYY HH:mm',
  18582. LLLL: 'dddd D MMMM YYYY HH:mm',
  18583. },
  18584. meridiemParse: /މކ|މފ/,
  18585. isPM: function (input) {
  18586. return 'މފ' === input;
  18587. },
  18588. meridiem: function (hour, minute, isLower) {
  18589. if (hour < 12) {
  18590. return 'މކ';
  18591. } else {
  18592. return 'މފ';
  18593. }
  18594. },
  18595. calendar: {
  18596. sameDay: '[މިއަދު] LT',
  18597. nextDay: '[މާދަމާ] LT',
  18598. nextWeek: 'dddd LT',
  18599. lastDay: '[އިއްޔެ] LT',
  18600. lastWeek: '[ފާއިތުވި] dddd LT',
  18601. sameElse: 'L',
  18602. },
  18603. relativeTime: {
  18604. future: 'ތެރޭގައި %s',
  18605. past: 'ކުރިން %s',
  18606. s: 'ސިކުންތުކޮޅެއް',
  18607. ss: 'd% ސިކުންތު',
  18608. m: 'މިނިޓެއް',
  18609. mm: 'މިނިޓު %d',
  18610. h: 'ގަޑިއިރެއް',
  18611. hh: 'ގަޑިއިރު %d',
  18612. d: 'ދުވަހެއް',
  18613. dd: 'ދުވަސް %d',
  18614. M: 'މަހެއް',
  18615. MM: 'މަސް %d',
  18616. y: 'އަހަރެއް',
  18617. yy: 'އަހަރު %d',
  18618. },
  18619. preparse: function (string) {
  18620. return string.replace(/،/g, ',');
  18621. },
  18622. postformat: function (string) {
  18623. return string.replace(/,/g, '،');
  18624. },
  18625. week: {
  18626. dow: 7, // Sunday is the first day of the week.
  18627. doy: 12, // The week that contains Jan 12th is the first week of the year.
  18628. },
  18629. });
  18630. return dv;
  18631. })));
  18632. /***/ }),
  18633. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/el.js":
  18634. /*!***************************************************************************!*\
  18635. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/el.js ***!
  18636. \***************************************************************************/
  18637. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18638. //! moment.js locale configuration
  18639. //! locale : Greek [el]
  18640. //! author : Aggelos Karalias : https://github.com/mehiel
  18641. ;(function (global, factory) {
  18642. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18643. 0
  18644. }(this, (function (moment) { 'use strict';
  18645. //! moment.js locale configuration
  18646. function isFunction(input) {
  18647. return (
  18648. (typeof Function !== 'undefined' && input instanceof Function) ||
  18649. Object.prototype.toString.call(input) === '[object Function]'
  18650. );
  18651. }
  18652. var el = moment.defineLocale('el', {
  18653. monthsNominativeEl:
  18654. 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
  18655. '_'
  18656. ),
  18657. monthsGenitiveEl:
  18658. 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
  18659. '_'
  18660. ),
  18661. months: function (momentToFormat, format) {
  18662. if (!momentToFormat) {
  18663. return this._monthsNominativeEl;
  18664. } else if (
  18665. typeof format === 'string' &&
  18666. /D/.test(format.substring(0, format.indexOf('MMMM')))
  18667. ) {
  18668. // if there is a day number before 'MMMM'
  18669. return this._monthsGenitiveEl[momentToFormat.month()];
  18670. } else {
  18671. return this._monthsNominativeEl[momentToFormat.month()];
  18672. }
  18673. },
  18674. monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
  18675. weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
  18676. '_'
  18677. ),
  18678. weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
  18679. weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
  18680. meridiem: function (hours, minutes, isLower) {
  18681. if (hours > 11) {
  18682. return isLower ? 'μμ' : 'ΜΜ';
  18683. } else {
  18684. return isLower ? 'πμ' : 'ΠΜ';
  18685. }
  18686. },
  18687. isPM: function (input) {
  18688. return (input + '').toLowerCase()[0] === 'μ';
  18689. },
  18690. meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
  18691. longDateFormat: {
  18692. LT: 'h:mm A',
  18693. LTS: 'h:mm:ss A',
  18694. L: 'DD/MM/YYYY',
  18695. LL: 'D MMMM YYYY',
  18696. LLL: 'D MMMM YYYY h:mm A',
  18697. LLLL: 'dddd, D MMMM YYYY h:mm A',
  18698. },
  18699. calendarEl: {
  18700. sameDay: '[Σήμερα {}] LT',
  18701. nextDay: '[Αύριο {}] LT',
  18702. nextWeek: 'dddd [{}] LT',
  18703. lastDay: '[Χθες {}] LT',
  18704. lastWeek: function () {
  18705. switch (this.day()) {
  18706. case 6:
  18707. return '[το προηγούμενο] dddd [{}] LT';
  18708. default:
  18709. return '[την προηγούμενη] dddd [{}] LT';
  18710. }
  18711. },
  18712. sameElse: 'L',
  18713. },
  18714. calendar: function (key, mom) {
  18715. var output = this._calendarEl[key],
  18716. hours = mom && mom.hours();
  18717. if (isFunction(output)) {
  18718. output = output.apply(mom);
  18719. }
  18720. return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
  18721. },
  18722. relativeTime: {
  18723. future: 'σε %s',
  18724. past: '%s πριν',
  18725. s: 'λίγα δευτερόλεπτα',
  18726. ss: '%d δευτερόλεπτα',
  18727. m: 'ένα λεπτό',
  18728. mm: '%d λεπτά',
  18729. h: 'μία ώρα',
  18730. hh: '%d ώρες',
  18731. d: 'μία μέρα',
  18732. dd: '%d μέρες',
  18733. M: 'ένας μήνας',
  18734. MM: '%d μήνες',
  18735. y: 'ένας χρόνος',
  18736. yy: '%d χρόνια',
  18737. },
  18738. dayOfMonthOrdinalParse: /\d{1,2}η/,
  18739. ordinal: '%dη',
  18740. week: {
  18741. dow: 1, // Monday is the first day of the week.
  18742. doy: 4, // The week that contains Jan 4st is the first week of the year.
  18743. },
  18744. });
  18745. return el;
  18746. })));
  18747. /***/ }),
  18748. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-au.js":
  18749. /*!******************************************************************************!*\
  18750. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-au.js ***!
  18751. \******************************************************************************/
  18752. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18753. //! moment.js locale configuration
  18754. //! locale : English (Australia) [en-au]
  18755. //! author : Jared Morse : https://github.com/jarcoal
  18756. ;(function (global, factory) {
  18757. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18758. 0
  18759. }(this, (function (moment) { 'use strict';
  18760. //! moment.js locale configuration
  18761. var enAu = moment.defineLocale('en-au', {
  18762. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  18763. '_'
  18764. ),
  18765. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  18766. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  18767. '_'
  18768. ),
  18769. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  18770. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  18771. longDateFormat: {
  18772. LT: 'h:mm A',
  18773. LTS: 'h:mm:ss A',
  18774. L: 'DD/MM/YYYY',
  18775. LL: 'D MMMM YYYY',
  18776. LLL: 'D MMMM YYYY h:mm A',
  18777. LLLL: 'dddd, D MMMM YYYY h:mm A',
  18778. },
  18779. calendar: {
  18780. sameDay: '[Today at] LT',
  18781. nextDay: '[Tomorrow at] LT',
  18782. nextWeek: 'dddd [at] LT',
  18783. lastDay: '[Yesterday at] LT',
  18784. lastWeek: '[Last] dddd [at] LT',
  18785. sameElse: 'L',
  18786. },
  18787. relativeTime: {
  18788. future: 'in %s',
  18789. past: '%s ago',
  18790. s: 'a few seconds',
  18791. ss: '%d seconds',
  18792. m: 'a minute',
  18793. mm: '%d minutes',
  18794. h: 'an hour',
  18795. hh: '%d hours',
  18796. d: 'a day',
  18797. dd: '%d days',
  18798. M: 'a month',
  18799. MM: '%d months',
  18800. y: 'a year',
  18801. yy: '%d years',
  18802. },
  18803. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  18804. ordinal: function (number) {
  18805. var b = number % 10,
  18806. output =
  18807. ~~((number % 100) / 10) === 1
  18808. ? 'th'
  18809. : b === 1
  18810. ? 'st'
  18811. : b === 2
  18812. ? 'nd'
  18813. : b === 3
  18814. ? 'rd'
  18815. : 'th';
  18816. return number + output;
  18817. },
  18818. week: {
  18819. dow: 0, // Sunday is the first day of the week.
  18820. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18821. },
  18822. });
  18823. return enAu;
  18824. })));
  18825. /***/ }),
  18826. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ca.js":
  18827. /*!******************************************************************************!*\
  18828. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ca.js ***!
  18829. \******************************************************************************/
  18830. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18831. //! moment.js locale configuration
  18832. //! locale : English (Canada) [en-ca]
  18833. //! author : Jonathan Abourbih : https://github.com/jonbca
  18834. ;(function (global, factory) {
  18835. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18836. 0
  18837. }(this, (function (moment) { 'use strict';
  18838. //! moment.js locale configuration
  18839. var enCa = moment.defineLocale('en-ca', {
  18840. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  18841. '_'
  18842. ),
  18843. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  18844. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  18845. '_'
  18846. ),
  18847. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  18848. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  18849. longDateFormat: {
  18850. LT: 'h:mm A',
  18851. LTS: 'h:mm:ss A',
  18852. L: 'YYYY-MM-DD',
  18853. LL: 'MMMM D, YYYY',
  18854. LLL: 'MMMM D, YYYY h:mm A',
  18855. LLLL: 'dddd, MMMM D, YYYY h:mm A',
  18856. },
  18857. calendar: {
  18858. sameDay: '[Today at] LT',
  18859. nextDay: '[Tomorrow at] LT',
  18860. nextWeek: 'dddd [at] LT',
  18861. lastDay: '[Yesterday at] LT',
  18862. lastWeek: '[Last] dddd [at] LT',
  18863. sameElse: 'L',
  18864. },
  18865. relativeTime: {
  18866. future: 'in %s',
  18867. past: '%s ago',
  18868. s: 'a few seconds',
  18869. ss: '%d seconds',
  18870. m: 'a minute',
  18871. mm: '%d minutes',
  18872. h: 'an hour',
  18873. hh: '%d hours',
  18874. d: 'a day',
  18875. dd: '%d days',
  18876. M: 'a month',
  18877. MM: '%d months',
  18878. y: 'a year',
  18879. yy: '%d years',
  18880. },
  18881. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  18882. ordinal: function (number) {
  18883. var b = number % 10,
  18884. output =
  18885. ~~((number % 100) / 10) === 1
  18886. ? 'th'
  18887. : b === 1
  18888. ? 'st'
  18889. : b === 2
  18890. ? 'nd'
  18891. : b === 3
  18892. ? 'rd'
  18893. : 'th';
  18894. return number + output;
  18895. },
  18896. });
  18897. return enCa;
  18898. })));
  18899. /***/ }),
  18900. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-gb.js":
  18901. /*!******************************************************************************!*\
  18902. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-gb.js ***!
  18903. \******************************************************************************/
  18904. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18905. //! moment.js locale configuration
  18906. //! locale : English (United Kingdom) [en-gb]
  18907. //! author : Chris Gedrim : https://github.com/chrisgedrim
  18908. ;(function (global, factory) {
  18909. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18910. 0
  18911. }(this, (function (moment) { 'use strict';
  18912. //! moment.js locale configuration
  18913. var enGb = moment.defineLocale('en-gb', {
  18914. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  18915. '_'
  18916. ),
  18917. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  18918. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  18919. '_'
  18920. ),
  18921. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  18922. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  18923. longDateFormat: {
  18924. LT: 'HH:mm',
  18925. LTS: 'HH:mm:ss',
  18926. L: 'DD/MM/YYYY',
  18927. LL: 'D MMMM YYYY',
  18928. LLL: 'D MMMM YYYY HH:mm',
  18929. LLLL: 'dddd, D MMMM YYYY HH:mm',
  18930. },
  18931. calendar: {
  18932. sameDay: '[Today at] LT',
  18933. nextDay: '[Tomorrow at] LT',
  18934. nextWeek: 'dddd [at] LT',
  18935. lastDay: '[Yesterday at] LT',
  18936. lastWeek: '[Last] dddd [at] LT',
  18937. sameElse: 'L',
  18938. },
  18939. relativeTime: {
  18940. future: 'in %s',
  18941. past: '%s ago',
  18942. s: 'a few seconds',
  18943. ss: '%d seconds',
  18944. m: 'a minute',
  18945. mm: '%d minutes',
  18946. h: 'an hour',
  18947. hh: '%d hours',
  18948. d: 'a day',
  18949. dd: '%d days',
  18950. M: 'a month',
  18951. MM: '%d months',
  18952. y: 'a year',
  18953. yy: '%d years',
  18954. },
  18955. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  18956. ordinal: function (number) {
  18957. var b = number % 10,
  18958. output =
  18959. ~~((number % 100) / 10) === 1
  18960. ? 'th'
  18961. : b === 1
  18962. ? 'st'
  18963. : b === 2
  18964. ? 'nd'
  18965. : b === 3
  18966. ? 'rd'
  18967. : 'th';
  18968. return number + output;
  18969. },
  18970. week: {
  18971. dow: 1, // Monday is the first day of the week.
  18972. doy: 4, // The week that contains Jan 4th is the first week of the year.
  18973. },
  18974. });
  18975. return enGb;
  18976. })));
  18977. /***/ }),
  18978. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ie.js":
  18979. /*!******************************************************************************!*\
  18980. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ie.js ***!
  18981. \******************************************************************************/
  18982. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  18983. //! moment.js locale configuration
  18984. //! locale : English (Ireland) [en-ie]
  18985. //! author : Chris Cartlidge : https://github.com/chriscartlidge
  18986. ;(function (global, factory) {
  18987. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  18988. 0
  18989. }(this, (function (moment) { 'use strict';
  18990. //! moment.js locale configuration
  18991. var enIe = moment.defineLocale('en-ie', {
  18992. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  18993. '_'
  18994. ),
  18995. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  18996. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  18997. '_'
  18998. ),
  18999. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  19000. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  19001. longDateFormat: {
  19002. LT: 'HH:mm',
  19003. LTS: 'HH:mm:ss',
  19004. L: 'DD/MM/YYYY',
  19005. LL: 'D MMMM YYYY',
  19006. LLL: 'D MMMM YYYY HH:mm',
  19007. LLLL: 'dddd D MMMM YYYY HH:mm',
  19008. },
  19009. calendar: {
  19010. sameDay: '[Today at] LT',
  19011. nextDay: '[Tomorrow at] LT',
  19012. nextWeek: 'dddd [at] LT',
  19013. lastDay: '[Yesterday at] LT',
  19014. lastWeek: '[Last] dddd [at] LT',
  19015. sameElse: 'L',
  19016. },
  19017. relativeTime: {
  19018. future: 'in %s',
  19019. past: '%s ago',
  19020. s: 'a few seconds',
  19021. ss: '%d seconds',
  19022. m: 'a minute',
  19023. mm: '%d minutes',
  19024. h: 'an hour',
  19025. hh: '%d hours',
  19026. d: 'a day',
  19027. dd: '%d days',
  19028. M: 'a month',
  19029. MM: '%d months',
  19030. y: 'a year',
  19031. yy: '%d years',
  19032. },
  19033. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  19034. ordinal: function (number) {
  19035. var b = number % 10,
  19036. output =
  19037. ~~((number % 100) / 10) === 1
  19038. ? 'th'
  19039. : b === 1
  19040. ? 'st'
  19041. : b === 2
  19042. ? 'nd'
  19043. : b === 3
  19044. ? 'rd'
  19045. : 'th';
  19046. return number + output;
  19047. },
  19048. week: {
  19049. dow: 1, // Monday is the first day of the week.
  19050. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19051. },
  19052. });
  19053. return enIe;
  19054. })));
  19055. /***/ }),
  19056. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-il.js":
  19057. /*!******************************************************************************!*\
  19058. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-il.js ***!
  19059. \******************************************************************************/
  19060. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19061. //! moment.js locale configuration
  19062. //! locale : English (Israel) [en-il]
  19063. //! author : Chris Gedrim : https://github.com/chrisgedrim
  19064. ;(function (global, factory) {
  19065. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19066. 0
  19067. }(this, (function (moment) { 'use strict';
  19068. //! moment.js locale configuration
  19069. var enIl = moment.defineLocale('en-il', {
  19070. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  19071. '_'
  19072. ),
  19073. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  19074. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  19075. '_'
  19076. ),
  19077. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  19078. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  19079. longDateFormat: {
  19080. LT: 'HH:mm',
  19081. LTS: 'HH:mm:ss',
  19082. L: 'DD/MM/YYYY',
  19083. LL: 'D MMMM YYYY',
  19084. LLL: 'D MMMM YYYY HH:mm',
  19085. LLLL: 'dddd, D MMMM YYYY HH:mm',
  19086. },
  19087. calendar: {
  19088. sameDay: '[Today at] LT',
  19089. nextDay: '[Tomorrow at] LT',
  19090. nextWeek: 'dddd [at] LT',
  19091. lastDay: '[Yesterday at] LT',
  19092. lastWeek: '[Last] dddd [at] LT',
  19093. sameElse: 'L',
  19094. },
  19095. relativeTime: {
  19096. future: 'in %s',
  19097. past: '%s ago',
  19098. s: 'a few seconds',
  19099. ss: '%d seconds',
  19100. m: 'a minute',
  19101. mm: '%d minutes',
  19102. h: 'an hour',
  19103. hh: '%d hours',
  19104. d: 'a day',
  19105. dd: '%d days',
  19106. M: 'a month',
  19107. MM: '%d months',
  19108. y: 'a year',
  19109. yy: '%d years',
  19110. },
  19111. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  19112. ordinal: function (number) {
  19113. var b = number % 10,
  19114. output =
  19115. ~~((number % 100) / 10) === 1
  19116. ? 'th'
  19117. : b === 1
  19118. ? 'st'
  19119. : b === 2
  19120. ? 'nd'
  19121. : b === 3
  19122. ? 'rd'
  19123. : 'th';
  19124. return number + output;
  19125. },
  19126. });
  19127. return enIl;
  19128. })));
  19129. /***/ }),
  19130. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-in.js":
  19131. /*!******************************************************************************!*\
  19132. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-in.js ***!
  19133. \******************************************************************************/
  19134. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19135. //! moment.js locale configuration
  19136. //! locale : English (India) [en-in]
  19137. //! author : Jatin Agrawal : https://github.com/jatinag22
  19138. ;(function (global, factory) {
  19139. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19140. 0
  19141. }(this, (function (moment) { 'use strict';
  19142. //! moment.js locale configuration
  19143. var enIn = moment.defineLocale('en-in', {
  19144. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  19145. '_'
  19146. ),
  19147. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  19148. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  19149. '_'
  19150. ),
  19151. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  19152. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  19153. longDateFormat: {
  19154. LT: 'h:mm A',
  19155. LTS: 'h:mm:ss A',
  19156. L: 'DD/MM/YYYY',
  19157. LL: 'D MMMM YYYY',
  19158. LLL: 'D MMMM YYYY h:mm A',
  19159. LLLL: 'dddd, D MMMM YYYY h:mm A',
  19160. },
  19161. calendar: {
  19162. sameDay: '[Today at] LT',
  19163. nextDay: '[Tomorrow at] LT',
  19164. nextWeek: 'dddd [at] LT',
  19165. lastDay: '[Yesterday at] LT',
  19166. lastWeek: '[Last] dddd [at] LT',
  19167. sameElse: 'L',
  19168. },
  19169. relativeTime: {
  19170. future: 'in %s',
  19171. past: '%s ago',
  19172. s: 'a few seconds',
  19173. ss: '%d seconds',
  19174. m: 'a minute',
  19175. mm: '%d minutes',
  19176. h: 'an hour',
  19177. hh: '%d hours',
  19178. d: 'a day',
  19179. dd: '%d days',
  19180. M: 'a month',
  19181. MM: '%d months',
  19182. y: 'a year',
  19183. yy: '%d years',
  19184. },
  19185. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  19186. ordinal: function (number) {
  19187. var b = number % 10,
  19188. output =
  19189. ~~((number % 100) / 10) === 1
  19190. ? 'th'
  19191. : b === 1
  19192. ? 'st'
  19193. : b === 2
  19194. ? 'nd'
  19195. : b === 3
  19196. ? 'rd'
  19197. : 'th';
  19198. return number + output;
  19199. },
  19200. week: {
  19201. dow: 0, // Sunday is the first day of the week.
  19202. doy: 6, // The week that contains Jan 1st is the first week of the year.
  19203. },
  19204. });
  19205. return enIn;
  19206. })));
  19207. /***/ }),
  19208. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-nz.js":
  19209. /*!******************************************************************************!*\
  19210. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-nz.js ***!
  19211. \******************************************************************************/
  19212. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19213. //! moment.js locale configuration
  19214. //! locale : English (New Zealand) [en-nz]
  19215. //! author : Luke McGregor : https://github.com/lukemcgregor
  19216. ;(function (global, factory) {
  19217. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19218. 0
  19219. }(this, (function (moment) { 'use strict';
  19220. //! moment.js locale configuration
  19221. var enNz = moment.defineLocale('en-nz', {
  19222. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  19223. '_'
  19224. ),
  19225. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  19226. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  19227. '_'
  19228. ),
  19229. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  19230. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  19231. longDateFormat: {
  19232. LT: 'h:mm A',
  19233. LTS: 'h:mm:ss A',
  19234. L: 'DD/MM/YYYY',
  19235. LL: 'D MMMM YYYY',
  19236. LLL: 'D MMMM YYYY h:mm A',
  19237. LLLL: 'dddd, D MMMM YYYY h:mm A',
  19238. },
  19239. calendar: {
  19240. sameDay: '[Today at] LT',
  19241. nextDay: '[Tomorrow at] LT',
  19242. nextWeek: 'dddd [at] LT',
  19243. lastDay: '[Yesterday at] LT',
  19244. lastWeek: '[Last] dddd [at] LT',
  19245. sameElse: 'L',
  19246. },
  19247. relativeTime: {
  19248. future: 'in %s',
  19249. past: '%s ago',
  19250. s: 'a few seconds',
  19251. ss: '%d seconds',
  19252. m: 'a minute',
  19253. mm: '%d minutes',
  19254. h: 'an hour',
  19255. hh: '%d hours',
  19256. d: 'a day',
  19257. dd: '%d days',
  19258. M: 'a month',
  19259. MM: '%d months',
  19260. y: 'a year',
  19261. yy: '%d years',
  19262. },
  19263. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  19264. ordinal: function (number) {
  19265. var b = number % 10,
  19266. output =
  19267. ~~((number % 100) / 10) === 1
  19268. ? 'th'
  19269. : b === 1
  19270. ? 'st'
  19271. : b === 2
  19272. ? 'nd'
  19273. : b === 3
  19274. ? 'rd'
  19275. : 'th';
  19276. return number + output;
  19277. },
  19278. week: {
  19279. dow: 1, // Monday is the first day of the week.
  19280. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19281. },
  19282. });
  19283. return enNz;
  19284. })));
  19285. /***/ }),
  19286. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-sg.js":
  19287. /*!******************************************************************************!*\
  19288. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-sg.js ***!
  19289. \******************************************************************************/
  19290. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19291. //! moment.js locale configuration
  19292. //! locale : English (Singapore) [en-sg]
  19293. //! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
  19294. ;(function (global, factory) {
  19295. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19296. 0
  19297. }(this, (function (moment) { 'use strict';
  19298. //! moment.js locale configuration
  19299. var enSg = moment.defineLocale('en-sg', {
  19300. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  19301. '_'
  19302. ),
  19303. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  19304. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  19305. '_'
  19306. ),
  19307. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  19308. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  19309. longDateFormat: {
  19310. LT: 'HH:mm',
  19311. LTS: 'HH:mm:ss',
  19312. L: 'DD/MM/YYYY',
  19313. LL: 'D MMMM YYYY',
  19314. LLL: 'D MMMM YYYY HH:mm',
  19315. LLLL: 'dddd, D MMMM YYYY HH:mm',
  19316. },
  19317. calendar: {
  19318. sameDay: '[Today at] LT',
  19319. nextDay: '[Tomorrow at] LT',
  19320. nextWeek: 'dddd [at] LT',
  19321. lastDay: '[Yesterday at] LT',
  19322. lastWeek: '[Last] dddd [at] LT',
  19323. sameElse: 'L',
  19324. },
  19325. relativeTime: {
  19326. future: 'in %s',
  19327. past: '%s ago',
  19328. s: 'a few seconds',
  19329. ss: '%d seconds',
  19330. m: 'a minute',
  19331. mm: '%d minutes',
  19332. h: 'an hour',
  19333. hh: '%d hours',
  19334. d: 'a day',
  19335. dd: '%d days',
  19336. M: 'a month',
  19337. MM: '%d months',
  19338. y: 'a year',
  19339. yy: '%d years',
  19340. },
  19341. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  19342. ordinal: function (number) {
  19343. var b = number % 10,
  19344. output =
  19345. ~~((number % 100) / 10) === 1
  19346. ? 'th'
  19347. : b === 1
  19348. ? 'st'
  19349. : b === 2
  19350. ? 'nd'
  19351. : b === 3
  19352. ? 'rd'
  19353. : 'th';
  19354. return number + output;
  19355. },
  19356. week: {
  19357. dow: 1, // Monday is the first day of the week.
  19358. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19359. },
  19360. });
  19361. return enSg;
  19362. })));
  19363. /***/ }),
  19364. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eo.js":
  19365. /*!***************************************************************************!*\
  19366. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eo.js ***!
  19367. \***************************************************************************/
  19368. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19369. //! moment.js locale configuration
  19370. //! locale : Esperanto [eo]
  19371. //! author : Colin Dean : https://github.com/colindean
  19372. //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
  19373. //! comment : miestasmia corrected the translation by colindean
  19374. //! comment : Vivakvo corrected the translation by colindean and miestasmia
  19375. ;(function (global, factory) {
  19376. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19377. 0
  19378. }(this, (function (moment) { 'use strict';
  19379. //! moment.js locale configuration
  19380. var eo = moment.defineLocale('eo', {
  19381. months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
  19382. '_'
  19383. ),
  19384. monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
  19385. weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
  19386. weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
  19387. weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
  19388. longDateFormat: {
  19389. LT: 'HH:mm',
  19390. LTS: 'HH:mm:ss',
  19391. L: 'YYYY-MM-DD',
  19392. LL: '[la] D[-an de] MMMM, YYYY',
  19393. LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
  19394. LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
  19395. llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
  19396. },
  19397. meridiemParse: /[ap]\.t\.m/i,
  19398. isPM: function (input) {
  19399. return input.charAt(0).toLowerCase() === 'p';
  19400. },
  19401. meridiem: function (hours, minutes, isLower) {
  19402. if (hours > 11) {
  19403. return isLower ? 'p.t.m.' : 'P.T.M.';
  19404. } else {
  19405. return isLower ? 'a.t.m.' : 'A.T.M.';
  19406. }
  19407. },
  19408. calendar: {
  19409. sameDay: '[Hodiaŭ je] LT',
  19410. nextDay: '[Morgaŭ je] LT',
  19411. nextWeek: 'dddd[n je] LT',
  19412. lastDay: '[Hieraŭ je] LT',
  19413. lastWeek: '[pasintan] dddd[n je] LT',
  19414. sameElse: 'L',
  19415. },
  19416. relativeTime: {
  19417. future: 'post %s',
  19418. past: 'antaŭ %s',
  19419. s: 'kelkaj sekundoj',
  19420. ss: '%d sekundoj',
  19421. m: 'unu minuto',
  19422. mm: '%d minutoj',
  19423. h: 'unu horo',
  19424. hh: '%d horoj',
  19425. d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
  19426. dd: '%d tagoj',
  19427. M: 'unu monato',
  19428. MM: '%d monatoj',
  19429. y: 'unu jaro',
  19430. yy: '%d jaroj',
  19431. },
  19432. dayOfMonthOrdinalParse: /\d{1,2}a/,
  19433. ordinal: '%da',
  19434. week: {
  19435. dow: 1, // Monday is the first day of the week.
  19436. doy: 7, // The week that contains Jan 7th is the first week of the year.
  19437. },
  19438. });
  19439. return eo;
  19440. })));
  19441. /***/ }),
  19442. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-do.js":
  19443. /*!******************************************************************************!*\
  19444. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-do.js ***!
  19445. \******************************************************************************/
  19446. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19447. //! moment.js locale configuration
  19448. //! locale : Spanish (Dominican Republic) [es-do]
  19449. ;(function (global, factory) {
  19450. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19451. 0
  19452. }(this, (function (moment) { 'use strict';
  19453. //! moment.js locale configuration
  19454. var monthsShortDot =
  19455. 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  19456. '_'
  19457. ),
  19458. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  19459. monthsParse = [
  19460. /^ene/i,
  19461. /^feb/i,
  19462. /^mar/i,
  19463. /^abr/i,
  19464. /^may/i,
  19465. /^jun/i,
  19466. /^jul/i,
  19467. /^ago/i,
  19468. /^sep/i,
  19469. /^oct/i,
  19470. /^nov/i,
  19471. /^dic/i,
  19472. ],
  19473. monthsRegex =
  19474. /^(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;
  19475. var esDo = moment.defineLocale('es-do', {
  19476. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  19477. '_'
  19478. ),
  19479. monthsShort: function (m, format) {
  19480. if (!m) {
  19481. return monthsShortDot;
  19482. } else if (/-MMM-/.test(format)) {
  19483. return monthsShort[m.month()];
  19484. } else {
  19485. return monthsShortDot[m.month()];
  19486. }
  19487. },
  19488. monthsRegex: monthsRegex,
  19489. monthsShortRegex: monthsRegex,
  19490. monthsStrictRegex:
  19491. /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  19492. monthsShortStrictRegex:
  19493. /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  19494. monthsParse: monthsParse,
  19495. longMonthsParse: monthsParse,
  19496. shortMonthsParse: monthsParse,
  19497. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  19498. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  19499. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  19500. weekdaysParseExact: true,
  19501. longDateFormat: {
  19502. LT: 'h:mm A',
  19503. LTS: 'h:mm:ss A',
  19504. L: 'DD/MM/YYYY',
  19505. LL: 'D [de] MMMM [de] YYYY',
  19506. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  19507. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
  19508. },
  19509. calendar: {
  19510. sameDay: function () {
  19511. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19512. },
  19513. nextDay: function () {
  19514. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19515. },
  19516. nextWeek: function () {
  19517. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19518. },
  19519. lastDay: function () {
  19520. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19521. },
  19522. lastWeek: function () {
  19523. return (
  19524. '[el] dddd [pasado a la' +
  19525. (this.hours() !== 1 ? 's' : '') +
  19526. '] LT'
  19527. );
  19528. },
  19529. sameElse: 'L',
  19530. },
  19531. relativeTime: {
  19532. future: 'en %s',
  19533. past: 'hace %s',
  19534. s: 'unos segundos',
  19535. ss: '%d segundos',
  19536. m: 'un minuto',
  19537. mm: '%d minutos',
  19538. h: 'una hora',
  19539. hh: '%d horas',
  19540. d: 'un día',
  19541. dd: '%d días',
  19542. w: 'una semana',
  19543. ww: '%d semanas',
  19544. M: 'un mes',
  19545. MM: '%d meses',
  19546. y: 'un año',
  19547. yy: '%d años',
  19548. },
  19549. dayOfMonthOrdinalParse: /\d{1,2}º/,
  19550. ordinal: '%dº',
  19551. week: {
  19552. dow: 1, // Monday is the first day of the week.
  19553. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19554. },
  19555. });
  19556. return esDo;
  19557. })));
  19558. /***/ }),
  19559. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-mx.js":
  19560. /*!******************************************************************************!*\
  19561. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-mx.js ***!
  19562. \******************************************************************************/
  19563. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19564. //! moment.js locale configuration
  19565. //! locale : Spanish (Mexico) [es-mx]
  19566. //! author : JC Franco : https://github.com/jcfranco
  19567. ;(function (global, factory) {
  19568. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19569. 0
  19570. }(this, (function (moment) { 'use strict';
  19571. //! moment.js locale configuration
  19572. var monthsShortDot =
  19573. 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  19574. '_'
  19575. ),
  19576. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  19577. monthsParse = [
  19578. /^ene/i,
  19579. /^feb/i,
  19580. /^mar/i,
  19581. /^abr/i,
  19582. /^may/i,
  19583. /^jun/i,
  19584. /^jul/i,
  19585. /^ago/i,
  19586. /^sep/i,
  19587. /^oct/i,
  19588. /^nov/i,
  19589. /^dic/i,
  19590. ],
  19591. monthsRegex =
  19592. /^(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;
  19593. var esMx = moment.defineLocale('es-mx', {
  19594. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  19595. '_'
  19596. ),
  19597. monthsShort: function (m, format) {
  19598. if (!m) {
  19599. return monthsShortDot;
  19600. } else if (/-MMM-/.test(format)) {
  19601. return monthsShort[m.month()];
  19602. } else {
  19603. return monthsShortDot[m.month()];
  19604. }
  19605. },
  19606. monthsRegex: monthsRegex,
  19607. monthsShortRegex: monthsRegex,
  19608. monthsStrictRegex:
  19609. /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  19610. monthsShortStrictRegex:
  19611. /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  19612. monthsParse: monthsParse,
  19613. longMonthsParse: monthsParse,
  19614. shortMonthsParse: monthsParse,
  19615. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  19616. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  19617. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  19618. weekdaysParseExact: true,
  19619. longDateFormat: {
  19620. LT: 'H:mm',
  19621. LTS: 'H:mm:ss',
  19622. L: 'DD/MM/YYYY',
  19623. LL: 'D [de] MMMM [de] YYYY',
  19624. LLL: 'D [de] MMMM [de] YYYY H:mm',
  19625. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  19626. },
  19627. calendar: {
  19628. sameDay: function () {
  19629. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19630. },
  19631. nextDay: function () {
  19632. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19633. },
  19634. nextWeek: function () {
  19635. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19636. },
  19637. lastDay: function () {
  19638. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19639. },
  19640. lastWeek: function () {
  19641. return (
  19642. '[el] dddd [pasado a la' +
  19643. (this.hours() !== 1 ? 's' : '') +
  19644. '] LT'
  19645. );
  19646. },
  19647. sameElse: 'L',
  19648. },
  19649. relativeTime: {
  19650. future: 'en %s',
  19651. past: 'hace %s',
  19652. s: 'unos segundos',
  19653. ss: '%d segundos',
  19654. m: 'un minuto',
  19655. mm: '%d minutos',
  19656. h: 'una hora',
  19657. hh: '%d horas',
  19658. d: 'un día',
  19659. dd: '%d días',
  19660. w: 'una semana',
  19661. ww: '%d semanas',
  19662. M: 'un mes',
  19663. MM: '%d meses',
  19664. y: 'un año',
  19665. yy: '%d años',
  19666. },
  19667. dayOfMonthOrdinalParse: /\d{1,2}º/,
  19668. ordinal: '%dº',
  19669. week: {
  19670. dow: 0, // Sunday is the first day of the week.
  19671. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19672. },
  19673. invalidDate: 'Fecha inválida',
  19674. });
  19675. return esMx;
  19676. })));
  19677. /***/ }),
  19678. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-us.js":
  19679. /*!******************************************************************************!*\
  19680. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-us.js ***!
  19681. \******************************************************************************/
  19682. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19683. //! moment.js locale configuration
  19684. //! locale : Spanish (United States) [es-us]
  19685. //! author : bustta : https://github.com/bustta
  19686. //! author : chrisrodz : https://github.com/chrisrodz
  19687. ;(function (global, factory) {
  19688. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19689. 0
  19690. }(this, (function (moment) { 'use strict';
  19691. //! moment.js locale configuration
  19692. var monthsShortDot =
  19693. 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  19694. '_'
  19695. ),
  19696. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  19697. monthsParse = [
  19698. /^ene/i,
  19699. /^feb/i,
  19700. /^mar/i,
  19701. /^abr/i,
  19702. /^may/i,
  19703. /^jun/i,
  19704. /^jul/i,
  19705. /^ago/i,
  19706. /^sep/i,
  19707. /^oct/i,
  19708. /^nov/i,
  19709. /^dic/i,
  19710. ],
  19711. monthsRegex =
  19712. /^(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;
  19713. var esUs = moment.defineLocale('es-us', {
  19714. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  19715. '_'
  19716. ),
  19717. monthsShort: function (m, format) {
  19718. if (!m) {
  19719. return monthsShortDot;
  19720. } else if (/-MMM-/.test(format)) {
  19721. return monthsShort[m.month()];
  19722. } else {
  19723. return monthsShortDot[m.month()];
  19724. }
  19725. },
  19726. monthsRegex: monthsRegex,
  19727. monthsShortRegex: monthsRegex,
  19728. monthsStrictRegex:
  19729. /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  19730. monthsShortStrictRegex:
  19731. /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  19732. monthsParse: monthsParse,
  19733. longMonthsParse: monthsParse,
  19734. shortMonthsParse: monthsParse,
  19735. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  19736. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  19737. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  19738. weekdaysParseExact: true,
  19739. longDateFormat: {
  19740. LT: 'h:mm A',
  19741. LTS: 'h:mm:ss A',
  19742. L: 'MM/DD/YYYY',
  19743. LL: 'D [de] MMMM [de] YYYY',
  19744. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  19745. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
  19746. },
  19747. calendar: {
  19748. sameDay: function () {
  19749. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19750. },
  19751. nextDay: function () {
  19752. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19753. },
  19754. nextWeek: function () {
  19755. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19756. },
  19757. lastDay: function () {
  19758. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19759. },
  19760. lastWeek: function () {
  19761. return (
  19762. '[el] dddd [pasado a la' +
  19763. (this.hours() !== 1 ? 's' : '') +
  19764. '] LT'
  19765. );
  19766. },
  19767. sameElse: 'L',
  19768. },
  19769. relativeTime: {
  19770. future: 'en %s',
  19771. past: 'hace %s',
  19772. s: 'unos segundos',
  19773. ss: '%d segundos',
  19774. m: 'un minuto',
  19775. mm: '%d minutos',
  19776. h: 'una hora',
  19777. hh: '%d horas',
  19778. d: 'un día',
  19779. dd: '%d días',
  19780. w: 'una semana',
  19781. ww: '%d semanas',
  19782. M: 'un mes',
  19783. MM: '%d meses',
  19784. y: 'un año',
  19785. yy: '%d años',
  19786. },
  19787. dayOfMonthOrdinalParse: /\d{1,2}º/,
  19788. ordinal: '%dº',
  19789. week: {
  19790. dow: 0, // Sunday is the first day of the week.
  19791. doy: 6, // The week that contains Jan 6th is the first week of the year.
  19792. },
  19793. });
  19794. return esUs;
  19795. })));
  19796. /***/ }),
  19797. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es.js":
  19798. /*!***************************************************************************!*\
  19799. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es.js ***!
  19800. \***************************************************************************/
  19801. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19802. //! moment.js locale configuration
  19803. //! locale : Spanish [es]
  19804. //! author : Julio Napurí : https://github.com/julionc
  19805. ;(function (global, factory) {
  19806. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19807. 0
  19808. }(this, (function (moment) { 'use strict';
  19809. //! moment.js locale configuration
  19810. var monthsShortDot =
  19811. 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  19812. '_'
  19813. ),
  19814. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  19815. monthsParse = [
  19816. /^ene/i,
  19817. /^feb/i,
  19818. /^mar/i,
  19819. /^abr/i,
  19820. /^may/i,
  19821. /^jun/i,
  19822. /^jul/i,
  19823. /^ago/i,
  19824. /^sep/i,
  19825. /^oct/i,
  19826. /^nov/i,
  19827. /^dic/i,
  19828. ],
  19829. monthsRegex =
  19830. /^(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;
  19831. var es = moment.defineLocale('es', {
  19832. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  19833. '_'
  19834. ),
  19835. monthsShort: function (m, format) {
  19836. if (!m) {
  19837. return monthsShortDot;
  19838. } else if (/-MMM-/.test(format)) {
  19839. return monthsShort[m.month()];
  19840. } else {
  19841. return monthsShortDot[m.month()];
  19842. }
  19843. },
  19844. monthsRegex: monthsRegex,
  19845. monthsShortRegex: monthsRegex,
  19846. monthsStrictRegex:
  19847. /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  19848. monthsShortStrictRegex:
  19849. /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  19850. monthsParse: monthsParse,
  19851. longMonthsParse: monthsParse,
  19852. shortMonthsParse: monthsParse,
  19853. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  19854. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  19855. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  19856. weekdaysParseExact: true,
  19857. longDateFormat: {
  19858. LT: 'H:mm',
  19859. LTS: 'H:mm:ss',
  19860. L: 'DD/MM/YYYY',
  19861. LL: 'D [de] MMMM [de] YYYY',
  19862. LLL: 'D [de] MMMM [de] YYYY H:mm',
  19863. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  19864. },
  19865. calendar: {
  19866. sameDay: function () {
  19867. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19868. },
  19869. nextDay: function () {
  19870. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19871. },
  19872. nextWeek: function () {
  19873. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19874. },
  19875. lastDay: function () {
  19876. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  19877. },
  19878. lastWeek: function () {
  19879. return (
  19880. '[el] dddd [pasado a la' +
  19881. (this.hours() !== 1 ? 's' : '') +
  19882. '] LT'
  19883. );
  19884. },
  19885. sameElse: 'L',
  19886. },
  19887. relativeTime: {
  19888. future: 'en %s',
  19889. past: 'hace %s',
  19890. s: 'unos segundos',
  19891. ss: '%d segundos',
  19892. m: 'un minuto',
  19893. mm: '%d minutos',
  19894. h: 'una hora',
  19895. hh: '%d horas',
  19896. d: 'un día',
  19897. dd: '%d días',
  19898. w: 'una semana',
  19899. ww: '%d semanas',
  19900. M: 'un mes',
  19901. MM: '%d meses',
  19902. y: 'un año',
  19903. yy: '%d años',
  19904. },
  19905. dayOfMonthOrdinalParse: /\d{1,2}º/,
  19906. ordinal: '%dº',
  19907. week: {
  19908. dow: 1, // Monday is the first day of the week.
  19909. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19910. },
  19911. invalidDate: 'Fecha inválida',
  19912. });
  19913. return es;
  19914. })));
  19915. /***/ }),
  19916. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/et.js":
  19917. /*!***************************************************************************!*\
  19918. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/et.js ***!
  19919. \***************************************************************************/
  19920. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  19921. //! moment.js locale configuration
  19922. //! locale : Estonian [et]
  19923. //! author : Henry Kehlmann : https://github.com/madhenry
  19924. //! improvements : Illimar Tambek : https://github.com/ragulka
  19925. ;(function (global, factory) {
  19926. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  19927. 0
  19928. }(this, (function (moment) { 'use strict';
  19929. //! moment.js locale configuration
  19930. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  19931. var format = {
  19932. s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  19933. ss: [number + 'sekundi', number + 'sekundit'],
  19934. m: ['ühe minuti', 'üks minut'],
  19935. mm: [number + ' minuti', number + ' minutit'],
  19936. h: ['ühe tunni', 'tund aega', 'üks tund'],
  19937. hh: [number + ' tunni', number + ' tundi'],
  19938. d: ['ühe päeva', 'üks päev'],
  19939. M: ['kuu aja', 'kuu aega', 'üks kuu'],
  19940. MM: [number + ' kuu', number + ' kuud'],
  19941. y: ['ühe aasta', 'aasta', 'üks aasta'],
  19942. yy: [number + ' aasta', number + ' aastat'],
  19943. };
  19944. if (withoutSuffix) {
  19945. return format[key][2] ? format[key][2] : format[key][1];
  19946. }
  19947. return isFuture ? format[key][0] : format[key][1];
  19948. }
  19949. var et = moment.defineLocale('et', {
  19950. months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
  19951. '_'
  19952. ),
  19953. monthsShort:
  19954. 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
  19955. weekdays:
  19956. 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
  19957. '_'
  19958. ),
  19959. weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
  19960. weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
  19961. longDateFormat: {
  19962. LT: 'H:mm',
  19963. LTS: 'H:mm:ss',
  19964. L: 'DD.MM.YYYY',
  19965. LL: 'D. MMMM YYYY',
  19966. LLL: 'D. MMMM YYYY H:mm',
  19967. LLLL: 'dddd, D. MMMM YYYY H:mm',
  19968. },
  19969. calendar: {
  19970. sameDay: '[Täna,] LT',
  19971. nextDay: '[Homme,] LT',
  19972. nextWeek: '[Järgmine] dddd LT',
  19973. lastDay: '[Eile,] LT',
  19974. lastWeek: '[Eelmine] dddd LT',
  19975. sameElse: 'L',
  19976. },
  19977. relativeTime: {
  19978. future: '%s pärast',
  19979. past: '%s tagasi',
  19980. s: processRelativeTime,
  19981. ss: processRelativeTime,
  19982. m: processRelativeTime,
  19983. mm: processRelativeTime,
  19984. h: processRelativeTime,
  19985. hh: processRelativeTime,
  19986. d: processRelativeTime,
  19987. dd: '%d päeva',
  19988. M: processRelativeTime,
  19989. MM: processRelativeTime,
  19990. y: processRelativeTime,
  19991. yy: processRelativeTime,
  19992. },
  19993. dayOfMonthOrdinalParse: /\d{1,2}\./,
  19994. ordinal: '%d.',
  19995. week: {
  19996. dow: 1, // Monday is the first day of the week.
  19997. doy: 4, // The week that contains Jan 4th is the first week of the year.
  19998. },
  19999. });
  20000. return et;
  20001. })));
  20002. /***/ }),
  20003. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eu.js":
  20004. /*!***************************************************************************!*\
  20005. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eu.js ***!
  20006. \***************************************************************************/
  20007. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20008. //! moment.js locale configuration
  20009. //! locale : Basque [eu]
  20010. //! author : Eneko Illarramendi : https://github.com/eillarra
  20011. ;(function (global, factory) {
  20012. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20013. 0
  20014. }(this, (function (moment) { 'use strict';
  20015. //! moment.js locale configuration
  20016. var eu = moment.defineLocale('eu', {
  20017. months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
  20018. '_'
  20019. ),
  20020. monthsShort:
  20021. 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
  20022. '_'
  20023. ),
  20024. monthsParseExact: true,
  20025. weekdays:
  20026. 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
  20027. '_'
  20028. ),
  20029. weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
  20030. weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
  20031. weekdaysParseExact: true,
  20032. longDateFormat: {
  20033. LT: 'HH:mm',
  20034. LTS: 'HH:mm:ss',
  20035. L: 'YYYY-MM-DD',
  20036. LL: 'YYYY[ko] MMMM[ren] D[a]',
  20037. LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
  20038. LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
  20039. l: 'YYYY-M-D',
  20040. ll: 'YYYY[ko] MMM D[a]',
  20041. lll: 'YYYY[ko] MMM D[a] HH:mm',
  20042. llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
  20043. },
  20044. calendar: {
  20045. sameDay: '[gaur] LT[etan]',
  20046. nextDay: '[bihar] LT[etan]',
  20047. nextWeek: 'dddd LT[etan]',
  20048. lastDay: '[atzo] LT[etan]',
  20049. lastWeek: '[aurreko] dddd LT[etan]',
  20050. sameElse: 'L',
  20051. },
  20052. relativeTime: {
  20053. future: '%s barru',
  20054. past: 'duela %s',
  20055. s: 'segundo batzuk',
  20056. ss: '%d segundo',
  20057. m: 'minutu bat',
  20058. mm: '%d minutu',
  20059. h: 'ordu bat',
  20060. hh: '%d ordu',
  20061. d: 'egun bat',
  20062. dd: '%d egun',
  20063. M: 'hilabete bat',
  20064. MM: '%d hilabete',
  20065. y: 'urte bat',
  20066. yy: '%d urte',
  20067. },
  20068. dayOfMonthOrdinalParse: /\d{1,2}\./,
  20069. ordinal: '%d.',
  20070. week: {
  20071. dow: 1, // Monday is the first day of the week.
  20072. doy: 7, // The week that contains Jan 7th is the first week of the year.
  20073. },
  20074. });
  20075. return eu;
  20076. })));
  20077. /***/ }),
  20078. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fa.js":
  20079. /*!***************************************************************************!*\
  20080. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fa.js ***!
  20081. \***************************************************************************/
  20082. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20083. //! moment.js locale configuration
  20084. //! locale : Persian [fa]
  20085. //! author : Ebrahim Byagowi : https://github.com/ebraminio
  20086. ;(function (global, factory) {
  20087. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20088. 0
  20089. }(this, (function (moment) { 'use strict';
  20090. //! moment.js locale configuration
  20091. var symbolMap = {
  20092. 1: '۱',
  20093. 2: '۲',
  20094. 3: '۳',
  20095. 4: '۴',
  20096. 5: '۵',
  20097. 6: '۶',
  20098. 7: '۷',
  20099. 8: '۸',
  20100. 9: '۹',
  20101. 0: '۰',
  20102. },
  20103. numberMap = {
  20104. '۱': '1',
  20105. '۲': '2',
  20106. '۳': '3',
  20107. '۴': '4',
  20108. '۵': '5',
  20109. '۶': '6',
  20110. '۷': '7',
  20111. '۸': '8',
  20112. '۹': '9',
  20113. '۰': '0',
  20114. };
  20115. var fa = moment.defineLocale('fa', {
  20116. months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
  20117. '_'
  20118. ),
  20119. monthsShort:
  20120. 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
  20121. '_'
  20122. ),
  20123. weekdays:
  20124. 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
  20125. '_'
  20126. ),
  20127. weekdaysShort:
  20128. 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
  20129. '_'
  20130. ),
  20131. weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
  20132. weekdaysParseExact: true,
  20133. longDateFormat: {
  20134. LT: 'HH:mm',
  20135. LTS: 'HH:mm:ss',
  20136. L: 'DD/MM/YYYY',
  20137. LL: 'D MMMM YYYY',
  20138. LLL: 'D MMMM YYYY HH:mm',
  20139. LLLL: 'dddd, D MMMM YYYY HH:mm',
  20140. },
  20141. meridiemParse: /قبل از ظهر|بعد از ظهر/,
  20142. isPM: function (input) {
  20143. return /بعد از ظهر/.test(input);
  20144. },
  20145. meridiem: function (hour, minute, isLower) {
  20146. if (hour < 12) {
  20147. return 'قبل از ظهر';
  20148. } else {
  20149. return 'بعد از ظهر';
  20150. }
  20151. },
  20152. calendar: {
  20153. sameDay: '[امروز ساعت] LT',
  20154. nextDay: '[فردا ساعت] LT',
  20155. nextWeek: 'dddd [ساعت] LT',
  20156. lastDay: '[دیروز ساعت] LT',
  20157. lastWeek: 'dddd [پیش] [ساعت] LT',
  20158. sameElse: 'L',
  20159. },
  20160. relativeTime: {
  20161. future: 'در %s',
  20162. past: '%s پیش',
  20163. s: 'چند ثانیه',
  20164. ss: '%d ثانیه',
  20165. m: 'یک دقیقه',
  20166. mm: '%d دقیقه',
  20167. h: 'یک ساعت',
  20168. hh: '%d ساعت',
  20169. d: 'یک روز',
  20170. dd: '%d روز',
  20171. M: 'یک ماه',
  20172. MM: '%d ماه',
  20173. y: 'یک سال',
  20174. yy: '%d سال',
  20175. },
  20176. preparse: function (string) {
  20177. return string
  20178. .replace(/[۰-۹]/g, function (match) {
  20179. return numberMap[match];
  20180. })
  20181. .replace(/،/g, ',');
  20182. },
  20183. postformat: function (string) {
  20184. return string
  20185. .replace(/\d/g, function (match) {
  20186. return symbolMap[match];
  20187. })
  20188. .replace(/,/g, '،');
  20189. },
  20190. dayOfMonthOrdinalParse: /\d{1,2}م/,
  20191. ordinal: '%dم',
  20192. week: {
  20193. dow: 6, // Saturday is the first day of the week.
  20194. doy: 12, // The week that contains Jan 12th is the first week of the year.
  20195. },
  20196. });
  20197. return fa;
  20198. })));
  20199. /***/ }),
  20200. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fi.js":
  20201. /*!***************************************************************************!*\
  20202. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fi.js ***!
  20203. \***************************************************************************/
  20204. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20205. //! moment.js locale configuration
  20206. //! locale : Finnish [fi]
  20207. //! author : Tarmo Aidantausta : https://github.com/bleadof
  20208. ;(function (global, factory) {
  20209. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20210. 0
  20211. }(this, (function (moment) { 'use strict';
  20212. //! moment.js locale configuration
  20213. var numbersPast =
  20214. 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
  20215. ' '
  20216. ),
  20217. numbersFuture = [
  20218. 'nolla',
  20219. 'yhden',
  20220. 'kahden',
  20221. 'kolmen',
  20222. 'neljän',
  20223. 'viiden',
  20224. 'kuuden',
  20225. numbersPast[7],
  20226. numbersPast[8],
  20227. numbersPast[9],
  20228. ];
  20229. function translate(number, withoutSuffix, key, isFuture) {
  20230. var result = '';
  20231. switch (key) {
  20232. case 's':
  20233. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  20234. case 'ss':
  20235. result = isFuture ? 'sekunnin' : 'sekuntia';
  20236. break;
  20237. case 'm':
  20238. return isFuture ? 'minuutin' : 'minuutti';
  20239. case 'mm':
  20240. result = isFuture ? 'minuutin' : 'minuuttia';
  20241. break;
  20242. case 'h':
  20243. return isFuture ? 'tunnin' : 'tunti';
  20244. case 'hh':
  20245. result = isFuture ? 'tunnin' : 'tuntia';
  20246. break;
  20247. case 'd':
  20248. return isFuture ? 'päivän' : 'päivä';
  20249. case 'dd':
  20250. result = isFuture ? 'päivän' : 'päivää';
  20251. break;
  20252. case 'M':
  20253. return isFuture ? 'kuukauden' : 'kuukausi';
  20254. case 'MM':
  20255. result = isFuture ? 'kuukauden' : 'kuukautta';
  20256. break;
  20257. case 'y':
  20258. return isFuture ? 'vuoden' : 'vuosi';
  20259. case 'yy':
  20260. result = isFuture ? 'vuoden' : 'vuotta';
  20261. break;
  20262. }
  20263. result = verbalNumber(number, isFuture) + ' ' + result;
  20264. return result;
  20265. }
  20266. function verbalNumber(number, isFuture) {
  20267. return number < 10
  20268. ? isFuture
  20269. ? numbersFuture[number]
  20270. : numbersPast[number]
  20271. : number;
  20272. }
  20273. var fi = moment.defineLocale('fi', {
  20274. months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
  20275. '_'
  20276. ),
  20277. monthsShort:
  20278. 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
  20279. '_'
  20280. ),
  20281. weekdays:
  20282. 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
  20283. '_'
  20284. ),
  20285. weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
  20286. weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
  20287. longDateFormat: {
  20288. LT: 'HH.mm',
  20289. LTS: 'HH.mm.ss',
  20290. L: 'DD.MM.YYYY',
  20291. LL: 'Do MMMM[ta] YYYY',
  20292. LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
  20293. LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  20294. l: 'D.M.YYYY',
  20295. ll: 'Do MMM YYYY',
  20296. lll: 'Do MMM YYYY, [klo] HH.mm',
  20297. llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
  20298. },
  20299. calendar: {
  20300. sameDay: '[tänään] [klo] LT',
  20301. nextDay: '[huomenna] [klo] LT',
  20302. nextWeek: 'dddd [klo] LT',
  20303. lastDay: '[eilen] [klo] LT',
  20304. lastWeek: '[viime] dddd[na] [klo] LT',
  20305. sameElse: 'L',
  20306. },
  20307. relativeTime: {
  20308. future: '%s päästä',
  20309. past: '%s sitten',
  20310. s: translate,
  20311. ss: translate,
  20312. m: translate,
  20313. mm: translate,
  20314. h: translate,
  20315. hh: translate,
  20316. d: translate,
  20317. dd: translate,
  20318. M: translate,
  20319. MM: translate,
  20320. y: translate,
  20321. yy: translate,
  20322. },
  20323. dayOfMonthOrdinalParse: /\d{1,2}\./,
  20324. ordinal: '%d.',
  20325. week: {
  20326. dow: 1, // Monday is the first day of the week.
  20327. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20328. },
  20329. });
  20330. return fi;
  20331. })));
  20332. /***/ }),
  20333. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fil.js":
  20334. /*!****************************************************************************!*\
  20335. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fil.js ***!
  20336. \****************************************************************************/
  20337. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20338. //! moment.js locale configuration
  20339. //! locale : Filipino [fil]
  20340. //! author : Dan Hagman : https://github.com/hagmandan
  20341. //! author : Matthew Co : https://github.com/matthewdeeco
  20342. ;(function (global, factory) {
  20343. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20344. 0
  20345. }(this, (function (moment) { 'use strict';
  20346. //! moment.js locale configuration
  20347. var fil = moment.defineLocale('fil', {
  20348. months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
  20349. '_'
  20350. ),
  20351. monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  20352. weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
  20353. '_'
  20354. ),
  20355. weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  20356. weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  20357. longDateFormat: {
  20358. LT: 'HH:mm',
  20359. LTS: 'HH:mm:ss',
  20360. L: 'MM/D/YYYY',
  20361. LL: 'MMMM D, YYYY',
  20362. LLL: 'MMMM D, YYYY HH:mm',
  20363. LLLL: 'dddd, MMMM DD, YYYY HH:mm',
  20364. },
  20365. calendar: {
  20366. sameDay: 'LT [ngayong araw]',
  20367. nextDay: '[Bukas ng] LT',
  20368. nextWeek: 'LT [sa susunod na] dddd',
  20369. lastDay: 'LT [kahapon]',
  20370. lastWeek: 'LT [noong nakaraang] dddd',
  20371. sameElse: 'L',
  20372. },
  20373. relativeTime: {
  20374. future: 'sa loob ng %s',
  20375. past: '%s ang nakalipas',
  20376. s: 'ilang segundo',
  20377. ss: '%d segundo',
  20378. m: 'isang minuto',
  20379. mm: '%d minuto',
  20380. h: 'isang oras',
  20381. hh: '%d oras',
  20382. d: 'isang araw',
  20383. dd: '%d araw',
  20384. M: 'isang buwan',
  20385. MM: '%d buwan',
  20386. y: 'isang taon',
  20387. yy: '%d taon',
  20388. },
  20389. dayOfMonthOrdinalParse: /\d{1,2}/,
  20390. ordinal: function (number) {
  20391. return number;
  20392. },
  20393. week: {
  20394. dow: 1, // Monday is the first day of the week.
  20395. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20396. },
  20397. });
  20398. return fil;
  20399. })));
  20400. /***/ }),
  20401. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fo.js":
  20402. /*!***************************************************************************!*\
  20403. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fo.js ***!
  20404. \***************************************************************************/
  20405. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20406. //! moment.js locale configuration
  20407. //! locale : Faroese [fo]
  20408. //! author : Ragnar Johannesen : https://github.com/ragnar123
  20409. //! author : Kristian Sakarisson : https://github.com/sakarisson
  20410. ;(function (global, factory) {
  20411. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20412. 0
  20413. }(this, (function (moment) { 'use strict';
  20414. //! moment.js locale configuration
  20415. var fo = moment.defineLocale('fo', {
  20416. months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
  20417. '_'
  20418. ),
  20419. monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  20420. weekdays:
  20421. 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
  20422. '_'
  20423. ),
  20424. weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
  20425. weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
  20426. longDateFormat: {
  20427. LT: 'HH:mm',
  20428. LTS: 'HH:mm:ss',
  20429. L: 'DD/MM/YYYY',
  20430. LL: 'D MMMM YYYY',
  20431. LLL: 'D MMMM YYYY HH:mm',
  20432. LLLL: 'dddd D. MMMM, YYYY HH:mm',
  20433. },
  20434. calendar: {
  20435. sameDay: '[Í dag kl.] LT',
  20436. nextDay: '[Í morgin kl.] LT',
  20437. nextWeek: 'dddd [kl.] LT',
  20438. lastDay: '[Í gjár kl.] LT',
  20439. lastWeek: '[síðstu] dddd [kl] LT',
  20440. sameElse: 'L',
  20441. },
  20442. relativeTime: {
  20443. future: 'um %s',
  20444. past: '%s síðani',
  20445. s: 'fá sekund',
  20446. ss: '%d sekundir',
  20447. m: 'ein minuttur',
  20448. mm: '%d minuttir',
  20449. h: 'ein tími',
  20450. hh: '%d tímar',
  20451. d: 'ein dagur',
  20452. dd: '%d dagar',
  20453. M: 'ein mánaður',
  20454. MM: '%d mánaðir',
  20455. y: 'eitt ár',
  20456. yy: '%d ár',
  20457. },
  20458. dayOfMonthOrdinalParse: /\d{1,2}\./,
  20459. ordinal: '%d.',
  20460. week: {
  20461. dow: 1, // Monday is the first day of the week.
  20462. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20463. },
  20464. });
  20465. return fo;
  20466. })));
  20467. /***/ }),
  20468. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ca.js":
  20469. /*!******************************************************************************!*\
  20470. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ca.js ***!
  20471. \******************************************************************************/
  20472. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20473. //! moment.js locale configuration
  20474. //! locale : French (Canada) [fr-ca]
  20475. //! author : Jonathan Abourbih : https://github.com/jonbca
  20476. ;(function (global, factory) {
  20477. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20478. 0
  20479. }(this, (function (moment) { 'use strict';
  20480. //! moment.js locale configuration
  20481. var frCa = moment.defineLocale('fr-ca', {
  20482. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  20483. '_'
  20484. ),
  20485. monthsShort:
  20486. 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  20487. '_'
  20488. ),
  20489. monthsParseExact: true,
  20490. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  20491. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  20492. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  20493. weekdaysParseExact: true,
  20494. longDateFormat: {
  20495. LT: 'HH:mm',
  20496. LTS: 'HH:mm:ss',
  20497. L: 'YYYY-MM-DD',
  20498. LL: 'D MMMM YYYY',
  20499. LLL: 'D MMMM YYYY HH:mm',
  20500. LLLL: 'dddd D MMMM YYYY HH:mm',
  20501. },
  20502. calendar: {
  20503. sameDay: '[Aujourd’hui à] LT',
  20504. nextDay: '[Demain à] LT',
  20505. nextWeek: 'dddd [à] LT',
  20506. lastDay: '[Hier à] LT',
  20507. lastWeek: 'dddd [dernier à] LT',
  20508. sameElse: 'L',
  20509. },
  20510. relativeTime: {
  20511. future: 'dans %s',
  20512. past: 'il y a %s',
  20513. s: 'quelques secondes',
  20514. ss: '%d secondes',
  20515. m: 'une minute',
  20516. mm: '%d minutes',
  20517. h: 'une heure',
  20518. hh: '%d heures',
  20519. d: 'un jour',
  20520. dd: '%d jours',
  20521. M: 'un mois',
  20522. MM: '%d mois',
  20523. y: 'un an',
  20524. yy: '%d ans',
  20525. },
  20526. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  20527. ordinal: function (number, period) {
  20528. switch (period) {
  20529. // Words with masculine grammatical gender: mois, trimestre, jour
  20530. default:
  20531. case 'M':
  20532. case 'Q':
  20533. case 'D':
  20534. case 'DDD':
  20535. case 'd':
  20536. return number + (number === 1 ? 'er' : 'e');
  20537. // Words with feminine grammatical gender: semaine
  20538. case 'w':
  20539. case 'W':
  20540. return number + (number === 1 ? 're' : 'e');
  20541. }
  20542. },
  20543. });
  20544. return frCa;
  20545. })));
  20546. /***/ }),
  20547. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ch.js":
  20548. /*!******************************************************************************!*\
  20549. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ch.js ***!
  20550. \******************************************************************************/
  20551. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20552. //! moment.js locale configuration
  20553. //! locale : French (Switzerland) [fr-ch]
  20554. //! author : Gaspard Bucher : https://github.com/gaspard
  20555. ;(function (global, factory) {
  20556. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20557. 0
  20558. }(this, (function (moment) { 'use strict';
  20559. //! moment.js locale configuration
  20560. var frCh = moment.defineLocale('fr-ch', {
  20561. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  20562. '_'
  20563. ),
  20564. monthsShort:
  20565. 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  20566. '_'
  20567. ),
  20568. monthsParseExact: true,
  20569. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  20570. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  20571. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  20572. weekdaysParseExact: true,
  20573. longDateFormat: {
  20574. LT: 'HH:mm',
  20575. LTS: 'HH:mm:ss',
  20576. L: 'DD.MM.YYYY',
  20577. LL: 'D MMMM YYYY',
  20578. LLL: 'D MMMM YYYY HH:mm',
  20579. LLLL: 'dddd D MMMM YYYY HH:mm',
  20580. },
  20581. calendar: {
  20582. sameDay: '[Aujourd’hui à] LT',
  20583. nextDay: '[Demain à] LT',
  20584. nextWeek: 'dddd [à] LT',
  20585. lastDay: '[Hier à] LT',
  20586. lastWeek: 'dddd [dernier à] LT',
  20587. sameElse: 'L',
  20588. },
  20589. relativeTime: {
  20590. future: 'dans %s',
  20591. past: 'il y a %s',
  20592. s: 'quelques secondes',
  20593. ss: '%d secondes',
  20594. m: 'une minute',
  20595. mm: '%d minutes',
  20596. h: 'une heure',
  20597. hh: '%d heures',
  20598. d: 'un jour',
  20599. dd: '%d jours',
  20600. M: 'un mois',
  20601. MM: '%d mois',
  20602. y: 'un an',
  20603. yy: '%d ans',
  20604. },
  20605. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  20606. ordinal: function (number, period) {
  20607. switch (period) {
  20608. // Words with masculine grammatical gender: mois, trimestre, jour
  20609. default:
  20610. case 'M':
  20611. case 'Q':
  20612. case 'D':
  20613. case 'DDD':
  20614. case 'd':
  20615. return number + (number === 1 ? 'er' : 'e');
  20616. // Words with feminine grammatical gender: semaine
  20617. case 'w':
  20618. case 'W':
  20619. return number + (number === 1 ? 're' : 'e');
  20620. }
  20621. },
  20622. week: {
  20623. dow: 1, // Monday is the first day of the week.
  20624. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20625. },
  20626. });
  20627. return frCh;
  20628. })));
  20629. /***/ }),
  20630. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr.js":
  20631. /*!***************************************************************************!*\
  20632. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr.js ***!
  20633. \***************************************************************************/
  20634. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20635. //! moment.js locale configuration
  20636. //! locale : French [fr]
  20637. //! author : John Fischer : https://github.com/jfroffice
  20638. ;(function (global, factory) {
  20639. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20640. 0
  20641. }(this, (function (moment) { 'use strict';
  20642. //! moment.js locale configuration
  20643. var monthsStrictRegex =
  20644. /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
  20645. monthsShortStrictRegex =
  20646. /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
  20647. monthsRegex =
  20648. /(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,
  20649. monthsParse = [
  20650. /^janv/i,
  20651. /^févr/i,
  20652. /^mars/i,
  20653. /^avr/i,
  20654. /^mai/i,
  20655. /^juin/i,
  20656. /^juil/i,
  20657. /^août/i,
  20658. /^sept/i,
  20659. /^oct/i,
  20660. /^nov/i,
  20661. /^déc/i,
  20662. ];
  20663. var fr = moment.defineLocale('fr', {
  20664. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  20665. '_'
  20666. ),
  20667. monthsShort:
  20668. 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  20669. '_'
  20670. ),
  20671. monthsRegex: monthsRegex,
  20672. monthsShortRegex: monthsRegex,
  20673. monthsStrictRegex: monthsStrictRegex,
  20674. monthsShortStrictRegex: monthsShortStrictRegex,
  20675. monthsParse: monthsParse,
  20676. longMonthsParse: monthsParse,
  20677. shortMonthsParse: monthsParse,
  20678. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  20679. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  20680. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  20681. weekdaysParseExact: true,
  20682. longDateFormat: {
  20683. LT: 'HH:mm',
  20684. LTS: 'HH:mm:ss',
  20685. L: 'DD/MM/YYYY',
  20686. LL: 'D MMMM YYYY',
  20687. LLL: 'D MMMM YYYY HH:mm',
  20688. LLLL: 'dddd D MMMM YYYY HH:mm',
  20689. },
  20690. calendar: {
  20691. sameDay: '[Aujourd’hui à] LT',
  20692. nextDay: '[Demain à] LT',
  20693. nextWeek: 'dddd [à] LT',
  20694. lastDay: '[Hier à] LT',
  20695. lastWeek: 'dddd [dernier à] LT',
  20696. sameElse: 'L',
  20697. },
  20698. relativeTime: {
  20699. future: 'dans %s',
  20700. past: 'il y a %s',
  20701. s: 'quelques secondes',
  20702. ss: '%d secondes',
  20703. m: 'une minute',
  20704. mm: '%d minutes',
  20705. h: 'une heure',
  20706. hh: '%d heures',
  20707. d: 'un jour',
  20708. dd: '%d jours',
  20709. w: 'une semaine',
  20710. ww: '%d semaines',
  20711. M: 'un mois',
  20712. MM: '%d mois',
  20713. y: 'un an',
  20714. yy: '%d ans',
  20715. },
  20716. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  20717. ordinal: function (number, period) {
  20718. switch (period) {
  20719. // TODO: Return 'e' when day of month > 1. Move this case inside
  20720. // block for masculine words below.
  20721. // See https://github.com/moment/moment/issues/3375
  20722. case 'D':
  20723. return number + (number === 1 ? 'er' : '');
  20724. // Words with masculine grammatical gender: mois, trimestre, jour
  20725. default:
  20726. case 'M':
  20727. case 'Q':
  20728. case 'DDD':
  20729. case 'd':
  20730. return number + (number === 1 ? 'er' : 'e');
  20731. // Words with feminine grammatical gender: semaine
  20732. case 'w':
  20733. case 'W':
  20734. return number + (number === 1 ? 're' : 'e');
  20735. }
  20736. },
  20737. week: {
  20738. dow: 1, // Monday is the first day of the week.
  20739. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20740. },
  20741. });
  20742. return fr;
  20743. })));
  20744. /***/ }),
  20745. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fy.js":
  20746. /*!***************************************************************************!*\
  20747. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fy.js ***!
  20748. \***************************************************************************/
  20749. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20750. //! moment.js locale configuration
  20751. //! locale : Frisian [fy]
  20752. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  20753. ;(function (global, factory) {
  20754. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20755. 0
  20756. }(this, (function (moment) { 'use strict';
  20757. //! moment.js locale configuration
  20758. var monthsShortWithDots =
  20759. 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
  20760. monthsShortWithoutDots =
  20761. 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
  20762. var fy = moment.defineLocale('fy', {
  20763. months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
  20764. '_'
  20765. ),
  20766. monthsShort: function (m, format) {
  20767. if (!m) {
  20768. return monthsShortWithDots;
  20769. } else if (/-MMM-/.test(format)) {
  20770. return monthsShortWithoutDots[m.month()];
  20771. } else {
  20772. return monthsShortWithDots[m.month()];
  20773. }
  20774. },
  20775. monthsParseExact: true,
  20776. weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
  20777. '_'
  20778. ),
  20779. weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
  20780. weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
  20781. weekdaysParseExact: true,
  20782. longDateFormat: {
  20783. LT: 'HH:mm',
  20784. LTS: 'HH:mm:ss',
  20785. L: 'DD-MM-YYYY',
  20786. LL: 'D MMMM YYYY',
  20787. LLL: 'D MMMM YYYY HH:mm',
  20788. LLLL: 'dddd D MMMM YYYY HH:mm',
  20789. },
  20790. calendar: {
  20791. sameDay: '[hjoed om] LT',
  20792. nextDay: '[moarn om] LT',
  20793. nextWeek: 'dddd [om] LT',
  20794. lastDay: '[juster om] LT',
  20795. lastWeek: '[ôfrûne] dddd [om] LT',
  20796. sameElse: 'L',
  20797. },
  20798. relativeTime: {
  20799. future: 'oer %s',
  20800. past: '%s lyn',
  20801. s: 'in pear sekonden',
  20802. ss: '%d sekonden',
  20803. m: 'ien minút',
  20804. mm: '%d minuten',
  20805. h: 'ien oere',
  20806. hh: '%d oeren',
  20807. d: 'ien dei',
  20808. dd: '%d dagen',
  20809. M: 'ien moanne',
  20810. MM: '%d moannen',
  20811. y: 'ien jier',
  20812. yy: '%d jierren',
  20813. },
  20814. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  20815. ordinal: function (number) {
  20816. return (
  20817. number +
  20818. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  20819. );
  20820. },
  20821. week: {
  20822. dow: 1, // Monday is the first day of the week.
  20823. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20824. },
  20825. });
  20826. return fy;
  20827. })));
  20828. /***/ }),
  20829. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ga.js":
  20830. /*!***************************************************************************!*\
  20831. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ga.js ***!
  20832. \***************************************************************************/
  20833. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20834. //! moment.js locale configuration
  20835. //! locale : Irish or Irish Gaelic [ga]
  20836. //! author : André Silva : https://github.com/askpt
  20837. ;(function (global, factory) {
  20838. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20839. 0
  20840. }(this, (function (moment) { 'use strict';
  20841. //! moment.js locale configuration
  20842. var months = [
  20843. 'Eanáir',
  20844. 'Feabhra',
  20845. 'Márta',
  20846. 'Aibreán',
  20847. 'Bealtaine',
  20848. 'Meitheamh',
  20849. 'Iúil',
  20850. 'Lúnasa',
  20851. 'Meán Fómhair',
  20852. 'Deireadh Fómhair',
  20853. 'Samhain',
  20854. 'Nollaig',
  20855. ],
  20856. monthsShort = [
  20857. 'Ean',
  20858. 'Feabh',
  20859. 'Márt',
  20860. 'Aib',
  20861. 'Beal',
  20862. 'Meith',
  20863. 'Iúil',
  20864. 'Lún',
  20865. 'M.F.',
  20866. 'D.F.',
  20867. 'Samh',
  20868. 'Noll',
  20869. ],
  20870. weekdays = [
  20871. 'Dé Domhnaigh',
  20872. 'Dé Luain',
  20873. 'Dé Máirt',
  20874. 'Dé Céadaoin',
  20875. 'Déardaoin',
  20876. 'Dé hAoine',
  20877. 'Dé Sathairn',
  20878. ],
  20879. weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
  20880. weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
  20881. var ga = moment.defineLocale('ga', {
  20882. months: months,
  20883. monthsShort: monthsShort,
  20884. monthsParseExact: true,
  20885. weekdays: weekdays,
  20886. weekdaysShort: weekdaysShort,
  20887. weekdaysMin: weekdaysMin,
  20888. longDateFormat: {
  20889. LT: 'HH:mm',
  20890. LTS: 'HH:mm:ss',
  20891. L: 'DD/MM/YYYY',
  20892. LL: 'D MMMM YYYY',
  20893. LLL: 'D MMMM YYYY HH:mm',
  20894. LLLL: 'dddd, D MMMM YYYY HH:mm',
  20895. },
  20896. calendar: {
  20897. sameDay: '[Inniu ag] LT',
  20898. nextDay: '[Amárach ag] LT',
  20899. nextWeek: 'dddd [ag] LT',
  20900. lastDay: '[Inné ag] LT',
  20901. lastWeek: 'dddd [seo caite] [ag] LT',
  20902. sameElse: 'L',
  20903. },
  20904. relativeTime: {
  20905. future: 'i %s',
  20906. past: '%s ó shin',
  20907. s: 'cúpla soicind',
  20908. ss: '%d soicind',
  20909. m: 'nóiméad',
  20910. mm: '%d nóiméad',
  20911. h: 'uair an chloig',
  20912. hh: '%d uair an chloig',
  20913. d: 'lá',
  20914. dd: '%d lá',
  20915. M: 'mí',
  20916. MM: '%d míonna',
  20917. y: 'bliain',
  20918. yy: '%d bliain',
  20919. },
  20920. dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
  20921. ordinal: function (number) {
  20922. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  20923. return number + output;
  20924. },
  20925. week: {
  20926. dow: 1, // Monday is the first day of the week.
  20927. doy: 4, // The week that contains Jan 4th is the first week of the year.
  20928. },
  20929. });
  20930. return ga;
  20931. })));
  20932. /***/ }),
  20933. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gd.js":
  20934. /*!***************************************************************************!*\
  20935. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gd.js ***!
  20936. \***************************************************************************/
  20937. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  20938. //! moment.js locale configuration
  20939. //! locale : Scottish Gaelic [gd]
  20940. //! author : Jon Ashdown : https://github.com/jonashdown
  20941. ;(function (global, factory) {
  20942. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  20943. 0
  20944. }(this, (function (moment) { 'use strict';
  20945. //! moment.js locale configuration
  20946. var months = [
  20947. 'Am Faoilleach',
  20948. 'An Gearran',
  20949. 'Am Màrt',
  20950. 'An Giblean',
  20951. 'An Cèitean',
  20952. 'An t-Ògmhios',
  20953. 'An t-Iuchar',
  20954. 'An Lùnastal',
  20955. 'An t-Sultain',
  20956. 'An Dàmhair',
  20957. 'An t-Samhain',
  20958. 'An Dùbhlachd',
  20959. ],
  20960. monthsShort = [
  20961. 'Faoi',
  20962. 'Gear',
  20963. 'Màrt',
  20964. 'Gibl',
  20965. 'Cèit',
  20966. 'Ògmh',
  20967. 'Iuch',
  20968. 'Lùn',
  20969. 'Sult',
  20970. 'Dàmh',
  20971. 'Samh',
  20972. 'Dùbh',
  20973. ],
  20974. weekdays = [
  20975. 'Didòmhnaich',
  20976. 'Diluain',
  20977. 'Dimàirt',
  20978. 'Diciadain',
  20979. 'Diardaoin',
  20980. 'Dihaoine',
  20981. 'Disathairne',
  20982. ],
  20983. weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
  20984. weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
  20985. var gd = moment.defineLocale('gd', {
  20986. months: months,
  20987. monthsShort: monthsShort,
  20988. monthsParseExact: true,
  20989. weekdays: weekdays,
  20990. weekdaysShort: weekdaysShort,
  20991. weekdaysMin: weekdaysMin,
  20992. longDateFormat: {
  20993. LT: 'HH:mm',
  20994. LTS: 'HH:mm:ss',
  20995. L: 'DD/MM/YYYY',
  20996. LL: 'D MMMM YYYY',
  20997. LLL: 'D MMMM YYYY HH:mm',
  20998. LLLL: 'dddd, D MMMM YYYY HH:mm',
  20999. },
  21000. calendar: {
  21001. sameDay: '[An-diugh aig] LT',
  21002. nextDay: '[A-màireach aig] LT',
  21003. nextWeek: 'dddd [aig] LT',
  21004. lastDay: '[An-dè aig] LT',
  21005. lastWeek: 'dddd [seo chaidh] [aig] LT',
  21006. sameElse: 'L',
  21007. },
  21008. relativeTime: {
  21009. future: 'ann an %s',
  21010. past: 'bho chionn %s',
  21011. s: 'beagan diogan',
  21012. ss: '%d diogan',
  21013. m: 'mionaid',
  21014. mm: '%d mionaidean',
  21015. h: 'uair',
  21016. hh: '%d uairean',
  21017. d: 'latha',
  21018. dd: '%d latha',
  21019. M: 'mìos',
  21020. MM: '%d mìosan',
  21021. y: 'bliadhna',
  21022. yy: '%d bliadhna',
  21023. },
  21024. dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
  21025. ordinal: function (number) {
  21026. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  21027. return number + output;
  21028. },
  21029. week: {
  21030. dow: 1, // Monday is the first day of the week.
  21031. doy: 4, // The week that contains Jan 4th is the first week of the year.
  21032. },
  21033. });
  21034. return gd;
  21035. })));
  21036. /***/ }),
  21037. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gl.js":
  21038. /*!***************************************************************************!*\
  21039. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gl.js ***!
  21040. \***************************************************************************/
  21041. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21042. //! moment.js locale configuration
  21043. //! locale : Galician [gl]
  21044. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  21045. ;(function (global, factory) {
  21046. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21047. 0
  21048. }(this, (function (moment) { 'use strict';
  21049. //! moment.js locale configuration
  21050. var gl = moment.defineLocale('gl', {
  21051. months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
  21052. '_'
  21053. ),
  21054. monthsShort:
  21055. 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
  21056. '_'
  21057. ),
  21058. monthsParseExact: true,
  21059. weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  21060. weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  21061. weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  21062. weekdaysParseExact: true,
  21063. longDateFormat: {
  21064. LT: 'H:mm',
  21065. LTS: 'H:mm:ss',
  21066. L: 'DD/MM/YYYY',
  21067. LL: 'D [de] MMMM [de] YYYY',
  21068. LLL: 'D [de] MMMM [de] YYYY H:mm',
  21069. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  21070. },
  21071. calendar: {
  21072. sameDay: function () {
  21073. return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  21074. },
  21075. nextDay: function () {
  21076. return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  21077. },
  21078. nextWeek: function () {
  21079. return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
  21080. },
  21081. lastDay: function () {
  21082. return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
  21083. },
  21084. lastWeek: function () {
  21085. return (
  21086. '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
  21087. );
  21088. },
  21089. sameElse: 'L',
  21090. },
  21091. relativeTime: {
  21092. future: function (str) {
  21093. if (str.indexOf('un') === 0) {
  21094. return 'n' + str;
  21095. }
  21096. return 'en ' + str;
  21097. },
  21098. past: 'hai %s',
  21099. s: 'uns segundos',
  21100. ss: '%d segundos',
  21101. m: 'un minuto',
  21102. mm: '%d minutos',
  21103. h: 'unha hora',
  21104. hh: '%d horas',
  21105. d: 'un día',
  21106. dd: '%d días',
  21107. M: 'un mes',
  21108. MM: '%d meses',
  21109. y: 'un ano',
  21110. yy: '%d anos',
  21111. },
  21112. dayOfMonthOrdinalParse: /\d{1,2}º/,
  21113. ordinal: '%dº',
  21114. week: {
  21115. dow: 1, // Monday is the first day of the week.
  21116. doy: 4, // The week that contains Jan 4th is the first week of the year.
  21117. },
  21118. });
  21119. return gl;
  21120. })));
  21121. /***/ }),
  21122. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-deva.js":
  21123. /*!*********************************************************************************!*\
  21124. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-deva.js ***!
  21125. \*********************************************************************************/
  21126. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21127. //! moment.js locale configuration
  21128. //! locale : Konkani Devanagari script [gom-deva]
  21129. //! author : The Discoverer : https://github.com/WikiDiscoverer
  21130. ;(function (global, factory) {
  21131. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21132. 0
  21133. }(this, (function (moment) { 'use strict';
  21134. //! moment.js locale configuration
  21135. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  21136. var format = {
  21137. s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
  21138. ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
  21139. m: ['एका मिणटान', 'एक मिनूट'],
  21140. mm: [number + ' मिणटांनी', number + ' मिणटां'],
  21141. h: ['एका वरान', 'एक वर'],
  21142. hh: [number + ' वरांनी', number + ' वरां'],
  21143. d: ['एका दिसान', 'एक दीस'],
  21144. dd: [number + ' दिसांनी', number + ' दीस'],
  21145. M: ['एका म्हयन्यान', 'एक म्हयनो'],
  21146. MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
  21147. y: ['एका वर्सान', 'एक वर्स'],
  21148. yy: [number + ' वर्सांनी', number + ' वर्सां'],
  21149. };
  21150. return isFuture ? format[key][0] : format[key][1];
  21151. }
  21152. var gomDeva = moment.defineLocale('gom-deva', {
  21153. months: {
  21154. standalone:
  21155. 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
  21156. '_'
  21157. ),
  21158. format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
  21159. '_'
  21160. ),
  21161. isFormat: /MMMM(\s)+D[oD]?/,
  21162. },
  21163. monthsShort:
  21164. 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
  21165. '_'
  21166. ),
  21167. monthsParseExact: true,
  21168. weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
  21169. weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
  21170. weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
  21171. weekdaysParseExact: true,
  21172. longDateFormat: {
  21173. LT: 'A h:mm [वाजतां]',
  21174. LTS: 'A h:mm:ss [वाजतां]',
  21175. L: 'DD-MM-YYYY',
  21176. LL: 'D MMMM YYYY',
  21177. LLL: 'D MMMM YYYY A h:mm [वाजतां]',
  21178. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
  21179. llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
  21180. },
  21181. calendar: {
  21182. sameDay: '[आयज] LT',
  21183. nextDay: '[फाल्यां] LT',
  21184. nextWeek: '[फुडलो] dddd[,] LT',
  21185. lastDay: '[काल] LT',
  21186. lastWeek: '[फाटलो] dddd[,] LT',
  21187. sameElse: 'L',
  21188. },
  21189. relativeTime: {
  21190. future: '%s',
  21191. past: '%s आदीं',
  21192. s: processRelativeTime,
  21193. ss: processRelativeTime,
  21194. m: processRelativeTime,
  21195. mm: processRelativeTime,
  21196. h: processRelativeTime,
  21197. hh: processRelativeTime,
  21198. d: processRelativeTime,
  21199. dd: processRelativeTime,
  21200. M: processRelativeTime,
  21201. MM: processRelativeTime,
  21202. y: processRelativeTime,
  21203. yy: processRelativeTime,
  21204. },
  21205. dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
  21206. ordinal: function (number, period) {
  21207. switch (period) {
  21208. // the ordinal 'वेर' only applies to day of the month
  21209. case 'D':
  21210. return number + 'वेर';
  21211. default:
  21212. case 'M':
  21213. case 'Q':
  21214. case 'DDD':
  21215. case 'd':
  21216. case 'w':
  21217. case 'W':
  21218. return number;
  21219. }
  21220. },
  21221. week: {
  21222. dow: 0, // Sunday is the first day of the week
  21223. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  21224. },
  21225. meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
  21226. meridiemHour: function (hour, meridiem) {
  21227. if (hour === 12) {
  21228. hour = 0;
  21229. }
  21230. if (meridiem === 'राती') {
  21231. return hour < 4 ? hour : hour + 12;
  21232. } else if (meridiem === 'सकाळीं') {
  21233. return hour;
  21234. } else if (meridiem === 'दनपारां') {
  21235. return hour > 12 ? hour : hour + 12;
  21236. } else if (meridiem === 'सांजे') {
  21237. return hour + 12;
  21238. }
  21239. },
  21240. meridiem: function (hour, minute, isLower) {
  21241. if (hour < 4) {
  21242. return 'राती';
  21243. } else if (hour < 12) {
  21244. return 'सकाळीं';
  21245. } else if (hour < 16) {
  21246. return 'दनपारां';
  21247. } else if (hour < 20) {
  21248. return 'सांजे';
  21249. } else {
  21250. return 'राती';
  21251. }
  21252. },
  21253. });
  21254. return gomDeva;
  21255. })));
  21256. /***/ }),
  21257. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-latn.js":
  21258. /*!*********************************************************************************!*\
  21259. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-latn.js ***!
  21260. \*********************************************************************************/
  21261. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21262. //! moment.js locale configuration
  21263. //! locale : Konkani Latin script [gom-latn]
  21264. //! author : The Discoverer : https://github.com/WikiDiscoverer
  21265. ;(function (global, factory) {
  21266. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21267. 0
  21268. }(this, (function (moment) { 'use strict';
  21269. //! moment.js locale configuration
  21270. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  21271. var format = {
  21272. s: ['thoddea sekondamni', 'thodde sekond'],
  21273. ss: [number + ' sekondamni', number + ' sekond'],
  21274. m: ['eka mintan', 'ek minut'],
  21275. mm: [number + ' mintamni', number + ' mintam'],
  21276. h: ['eka voran', 'ek vor'],
  21277. hh: [number + ' voramni', number + ' voram'],
  21278. d: ['eka disan', 'ek dis'],
  21279. dd: [number + ' disamni', number + ' dis'],
  21280. M: ['eka mhoinean', 'ek mhoino'],
  21281. MM: [number + ' mhoineamni', number + ' mhoine'],
  21282. y: ['eka vorsan', 'ek voros'],
  21283. yy: [number + ' vorsamni', number + ' vorsam'],
  21284. };
  21285. return isFuture ? format[key][0] : format[key][1];
  21286. }
  21287. var gomLatn = moment.defineLocale('gom-latn', {
  21288. months: {
  21289. standalone:
  21290. 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
  21291. '_'
  21292. ),
  21293. format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
  21294. '_'
  21295. ),
  21296. isFormat: /MMMM(\s)+D[oD]?/,
  21297. },
  21298. monthsShort:
  21299. 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
  21300. monthsParseExact: true,
  21301. weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
  21302. weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
  21303. weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
  21304. weekdaysParseExact: true,
  21305. longDateFormat: {
  21306. LT: 'A h:mm [vazta]',
  21307. LTS: 'A h:mm:ss [vazta]',
  21308. L: 'DD-MM-YYYY',
  21309. LL: 'D MMMM YYYY',
  21310. LLL: 'D MMMM YYYY A h:mm [vazta]',
  21311. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
  21312. llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
  21313. },
  21314. calendar: {
  21315. sameDay: '[Aiz] LT',
  21316. nextDay: '[Faleam] LT',
  21317. nextWeek: '[Fuddlo] dddd[,] LT',
  21318. lastDay: '[Kal] LT',
  21319. lastWeek: '[Fattlo] dddd[,] LT',
  21320. sameElse: 'L',
  21321. },
  21322. relativeTime: {
  21323. future: '%s',
  21324. past: '%s adim',
  21325. s: processRelativeTime,
  21326. ss: processRelativeTime,
  21327. m: processRelativeTime,
  21328. mm: processRelativeTime,
  21329. h: processRelativeTime,
  21330. hh: processRelativeTime,
  21331. d: processRelativeTime,
  21332. dd: processRelativeTime,
  21333. M: processRelativeTime,
  21334. MM: processRelativeTime,
  21335. y: processRelativeTime,
  21336. yy: processRelativeTime,
  21337. },
  21338. dayOfMonthOrdinalParse: /\d{1,2}(er)/,
  21339. ordinal: function (number, period) {
  21340. switch (period) {
  21341. // the ordinal 'er' only applies to day of the month
  21342. case 'D':
  21343. return number + 'er';
  21344. default:
  21345. case 'M':
  21346. case 'Q':
  21347. case 'DDD':
  21348. case 'd':
  21349. case 'w':
  21350. case 'W':
  21351. return number;
  21352. }
  21353. },
  21354. week: {
  21355. dow: 0, // Sunday is the first day of the week
  21356. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  21357. },
  21358. meridiemParse: /rati|sokallim|donparam|sanje/,
  21359. meridiemHour: function (hour, meridiem) {
  21360. if (hour === 12) {
  21361. hour = 0;
  21362. }
  21363. if (meridiem === 'rati') {
  21364. return hour < 4 ? hour : hour + 12;
  21365. } else if (meridiem === 'sokallim') {
  21366. return hour;
  21367. } else if (meridiem === 'donparam') {
  21368. return hour > 12 ? hour : hour + 12;
  21369. } else if (meridiem === 'sanje') {
  21370. return hour + 12;
  21371. }
  21372. },
  21373. meridiem: function (hour, minute, isLower) {
  21374. if (hour < 4) {
  21375. return 'rati';
  21376. } else if (hour < 12) {
  21377. return 'sokallim';
  21378. } else if (hour < 16) {
  21379. return 'donparam';
  21380. } else if (hour < 20) {
  21381. return 'sanje';
  21382. } else {
  21383. return 'rati';
  21384. }
  21385. },
  21386. });
  21387. return gomLatn;
  21388. })));
  21389. /***/ }),
  21390. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gu.js":
  21391. /*!***************************************************************************!*\
  21392. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gu.js ***!
  21393. \***************************************************************************/
  21394. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21395. //! moment.js locale configuration
  21396. //! locale : Gujarati [gu]
  21397. //! author : Kaushik Thanki : https://github.com/Kaushik1987
  21398. ;(function (global, factory) {
  21399. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21400. 0
  21401. }(this, (function (moment) { 'use strict';
  21402. //! moment.js locale configuration
  21403. var symbolMap = {
  21404. 1: '૧',
  21405. 2: '૨',
  21406. 3: '૩',
  21407. 4: '૪',
  21408. 5: '૫',
  21409. 6: '૬',
  21410. 7: '૭',
  21411. 8: '૮',
  21412. 9: '૯',
  21413. 0: '૦',
  21414. },
  21415. numberMap = {
  21416. '૧': '1',
  21417. '૨': '2',
  21418. '૩': '3',
  21419. '૪': '4',
  21420. '૫': '5',
  21421. '૬': '6',
  21422. '૭': '7',
  21423. '૮': '8',
  21424. '૯': '9',
  21425. '૦': '0',
  21426. };
  21427. var gu = moment.defineLocale('gu', {
  21428. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
  21429. '_'
  21430. ),
  21431. monthsShort:
  21432. 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
  21433. '_'
  21434. ),
  21435. monthsParseExact: true,
  21436. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
  21437. '_'
  21438. ),
  21439. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  21440. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  21441. longDateFormat: {
  21442. LT: 'A h:mm વાગ્યે',
  21443. LTS: 'A h:mm:ss વાગ્યે',
  21444. L: 'DD/MM/YYYY',
  21445. LL: 'D MMMM YYYY',
  21446. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  21447. LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
  21448. },
  21449. calendar: {
  21450. sameDay: '[આજ] LT',
  21451. nextDay: '[કાલે] LT',
  21452. nextWeek: 'dddd, LT',
  21453. lastDay: '[ગઇકાલે] LT',
  21454. lastWeek: '[પાછલા] dddd, LT',
  21455. sameElse: 'L',
  21456. },
  21457. relativeTime: {
  21458. future: '%s મા',
  21459. past: '%s પહેલા',
  21460. s: 'અમુક પળો',
  21461. ss: '%d સેકંડ',
  21462. m: 'એક મિનિટ',
  21463. mm: '%d મિનિટ',
  21464. h: 'એક કલાક',
  21465. hh: '%d કલાક',
  21466. d: 'એક દિવસ',
  21467. dd: '%d દિવસ',
  21468. M: 'એક મહિનો',
  21469. MM: '%d મહિનો',
  21470. y: 'એક વર્ષ',
  21471. yy: '%d વર્ષ',
  21472. },
  21473. preparse: function (string) {
  21474. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  21475. return numberMap[match];
  21476. });
  21477. },
  21478. postformat: function (string) {
  21479. return string.replace(/\d/g, function (match) {
  21480. return symbolMap[match];
  21481. });
  21482. },
  21483. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  21484. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  21485. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  21486. meridiemHour: function (hour, meridiem) {
  21487. if (hour === 12) {
  21488. hour = 0;
  21489. }
  21490. if (meridiem === 'રાત') {
  21491. return hour < 4 ? hour : hour + 12;
  21492. } else if (meridiem === 'સવાર') {
  21493. return hour;
  21494. } else if (meridiem === 'બપોર') {
  21495. return hour >= 10 ? hour : hour + 12;
  21496. } else if (meridiem === 'સાંજ') {
  21497. return hour + 12;
  21498. }
  21499. },
  21500. meridiem: function (hour, minute, isLower) {
  21501. if (hour < 4) {
  21502. return 'રાત';
  21503. } else if (hour < 10) {
  21504. return 'સવાર';
  21505. } else if (hour < 17) {
  21506. return 'બપોર';
  21507. } else if (hour < 20) {
  21508. return 'સાંજ';
  21509. } else {
  21510. return 'રાત';
  21511. }
  21512. },
  21513. week: {
  21514. dow: 0, // Sunday is the first day of the week.
  21515. doy: 6, // The week that contains Jan 6th is the first week of the year.
  21516. },
  21517. });
  21518. return gu;
  21519. })));
  21520. /***/ }),
  21521. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/he.js":
  21522. /*!***************************************************************************!*\
  21523. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/he.js ***!
  21524. \***************************************************************************/
  21525. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21526. //! moment.js locale configuration
  21527. //! locale : Hebrew [he]
  21528. //! author : Tomer Cohen : https://github.com/tomer
  21529. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  21530. //! author : Tal Ater : https://github.com/TalAter
  21531. ;(function (global, factory) {
  21532. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21533. 0
  21534. }(this, (function (moment) { 'use strict';
  21535. //! moment.js locale configuration
  21536. var he = moment.defineLocale('he', {
  21537. months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
  21538. '_'
  21539. ),
  21540. monthsShort:
  21541. 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
  21542. weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  21543. weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  21544. weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  21545. longDateFormat: {
  21546. LT: 'HH:mm',
  21547. LTS: 'HH:mm:ss',
  21548. L: 'DD/MM/YYYY',
  21549. LL: 'D [ב]MMMM YYYY',
  21550. LLL: 'D [ב]MMMM YYYY HH:mm',
  21551. LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
  21552. l: 'D/M/YYYY',
  21553. ll: 'D MMM YYYY',
  21554. lll: 'D MMM YYYY HH:mm',
  21555. llll: 'ddd, D MMM YYYY HH:mm',
  21556. },
  21557. calendar: {
  21558. sameDay: '[היום ב־]LT',
  21559. nextDay: '[מחר ב־]LT',
  21560. nextWeek: 'dddd [בשעה] LT',
  21561. lastDay: '[אתמול ב־]LT',
  21562. lastWeek: '[ביום] dddd [האחרון בשעה] LT',
  21563. sameElse: 'L',
  21564. },
  21565. relativeTime: {
  21566. future: 'בעוד %s',
  21567. past: 'לפני %s',
  21568. s: 'מספר שניות',
  21569. ss: '%d שניות',
  21570. m: 'דקה',
  21571. mm: '%d דקות',
  21572. h: 'שעה',
  21573. hh: function (number) {
  21574. if (number === 2) {
  21575. return 'שעתיים';
  21576. }
  21577. return number + ' שעות';
  21578. },
  21579. d: 'יום',
  21580. dd: function (number) {
  21581. if (number === 2) {
  21582. return 'יומיים';
  21583. }
  21584. return number + ' ימים';
  21585. },
  21586. M: 'חודש',
  21587. MM: function (number) {
  21588. if (number === 2) {
  21589. return 'חודשיים';
  21590. }
  21591. return number + ' חודשים';
  21592. },
  21593. y: 'שנה',
  21594. yy: function (number) {
  21595. if (number === 2) {
  21596. return 'שנתיים';
  21597. } else if (number % 10 === 0 && number !== 10) {
  21598. return number + ' שנה';
  21599. }
  21600. return number + ' שנים';
  21601. },
  21602. },
  21603. meridiemParse:
  21604. /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  21605. isPM: function (input) {
  21606. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  21607. },
  21608. meridiem: function (hour, minute, isLower) {
  21609. if (hour < 5) {
  21610. return 'לפנות בוקר';
  21611. } else if (hour < 10) {
  21612. return 'בבוקר';
  21613. } else if (hour < 12) {
  21614. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  21615. } else if (hour < 18) {
  21616. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  21617. } else {
  21618. return 'בערב';
  21619. }
  21620. },
  21621. });
  21622. return he;
  21623. })));
  21624. /***/ }),
  21625. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hi.js":
  21626. /*!***************************************************************************!*\
  21627. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hi.js ***!
  21628. \***************************************************************************/
  21629. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21630. //! moment.js locale configuration
  21631. //! locale : Hindi [hi]
  21632. //! author : Mayank Singhal : https://github.com/mayanksinghal
  21633. ;(function (global, factory) {
  21634. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21635. 0
  21636. }(this, (function (moment) { 'use strict';
  21637. //! moment.js locale configuration
  21638. var symbolMap = {
  21639. 1: '१',
  21640. 2: '२',
  21641. 3: '३',
  21642. 4: '४',
  21643. 5: '५',
  21644. 6: '६',
  21645. 7: '७',
  21646. 8: '८',
  21647. 9: '९',
  21648. 0: '०',
  21649. },
  21650. numberMap = {
  21651. '१': '1',
  21652. '२': '2',
  21653. '३': '3',
  21654. '४': '4',
  21655. '५': '5',
  21656. '६': '6',
  21657. '७': '7',
  21658. '८': '8',
  21659. '९': '9',
  21660. '०': '0',
  21661. },
  21662. monthsParse = [
  21663. /^जन/i,
  21664. /^फ़र|फर/i,
  21665. /^मार्च/i,
  21666. /^अप्रै/i,
  21667. /^मई/i,
  21668. /^जून/i,
  21669. /^जुल/i,
  21670. /^अग/i,
  21671. /^सितं|सित/i,
  21672. /^अक्टू/i,
  21673. /^नव|नवं/i,
  21674. /^दिसं|दिस/i,
  21675. ],
  21676. shortMonthsParse = [
  21677. /^जन/i,
  21678. /^फ़र/i,
  21679. /^मार्च/i,
  21680. /^अप्रै/i,
  21681. /^मई/i,
  21682. /^जून/i,
  21683. /^जुल/i,
  21684. /^अग/i,
  21685. /^सित/i,
  21686. /^अक्टू/i,
  21687. /^नव/i,
  21688. /^दिस/i,
  21689. ];
  21690. var hi = moment.defineLocale('hi', {
  21691. months: {
  21692. format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
  21693. '_'
  21694. ),
  21695. standalone:
  21696. 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
  21697. '_'
  21698. ),
  21699. },
  21700. monthsShort:
  21701. 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
  21702. weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  21703. weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  21704. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  21705. longDateFormat: {
  21706. LT: 'A h:mm बजे',
  21707. LTS: 'A h:mm:ss बजे',
  21708. L: 'DD/MM/YYYY',
  21709. LL: 'D MMMM YYYY',
  21710. LLL: 'D MMMM YYYY, A h:mm बजे',
  21711. LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
  21712. },
  21713. monthsParse: monthsParse,
  21714. longMonthsParse: monthsParse,
  21715. shortMonthsParse: shortMonthsParse,
  21716. monthsRegex:
  21717. /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
  21718. monthsShortRegex:
  21719. /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
  21720. monthsStrictRegex:
  21721. /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
  21722. monthsShortStrictRegex:
  21723. /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
  21724. calendar: {
  21725. sameDay: '[आज] LT',
  21726. nextDay: '[कल] LT',
  21727. nextWeek: 'dddd, LT',
  21728. lastDay: '[कल] LT',
  21729. lastWeek: '[पिछले] dddd, LT',
  21730. sameElse: 'L',
  21731. },
  21732. relativeTime: {
  21733. future: '%s में',
  21734. past: '%s पहले',
  21735. s: 'कुछ ही क्षण',
  21736. ss: '%d सेकंड',
  21737. m: 'एक मिनट',
  21738. mm: '%d मिनट',
  21739. h: 'एक घंटा',
  21740. hh: '%d घंटे',
  21741. d: 'एक दिन',
  21742. dd: '%d दिन',
  21743. M: 'एक महीने',
  21744. MM: '%d महीने',
  21745. y: 'एक वर्ष',
  21746. yy: '%d वर्ष',
  21747. },
  21748. preparse: function (string) {
  21749. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  21750. return numberMap[match];
  21751. });
  21752. },
  21753. postformat: function (string) {
  21754. return string.replace(/\d/g, function (match) {
  21755. return symbolMap[match];
  21756. });
  21757. },
  21758. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  21759. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  21760. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  21761. meridiemHour: function (hour, meridiem) {
  21762. if (hour === 12) {
  21763. hour = 0;
  21764. }
  21765. if (meridiem === 'रात') {
  21766. return hour < 4 ? hour : hour + 12;
  21767. } else if (meridiem === 'सुबह') {
  21768. return hour;
  21769. } else if (meridiem === 'दोपहर') {
  21770. return hour >= 10 ? hour : hour + 12;
  21771. } else if (meridiem === 'शाम') {
  21772. return hour + 12;
  21773. }
  21774. },
  21775. meridiem: function (hour, minute, isLower) {
  21776. if (hour < 4) {
  21777. return 'रात';
  21778. } else if (hour < 10) {
  21779. return 'सुबह';
  21780. } else if (hour < 17) {
  21781. return 'दोपहर';
  21782. } else if (hour < 20) {
  21783. return 'शाम';
  21784. } else {
  21785. return 'रात';
  21786. }
  21787. },
  21788. week: {
  21789. dow: 0, // Sunday is the first day of the week.
  21790. doy: 6, // The week that contains Jan 6th is the first week of the year.
  21791. },
  21792. });
  21793. return hi;
  21794. })));
  21795. /***/ }),
  21796. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hr.js":
  21797. /*!***************************************************************************!*\
  21798. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hr.js ***!
  21799. \***************************************************************************/
  21800. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21801. //! moment.js locale configuration
  21802. //! locale : Croatian [hr]
  21803. //! author : Bojan Marković : https://github.com/bmarkovic
  21804. ;(function (global, factory) {
  21805. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21806. 0
  21807. }(this, (function (moment) { 'use strict';
  21808. //! moment.js locale configuration
  21809. function translate(number, withoutSuffix, key) {
  21810. var result = number + ' ';
  21811. switch (key) {
  21812. case 'ss':
  21813. if (number === 1) {
  21814. result += 'sekunda';
  21815. } else if (number === 2 || number === 3 || number === 4) {
  21816. result += 'sekunde';
  21817. } else {
  21818. result += 'sekundi';
  21819. }
  21820. return result;
  21821. case 'm':
  21822. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  21823. case 'mm':
  21824. if (number === 1) {
  21825. result += 'minuta';
  21826. } else if (number === 2 || number === 3 || number === 4) {
  21827. result += 'minute';
  21828. } else {
  21829. result += 'minuta';
  21830. }
  21831. return result;
  21832. case 'h':
  21833. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  21834. case 'hh':
  21835. if (number === 1) {
  21836. result += 'sat';
  21837. } else if (number === 2 || number === 3 || number === 4) {
  21838. result += 'sata';
  21839. } else {
  21840. result += 'sati';
  21841. }
  21842. return result;
  21843. case 'dd':
  21844. if (number === 1) {
  21845. result += 'dan';
  21846. } else {
  21847. result += 'dana';
  21848. }
  21849. return result;
  21850. case 'MM':
  21851. if (number === 1) {
  21852. result += 'mjesec';
  21853. } else if (number === 2 || number === 3 || number === 4) {
  21854. result += 'mjeseca';
  21855. } else {
  21856. result += 'mjeseci';
  21857. }
  21858. return result;
  21859. case 'yy':
  21860. if (number === 1) {
  21861. result += 'godina';
  21862. } else if (number === 2 || number === 3 || number === 4) {
  21863. result += 'godine';
  21864. } else {
  21865. result += 'godina';
  21866. }
  21867. return result;
  21868. }
  21869. }
  21870. var hr = moment.defineLocale('hr', {
  21871. months: {
  21872. format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
  21873. '_'
  21874. ),
  21875. standalone:
  21876. 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
  21877. '_'
  21878. ),
  21879. },
  21880. monthsShort:
  21881. 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
  21882. '_'
  21883. ),
  21884. monthsParseExact: true,
  21885. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  21886. '_'
  21887. ),
  21888. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  21889. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  21890. weekdaysParseExact: true,
  21891. longDateFormat: {
  21892. LT: 'H:mm',
  21893. LTS: 'H:mm:ss',
  21894. L: 'DD.MM.YYYY',
  21895. LL: 'Do MMMM YYYY',
  21896. LLL: 'Do MMMM YYYY H:mm',
  21897. LLLL: 'dddd, Do MMMM YYYY H:mm',
  21898. },
  21899. calendar: {
  21900. sameDay: '[danas u] LT',
  21901. nextDay: '[sutra u] LT',
  21902. nextWeek: function () {
  21903. switch (this.day()) {
  21904. case 0:
  21905. return '[u] [nedjelju] [u] LT';
  21906. case 3:
  21907. return '[u] [srijedu] [u] LT';
  21908. case 6:
  21909. return '[u] [subotu] [u] LT';
  21910. case 1:
  21911. case 2:
  21912. case 4:
  21913. case 5:
  21914. return '[u] dddd [u] LT';
  21915. }
  21916. },
  21917. lastDay: '[jučer u] LT',
  21918. lastWeek: function () {
  21919. switch (this.day()) {
  21920. case 0:
  21921. return '[prošlu] [nedjelju] [u] LT';
  21922. case 3:
  21923. return '[prošlu] [srijedu] [u] LT';
  21924. case 6:
  21925. return '[prošle] [subote] [u] LT';
  21926. case 1:
  21927. case 2:
  21928. case 4:
  21929. case 5:
  21930. return '[prošli] dddd [u] LT';
  21931. }
  21932. },
  21933. sameElse: 'L',
  21934. },
  21935. relativeTime: {
  21936. future: 'za %s',
  21937. past: 'prije %s',
  21938. s: 'par sekundi',
  21939. ss: translate,
  21940. m: translate,
  21941. mm: translate,
  21942. h: translate,
  21943. hh: translate,
  21944. d: 'dan',
  21945. dd: translate,
  21946. M: 'mjesec',
  21947. MM: translate,
  21948. y: 'godinu',
  21949. yy: translate,
  21950. },
  21951. dayOfMonthOrdinalParse: /\d{1,2}\./,
  21952. ordinal: '%d.',
  21953. week: {
  21954. dow: 1, // Monday is the first day of the week.
  21955. doy: 7, // The week that contains Jan 7th is the first week of the year.
  21956. },
  21957. });
  21958. return hr;
  21959. })));
  21960. /***/ }),
  21961. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hu.js":
  21962. /*!***************************************************************************!*\
  21963. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hu.js ***!
  21964. \***************************************************************************/
  21965. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  21966. //! moment.js locale configuration
  21967. //! locale : Hungarian [hu]
  21968. //! author : Adam Brunner : https://github.com/adambrunner
  21969. //! author : Peter Viszt : https://github.com/passatgt
  21970. ;(function (global, factory) {
  21971. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  21972. 0
  21973. }(this, (function (moment) { 'use strict';
  21974. //! moment.js locale configuration
  21975. var weekEndings =
  21976. 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
  21977. function translate(number, withoutSuffix, key, isFuture) {
  21978. var num = number;
  21979. switch (key) {
  21980. case 's':
  21981. return isFuture || withoutSuffix
  21982. ? 'néhány másodperc'
  21983. : 'néhány másodperce';
  21984. case 'ss':
  21985. return num + (isFuture || withoutSuffix)
  21986. ? ' másodperc'
  21987. : ' másodperce';
  21988. case 'm':
  21989. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  21990. case 'mm':
  21991. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  21992. case 'h':
  21993. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  21994. case 'hh':
  21995. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  21996. case 'd':
  21997. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  21998. case 'dd':
  21999. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  22000. case 'M':
  22001. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  22002. case 'MM':
  22003. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  22004. case 'y':
  22005. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  22006. case 'yy':
  22007. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  22008. }
  22009. return '';
  22010. }
  22011. function week(isFuture) {
  22012. return (
  22013. (isFuture ? '' : '[múlt] ') +
  22014. '[' +
  22015. weekEndings[this.day()] +
  22016. '] LT[-kor]'
  22017. );
  22018. }
  22019. var hu = moment.defineLocale('hu', {
  22020. months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
  22021. '_'
  22022. ),
  22023. monthsShort:
  22024. 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
  22025. '_'
  22026. ),
  22027. monthsParseExact: true,
  22028. weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  22029. weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  22030. weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
  22031. longDateFormat: {
  22032. LT: 'H:mm',
  22033. LTS: 'H:mm:ss',
  22034. L: 'YYYY.MM.DD.',
  22035. LL: 'YYYY. MMMM D.',
  22036. LLL: 'YYYY. MMMM D. H:mm',
  22037. LLLL: 'YYYY. MMMM D., dddd H:mm',
  22038. },
  22039. meridiemParse: /de|du/i,
  22040. isPM: function (input) {
  22041. return input.charAt(1).toLowerCase() === 'u';
  22042. },
  22043. meridiem: function (hours, minutes, isLower) {
  22044. if (hours < 12) {
  22045. return isLower === true ? 'de' : 'DE';
  22046. } else {
  22047. return isLower === true ? 'du' : 'DU';
  22048. }
  22049. },
  22050. calendar: {
  22051. sameDay: '[ma] LT[-kor]',
  22052. nextDay: '[holnap] LT[-kor]',
  22053. nextWeek: function () {
  22054. return week.call(this, true);
  22055. },
  22056. lastDay: '[tegnap] LT[-kor]',
  22057. lastWeek: function () {
  22058. return week.call(this, false);
  22059. },
  22060. sameElse: 'L',
  22061. },
  22062. relativeTime: {
  22063. future: '%s múlva',
  22064. past: '%s',
  22065. s: translate,
  22066. ss: translate,
  22067. m: translate,
  22068. mm: translate,
  22069. h: translate,
  22070. hh: translate,
  22071. d: translate,
  22072. dd: translate,
  22073. M: translate,
  22074. MM: translate,
  22075. y: translate,
  22076. yy: translate,
  22077. },
  22078. dayOfMonthOrdinalParse: /\d{1,2}\./,
  22079. ordinal: '%d.',
  22080. week: {
  22081. dow: 1, // Monday is the first day of the week.
  22082. doy: 4, // The week that contains Jan 4th is the first week of the year.
  22083. },
  22084. });
  22085. return hu;
  22086. })));
  22087. /***/ }),
  22088. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hy-am.js":
  22089. /*!******************************************************************************!*\
  22090. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hy-am.js ***!
  22091. \******************************************************************************/
  22092. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22093. //! moment.js locale configuration
  22094. //! locale : Armenian [hy-am]
  22095. //! author : Armendarabyan : https://github.com/armendarabyan
  22096. ;(function (global, factory) {
  22097. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22098. 0
  22099. }(this, (function (moment) { 'use strict';
  22100. //! moment.js locale configuration
  22101. var hyAm = moment.defineLocale('hy-am', {
  22102. months: {
  22103. format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
  22104. '_'
  22105. ),
  22106. standalone:
  22107. 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
  22108. '_'
  22109. ),
  22110. },
  22111. monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
  22112. weekdays:
  22113. 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
  22114. '_'
  22115. ),
  22116. weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  22117. weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  22118. longDateFormat: {
  22119. LT: 'HH:mm',
  22120. LTS: 'HH:mm:ss',
  22121. L: 'DD.MM.YYYY',
  22122. LL: 'D MMMM YYYY թ.',
  22123. LLL: 'D MMMM YYYY թ., HH:mm',
  22124. LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
  22125. },
  22126. calendar: {
  22127. sameDay: '[այսօր] LT',
  22128. nextDay: '[վաղը] LT',
  22129. lastDay: '[երեկ] LT',
  22130. nextWeek: function () {
  22131. return 'dddd [օրը ժամը] LT';
  22132. },
  22133. lastWeek: function () {
  22134. return '[անցած] dddd [օրը ժամը] LT';
  22135. },
  22136. sameElse: 'L',
  22137. },
  22138. relativeTime: {
  22139. future: '%s հետո',
  22140. past: '%s առաջ',
  22141. s: 'մի քանի վայրկյան',
  22142. ss: '%d վայրկյան',
  22143. m: 'րոպե',
  22144. mm: '%d րոպե',
  22145. h: 'ժամ',
  22146. hh: '%d ժամ',
  22147. d: 'օր',
  22148. dd: '%d օր',
  22149. M: 'ամիս',
  22150. MM: '%d ամիս',
  22151. y: 'տարի',
  22152. yy: '%d տարի',
  22153. },
  22154. meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
  22155. isPM: function (input) {
  22156. return /^(ցերեկվա|երեկոյան)$/.test(input);
  22157. },
  22158. meridiem: function (hour) {
  22159. if (hour < 4) {
  22160. return 'գիշերվա';
  22161. } else if (hour < 12) {
  22162. return 'առավոտվա';
  22163. } else if (hour < 17) {
  22164. return 'ցերեկվա';
  22165. } else {
  22166. return 'երեկոյան';
  22167. }
  22168. },
  22169. dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
  22170. ordinal: function (number, period) {
  22171. switch (period) {
  22172. case 'DDD':
  22173. case 'w':
  22174. case 'W':
  22175. case 'DDDo':
  22176. if (number === 1) {
  22177. return number + '-ին';
  22178. }
  22179. return number + '-րդ';
  22180. default:
  22181. return number;
  22182. }
  22183. },
  22184. week: {
  22185. dow: 1, // Monday is the first day of the week.
  22186. doy: 7, // The week that contains Jan 7th is the first week of the year.
  22187. },
  22188. });
  22189. return hyAm;
  22190. })));
  22191. /***/ }),
  22192. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/id.js":
  22193. /*!***************************************************************************!*\
  22194. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/id.js ***!
  22195. \***************************************************************************/
  22196. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22197. //! moment.js locale configuration
  22198. //! locale : Indonesian [id]
  22199. //! author : Mohammad Satrio Utomo : https://github.com/tyok
  22200. //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
  22201. ;(function (global, factory) {
  22202. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22203. 0
  22204. }(this, (function (moment) { 'use strict';
  22205. //! moment.js locale configuration
  22206. var id = moment.defineLocale('id', {
  22207. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
  22208. '_'
  22209. ),
  22210. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
  22211. weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  22212. weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  22213. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  22214. longDateFormat: {
  22215. LT: 'HH.mm',
  22216. LTS: 'HH.mm.ss',
  22217. L: 'DD/MM/YYYY',
  22218. LL: 'D MMMM YYYY',
  22219. LLL: 'D MMMM YYYY [pukul] HH.mm',
  22220. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  22221. },
  22222. meridiemParse: /pagi|siang|sore|malam/,
  22223. meridiemHour: function (hour, meridiem) {
  22224. if (hour === 12) {
  22225. hour = 0;
  22226. }
  22227. if (meridiem === 'pagi') {
  22228. return hour;
  22229. } else if (meridiem === 'siang') {
  22230. return hour >= 11 ? hour : hour + 12;
  22231. } else if (meridiem === 'sore' || meridiem === 'malam') {
  22232. return hour + 12;
  22233. }
  22234. },
  22235. meridiem: function (hours, minutes, isLower) {
  22236. if (hours < 11) {
  22237. return 'pagi';
  22238. } else if (hours < 15) {
  22239. return 'siang';
  22240. } else if (hours < 19) {
  22241. return 'sore';
  22242. } else {
  22243. return 'malam';
  22244. }
  22245. },
  22246. calendar: {
  22247. sameDay: '[Hari ini pukul] LT',
  22248. nextDay: '[Besok pukul] LT',
  22249. nextWeek: 'dddd [pukul] LT',
  22250. lastDay: '[Kemarin pukul] LT',
  22251. lastWeek: 'dddd [lalu pukul] LT',
  22252. sameElse: 'L',
  22253. },
  22254. relativeTime: {
  22255. future: 'dalam %s',
  22256. past: '%s yang lalu',
  22257. s: 'beberapa detik',
  22258. ss: '%d detik',
  22259. m: 'semenit',
  22260. mm: '%d menit',
  22261. h: 'sejam',
  22262. hh: '%d jam',
  22263. d: 'sehari',
  22264. dd: '%d hari',
  22265. M: 'sebulan',
  22266. MM: '%d bulan',
  22267. y: 'setahun',
  22268. yy: '%d tahun',
  22269. },
  22270. week: {
  22271. dow: 0, // Sunday is the first day of the week.
  22272. doy: 6, // The week that contains Jan 6th is the first week of the year.
  22273. },
  22274. });
  22275. return id;
  22276. })));
  22277. /***/ }),
  22278. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/is.js":
  22279. /*!***************************************************************************!*\
  22280. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/is.js ***!
  22281. \***************************************************************************/
  22282. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22283. //! moment.js locale configuration
  22284. //! locale : Icelandic [is]
  22285. //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
  22286. ;(function (global, factory) {
  22287. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22288. 0
  22289. }(this, (function (moment) { 'use strict';
  22290. //! moment.js locale configuration
  22291. function plural(n) {
  22292. if (n % 100 === 11) {
  22293. return true;
  22294. } else if (n % 10 === 1) {
  22295. return false;
  22296. }
  22297. return true;
  22298. }
  22299. function translate(number, withoutSuffix, key, isFuture) {
  22300. var result = number + ' ';
  22301. switch (key) {
  22302. case 's':
  22303. return withoutSuffix || isFuture
  22304. ? 'nokkrar sekúndur'
  22305. : 'nokkrum sekúndum';
  22306. case 'ss':
  22307. if (plural(number)) {
  22308. return (
  22309. result +
  22310. (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
  22311. );
  22312. }
  22313. return result + 'sekúnda';
  22314. case 'm':
  22315. return withoutSuffix ? 'mínúta' : 'mínútu';
  22316. case 'mm':
  22317. if (plural(number)) {
  22318. return (
  22319. result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
  22320. );
  22321. } else if (withoutSuffix) {
  22322. return result + 'mínúta';
  22323. }
  22324. return result + 'mínútu';
  22325. case 'hh':
  22326. if (plural(number)) {
  22327. return (
  22328. result +
  22329. (withoutSuffix || isFuture
  22330. ? 'klukkustundir'
  22331. : 'klukkustundum')
  22332. );
  22333. }
  22334. return result + 'klukkustund';
  22335. case 'd':
  22336. if (withoutSuffix) {
  22337. return 'dagur';
  22338. }
  22339. return isFuture ? 'dag' : 'degi';
  22340. case 'dd':
  22341. if (plural(number)) {
  22342. if (withoutSuffix) {
  22343. return result + 'dagar';
  22344. }
  22345. return result + (isFuture ? 'daga' : 'dögum');
  22346. } else if (withoutSuffix) {
  22347. return result + 'dagur';
  22348. }
  22349. return result + (isFuture ? 'dag' : 'degi');
  22350. case 'M':
  22351. if (withoutSuffix) {
  22352. return 'mánuður';
  22353. }
  22354. return isFuture ? 'mánuð' : 'mánuði';
  22355. case 'MM':
  22356. if (plural(number)) {
  22357. if (withoutSuffix) {
  22358. return result + 'mánuðir';
  22359. }
  22360. return result + (isFuture ? 'mánuði' : 'mánuðum');
  22361. } else if (withoutSuffix) {
  22362. return result + 'mánuður';
  22363. }
  22364. return result + (isFuture ? 'mánuð' : 'mánuði');
  22365. case 'y':
  22366. return withoutSuffix || isFuture ? 'ár' : 'ári';
  22367. case 'yy':
  22368. if (plural(number)) {
  22369. return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  22370. }
  22371. return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  22372. }
  22373. }
  22374. var is = moment.defineLocale('is', {
  22375. months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
  22376. '_'
  22377. ),
  22378. monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  22379. weekdays:
  22380. 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
  22381. '_'
  22382. ),
  22383. weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  22384. weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  22385. longDateFormat: {
  22386. LT: 'H:mm',
  22387. LTS: 'H:mm:ss',
  22388. L: 'DD.MM.YYYY',
  22389. LL: 'D. MMMM YYYY',
  22390. LLL: 'D. MMMM YYYY [kl.] H:mm',
  22391. LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
  22392. },
  22393. calendar: {
  22394. sameDay: '[í dag kl.] LT',
  22395. nextDay: '[á morgun kl.] LT',
  22396. nextWeek: 'dddd [kl.] LT',
  22397. lastDay: '[í gær kl.] LT',
  22398. lastWeek: '[síðasta] dddd [kl.] LT',
  22399. sameElse: 'L',
  22400. },
  22401. relativeTime: {
  22402. future: 'eftir %s',
  22403. past: 'fyrir %s síðan',
  22404. s: translate,
  22405. ss: translate,
  22406. m: translate,
  22407. mm: translate,
  22408. h: 'klukkustund',
  22409. hh: translate,
  22410. d: translate,
  22411. dd: translate,
  22412. M: translate,
  22413. MM: translate,
  22414. y: translate,
  22415. yy: translate,
  22416. },
  22417. dayOfMonthOrdinalParse: /\d{1,2}\./,
  22418. ordinal: '%d.',
  22419. week: {
  22420. dow: 1, // Monday is the first day of the week.
  22421. doy: 4, // The week that contains Jan 4th is the first week of the year.
  22422. },
  22423. });
  22424. return is;
  22425. })));
  22426. /***/ }),
  22427. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it-ch.js":
  22428. /*!******************************************************************************!*\
  22429. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it-ch.js ***!
  22430. \******************************************************************************/
  22431. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22432. //! moment.js locale configuration
  22433. //! locale : Italian (Switzerland) [it-ch]
  22434. //! author : xfh : https://github.com/xfh
  22435. ;(function (global, factory) {
  22436. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22437. 0
  22438. }(this, (function (moment) { 'use strict';
  22439. //! moment.js locale configuration
  22440. var itCh = moment.defineLocale('it-ch', {
  22441. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  22442. '_'
  22443. ),
  22444. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  22445. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  22446. '_'
  22447. ),
  22448. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  22449. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  22450. longDateFormat: {
  22451. LT: 'HH:mm',
  22452. LTS: 'HH:mm:ss',
  22453. L: 'DD.MM.YYYY',
  22454. LL: 'D MMMM YYYY',
  22455. LLL: 'D MMMM YYYY HH:mm',
  22456. LLLL: 'dddd D MMMM YYYY HH:mm',
  22457. },
  22458. calendar: {
  22459. sameDay: '[Oggi alle] LT',
  22460. nextDay: '[Domani alle] LT',
  22461. nextWeek: 'dddd [alle] LT',
  22462. lastDay: '[Ieri alle] LT',
  22463. lastWeek: function () {
  22464. switch (this.day()) {
  22465. case 0:
  22466. return '[la scorsa] dddd [alle] LT';
  22467. default:
  22468. return '[lo scorso] dddd [alle] LT';
  22469. }
  22470. },
  22471. sameElse: 'L',
  22472. },
  22473. relativeTime: {
  22474. future: function (s) {
  22475. return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
  22476. },
  22477. past: '%s fa',
  22478. s: 'alcuni secondi',
  22479. ss: '%d secondi',
  22480. m: 'un minuto',
  22481. mm: '%d minuti',
  22482. h: "un'ora",
  22483. hh: '%d ore',
  22484. d: 'un giorno',
  22485. dd: '%d giorni',
  22486. M: 'un mese',
  22487. MM: '%d mesi',
  22488. y: 'un anno',
  22489. yy: '%d anni',
  22490. },
  22491. dayOfMonthOrdinalParse: /\d{1,2}º/,
  22492. ordinal: '%dº',
  22493. week: {
  22494. dow: 1, // Monday is the first day of the week.
  22495. doy: 4, // The week that contains Jan 4th is the first week of the year.
  22496. },
  22497. });
  22498. return itCh;
  22499. })));
  22500. /***/ }),
  22501. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it.js":
  22502. /*!***************************************************************************!*\
  22503. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it.js ***!
  22504. \***************************************************************************/
  22505. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22506. //! moment.js locale configuration
  22507. //! locale : Italian [it]
  22508. //! author : Lorenzo : https://github.com/aliem
  22509. //! author: Mattia Larentis: https://github.com/nostalgiaz
  22510. //! author: Marco : https://github.com/Manfre98
  22511. ;(function (global, factory) {
  22512. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22513. 0
  22514. }(this, (function (moment) { 'use strict';
  22515. //! moment.js locale configuration
  22516. var it = moment.defineLocale('it', {
  22517. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  22518. '_'
  22519. ),
  22520. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  22521. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  22522. '_'
  22523. ),
  22524. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  22525. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  22526. longDateFormat: {
  22527. LT: 'HH:mm',
  22528. LTS: 'HH:mm:ss',
  22529. L: 'DD/MM/YYYY',
  22530. LL: 'D MMMM YYYY',
  22531. LLL: 'D MMMM YYYY HH:mm',
  22532. LLLL: 'dddd D MMMM YYYY HH:mm',
  22533. },
  22534. calendar: {
  22535. sameDay: function () {
  22536. return (
  22537. '[Oggi a' +
  22538. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  22539. ']LT'
  22540. );
  22541. },
  22542. nextDay: function () {
  22543. return (
  22544. '[Domani a' +
  22545. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  22546. ']LT'
  22547. );
  22548. },
  22549. nextWeek: function () {
  22550. return (
  22551. 'dddd [a' +
  22552. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  22553. ']LT'
  22554. );
  22555. },
  22556. lastDay: function () {
  22557. return (
  22558. '[Ieri a' +
  22559. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  22560. ']LT'
  22561. );
  22562. },
  22563. lastWeek: function () {
  22564. switch (this.day()) {
  22565. case 0:
  22566. return (
  22567. '[La scorsa] dddd [a' +
  22568. (this.hours() > 1
  22569. ? 'lle '
  22570. : this.hours() === 0
  22571. ? ' '
  22572. : "ll'") +
  22573. ']LT'
  22574. );
  22575. default:
  22576. return (
  22577. '[Lo scorso] dddd [a' +
  22578. (this.hours() > 1
  22579. ? 'lle '
  22580. : this.hours() === 0
  22581. ? ' '
  22582. : "ll'") +
  22583. ']LT'
  22584. );
  22585. }
  22586. },
  22587. sameElse: 'L',
  22588. },
  22589. relativeTime: {
  22590. future: 'tra %s',
  22591. past: '%s fa',
  22592. s: 'alcuni secondi',
  22593. ss: '%d secondi',
  22594. m: 'un minuto',
  22595. mm: '%d minuti',
  22596. h: "un'ora",
  22597. hh: '%d ore',
  22598. d: 'un giorno',
  22599. dd: '%d giorni',
  22600. w: 'una settimana',
  22601. ww: '%d settimane',
  22602. M: 'un mese',
  22603. MM: '%d mesi',
  22604. y: 'un anno',
  22605. yy: '%d anni',
  22606. },
  22607. dayOfMonthOrdinalParse: /\d{1,2}º/,
  22608. ordinal: '%dº',
  22609. week: {
  22610. dow: 1, // Monday is the first day of the week.
  22611. doy: 4, // The week that contains Jan 4th is the first week of the year.
  22612. },
  22613. });
  22614. return it;
  22615. })));
  22616. /***/ }),
  22617. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ja.js":
  22618. /*!***************************************************************************!*\
  22619. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ja.js ***!
  22620. \***************************************************************************/
  22621. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22622. //! moment.js locale configuration
  22623. //! locale : Japanese [ja]
  22624. //! author : LI Long : https://github.com/baryon
  22625. ;(function (global, factory) {
  22626. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22627. 0
  22628. }(this, (function (moment) { 'use strict';
  22629. //! moment.js locale configuration
  22630. var ja = moment.defineLocale('ja', {
  22631. eras: [
  22632. {
  22633. since: '2019-05-01',
  22634. offset: 1,
  22635. name: '令和',
  22636. narrow: '㋿',
  22637. abbr: 'R',
  22638. },
  22639. {
  22640. since: '1989-01-08',
  22641. until: '2019-04-30',
  22642. offset: 1,
  22643. name: '平成',
  22644. narrow: '㍻',
  22645. abbr: 'H',
  22646. },
  22647. {
  22648. since: '1926-12-25',
  22649. until: '1989-01-07',
  22650. offset: 1,
  22651. name: '昭和',
  22652. narrow: '㍼',
  22653. abbr: 'S',
  22654. },
  22655. {
  22656. since: '1912-07-30',
  22657. until: '1926-12-24',
  22658. offset: 1,
  22659. name: '大正',
  22660. narrow: '㍽',
  22661. abbr: 'T',
  22662. },
  22663. {
  22664. since: '1873-01-01',
  22665. until: '1912-07-29',
  22666. offset: 6,
  22667. name: '明治',
  22668. narrow: '㍾',
  22669. abbr: 'M',
  22670. },
  22671. {
  22672. since: '0001-01-01',
  22673. until: '1873-12-31',
  22674. offset: 1,
  22675. name: '西暦',
  22676. narrow: 'AD',
  22677. abbr: 'AD',
  22678. },
  22679. {
  22680. since: '0000-12-31',
  22681. until: -Infinity,
  22682. offset: 1,
  22683. name: '紀元前',
  22684. narrow: 'BC',
  22685. abbr: 'BC',
  22686. },
  22687. ],
  22688. eraYearOrdinalRegex: /(元|\d+)年/,
  22689. eraYearOrdinalParse: function (input, match) {
  22690. return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
  22691. },
  22692. months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  22693. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  22694. '_'
  22695. ),
  22696. weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  22697. weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
  22698. weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
  22699. longDateFormat: {
  22700. LT: 'HH:mm',
  22701. LTS: 'HH:mm:ss',
  22702. L: 'YYYY/MM/DD',
  22703. LL: 'YYYY年M月D日',
  22704. LLL: 'YYYY年M月D日 HH:mm',
  22705. LLLL: 'YYYY年M月D日 dddd HH:mm',
  22706. l: 'YYYY/MM/DD',
  22707. ll: 'YYYY年M月D日',
  22708. lll: 'YYYY年M月D日 HH:mm',
  22709. llll: 'YYYY年M月D日(ddd) HH:mm',
  22710. },
  22711. meridiemParse: /午前|午後/i,
  22712. isPM: function (input) {
  22713. return input === '午後';
  22714. },
  22715. meridiem: function (hour, minute, isLower) {
  22716. if (hour < 12) {
  22717. return '午前';
  22718. } else {
  22719. return '午後';
  22720. }
  22721. },
  22722. calendar: {
  22723. sameDay: '[今日] LT',
  22724. nextDay: '[明日] LT',
  22725. nextWeek: function (now) {
  22726. if (now.week() !== this.week()) {
  22727. return '[来週]dddd LT';
  22728. } else {
  22729. return 'dddd LT';
  22730. }
  22731. },
  22732. lastDay: '[昨日] LT',
  22733. lastWeek: function (now) {
  22734. if (this.week() !== now.week()) {
  22735. return '[先週]dddd LT';
  22736. } else {
  22737. return 'dddd LT';
  22738. }
  22739. },
  22740. sameElse: 'L',
  22741. },
  22742. dayOfMonthOrdinalParse: /\d{1,2}日/,
  22743. ordinal: function (number, period) {
  22744. switch (period) {
  22745. case 'y':
  22746. return number === 1 ? '元年' : number + '年';
  22747. case 'd':
  22748. case 'D':
  22749. case 'DDD':
  22750. return number + '日';
  22751. default:
  22752. return number;
  22753. }
  22754. },
  22755. relativeTime: {
  22756. future: '%s後',
  22757. past: '%s前',
  22758. s: '数秒',
  22759. ss: '%d秒',
  22760. m: '1分',
  22761. mm: '%d分',
  22762. h: '1時間',
  22763. hh: '%d時間',
  22764. d: '1日',
  22765. dd: '%d日',
  22766. M: '1ヶ月',
  22767. MM: '%dヶ月',
  22768. y: '1年',
  22769. yy: '%d年',
  22770. },
  22771. });
  22772. return ja;
  22773. })));
  22774. /***/ }),
  22775. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/jv.js":
  22776. /*!***************************************************************************!*\
  22777. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/jv.js ***!
  22778. \***************************************************************************/
  22779. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22780. //! moment.js locale configuration
  22781. //! locale : Javanese [jv]
  22782. //! author : Rony Lantip : https://github.com/lantip
  22783. //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
  22784. ;(function (global, factory) {
  22785. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22786. 0
  22787. }(this, (function (moment) { 'use strict';
  22788. //! moment.js locale configuration
  22789. var jv = moment.defineLocale('jv', {
  22790. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
  22791. '_'
  22792. ),
  22793. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
  22794. weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
  22795. weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
  22796. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
  22797. longDateFormat: {
  22798. LT: 'HH.mm',
  22799. LTS: 'HH.mm.ss',
  22800. L: 'DD/MM/YYYY',
  22801. LL: 'D MMMM YYYY',
  22802. LLL: 'D MMMM YYYY [pukul] HH.mm',
  22803. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  22804. },
  22805. meridiemParse: /enjing|siyang|sonten|ndalu/,
  22806. meridiemHour: function (hour, meridiem) {
  22807. if (hour === 12) {
  22808. hour = 0;
  22809. }
  22810. if (meridiem === 'enjing') {
  22811. return hour;
  22812. } else if (meridiem === 'siyang') {
  22813. return hour >= 11 ? hour : hour + 12;
  22814. } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
  22815. return hour + 12;
  22816. }
  22817. },
  22818. meridiem: function (hours, minutes, isLower) {
  22819. if (hours < 11) {
  22820. return 'enjing';
  22821. } else if (hours < 15) {
  22822. return 'siyang';
  22823. } else if (hours < 19) {
  22824. return 'sonten';
  22825. } else {
  22826. return 'ndalu';
  22827. }
  22828. },
  22829. calendar: {
  22830. sameDay: '[Dinten puniko pukul] LT',
  22831. nextDay: '[Mbenjang pukul] LT',
  22832. nextWeek: 'dddd [pukul] LT',
  22833. lastDay: '[Kala wingi pukul] LT',
  22834. lastWeek: 'dddd [kepengker pukul] LT',
  22835. sameElse: 'L',
  22836. },
  22837. relativeTime: {
  22838. future: 'wonten ing %s',
  22839. past: '%s ingkang kepengker',
  22840. s: 'sawetawis detik',
  22841. ss: '%d detik',
  22842. m: 'setunggal menit',
  22843. mm: '%d menit',
  22844. h: 'setunggal jam',
  22845. hh: '%d jam',
  22846. d: 'sedinten',
  22847. dd: '%d dinten',
  22848. M: 'sewulan',
  22849. MM: '%d wulan',
  22850. y: 'setaun',
  22851. yy: '%d taun',
  22852. },
  22853. week: {
  22854. dow: 1, // Monday is the first day of the week.
  22855. doy: 7, // The week that contains Jan 7th is the first week of the year.
  22856. },
  22857. });
  22858. return jv;
  22859. })));
  22860. /***/ }),
  22861. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ka.js":
  22862. /*!***************************************************************************!*\
  22863. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ka.js ***!
  22864. \***************************************************************************/
  22865. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22866. //! moment.js locale configuration
  22867. //! locale : Georgian [ka]
  22868. //! author : Irakli Janiashvili : https://github.com/IrakliJani
  22869. ;(function (global, factory) {
  22870. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22871. 0
  22872. }(this, (function (moment) { 'use strict';
  22873. //! moment.js locale configuration
  22874. var ka = moment.defineLocale('ka', {
  22875. months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
  22876. '_'
  22877. ),
  22878. monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
  22879. weekdays: {
  22880. standalone:
  22881. 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
  22882. '_'
  22883. ),
  22884. format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
  22885. '_'
  22886. ),
  22887. isFormat: /(წინა|შემდეგ)/,
  22888. },
  22889. weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
  22890. weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
  22891. longDateFormat: {
  22892. LT: 'HH:mm',
  22893. LTS: 'HH:mm:ss',
  22894. L: 'DD/MM/YYYY',
  22895. LL: 'D MMMM YYYY',
  22896. LLL: 'D MMMM YYYY HH:mm',
  22897. LLLL: 'dddd, D MMMM YYYY HH:mm',
  22898. },
  22899. calendar: {
  22900. sameDay: '[დღეს] LT[-ზე]',
  22901. nextDay: '[ხვალ] LT[-ზე]',
  22902. lastDay: '[გუშინ] LT[-ზე]',
  22903. nextWeek: '[შემდეგ] dddd LT[-ზე]',
  22904. lastWeek: '[წინა] dddd LT-ზე',
  22905. sameElse: 'L',
  22906. },
  22907. relativeTime: {
  22908. future: function (s) {
  22909. return s.replace(
  22910. /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
  22911. function ($0, $1, $2) {
  22912. return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
  22913. }
  22914. );
  22915. },
  22916. past: function (s) {
  22917. if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
  22918. return s.replace(/(ი|ე)$/, 'ის წინ');
  22919. }
  22920. if (/წელი/.test(s)) {
  22921. return s.replace(/წელი$/, 'წლის წინ');
  22922. }
  22923. return s;
  22924. },
  22925. s: 'რამდენიმე წამი',
  22926. ss: '%d წამი',
  22927. m: 'წუთი',
  22928. mm: '%d წუთი',
  22929. h: 'საათი',
  22930. hh: '%d საათი',
  22931. d: 'დღე',
  22932. dd: '%d დღე',
  22933. M: 'თვე',
  22934. MM: '%d თვე',
  22935. y: 'წელი',
  22936. yy: '%d წელი',
  22937. },
  22938. dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
  22939. ordinal: function (number) {
  22940. if (number === 0) {
  22941. return number;
  22942. }
  22943. if (number === 1) {
  22944. return number + '-ლი';
  22945. }
  22946. if (
  22947. number < 20 ||
  22948. (number <= 100 && number % 20 === 0) ||
  22949. number % 100 === 0
  22950. ) {
  22951. return 'მე-' + number;
  22952. }
  22953. return number + '-ე';
  22954. },
  22955. week: {
  22956. dow: 1,
  22957. doy: 7,
  22958. },
  22959. });
  22960. return ka;
  22961. })));
  22962. /***/ }),
  22963. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kk.js":
  22964. /*!***************************************************************************!*\
  22965. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kk.js ***!
  22966. \***************************************************************************/
  22967. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  22968. //! moment.js locale configuration
  22969. //! locale : Kazakh [kk]
  22970. //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
  22971. ;(function (global, factory) {
  22972. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  22973. 0
  22974. }(this, (function (moment) { 'use strict';
  22975. //! moment.js locale configuration
  22976. var suffixes = {
  22977. 0: '-ші',
  22978. 1: '-ші',
  22979. 2: '-ші',
  22980. 3: '-ші',
  22981. 4: '-ші',
  22982. 5: '-ші',
  22983. 6: '-шы',
  22984. 7: '-ші',
  22985. 8: '-ші',
  22986. 9: '-шы',
  22987. 10: '-шы',
  22988. 20: '-шы',
  22989. 30: '-шы',
  22990. 40: '-шы',
  22991. 50: '-ші',
  22992. 60: '-шы',
  22993. 70: '-ші',
  22994. 80: '-ші',
  22995. 90: '-шы',
  22996. 100: '-ші',
  22997. };
  22998. var kk = moment.defineLocale('kk', {
  22999. months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
  23000. '_'
  23001. ),
  23002. monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
  23003. weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
  23004. '_'
  23005. ),
  23006. weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
  23007. weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
  23008. longDateFormat: {
  23009. LT: 'HH:mm',
  23010. LTS: 'HH:mm:ss',
  23011. L: 'DD.MM.YYYY',
  23012. LL: 'D MMMM YYYY',
  23013. LLL: 'D MMMM YYYY HH:mm',
  23014. LLLL: 'dddd, D MMMM YYYY HH:mm',
  23015. },
  23016. calendar: {
  23017. sameDay: '[Бүгін сағат] LT',
  23018. nextDay: '[Ертең сағат] LT',
  23019. nextWeek: 'dddd [сағат] LT',
  23020. lastDay: '[Кеше сағат] LT',
  23021. lastWeek: '[Өткен аптаның] dddd [сағат] LT',
  23022. sameElse: 'L',
  23023. },
  23024. relativeTime: {
  23025. future: '%s ішінде',
  23026. past: '%s бұрын',
  23027. s: 'бірнеше секунд',
  23028. ss: '%d секунд',
  23029. m: 'бір минут',
  23030. mm: '%d минут',
  23031. h: 'бір сағат',
  23032. hh: '%d сағат',
  23033. d: 'бір күн',
  23034. dd: '%d күн',
  23035. M: 'бір ай',
  23036. MM: '%d ай',
  23037. y: 'бір жыл',
  23038. yy: '%d жыл',
  23039. },
  23040. dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
  23041. ordinal: function (number) {
  23042. var a = number % 10,
  23043. b = number >= 100 ? 100 : null;
  23044. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  23045. },
  23046. week: {
  23047. dow: 1, // Monday is the first day of the week.
  23048. doy: 7, // The week that contains Jan 7th is the first week of the year.
  23049. },
  23050. });
  23051. return kk;
  23052. })));
  23053. /***/ }),
  23054. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/km.js":
  23055. /*!***************************************************************************!*\
  23056. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/km.js ***!
  23057. \***************************************************************************/
  23058. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23059. //! moment.js locale configuration
  23060. //! locale : Cambodian [km]
  23061. //! author : Kruy Vanna : https://github.com/kruyvanna
  23062. ;(function (global, factory) {
  23063. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23064. 0
  23065. }(this, (function (moment) { 'use strict';
  23066. //! moment.js locale configuration
  23067. var symbolMap = {
  23068. 1: '១',
  23069. 2: '២',
  23070. 3: '៣',
  23071. 4: '៤',
  23072. 5: '៥',
  23073. 6: '៦',
  23074. 7: '៧',
  23075. 8: '៨',
  23076. 9: '៩',
  23077. 0: '០',
  23078. },
  23079. numberMap = {
  23080. '១': '1',
  23081. '២': '2',
  23082. '៣': '3',
  23083. '៤': '4',
  23084. '៥': '5',
  23085. '៦': '6',
  23086. '៧': '7',
  23087. '៨': '8',
  23088. '៩': '9',
  23089. '០': '0',
  23090. };
  23091. var km = moment.defineLocale('km', {
  23092. months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
  23093. '_'
  23094. ),
  23095. monthsShort:
  23096. 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
  23097. '_'
  23098. ),
  23099. weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  23100. weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
  23101. weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
  23102. weekdaysParseExact: true,
  23103. longDateFormat: {
  23104. LT: 'HH:mm',
  23105. LTS: 'HH:mm:ss',
  23106. L: 'DD/MM/YYYY',
  23107. LL: 'D MMMM YYYY',
  23108. LLL: 'D MMMM YYYY HH:mm',
  23109. LLLL: 'dddd, D MMMM YYYY HH:mm',
  23110. },
  23111. meridiemParse: /ព្រឹក|ល្ងាច/,
  23112. isPM: function (input) {
  23113. return input === 'ល្ងាច';
  23114. },
  23115. meridiem: function (hour, minute, isLower) {
  23116. if (hour < 12) {
  23117. return 'ព្រឹក';
  23118. } else {
  23119. return 'ល្ងាច';
  23120. }
  23121. },
  23122. calendar: {
  23123. sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
  23124. nextDay: '[ស្អែក ម៉ោង] LT',
  23125. nextWeek: 'dddd [ម៉ោង] LT',
  23126. lastDay: '[ម្សិលមិញ ម៉ោង] LT',
  23127. lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
  23128. sameElse: 'L',
  23129. },
  23130. relativeTime: {
  23131. future: '%sទៀត',
  23132. past: '%sមុន',
  23133. s: 'ប៉ុន្មានវិនាទី',
  23134. ss: '%d វិនាទី',
  23135. m: 'មួយនាទី',
  23136. mm: '%d នាទី',
  23137. h: 'មួយម៉ោង',
  23138. hh: '%d ម៉ោង',
  23139. d: 'មួយថ្ងៃ',
  23140. dd: '%d ថ្ងៃ',
  23141. M: 'មួយខែ',
  23142. MM: '%d ខែ',
  23143. y: 'មួយឆ្នាំ',
  23144. yy: '%d ឆ្នាំ',
  23145. },
  23146. dayOfMonthOrdinalParse: /ទី\d{1,2}/,
  23147. ordinal: 'ទី%d',
  23148. preparse: function (string) {
  23149. return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
  23150. return numberMap[match];
  23151. });
  23152. },
  23153. postformat: function (string) {
  23154. return string.replace(/\d/g, function (match) {
  23155. return symbolMap[match];
  23156. });
  23157. },
  23158. week: {
  23159. dow: 1, // Monday is the first day of the week.
  23160. doy: 4, // The week that contains Jan 4th is the first week of the year.
  23161. },
  23162. });
  23163. return km;
  23164. })));
  23165. /***/ }),
  23166. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kn.js":
  23167. /*!***************************************************************************!*\
  23168. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kn.js ***!
  23169. \***************************************************************************/
  23170. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23171. //! moment.js locale configuration
  23172. //! locale : Kannada [kn]
  23173. //! author : Rajeev Naik : https://github.com/rajeevnaikte
  23174. ;(function (global, factory) {
  23175. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23176. 0
  23177. }(this, (function (moment) { 'use strict';
  23178. //! moment.js locale configuration
  23179. var symbolMap = {
  23180. 1: '೧',
  23181. 2: '೨',
  23182. 3: '೩',
  23183. 4: '೪',
  23184. 5: '೫',
  23185. 6: '೬',
  23186. 7: '೭',
  23187. 8: '೮',
  23188. 9: '೯',
  23189. 0: '೦',
  23190. },
  23191. numberMap = {
  23192. '೧': '1',
  23193. '೨': '2',
  23194. '೩': '3',
  23195. '೪': '4',
  23196. '೫': '5',
  23197. '೬': '6',
  23198. '೭': '7',
  23199. '೮': '8',
  23200. '೯': '9',
  23201. '೦': '0',
  23202. };
  23203. var kn = moment.defineLocale('kn', {
  23204. months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
  23205. '_'
  23206. ),
  23207. monthsShort:
  23208. 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
  23209. '_'
  23210. ),
  23211. monthsParseExact: true,
  23212. weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
  23213. '_'
  23214. ),
  23215. weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
  23216. weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
  23217. longDateFormat: {
  23218. LT: 'A h:mm',
  23219. LTS: 'A h:mm:ss',
  23220. L: 'DD/MM/YYYY',
  23221. LL: 'D MMMM YYYY',
  23222. LLL: 'D MMMM YYYY, A h:mm',
  23223. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  23224. },
  23225. calendar: {
  23226. sameDay: '[ಇಂದು] LT',
  23227. nextDay: '[ನಾಳೆ] LT',
  23228. nextWeek: 'dddd, LT',
  23229. lastDay: '[ನಿನ್ನೆ] LT',
  23230. lastWeek: '[ಕೊನೆಯ] dddd, LT',
  23231. sameElse: 'L',
  23232. },
  23233. relativeTime: {
  23234. future: '%s ನಂತರ',
  23235. past: '%s ಹಿಂದೆ',
  23236. s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
  23237. ss: '%d ಸೆಕೆಂಡುಗಳು',
  23238. m: 'ಒಂದು ನಿಮಿಷ',
  23239. mm: '%d ನಿಮಿಷ',
  23240. h: 'ಒಂದು ಗಂಟೆ',
  23241. hh: '%d ಗಂಟೆ',
  23242. d: 'ಒಂದು ದಿನ',
  23243. dd: '%d ದಿನ',
  23244. M: 'ಒಂದು ತಿಂಗಳು',
  23245. MM: '%d ತಿಂಗಳು',
  23246. y: 'ಒಂದು ವರ್ಷ',
  23247. yy: '%d ವರ್ಷ',
  23248. },
  23249. preparse: function (string) {
  23250. return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
  23251. return numberMap[match];
  23252. });
  23253. },
  23254. postformat: function (string) {
  23255. return string.replace(/\d/g, function (match) {
  23256. return symbolMap[match];
  23257. });
  23258. },
  23259. meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
  23260. meridiemHour: function (hour, meridiem) {
  23261. if (hour === 12) {
  23262. hour = 0;
  23263. }
  23264. if (meridiem === 'ರಾತ್ರಿ') {
  23265. return hour < 4 ? hour : hour + 12;
  23266. } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
  23267. return hour;
  23268. } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
  23269. return hour >= 10 ? hour : hour + 12;
  23270. } else if (meridiem === 'ಸಂಜೆ') {
  23271. return hour + 12;
  23272. }
  23273. },
  23274. meridiem: function (hour, minute, isLower) {
  23275. if (hour < 4) {
  23276. return 'ರಾತ್ರಿ';
  23277. } else if (hour < 10) {
  23278. return 'ಬೆಳಿಗ್ಗೆ';
  23279. } else if (hour < 17) {
  23280. return 'ಮಧ್ಯಾಹ್ನ';
  23281. } else if (hour < 20) {
  23282. return 'ಸಂಜೆ';
  23283. } else {
  23284. return 'ರಾತ್ರಿ';
  23285. }
  23286. },
  23287. dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
  23288. ordinal: function (number) {
  23289. return number + 'ನೇ';
  23290. },
  23291. week: {
  23292. dow: 0, // Sunday is the first day of the week.
  23293. doy: 6, // The week that contains Jan 6th is the first week of the year.
  23294. },
  23295. });
  23296. return kn;
  23297. })));
  23298. /***/ }),
  23299. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ko.js":
  23300. /*!***************************************************************************!*\
  23301. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ko.js ***!
  23302. \***************************************************************************/
  23303. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23304. //! moment.js locale configuration
  23305. //! locale : Korean [ko]
  23306. //! author : Kyungwook, Park : https://github.com/kyungw00k
  23307. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  23308. ;(function (global, factory) {
  23309. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23310. 0
  23311. }(this, (function (moment) { 'use strict';
  23312. //! moment.js locale configuration
  23313. var ko = moment.defineLocale('ko', {
  23314. months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  23315. monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
  23316. '_'
  23317. ),
  23318. weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  23319. weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
  23320. weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
  23321. longDateFormat: {
  23322. LT: 'A h:mm',
  23323. LTS: 'A h:mm:ss',
  23324. L: 'YYYY.MM.DD.',
  23325. LL: 'YYYY년 MMMM D일',
  23326. LLL: 'YYYY년 MMMM D일 A h:mm',
  23327. LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
  23328. l: 'YYYY.MM.DD.',
  23329. ll: 'YYYY년 MMMM D일',
  23330. lll: 'YYYY년 MMMM D일 A h:mm',
  23331. llll: 'YYYY년 MMMM D일 dddd A h:mm',
  23332. },
  23333. calendar: {
  23334. sameDay: '오늘 LT',
  23335. nextDay: '내일 LT',
  23336. nextWeek: 'dddd LT',
  23337. lastDay: '어제 LT',
  23338. lastWeek: '지난주 dddd LT',
  23339. sameElse: 'L',
  23340. },
  23341. relativeTime: {
  23342. future: '%s 후',
  23343. past: '%s 전',
  23344. s: '몇 초',
  23345. ss: '%d초',
  23346. m: '1분',
  23347. mm: '%d분',
  23348. h: '한 시간',
  23349. hh: '%d시간',
  23350. d: '하루',
  23351. dd: '%d일',
  23352. M: '한 달',
  23353. MM: '%d달',
  23354. y: '일 년',
  23355. yy: '%d년',
  23356. },
  23357. dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
  23358. ordinal: function (number, period) {
  23359. switch (period) {
  23360. case 'd':
  23361. case 'D':
  23362. case 'DDD':
  23363. return number + '일';
  23364. case 'M':
  23365. return number + '월';
  23366. case 'w':
  23367. case 'W':
  23368. return number + '주';
  23369. default:
  23370. return number;
  23371. }
  23372. },
  23373. meridiemParse: /오전|오후/,
  23374. isPM: function (token) {
  23375. return token === '오후';
  23376. },
  23377. meridiem: function (hour, minute, isUpper) {
  23378. return hour < 12 ? '오전' : '오후';
  23379. },
  23380. });
  23381. return ko;
  23382. })));
  23383. /***/ }),
  23384. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ku.js":
  23385. /*!***************************************************************************!*\
  23386. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ku.js ***!
  23387. \***************************************************************************/
  23388. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23389. //! moment.js locale configuration
  23390. //! locale : Kurdish [ku]
  23391. //! author : Shahram Mebashar : https://github.com/ShahramMebashar
  23392. ;(function (global, factory) {
  23393. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23394. 0
  23395. }(this, (function (moment) { 'use strict';
  23396. //! moment.js locale configuration
  23397. var symbolMap = {
  23398. 1: '١',
  23399. 2: '٢',
  23400. 3: '٣',
  23401. 4: '٤',
  23402. 5: '٥',
  23403. 6: '٦',
  23404. 7: '٧',
  23405. 8: '٨',
  23406. 9: '٩',
  23407. 0: '٠',
  23408. },
  23409. numberMap = {
  23410. '١': '1',
  23411. '٢': '2',
  23412. '٣': '3',
  23413. '٤': '4',
  23414. '٥': '5',
  23415. '٦': '6',
  23416. '٧': '7',
  23417. '٨': '8',
  23418. '٩': '9',
  23419. '٠': '0',
  23420. },
  23421. months = [
  23422. 'کانونی دووەم',
  23423. 'شوبات',
  23424. 'ئازار',
  23425. 'نیسان',
  23426. 'ئایار',
  23427. 'حوزەیران',
  23428. 'تەمموز',
  23429. 'ئاب',
  23430. 'ئەیلوول',
  23431. 'تشرینی یەكەم',
  23432. 'تشرینی دووەم',
  23433. 'كانونی یەکەم',
  23434. ];
  23435. var ku = moment.defineLocale('ku', {
  23436. months: months,
  23437. monthsShort: months,
  23438. weekdays:
  23439. 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(
  23440. '_'
  23441. ),
  23442. weekdaysShort:
  23443. 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),
  23444. weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
  23445. weekdaysParseExact: true,
  23446. longDateFormat: {
  23447. LT: 'HH:mm',
  23448. LTS: 'HH:mm:ss',
  23449. L: 'DD/MM/YYYY',
  23450. LL: 'D MMMM YYYY',
  23451. LLL: 'D MMMM YYYY HH:mm',
  23452. LLLL: 'dddd, D MMMM YYYY HH:mm',
  23453. },
  23454. meridiemParse: /ئێواره‌|به‌یانی/,
  23455. isPM: function (input) {
  23456. return /ئێواره‌/.test(input);
  23457. },
  23458. meridiem: function (hour, minute, isLower) {
  23459. if (hour < 12) {
  23460. return 'به‌یانی';
  23461. } else {
  23462. return 'ئێواره‌';
  23463. }
  23464. },
  23465. calendar: {
  23466. sameDay: '[ئه‌مرۆ كاتژمێر] LT',
  23467. nextDay: '[به‌یانی كاتژمێر] LT',
  23468. nextWeek: 'dddd [كاتژمێر] LT',
  23469. lastDay: '[دوێنێ كاتژمێر] LT',
  23470. lastWeek: 'dddd [كاتژمێر] LT',
  23471. sameElse: 'L',
  23472. },
  23473. relativeTime: {
  23474. future: 'له‌ %s',
  23475. past: '%s',
  23476. s: 'چه‌ند چركه‌یه‌ك',
  23477. ss: 'چركه‌ %d',
  23478. m: 'یه‌ك خوله‌ك',
  23479. mm: '%d خوله‌ك',
  23480. h: 'یه‌ك كاتژمێر',
  23481. hh: '%d كاتژمێر',
  23482. d: 'یه‌ك ڕۆژ',
  23483. dd: '%d ڕۆژ',
  23484. M: 'یه‌ك مانگ',
  23485. MM: '%d مانگ',
  23486. y: 'یه‌ك ساڵ',
  23487. yy: '%d ساڵ',
  23488. },
  23489. preparse: function (string) {
  23490. return string
  23491. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  23492. return numberMap[match];
  23493. })
  23494. .replace(/،/g, ',');
  23495. },
  23496. postformat: function (string) {
  23497. return string
  23498. .replace(/\d/g, function (match) {
  23499. return symbolMap[match];
  23500. })
  23501. .replace(/,/g, '،');
  23502. },
  23503. week: {
  23504. dow: 6, // Saturday is the first day of the week.
  23505. doy: 12, // The week that contains Jan 12th is the first week of the year.
  23506. },
  23507. });
  23508. return ku;
  23509. })));
  23510. /***/ }),
  23511. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ky.js":
  23512. /*!***************************************************************************!*\
  23513. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ky.js ***!
  23514. \***************************************************************************/
  23515. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23516. //! moment.js locale configuration
  23517. //! locale : Kyrgyz [ky]
  23518. //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
  23519. ;(function (global, factory) {
  23520. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23521. 0
  23522. }(this, (function (moment) { 'use strict';
  23523. //! moment.js locale configuration
  23524. var suffixes = {
  23525. 0: '-чү',
  23526. 1: '-чи',
  23527. 2: '-чи',
  23528. 3: '-чү',
  23529. 4: '-чү',
  23530. 5: '-чи',
  23531. 6: '-чы',
  23532. 7: '-чи',
  23533. 8: '-чи',
  23534. 9: '-чу',
  23535. 10: '-чу',
  23536. 20: '-чы',
  23537. 30: '-чу',
  23538. 40: '-чы',
  23539. 50: '-чү',
  23540. 60: '-чы',
  23541. 70: '-чи',
  23542. 80: '-чи',
  23543. 90: '-чу',
  23544. 100: '-чү',
  23545. };
  23546. var ky = moment.defineLocale('ky', {
  23547. months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
  23548. '_'
  23549. ),
  23550. monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
  23551. '_'
  23552. ),
  23553. weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
  23554. '_'
  23555. ),
  23556. weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
  23557. weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
  23558. longDateFormat: {
  23559. LT: 'HH:mm',
  23560. LTS: 'HH:mm:ss',
  23561. L: 'DD.MM.YYYY',
  23562. LL: 'D MMMM YYYY',
  23563. LLL: 'D MMMM YYYY HH:mm',
  23564. LLLL: 'dddd, D MMMM YYYY HH:mm',
  23565. },
  23566. calendar: {
  23567. sameDay: '[Бүгүн саат] LT',
  23568. nextDay: '[Эртең саат] LT',
  23569. nextWeek: 'dddd [саат] LT',
  23570. lastDay: '[Кечээ саат] LT',
  23571. lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
  23572. sameElse: 'L',
  23573. },
  23574. relativeTime: {
  23575. future: '%s ичинде',
  23576. past: '%s мурун',
  23577. s: 'бирнече секунд',
  23578. ss: '%d секунд',
  23579. m: 'бир мүнөт',
  23580. mm: '%d мүнөт',
  23581. h: 'бир саат',
  23582. hh: '%d саат',
  23583. d: 'бир күн',
  23584. dd: '%d күн',
  23585. M: 'бир ай',
  23586. MM: '%d ай',
  23587. y: 'бир жыл',
  23588. yy: '%d жыл',
  23589. },
  23590. dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
  23591. ordinal: function (number) {
  23592. var a = number % 10,
  23593. b = number >= 100 ? 100 : null;
  23594. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  23595. },
  23596. week: {
  23597. dow: 1, // Monday is the first day of the week.
  23598. doy: 7, // The week that contains Jan 7th is the first week of the year.
  23599. },
  23600. });
  23601. return ky;
  23602. })));
  23603. /***/ }),
  23604. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lb.js":
  23605. /*!***************************************************************************!*\
  23606. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lb.js ***!
  23607. \***************************************************************************/
  23608. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23609. //! moment.js locale configuration
  23610. //! locale : Luxembourgish [lb]
  23611. //! author : mweimerskirch : https://github.com/mweimerskirch
  23612. //! author : David Raison : https://github.com/kwisatz
  23613. ;(function (global, factory) {
  23614. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23615. 0
  23616. }(this, (function (moment) { 'use strict';
  23617. //! moment.js locale configuration
  23618. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  23619. var format = {
  23620. m: ['eng Minutt', 'enger Minutt'],
  23621. h: ['eng Stonn', 'enger Stonn'],
  23622. d: ['een Dag', 'engem Dag'],
  23623. M: ['ee Mount', 'engem Mount'],
  23624. y: ['ee Joer', 'engem Joer'],
  23625. };
  23626. return withoutSuffix ? format[key][0] : format[key][1];
  23627. }
  23628. function processFutureTime(string) {
  23629. var number = string.substr(0, string.indexOf(' '));
  23630. if (eifelerRegelAppliesToNumber(number)) {
  23631. return 'a ' + string;
  23632. }
  23633. return 'an ' + string;
  23634. }
  23635. function processPastTime(string) {
  23636. var number = string.substr(0, string.indexOf(' '));
  23637. if (eifelerRegelAppliesToNumber(number)) {
  23638. return 'viru ' + string;
  23639. }
  23640. return 'virun ' + string;
  23641. }
  23642. /**
  23643. * Returns true if the word before the given number loses the '-n' ending.
  23644. * e.g. 'an 10 Deeg' but 'a 5 Deeg'
  23645. *
  23646. * @param number {integer}
  23647. * @returns {boolean}
  23648. */
  23649. function eifelerRegelAppliesToNumber(number) {
  23650. number = parseInt(number, 10);
  23651. if (isNaN(number)) {
  23652. return false;
  23653. }
  23654. if (number < 0) {
  23655. // Negative Number --> always true
  23656. return true;
  23657. } else if (number < 10) {
  23658. // Only 1 digit
  23659. if (4 <= number && number <= 7) {
  23660. return true;
  23661. }
  23662. return false;
  23663. } else if (number < 100) {
  23664. // 2 digits
  23665. var lastDigit = number % 10,
  23666. firstDigit = number / 10;
  23667. if (lastDigit === 0) {
  23668. return eifelerRegelAppliesToNumber(firstDigit);
  23669. }
  23670. return eifelerRegelAppliesToNumber(lastDigit);
  23671. } else if (number < 10000) {
  23672. // 3 or 4 digits --> recursively check first digit
  23673. while (number >= 10) {
  23674. number = number / 10;
  23675. }
  23676. return eifelerRegelAppliesToNumber(number);
  23677. } else {
  23678. // Anything larger than 4 digits: recursively check first n-3 digits
  23679. number = number / 1000;
  23680. return eifelerRegelAppliesToNumber(number);
  23681. }
  23682. }
  23683. var lb = moment.defineLocale('lb', {
  23684. months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  23685. '_'
  23686. ),
  23687. monthsShort:
  23688. 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
  23689. '_'
  23690. ),
  23691. monthsParseExact: true,
  23692. weekdays:
  23693. 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
  23694. '_'
  23695. ),
  23696. weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
  23697. weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
  23698. weekdaysParseExact: true,
  23699. longDateFormat: {
  23700. LT: 'H:mm [Auer]',
  23701. LTS: 'H:mm:ss [Auer]',
  23702. L: 'DD.MM.YYYY',
  23703. LL: 'D. MMMM YYYY',
  23704. LLL: 'D. MMMM YYYY H:mm [Auer]',
  23705. LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
  23706. },
  23707. calendar: {
  23708. sameDay: '[Haut um] LT',
  23709. sameElse: 'L',
  23710. nextDay: '[Muer um] LT',
  23711. nextWeek: 'dddd [um] LT',
  23712. lastDay: '[Gëschter um] LT',
  23713. lastWeek: function () {
  23714. // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
  23715. switch (this.day()) {
  23716. case 2:
  23717. case 4:
  23718. return '[Leschten] dddd [um] LT';
  23719. default:
  23720. return '[Leschte] dddd [um] LT';
  23721. }
  23722. },
  23723. },
  23724. relativeTime: {
  23725. future: processFutureTime,
  23726. past: processPastTime,
  23727. s: 'e puer Sekonnen',
  23728. ss: '%d Sekonnen',
  23729. m: processRelativeTime,
  23730. mm: '%d Minutten',
  23731. h: processRelativeTime,
  23732. hh: '%d Stonnen',
  23733. d: processRelativeTime,
  23734. dd: '%d Deeg',
  23735. M: processRelativeTime,
  23736. MM: '%d Méint',
  23737. y: processRelativeTime,
  23738. yy: '%d Joer',
  23739. },
  23740. dayOfMonthOrdinalParse: /\d{1,2}\./,
  23741. ordinal: '%d.',
  23742. week: {
  23743. dow: 1, // Monday is the first day of the week.
  23744. doy: 4, // The week that contains Jan 4th is the first week of the year.
  23745. },
  23746. });
  23747. return lb;
  23748. })));
  23749. /***/ }),
  23750. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lo.js":
  23751. /*!***************************************************************************!*\
  23752. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lo.js ***!
  23753. \***************************************************************************/
  23754. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23755. //! moment.js locale configuration
  23756. //! locale : Lao [lo]
  23757. //! author : Ryan Hart : https://github.com/ryanhart2
  23758. ;(function (global, factory) {
  23759. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23760. 0
  23761. }(this, (function (moment) { 'use strict';
  23762. //! moment.js locale configuration
  23763. var lo = moment.defineLocale('lo', {
  23764. months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
  23765. '_'
  23766. ),
  23767. monthsShort:
  23768. 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
  23769. '_'
  23770. ),
  23771. weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  23772. weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  23773. weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
  23774. weekdaysParseExact: true,
  23775. longDateFormat: {
  23776. LT: 'HH:mm',
  23777. LTS: 'HH:mm:ss',
  23778. L: 'DD/MM/YYYY',
  23779. LL: 'D MMMM YYYY',
  23780. LLL: 'D MMMM YYYY HH:mm',
  23781. LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
  23782. },
  23783. meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
  23784. isPM: function (input) {
  23785. return input === 'ຕອນແລງ';
  23786. },
  23787. meridiem: function (hour, minute, isLower) {
  23788. if (hour < 12) {
  23789. return 'ຕອນເຊົ້າ';
  23790. } else {
  23791. return 'ຕອນແລງ';
  23792. }
  23793. },
  23794. calendar: {
  23795. sameDay: '[ມື້ນີ້ເວລາ] LT',
  23796. nextDay: '[ມື້ອື່ນເວລາ] LT',
  23797. nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
  23798. lastDay: '[ມື້ວານນີ້ເວລາ] LT',
  23799. lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
  23800. sameElse: 'L',
  23801. },
  23802. relativeTime: {
  23803. future: 'ອີກ %s',
  23804. past: '%sຜ່ານມາ',
  23805. s: 'ບໍ່ເທົ່າໃດວິນາທີ',
  23806. ss: '%d ວິນາທີ',
  23807. m: '1 ນາທີ',
  23808. mm: '%d ນາທີ',
  23809. h: '1 ຊົ່ວໂມງ',
  23810. hh: '%d ຊົ່ວໂມງ',
  23811. d: '1 ມື້',
  23812. dd: '%d ມື້',
  23813. M: '1 ເດືອນ',
  23814. MM: '%d ເດືອນ',
  23815. y: '1 ປີ',
  23816. yy: '%d ປີ',
  23817. },
  23818. dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
  23819. ordinal: function (number) {
  23820. return 'ທີ່' + number;
  23821. },
  23822. });
  23823. return lo;
  23824. })));
  23825. /***/ }),
  23826. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lt.js":
  23827. /*!***************************************************************************!*\
  23828. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lt.js ***!
  23829. \***************************************************************************/
  23830. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23831. //! moment.js locale configuration
  23832. //! locale : Lithuanian [lt]
  23833. //! author : Mindaugas Mozūras : https://github.com/mmozuras
  23834. ;(function (global, factory) {
  23835. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23836. 0
  23837. }(this, (function (moment) { 'use strict';
  23838. //! moment.js locale configuration
  23839. var units = {
  23840. ss: 'sekundė_sekundžių_sekundes',
  23841. m: 'minutė_minutės_minutę',
  23842. mm: 'minutės_minučių_minutes',
  23843. h: 'valanda_valandos_valandą',
  23844. hh: 'valandos_valandų_valandas',
  23845. d: 'diena_dienos_dieną',
  23846. dd: 'dienos_dienų_dienas',
  23847. M: 'mėnuo_mėnesio_mėnesį',
  23848. MM: 'mėnesiai_mėnesių_mėnesius',
  23849. y: 'metai_metų_metus',
  23850. yy: 'metai_metų_metus',
  23851. };
  23852. function translateSeconds(number, withoutSuffix, key, isFuture) {
  23853. if (withoutSuffix) {
  23854. return 'kelios sekundės';
  23855. } else {
  23856. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  23857. }
  23858. }
  23859. function translateSingular(number, withoutSuffix, key, isFuture) {
  23860. return withoutSuffix
  23861. ? forms(key)[0]
  23862. : isFuture
  23863. ? forms(key)[1]
  23864. : forms(key)[2];
  23865. }
  23866. function special(number) {
  23867. return number % 10 === 0 || (number > 10 && number < 20);
  23868. }
  23869. function forms(key) {
  23870. return units[key].split('_');
  23871. }
  23872. function translate(number, withoutSuffix, key, isFuture) {
  23873. var result = number + ' ';
  23874. if (number === 1) {
  23875. return (
  23876. result + translateSingular(number, withoutSuffix, key[0], isFuture)
  23877. );
  23878. } else if (withoutSuffix) {
  23879. return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  23880. } else {
  23881. if (isFuture) {
  23882. return result + forms(key)[1];
  23883. } else {
  23884. return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  23885. }
  23886. }
  23887. }
  23888. var lt = moment.defineLocale('lt', {
  23889. months: {
  23890. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
  23891. '_'
  23892. ),
  23893. standalone:
  23894. 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
  23895. '_'
  23896. ),
  23897. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
  23898. },
  23899. monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  23900. weekdays: {
  23901. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
  23902. '_'
  23903. ),
  23904. standalone:
  23905. 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
  23906. '_'
  23907. ),
  23908. isFormat: /dddd HH:mm/,
  23909. },
  23910. weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  23911. weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
  23912. weekdaysParseExact: true,
  23913. longDateFormat: {
  23914. LT: 'HH:mm',
  23915. LTS: 'HH:mm:ss',
  23916. L: 'YYYY-MM-DD',
  23917. LL: 'YYYY [m.] MMMM D [d.]',
  23918. LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  23919. LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  23920. l: 'YYYY-MM-DD',
  23921. ll: 'YYYY [m.] MMMM D [d.]',
  23922. lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  23923. llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
  23924. },
  23925. calendar: {
  23926. sameDay: '[Šiandien] LT',
  23927. nextDay: '[Rytoj] LT',
  23928. nextWeek: 'dddd LT',
  23929. lastDay: '[Vakar] LT',
  23930. lastWeek: '[Praėjusį] dddd LT',
  23931. sameElse: 'L',
  23932. },
  23933. relativeTime: {
  23934. future: 'po %s',
  23935. past: 'prieš %s',
  23936. s: translateSeconds,
  23937. ss: translate,
  23938. m: translateSingular,
  23939. mm: translate,
  23940. h: translateSingular,
  23941. hh: translate,
  23942. d: translateSingular,
  23943. dd: translate,
  23944. M: translateSingular,
  23945. MM: translate,
  23946. y: translateSingular,
  23947. yy: translate,
  23948. },
  23949. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  23950. ordinal: function (number) {
  23951. return number + '-oji';
  23952. },
  23953. week: {
  23954. dow: 1, // Monday is the first day of the week.
  23955. doy: 4, // The week that contains Jan 4th is the first week of the year.
  23956. },
  23957. });
  23958. return lt;
  23959. })));
  23960. /***/ }),
  23961. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lv.js":
  23962. /*!***************************************************************************!*\
  23963. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lv.js ***!
  23964. \***************************************************************************/
  23965. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  23966. //! moment.js locale configuration
  23967. //! locale : Latvian [lv]
  23968. //! author : Kristaps Karlsons : https://github.com/skakri
  23969. //! author : Jānis Elmeris : https://github.com/JanisE
  23970. ;(function (global, factory) {
  23971. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  23972. 0
  23973. }(this, (function (moment) { 'use strict';
  23974. //! moment.js locale configuration
  23975. var units = {
  23976. ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
  23977. m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  23978. mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  23979. h: 'stundas_stundām_stunda_stundas'.split('_'),
  23980. hh: 'stundas_stundām_stunda_stundas'.split('_'),
  23981. d: 'dienas_dienām_diena_dienas'.split('_'),
  23982. dd: 'dienas_dienām_diena_dienas'.split('_'),
  23983. M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  23984. MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  23985. y: 'gada_gadiem_gads_gadi'.split('_'),
  23986. yy: 'gada_gadiem_gads_gadi'.split('_'),
  23987. };
  23988. /**
  23989. * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
  23990. */
  23991. function format(forms, number, withoutSuffix) {
  23992. if (withoutSuffix) {
  23993. // E.g. "21 minūte", "3 minūtes".
  23994. return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
  23995. } else {
  23996. // E.g. "21 minūtes" as in "pēc 21 minūtes".
  23997. // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
  23998. return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
  23999. }
  24000. }
  24001. function relativeTimeWithPlural(number, withoutSuffix, key) {
  24002. return number + ' ' + format(units[key], number, withoutSuffix);
  24003. }
  24004. function relativeTimeWithSingular(number, withoutSuffix, key) {
  24005. return format(units[key], number, withoutSuffix);
  24006. }
  24007. function relativeSeconds(number, withoutSuffix) {
  24008. return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
  24009. }
  24010. var lv = moment.defineLocale('lv', {
  24011. months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
  24012. '_'
  24013. ),
  24014. monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
  24015. weekdays:
  24016. 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
  24017. '_'
  24018. ),
  24019. weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
  24020. weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
  24021. weekdaysParseExact: true,
  24022. longDateFormat: {
  24023. LT: 'HH:mm',
  24024. LTS: 'HH:mm:ss',
  24025. L: 'DD.MM.YYYY.',
  24026. LL: 'YYYY. [gada] D. MMMM',
  24027. LLL: 'YYYY. [gada] D. MMMM, HH:mm',
  24028. LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
  24029. },
  24030. calendar: {
  24031. sameDay: '[Šodien pulksten] LT',
  24032. nextDay: '[Rīt pulksten] LT',
  24033. nextWeek: 'dddd [pulksten] LT',
  24034. lastDay: '[Vakar pulksten] LT',
  24035. lastWeek: '[Pagājušā] dddd [pulksten] LT',
  24036. sameElse: 'L',
  24037. },
  24038. relativeTime: {
  24039. future: 'pēc %s',
  24040. past: 'pirms %s',
  24041. s: relativeSeconds,
  24042. ss: relativeTimeWithPlural,
  24043. m: relativeTimeWithSingular,
  24044. mm: relativeTimeWithPlural,
  24045. h: relativeTimeWithSingular,
  24046. hh: relativeTimeWithPlural,
  24047. d: relativeTimeWithSingular,
  24048. dd: relativeTimeWithPlural,
  24049. M: relativeTimeWithSingular,
  24050. MM: relativeTimeWithPlural,
  24051. y: relativeTimeWithSingular,
  24052. yy: relativeTimeWithPlural,
  24053. },
  24054. dayOfMonthOrdinalParse: /\d{1,2}\./,
  24055. ordinal: '%d.',
  24056. week: {
  24057. dow: 1, // Monday is the first day of the week.
  24058. doy: 4, // The week that contains Jan 4th is the first week of the year.
  24059. },
  24060. });
  24061. return lv;
  24062. })));
  24063. /***/ }),
  24064. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/me.js":
  24065. /*!***************************************************************************!*\
  24066. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/me.js ***!
  24067. \***************************************************************************/
  24068. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24069. //! moment.js locale configuration
  24070. //! locale : Montenegrin [me]
  24071. //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
  24072. ;(function (global, factory) {
  24073. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24074. 0
  24075. }(this, (function (moment) { 'use strict';
  24076. //! moment.js locale configuration
  24077. var translator = {
  24078. words: {
  24079. //Different grammatical cases
  24080. ss: ['sekund', 'sekunda', 'sekundi'],
  24081. m: ['jedan minut', 'jednog minuta'],
  24082. mm: ['minut', 'minuta', 'minuta'],
  24083. h: ['jedan sat', 'jednog sata'],
  24084. hh: ['sat', 'sata', 'sati'],
  24085. dd: ['dan', 'dana', 'dana'],
  24086. MM: ['mjesec', 'mjeseca', 'mjeseci'],
  24087. yy: ['godina', 'godine', 'godina'],
  24088. },
  24089. correctGrammaticalCase: function (number, wordKey) {
  24090. return number === 1
  24091. ? wordKey[0]
  24092. : number >= 2 && number <= 4
  24093. ? wordKey[1]
  24094. : wordKey[2];
  24095. },
  24096. translate: function (number, withoutSuffix, key) {
  24097. var wordKey = translator.words[key];
  24098. if (key.length === 1) {
  24099. return withoutSuffix ? wordKey[0] : wordKey[1];
  24100. } else {
  24101. return (
  24102. number +
  24103. ' ' +
  24104. translator.correctGrammaticalCase(number, wordKey)
  24105. );
  24106. }
  24107. },
  24108. };
  24109. var me = moment.defineLocale('me', {
  24110. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
  24111. '_'
  24112. ),
  24113. monthsShort:
  24114. 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  24115. monthsParseExact: true,
  24116. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  24117. '_'
  24118. ),
  24119. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  24120. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  24121. weekdaysParseExact: true,
  24122. longDateFormat: {
  24123. LT: 'H:mm',
  24124. LTS: 'H:mm:ss',
  24125. L: 'DD.MM.YYYY',
  24126. LL: 'D. MMMM YYYY',
  24127. LLL: 'D. MMMM YYYY H:mm',
  24128. LLLL: 'dddd, D. MMMM YYYY H:mm',
  24129. },
  24130. calendar: {
  24131. sameDay: '[danas u] LT',
  24132. nextDay: '[sjutra u] LT',
  24133. nextWeek: function () {
  24134. switch (this.day()) {
  24135. case 0:
  24136. return '[u] [nedjelju] [u] LT';
  24137. case 3:
  24138. return '[u] [srijedu] [u] LT';
  24139. case 6:
  24140. return '[u] [subotu] [u] LT';
  24141. case 1:
  24142. case 2:
  24143. case 4:
  24144. case 5:
  24145. return '[u] dddd [u] LT';
  24146. }
  24147. },
  24148. lastDay: '[juče u] LT',
  24149. lastWeek: function () {
  24150. var lastWeekDays = [
  24151. '[prošle] [nedjelje] [u] LT',
  24152. '[prošlog] [ponedjeljka] [u] LT',
  24153. '[prošlog] [utorka] [u] LT',
  24154. '[prošle] [srijede] [u] LT',
  24155. '[prošlog] [četvrtka] [u] LT',
  24156. '[prošlog] [petka] [u] LT',
  24157. '[prošle] [subote] [u] LT',
  24158. ];
  24159. return lastWeekDays[this.day()];
  24160. },
  24161. sameElse: 'L',
  24162. },
  24163. relativeTime: {
  24164. future: 'za %s',
  24165. past: 'prije %s',
  24166. s: 'nekoliko sekundi',
  24167. ss: translator.translate,
  24168. m: translator.translate,
  24169. mm: translator.translate,
  24170. h: translator.translate,
  24171. hh: translator.translate,
  24172. d: 'dan',
  24173. dd: translator.translate,
  24174. M: 'mjesec',
  24175. MM: translator.translate,
  24176. y: 'godinu',
  24177. yy: translator.translate,
  24178. },
  24179. dayOfMonthOrdinalParse: /\d{1,2}\./,
  24180. ordinal: '%d.',
  24181. week: {
  24182. dow: 1, // Monday is the first day of the week.
  24183. doy: 7, // The week that contains Jan 7th is the first week of the year.
  24184. },
  24185. });
  24186. return me;
  24187. })));
  24188. /***/ }),
  24189. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mi.js":
  24190. /*!***************************************************************************!*\
  24191. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mi.js ***!
  24192. \***************************************************************************/
  24193. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24194. //! moment.js locale configuration
  24195. //! locale : Maori [mi]
  24196. //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
  24197. ;(function (global, factory) {
  24198. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24199. 0
  24200. }(this, (function (moment) { 'use strict';
  24201. //! moment.js locale configuration
  24202. var mi = moment.defineLocale('mi', {
  24203. 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(
  24204. '_'
  24205. ),
  24206. monthsShort:
  24207. 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
  24208. '_'
  24209. ),
  24210. monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  24211. monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  24212. monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  24213. monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
  24214. weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
  24215. weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  24216. weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  24217. longDateFormat: {
  24218. LT: 'HH:mm',
  24219. LTS: 'HH:mm:ss',
  24220. L: 'DD/MM/YYYY',
  24221. LL: 'D MMMM YYYY',
  24222. LLL: 'D MMMM YYYY [i] HH:mm',
  24223. LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
  24224. },
  24225. calendar: {
  24226. sameDay: '[i teie mahana, i] LT',
  24227. nextDay: '[apopo i] LT',
  24228. nextWeek: 'dddd [i] LT',
  24229. lastDay: '[inanahi i] LT',
  24230. lastWeek: 'dddd [whakamutunga i] LT',
  24231. sameElse: 'L',
  24232. },
  24233. relativeTime: {
  24234. future: 'i roto i %s',
  24235. past: '%s i mua',
  24236. s: 'te hēkona ruarua',
  24237. ss: '%d hēkona',
  24238. m: 'he meneti',
  24239. mm: '%d meneti',
  24240. h: 'te haora',
  24241. hh: '%d haora',
  24242. d: 'he ra',
  24243. dd: '%d ra',
  24244. M: 'he marama',
  24245. MM: '%d marama',
  24246. y: 'he tau',
  24247. yy: '%d tau',
  24248. },
  24249. dayOfMonthOrdinalParse: /\d{1,2}º/,
  24250. ordinal: '%dº',
  24251. week: {
  24252. dow: 1, // Monday is the first day of the week.
  24253. doy: 4, // The week that contains Jan 4th is the first week of the year.
  24254. },
  24255. });
  24256. return mi;
  24257. })));
  24258. /***/ }),
  24259. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mk.js":
  24260. /*!***************************************************************************!*\
  24261. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mk.js ***!
  24262. \***************************************************************************/
  24263. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24264. //! moment.js locale configuration
  24265. //! locale : Macedonian [mk]
  24266. //! author : Borislav Mickov : https://github.com/B0k0
  24267. //! author : Sashko Todorov : https://github.com/bkyceh
  24268. ;(function (global, factory) {
  24269. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24270. 0
  24271. }(this, (function (moment) { 'use strict';
  24272. //! moment.js locale configuration
  24273. var mk = moment.defineLocale('mk', {
  24274. months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
  24275. '_'
  24276. ),
  24277. monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
  24278. weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
  24279. '_'
  24280. ),
  24281. weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
  24282. weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
  24283. longDateFormat: {
  24284. LT: 'H:mm',
  24285. LTS: 'H:mm:ss',
  24286. L: 'D.MM.YYYY',
  24287. LL: 'D MMMM YYYY',
  24288. LLL: 'D MMMM YYYY H:mm',
  24289. LLLL: 'dddd, D MMMM YYYY H:mm',
  24290. },
  24291. calendar: {
  24292. sameDay: '[Денес во] LT',
  24293. nextDay: '[Утре во] LT',
  24294. nextWeek: '[Во] dddd [во] LT',
  24295. lastDay: '[Вчера во] LT',
  24296. lastWeek: function () {
  24297. switch (this.day()) {
  24298. case 0:
  24299. case 3:
  24300. case 6:
  24301. return '[Изминатата] dddd [во] LT';
  24302. case 1:
  24303. case 2:
  24304. case 4:
  24305. case 5:
  24306. return '[Изминатиот] dddd [во] LT';
  24307. }
  24308. },
  24309. sameElse: 'L',
  24310. },
  24311. relativeTime: {
  24312. future: 'за %s',
  24313. past: 'пред %s',
  24314. s: 'неколку секунди',
  24315. ss: '%d секунди',
  24316. m: 'една минута',
  24317. mm: '%d минути',
  24318. h: 'еден час',
  24319. hh: '%d часа',
  24320. d: 'еден ден',
  24321. dd: '%d дена',
  24322. M: 'еден месец',
  24323. MM: '%d месеци',
  24324. y: 'една година',
  24325. yy: '%d години',
  24326. },
  24327. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  24328. ordinal: function (number) {
  24329. var lastDigit = number % 10,
  24330. last2Digits = number % 100;
  24331. if (number === 0) {
  24332. return number + '-ев';
  24333. } else if (last2Digits === 0) {
  24334. return number + '-ен';
  24335. } else if (last2Digits > 10 && last2Digits < 20) {
  24336. return number + '-ти';
  24337. } else if (lastDigit === 1) {
  24338. return number + '-ви';
  24339. } else if (lastDigit === 2) {
  24340. return number + '-ри';
  24341. } else if (lastDigit === 7 || lastDigit === 8) {
  24342. return number + '-ми';
  24343. } else {
  24344. return number + '-ти';
  24345. }
  24346. },
  24347. week: {
  24348. dow: 1, // Monday is the first day of the week.
  24349. doy: 7, // The week that contains Jan 7th is the first week of the year.
  24350. },
  24351. });
  24352. return mk;
  24353. })));
  24354. /***/ }),
  24355. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ml.js":
  24356. /*!***************************************************************************!*\
  24357. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ml.js ***!
  24358. \***************************************************************************/
  24359. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24360. //! moment.js locale configuration
  24361. //! locale : Malayalam [ml]
  24362. //! author : Floyd Pink : https://github.com/floydpink
  24363. ;(function (global, factory) {
  24364. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24365. 0
  24366. }(this, (function (moment) { 'use strict';
  24367. //! moment.js locale configuration
  24368. var ml = moment.defineLocale('ml', {
  24369. months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
  24370. '_'
  24371. ),
  24372. monthsShort:
  24373. 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
  24374. '_'
  24375. ),
  24376. monthsParseExact: true,
  24377. weekdays:
  24378. 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
  24379. '_'
  24380. ),
  24381. weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
  24382. weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
  24383. longDateFormat: {
  24384. LT: 'A h:mm -നു',
  24385. LTS: 'A h:mm:ss -നു',
  24386. L: 'DD/MM/YYYY',
  24387. LL: 'D MMMM YYYY',
  24388. LLL: 'D MMMM YYYY, A h:mm -നു',
  24389. LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
  24390. },
  24391. calendar: {
  24392. sameDay: '[ഇന്ന്] LT',
  24393. nextDay: '[നാളെ] LT',
  24394. nextWeek: 'dddd, LT',
  24395. lastDay: '[ഇന്നലെ] LT',
  24396. lastWeek: '[കഴിഞ്ഞ] dddd, LT',
  24397. sameElse: 'L',
  24398. },
  24399. relativeTime: {
  24400. future: '%s കഴിഞ്ഞ്',
  24401. past: '%s മുൻപ്',
  24402. s: 'അൽപ നിമിഷങ്ങൾ',
  24403. ss: '%d സെക്കൻഡ്',
  24404. m: 'ഒരു മിനിറ്റ്',
  24405. mm: '%d മിനിറ്റ്',
  24406. h: 'ഒരു മണിക്കൂർ',
  24407. hh: '%d മണിക്കൂർ',
  24408. d: 'ഒരു ദിവസം',
  24409. dd: '%d ദിവസം',
  24410. M: 'ഒരു മാസം',
  24411. MM: '%d മാസം',
  24412. y: 'ഒരു വർഷം',
  24413. yy: '%d വർഷം',
  24414. },
  24415. meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
  24416. meridiemHour: function (hour, meridiem) {
  24417. if (hour === 12) {
  24418. hour = 0;
  24419. }
  24420. if (
  24421. (meridiem === 'രാത്രി' && hour >= 4) ||
  24422. meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
  24423. meridiem === 'വൈകുന്നേരം'
  24424. ) {
  24425. return hour + 12;
  24426. } else {
  24427. return hour;
  24428. }
  24429. },
  24430. meridiem: function (hour, minute, isLower) {
  24431. if (hour < 4) {
  24432. return 'രാത്രി';
  24433. } else if (hour < 12) {
  24434. return 'രാവിലെ';
  24435. } else if (hour < 17) {
  24436. return 'ഉച്ച കഴിഞ്ഞ്';
  24437. } else if (hour < 20) {
  24438. return 'വൈകുന്നേരം';
  24439. } else {
  24440. return 'രാത്രി';
  24441. }
  24442. },
  24443. });
  24444. return ml;
  24445. })));
  24446. /***/ }),
  24447. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mn.js":
  24448. /*!***************************************************************************!*\
  24449. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mn.js ***!
  24450. \***************************************************************************/
  24451. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24452. //! moment.js locale configuration
  24453. //! locale : Mongolian [mn]
  24454. //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
  24455. ;(function (global, factory) {
  24456. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24457. 0
  24458. }(this, (function (moment) { 'use strict';
  24459. //! moment.js locale configuration
  24460. function translate(number, withoutSuffix, key, isFuture) {
  24461. switch (key) {
  24462. case 's':
  24463. return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
  24464. case 'ss':
  24465. return number + (withoutSuffix ? ' секунд' : ' секундын');
  24466. case 'm':
  24467. case 'mm':
  24468. return number + (withoutSuffix ? ' минут' : ' минутын');
  24469. case 'h':
  24470. case 'hh':
  24471. return number + (withoutSuffix ? ' цаг' : ' цагийн');
  24472. case 'd':
  24473. case 'dd':
  24474. return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
  24475. case 'M':
  24476. case 'MM':
  24477. return number + (withoutSuffix ? ' сар' : ' сарын');
  24478. case 'y':
  24479. case 'yy':
  24480. return number + (withoutSuffix ? ' жил' : ' жилийн');
  24481. default:
  24482. return number;
  24483. }
  24484. }
  24485. var mn = moment.defineLocale('mn', {
  24486. months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
  24487. '_'
  24488. ),
  24489. monthsShort:
  24490. '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
  24491. '_'
  24492. ),
  24493. monthsParseExact: true,
  24494. weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
  24495. weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
  24496. weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
  24497. weekdaysParseExact: true,
  24498. longDateFormat: {
  24499. LT: 'HH:mm',
  24500. LTS: 'HH:mm:ss',
  24501. L: 'YYYY-MM-DD',
  24502. LL: 'YYYY оны MMMMын D',
  24503. LLL: 'YYYY оны MMMMын D HH:mm',
  24504. LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
  24505. },
  24506. meridiemParse: /ҮӨ|ҮХ/i,
  24507. isPM: function (input) {
  24508. return input === 'ҮХ';
  24509. },
  24510. meridiem: function (hour, minute, isLower) {
  24511. if (hour < 12) {
  24512. return 'ҮӨ';
  24513. } else {
  24514. return 'ҮХ';
  24515. }
  24516. },
  24517. calendar: {
  24518. sameDay: '[Өнөөдөр] LT',
  24519. nextDay: '[Маргааш] LT',
  24520. nextWeek: '[Ирэх] dddd LT',
  24521. lastDay: '[Өчигдөр] LT',
  24522. lastWeek: '[Өнгөрсөн] dddd LT',
  24523. sameElse: 'L',
  24524. },
  24525. relativeTime: {
  24526. future: '%s дараа',
  24527. past: '%s өмнө',
  24528. s: translate,
  24529. ss: translate,
  24530. m: translate,
  24531. mm: translate,
  24532. h: translate,
  24533. hh: translate,
  24534. d: translate,
  24535. dd: translate,
  24536. M: translate,
  24537. MM: translate,
  24538. y: translate,
  24539. yy: translate,
  24540. },
  24541. dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
  24542. ordinal: function (number, period) {
  24543. switch (period) {
  24544. case 'd':
  24545. case 'D':
  24546. case 'DDD':
  24547. return number + ' өдөр';
  24548. default:
  24549. return number;
  24550. }
  24551. },
  24552. });
  24553. return mn;
  24554. })));
  24555. /***/ }),
  24556. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mr.js":
  24557. /*!***************************************************************************!*\
  24558. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mr.js ***!
  24559. \***************************************************************************/
  24560. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24561. //! moment.js locale configuration
  24562. //! locale : Marathi [mr]
  24563. //! author : Harshad Kale : https://github.com/kalehv
  24564. //! author : Vivek Athalye : https://github.com/vnathalye
  24565. ;(function (global, factory) {
  24566. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24567. 0
  24568. }(this, (function (moment) { 'use strict';
  24569. //! moment.js locale configuration
  24570. var symbolMap = {
  24571. 1: '१',
  24572. 2: '२',
  24573. 3: '३',
  24574. 4: '४',
  24575. 5: '५',
  24576. 6: '६',
  24577. 7: '७',
  24578. 8: '८',
  24579. 9: '९',
  24580. 0: '०',
  24581. },
  24582. numberMap = {
  24583. '१': '1',
  24584. '२': '2',
  24585. '३': '3',
  24586. '४': '4',
  24587. '५': '5',
  24588. '६': '6',
  24589. '७': '7',
  24590. '८': '8',
  24591. '९': '9',
  24592. '०': '0',
  24593. };
  24594. function relativeTimeMr(number, withoutSuffix, string, isFuture) {
  24595. var output = '';
  24596. if (withoutSuffix) {
  24597. switch (string) {
  24598. case 's':
  24599. output = 'काही सेकंद';
  24600. break;
  24601. case 'ss':
  24602. output = '%d सेकंद';
  24603. break;
  24604. case 'm':
  24605. output = 'एक मिनिट';
  24606. break;
  24607. case 'mm':
  24608. output = '%d मिनिटे';
  24609. break;
  24610. case 'h':
  24611. output = 'एक तास';
  24612. break;
  24613. case 'hh':
  24614. output = '%d तास';
  24615. break;
  24616. case 'd':
  24617. output = 'एक दिवस';
  24618. break;
  24619. case 'dd':
  24620. output = '%d दिवस';
  24621. break;
  24622. case 'M':
  24623. output = 'एक महिना';
  24624. break;
  24625. case 'MM':
  24626. output = '%d महिने';
  24627. break;
  24628. case 'y':
  24629. output = 'एक वर्ष';
  24630. break;
  24631. case 'yy':
  24632. output = '%d वर्षे';
  24633. break;
  24634. }
  24635. } else {
  24636. switch (string) {
  24637. case 's':
  24638. output = 'काही सेकंदां';
  24639. break;
  24640. case 'ss':
  24641. output = '%d सेकंदां';
  24642. break;
  24643. case 'm':
  24644. output = 'एका मिनिटा';
  24645. break;
  24646. case 'mm':
  24647. output = '%d मिनिटां';
  24648. break;
  24649. case 'h':
  24650. output = 'एका तासा';
  24651. break;
  24652. case 'hh':
  24653. output = '%d तासां';
  24654. break;
  24655. case 'd':
  24656. output = 'एका दिवसा';
  24657. break;
  24658. case 'dd':
  24659. output = '%d दिवसां';
  24660. break;
  24661. case 'M':
  24662. output = 'एका महिन्या';
  24663. break;
  24664. case 'MM':
  24665. output = '%d महिन्यां';
  24666. break;
  24667. case 'y':
  24668. output = 'एका वर्षा';
  24669. break;
  24670. case 'yy':
  24671. output = '%d वर्षां';
  24672. break;
  24673. }
  24674. }
  24675. return output.replace(/%d/i, number);
  24676. }
  24677. var mr = moment.defineLocale('mr', {
  24678. months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
  24679. '_'
  24680. ),
  24681. monthsShort:
  24682. 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
  24683. '_'
  24684. ),
  24685. monthsParseExact: true,
  24686. weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  24687. weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
  24688. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  24689. longDateFormat: {
  24690. LT: 'A h:mm वाजता',
  24691. LTS: 'A h:mm:ss वाजता',
  24692. L: 'DD/MM/YYYY',
  24693. LL: 'D MMMM YYYY',
  24694. LLL: 'D MMMM YYYY, A h:mm वाजता',
  24695. LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
  24696. },
  24697. calendar: {
  24698. sameDay: '[आज] LT',
  24699. nextDay: '[उद्या] LT',
  24700. nextWeek: 'dddd, LT',
  24701. lastDay: '[काल] LT',
  24702. lastWeek: '[मागील] dddd, LT',
  24703. sameElse: 'L',
  24704. },
  24705. relativeTime: {
  24706. future: '%sमध्ये',
  24707. past: '%sपूर्वी',
  24708. s: relativeTimeMr,
  24709. ss: relativeTimeMr,
  24710. m: relativeTimeMr,
  24711. mm: relativeTimeMr,
  24712. h: relativeTimeMr,
  24713. hh: relativeTimeMr,
  24714. d: relativeTimeMr,
  24715. dd: relativeTimeMr,
  24716. M: relativeTimeMr,
  24717. MM: relativeTimeMr,
  24718. y: relativeTimeMr,
  24719. yy: relativeTimeMr,
  24720. },
  24721. preparse: function (string) {
  24722. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  24723. return numberMap[match];
  24724. });
  24725. },
  24726. postformat: function (string) {
  24727. return string.replace(/\d/g, function (match) {
  24728. return symbolMap[match];
  24729. });
  24730. },
  24731. meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
  24732. meridiemHour: function (hour, meridiem) {
  24733. if (hour === 12) {
  24734. hour = 0;
  24735. }
  24736. if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
  24737. return hour;
  24738. } else if (
  24739. meridiem === 'दुपारी' ||
  24740. meridiem === 'सायंकाळी' ||
  24741. meridiem === 'रात्री'
  24742. ) {
  24743. return hour >= 12 ? hour : hour + 12;
  24744. }
  24745. },
  24746. meridiem: function (hour, minute, isLower) {
  24747. if (hour >= 0 && hour < 6) {
  24748. return 'पहाटे';
  24749. } else if (hour < 12) {
  24750. return 'सकाळी';
  24751. } else if (hour < 17) {
  24752. return 'दुपारी';
  24753. } else if (hour < 20) {
  24754. return 'सायंकाळी';
  24755. } else {
  24756. return 'रात्री';
  24757. }
  24758. },
  24759. week: {
  24760. dow: 0, // Sunday is the first day of the week.
  24761. doy: 6, // The week that contains Jan 6th is the first week of the year.
  24762. },
  24763. });
  24764. return mr;
  24765. })));
  24766. /***/ }),
  24767. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms-my.js":
  24768. /*!******************************************************************************!*\
  24769. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms-my.js ***!
  24770. \******************************************************************************/
  24771. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24772. //! moment.js locale configuration
  24773. //! locale : Malay [ms-my]
  24774. //! note : DEPRECATED, the correct one is [ms]
  24775. //! author : Weldan Jamili : https://github.com/weldan
  24776. ;(function (global, factory) {
  24777. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24778. 0
  24779. }(this, (function (moment) { 'use strict';
  24780. //! moment.js locale configuration
  24781. var msMy = moment.defineLocale('ms-my', {
  24782. months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
  24783. '_'
  24784. ),
  24785. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  24786. weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  24787. weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  24788. weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  24789. longDateFormat: {
  24790. LT: 'HH.mm',
  24791. LTS: 'HH.mm.ss',
  24792. L: 'DD/MM/YYYY',
  24793. LL: 'D MMMM YYYY',
  24794. LLL: 'D MMMM YYYY [pukul] HH.mm',
  24795. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  24796. },
  24797. meridiemParse: /pagi|tengahari|petang|malam/,
  24798. meridiemHour: function (hour, meridiem) {
  24799. if (hour === 12) {
  24800. hour = 0;
  24801. }
  24802. if (meridiem === 'pagi') {
  24803. return hour;
  24804. } else if (meridiem === 'tengahari') {
  24805. return hour >= 11 ? hour : hour + 12;
  24806. } else if (meridiem === 'petang' || meridiem === 'malam') {
  24807. return hour + 12;
  24808. }
  24809. },
  24810. meridiem: function (hours, minutes, isLower) {
  24811. if (hours < 11) {
  24812. return 'pagi';
  24813. } else if (hours < 15) {
  24814. return 'tengahari';
  24815. } else if (hours < 19) {
  24816. return 'petang';
  24817. } else {
  24818. return 'malam';
  24819. }
  24820. },
  24821. calendar: {
  24822. sameDay: '[Hari ini pukul] LT',
  24823. nextDay: '[Esok pukul] LT',
  24824. nextWeek: 'dddd [pukul] LT',
  24825. lastDay: '[Kelmarin pukul] LT',
  24826. lastWeek: 'dddd [lepas pukul] LT',
  24827. sameElse: 'L',
  24828. },
  24829. relativeTime: {
  24830. future: 'dalam %s',
  24831. past: '%s yang lepas',
  24832. s: 'beberapa saat',
  24833. ss: '%d saat',
  24834. m: 'seminit',
  24835. mm: '%d minit',
  24836. h: 'sejam',
  24837. hh: '%d jam',
  24838. d: 'sehari',
  24839. dd: '%d hari',
  24840. M: 'sebulan',
  24841. MM: '%d bulan',
  24842. y: 'setahun',
  24843. yy: '%d tahun',
  24844. },
  24845. week: {
  24846. dow: 1, // Monday is the first day of the week.
  24847. doy: 7, // The week that contains Jan 7th is the first week of the year.
  24848. },
  24849. });
  24850. return msMy;
  24851. })));
  24852. /***/ }),
  24853. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms.js":
  24854. /*!***************************************************************************!*\
  24855. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms.js ***!
  24856. \***************************************************************************/
  24857. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24858. //! moment.js locale configuration
  24859. //! locale : Malay [ms]
  24860. //! author : Weldan Jamili : https://github.com/weldan
  24861. ;(function (global, factory) {
  24862. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24863. 0
  24864. }(this, (function (moment) { 'use strict';
  24865. //! moment.js locale configuration
  24866. var ms = moment.defineLocale('ms', {
  24867. months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
  24868. '_'
  24869. ),
  24870. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  24871. weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  24872. weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  24873. weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  24874. longDateFormat: {
  24875. LT: 'HH.mm',
  24876. LTS: 'HH.mm.ss',
  24877. L: 'DD/MM/YYYY',
  24878. LL: 'D MMMM YYYY',
  24879. LLL: 'D MMMM YYYY [pukul] HH.mm',
  24880. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  24881. },
  24882. meridiemParse: /pagi|tengahari|petang|malam/,
  24883. meridiemHour: function (hour, meridiem) {
  24884. if (hour === 12) {
  24885. hour = 0;
  24886. }
  24887. if (meridiem === 'pagi') {
  24888. return hour;
  24889. } else if (meridiem === 'tengahari') {
  24890. return hour >= 11 ? hour : hour + 12;
  24891. } else if (meridiem === 'petang' || meridiem === 'malam') {
  24892. return hour + 12;
  24893. }
  24894. },
  24895. meridiem: function (hours, minutes, isLower) {
  24896. if (hours < 11) {
  24897. return 'pagi';
  24898. } else if (hours < 15) {
  24899. return 'tengahari';
  24900. } else if (hours < 19) {
  24901. return 'petang';
  24902. } else {
  24903. return 'malam';
  24904. }
  24905. },
  24906. calendar: {
  24907. sameDay: '[Hari ini pukul] LT',
  24908. nextDay: '[Esok pukul] LT',
  24909. nextWeek: 'dddd [pukul] LT',
  24910. lastDay: '[Kelmarin pukul] LT',
  24911. lastWeek: 'dddd [lepas pukul] LT',
  24912. sameElse: 'L',
  24913. },
  24914. relativeTime: {
  24915. future: 'dalam %s',
  24916. past: '%s yang lepas',
  24917. s: 'beberapa saat',
  24918. ss: '%d saat',
  24919. m: 'seminit',
  24920. mm: '%d minit',
  24921. h: 'sejam',
  24922. hh: '%d jam',
  24923. d: 'sehari',
  24924. dd: '%d hari',
  24925. M: 'sebulan',
  24926. MM: '%d bulan',
  24927. y: 'setahun',
  24928. yy: '%d tahun',
  24929. },
  24930. week: {
  24931. dow: 1, // Monday is the first day of the week.
  24932. doy: 7, // The week that contains Jan 7th is the first week of the year.
  24933. },
  24934. });
  24935. return ms;
  24936. })));
  24937. /***/ }),
  24938. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mt.js":
  24939. /*!***************************************************************************!*\
  24940. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mt.js ***!
  24941. \***************************************************************************/
  24942. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  24943. //! moment.js locale configuration
  24944. //! locale : Maltese (Malta) [mt]
  24945. //! author : Alessandro Maruccia : https://github.com/alesma
  24946. ;(function (global, factory) {
  24947. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  24948. 0
  24949. }(this, (function (moment) { 'use strict';
  24950. //! moment.js locale configuration
  24951. var mt = moment.defineLocale('mt', {
  24952. months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
  24953. '_'
  24954. ),
  24955. monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
  24956. weekdays:
  24957. 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
  24958. '_'
  24959. ),
  24960. weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
  24961. weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
  24962. longDateFormat: {
  24963. LT: 'HH:mm',
  24964. LTS: 'HH:mm:ss',
  24965. L: 'DD/MM/YYYY',
  24966. LL: 'D MMMM YYYY',
  24967. LLL: 'D MMMM YYYY HH:mm',
  24968. LLLL: 'dddd, D MMMM YYYY HH:mm',
  24969. },
  24970. calendar: {
  24971. sameDay: '[Illum fil-]LT',
  24972. nextDay: '[Għada fil-]LT',
  24973. nextWeek: 'dddd [fil-]LT',
  24974. lastDay: '[Il-bieraħ fil-]LT',
  24975. lastWeek: 'dddd [li għadda] [fil-]LT',
  24976. sameElse: 'L',
  24977. },
  24978. relativeTime: {
  24979. future: 'f’ %s',
  24980. past: '%s ilu',
  24981. s: 'ftit sekondi',
  24982. ss: '%d sekondi',
  24983. m: 'minuta',
  24984. mm: '%d minuti',
  24985. h: 'siegħa',
  24986. hh: '%d siegħat',
  24987. d: 'ġurnata',
  24988. dd: '%d ġranet',
  24989. M: 'xahar',
  24990. MM: '%d xhur',
  24991. y: 'sena',
  24992. yy: '%d sni',
  24993. },
  24994. dayOfMonthOrdinalParse: /\d{1,2}º/,
  24995. ordinal: '%dº',
  24996. week: {
  24997. dow: 1, // Monday is the first day of the week.
  24998. doy: 4, // The week that contains Jan 4th is the first week of the year.
  24999. },
  25000. });
  25001. return mt;
  25002. })));
  25003. /***/ }),
  25004. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/my.js":
  25005. /*!***************************************************************************!*\
  25006. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/my.js ***!
  25007. \***************************************************************************/
  25008. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25009. //! moment.js locale configuration
  25010. //! locale : Burmese [my]
  25011. //! author : Squar team, mysquar.com
  25012. //! author : David Rossellat : https://github.com/gholadr
  25013. //! author : Tin Aung Lin : https://github.com/thanyawzinmin
  25014. ;(function (global, factory) {
  25015. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25016. 0
  25017. }(this, (function (moment) { 'use strict';
  25018. //! moment.js locale configuration
  25019. var symbolMap = {
  25020. 1: '၁',
  25021. 2: '၂',
  25022. 3: '၃',
  25023. 4: '၄',
  25024. 5: '၅',
  25025. 6: '၆',
  25026. 7: '၇',
  25027. 8: '၈',
  25028. 9: '၉',
  25029. 0: '၀',
  25030. },
  25031. numberMap = {
  25032. '၁': '1',
  25033. '၂': '2',
  25034. '၃': '3',
  25035. '၄': '4',
  25036. '၅': '5',
  25037. '၆': '6',
  25038. '၇': '7',
  25039. '၈': '8',
  25040. '၉': '9',
  25041. '၀': '0',
  25042. };
  25043. var my = moment.defineLocale('my', {
  25044. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
  25045. '_'
  25046. ),
  25047. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  25048. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
  25049. '_'
  25050. ),
  25051. weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  25052. weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  25053. longDateFormat: {
  25054. LT: 'HH:mm',
  25055. LTS: 'HH:mm:ss',
  25056. L: 'DD/MM/YYYY',
  25057. LL: 'D MMMM YYYY',
  25058. LLL: 'D MMMM YYYY HH:mm',
  25059. LLLL: 'dddd D MMMM YYYY HH:mm',
  25060. },
  25061. calendar: {
  25062. sameDay: '[ယနေ.] LT [မှာ]',
  25063. nextDay: '[မနက်ဖြန်] LT [မှာ]',
  25064. nextWeek: 'dddd LT [မှာ]',
  25065. lastDay: '[မနေ.က] LT [မှာ]',
  25066. lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
  25067. sameElse: 'L',
  25068. },
  25069. relativeTime: {
  25070. future: 'လာမည့် %s မှာ',
  25071. past: 'လွန်ခဲ့သော %s က',
  25072. s: 'စက္ကန်.အနည်းငယ်',
  25073. ss: '%d စက္ကန့်',
  25074. m: 'တစ်မိနစ်',
  25075. mm: '%d မိနစ်',
  25076. h: 'တစ်နာရီ',
  25077. hh: '%d နာရီ',
  25078. d: 'တစ်ရက်',
  25079. dd: '%d ရက်',
  25080. M: 'တစ်လ',
  25081. MM: '%d လ',
  25082. y: 'တစ်နှစ်',
  25083. yy: '%d နှစ်',
  25084. },
  25085. preparse: function (string) {
  25086. return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
  25087. return numberMap[match];
  25088. });
  25089. },
  25090. postformat: function (string) {
  25091. return string.replace(/\d/g, function (match) {
  25092. return symbolMap[match];
  25093. });
  25094. },
  25095. week: {
  25096. dow: 1, // Monday is the first day of the week.
  25097. doy: 4, // The week that contains Jan 4th is the first week of the year.
  25098. },
  25099. });
  25100. return my;
  25101. })));
  25102. /***/ }),
  25103. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nb.js":
  25104. /*!***************************************************************************!*\
  25105. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nb.js ***!
  25106. \***************************************************************************/
  25107. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25108. //! moment.js locale configuration
  25109. //! locale : Norwegian Bokmål [nb]
  25110. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  25111. //! Sigurd Gartmann : https://github.com/sigurdga
  25112. //! Stephen Ramthun : https://github.com/stephenramthun
  25113. ;(function (global, factory) {
  25114. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25115. 0
  25116. }(this, (function (moment) { 'use strict';
  25117. //! moment.js locale configuration
  25118. var nb = moment.defineLocale('nb', {
  25119. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
  25120. '_'
  25121. ),
  25122. monthsShort:
  25123. 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  25124. monthsParseExact: true,
  25125. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  25126. weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  25127. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  25128. weekdaysParseExact: true,
  25129. longDateFormat: {
  25130. LT: 'HH:mm',
  25131. LTS: 'HH:mm:ss',
  25132. L: 'DD.MM.YYYY',
  25133. LL: 'D. MMMM YYYY',
  25134. LLL: 'D. MMMM YYYY [kl.] HH:mm',
  25135. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
  25136. },
  25137. calendar: {
  25138. sameDay: '[i dag kl.] LT',
  25139. nextDay: '[i morgen kl.] LT',
  25140. nextWeek: 'dddd [kl.] LT',
  25141. lastDay: '[i går kl.] LT',
  25142. lastWeek: '[forrige] dddd [kl.] LT',
  25143. sameElse: 'L',
  25144. },
  25145. relativeTime: {
  25146. future: 'om %s',
  25147. past: '%s siden',
  25148. s: 'noen sekunder',
  25149. ss: '%d sekunder',
  25150. m: 'ett minutt',
  25151. mm: '%d minutter',
  25152. h: 'en time',
  25153. hh: '%d timer',
  25154. d: 'en dag',
  25155. dd: '%d dager',
  25156. w: 'en uke',
  25157. ww: '%d uker',
  25158. M: 'en måned',
  25159. MM: '%d måneder',
  25160. y: 'ett år',
  25161. yy: '%d år',
  25162. },
  25163. dayOfMonthOrdinalParse: /\d{1,2}\./,
  25164. ordinal: '%d.',
  25165. week: {
  25166. dow: 1, // Monday is the first day of the week.
  25167. doy: 4, // The week that contains Jan 4th is the first week of the year.
  25168. },
  25169. });
  25170. return nb;
  25171. })));
  25172. /***/ }),
  25173. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ne.js":
  25174. /*!***************************************************************************!*\
  25175. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ne.js ***!
  25176. \***************************************************************************/
  25177. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25178. //! moment.js locale configuration
  25179. //! locale : Nepalese [ne]
  25180. //! author : suvash : https://github.com/suvash
  25181. ;(function (global, factory) {
  25182. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25183. 0
  25184. }(this, (function (moment) { 'use strict';
  25185. //! moment.js locale configuration
  25186. var symbolMap = {
  25187. 1: '१',
  25188. 2: '२',
  25189. 3: '३',
  25190. 4: '४',
  25191. 5: '५',
  25192. 6: '६',
  25193. 7: '७',
  25194. 8: '८',
  25195. 9: '९',
  25196. 0: '०',
  25197. },
  25198. numberMap = {
  25199. '१': '1',
  25200. '२': '2',
  25201. '३': '3',
  25202. '४': '4',
  25203. '५': '5',
  25204. '६': '6',
  25205. '७': '7',
  25206. '८': '8',
  25207. '९': '9',
  25208. '०': '0',
  25209. };
  25210. var ne = moment.defineLocale('ne', {
  25211. months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
  25212. '_'
  25213. ),
  25214. monthsShort:
  25215. 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
  25216. '_'
  25217. ),
  25218. monthsParseExact: true,
  25219. weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
  25220. '_'
  25221. ),
  25222. weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
  25223. weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
  25224. weekdaysParseExact: true,
  25225. longDateFormat: {
  25226. LT: 'Aको h:mm बजे',
  25227. LTS: 'Aको h:mm:ss बजे',
  25228. L: 'DD/MM/YYYY',
  25229. LL: 'D MMMM YYYY',
  25230. LLL: 'D MMMM YYYY, Aको h:mm बजे',
  25231. LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
  25232. },
  25233. preparse: function (string) {
  25234. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  25235. return numberMap[match];
  25236. });
  25237. },
  25238. postformat: function (string) {
  25239. return string.replace(/\d/g, function (match) {
  25240. return symbolMap[match];
  25241. });
  25242. },
  25243. meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
  25244. meridiemHour: function (hour, meridiem) {
  25245. if (hour === 12) {
  25246. hour = 0;
  25247. }
  25248. if (meridiem === 'राति') {
  25249. return hour < 4 ? hour : hour + 12;
  25250. } else if (meridiem === 'बिहान') {
  25251. return hour;
  25252. } else if (meridiem === 'दिउँसो') {
  25253. return hour >= 10 ? hour : hour + 12;
  25254. } else if (meridiem === 'साँझ') {
  25255. return hour + 12;
  25256. }
  25257. },
  25258. meridiem: function (hour, minute, isLower) {
  25259. if (hour < 3) {
  25260. return 'राति';
  25261. } else if (hour < 12) {
  25262. return 'बिहान';
  25263. } else if (hour < 16) {
  25264. return 'दिउँसो';
  25265. } else if (hour < 20) {
  25266. return 'साँझ';
  25267. } else {
  25268. return 'राति';
  25269. }
  25270. },
  25271. calendar: {
  25272. sameDay: '[आज] LT',
  25273. nextDay: '[भोलि] LT',
  25274. nextWeek: '[आउँदो] dddd[,] LT',
  25275. lastDay: '[हिजो] LT',
  25276. lastWeek: '[गएको] dddd[,] LT',
  25277. sameElse: 'L',
  25278. },
  25279. relativeTime: {
  25280. future: '%sमा',
  25281. past: '%s अगाडि',
  25282. s: 'केही क्षण',
  25283. ss: '%d सेकेण्ड',
  25284. m: 'एक मिनेट',
  25285. mm: '%d मिनेट',
  25286. h: 'एक घण्टा',
  25287. hh: '%d घण्टा',
  25288. d: 'एक दिन',
  25289. dd: '%d दिन',
  25290. M: 'एक महिना',
  25291. MM: '%d महिना',
  25292. y: 'एक बर्ष',
  25293. yy: '%d बर्ष',
  25294. },
  25295. week: {
  25296. dow: 0, // Sunday is the first day of the week.
  25297. doy: 6, // The week that contains Jan 6th is the first week of the year.
  25298. },
  25299. });
  25300. return ne;
  25301. })));
  25302. /***/ }),
  25303. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl-be.js":
  25304. /*!******************************************************************************!*\
  25305. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl-be.js ***!
  25306. \******************************************************************************/
  25307. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25308. //! moment.js locale configuration
  25309. //! locale : Dutch (Belgium) [nl-be]
  25310. //! author : Joris Röling : https://github.com/jorisroling
  25311. //! author : Jacob Middag : https://github.com/middagj
  25312. ;(function (global, factory) {
  25313. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25314. 0
  25315. }(this, (function (moment) { 'use strict';
  25316. //! moment.js locale configuration
  25317. var monthsShortWithDots =
  25318. 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
  25319. monthsShortWithoutDots =
  25320. 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  25321. monthsParse = [
  25322. /^jan/i,
  25323. /^feb/i,
  25324. /^maart|mrt.?$/i,
  25325. /^apr/i,
  25326. /^mei$/i,
  25327. /^jun[i.]?$/i,
  25328. /^jul[i.]?$/i,
  25329. /^aug/i,
  25330. /^sep/i,
  25331. /^okt/i,
  25332. /^nov/i,
  25333. /^dec/i,
  25334. ],
  25335. monthsRegex =
  25336. /^(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;
  25337. var nlBe = moment.defineLocale('nl-be', {
  25338. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  25339. '_'
  25340. ),
  25341. monthsShort: function (m, format) {
  25342. if (!m) {
  25343. return monthsShortWithDots;
  25344. } else if (/-MMM-/.test(format)) {
  25345. return monthsShortWithoutDots[m.month()];
  25346. } else {
  25347. return monthsShortWithDots[m.month()];
  25348. }
  25349. },
  25350. monthsRegex: monthsRegex,
  25351. monthsShortRegex: monthsRegex,
  25352. monthsStrictRegex:
  25353. /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  25354. monthsShortStrictRegex:
  25355. /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  25356. monthsParse: monthsParse,
  25357. longMonthsParse: monthsParse,
  25358. shortMonthsParse: monthsParse,
  25359. weekdays:
  25360. 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  25361. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  25362. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  25363. weekdaysParseExact: true,
  25364. longDateFormat: {
  25365. LT: 'HH:mm',
  25366. LTS: 'HH:mm:ss',
  25367. L: 'DD/MM/YYYY',
  25368. LL: 'D MMMM YYYY',
  25369. LLL: 'D MMMM YYYY HH:mm',
  25370. LLLL: 'dddd D MMMM YYYY HH:mm',
  25371. },
  25372. calendar: {
  25373. sameDay: '[vandaag om] LT',
  25374. nextDay: '[morgen om] LT',
  25375. nextWeek: 'dddd [om] LT',
  25376. lastDay: '[gisteren om] LT',
  25377. lastWeek: '[afgelopen] dddd [om] LT',
  25378. sameElse: 'L',
  25379. },
  25380. relativeTime: {
  25381. future: 'over %s',
  25382. past: '%s geleden',
  25383. s: 'een paar seconden',
  25384. ss: '%d seconden',
  25385. m: 'één minuut',
  25386. mm: '%d minuten',
  25387. h: 'één uur',
  25388. hh: '%d uur',
  25389. d: 'één dag',
  25390. dd: '%d dagen',
  25391. M: 'één maand',
  25392. MM: '%d maanden',
  25393. y: 'één jaar',
  25394. yy: '%d jaar',
  25395. },
  25396. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  25397. ordinal: function (number) {
  25398. return (
  25399. number +
  25400. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  25401. );
  25402. },
  25403. week: {
  25404. dow: 1, // Monday is the first day of the week.
  25405. doy: 4, // The week that contains Jan 4th is the first week of the year.
  25406. },
  25407. });
  25408. return nlBe;
  25409. })));
  25410. /***/ }),
  25411. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl.js":
  25412. /*!***************************************************************************!*\
  25413. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl.js ***!
  25414. \***************************************************************************/
  25415. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25416. //! moment.js locale configuration
  25417. //! locale : Dutch [nl]
  25418. //! author : Joris Röling : https://github.com/jorisroling
  25419. //! author : Jacob Middag : https://github.com/middagj
  25420. ;(function (global, factory) {
  25421. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25422. 0
  25423. }(this, (function (moment) { 'use strict';
  25424. //! moment.js locale configuration
  25425. var monthsShortWithDots =
  25426. 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
  25427. monthsShortWithoutDots =
  25428. 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  25429. monthsParse = [
  25430. /^jan/i,
  25431. /^feb/i,
  25432. /^maart|mrt.?$/i,
  25433. /^apr/i,
  25434. /^mei$/i,
  25435. /^jun[i.]?$/i,
  25436. /^jul[i.]?$/i,
  25437. /^aug/i,
  25438. /^sep/i,
  25439. /^okt/i,
  25440. /^nov/i,
  25441. /^dec/i,
  25442. ],
  25443. monthsRegex =
  25444. /^(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;
  25445. var nl = moment.defineLocale('nl', {
  25446. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  25447. '_'
  25448. ),
  25449. monthsShort: function (m, format) {
  25450. if (!m) {
  25451. return monthsShortWithDots;
  25452. } else if (/-MMM-/.test(format)) {
  25453. return monthsShortWithoutDots[m.month()];
  25454. } else {
  25455. return monthsShortWithDots[m.month()];
  25456. }
  25457. },
  25458. monthsRegex: monthsRegex,
  25459. monthsShortRegex: monthsRegex,
  25460. monthsStrictRegex:
  25461. /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  25462. monthsShortStrictRegex:
  25463. /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  25464. monthsParse: monthsParse,
  25465. longMonthsParse: monthsParse,
  25466. shortMonthsParse: monthsParse,
  25467. weekdays:
  25468. 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  25469. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  25470. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  25471. weekdaysParseExact: true,
  25472. longDateFormat: {
  25473. LT: 'HH:mm',
  25474. LTS: 'HH:mm:ss',
  25475. L: 'DD-MM-YYYY',
  25476. LL: 'D MMMM YYYY',
  25477. LLL: 'D MMMM YYYY HH:mm',
  25478. LLLL: 'dddd D MMMM YYYY HH:mm',
  25479. },
  25480. calendar: {
  25481. sameDay: '[vandaag om] LT',
  25482. nextDay: '[morgen om] LT',
  25483. nextWeek: 'dddd [om] LT',
  25484. lastDay: '[gisteren om] LT',
  25485. lastWeek: '[afgelopen] dddd [om] LT',
  25486. sameElse: 'L',
  25487. },
  25488. relativeTime: {
  25489. future: 'over %s',
  25490. past: '%s geleden',
  25491. s: 'een paar seconden',
  25492. ss: '%d seconden',
  25493. m: 'één minuut',
  25494. mm: '%d minuten',
  25495. h: 'één uur',
  25496. hh: '%d uur',
  25497. d: 'één dag',
  25498. dd: '%d dagen',
  25499. w: 'één week',
  25500. ww: '%d weken',
  25501. M: 'één maand',
  25502. MM: '%d maanden',
  25503. y: 'één jaar',
  25504. yy: '%d jaar',
  25505. },
  25506. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  25507. ordinal: function (number) {
  25508. return (
  25509. number +
  25510. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  25511. );
  25512. },
  25513. week: {
  25514. dow: 1, // Monday is the first day of the week.
  25515. doy: 4, // The week that contains Jan 4th is the first week of the year.
  25516. },
  25517. });
  25518. return nl;
  25519. })));
  25520. /***/ }),
  25521. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nn.js":
  25522. /*!***************************************************************************!*\
  25523. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nn.js ***!
  25524. \***************************************************************************/
  25525. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25526. //! moment.js locale configuration
  25527. //! locale : Nynorsk [nn]
  25528. //! authors : https://github.com/mechuwind
  25529. //! Stephen Ramthun : https://github.com/stephenramthun
  25530. ;(function (global, factory) {
  25531. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25532. 0
  25533. }(this, (function (moment) { 'use strict';
  25534. //! moment.js locale configuration
  25535. var nn = moment.defineLocale('nn', {
  25536. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
  25537. '_'
  25538. ),
  25539. monthsShort:
  25540. 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  25541. monthsParseExact: true,
  25542. weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
  25543. weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
  25544. weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
  25545. weekdaysParseExact: true,
  25546. longDateFormat: {
  25547. LT: 'HH:mm',
  25548. LTS: 'HH:mm:ss',
  25549. L: 'DD.MM.YYYY',
  25550. LL: 'D. MMMM YYYY',
  25551. LLL: 'D. MMMM YYYY [kl.] H:mm',
  25552. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
  25553. },
  25554. calendar: {
  25555. sameDay: '[I dag klokka] LT',
  25556. nextDay: '[I morgon klokka] LT',
  25557. nextWeek: 'dddd [klokka] LT',
  25558. lastDay: '[I går klokka] LT',
  25559. lastWeek: '[Føregåande] dddd [klokka] LT',
  25560. sameElse: 'L',
  25561. },
  25562. relativeTime: {
  25563. future: 'om %s',
  25564. past: '%s sidan',
  25565. s: 'nokre sekund',
  25566. ss: '%d sekund',
  25567. m: 'eit minutt',
  25568. mm: '%d minutt',
  25569. h: 'ein time',
  25570. hh: '%d timar',
  25571. d: 'ein dag',
  25572. dd: '%d dagar',
  25573. w: 'ei veke',
  25574. ww: '%d veker',
  25575. M: 'ein månad',
  25576. MM: '%d månader',
  25577. y: 'eit år',
  25578. yy: '%d år',
  25579. },
  25580. dayOfMonthOrdinalParse: /\d{1,2}\./,
  25581. ordinal: '%d.',
  25582. week: {
  25583. dow: 1, // Monday is the first day of the week.
  25584. doy: 4, // The week that contains Jan 4th is the first week of the year.
  25585. },
  25586. });
  25587. return nn;
  25588. })));
  25589. /***/ }),
  25590. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/oc-lnc.js":
  25591. /*!*******************************************************************************!*\
  25592. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/oc-lnc.js ***!
  25593. \*******************************************************************************/
  25594. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25595. //! moment.js locale configuration
  25596. //! locale : Occitan, lengadocian dialecte [oc-lnc]
  25597. //! author : Quentin PAGÈS : https://github.com/Quenty31
  25598. ;(function (global, factory) {
  25599. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25600. 0
  25601. }(this, (function (moment) { 'use strict';
  25602. //! moment.js locale configuration
  25603. var ocLnc = moment.defineLocale('oc-lnc', {
  25604. months: {
  25605. standalone:
  25606. 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
  25607. '_'
  25608. ),
  25609. 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(
  25610. '_'
  25611. ),
  25612. isFormat: /D[oD]?(\s)+MMMM/,
  25613. },
  25614. monthsShort:
  25615. 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
  25616. '_'
  25617. ),
  25618. monthsParseExact: true,
  25619. weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
  25620. '_'
  25621. ),
  25622. weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
  25623. weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
  25624. weekdaysParseExact: true,
  25625. longDateFormat: {
  25626. LT: 'H:mm',
  25627. LTS: 'H:mm:ss',
  25628. L: 'DD/MM/YYYY',
  25629. LL: 'D MMMM [de] YYYY',
  25630. ll: 'D MMM YYYY',
  25631. LLL: 'D MMMM [de] YYYY [a] H:mm',
  25632. lll: 'D MMM YYYY, H:mm',
  25633. LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
  25634. llll: 'ddd D MMM YYYY, H:mm',
  25635. },
  25636. calendar: {
  25637. sameDay: '[uèi a] LT',
  25638. nextDay: '[deman a] LT',
  25639. nextWeek: 'dddd [a] LT',
  25640. lastDay: '[ièr a] LT',
  25641. lastWeek: 'dddd [passat a] LT',
  25642. sameElse: 'L',
  25643. },
  25644. relativeTime: {
  25645. future: "d'aquí %s",
  25646. past: 'fa %s',
  25647. s: 'unas segondas',
  25648. ss: '%d segondas',
  25649. m: 'una minuta',
  25650. mm: '%d minutas',
  25651. h: 'una ora',
  25652. hh: '%d oras',
  25653. d: 'un jorn',
  25654. dd: '%d jorns',
  25655. M: 'un mes',
  25656. MM: '%d meses',
  25657. y: 'un an',
  25658. yy: '%d ans',
  25659. },
  25660. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  25661. ordinal: function (number, period) {
  25662. var output =
  25663. number === 1
  25664. ? 'r'
  25665. : number === 2
  25666. ? 'n'
  25667. : number === 3
  25668. ? 'r'
  25669. : number === 4
  25670. ? 't'
  25671. : 'è';
  25672. if (period === 'w' || period === 'W') {
  25673. output = 'a';
  25674. }
  25675. return number + output;
  25676. },
  25677. week: {
  25678. dow: 1, // Monday is the first day of the week.
  25679. doy: 4,
  25680. },
  25681. });
  25682. return ocLnc;
  25683. })));
  25684. /***/ }),
  25685. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pa-in.js":
  25686. /*!******************************************************************************!*\
  25687. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pa-in.js ***!
  25688. \******************************************************************************/
  25689. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25690. //! moment.js locale configuration
  25691. //! locale : Punjabi (India) [pa-in]
  25692. //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
  25693. ;(function (global, factory) {
  25694. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25695. 0
  25696. }(this, (function (moment) { 'use strict';
  25697. //! moment.js locale configuration
  25698. var symbolMap = {
  25699. 1: '੧',
  25700. 2: '੨',
  25701. 3: '੩',
  25702. 4: '੪',
  25703. 5: '੫',
  25704. 6: '੬',
  25705. 7: '੭',
  25706. 8: '੮',
  25707. 9: '੯',
  25708. 0: '੦',
  25709. },
  25710. numberMap = {
  25711. '੧': '1',
  25712. '੨': '2',
  25713. '੩': '3',
  25714. '੪': '4',
  25715. '੫': '5',
  25716. '੬': '6',
  25717. '੭': '7',
  25718. '੮': '8',
  25719. '੯': '9',
  25720. '੦': '0',
  25721. };
  25722. var paIn = moment.defineLocale('pa-in', {
  25723. // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
  25724. months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
  25725. '_'
  25726. ),
  25727. monthsShort:
  25728. 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
  25729. '_'
  25730. ),
  25731. weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
  25732. '_'
  25733. ),
  25734. weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  25735. weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  25736. longDateFormat: {
  25737. LT: 'A h:mm ਵਜੇ',
  25738. LTS: 'A h:mm:ss ਵਜੇ',
  25739. L: 'DD/MM/YYYY',
  25740. LL: 'D MMMM YYYY',
  25741. LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
  25742. LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
  25743. },
  25744. calendar: {
  25745. sameDay: '[ਅਜ] LT',
  25746. nextDay: '[ਕਲ] LT',
  25747. nextWeek: '[ਅਗਲਾ] dddd, LT',
  25748. lastDay: '[ਕਲ] LT',
  25749. lastWeek: '[ਪਿਛਲੇ] dddd, LT',
  25750. sameElse: 'L',
  25751. },
  25752. relativeTime: {
  25753. future: '%s ਵਿੱਚ',
  25754. past: '%s ਪਿਛਲੇ',
  25755. s: 'ਕੁਝ ਸਕਿੰਟ',
  25756. ss: '%d ਸਕਿੰਟ',
  25757. m: 'ਇਕ ਮਿੰਟ',
  25758. mm: '%d ਮਿੰਟ',
  25759. h: 'ਇੱਕ ਘੰਟਾ',
  25760. hh: '%d ਘੰਟੇ',
  25761. d: 'ਇੱਕ ਦਿਨ',
  25762. dd: '%d ਦਿਨ',
  25763. M: 'ਇੱਕ ਮਹੀਨਾ',
  25764. MM: '%d ਮਹੀਨੇ',
  25765. y: 'ਇੱਕ ਸਾਲ',
  25766. yy: '%d ਸਾਲ',
  25767. },
  25768. preparse: function (string) {
  25769. return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
  25770. return numberMap[match];
  25771. });
  25772. },
  25773. postformat: function (string) {
  25774. return string.replace(/\d/g, function (match) {
  25775. return symbolMap[match];
  25776. });
  25777. },
  25778. // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
  25779. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
  25780. meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
  25781. meridiemHour: function (hour, meridiem) {
  25782. if (hour === 12) {
  25783. hour = 0;
  25784. }
  25785. if (meridiem === 'ਰਾਤ') {
  25786. return hour < 4 ? hour : hour + 12;
  25787. } else if (meridiem === 'ਸਵੇਰ') {
  25788. return hour;
  25789. } else if (meridiem === 'ਦੁਪਹਿਰ') {
  25790. return hour >= 10 ? hour : hour + 12;
  25791. } else if (meridiem === 'ਸ਼ਾਮ') {
  25792. return hour + 12;
  25793. }
  25794. },
  25795. meridiem: function (hour, minute, isLower) {
  25796. if (hour < 4) {
  25797. return 'ਰਾਤ';
  25798. } else if (hour < 10) {
  25799. return 'ਸਵੇਰ';
  25800. } else if (hour < 17) {
  25801. return 'ਦੁਪਹਿਰ';
  25802. } else if (hour < 20) {
  25803. return 'ਸ਼ਾਮ';
  25804. } else {
  25805. return 'ਰਾਤ';
  25806. }
  25807. },
  25808. week: {
  25809. dow: 0, // Sunday is the first day of the week.
  25810. doy: 6, // The week that contains Jan 6th is the first week of the year.
  25811. },
  25812. });
  25813. return paIn;
  25814. })));
  25815. /***/ }),
  25816. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pl.js":
  25817. /*!***************************************************************************!*\
  25818. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pl.js ***!
  25819. \***************************************************************************/
  25820. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25821. //! moment.js locale configuration
  25822. //! locale : Polish [pl]
  25823. //! author : Rafal Hirsz : https://github.com/evoL
  25824. ;(function (global, factory) {
  25825. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25826. 0
  25827. }(this, (function (moment) { 'use strict';
  25828. //! moment.js locale configuration
  25829. var monthsNominative =
  25830. 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
  25831. '_'
  25832. ),
  25833. monthsSubjective =
  25834. 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
  25835. '_'
  25836. ),
  25837. monthsParse = [
  25838. /^sty/i,
  25839. /^lut/i,
  25840. /^mar/i,
  25841. /^kwi/i,
  25842. /^maj/i,
  25843. /^cze/i,
  25844. /^lip/i,
  25845. /^sie/i,
  25846. /^wrz/i,
  25847. /^paź/i,
  25848. /^lis/i,
  25849. /^gru/i,
  25850. ];
  25851. function plural(n) {
  25852. return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
  25853. }
  25854. function translate(number, withoutSuffix, key) {
  25855. var result = number + ' ';
  25856. switch (key) {
  25857. case 'ss':
  25858. return result + (plural(number) ? 'sekundy' : 'sekund');
  25859. case 'm':
  25860. return withoutSuffix ? 'minuta' : 'minutę';
  25861. case 'mm':
  25862. return result + (plural(number) ? 'minuty' : 'minut');
  25863. case 'h':
  25864. return withoutSuffix ? 'godzina' : 'godzinę';
  25865. case 'hh':
  25866. return result + (plural(number) ? 'godziny' : 'godzin');
  25867. case 'ww':
  25868. return result + (plural(number) ? 'tygodnie' : 'tygodni');
  25869. case 'MM':
  25870. return result + (plural(number) ? 'miesiące' : 'miesięcy');
  25871. case 'yy':
  25872. return result + (plural(number) ? 'lata' : 'lat');
  25873. }
  25874. }
  25875. var pl = moment.defineLocale('pl', {
  25876. months: function (momentToFormat, format) {
  25877. if (!momentToFormat) {
  25878. return monthsNominative;
  25879. } else if (/D MMMM/.test(format)) {
  25880. return monthsSubjective[momentToFormat.month()];
  25881. } else {
  25882. return monthsNominative[momentToFormat.month()];
  25883. }
  25884. },
  25885. monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  25886. monthsParse: monthsParse,
  25887. longMonthsParse: monthsParse,
  25888. shortMonthsParse: monthsParse,
  25889. weekdays:
  25890. 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
  25891. weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  25892. weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  25893. longDateFormat: {
  25894. LT: 'HH:mm',
  25895. LTS: 'HH:mm:ss',
  25896. L: 'DD.MM.YYYY',
  25897. LL: 'D MMMM YYYY',
  25898. LLL: 'D MMMM YYYY HH:mm',
  25899. LLLL: 'dddd, D MMMM YYYY HH:mm',
  25900. },
  25901. calendar: {
  25902. sameDay: '[Dziś o] LT',
  25903. nextDay: '[Jutro o] LT',
  25904. nextWeek: function () {
  25905. switch (this.day()) {
  25906. case 0:
  25907. return '[W niedzielę o] LT';
  25908. case 2:
  25909. return '[We wtorek o] LT';
  25910. case 3:
  25911. return '[W środę o] LT';
  25912. case 6:
  25913. return '[W sobotę o] LT';
  25914. default:
  25915. return '[W] dddd [o] LT';
  25916. }
  25917. },
  25918. lastDay: '[Wczoraj o] LT',
  25919. lastWeek: function () {
  25920. switch (this.day()) {
  25921. case 0:
  25922. return '[W zeszłą niedzielę o] LT';
  25923. case 3:
  25924. return '[W zeszłą środę o] LT';
  25925. case 6:
  25926. return '[W zeszłą sobotę o] LT';
  25927. default:
  25928. return '[W zeszły] dddd [o] LT';
  25929. }
  25930. },
  25931. sameElse: 'L',
  25932. },
  25933. relativeTime: {
  25934. future: 'za %s',
  25935. past: '%s temu',
  25936. s: 'kilka sekund',
  25937. ss: translate,
  25938. m: translate,
  25939. mm: translate,
  25940. h: translate,
  25941. hh: translate,
  25942. d: '1 dzień',
  25943. dd: '%d dni',
  25944. w: 'tydzień',
  25945. ww: translate,
  25946. M: 'miesiąc',
  25947. MM: translate,
  25948. y: 'rok',
  25949. yy: translate,
  25950. },
  25951. dayOfMonthOrdinalParse: /\d{1,2}\./,
  25952. ordinal: '%d.',
  25953. week: {
  25954. dow: 1, // Monday is the first day of the week.
  25955. doy: 4, // The week that contains Jan 4th is the first week of the year.
  25956. },
  25957. });
  25958. return pl;
  25959. })));
  25960. /***/ }),
  25961. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt-br.js":
  25962. /*!******************************************************************************!*\
  25963. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt-br.js ***!
  25964. \******************************************************************************/
  25965. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  25966. //! moment.js locale configuration
  25967. //! locale : Portuguese (Brazil) [pt-br]
  25968. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  25969. ;(function (global, factory) {
  25970. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  25971. 0
  25972. }(this, (function (moment) { 'use strict';
  25973. //! moment.js locale configuration
  25974. var ptBr = moment.defineLocale('pt-br', {
  25975. months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
  25976. '_'
  25977. ),
  25978. monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  25979. weekdays:
  25980. 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
  25981. '_'
  25982. ),
  25983. weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
  25984. weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
  25985. weekdaysParseExact: true,
  25986. longDateFormat: {
  25987. LT: 'HH:mm',
  25988. LTS: 'HH:mm:ss',
  25989. L: 'DD/MM/YYYY',
  25990. LL: 'D [de] MMMM [de] YYYY',
  25991. LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
  25992. LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
  25993. },
  25994. calendar: {
  25995. sameDay: '[Hoje às] LT',
  25996. nextDay: '[Amanhã às] LT',
  25997. nextWeek: 'dddd [às] LT',
  25998. lastDay: '[Ontem às] LT',
  25999. lastWeek: function () {
  26000. return this.day() === 0 || this.day() === 6
  26001. ? '[Último] dddd [às] LT' // Saturday + Sunday
  26002. : '[Última] dddd [às] LT'; // Monday - Friday
  26003. },
  26004. sameElse: 'L',
  26005. },
  26006. relativeTime: {
  26007. future: 'em %s',
  26008. past: 'há %s',
  26009. s: 'poucos segundos',
  26010. ss: '%d segundos',
  26011. m: 'um minuto',
  26012. mm: '%d minutos',
  26013. h: 'uma hora',
  26014. hh: '%d horas',
  26015. d: 'um dia',
  26016. dd: '%d dias',
  26017. M: 'um mês',
  26018. MM: '%d meses',
  26019. y: 'um ano',
  26020. yy: '%d anos',
  26021. },
  26022. dayOfMonthOrdinalParse: /\d{1,2}º/,
  26023. ordinal: '%dº',
  26024. invalidDate: 'Data inválida',
  26025. });
  26026. return ptBr;
  26027. })));
  26028. /***/ }),
  26029. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt.js":
  26030. /*!***************************************************************************!*\
  26031. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt.js ***!
  26032. \***************************************************************************/
  26033. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26034. //! moment.js locale configuration
  26035. //! locale : Portuguese [pt]
  26036. //! author : Jefferson : https://github.com/jalex79
  26037. ;(function (global, factory) {
  26038. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26039. 0
  26040. }(this, (function (moment) { 'use strict';
  26041. //! moment.js locale configuration
  26042. var pt = moment.defineLocale('pt', {
  26043. months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
  26044. '_'
  26045. ),
  26046. monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  26047. weekdays:
  26048. 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
  26049. '_'
  26050. ),
  26051. weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  26052. weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  26053. weekdaysParseExact: true,
  26054. longDateFormat: {
  26055. LT: 'HH:mm',
  26056. LTS: 'HH:mm:ss',
  26057. L: 'DD/MM/YYYY',
  26058. LL: 'D [de] MMMM [de] YYYY',
  26059. LLL: 'D [de] MMMM [de] YYYY HH:mm',
  26060. LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
  26061. },
  26062. calendar: {
  26063. sameDay: '[Hoje às] LT',
  26064. nextDay: '[Amanhã às] LT',
  26065. nextWeek: 'dddd [às] LT',
  26066. lastDay: '[Ontem às] LT',
  26067. lastWeek: function () {
  26068. return this.day() === 0 || this.day() === 6
  26069. ? '[Último] dddd [às] LT' // Saturday + Sunday
  26070. : '[Última] dddd [às] LT'; // Monday - Friday
  26071. },
  26072. sameElse: 'L',
  26073. },
  26074. relativeTime: {
  26075. future: 'em %s',
  26076. past: 'há %s',
  26077. s: 'segundos',
  26078. ss: '%d segundos',
  26079. m: 'um minuto',
  26080. mm: '%d minutos',
  26081. h: 'uma hora',
  26082. hh: '%d horas',
  26083. d: 'um dia',
  26084. dd: '%d dias',
  26085. w: 'uma semana',
  26086. ww: '%d semanas',
  26087. M: 'um mês',
  26088. MM: '%d meses',
  26089. y: 'um ano',
  26090. yy: '%d anos',
  26091. },
  26092. dayOfMonthOrdinalParse: /\d{1,2}º/,
  26093. ordinal: '%dº',
  26094. week: {
  26095. dow: 1, // Monday is the first day of the week.
  26096. doy: 4, // The week that contains Jan 4th is the first week of the year.
  26097. },
  26098. });
  26099. return pt;
  26100. })));
  26101. /***/ }),
  26102. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ro.js":
  26103. /*!***************************************************************************!*\
  26104. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ro.js ***!
  26105. \***************************************************************************/
  26106. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26107. //! moment.js locale configuration
  26108. //! locale : Romanian [ro]
  26109. //! author : Vlad Gurdiga : https://github.com/gurdiga
  26110. //! author : Valentin Agachi : https://github.com/avaly
  26111. //! author : Emanuel Cepoi : https://github.com/cepem
  26112. ;(function (global, factory) {
  26113. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26114. 0
  26115. }(this, (function (moment) { 'use strict';
  26116. //! moment.js locale configuration
  26117. function relativeTimeWithPlural(number, withoutSuffix, key) {
  26118. var format = {
  26119. ss: 'secunde',
  26120. mm: 'minute',
  26121. hh: 'ore',
  26122. dd: 'zile',
  26123. ww: 'săptămâni',
  26124. MM: 'luni',
  26125. yy: 'ani',
  26126. },
  26127. separator = ' ';
  26128. if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
  26129. separator = ' de ';
  26130. }
  26131. return number + separator + format[key];
  26132. }
  26133. var ro = moment.defineLocale('ro', {
  26134. months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
  26135. '_'
  26136. ),
  26137. monthsShort:
  26138. 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
  26139. '_'
  26140. ),
  26141. monthsParseExact: true,
  26142. weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  26143. weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  26144. weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  26145. longDateFormat: {
  26146. LT: 'H:mm',
  26147. LTS: 'H:mm:ss',
  26148. L: 'DD.MM.YYYY',
  26149. LL: 'D MMMM YYYY',
  26150. LLL: 'D MMMM YYYY H:mm',
  26151. LLLL: 'dddd, D MMMM YYYY H:mm',
  26152. },
  26153. calendar: {
  26154. sameDay: '[azi la] LT',
  26155. nextDay: '[mâine la] LT',
  26156. nextWeek: 'dddd [la] LT',
  26157. lastDay: '[ieri la] LT',
  26158. lastWeek: '[fosta] dddd [la] LT',
  26159. sameElse: 'L',
  26160. },
  26161. relativeTime: {
  26162. future: 'peste %s',
  26163. past: '%s în urmă',
  26164. s: 'câteva secunde',
  26165. ss: relativeTimeWithPlural,
  26166. m: 'un minut',
  26167. mm: relativeTimeWithPlural,
  26168. h: 'o oră',
  26169. hh: relativeTimeWithPlural,
  26170. d: 'o zi',
  26171. dd: relativeTimeWithPlural,
  26172. w: 'o săptămână',
  26173. ww: relativeTimeWithPlural,
  26174. M: 'o lună',
  26175. MM: relativeTimeWithPlural,
  26176. y: 'un an',
  26177. yy: relativeTimeWithPlural,
  26178. },
  26179. week: {
  26180. dow: 1, // Monday is the first day of the week.
  26181. doy: 7, // The week that contains Jan 7th is the first week of the year.
  26182. },
  26183. });
  26184. return ro;
  26185. })));
  26186. /***/ }),
  26187. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ru.js":
  26188. /*!***************************************************************************!*\
  26189. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ru.js ***!
  26190. \***************************************************************************/
  26191. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26192. //! moment.js locale configuration
  26193. //! locale : Russian [ru]
  26194. //! author : Viktorminator : https://github.com/Viktorminator
  26195. //! author : Menelion Elensúle : https://github.com/Oire
  26196. //! author : Коренберг Марк : https://github.com/socketpair
  26197. ;(function (global, factory) {
  26198. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26199. 0
  26200. }(this, (function (moment) { 'use strict';
  26201. //! moment.js locale configuration
  26202. function plural(word, num) {
  26203. var forms = word.split('_');
  26204. return num % 10 === 1 && num % 100 !== 11
  26205. ? forms[0]
  26206. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  26207. ? forms[1]
  26208. : forms[2];
  26209. }
  26210. function relativeTimeWithPlural(number, withoutSuffix, key) {
  26211. var format = {
  26212. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  26213. mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  26214. hh: 'час_часа_часов',
  26215. dd: 'день_дня_дней',
  26216. ww: 'неделя_недели_недель',
  26217. MM: 'месяц_месяца_месяцев',
  26218. yy: 'год_года_лет',
  26219. };
  26220. if (key === 'm') {
  26221. return withoutSuffix ? 'минута' : 'минуту';
  26222. } else {
  26223. return number + ' ' + plural(format[key], +number);
  26224. }
  26225. }
  26226. var monthsParse = [
  26227. /^янв/i,
  26228. /^фев/i,
  26229. /^мар/i,
  26230. /^апр/i,
  26231. /^ма[йя]/i,
  26232. /^июн/i,
  26233. /^июл/i,
  26234. /^авг/i,
  26235. /^сен/i,
  26236. /^окт/i,
  26237. /^ноя/i,
  26238. /^дек/i,
  26239. ];
  26240. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  26241. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  26242. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  26243. var ru = moment.defineLocale('ru', {
  26244. months: {
  26245. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
  26246. '_'
  26247. ),
  26248. standalone:
  26249. 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
  26250. '_'
  26251. ),
  26252. },
  26253. monthsShort: {
  26254. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
  26255. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
  26256. '_'
  26257. ),
  26258. standalone:
  26259. 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
  26260. '_'
  26261. ),
  26262. },
  26263. weekdays: {
  26264. standalone:
  26265. 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
  26266. '_'
  26267. ),
  26268. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
  26269. '_'
  26270. ),
  26271. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
  26272. },
  26273. weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  26274. weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  26275. monthsParse: monthsParse,
  26276. longMonthsParse: monthsParse,
  26277. shortMonthsParse: monthsParse,
  26278. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  26279. monthsRegex:
  26280. /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  26281. // копия предыдущего
  26282. monthsShortRegex:
  26283. /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  26284. // полные названия с падежами
  26285. monthsStrictRegex:
  26286. /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  26287. // Выражение, которое соответствует только сокращённым формам
  26288. monthsShortStrictRegex:
  26289. /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  26290. longDateFormat: {
  26291. LT: 'H:mm',
  26292. LTS: 'H:mm:ss',
  26293. L: 'DD.MM.YYYY',
  26294. LL: 'D MMMM YYYY г.',
  26295. LLL: 'D MMMM YYYY г., H:mm',
  26296. LLLL: 'dddd, D MMMM YYYY г., H:mm',
  26297. },
  26298. calendar: {
  26299. sameDay: '[Сегодня, в] LT',
  26300. nextDay: '[Завтра, в] LT',
  26301. lastDay: '[Вчера, в] LT',
  26302. nextWeek: function (now) {
  26303. if (now.week() !== this.week()) {
  26304. switch (this.day()) {
  26305. case 0:
  26306. return '[В следующее] dddd, [в] LT';
  26307. case 1:
  26308. case 2:
  26309. case 4:
  26310. return '[В следующий] dddd, [в] LT';
  26311. case 3:
  26312. case 5:
  26313. case 6:
  26314. return '[В следующую] dddd, [в] LT';
  26315. }
  26316. } else {
  26317. if (this.day() === 2) {
  26318. return '[Во] dddd, [в] LT';
  26319. } else {
  26320. return '[В] dddd, [в] LT';
  26321. }
  26322. }
  26323. },
  26324. lastWeek: function (now) {
  26325. if (now.week() !== this.week()) {
  26326. switch (this.day()) {
  26327. case 0:
  26328. return '[В прошлое] dddd, [в] LT';
  26329. case 1:
  26330. case 2:
  26331. case 4:
  26332. return '[В прошлый] dddd, [в] LT';
  26333. case 3:
  26334. case 5:
  26335. case 6:
  26336. return '[В прошлую] dddd, [в] LT';
  26337. }
  26338. } else {
  26339. if (this.day() === 2) {
  26340. return '[Во] dddd, [в] LT';
  26341. } else {
  26342. return '[В] dddd, [в] LT';
  26343. }
  26344. }
  26345. },
  26346. sameElse: 'L',
  26347. },
  26348. relativeTime: {
  26349. future: 'через %s',
  26350. past: '%s назад',
  26351. s: 'несколько секунд',
  26352. ss: relativeTimeWithPlural,
  26353. m: relativeTimeWithPlural,
  26354. mm: relativeTimeWithPlural,
  26355. h: 'час',
  26356. hh: relativeTimeWithPlural,
  26357. d: 'день',
  26358. dd: relativeTimeWithPlural,
  26359. w: 'неделя',
  26360. ww: relativeTimeWithPlural,
  26361. M: 'месяц',
  26362. MM: relativeTimeWithPlural,
  26363. y: 'год',
  26364. yy: relativeTimeWithPlural,
  26365. },
  26366. meridiemParse: /ночи|утра|дня|вечера/i,
  26367. isPM: function (input) {
  26368. return /^(дня|вечера)$/.test(input);
  26369. },
  26370. meridiem: function (hour, minute, isLower) {
  26371. if (hour < 4) {
  26372. return 'ночи';
  26373. } else if (hour < 12) {
  26374. return 'утра';
  26375. } else if (hour < 17) {
  26376. return 'дня';
  26377. } else {
  26378. return 'вечера';
  26379. }
  26380. },
  26381. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  26382. ordinal: function (number, period) {
  26383. switch (period) {
  26384. case 'M':
  26385. case 'd':
  26386. case 'DDD':
  26387. return number + '-й';
  26388. case 'D':
  26389. return number + '-го';
  26390. case 'w':
  26391. case 'W':
  26392. return number + '-я';
  26393. default:
  26394. return number;
  26395. }
  26396. },
  26397. week: {
  26398. dow: 1, // Monday is the first day of the week.
  26399. doy: 4, // The week that contains Jan 4th is the first week of the year.
  26400. },
  26401. });
  26402. return ru;
  26403. })));
  26404. /***/ }),
  26405. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sd.js":
  26406. /*!***************************************************************************!*\
  26407. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sd.js ***!
  26408. \***************************************************************************/
  26409. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26410. //! moment.js locale configuration
  26411. //! locale : Sindhi [sd]
  26412. //! author : Narain Sagar : https://github.com/narainsagar
  26413. ;(function (global, factory) {
  26414. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26415. 0
  26416. }(this, (function (moment) { 'use strict';
  26417. //! moment.js locale configuration
  26418. var months = [
  26419. 'جنوري',
  26420. 'فيبروري',
  26421. 'مارچ',
  26422. 'اپريل',
  26423. 'مئي',
  26424. 'جون',
  26425. 'جولاءِ',
  26426. 'آگسٽ',
  26427. 'سيپٽمبر',
  26428. 'آڪٽوبر',
  26429. 'نومبر',
  26430. 'ڊسمبر',
  26431. ],
  26432. days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
  26433. var sd = moment.defineLocale('sd', {
  26434. months: months,
  26435. monthsShort: months,
  26436. weekdays: days,
  26437. weekdaysShort: days,
  26438. weekdaysMin: days,
  26439. longDateFormat: {
  26440. LT: 'HH:mm',
  26441. LTS: 'HH:mm:ss',
  26442. L: 'DD/MM/YYYY',
  26443. LL: 'D MMMM YYYY',
  26444. LLL: 'D MMMM YYYY HH:mm',
  26445. LLLL: 'dddd، D MMMM YYYY HH:mm',
  26446. },
  26447. meridiemParse: /صبح|شام/,
  26448. isPM: function (input) {
  26449. return 'شام' === input;
  26450. },
  26451. meridiem: function (hour, minute, isLower) {
  26452. if (hour < 12) {
  26453. return 'صبح';
  26454. }
  26455. return 'شام';
  26456. },
  26457. calendar: {
  26458. sameDay: '[اڄ] LT',
  26459. nextDay: '[سڀاڻي] LT',
  26460. nextWeek: 'dddd [اڳين هفتي تي] LT',
  26461. lastDay: '[ڪالهه] LT',
  26462. lastWeek: '[گزريل هفتي] dddd [تي] LT',
  26463. sameElse: 'L',
  26464. },
  26465. relativeTime: {
  26466. future: '%s پوء',
  26467. past: '%s اڳ',
  26468. s: 'چند سيڪنڊ',
  26469. ss: '%d سيڪنڊ',
  26470. m: 'هڪ منٽ',
  26471. mm: '%d منٽ',
  26472. h: 'هڪ ڪلاڪ',
  26473. hh: '%d ڪلاڪ',
  26474. d: 'هڪ ڏينهن',
  26475. dd: '%d ڏينهن',
  26476. M: 'هڪ مهينو',
  26477. MM: '%d مهينا',
  26478. y: 'هڪ سال',
  26479. yy: '%d سال',
  26480. },
  26481. preparse: function (string) {
  26482. return string.replace(/،/g, ',');
  26483. },
  26484. postformat: function (string) {
  26485. return string.replace(/,/g, '،');
  26486. },
  26487. week: {
  26488. dow: 1, // Monday is the first day of the week.
  26489. doy: 4, // The week that contains Jan 4th is the first week of the year.
  26490. },
  26491. });
  26492. return sd;
  26493. })));
  26494. /***/ }),
  26495. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/se.js":
  26496. /*!***************************************************************************!*\
  26497. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/se.js ***!
  26498. \***************************************************************************/
  26499. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26500. //! moment.js locale configuration
  26501. //! locale : Northern Sami [se]
  26502. //! authors : Bård Rolstad Henriksen : https://github.com/karamell
  26503. ;(function (global, factory) {
  26504. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26505. 0
  26506. }(this, (function (moment) { 'use strict';
  26507. //! moment.js locale configuration
  26508. var se = moment.defineLocale('se', {
  26509. 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(
  26510. '_'
  26511. ),
  26512. monthsShort:
  26513. 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
  26514. weekdays:
  26515. 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
  26516. '_'
  26517. ),
  26518. weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
  26519. weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
  26520. longDateFormat: {
  26521. LT: 'HH:mm',
  26522. LTS: 'HH:mm:ss',
  26523. L: 'DD.MM.YYYY',
  26524. LL: 'MMMM D. [b.] YYYY',
  26525. LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
  26526. LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
  26527. },
  26528. calendar: {
  26529. sameDay: '[otne ti] LT',
  26530. nextDay: '[ihttin ti] LT',
  26531. nextWeek: 'dddd [ti] LT',
  26532. lastDay: '[ikte ti] LT',
  26533. lastWeek: '[ovddit] dddd [ti] LT',
  26534. sameElse: 'L',
  26535. },
  26536. relativeTime: {
  26537. future: '%s geažes',
  26538. past: 'maŋit %s',
  26539. s: 'moadde sekunddat',
  26540. ss: '%d sekunddat',
  26541. m: 'okta minuhta',
  26542. mm: '%d minuhtat',
  26543. h: 'okta diimmu',
  26544. hh: '%d diimmut',
  26545. d: 'okta beaivi',
  26546. dd: '%d beaivvit',
  26547. M: 'okta mánnu',
  26548. MM: '%d mánut',
  26549. y: 'okta jahki',
  26550. yy: '%d jagit',
  26551. },
  26552. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26553. ordinal: '%d.',
  26554. week: {
  26555. dow: 1, // Monday is the first day of the week.
  26556. doy: 4, // The week that contains Jan 4th is the first week of the year.
  26557. },
  26558. });
  26559. return se;
  26560. })));
  26561. /***/ }),
  26562. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/si.js":
  26563. /*!***************************************************************************!*\
  26564. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/si.js ***!
  26565. \***************************************************************************/
  26566. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26567. //! moment.js locale configuration
  26568. //! locale : Sinhalese [si]
  26569. //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
  26570. ;(function (global, factory) {
  26571. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26572. 0
  26573. }(this, (function (moment) { 'use strict';
  26574. //! moment.js locale configuration
  26575. /*jshint -W100*/
  26576. var si = moment.defineLocale('si', {
  26577. months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
  26578. '_'
  26579. ),
  26580. monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
  26581. '_'
  26582. ),
  26583. weekdays:
  26584. 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
  26585. '_'
  26586. ),
  26587. weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
  26588. weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
  26589. weekdaysParseExact: true,
  26590. longDateFormat: {
  26591. LT: 'a h:mm',
  26592. LTS: 'a h:mm:ss',
  26593. L: 'YYYY/MM/DD',
  26594. LL: 'YYYY MMMM D',
  26595. LLL: 'YYYY MMMM D, a h:mm',
  26596. LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
  26597. },
  26598. calendar: {
  26599. sameDay: '[අද] LT[ට]',
  26600. nextDay: '[හෙට] LT[ට]',
  26601. nextWeek: 'dddd LT[ට]',
  26602. lastDay: '[ඊයේ] LT[ට]',
  26603. lastWeek: '[පසුගිය] dddd LT[ට]',
  26604. sameElse: 'L',
  26605. },
  26606. relativeTime: {
  26607. future: '%sකින්',
  26608. past: '%sකට පෙර',
  26609. s: 'තත්පර කිහිපය',
  26610. ss: 'තත්පර %d',
  26611. m: 'මිනිත්තුව',
  26612. mm: 'මිනිත්තු %d',
  26613. h: 'පැය',
  26614. hh: 'පැය %d',
  26615. d: 'දිනය',
  26616. dd: 'දින %d',
  26617. M: 'මාසය',
  26618. MM: 'මාස %d',
  26619. y: 'වසර',
  26620. yy: 'වසර %d',
  26621. },
  26622. dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
  26623. ordinal: function (number) {
  26624. return number + ' වැනි';
  26625. },
  26626. meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
  26627. isPM: function (input) {
  26628. return input === 'ප.ව.' || input === 'පස් වරු';
  26629. },
  26630. meridiem: function (hours, minutes, isLower) {
  26631. if (hours > 11) {
  26632. return isLower ? 'ප.ව.' : 'පස් වරු';
  26633. } else {
  26634. return isLower ? 'පෙ.ව.' : 'පෙර වරු';
  26635. }
  26636. },
  26637. });
  26638. return si;
  26639. })));
  26640. /***/ }),
  26641. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sk.js":
  26642. /*!***************************************************************************!*\
  26643. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sk.js ***!
  26644. \***************************************************************************/
  26645. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26646. //! moment.js locale configuration
  26647. //! locale : Slovak [sk]
  26648. //! author : Martin Minka : https://github.com/k2s
  26649. //! based on work of petrbela : https://github.com/petrbela
  26650. ;(function (global, factory) {
  26651. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26652. 0
  26653. }(this, (function (moment) { 'use strict';
  26654. //! moment.js locale configuration
  26655. var months =
  26656. 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
  26657. '_'
  26658. ),
  26659. monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  26660. function plural(n) {
  26661. return n > 1 && n < 5;
  26662. }
  26663. function translate(number, withoutSuffix, key, isFuture) {
  26664. var result = number + ' ';
  26665. switch (key) {
  26666. case 's': // a few seconds / in a few seconds / a few seconds ago
  26667. return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
  26668. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  26669. if (withoutSuffix || isFuture) {
  26670. return result + (plural(number) ? 'sekundy' : 'sekúnd');
  26671. } else {
  26672. return result + 'sekundami';
  26673. }
  26674. case 'm': // a minute / in a minute / a minute ago
  26675. return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
  26676. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  26677. if (withoutSuffix || isFuture) {
  26678. return result + (plural(number) ? 'minúty' : 'minút');
  26679. } else {
  26680. return result + 'minútami';
  26681. }
  26682. case 'h': // an hour / in an hour / an hour ago
  26683. return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
  26684. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  26685. if (withoutSuffix || isFuture) {
  26686. return result + (plural(number) ? 'hodiny' : 'hodín');
  26687. } else {
  26688. return result + 'hodinami';
  26689. }
  26690. case 'd': // a day / in a day / a day ago
  26691. return withoutSuffix || isFuture ? 'deň' : 'dňom';
  26692. case 'dd': // 9 days / in 9 days / 9 days ago
  26693. if (withoutSuffix || isFuture) {
  26694. return result + (plural(number) ? 'dni' : 'dní');
  26695. } else {
  26696. return result + 'dňami';
  26697. }
  26698. case 'M': // a month / in a month / a month ago
  26699. return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
  26700. case 'MM': // 9 months / in 9 months / 9 months ago
  26701. if (withoutSuffix || isFuture) {
  26702. return result + (plural(number) ? 'mesiace' : 'mesiacov');
  26703. } else {
  26704. return result + 'mesiacmi';
  26705. }
  26706. case 'y': // a year / in a year / a year ago
  26707. return withoutSuffix || isFuture ? 'rok' : 'rokom';
  26708. case 'yy': // 9 years / in 9 years / 9 years ago
  26709. if (withoutSuffix || isFuture) {
  26710. return result + (plural(number) ? 'roky' : 'rokov');
  26711. } else {
  26712. return result + 'rokmi';
  26713. }
  26714. }
  26715. }
  26716. var sk = moment.defineLocale('sk', {
  26717. months: months,
  26718. monthsShort: monthsShort,
  26719. weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  26720. weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
  26721. weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
  26722. longDateFormat: {
  26723. LT: 'H:mm',
  26724. LTS: 'H:mm:ss',
  26725. L: 'DD.MM.YYYY',
  26726. LL: 'D. MMMM YYYY',
  26727. LLL: 'D. MMMM YYYY H:mm',
  26728. LLLL: 'dddd D. MMMM YYYY H:mm',
  26729. },
  26730. calendar: {
  26731. sameDay: '[dnes o] LT',
  26732. nextDay: '[zajtra o] LT',
  26733. nextWeek: function () {
  26734. switch (this.day()) {
  26735. case 0:
  26736. return '[v nedeľu o] LT';
  26737. case 1:
  26738. case 2:
  26739. return '[v] dddd [o] LT';
  26740. case 3:
  26741. return '[v stredu o] LT';
  26742. case 4:
  26743. return '[vo štvrtok o] LT';
  26744. case 5:
  26745. return '[v piatok o] LT';
  26746. case 6:
  26747. return '[v sobotu o] LT';
  26748. }
  26749. },
  26750. lastDay: '[včera o] LT',
  26751. lastWeek: function () {
  26752. switch (this.day()) {
  26753. case 0:
  26754. return '[minulú nedeľu o] LT';
  26755. case 1:
  26756. case 2:
  26757. return '[minulý] dddd [o] LT';
  26758. case 3:
  26759. return '[minulú stredu o] LT';
  26760. case 4:
  26761. case 5:
  26762. return '[minulý] dddd [o] LT';
  26763. case 6:
  26764. return '[minulú sobotu o] LT';
  26765. }
  26766. },
  26767. sameElse: 'L',
  26768. },
  26769. relativeTime: {
  26770. future: 'za %s',
  26771. past: 'pred %s',
  26772. s: translate,
  26773. ss: translate,
  26774. m: translate,
  26775. mm: translate,
  26776. h: translate,
  26777. hh: translate,
  26778. d: translate,
  26779. dd: translate,
  26780. M: translate,
  26781. MM: translate,
  26782. y: translate,
  26783. yy: translate,
  26784. },
  26785. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26786. ordinal: '%d.',
  26787. week: {
  26788. dow: 1, // Monday is the first day of the week.
  26789. doy: 4, // The week that contains Jan 4th is the first week of the year.
  26790. },
  26791. });
  26792. return sk;
  26793. })));
  26794. /***/ }),
  26795. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sl.js":
  26796. /*!***************************************************************************!*\
  26797. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sl.js ***!
  26798. \***************************************************************************/
  26799. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26800. //! moment.js locale configuration
  26801. //! locale : Slovenian [sl]
  26802. //! author : Robert Sedovšek : https://github.com/sedovsek
  26803. ;(function (global, factory) {
  26804. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26805. 0
  26806. }(this, (function (moment) { 'use strict';
  26807. //! moment.js locale configuration
  26808. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  26809. var result = number + ' ';
  26810. switch (key) {
  26811. case 's':
  26812. return withoutSuffix || isFuture
  26813. ? 'nekaj sekund'
  26814. : 'nekaj sekundami';
  26815. case 'ss':
  26816. if (number === 1) {
  26817. result += withoutSuffix ? 'sekundo' : 'sekundi';
  26818. } else if (number === 2) {
  26819. result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
  26820. } else if (number < 5) {
  26821. result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
  26822. } else {
  26823. result += 'sekund';
  26824. }
  26825. return result;
  26826. case 'm':
  26827. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  26828. case 'mm':
  26829. if (number === 1) {
  26830. result += withoutSuffix ? 'minuta' : 'minuto';
  26831. } else if (number === 2) {
  26832. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  26833. } else if (number < 5) {
  26834. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  26835. } else {
  26836. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  26837. }
  26838. return result;
  26839. case 'h':
  26840. return withoutSuffix ? 'ena ura' : 'eno uro';
  26841. case 'hh':
  26842. if (number === 1) {
  26843. result += withoutSuffix ? 'ura' : 'uro';
  26844. } else if (number === 2) {
  26845. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  26846. } else if (number < 5) {
  26847. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  26848. } else {
  26849. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  26850. }
  26851. return result;
  26852. case 'd':
  26853. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  26854. case 'dd':
  26855. if (number === 1) {
  26856. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  26857. } else if (number === 2) {
  26858. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  26859. } else {
  26860. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  26861. }
  26862. return result;
  26863. case 'M':
  26864. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  26865. case 'MM':
  26866. if (number === 1) {
  26867. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  26868. } else if (number === 2) {
  26869. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  26870. } else if (number < 5) {
  26871. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  26872. } else {
  26873. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  26874. }
  26875. return result;
  26876. case 'y':
  26877. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  26878. case 'yy':
  26879. if (number === 1) {
  26880. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  26881. } else if (number === 2) {
  26882. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  26883. } else if (number < 5) {
  26884. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  26885. } else {
  26886. result += withoutSuffix || isFuture ? 'let' : 'leti';
  26887. }
  26888. return result;
  26889. }
  26890. }
  26891. var sl = moment.defineLocale('sl', {
  26892. months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
  26893. '_'
  26894. ),
  26895. monthsShort:
  26896. 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
  26897. '_'
  26898. ),
  26899. monthsParseExact: true,
  26900. weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  26901. weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  26902. weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
  26903. weekdaysParseExact: true,
  26904. longDateFormat: {
  26905. LT: 'H:mm',
  26906. LTS: 'H:mm:ss',
  26907. L: 'DD. MM. YYYY',
  26908. LL: 'D. MMMM YYYY',
  26909. LLL: 'D. MMMM YYYY H:mm',
  26910. LLLL: 'dddd, D. MMMM YYYY H:mm',
  26911. },
  26912. calendar: {
  26913. sameDay: '[danes ob] LT',
  26914. nextDay: '[jutri ob] LT',
  26915. nextWeek: function () {
  26916. switch (this.day()) {
  26917. case 0:
  26918. return '[v] [nedeljo] [ob] LT';
  26919. case 3:
  26920. return '[v] [sredo] [ob] LT';
  26921. case 6:
  26922. return '[v] [soboto] [ob] LT';
  26923. case 1:
  26924. case 2:
  26925. case 4:
  26926. case 5:
  26927. return '[v] dddd [ob] LT';
  26928. }
  26929. },
  26930. lastDay: '[včeraj ob] LT',
  26931. lastWeek: function () {
  26932. switch (this.day()) {
  26933. case 0:
  26934. return '[prejšnjo] [nedeljo] [ob] LT';
  26935. case 3:
  26936. return '[prejšnjo] [sredo] [ob] LT';
  26937. case 6:
  26938. return '[prejšnjo] [soboto] [ob] LT';
  26939. case 1:
  26940. case 2:
  26941. case 4:
  26942. case 5:
  26943. return '[prejšnji] dddd [ob] LT';
  26944. }
  26945. },
  26946. sameElse: 'L',
  26947. },
  26948. relativeTime: {
  26949. future: 'čez %s',
  26950. past: 'pred %s',
  26951. s: processRelativeTime,
  26952. ss: processRelativeTime,
  26953. m: processRelativeTime,
  26954. mm: processRelativeTime,
  26955. h: processRelativeTime,
  26956. hh: processRelativeTime,
  26957. d: processRelativeTime,
  26958. dd: processRelativeTime,
  26959. M: processRelativeTime,
  26960. MM: processRelativeTime,
  26961. y: processRelativeTime,
  26962. yy: processRelativeTime,
  26963. },
  26964. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26965. ordinal: '%d.',
  26966. week: {
  26967. dow: 1, // Monday is the first day of the week.
  26968. doy: 7, // The week that contains Jan 7th is the first week of the year.
  26969. },
  26970. });
  26971. return sl;
  26972. })));
  26973. /***/ }),
  26974. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sq.js":
  26975. /*!***************************************************************************!*\
  26976. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sq.js ***!
  26977. \***************************************************************************/
  26978. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  26979. //! moment.js locale configuration
  26980. //! locale : Albanian [sq]
  26981. //! author : Flakërim Ismani : https://github.com/flakerimi
  26982. //! author : Menelion Elensúle : https://github.com/Oire
  26983. //! author : Oerd Cukalla : https://github.com/oerd
  26984. ;(function (global, factory) {
  26985. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  26986. 0
  26987. }(this, (function (moment) { 'use strict';
  26988. //! moment.js locale configuration
  26989. var sq = moment.defineLocale('sq', {
  26990. months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
  26991. '_'
  26992. ),
  26993. monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
  26994. weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
  26995. '_'
  26996. ),
  26997. weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
  26998. weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
  26999. weekdaysParseExact: true,
  27000. meridiemParse: /PD|MD/,
  27001. isPM: function (input) {
  27002. return input.charAt(0) === 'M';
  27003. },
  27004. meridiem: function (hours, minutes, isLower) {
  27005. return hours < 12 ? 'PD' : 'MD';
  27006. },
  27007. longDateFormat: {
  27008. LT: 'HH:mm',
  27009. LTS: 'HH:mm:ss',
  27010. L: 'DD/MM/YYYY',
  27011. LL: 'D MMMM YYYY',
  27012. LLL: 'D MMMM YYYY HH:mm',
  27013. LLLL: 'dddd, D MMMM YYYY HH:mm',
  27014. },
  27015. calendar: {
  27016. sameDay: '[Sot në] LT',
  27017. nextDay: '[Nesër në] LT',
  27018. nextWeek: 'dddd [në] LT',
  27019. lastDay: '[Dje në] LT',
  27020. lastWeek: 'dddd [e kaluar në] LT',
  27021. sameElse: 'L',
  27022. },
  27023. relativeTime: {
  27024. future: 'në %s',
  27025. past: '%s më parë',
  27026. s: 'disa sekonda',
  27027. ss: '%d sekonda',
  27028. m: 'një minutë',
  27029. mm: '%d minuta',
  27030. h: 'një orë',
  27031. hh: '%d orë',
  27032. d: 'një ditë',
  27033. dd: '%d ditë',
  27034. M: 'një muaj',
  27035. MM: '%d muaj',
  27036. y: 'një vit',
  27037. yy: '%d vite',
  27038. },
  27039. dayOfMonthOrdinalParse: /\d{1,2}\./,
  27040. ordinal: '%d.',
  27041. week: {
  27042. dow: 1, // Monday is the first day of the week.
  27043. doy: 4, // The week that contains Jan 4th is the first week of the year.
  27044. },
  27045. });
  27046. return sq;
  27047. })));
  27048. /***/ }),
  27049. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr-cyrl.js":
  27050. /*!********************************************************************************!*\
  27051. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr-cyrl.js ***!
  27052. \********************************************************************************/
  27053. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27054. //! moment.js locale configuration
  27055. //! locale : Serbian Cyrillic [sr-cyrl]
  27056. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  27057. //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
  27058. ;(function (global, factory) {
  27059. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27060. 0
  27061. }(this, (function (moment) { 'use strict';
  27062. //! moment.js locale configuration
  27063. var translator = {
  27064. words: {
  27065. //Different grammatical cases
  27066. ss: ['секунда', 'секунде', 'секунди'],
  27067. m: ['један минут', 'једног минута'],
  27068. mm: ['минут', 'минута', 'минута'],
  27069. h: ['један сат', 'једног сата'],
  27070. hh: ['сат', 'сата', 'сати'],
  27071. d: ['један дан', 'једног дана'],
  27072. dd: ['дан', 'дана', 'дана'],
  27073. M: ['један месец', 'једног месеца'],
  27074. MM: ['месец', 'месеца', 'месеци'],
  27075. y: ['једну годину', 'једне године'],
  27076. yy: ['годину', 'године', 'година'],
  27077. },
  27078. correctGrammaticalCase: function (number, wordKey) {
  27079. if (
  27080. number % 10 >= 1 &&
  27081. number % 10 <= 4 &&
  27082. (number % 100 < 10 || number % 100 >= 20)
  27083. ) {
  27084. return number % 10 === 1 ? wordKey[0] : wordKey[1];
  27085. }
  27086. return wordKey[2];
  27087. },
  27088. translate: function (number, withoutSuffix, key, isFuture) {
  27089. var wordKey = translator.words[key],
  27090. word;
  27091. if (key.length === 1) {
  27092. // Nominativ
  27093. if (key === 'y' && withoutSuffix) return 'једна година';
  27094. return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
  27095. }
  27096. word = translator.correctGrammaticalCase(number, wordKey);
  27097. // Nominativ
  27098. if (key === 'yy' && withoutSuffix && word === 'годину') {
  27099. return number + ' година';
  27100. }
  27101. return number + ' ' + word;
  27102. },
  27103. };
  27104. var srCyrl = moment.defineLocale('sr-cyrl', {
  27105. months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
  27106. '_'
  27107. ),
  27108. monthsShort:
  27109. 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
  27110. monthsParseExact: true,
  27111. weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
  27112. weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
  27113. weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
  27114. weekdaysParseExact: true,
  27115. longDateFormat: {
  27116. LT: 'H:mm',
  27117. LTS: 'H:mm:ss',
  27118. L: 'D. M. YYYY.',
  27119. LL: 'D. MMMM YYYY.',
  27120. LLL: 'D. MMMM YYYY. H:mm',
  27121. LLLL: 'dddd, D. MMMM YYYY. H:mm',
  27122. },
  27123. calendar: {
  27124. sameDay: '[данас у] LT',
  27125. nextDay: '[сутра у] LT',
  27126. nextWeek: function () {
  27127. switch (this.day()) {
  27128. case 0:
  27129. return '[у] [недељу] [у] LT';
  27130. case 3:
  27131. return '[у] [среду] [у] LT';
  27132. case 6:
  27133. return '[у] [суботу] [у] LT';
  27134. case 1:
  27135. case 2:
  27136. case 4:
  27137. case 5:
  27138. return '[у] dddd [у] LT';
  27139. }
  27140. },
  27141. lastDay: '[јуче у] LT',
  27142. lastWeek: function () {
  27143. var lastWeekDays = [
  27144. '[прошле] [недеље] [у] LT',
  27145. '[прошлог] [понедељка] [у] LT',
  27146. '[прошлог] [уторка] [у] LT',
  27147. '[прошле] [среде] [у] LT',
  27148. '[прошлог] [четвртка] [у] LT',
  27149. '[прошлог] [петка] [у] LT',
  27150. '[прошле] [суботе] [у] LT',
  27151. ];
  27152. return lastWeekDays[this.day()];
  27153. },
  27154. sameElse: 'L',
  27155. },
  27156. relativeTime: {
  27157. future: 'за %s',
  27158. past: 'пре %s',
  27159. s: 'неколико секунди',
  27160. ss: translator.translate,
  27161. m: translator.translate,
  27162. mm: translator.translate,
  27163. h: translator.translate,
  27164. hh: translator.translate,
  27165. d: translator.translate,
  27166. dd: translator.translate,
  27167. M: translator.translate,
  27168. MM: translator.translate,
  27169. y: translator.translate,
  27170. yy: translator.translate,
  27171. },
  27172. dayOfMonthOrdinalParse: /\d{1,2}\./,
  27173. ordinal: '%d.',
  27174. week: {
  27175. dow: 1, // Monday is the first day of the week.
  27176. doy: 7, // The week that contains Jan 1st is the first week of the year.
  27177. },
  27178. });
  27179. return srCyrl;
  27180. })));
  27181. /***/ }),
  27182. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr.js":
  27183. /*!***************************************************************************!*\
  27184. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr.js ***!
  27185. \***************************************************************************/
  27186. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27187. //! moment.js locale configuration
  27188. //! locale : Serbian [sr]
  27189. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  27190. //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
  27191. ;(function (global, factory) {
  27192. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27193. 0
  27194. }(this, (function (moment) { 'use strict';
  27195. //! moment.js locale configuration
  27196. var translator = {
  27197. words: {
  27198. //Different grammatical cases
  27199. ss: ['sekunda', 'sekunde', 'sekundi'],
  27200. m: ['jedan minut', 'jednog minuta'],
  27201. mm: ['minut', 'minuta', 'minuta'],
  27202. h: ['jedan sat', 'jednog sata'],
  27203. hh: ['sat', 'sata', 'sati'],
  27204. d: ['jedan dan', 'jednog dana'],
  27205. dd: ['dan', 'dana', 'dana'],
  27206. M: ['jedan mesec', 'jednog meseca'],
  27207. MM: ['mesec', 'meseca', 'meseci'],
  27208. y: ['jednu godinu', 'jedne godine'],
  27209. yy: ['godinu', 'godine', 'godina'],
  27210. },
  27211. correctGrammaticalCase: function (number, wordKey) {
  27212. if (
  27213. number % 10 >= 1 &&
  27214. number % 10 <= 4 &&
  27215. (number % 100 < 10 || number % 100 >= 20)
  27216. ) {
  27217. return number % 10 === 1 ? wordKey[0] : wordKey[1];
  27218. }
  27219. return wordKey[2];
  27220. },
  27221. translate: function (number, withoutSuffix, key, isFuture) {
  27222. var wordKey = translator.words[key],
  27223. word;
  27224. if (key.length === 1) {
  27225. // Nominativ
  27226. if (key === 'y' && withoutSuffix) return 'jedna godina';
  27227. return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
  27228. }
  27229. word = translator.correctGrammaticalCase(number, wordKey);
  27230. // Nominativ
  27231. if (key === 'yy' && withoutSuffix && word === 'godinu') {
  27232. return number + ' godina';
  27233. }
  27234. return number + ' ' + word;
  27235. },
  27236. };
  27237. var sr = moment.defineLocale('sr', {
  27238. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
  27239. '_'
  27240. ),
  27241. monthsShort:
  27242. 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  27243. monthsParseExact: true,
  27244. weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
  27245. '_'
  27246. ),
  27247. weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
  27248. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  27249. weekdaysParseExact: true,
  27250. longDateFormat: {
  27251. LT: 'H:mm',
  27252. LTS: 'H:mm:ss',
  27253. L: 'D. M. YYYY.',
  27254. LL: 'D. MMMM YYYY.',
  27255. LLL: 'D. MMMM YYYY. H:mm',
  27256. LLLL: 'dddd, D. MMMM YYYY. H:mm',
  27257. },
  27258. calendar: {
  27259. sameDay: '[danas u] LT',
  27260. nextDay: '[sutra u] LT',
  27261. nextWeek: function () {
  27262. switch (this.day()) {
  27263. case 0:
  27264. return '[u] [nedelju] [u] LT';
  27265. case 3:
  27266. return '[u] [sredu] [u] LT';
  27267. case 6:
  27268. return '[u] [subotu] [u] LT';
  27269. case 1:
  27270. case 2:
  27271. case 4:
  27272. case 5:
  27273. return '[u] dddd [u] LT';
  27274. }
  27275. },
  27276. lastDay: '[juče u] LT',
  27277. lastWeek: function () {
  27278. var lastWeekDays = [
  27279. '[prošle] [nedelje] [u] LT',
  27280. '[prošlog] [ponedeljka] [u] LT',
  27281. '[prošlog] [utorka] [u] LT',
  27282. '[prošle] [srede] [u] LT',
  27283. '[prošlog] [četvrtka] [u] LT',
  27284. '[prošlog] [petka] [u] LT',
  27285. '[prošle] [subote] [u] LT',
  27286. ];
  27287. return lastWeekDays[this.day()];
  27288. },
  27289. sameElse: 'L',
  27290. },
  27291. relativeTime: {
  27292. future: 'za %s',
  27293. past: 'pre %s',
  27294. s: 'nekoliko sekundi',
  27295. ss: translator.translate,
  27296. m: translator.translate,
  27297. mm: translator.translate,
  27298. h: translator.translate,
  27299. hh: translator.translate,
  27300. d: translator.translate,
  27301. dd: translator.translate,
  27302. M: translator.translate,
  27303. MM: translator.translate,
  27304. y: translator.translate,
  27305. yy: translator.translate,
  27306. },
  27307. dayOfMonthOrdinalParse: /\d{1,2}\./,
  27308. ordinal: '%d.',
  27309. week: {
  27310. dow: 1, // Monday is the first day of the week.
  27311. doy: 7, // The week that contains Jan 7th is the first week of the year.
  27312. },
  27313. });
  27314. return sr;
  27315. })));
  27316. /***/ }),
  27317. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ss.js":
  27318. /*!***************************************************************************!*\
  27319. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ss.js ***!
  27320. \***************************************************************************/
  27321. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27322. //! moment.js locale configuration
  27323. //! locale : siSwati [ss]
  27324. //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
  27325. ;(function (global, factory) {
  27326. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27327. 0
  27328. }(this, (function (moment) { 'use strict';
  27329. //! moment.js locale configuration
  27330. var ss = moment.defineLocale('ss', {
  27331. months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
  27332. '_'
  27333. ),
  27334. monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
  27335. weekdays:
  27336. 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
  27337. '_'
  27338. ),
  27339. weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
  27340. weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
  27341. weekdaysParseExact: true,
  27342. longDateFormat: {
  27343. LT: 'h:mm A',
  27344. LTS: 'h:mm:ss A',
  27345. L: 'DD/MM/YYYY',
  27346. LL: 'D MMMM YYYY',
  27347. LLL: 'D MMMM YYYY h:mm A',
  27348. LLLL: 'dddd, D MMMM YYYY h:mm A',
  27349. },
  27350. calendar: {
  27351. sameDay: '[Namuhla nga] LT',
  27352. nextDay: '[Kusasa nga] LT',
  27353. nextWeek: 'dddd [nga] LT',
  27354. lastDay: '[Itolo nga] LT',
  27355. lastWeek: 'dddd [leliphelile] [nga] LT',
  27356. sameElse: 'L',
  27357. },
  27358. relativeTime: {
  27359. future: 'nga %s',
  27360. past: 'wenteka nga %s',
  27361. s: 'emizuzwana lomcane',
  27362. ss: '%d mzuzwana',
  27363. m: 'umzuzu',
  27364. mm: '%d emizuzu',
  27365. h: 'lihora',
  27366. hh: '%d emahora',
  27367. d: 'lilanga',
  27368. dd: '%d emalanga',
  27369. M: 'inyanga',
  27370. MM: '%d tinyanga',
  27371. y: 'umnyaka',
  27372. yy: '%d iminyaka',
  27373. },
  27374. meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
  27375. meridiem: function (hours, minutes, isLower) {
  27376. if (hours < 11) {
  27377. return 'ekuseni';
  27378. } else if (hours < 15) {
  27379. return 'emini';
  27380. } else if (hours < 19) {
  27381. return 'entsambama';
  27382. } else {
  27383. return 'ebusuku';
  27384. }
  27385. },
  27386. meridiemHour: function (hour, meridiem) {
  27387. if (hour === 12) {
  27388. hour = 0;
  27389. }
  27390. if (meridiem === 'ekuseni') {
  27391. return hour;
  27392. } else if (meridiem === 'emini') {
  27393. return hour >= 11 ? hour : hour + 12;
  27394. } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
  27395. if (hour === 0) {
  27396. return 0;
  27397. }
  27398. return hour + 12;
  27399. }
  27400. },
  27401. dayOfMonthOrdinalParse: /\d{1,2}/,
  27402. ordinal: '%d',
  27403. week: {
  27404. dow: 1, // Monday is the first day of the week.
  27405. doy: 4, // The week that contains Jan 4th is the first week of the year.
  27406. },
  27407. });
  27408. return ss;
  27409. })));
  27410. /***/ }),
  27411. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sv.js":
  27412. /*!***************************************************************************!*\
  27413. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sv.js ***!
  27414. \***************************************************************************/
  27415. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27416. //! moment.js locale configuration
  27417. //! locale : Swedish [sv]
  27418. //! author : Jens Alm : https://github.com/ulmus
  27419. ;(function (global, factory) {
  27420. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27421. 0
  27422. }(this, (function (moment) { 'use strict';
  27423. //! moment.js locale configuration
  27424. var sv = moment.defineLocale('sv', {
  27425. months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
  27426. '_'
  27427. ),
  27428. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  27429. weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  27430. weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  27431. weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
  27432. longDateFormat: {
  27433. LT: 'HH:mm',
  27434. LTS: 'HH:mm:ss',
  27435. L: 'YYYY-MM-DD',
  27436. LL: 'D MMMM YYYY',
  27437. LLL: 'D MMMM YYYY [kl.] HH:mm',
  27438. LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
  27439. lll: 'D MMM YYYY HH:mm',
  27440. llll: 'ddd D MMM YYYY HH:mm',
  27441. },
  27442. calendar: {
  27443. sameDay: '[Idag] LT',
  27444. nextDay: '[Imorgon] LT',
  27445. lastDay: '[Igår] LT',
  27446. nextWeek: '[På] dddd LT',
  27447. lastWeek: '[I] dddd[s] LT',
  27448. sameElse: 'L',
  27449. },
  27450. relativeTime: {
  27451. future: 'om %s',
  27452. past: 'för %s sedan',
  27453. s: 'några sekunder',
  27454. ss: '%d sekunder',
  27455. m: 'en minut',
  27456. mm: '%d minuter',
  27457. h: 'en timme',
  27458. hh: '%d timmar',
  27459. d: 'en dag',
  27460. dd: '%d dagar',
  27461. M: 'en månad',
  27462. MM: '%d månader',
  27463. y: 'ett år',
  27464. yy: '%d år',
  27465. },
  27466. dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
  27467. ordinal: function (number) {
  27468. var b = number % 10,
  27469. output =
  27470. ~~((number % 100) / 10) === 1
  27471. ? ':e'
  27472. : b === 1
  27473. ? ':a'
  27474. : b === 2
  27475. ? ':a'
  27476. : b === 3
  27477. ? ':e'
  27478. : ':e';
  27479. return number + output;
  27480. },
  27481. week: {
  27482. dow: 1, // Monday is the first day of the week.
  27483. doy: 4, // The week that contains Jan 4th is the first week of the year.
  27484. },
  27485. });
  27486. return sv;
  27487. })));
  27488. /***/ }),
  27489. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sw.js":
  27490. /*!***************************************************************************!*\
  27491. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sw.js ***!
  27492. \***************************************************************************/
  27493. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27494. //! moment.js locale configuration
  27495. //! locale : Swahili [sw]
  27496. //! author : Fahad Kassim : https://github.com/fadsel
  27497. ;(function (global, factory) {
  27498. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27499. 0
  27500. }(this, (function (moment) { 'use strict';
  27501. //! moment.js locale configuration
  27502. var sw = moment.defineLocale('sw', {
  27503. months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
  27504. '_'
  27505. ),
  27506. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
  27507. weekdays:
  27508. 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
  27509. '_'
  27510. ),
  27511. weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
  27512. weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
  27513. weekdaysParseExact: true,
  27514. longDateFormat: {
  27515. LT: 'hh:mm A',
  27516. LTS: 'HH:mm:ss',
  27517. L: 'DD.MM.YYYY',
  27518. LL: 'D MMMM YYYY',
  27519. LLL: 'D MMMM YYYY HH:mm',
  27520. LLLL: 'dddd, D MMMM YYYY HH:mm',
  27521. },
  27522. calendar: {
  27523. sameDay: '[leo saa] LT',
  27524. nextDay: '[kesho saa] LT',
  27525. nextWeek: '[wiki ijayo] dddd [saat] LT',
  27526. lastDay: '[jana] LT',
  27527. lastWeek: '[wiki iliyopita] dddd [saat] LT',
  27528. sameElse: 'L',
  27529. },
  27530. relativeTime: {
  27531. future: '%s baadaye',
  27532. past: 'tokea %s',
  27533. s: 'hivi punde',
  27534. ss: 'sekunde %d',
  27535. m: 'dakika moja',
  27536. mm: 'dakika %d',
  27537. h: 'saa limoja',
  27538. hh: 'masaa %d',
  27539. d: 'siku moja',
  27540. dd: 'siku %d',
  27541. M: 'mwezi mmoja',
  27542. MM: 'miezi %d',
  27543. y: 'mwaka mmoja',
  27544. yy: 'miaka %d',
  27545. },
  27546. week: {
  27547. dow: 1, // Monday is the first day of the week.
  27548. doy: 7, // The week that contains Jan 7th is the first week of the year.
  27549. },
  27550. });
  27551. return sw;
  27552. })));
  27553. /***/ }),
  27554. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ta.js":
  27555. /*!***************************************************************************!*\
  27556. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ta.js ***!
  27557. \***************************************************************************/
  27558. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27559. //! moment.js locale configuration
  27560. //! locale : Tamil [ta]
  27561. //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
  27562. ;(function (global, factory) {
  27563. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27564. 0
  27565. }(this, (function (moment) { 'use strict';
  27566. //! moment.js locale configuration
  27567. var symbolMap = {
  27568. 1: '௧',
  27569. 2: '௨',
  27570. 3: '௩',
  27571. 4: '௪',
  27572. 5: '௫',
  27573. 6: '௬',
  27574. 7: '௭',
  27575. 8: '௮',
  27576. 9: '௯',
  27577. 0: '௦',
  27578. },
  27579. numberMap = {
  27580. '௧': '1',
  27581. '௨': '2',
  27582. '௩': '3',
  27583. '௪': '4',
  27584. '௫': '5',
  27585. '௬': '6',
  27586. '௭': '7',
  27587. '௮': '8',
  27588. '௯': '9',
  27589. '௦': '0',
  27590. };
  27591. var ta = moment.defineLocale('ta', {
  27592. months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
  27593. '_'
  27594. ),
  27595. monthsShort:
  27596. 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
  27597. '_'
  27598. ),
  27599. weekdays:
  27600. 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
  27601. '_'
  27602. ),
  27603. weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
  27604. '_'
  27605. ),
  27606. weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
  27607. longDateFormat: {
  27608. LT: 'HH:mm',
  27609. LTS: 'HH:mm:ss',
  27610. L: 'DD/MM/YYYY',
  27611. LL: 'D MMMM YYYY',
  27612. LLL: 'D MMMM YYYY, HH:mm',
  27613. LLLL: 'dddd, D MMMM YYYY, HH:mm',
  27614. },
  27615. calendar: {
  27616. sameDay: '[இன்று] LT',
  27617. nextDay: '[நாளை] LT',
  27618. nextWeek: 'dddd, LT',
  27619. lastDay: '[நேற்று] LT',
  27620. lastWeek: '[கடந்த வாரம்] dddd, LT',
  27621. sameElse: 'L',
  27622. },
  27623. relativeTime: {
  27624. future: '%s இல்',
  27625. past: '%s முன்',
  27626. s: 'ஒரு சில விநாடிகள்',
  27627. ss: '%d விநாடிகள்',
  27628. m: 'ஒரு நிமிடம்',
  27629. mm: '%d நிமிடங்கள்',
  27630. h: 'ஒரு மணி நேரம்',
  27631. hh: '%d மணி நேரம்',
  27632. d: 'ஒரு நாள்',
  27633. dd: '%d நாட்கள்',
  27634. M: 'ஒரு மாதம்',
  27635. MM: '%d மாதங்கள்',
  27636. y: 'ஒரு வருடம்',
  27637. yy: '%d ஆண்டுகள்',
  27638. },
  27639. dayOfMonthOrdinalParse: /\d{1,2}வது/,
  27640. ordinal: function (number) {
  27641. return number + 'வது';
  27642. },
  27643. preparse: function (string) {
  27644. return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
  27645. return numberMap[match];
  27646. });
  27647. },
  27648. postformat: function (string) {
  27649. return string.replace(/\d/g, function (match) {
  27650. return symbolMap[match];
  27651. });
  27652. },
  27653. // refer http://ta.wikipedia.org/s/1er1
  27654. meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
  27655. meridiem: function (hour, minute, isLower) {
  27656. if (hour < 2) {
  27657. return ' யாமம்';
  27658. } else if (hour < 6) {
  27659. return ' வைகறை'; // வைகறை
  27660. } else if (hour < 10) {
  27661. return ' காலை'; // காலை
  27662. } else if (hour < 14) {
  27663. return ' நண்பகல்'; // நண்பகல்
  27664. } else if (hour < 18) {
  27665. return ' எற்பாடு'; // எற்பாடு
  27666. } else if (hour < 22) {
  27667. return ' மாலை'; // மாலை
  27668. } else {
  27669. return ' யாமம்';
  27670. }
  27671. },
  27672. meridiemHour: function (hour, meridiem) {
  27673. if (hour === 12) {
  27674. hour = 0;
  27675. }
  27676. if (meridiem === 'யாமம்') {
  27677. return hour < 2 ? hour : hour + 12;
  27678. } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
  27679. return hour;
  27680. } else if (meridiem === 'நண்பகல்') {
  27681. return hour >= 10 ? hour : hour + 12;
  27682. } else {
  27683. return hour + 12;
  27684. }
  27685. },
  27686. week: {
  27687. dow: 0, // Sunday is the first day of the week.
  27688. doy: 6, // The week that contains Jan 6th is the first week of the year.
  27689. },
  27690. });
  27691. return ta;
  27692. })));
  27693. /***/ }),
  27694. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/te.js":
  27695. /*!***************************************************************************!*\
  27696. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/te.js ***!
  27697. \***************************************************************************/
  27698. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27699. //! moment.js locale configuration
  27700. //! locale : Telugu [te]
  27701. //! author : Krishna Chaitanya Thota : https://github.com/kcthota
  27702. ;(function (global, factory) {
  27703. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27704. 0
  27705. }(this, (function (moment) { 'use strict';
  27706. //! moment.js locale configuration
  27707. var te = moment.defineLocale('te', {
  27708. months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
  27709. '_'
  27710. ),
  27711. monthsShort:
  27712. 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
  27713. '_'
  27714. ),
  27715. monthsParseExact: true,
  27716. weekdays:
  27717. 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
  27718. '_'
  27719. ),
  27720. weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
  27721. weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
  27722. longDateFormat: {
  27723. LT: 'A h:mm',
  27724. LTS: 'A h:mm:ss',
  27725. L: 'DD/MM/YYYY',
  27726. LL: 'D MMMM YYYY',
  27727. LLL: 'D MMMM YYYY, A h:mm',
  27728. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  27729. },
  27730. calendar: {
  27731. sameDay: '[నేడు] LT',
  27732. nextDay: '[రేపు] LT',
  27733. nextWeek: 'dddd, LT',
  27734. lastDay: '[నిన్న] LT',
  27735. lastWeek: '[గత] dddd, LT',
  27736. sameElse: 'L',
  27737. },
  27738. relativeTime: {
  27739. future: '%s లో',
  27740. past: '%s క్రితం',
  27741. s: 'కొన్ని క్షణాలు',
  27742. ss: '%d సెకన్లు',
  27743. m: 'ఒక నిమిషం',
  27744. mm: '%d నిమిషాలు',
  27745. h: 'ఒక గంట',
  27746. hh: '%d గంటలు',
  27747. d: 'ఒక రోజు',
  27748. dd: '%d రోజులు',
  27749. M: 'ఒక నెల',
  27750. MM: '%d నెలలు',
  27751. y: 'ఒక సంవత్సరం',
  27752. yy: '%d సంవత్సరాలు',
  27753. },
  27754. dayOfMonthOrdinalParse: /\d{1,2}వ/,
  27755. ordinal: '%dవ',
  27756. meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
  27757. meridiemHour: function (hour, meridiem) {
  27758. if (hour === 12) {
  27759. hour = 0;
  27760. }
  27761. if (meridiem === 'రాత్రి') {
  27762. return hour < 4 ? hour : hour + 12;
  27763. } else if (meridiem === 'ఉదయం') {
  27764. return hour;
  27765. } else if (meridiem === 'మధ్యాహ్నం') {
  27766. return hour >= 10 ? hour : hour + 12;
  27767. } else if (meridiem === 'సాయంత్రం') {
  27768. return hour + 12;
  27769. }
  27770. },
  27771. meridiem: function (hour, minute, isLower) {
  27772. if (hour < 4) {
  27773. return 'రాత్రి';
  27774. } else if (hour < 10) {
  27775. return 'ఉదయం';
  27776. } else if (hour < 17) {
  27777. return 'మధ్యాహ్నం';
  27778. } else if (hour < 20) {
  27779. return 'సాయంత్రం';
  27780. } else {
  27781. return 'రాత్రి';
  27782. }
  27783. },
  27784. week: {
  27785. dow: 0, // Sunday is the first day of the week.
  27786. doy: 6, // The week that contains Jan 6th is the first week of the year.
  27787. },
  27788. });
  27789. return te;
  27790. })));
  27791. /***/ }),
  27792. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tet.js":
  27793. /*!****************************************************************************!*\
  27794. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tet.js ***!
  27795. \****************************************************************************/
  27796. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27797. //! moment.js locale configuration
  27798. //! locale : Tetun Dili (East Timor) [tet]
  27799. //! author : Joshua Brooks : https://github.com/joshbrooks
  27800. //! author : Onorio De J. Afonso : https://github.com/marobo
  27801. //! author : Sonia Simoes : https://github.com/soniasimoes
  27802. ;(function (global, factory) {
  27803. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27804. 0
  27805. }(this, (function (moment) { 'use strict';
  27806. //! moment.js locale configuration
  27807. var tet = moment.defineLocale('tet', {
  27808. months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
  27809. '_'
  27810. ),
  27811. monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
  27812. weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
  27813. weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
  27814. weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
  27815. longDateFormat: {
  27816. LT: 'HH:mm',
  27817. LTS: 'HH:mm:ss',
  27818. L: 'DD/MM/YYYY',
  27819. LL: 'D MMMM YYYY',
  27820. LLL: 'D MMMM YYYY HH:mm',
  27821. LLLL: 'dddd, D MMMM YYYY HH:mm',
  27822. },
  27823. calendar: {
  27824. sameDay: '[Ohin iha] LT',
  27825. nextDay: '[Aban iha] LT',
  27826. nextWeek: 'dddd [iha] LT',
  27827. lastDay: '[Horiseik iha] LT',
  27828. lastWeek: 'dddd [semana kotuk] [iha] LT',
  27829. sameElse: 'L',
  27830. },
  27831. relativeTime: {
  27832. future: 'iha %s',
  27833. past: '%s liuba',
  27834. s: 'segundu balun',
  27835. ss: 'segundu %d',
  27836. m: 'minutu ida',
  27837. mm: 'minutu %d',
  27838. h: 'oras ida',
  27839. hh: 'oras %d',
  27840. d: 'loron ida',
  27841. dd: 'loron %d',
  27842. M: 'fulan ida',
  27843. MM: 'fulan %d',
  27844. y: 'tinan ida',
  27845. yy: 'tinan %d',
  27846. },
  27847. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  27848. ordinal: function (number) {
  27849. var b = number % 10,
  27850. output =
  27851. ~~((number % 100) / 10) === 1
  27852. ? 'th'
  27853. : b === 1
  27854. ? 'st'
  27855. : b === 2
  27856. ? 'nd'
  27857. : b === 3
  27858. ? 'rd'
  27859. : 'th';
  27860. return number + output;
  27861. },
  27862. week: {
  27863. dow: 1, // Monday is the first day of the week.
  27864. doy: 4, // The week that contains Jan 4th is the first week of the year.
  27865. },
  27866. });
  27867. return tet;
  27868. })));
  27869. /***/ }),
  27870. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tg.js":
  27871. /*!***************************************************************************!*\
  27872. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tg.js ***!
  27873. \***************************************************************************/
  27874. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  27875. //! moment.js locale configuration
  27876. //! locale : Tajik [tg]
  27877. //! author : Orif N. Jr. : https://github.com/orif-jr
  27878. ;(function (global, factory) {
  27879. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  27880. 0
  27881. }(this, (function (moment) { 'use strict';
  27882. //! moment.js locale configuration
  27883. var suffixes = {
  27884. 0: '-ум',
  27885. 1: '-ум',
  27886. 2: '-юм',
  27887. 3: '-юм',
  27888. 4: '-ум',
  27889. 5: '-ум',
  27890. 6: '-ум',
  27891. 7: '-ум',
  27892. 8: '-ум',
  27893. 9: '-ум',
  27894. 10: '-ум',
  27895. 12: '-ум',
  27896. 13: '-ум',
  27897. 20: '-ум',
  27898. 30: '-юм',
  27899. 40: '-ум',
  27900. 50: '-ум',
  27901. 60: '-ум',
  27902. 70: '-ум',
  27903. 80: '-ум',
  27904. 90: '-ум',
  27905. 100: '-ум',
  27906. };
  27907. var tg = moment.defineLocale('tg', {
  27908. months: {
  27909. format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
  27910. '_'
  27911. ),
  27912. standalone:
  27913. 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
  27914. '_'
  27915. ),
  27916. },
  27917. monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  27918. weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
  27919. '_'
  27920. ),
  27921. weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
  27922. weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
  27923. longDateFormat: {
  27924. LT: 'HH:mm',
  27925. LTS: 'HH:mm:ss',
  27926. L: 'DD.MM.YYYY',
  27927. LL: 'D MMMM YYYY',
  27928. LLL: 'D MMMM YYYY HH:mm',
  27929. LLLL: 'dddd, D MMMM YYYY HH:mm',
  27930. },
  27931. calendar: {
  27932. sameDay: '[Имрӯз соати] LT',
  27933. nextDay: '[Фардо соати] LT',
  27934. lastDay: '[Дирӯз соати] LT',
  27935. nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
  27936. lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
  27937. sameElse: 'L',
  27938. },
  27939. relativeTime: {
  27940. future: 'баъди %s',
  27941. past: '%s пеш',
  27942. s: 'якчанд сония',
  27943. m: 'як дақиқа',
  27944. mm: '%d дақиқа',
  27945. h: 'як соат',
  27946. hh: '%d соат',
  27947. d: 'як рӯз',
  27948. dd: '%d рӯз',
  27949. M: 'як моҳ',
  27950. MM: '%d моҳ',
  27951. y: 'як сол',
  27952. yy: '%d сол',
  27953. },
  27954. meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
  27955. meridiemHour: function (hour, meridiem) {
  27956. if (hour === 12) {
  27957. hour = 0;
  27958. }
  27959. if (meridiem === 'шаб') {
  27960. return hour < 4 ? hour : hour + 12;
  27961. } else if (meridiem === 'субҳ') {
  27962. return hour;
  27963. } else if (meridiem === 'рӯз') {
  27964. return hour >= 11 ? hour : hour + 12;
  27965. } else if (meridiem === 'бегоҳ') {
  27966. return hour + 12;
  27967. }
  27968. },
  27969. meridiem: function (hour, minute, isLower) {
  27970. if (hour < 4) {
  27971. return 'шаб';
  27972. } else if (hour < 11) {
  27973. return 'субҳ';
  27974. } else if (hour < 16) {
  27975. return 'рӯз';
  27976. } else if (hour < 19) {
  27977. return 'бегоҳ';
  27978. } else {
  27979. return 'шаб';
  27980. }
  27981. },
  27982. dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
  27983. ordinal: function (number) {
  27984. var a = number % 10,
  27985. b = number >= 100 ? 100 : null;
  27986. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  27987. },
  27988. week: {
  27989. dow: 1, // Monday is the first day of the week.
  27990. doy: 7, // The week that contains Jan 1th is the first week of the year.
  27991. },
  27992. });
  27993. return tg;
  27994. })));
  27995. /***/ }),
  27996. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/th.js":
  27997. /*!***************************************************************************!*\
  27998. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/th.js ***!
  27999. \***************************************************************************/
  28000. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28001. //! moment.js locale configuration
  28002. //! locale : Thai [th]
  28003. //! author : Kridsada Thanabulpong : https://github.com/sirn
  28004. ;(function (global, factory) {
  28005. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28006. 0
  28007. }(this, (function (moment) { 'use strict';
  28008. //! moment.js locale configuration
  28009. var th = moment.defineLocale('th', {
  28010. months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
  28011. '_'
  28012. ),
  28013. monthsShort:
  28014. 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
  28015. '_'
  28016. ),
  28017. monthsParseExact: true,
  28018. weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  28019. weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
  28020. weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  28021. weekdaysParseExact: true,
  28022. longDateFormat: {
  28023. LT: 'H:mm',
  28024. LTS: 'H:mm:ss',
  28025. L: 'DD/MM/YYYY',
  28026. LL: 'D MMMM YYYY',
  28027. LLL: 'D MMMM YYYY เวลา H:mm',
  28028. LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
  28029. },
  28030. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  28031. isPM: function (input) {
  28032. return input === 'หลังเที่ยง';
  28033. },
  28034. meridiem: function (hour, minute, isLower) {
  28035. if (hour < 12) {
  28036. return 'ก่อนเที่ยง';
  28037. } else {
  28038. return 'หลังเที่ยง';
  28039. }
  28040. },
  28041. calendar: {
  28042. sameDay: '[วันนี้ เวลา] LT',
  28043. nextDay: '[พรุ่งนี้ เวลา] LT',
  28044. nextWeek: 'dddd[หน้า เวลา] LT',
  28045. lastDay: '[เมื่อวานนี้ เวลา] LT',
  28046. lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
  28047. sameElse: 'L',
  28048. },
  28049. relativeTime: {
  28050. future: 'อีก %s',
  28051. past: '%sที่แล้ว',
  28052. s: 'ไม่กี่วินาที',
  28053. ss: '%d วินาที',
  28054. m: '1 นาที',
  28055. mm: '%d นาที',
  28056. h: '1 ชั่วโมง',
  28057. hh: '%d ชั่วโมง',
  28058. d: '1 วัน',
  28059. dd: '%d วัน',
  28060. w: '1 สัปดาห์',
  28061. ww: '%d สัปดาห์',
  28062. M: '1 เดือน',
  28063. MM: '%d เดือน',
  28064. y: '1 ปี',
  28065. yy: '%d ปี',
  28066. },
  28067. });
  28068. return th;
  28069. })));
  28070. /***/ }),
  28071. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tk.js":
  28072. /*!***************************************************************************!*\
  28073. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tk.js ***!
  28074. \***************************************************************************/
  28075. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28076. //! moment.js locale configuration
  28077. //! locale : Turkmen [tk]
  28078. //! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
  28079. ;(function (global, factory) {
  28080. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28081. 0
  28082. }(this, (function (moment) { 'use strict';
  28083. //! moment.js locale configuration
  28084. var suffixes = {
  28085. 1: "'inji",
  28086. 5: "'inji",
  28087. 8: "'inji",
  28088. 70: "'inji",
  28089. 80: "'inji",
  28090. 2: "'nji",
  28091. 7: "'nji",
  28092. 20: "'nji",
  28093. 50: "'nji",
  28094. 3: "'ünji",
  28095. 4: "'ünji",
  28096. 100: "'ünji",
  28097. 6: "'njy",
  28098. 9: "'unjy",
  28099. 10: "'unjy",
  28100. 30: "'unjy",
  28101. 60: "'ynjy",
  28102. 90: "'ynjy",
  28103. };
  28104. var tk = moment.defineLocale('tk', {
  28105. months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
  28106. '_'
  28107. ),
  28108. monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
  28109. weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
  28110. '_'
  28111. ),
  28112. weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
  28113. weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
  28114. longDateFormat: {
  28115. LT: 'HH:mm',
  28116. LTS: 'HH:mm:ss',
  28117. L: 'DD.MM.YYYY',
  28118. LL: 'D MMMM YYYY',
  28119. LLL: 'D MMMM YYYY HH:mm',
  28120. LLLL: 'dddd, D MMMM YYYY HH:mm',
  28121. },
  28122. calendar: {
  28123. sameDay: '[bugün sagat] LT',
  28124. nextDay: '[ertir sagat] LT',
  28125. nextWeek: '[indiki] dddd [sagat] LT',
  28126. lastDay: '[düýn] LT',
  28127. lastWeek: '[geçen] dddd [sagat] LT',
  28128. sameElse: 'L',
  28129. },
  28130. relativeTime: {
  28131. future: '%s soň',
  28132. past: '%s öň',
  28133. s: 'birnäçe sekunt',
  28134. m: 'bir minut',
  28135. mm: '%d minut',
  28136. h: 'bir sagat',
  28137. hh: '%d sagat',
  28138. d: 'bir gün',
  28139. dd: '%d gün',
  28140. M: 'bir aý',
  28141. MM: '%d aý',
  28142. y: 'bir ýyl',
  28143. yy: '%d ýyl',
  28144. },
  28145. ordinal: function (number, period) {
  28146. switch (period) {
  28147. case 'd':
  28148. case 'D':
  28149. case 'Do':
  28150. case 'DD':
  28151. return number;
  28152. default:
  28153. if (number === 0) {
  28154. // special case for zero
  28155. return number + "'unjy";
  28156. }
  28157. var a = number % 10,
  28158. b = (number % 100) - a,
  28159. c = number >= 100 ? 100 : null;
  28160. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  28161. }
  28162. },
  28163. week: {
  28164. dow: 1, // Monday is the first day of the week.
  28165. doy: 7, // The week that contains Jan 7th is the first week of the year.
  28166. },
  28167. });
  28168. return tk;
  28169. })));
  28170. /***/ }),
  28171. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tl-ph.js":
  28172. /*!******************************************************************************!*\
  28173. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tl-ph.js ***!
  28174. \******************************************************************************/
  28175. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28176. //! moment.js locale configuration
  28177. //! locale : Tagalog (Philippines) [tl-ph]
  28178. //! author : Dan Hagman : https://github.com/hagmandan
  28179. ;(function (global, factory) {
  28180. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28181. 0
  28182. }(this, (function (moment) { 'use strict';
  28183. //! moment.js locale configuration
  28184. var tlPh = moment.defineLocale('tl-ph', {
  28185. months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
  28186. '_'
  28187. ),
  28188. monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  28189. weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
  28190. '_'
  28191. ),
  28192. weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  28193. weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  28194. longDateFormat: {
  28195. LT: 'HH:mm',
  28196. LTS: 'HH:mm:ss',
  28197. L: 'MM/D/YYYY',
  28198. LL: 'MMMM D, YYYY',
  28199. LLL: 'MMMM D, YYYY HH:mm',
  28200. LLLL: 'dddd, MMMM DD, YYYY HH:mm',
  28201. },
  28202. calendar: {
  28203. sameDay: 'LT [ngayong araw]',
  28204. nextDay: '[Bukas ng] LT',
  28205. nextWeek: 'LT [sa susunod na] dddd',
  28206. lastDay: 'LT [kahapon]',
  28207. lastWeek: 'LT [noong nakaraang] dddd',
  28208. sameElse: 'L',
  28209. },
  28210. relativeTime: {
  28211. future: 'sa loob ng %s',
  28212. past: '%s ang nakalipas',
  28213. s: 'ilang segundo',
  28214. ss: '%d segundo',
  28215. m: 'isang minuto',
  28216. mm: '%d minuto',
  28217. h: 'isang oras',
  28218. hh: '%d oras',
  28219. d: 'isang araw',
  28220. dd: '%d araw',
  28221. M: 'isang buwan',
  28222. MM: '%d buwan',
  28223. y: 'isang taon',
  28224. yy: '%d taon',
  28225. },
  28226. dayOfMonthOrdinalParse: /\d{1,2}/,
  28227. ordinal: function (number) {
  28228. return number;
  28229. },
  28230. week: {
  28231. dow: 1, // Monday is the first day of the week.
  28232. doy: 4, // The week that contains Jan 4th is the first week of the year.
  28233. },
  28234. });
  28235. return tlPh;
  28236. })));
  28237. /***/ }),
  28238. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tlh.js":
  28239. /*!****************************************************************************!*\
  28240. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tlh.js ***!
  28241. \****************************************************************************/
  28242. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28243. //! moment.js locale configuration
  28244. //! locale : Klingon [tlh]
  28245. //! author : Dominika Kruk : https://github.com/amaranthrose
  28246. ;(function (global, factory) {
  28247. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28248. 0
  28249. }(this, (function (moment) { 'use strict';
  28250. //! moment.js locale configuration
  28251. var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
  28252. function translateFuture(output) {
  28253. var time = output;
  28254. time =
  28255. output.indexOf('jaj') !== -1
  28256. ? time.slice(0, -3) + 'leS'
  28257. : output.indexOf('jar') !== -1
  28258. ? time.slice(0, -3) + 'waQ'
  28259. : output.indexOf('DIS') !== -1
  28260. ? time.slice(0, -3) + 'nem'
  28261. : time + ' pIq';
  28262. return time;
  28263. }
  28264. function translatePast(output) {
  28265. var time = output;
  28266. time =
  28267. output.indexOf('jaj') !== -1
  28268. ? time.slice(0, -3) + 'Hu’'
  28269. : output.indexOf('jar') !== -1
  28270. ? time.slice(0, -3) + 'wen'
  28271. : output.indexOf('DIS') !== -1
  28272. ? time.slice(0, -3) + 'ben'
  28273. : time + ' ret';
  28274. return time;
  28275. }
  28276. function translate(number, withoutSuffix, string, isFuture) {
  28277. var numberNoun = numberAsNoun(number);
  28278. switch (string) {
  28279. case 'ss':
  28280. return numberNoun + ' lup';
  28281. case 'mm':
  28282. return numberNoun + ' tup';
  28283. case 'hh':
  28284. return numberNoun + ' rep';
  28285. case 'dd':
  28286. return numberNoun + ' jaj';
  28287. case 'MM':
  28288. return numberNoun + ' jar';
  28289. case 'yy':
  28290. return numberNoun + ' DIS';
  28291. }
  28292. }
  28293. function numberAsNoun(number) {
  28294. var hundred = Math.floor((number % 1000) / 100),
  28295. ten = Math.floor((number % 100) / 10),
  28296. one = number % 10,
  28297. word = '';
  28298. if (hundred > 0) {
  28299. word += numbersNouns[hundred] + 'vatlh';
  28300. }
  28301. if (ten > 0) {
  28302. word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
  28303. }
  28304. if (one > 0) {
  28305. word += (word !== '' ? ' ' : '') + numbersNouns[one];
  28306. }
  28307. return word === '' ? 'pagh' : word;
  28308. }
  28309. var tlh = moment.defineLocale('tlh', {
  28310. 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(
  28311. '_'
  28312. ),
  28313. monthsShort:
  28314. '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(
  28315. '_'
  28316. ),
  28317. monthsParseExact: true,
  28318. weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  28319. '_'
  28320. ),
  28321. weekdaysShort:
  28322. 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  28323. weekdaysMin:
  28324. 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  28325. longDateFormat: {
  28326. LT: 'HH:mm',
  28327. LTS: 'HH:mm:ss',
  28328. L: 'DD.MM.YYYY',
  28329. LL: 'D MMMM YYYY',
  28330. LLL: 'D MMMM YYYY HH:mm',
  28331. LLLL: 'dddd, D MMMM YYYY HH:mm',
  28332. },
  28333. calendar: {
  28334. sameDay: '[DaHjaj] LT',
  28335. nextDay: '[wa’leS] LT',
  28336. nextWeek: 'LLL',
  28337. lastDay: '[wa’Hu’] LT',
  28338. lastWeek: 'LLL',
  28339. sameElse: 'L',
  28340. },
  28341. relativeTime: {
  28342. future: translateFuture,
  28343. past: translatePast,
  28344. s: 'puS lup',
  28345. ss: translate,
  28346. m: 'wa’ tup',
  28347. mm: translate,
  28348. h: 'wa’ rep',
  28349. hh: translate,
  28350. d: 'wa’ jaj',
  28351. dd: translate,
  28352. M: 'wa’ jar',
  28353. MM: translate,
  28354. y: 'wa’ DIS',
  28355. yy: translate,
  28356. },
  28357. dayOfMonthOrdinalParse: /\d{1,2}\./,
  28358. ordinal: '%d.',
  28359. week: {
  28360. dow: 1, // Monday is the first day of the week.
  28361. doy: 4, // The week that contains Jan 4th is the first week of the year.
  28362. },
  28363. });
  28364. return tlh;
  28365. })));
  28366. /***/ }),
  28367. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tr.js":
  28368. /*!***************************************************************************!*\
  28369. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tr.js ***!
  28370. \***************************************************************************/
  28371. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28372. //! moment.js locale configuration
  28373. //! locale : Turkish [tr]
  28374. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  28375. //! Burak Yiğit Kaya: https://github.com/BYK
  28376. ;(function (global, factory) {
  28377. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28378. 0
  28379. }(this, (function (moment) { 'use strict';
  28380. //! moment.js locale configuration
  28381. var suffixes = {
  28382. 1: "'inci",
  28383. 5: "'inci",
  28384. 8: "'inci",
  28385. 70: "'inci",
  28386. 80: "'inci",
  28387. 2: "'nci",
  28388. 7: "'nci",
  28389. 20: "'nci",
  28390. 50: "'nci",
  28391. 3: "'üncü",
  28392. 4: "'üncü",
  28393. 100: "'üncü",
  28394. 6: "'ncı",
  28395. 9: "'uncu",
  28396. 10: "'uncu",
  28397. 30: "'uncu",
  28398. 60: "'ıncı",
  28399. 90: "'ıncı",
  28400. };
  28401. var tr = moment.defineLocale('tr', {
  28402. months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
  28403. '_'
  28404. ),
  28405. monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  28406. weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
  28407. '_'
  28408. ),
  28409. weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
  28410. weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  28411. meridiem: function (hours, minutes, isLower) {
  28412. if (hours < 12) {
  28413. return isLower ? 'öö' : 'ÖÖ';
  28414. } else {
  28415. return isLower ? 'ös' : 'ÖS';
  28416. }
  28417. },
  28418. meridiemParse: /öö|ÖÖ|ös|ÖS/,
  28419. isPM: function (input) {
  28420. return input === 'ös' || input === 'ÖS';
  28421. },
  28422. longDateFormat: {
  28423. LT: 'HH:mm',
  28424. LTS: 'HH:mm:ss',
  28425. L: 'DD.MM.YYYY',
  28426. LL: 'D MMMM YYYY',
  28427. LLL: 'D MMMM YYYY HH:mm',
  28428. LLLL: 'dddd, D MMMM YYYY HH:mm',
  28429. },
  28430. calendar: {
  28431. sameDay: '[bugün saat] LT',
  28432. nextDay: '[yarın saat] LT',
  28433. nextWeek: '[gelecek] dddd [saat] LT',
  28434. lastDay: '[dün] LT',
  28435. lastWeek: '[geçen] dddd [saat] LT',
  28436. sameElse: 'L',
  28437. },
  28438. relativeTime: {
  28439. future: '%s sonra',
  28440. past: '%s önce',
  28441. s: 'birkaç saniye',
  28442. ss: '%d saniye',
  28443. m: 'bir dakika',
  28444. mm: '%d dakika',
  28445. h: 'bir saat',
  28446. hh: '%d saat',
  28447. d: 'bir gün',
  28448. dd: '%d gün',
  28449. w: 'bir hafta',
  28450. ww: '%d hafta',
  28451. M: 'bir ay',
  28452. MM: '%d ay',
  28453. y: 'bir yıl',
  28454. yy: '%d yıl',
  28455. },
  28456. ordinal: function (number, period) {
  28457. switch (period) {
  28458. case 'd':
  28459. case 'D':
  28460. case 'Do':
  28461. case 'DD':
  28462. return number;
  28463. default:
  28464. if (number === 0) {
  28465. // special case for zero
  28466. return number + "'ıncı";
  28467. }
  28468. var a = number % 10,
  28469. b = (number % 100) - a,
  28470. c = number >= 100 ? 100 : null;
  28471. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  28472. }
  28473. },
  28474. week: {
  28475. dow: 1, // Monday is the first day of the week.
  28476. doy: 7, // The week that contains Jan 7th is the first week of the year.
  28477. },
  28478. });
  28479. return tr;
  28480. })));
  28481. /***/ }),
  28482. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzl.js":
  28483. /*!****************************************************************************!*\
  28484. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzl.js ***!
  28485. \****************************************************************************/
  28486. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28487. //! moment.js locale configuration
  28488. //! locale : Talossan [tzl]
  28489. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  28490. //! author : Iustì Canun
  28491. ;(function (global, factory) {
  28492. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28493. 0
  28494. }(this, (function (moment) { 'use strict';
  28495. //! moment.js locale configuration
  28496. // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
  28497. // This is currently too difficult (maybe even impossible) to add.
  28498. var tzl = moment.defineLocale('tzl', {
  28499. months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
  28500. '_'
  28501. ),
  28502. monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
  28503. weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
  28504. weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
  28505. weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
  28506. longDateFormat: {
  28507. LT: 'HH.mm',
  28508. LTS: 'HH.mm.ss',
  28509. L: 'DD.MM.YYYY',
  28510. LL: 'D. MMMM [dallas] YYYY',
  28511. LLL: 'D. MMMM [dallas] YYYY HH.mm',
  28512. LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
  28513. },
  28514. meridiemParse: /d\'o|d\'a/i,
  28515. isPM: function (input) {
  28516. return "d'o" === input.toLowerCase();
  28517. },
  28518. meridiem: function (hours, minutes, isLower) {
  28519. if (hours > 11) {
  28520. return isLower ? "d'o" : "D'O";
  28521. } else {
  28522. return isLower ? "d'a" : "D'A";
  28523. }
  28524. },
  28525. calendar: {
  28526. sameDay: '[oxhi à] LT',
  28527. nextDay: '[demà à] LT',
  28528. nextWeek: 'dddd [à] LT',
  28529. lastDay: '[ieiri à] LT',
  28530. lastWeek: '[sür el] dddd [lasteu à] LT',
  28531. sameElse: 'L',
  28532. },
  28533. relativeTime: {
  28534. future: 'osprei %s',
  28535. past: 'ja%s',
  28536. s: processRelativeTime,
  28537. ss: processRelativeTime,
  28538. m: processRelativeTime,
  28539. mm: processRelativeTime,
  28540. h: processRelativeTime,
  28541. hh: processRelativeTime,
  28542. d: processRelativeTime,
  28543. dd: processRelativeTime,
  28544. M: processRelativeTime,
  28545. MM: processRelativeTime,
  28546. y: processRelativeTime,
  28547. yy: processRelativeTime,
  28548. },
  28549. dayOfMonthOrdinalParse: /\d{1,2}\./,
  28550. ordinal: '%d.',
  28551. week: {
  28552. dow: 1, // Monday is the first day of the week.
  28553. doy: 4, // The week that contains Jan 4th is the first week of the year.
  28554. },
  28555. });
  28556. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  28557. var format = {
  28558. s: ['viensas secunds', "'iensas secunds"],
  28559. ss: [number + ' secunds', '' + number + ' secunds'],
  28560. m: ["'n míut", "'iens míut"],
  28561. mm: [number + ' míuts', '' + number + ' míuts'],
  28562. h: ["'n þora", "'iensa þora"],
  28563. hh: [number + ' þoras', '' + number + ' þoras'],
  28564. d: ["'n ziua", "'iensa ziua"],
  28565. dd: [number + ' ziuas', '' + number + ' ziuas'],
  28566. M: ["'n mes", "'iens mes"],
  28567. MM: [number + ' mesen', '' + number + ' mesen'],
  28568. y: ["'n ar", "'iens ar"],
  28569. yy: [number + ' ars', '' + number + ' ars'],
  28570. };
  28571. return isFuture
  28572. ? format[key][0]
  28573. : withoutSuffix
  28574. ? format[key][0]
  28575. : format[key][1];
  28576. }
  28577. return tzl;
  28578. })));
  28579. /***/ }),
  28580. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm-latn.js":
  28581. /*!*********************************************************************************!*\
  28582. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm-latn.js ***!
  28583. \*********************************************************************************/
  28584. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28585. //! moment.js locale configuration
  28586. //! locale : Central Atlas Tamazight Latin [tzm-latn]
  28587. //! author : Abdel Said : https://github.com/abdelsaid
  28588. ;(function (global, factory) {
  28589. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28590. 0
  28591. }(this, (function (moment) { 'use strict';
  28592. //! moment.js locale configuration
  28593. var tzmLatn = moment.defineLocale('tzm-latn', {
  28594. months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
  28595. '_'
  28596. ),
  28597. monthsShort:
  28598. 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
  28599. '_'
  28600. ),
  28601. weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  28602. weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  28603. weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  28604. longDateFormat: {
  28605. LT: 'HH:mm',
  28606. LTS: 'HH:mm:ss',
  28607. L: 'DD/MM/YYYY',
  28608. LL: 'D MMMM YYYY',
  28609. LLL: 'D MMMM YYYY HH:mm',
  28610. LLLL: 'dddd D MMMM YYYY HH:mm',
  28611. },
  28612. calendar: {
  28613. sameDay: '[asdkh g] LT',
  28614. nextDay: '[aska g] LT',
  28615. nextWeek: 'dddd [g] LT',
  28616. lastDay: '[assant g] LT',
  28617. lastWeek: 'dddd [g] LT',
  28618. sameElse: 'L',
  28619. },
  28620. relativeTime: {
  28621. future: 'dadkh s yan %s',
  28622. past: 'yan %s',
  28623. s: 'imik',
  28624. ss: '%d imik',
  28625. m: 'minuḍ',
  28626. mm: '%d minuḍ',
  28627. h: 'saɛa',
  28628. hh: '%d tassaɛin',
  28629. d: 'ass',
  28630. dd: '%d ossan',
  28631. M: 'ayowr',
  28632. MM: '%d iyyirn',
  28633. y: 'asgas',
  28634. yy: '%d isgasn',
  28635. },
  28636. week: {
  28637. dow: 6, // Saturday is the first day of the week.
  28638. doy: 12, // The week that contains Jan 12th is the first week of the year.
  28639. },
  28640. });
  28641. return tzmLatn;
  28642. })));
  28643. /***/ }),
  28644. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm.js":
  28645. /*!****************************************************************************!*\
  28646. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm.js ***!
  28647. \****************************************************************************/
  28648. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28649. //! moment.js locale configuration
  28650. //! locale : Central Atlas Tamazight [tzm]
  28651. //! author : Abdel Said : https://github.com/abdelsaid
  28652. ;(function (global, factory) {
  28653. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28654. 0
  28655. }(this, (function (moment) { 'use strict';
  28656. //! moment.js locale configuration
  28657. var tzm = moment.defineLocale('tzm', {
  28658. months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
  28659. '_'
  28660. ),
  28661. monthsShort:
  28662. 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
  28663. '_'
  28664. ),
  28665. weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  28666. weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  28667. weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  28668. longDateFormat: {
  28669. LT: 'HH:mm',
  28670. LTS: 'HH:mm:ss',
  28671. L: 'DD/MM/YYYY',
  28672. LL: 'D MMMM YYYY',
  28673. LLL: 'D MMMM YYYY HH:mm',
  28674. LLLL: 'dddd D MMMM YYYY HH:mm',
  28675. },
  28676. calendar: {
  28677. sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
  28678. nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
  28679. nextWeek: 'dddd [ⴴ] LT',
  28680. lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
  28681. lastWeek: 'dddd [ⴴ] LT',
  28682. sameElse: 'L',
  28683. },
  28684. relativeTime: {
  28685. future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
  28686. past: 'ⵢⴰⵏ %s',
  28687. s: 'ⵉⵎⵉⴽ',
  28688. ss: '%d ⵉⵎⵉⴽ',
  28689. m: 'ⵎⵉⵏⵓⴺ',
  28690. mm: '%d ⵎⵉⵏⵓⴺ',
  28691. h: 'ⵙⴰⵄⴰ',
  28692. hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
  28693. d: 'ⴰⵙⵙ',
  28694. dd: '%d oⵙⵙⴰⵏ',
  28695. M: 'ⴰⵢoⵓⵔ',
  28696. MM: '%d ⵉⵢⵢⵉⵔⵏ',
  28697. y: 'ⴰⵙⴳⴰⵙ',
  28698. yy: '%d ⵉⵙⴳⴰⵙⵏ',
  28699. },
  28700. week: {
  28701. dow: 6, // Saturday is the first day of the week.
  28702. doy: 12, // The week that contains Jan 12th is the first week of the year.
  28703. },
  28704. });
  28705. return tzm;
  28706. })));
  28707. /***/ }),
  28708. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ug-cn.js":
  28709. /*!******************************************************************************!*\
  28710. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ug-cn.js ***!
  28711. \******************************************************************************/
  28712. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28713. //! moment.js locale configuration
  28714. //! locale : Uyghur (China) [ug-cn]
  28715. //! author: boyaq : https://github.com/boyaq
  28716. ;(function (global, factory) {
  28717. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28718. 0
  28719. }(this, (function (moment) { 'use strict';
  28720. //! moment.js locale configuration
  28721. var ugCn = moment.defineLocale('ug-cn', {
  28722. months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
  28723. '_'
  28724. ),
  28725. monthsShort:
  28726. 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
  28727. '_'
  28728. ),
  28729. weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
  28730. '_'
  28731. ),
  28732. weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
  28733. weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
  28734. longDateFormat: {
  28735. LT: 'HH:mm',
  28736. LTS: 'HH:mm:ss',
  28737. L: 'YYYY-MM-DD',
  28738. LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
  28739. LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
  28740. LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
  28741. },
  28742. meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
  28743. meridiemHour: function (hour, meridiem) {
  28744. if (hour === 12) {
  28745. hour = 0;
  28746. }
  28747. if (
  28748. meridiem === 'يېرىم كېچە' ||
  28749. meridiem === 'سەھەر' ||
  28750. meridiem === 'چۈشتىن بۇرۇن'
  28751. ) {
  28752. return hour;
  28753. } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
  28754. return hour + 12;
  28755. } else {
  28756. return hour >= 11 ? hour : hour + 12;
  28757. }
  28758. },
  28759. meridiem: function (hour, minute, isLower) {
  28760. var hm = hour * 100 + minute;
  28761. if (hm < 600) {
  28762. return 'يېرىم كېچە';
  28763. } else if (hm < 900) {
  28764. return 'سەھەر';
  28765. } else if (hm < 1130) {
  28766. return 'چۈشتىن بۇرۇن';
  28767. } else if (hm < 1230) {
  28768. return 'چۈش';
  28769. } else if (hm < 1800) {
  28770. return 'چۈشتىن كېيىن';
  28771. } else {
  28772. return 'كەچ';
  28773. }
  28774. },
  28775. calendar: {
  28776. sameDay: '[بۈگۈن سائەت] LT',
  28777. nextDay: '[ئەتە سائەت] LT',
  28778. nextWeek: '[كېلەركى] dddd [سائەت] LT',
  28779. lastDay: '[تۆنۈگۈن] LT',
  28780. lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
  28781. sameElse: 'L',
  28782. },
  28783. relativeTime: {
  28784. future: '%s كېيىن',
  28785. past: '%s بۇرۇن',
  28786. s: 'نەچچە سېكونت',
  28787. ss: '%d سېكونت',
  28788. m: 'بىر مىنۇت',
  28789. mm: '%d مىنۇت',
  28790. h: 'بىر سائەت',
  28791. hh: '%d سائەت',
  28792. d: 'بىر كۈن',
  28793. dd: '%d كۈن',
  28794. M: 'بىر ئاي',
  28795. MM: '%d ئاي',
  28796. y: 'بىر يىل',
  28797. yy: '%d يىل',
  28798. },
  28799. dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
  28800. ordinal: function (number, period) {
  28801. switch (period) {
  28802. case 'd':
  28803. case 'D':
  28804. case 'DDD':
  28805. return number + '-كۈنى';
  28806. case 'w':
  28807. case 'W':
  28808. return number + '-ھەپتە';
  28809. default:
  28810. return number;
  28811. }
  28812. },
  28813. preparse: function (string) {
  28814. return string.replace(/،/g, ',');
  28815. },
  28816. postformat: function (string) {
  28817. return string.replace(/,/g, '،');
  28818. },
  28819. week: {
  28820. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  28821. dow: 1, // Monday is the first day of the week.
  28822. doy: 7, // The week that contains Jan 1st is the first week of the year.
  28823. },
  28824. });
  28825. return ugCn;
  28826. })));
  28827. /***/ }),
  28828. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uk.js":
  28829. /*!***************************************************************************!*\
  28830. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uk.js ***!
  28831. \***************************************************************************/
  28832. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  28833. //! moment.js locale configuration
  28834. //! locale : Ukrainian [uk]
  28835. //! author : zemlanin : https://github.com/zemlanin
  28836. //! Author : Menelion Elensúle : https://github.com/Oire
  28837. ;(function (global, factory) {
  28838. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  28839. 0
  28840. }(this, (function (moment) { 'use strict';
  28841. //! moment.js locale configuration
  28842. function plural(word, num) {
  28843. var forms = word.split('_');
  28844. return num % 10 === 1 && num % 100 !== 11
  28845. ? forms[0]
  28846. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  28847. ? forms[1]
  28848. : forms[2];
  28849. }
  28850. function relativeTimeWithPlural(number, withoutSuffix, key) {
  28851. var format = {
  28852. ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
  28853. mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  28854. hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  28855. dd: 'день_дні_днів',
  28856. MM: 'місяць_місяці_місяців',
  28857. yy: 'рік_роки_років',
  28858. };
  28859. if (key === 'm') {
  28860. return withoutSuffix ? 'хвилина' : 'хвилину';
  28861. } else if (key === 'h') {
  28862. return withoutSuffix ? 'година' : 'годину';
  28863. } else {
  28864. return number + ' ' + plural(format[key], +number);
  28865. }
  28866. }
  28867. function weekdaysCaseReplace(m, format) {
  28868. var weekdays = {
  28869. nominative:
  28870. 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
  28871. '_'
  28872. ),
  28873. accusative:
  28874. 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
  28875. '_'
  28876. ),
  28877. genitive:
  28878. 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
  28879. '_'
  28880. ),
  28881. },
  28882. nounCase;
  28883. if (m === true) {
  28884. return weekdays['nominative']
  28885. .slice(1, 7)
  28886. .concat(weekdays['nominative'].slice(0, 1));
  28887. }
  28888. if (!m) {
  28889. return weekdays['nominative'];
  28890. }
  28891. nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
  28892. ? 'accusative'
  28893. : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
  28894. ? 'genitive'
  28895. : 'nominative';
  28896. return weekdays[nounCase][m.day()];
  28897. }
  28898. function processHoursFunction(str) {
  28899. return function () {
  28900. return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
  28901. };
  28902. }
  28903. var uk = moment.defineLocale('uk', {
  28904. months: {
  28905. format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
  28906. '_'
  28907. ),
  28908. standalone:
  28909. 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
  28910. '_'
  28911. ),
  28912. },
  28913. monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
  28914. '_'
  28915. ),
  28916. weekdays: weekdaysCaseReplace,
  28917. weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  28918. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  28919. longDateFormat: {
  28920. LT: 'HH:mm',
  28921. LTS: 'HH:mm:ss',
  28922. L: 'DD.MM.YYYY',
  28923. LL: 'D MMMM YYYY р.',
  28924. LLL: 'D MMMM YYYY р., HH:mm',
  28925. LLLL: 'dddd, D MMMM YYYY р., HH:mm',
  28926. },
  28927. calendar: {
  28928. sameDay: processHoursFunction('[Сьогодні '),
  28929. nextDay: processHoursFunction('[Завтра '),
  28930. lastDay: processHoursFunction('[Вчора '),
  28931. nextWeek: processHoursFunction('[У] dddd ['),
  28932. lastWeek: function () {
  28933. switch (this.day()) {
  28934. case 0:
  28935. case 3:
  28936. case 5:
  28937. case 6:
  28938. return processHoursFunction('[Минулої] dddd [').call(this);
  28939. case 1:
  28940. case 2:
  28941. case 4:
  28942. return processHoursFunction('[Минулого] dddd [').call(this);
  28943. }
  28944. },
  28945. sameElse: 'L',
  28946. },
  28947. relativeTime: {
  28948. future: 'за %s',
  28949. past: '%s тому',
  28950. s: 'декілька секунд',
  28951. ss: relativeTimeWithPlural,
  28952. m: relativeTimeWithPlural,
  28953. mm: relativeTimeWithPlural,
  28954. h: 'годину',
  28955. hh: relativeTimeWithPlural,
  28956. d: 'день',
  28957. dd: relativeTimeWithPlural,
  28958. M: 'місяць',
  28959. MM: relativeTimeWithPlural,
  28960. y: 'рік',
  28961. yy: relativeTimeWithPlural,
  28962. },
  28963. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  28964. meridiemParse: /ночі|ранку|дня|вечора/,
  28965. isPM: function (input) {
  28966. return /^(дня|вечора)$/.test(input);
  28967. },
  28968. meridiem: function (hour, minute, isLower) {
  28969. if (hour < 4) {
  28970. return 'ночі';
  28971. } else if (hour < 12) {
  28972. return 'ранку';
  28973. } else if (hour < 17) {
  28974. return 'дня';
  28975. } else {
  28976. return 'вечора';
  28977. }
  28978. },
  28979. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  28980. ordinal: function (number, period) {
  28981. switch (period) {
  28982. case 'M':
  28983. case 'd':
  28984. case 'DDD':
  28985. case 'w':
  28986. case 'W':
  28987. return number + '-й';
  28988. case 'D':
  28989. return number + '-го';
  28990. default:
  28991. return number;
  28992. }
  28993. },
  28994. week: {
  28995. dow: 1, // Monday is the first day of the week.
  28996. doy: 7, // The week that contains Jan 7th is the first week of the year.
  28997. },
  28998. });
  28999. return uk;
  29000. })));
  29001. /***/ }),
  29002. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ur.js":
  29003. /*!***************************************************************************!*\
  29004. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ur.js ***!
  29005. \***************************************************************************/
  29006. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29007. //! moment.js locale configuration
  29008. //! locale : Urdu [ur]
  29009. //! author : Sawood Alam : https://github.com/ibnesayeed
  29010. //! author : Zack : https://github.com/ZackVision
  29011. ;(function (global, factory) {
  29012. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29013. 0
  29014. }(this, (function (moment) { 'use strict';
  29015. //! moment.js locale configuration
  29016. var months = [
  29017. 'جنوری',
  29018. 'فروری',
  29019. 'مارچ',
  29020. 'اپریل',
  29021. 'مئی',
  29022. 'جون',
  29023. 'جولائی',
  29024. 'اگست',
  29025. 'ستمبر',
  29026. 'اکتوبر',
  29027. 'نومبر',
  29028. 'دسمبر',
  29029. ],
  29030. days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
  29031. var ur = moment.defineLocale('ur', {
  29032. months: months,
  29033. monthsShort: months,
  29034. weekdays: days,
  29035. weekdaysShort: days,
  29036. weekdaysMin: days,
  29037. longDateFormat: {
  29038. LT: 'HH:mm',
  29039. LTS: 'HH:mm:ss',
  29040. L: 'DD/MM/YYYY',
  29041. LL: 'D MMMM YYYY',
  29042. LLL: 'D MMMM YYYY HH:mm',
  29043. LLLL: 'dddd، D MMMM YYYY HH:mm',
  29044. },
  29045. meridiemParse: /صبح|شام/,
  29046. isPM: function (input) {
  29047. return 'شام' === input;
  29048. },
  29049. meridiem: function (hour, minute, isLower) {
  29050. if (hour < 12) {
  29051. return 'صبح';
  29052. }
  29053. return 'شام';
  29054. },
  29055. calendar: {
  29056. sameDay: '[آج بوقت] LT',
  29057. nextDay: '[کل بوقت] LT',
  29058. nextWeek: 'dddd [بوقت] LT',
  29059. lastDay: '[گذشتہ روز بوقت] LT',
  29060. lastWeek: '[گذشتہ] dddd [بوقت] LT',
  29061. sameElse: 'L',
  29062. },
  29063. relativeTime: {
  29064. future: '%s بعد',
  29065. past: '%s قبل',
  29066. s: 'چند سیکنڈ',
  29067. ss: '%d سیکنڈ',
  29068. m: 'ایک منٹ',
  29069. mm: '%d منٹ',
  29070. h: 'ایک گھنٹہ',
  29071. hh: '%d گھنٹے',
  29072. d: 'ایک دن',
  29073. dd: '%d دن',
  29074. M: 'ایک ماہ',
  29075. MM: '%d ماہ',
  29076. y: 'ایک سال',
  29077. yy: '%d سال',
  29078. },
  29079. preparse: function (string) {
  29080. return string.replace(/،/g, ',');
  29081. },
  29082. postformat: function (string) {
  29083. return string.replace(/,/g, '،');
  29084. },
  29085. week: {
  29086. dow: 1, // Monday is the first day of the week.
  29087. doy: 4, // The week that contains Jan 4th is the first week of the year.
  29088. },
  29089. });
  29090. return ur;
  29091. })));
  29092. /***/ }),
  29093. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz-latn.js":
  29094. /*!********************************************************************************!*\
  29095. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz-latn.js ***!
  29096. \********************************************************************************/
  29097. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29098. //! moment.js locale configuration
  29099. //! locale : Uzbek Latin [uz-latn]
  29100. //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
  29101. ;(function (global, factory) {
  29102. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29103. 0
  29104. }(this, (function (moment) { 'use strict';
  29105. //! moment.js locale configuration
  29106. var uzLatn = moment.defineLocale('uz-latn', {
  29107. months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
  29108. '_'
  29109. ),
  29110. monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
  29111. weekdays:
  29112. 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
  29113. '_'
  29114. ),
  29115. weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
  29116. weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
  29117. longDateFormat: {
  29118. LT: 'HH:mm',
  29119. LTS: 'HH:mm:ss',
  29120. L: 'DD/MM/YYYY',
  29121. LL: 'D MMMM YYYY',
  29122. LLL: 'D MMMM YYYY HH:mm',
  29123. LLLL: 'D MMMM YYYY, dddd HH:mm',
  29124. },
  29125. calendar: {
  29126. sameDay: '[Bugun soat] LT [da]',
  29127. nextDay: '[Ertaga] LT [da]',
  29128. nextWeek: 'dddd [kuni soat] LT [da]',
  29129. lastDay: '[Kecha soat] LT [da]',
  29130. lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
  29131. sameElse: 'L',
  29132. },
  29133. relativeTime: {
  29134. future: 'Yaqin %s ichida',
  29135. past: 'Bir necha %s oldin',
  29136. s: 'soniya',
  29137. ss: '%d soniya',
  29138. m: 'bir daqiqa',
  29139. mm: '%d daqiqa',
  29140. h: 'bir soat',
  29141. hh: '%d soat',
  29142. d: 'bir kun',
  29143. dd: '%d kun',
  29144. M: 'bir oy',
  29145. MM: '%d oy',
  29146. y: 'bir yil',
  29147. yy: '%d yil',
  29148. },
  29149. week: {
  29150. dow: 1, // Monday is the first day of the week.
  29151. doy: 7, // The week that contains Jan 7th is the first week of the year.
  29152. },
  29153. });
  29154. return uzLatn;
  29155. })));
  29156. /***/ }),
  29157. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz.js":
  29158. /*!***************************************************************************!*\
  29159. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz.js ***!
  29160. \***************************************************************************/
  29161. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29162. //! moment.js locale configuration
  29163. //! locale : Uzbek [uz]
  29164. //! author : Sardor Muminov : https://github.com/muminoff
  29165. ;(function (global, factory) {
  29166. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29167. 0
  29168. }(this, (function (moment) { 'use strict';
  29169. //! moment.js locale configuration
  29170. var uz = moment.defineLocale('uz', {
  29171. months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
  29172. '_'
  29173. ),
  29174. monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  29175. weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
  29176. weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
  29177. weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
  29178. longDateFormat: {
  29179. LT: 'HH:mm',
  29180. LTS: 'HH:mm:ss',
  29181. L: 'DD/MM/YYYY',
  29182. LL: 'D MMMM YYYY',
  29183. LLL: 'D MMMM YYYY HH:mm',
  29184. LLLL: 'D MMMM YYYY, dddd HH:mm',
  29185. },
  29186. calendar: {
  29187. sameDay: '[Бугун соат] LT [да]',
  29188. nextDay: '[Эртага] LT [да]',
  29189. nextWeek: 'dddd [куни соат] LT [да]',
  29190. lastDay: '[Кеча соат] LT [да]',
  29191. lastWeek: '[Утган] dddd [куни соат] LT [да]',
  29192. sameElse: 'L',
  29193. },
  29194. relativeTime: {
  29195. future: 'Якин %s ичида',
  29196. past: 'Бир неча %s олдин',
  29197. s: 'фурсат',
  29198. ss: '%d фурсат',
  29199. m: 'бир дакика',
  29200. mm: '%d дакика',
  29201. h: 'бир соат',
  29202. hh: '%d соат',
  29203. d: 'бир кун',
  29204. dd: '%d кун',
  29205. M: 'бир ой',
  29206. MM: '%d ой',
  29207. y: 'бир йил',
  29208. yy: '%d йил',
  29209. },
  29210. week: {
  29211. dow: 1, // Monday is the first day of the week.
  29212. doy: 7, // The week that contains Jan 4th is the first week of the year.
  29213. },
  29214. });
  29215. return uz;
  29216. })));
  29217. /***/ }),
  29218. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/vi.js":
  29219. /*!***************************************************************************!*\
  29220. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/vi.js ***!
  29221. \***************************************************************************/
  29222. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29223. //! moment.js locale configuration
  29224. //! locale : Vietnamese [vi]
  29225. //! author : Bang Nguyen : https://github.com/bangnk
  29226. //! author : Chien Kira : https://github.com/chienkira
  29227. ;(function (global, factory) {
  29228. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29229. 0
  29230. }(this, (function (moment) { 'use strict';
  29231. //! moment.js locale configuration
  29232. var vi = moment.defineLocale('vi', {
  29233. 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(
  29234. '_'
  29235. ),
  29236. monthsShort:
  29237. '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(
  29238. '_'
  29239. ),
  29240. monthsParseExact: true,
  29241. weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
  29242. '_'
  29243. ),
  29244. weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  29245. weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  29246. weekdaysParseExact: true,
  29247. meridiemParse: /sa|ch/i,
  29248. isPM: function (input) {
  29249. return /^ch$/i.test(input);
  29250. },
  29251. meridiem: function (hours, minutes, isLower) {
  29252. if (hours < 12) {
  29253. return isLower ? 'sa' : 'SA';
  29254. } else {
  29255. return isLower ? 'ch' : 'CH';
  29256. }
  29257. },
  29258. longDateFormat: {
  29259. LT: 'HH:mm',
  29260. LTS: 'HH:mm:ss',
  29261. L: 'DD/MM/YYYY',
  29262. LL: 'D MMMM [năm] YYYY',
  29263. LLL: 'D MMMM [năm] YYYY HH:mm',
  29264. LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
  29265. l: 'DD/M/YYYY',
  29266. ll: 'D MMM YYYY',
  29267. lll: 'D MMM YYYY HH:mm',
  29268. llll: 'ddd, D MMM YYYY HH:mm',
  29269. },
  29270. calendar: {
  29271. sameDay: '[Hôm nay lúc] LT',
  29272. nextDay: '[Ngày mai lúc] LT',
  29273. nextWeek: 'dddd [tuần tới lúc] LT',
  29274. lastDay: '[Hôm qua lúc] LT',
  29275. lastWeek: 'dddd [tuần trước lúc] LT',
  29276. sameElse: 'L',
  29277. },
  29278. relativeTime: {
  29279. future: '%s tới',
  29280. past: '%s trước',
  29281. s: 'vài giây',
  29282. ss: '%d giây',
  29283. m: 'một phút',
  29284. mm: '%d phút',
  29285. h: 'một giờ',
  29286. hh: '%d giờ',
  29287. d: 'một ngày',
  29288. dd: '%d ngày',
  29289. w: 'một tuần',
  29290. ww: '%d tuần',
  29291. M: 'một tháng',
  29292. MM: '%d tháng',
  29293. y: 'một năm',
  29294. yy: '%d năm',
  29295. },
  29296. dayOfMonthOrdinalParse: /\d{1,2}/,
  29297. ordinal: function (number) {
  29298. return number;
  29299. },
  29300. week: {
  29301. dow: 1, // Monday is the first day of the week.
  29302. doy: 4, // The week that contains Jan 4th is the first week of the year.
  29303. },
  29304. });
  29305. return vi;
  29306. })));
  29307. /***/ }),
  29308. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/x-pseudo.js":
  29309. /*!*********************************************************************************!*\
  29310. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/x-pseudo.js ***!
  29311. \*********************************************************************************/
  29312. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29313. //! moment.js locale configuration
  29314. //! locale : Pseudo [x-pseudo]
  29315. //! author : Andrew Hood : https://github.com/andrewhood125
  29316. ;(function (global, factory) {
  29317. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29318. 0
  29319. }(this, (function (moment) { 'use strict';
  29320. //! moment.js locale configuration
  29321. var xPseudo = moment.defineLocale('x-pseudo', {
  29322. 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(
  29323. '_'
  29324. ),
  29325. monthsShort:
  29326. 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
  29327. '_'
  29328. ),
  29329. monthsParseExact: true,
  29330. weekdays:
  29331. 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
  29332. '_'
  29333. ),
  29334. weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
  29335. weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
  29336. weekdaysParseExact: true,
  29337. longDateFormat: {
  29338. LT: 'HH:mm',
  29339. L: 'DD/MM/YYYY',
  29340. LL: 'D MMMM YYYY',
  29341. LLL: 'D MMMM YYYY HH:mm',
  29342. LLLL: 'dddd, D MMMM YYYY HH:mm',
  29343. },
  29344. calendar: {
  29345. sameDay: '[T~ódá~ý át] LT',
  29346. nextDay: '[T~ómó~rró~w át] LT',
  29347. nextWeek: 'dddd [át] LT',
  29348. lastDay: '[Ý~ést~érdá~ý át] LT',
  29349. lastWeek: '[L~ást] dddd [át] LT',
  29350. sameElse: 'L',
  29351. },
  29352. relativeTime: {
  29353. future: 'í~ñ %s',
  29354. past: '%s á~gó',
  29355. s: 'á ~féw ~sécó~ñds',
  29356. ss: '%d s~écóñ~ds',
  29357. m: 'á ~míñ~úté',
  29358. mm: '%d m~íñú~tés',
  29359. h: 'á~ñ hó~úr',
  29360. hh: '%d h~óúrs',
  29361. d: 'á ~dáý',
  29362. dd: '%d d~áýs',
  29363. M: 'á ~móñ~th',
  29364. MM: '%d m~óñt~hs',
  29365. y: 'á ~ýéár',
  29366. yy: '%d ý~éárs',
  29367. },
  29368. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  29369. ordinal: function (number) {
  29370. var b = number % 10,
  29371. output =
  29372. ~~((number % 100) / 10) === 1
  29373. ? 'th'
  29374. : b === 1
  29375. ? 'st'
  29376. : b === 2
  29377. ? 'nd'
  29378. : b === 3
  29379. ? 'rd'
  29380. : 'th';
  29381. return number + output;
  29382. },
  29383. week: {
  29384. dow: 1, // Monday is the first day of the week.
  29385. doy: 4, // The week that contains Jan 4th is the first week of the year.
  29386. },
  29387. });
  29388. return xPseudo;
  29389. })));
  29390. /***/ }),
  29391. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/yo.js":
  29392. /*!***************************************************************************!*\
  29393. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/yo.js ***!
  29394. \***************************************************************************/
  29395. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29396. //! moment.js locale configuration
  29397. //! locale : Yoruba Nigeria [yo]
  29398. //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
  29399. ;(function (global, factory) {
  29400. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29401. 0
  29402. }(this, (function (moment) { 'use strict';
  29403. //! moment.js locale configuration
  29404. var yo = moment.defineLocale('yo', {
  29405. months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
  29406. '_'
  29407. ),
  29408. monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
  29409. weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
  29410. weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
  29411. weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
  29412. longDateFormat: {
  29413. LT: 'h:mm A',
  29414. LTS: 'h:mm:ss A',
  29415. L: 'DD/MM/YYYY',
  29416. LL: 'D MMMM YYYY',
  29417. LLL: 'D MMMM YYYY h:mm A',
  29418. LLLL: 'dddd, D MMMM YYYY h:mm A',
  29419. },
  29420. calendar: {
  29421. sameDay: '[Ònì ni] LT',
  29422. nextDay: '[Ọ̀la ni] LT',
  29423. nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
  29424. lastDay: '[Àna ni] LT',
  29425. lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
  29426. sameElse: 'L',
  29427. },
  29428. relativeTime: {
  29429. future: 'ní %s',
  29430. past: '%s kọjá',
  29431. s: 'ìsẹjú aayá die',
  29432. ss: 'aayá %d',
  29433. m: 'ìsẹjú kan',
  29434. mm: 'ìsẹjú %d',
  29435. h: 'wákati kan',
  29436. hh: 'wákati %d',
  29437. d: 'ọjọ́ kan',
  29438. dd: 'ọjọ́ %d',
  29439. M: 'osù kan',
  29440. MM: 'osù %d',
  29441. y: 'ọdún kan',
  29442. yy: 'ọdún %d',
  29443. },
  29444. dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
  29445. ordinal: 'ọjọ́ %d',
  29446. week: {
  29447. dow: 1, // Monday is the first day of the week.
  29448. doy: 4, // The week that contains Jan 4th is the first week of the year.
  29449. },
  29450. });
  29451. return yo;
  29452. })));
  29453. /***/ }),
  29454. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-cn.js":
  29455. /*!******************************************************************************!*\
  29456. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-cn.js ***!
  29457. \******************************************************************************/
  29458. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29459. //! moment.js locale configuration
  29460. //! locale : Chinese (China) [zh-cn]
  29461. //! author : suupic : https://github.com/suupic
  29462. //! author : Zeno Zeng : https://github.com/zenozeng
  29463. //! author : uu109 : https://github.com/uu109
  29464. ;(function (global, factory) {
  29465. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29466. 0
  29467. }(this, (function (moment) { 'use strict';
  29468. //! moment.js locale configuration
  29469. var zhCn = moment.defineLocale('zh-cn', {
  29470. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  29471. '_'
  29472. ),
  29473. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  29474. '_'
  29475. ),
  29476. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  29477. weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  29478. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  29479. longDateFormat: {
  29480. LT: 'HH:mm',
  29481. LTS: 'HH:mm:ss',
  29482. L: 'YYYY/MM/DD',
  29483. LL: 'YYYY年M月D日',
  29484. LLL: 'YYYY年M月D日Ah点mm分',
  29485. LLLL: 'YYYY年M月D日ddddAh点mm分',
  29486. l: 'YYYY/M/D',
  29487. ll: 'YYYY年M月D日',
  29488. lll: 'YYYY年M月D日 HH:mm',
  29489. llll: 'YYYY年M月D日dddd HH:mm',
  29490. },
  29491. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  29492. meridiemHour: function (hour, meridiem) {
  29493. if (hour === 12) {
  29494. hour = 0;
  29495. }
  29496. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  29497. return hour;
  29498. } else if (meridiem === '下午' || meridiem === '晚上') {
  29499. return hour + 12;
  29500. } else {
  29501. // '中午'
  29502. return hour >= 11 ? hour : hour + 12;
  29503. }
  29504. },
  29505. meridiem: function (hour, minute, isLower) {
  29506. var hm = hour * 100 + minute;
  29507. if (hm < 600) {
  29508. return '凌晨';
  29509. } else if (hm < 900) {
  29510. return '早上';
  29511. } else if (hm < 1130) {
  29512. return '上午';
  29513. } else if (hm < 1230) {
  29514. return '中午';
  29515. } else if (hm < 1800) {
  29516. return '下午';
  29517. } else {
  29518. return '晚上';
  29519. }
  29520. },
  29521. calendar: {
  29522. sameDay: '[今天]LT',
  29523. nextDay: '[明天]LT',
  29524. nextWeek: function (now) {
  29525. if (now.week() !== this.week()) {
  29526. return '[下]dddLT';
  29527. } else {
  29528. return '[本]dddLT';
  29529. }
  29530. },
  29531. lastDay: '[昨天]LT',
  29532. lastWeek: function (now) {
  29533. if (this.week() !== now.week()) {
  29534. return '[上]dddLT';
  29535. } else {
  29536. return '[本]dddLT';
  29537. }
  29538. },
  29539. sameElse: 'L',
  29540. },
  29541. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  29542. ordinal: function (number, period) {
  29543. switch (period) {
  29544. case 'd':
  29545. case 'D':
  29546. case 'DDD':
  29547. return number + '日';
  29548. case 'M':
  29549. return number + '月';
  29550. case 'w':
  29551. case 'W':
  29552. return number + '周';
  29553. default:
  29554. return number;
  29555. }
  29556. },
  29557. relativeTime: {
  29558. future: '%s后',
  29559. past: '%s前',
  29560. s: '几秒',
  29561. ss: '%d 秒',
  29562. m: '1 分钟',
  29563. mm: '%d 分钟',
  29564. h: '1 小时',
  29565. hh: '%d 小时',
  29566. d: '1 天',
  29567. dd: '%d 天',
  29568. w: '1 周',
  29569. ww: '%d 周',
  29570. M: '1 个月',
  29571. MM: '%d 个月',
  29572. y: '1 年',
  29573. yy: '%d 年',
  29574. },
  29575. week: {
  29576. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  29577. dow: 1, // Monday is the first day of the week.
  29578. doy: 4, // The week that contains Jan 4th is the first week of the year.
  29579. },
  29580. });
  29581. return zhCn;
  29582. })));
  29583. /***/ }),
  29584. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-hk.js":
  29585. /*!******************************************************************************!*\
  29586. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-hk.js ***!
  29587. \******************************************************************************/
  29588. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29589. //! moment.js locale configuration
  29590. //! locale : Chinese (Hong Kong) [zh-hk]
  29591. //! author : Ben : https://github.com/ben-lin
  29592. //! author : Chris Lam : https://github.com/hehachris
  29593. //! author : Konstantin : https://github.com/skfd
  29594. //! author : Anthony : https://github.com/anthonylau
  29595. ;(function (global, factory) {
  29596. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29597. 0
  29598. }(this, (function (moment) { 'use strict';
  29599. //! moment.js locale configuration
  29600. var zhHk = moment.defineLocale('zh-hk', {
  29601. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  29602. '_'
  29603. ),
  29604. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  29605. '_'
  29606. ),
  29607. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  29608. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  29609. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  29610. longDateFormat: {
  29611. LT: 'HH:mm',
  29612. LTS: 'HH:mm:ss',
  29613. L: 'YYYY/MM/DD',
  29614. LL: 'YYYY年M月D日',
  29615. LLL: 'YYYY年M月D日 HH:mm',
  29616. LLLL: 'YYYY年M月D日dddd HH:mm',
  29617. l: 'YYYY/M/D',
  29618. ll: 'YYYY年M月D日',
  29619. lll: 'YYYY年M月D日 HH:mm',
  29620. llll: 'YYYY年M月D日dddd HH:mm',
  29621. },
  29622. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  29623. meridiemHour: function (hour, meridiem) {
  29624. if (hour === 12) {
  29625. hour = 0;
  29626. }
  29627. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  29628. return hour;
  29629. } else if (meridiem === '中午') {
  29630. return hour >= 11 ? hour : hour + 12;
  29631. } else if (meridiem === '下午' || meridiem === '晚上') {
  29632. return hour + 12;
  29633. }
  29634. },
  29635. meridiem: function (hour, minute, isLower) {
  29636. var hm = hour * 100 + minute;
  29637. if (hm < 600) {
  29638. return '凌晨';
  29639. } else if (hm < 900) {
  29640. return '早上';
  29641. } else if (hm < 1200) {
  29642. return '上午';
  29643. } else if (hm === 1200) {
  29644. return '中午';
  29645. } else if (hm < 1800) {
  29646. return '下午';
  29647. } else {
  29648. return '晚上';
  29649. }
  29650. },
  29651. calendar: {
  29652. sameDay: '[今天]LT',
  29653. nextDay: '[明天]LT',
  29654. nextWeek: '[下]ddddLT',
  29655. lastDay: '[昨天]LT',
  29656. lastWeek: '[上]ddddLT',
  29657. sameElse: 'L',
  29658. },
  29659. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  29660. ordinal: function (number, period) {
  29661. switch (period) {
  29662. case 'd':
  29663. case 'D':
  29664. case 'DDD':
  29665. return number + '日';
  29666. case 'M':
  29667. return number + '月';
  29668. case 'w':
  29669. case 'W':
  29670. return number + '週';
  29671. default:
  29672. return number;
  29673. }
  29674. },
  29675. relativeTime: {
  29676. future: '%s後',
  29677. past: '%s前',
  29678. s: '幾秒',
  29679. ss: '%d 秒',
  29680. m: '1 分鐘',
  29681. mm: '%d 分鐘',
  29682. h: '1 小時',
  29683. hh: '%d 小時',
  29684. d: '1 天',
  29685. dd: '%d 天',
  29686. M: '1 個月',
  29687. MM: '%d 個月',
  29688. y: '1 年',
  29689. yy: '%d 年',
  29690. },
  29691. });
  29692. return zhHk;
  29693. })));
  29694. /***/ }),
  29695. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-mo.js":
  29696. /*!******************************************************************************!*\
  29697. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-mo.js ***!
  29698. \******************************************************************************/
  29699. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29700. //! moment.js locale configuration
  29701. //! locale : Chinese (Macau) [zh-mo]
  29702. //! author : Ben : https://github.com/ben-lin
  29703. //! author : Chris Lam : https://github.com/hehachris
  29704. //! author : Tan Yuanhong : https://github.com/le0tan
  29705. ;(function (global, factory) {
  29706. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29707. 0
  29708. }(this, (function (moment) { 'use strict';
  29709. //! moment.js locale configuration
  29710. var zhMo = moment.defineLocale('zh-mo', {
  29711. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  29712. '_'
  29713. ),
  29714. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  29715. '_'
  29716. ),
  29717. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  29718. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  29719. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  29720. longDateFormat: {
  29721. LT: 'HH:mm',
  29722. LTS: 'HH:mm:ss',
  29723. L: 'DD/MM/YYYY',
  29724. LL: 'YYYY年M月D日',
  29725. LLL: 'YYYY年M月D日 HH:mm',
  29726. LLLL: 'YYYY年M月D日dddd HH:mm',
  29727. l: 'D/M/YYYY',
  29728. ll: 'YYYY年M月D日',
  29729. lll: 'YYYY年M月D日 HH:mm',
  29730. llll: 'YYYY年M月D日dddd HH:mm',
  29731. },
  29732. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  29733. meridiemHour: function (hour, meridiem) {
  29734. if (hour === 12) {
  29735. hour = 0;
  29736. }
  29737. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  29738. return hour;
  29739. } else if (meridiem === '中午') {
  29740. return hour >= 11 ? hour : hour + 12;
  29741. } else if (meridiem === '下午' || meridiem === '晚上') {
  29742. return hour + 12;
  29743. }
  29744. },
  29745. meridiem: function (hour, minute, isLower) {
  29746. var hm = hour * 100 + minute;
  29747. if (hm < 600) {
  29748. return '凌晨';
  29749. } else if (hm < 900) {
  29750. return '早上';
  29751. } else if (hm < 1130) {
  29752. return '上午';
  29753. } else if (hm < 1230) {
  29754. return '中午';
  29755. } else if (hm < 1800) {
  29756. return '下午';
  29757. } else {
  29758. return '晚上';
  29759. }
  29760. },
  29761. calendar: {
  29762. sameDay: '[今天] LT',
  29763. nextDay: '[明天] LT',
  29764. nextWeek: '[下]dddd LT',
  29765. lastDay: '[昨天] LT',
  29766. lastWeek: '[上]dddd LT',
  29767. sameElse: 'L',
  29768. },
  29769. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  29770. ordinal: function (number, period) {
  29771. switch (period) {
  29772. case 'd':
  29773. case 'D':
  29774. case 'DDD':
  29775. return number + '日';
  29776. case 'M':
  29777. return number + '月';
  29778. case 'w':
  29779. case 'W':
  29780. return number + '週';
  29781. default:
  29782. return number;
  29783. }
  29784. },
  29785. relativeTime: {
  29786. future: '%s內',
  29787. past: '%s前',
  29788. s: '幾秒',
  29789. ss: '%d 秒',
  29790. m: '1 分鐘',
  29791. mm: '%d 分鐘',
  29792. h: '1 小時',
  29793. hh: '%d 小時',
  29794. d: '1 天',
  29795. dd: '%d 天',
  29796. M: '1 個月',
  29797. MM: '%d 個月',
  29798. y: '1 年',
  29799. yy: '%d 年',
  29800. },
  29801. });
  29802. return zhMo;
  29803. })));
  29804. /***/ }),
  29805. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-tw.js":
  29806. /*!******************************************************************************!*\
  29807. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-tw.js ***!
  29808. \******************************************************************************/
  29809. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  29810. //! moment.js locale configuration
  29811. //! locale : Chinese (Taiwan) [zh-tw]
  29812. //! author : Ben : https://github.com/ben-lin
  29813. //! author : Chris Lam : https://github.com/hehachris
  29814. ;(function (global, factory) {
  29815. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js")) :
  29816. 0
  29817. }(this, (function (moment) { 'use strict';
  29818. //! moment.js locale configuration
  29819. var zhTw = moment.defineLocale('zh-tw', {
  29820. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  29821. '_'
  29822. ),
  29823. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  29824. '_'
  29825. ),
  29826. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  29827. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  29828. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  29829. longDateFormat: {
  29830. LT: 'HH:mm',
  29831. LTS: 'HH:mm:ss',
  29832. L: 'YYYY/MM/DD',
  29833. LL: 'YYYY年M月D日',
  29834. LLL: 'YYYY年M月D日 HH:mm',
  29835. LLLL: 'YYYY年M月D日dddd HH:mm',
  29836. l: 'YYYY/M/D',
  29837. ll: 'YYYY年M月D日',
  29838. lll: 'YYYY年M月D日 HH:mm',
  29839. llll: 'YYYY年M月D日dddd HH:mm',
  29840. },
  29841. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  29842. meridiemHour: function (hour, meridiem) {
  29843. if (hour === 12) {
  29844. hour = 0;
  29845. }
  29846. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  29847. return hour;
  29848. } else if (meridiem === '中午') {
  29849. return hour >= 11 ? hour : hour + 12;
  29850. } else if (meridiem === '下午' || meridiem === '晚上') {
  29851. return hour + 12;
  29852. }
  29853. },
  29854. meridiem: function (hour, minute, isLower) {
  29855. var hm = hour * 100 + minute;
  29856. if (hm < 600) {
  29857. return '凌晨';
  29858. } else if (hm < 900) {
  29859. return '早上';
  29860. } else if (hm < 1130) {
  29861. return '上午';
  29862. } else if (hm < 1230) {
  29863. return '中午';
  29864. } else if (hm < 1800) {
  29865. return '下午';
  29866. } else {
  29867. return '晚上';
  29868. }
  29869. },
  29870. calendar: {
  29871. sameDay: '[今天] LT',
  29872. nextDay: '[明天] LT',
  29873. nextWeek: '[下]dddd LT',
  29874. lastDay: '[昨天] LT',
  29875. lastWeek: '[上]dddd LT',
  29876. sameElse: 'L',
  29877. },
  29878. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  29879. ordinal: function (number, period) {
  29880. switch (period) {
  29881. case 'd':
  29882. case 'D':
  29883. case 'DDD':
  29884. return number + '日';
  29885. case 'M':
  29886. return number + '月';
  29887. case 'w':
  29888. case 'W':
  29889. return number + '週';
  29890. default:
  29891. return number;
  29892. }
  29893. },
  29894. relativeTime: {
  29895. future: '%s後',
  29896. past: '%s前',
  29897. s: '幾秒',
  29898. ss: '%d 秒',
  29899. m: '1 分鐘',
  29900. mm: '%d 分鐘',
  29901. h: '1 小時',
  29902. hh: '%d 小時',
  29903. d: '1 天',
  29904. dd: '%d 天',
  29905. M: '1 個月',
  29906. MM: '%d 個月',
  29907. y: '1 年',
  29908. yy: '%d 年',
  29909. },
  29910. });
  29911. return zhTw;
  29912. })));
  29913. /***/ }),
  29914. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale sync recursive ^\\.\\/.*$":
  29915. /*!************************************************************************************!*\
  29916. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ sync ^\.\/.*$ ***!
  29917. \************************************************************************************/
  29918. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  29919. var map = {
  29920. "./af": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/af.js",
  29921. "./af.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/af.js",
  29922. "./ar": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar.js",
  29923. "./ar-dz": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-dz.js",
  29924. "./ar-dz.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-dz.js",
  29925. "./ar-kw": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-kw.js",
  29926. "./ar-kw.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-kw.js",
  29927. "./ar-ly": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ly.js",
  29928. "./ar-ly.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ly.js",
  29929. "./ar-ma": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ma.js",
  29930. "./ar-ma.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ma.js",
  29931. "./ar-sa": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-sa.js",
  29932. "./ar-sa.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-sa.js",
  29933. "./ar-tn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-tn.js",
  29934. "./ar-tn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-tn.js",
  29935. "./ar.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar.js",
  29936. "./az": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/az.js",
  29937. "./az.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/az.js",
  29938. "./be": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/be.js",
  29939. "./be.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/be.js",
  29940. "./bg": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bg.js",
  29941. "./bg.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bg.js",
  29942. "./bm": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bm.js",
  29943. "./bm.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bm.js",
  29944. "./bn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn.js",
  29945. "./bn-bd": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn-bd.js",
  29946. "./bn-bd.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn-bd.js",
  29947. "./bn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn.js",
  29948. "./bo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bo.js",
  29949. "./bo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bo.js",
  29950. "./br": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/br.js",
  29951. "./br.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/br.js",
  29952. "./bs": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bs.js",
  29953. "./bs.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bs.js",
  29954. "./ca": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ca.js",
  29955. "./ca.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ca.js",
  29956. "./cs": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cs.js",
  29957. "./cs.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cs.js",
  29958. "./cv": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cv.js",
  29959. "./cv.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cv.js",
  29960. "./cy": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cy.js",
  29961. "./cy.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cy.js",
  29962. "./da": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/da.js",
  29963. "./da.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/da.js",
  29964. "./de": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de.js",
  29965. "./de-at": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-at.js",
  29966. "./de-at.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-at.js",
  29967. "./de-ch": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-ch.js",
  29968. "./de-ch.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-ch.js",
  29969. "./de.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de.js",
  29970. "./dv": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/dv.js",
  29971. "./dv.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/dv.js",
  29972. "./el": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/el.js",
  29973. "./el.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/el.js",
  29974. "./en-au": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-au.js",
  29975. "./en-au.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-au.js",
  29976. "./en-ca": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ca.js",
  29977. "./en-ca.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ca.js",
  29978. "./en-gb": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-gb.js",
  29979. "./en-gb.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-gb.js",
  29980. "./en-ie": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ie.js",
  29981. "./en-ie.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ie.js",
  29982. "./en-il": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-il.js",
  29983. "./en-il.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-il.js",
  29984. "./en-in": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-in.js",
  29985. "./en-in.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-in.js",
  29986. "./en-nz": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-nz.js",
  29987. "./en-nz.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-nz.js",
  29988. "./en-sg": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-sg.js",
  29989. "./en-sg.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-sg.js",
  29990. "./eo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eo.js",
  29991. "./eo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eo.js",
  29992. "./es": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es.js",
  29993. "./es-do": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-do.js",
  29994. "./es-do.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-do.js",
  29995. "./es-mx": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-mx.js",
  29996. "./es-mx.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-mx.js",
  29997. "./es-us": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-us.js",
  29998. "./es-us.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-us.js",
  29999. "./es.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es.js",
  30000. "./et": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/et.js",
  30001. "./et.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/et.js",
  30002. "./eu": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eu.js",
  30003. "./eu.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eu.js",
  30004. "./fa": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fa.js",
  30005. "./fa.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fa.js",
  30006. "./fi": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fi.js",
  30007. "./fi.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fi.js",
  30008. "./fil": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fil.js",
  30009. "./fil.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fil.js",
  30010. "./fo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fo.js",
  30011. "./fo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fo.js",
  30012. "./fr": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr.js",
  30013. "./fr-ca": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ca.js",
  30014. "./fr-ca.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ca.js",
  30015. "./fr-ch": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ch.js",
  30016. "./fr-ch.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ch.js",
  30017. "./fr.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr.js",
  30018. "./fy": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fy.js",
  30019. "./fy.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fy.js",
  30020. "./ga": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ga.js",
  30021. "./ga.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ga.js",
  30022. "./gd": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gd.js",
  30023. "./gd.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gd.js",
  30024. "./gl": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gl.js",
  30025. "./gl.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gl.js",
  30026. "./gom-deva": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-deva.js",
  30027. "./gom-deva.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-deva.js",
  30028. "./gom-latn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-latn.js",
  30029. "./gom-latn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-latn.js",
  30030. "./gu": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gu.js",
  30031. "./gu.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gu.js",
  30032. "./he": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/he.js",
  30033. "./he.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/he.js",
  30034. "./hi": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hi.js",
  30035. "./hi.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hi.js",
  30036. "./hr": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hr.js",
  30037. "./hr.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hr.js",
  30038. "./hu": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hu.js",
  30039. "./hu.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hu.js",
  30040. "./hy-am": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hy-am.js",
  30041. "./hy-am.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hy-am.js",
  30042. "./id": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/id.js",
  30043. "./id.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/id.js",
  30044. "./is": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/is.js",
  30045. "./is.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/is.js",
  30046. "./it": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it.js",
  30047. "./it-ch": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it-ch.js",
  30048. "./it-ch.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it-ch.js",
  30049. "./it.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it.js",
  30050. "./ja": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ja.js",
  30051. "./ja.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ja.js",
  30052. "./jv": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/jv.js",
  30053. "./jv.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/jv.js",
  30054. "./ka": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ka.js",
  30055. "./ka.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ka.js",
  30056. "./kk": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kk.js",
  30057. "./kk.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kk.js",
  30058. "./km": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/km.js",
  30059. "./km.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/km.js",
  30060. "./kn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kn.js",
  30061. "./kn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kn.js",
  30062. "./ko": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ko.js",
  30063. "./ko.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ko.js",
  30064. "./ku": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ku.js",
  30065. "./ku.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ku.js",
  30066. "./ky": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ky.js",
  30067. "./ky.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ky.js",
  30068. "./lb": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lb.js",
  30069. "./lb.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lb.js",
  30070. "./lo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lo.js",
  30071. "./lo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lo.js",
  30072. "./lt": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lt.js",
  30073. "./lt.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lt.js",
  30074. "./lv": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lv.js",
  30075. "./lv.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lv.js",
  30076. "./me": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/me.js",
  30077. "./me.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/me.js",
  30078. "./mi": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mi.js",
  30079. "./mi.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mi.js",
  30080. "./mk": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mk.js",
  30081. "./mk.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mk.js",
  30082. "./ml": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ml.js",
  30083. "./ml.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ml.js",
  30084. "./mn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mn.js",
  30085. "./mn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mn.js",
  30086. "./mr": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mr.js",
  30087. "./mr.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mr.js",
  30088. "./ms": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms.js",
  30089. "./ms-my": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms-my.js",
  30090. "./ms-my.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms-my.js",
  30091. "./ms.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms.js",
  30092. "./mt": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mt.js",
  30093. "./mt.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mt.js",
  30094. "./my": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/my.js",
  30095. "./my.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/my.js",
  30096. "./nb": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nb.js",
  30097. "./nb.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nb.js",
  30098. "./ne": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ne.js",
  30099. "./ne.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ne.js",
  30100. "./nl": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl.js",
  30101. "./nl-be": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl-be.js",
  30102. "./nl-be.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl-be.js",
  30103. "./nl.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl.js",
  30104. "./nn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nn.js",
  30105. "./nn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nn.js",
  30106. "./oc-lnc": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/oc-lnc.js",
  30107. "./oc-lnc.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/oc-lnc.js",
  30108. "./pa-in": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pa-in.js",
  30109. "./pa-in.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pa-in.js",
  30110. "./pl": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pl.js",
  30111. "./pl.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pl.js",
  30112. "./pt": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt.js",
  30113. "./pt-br": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt-br.js",
  30114. "./pt-br.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt-br.js",
  30115. "./pt.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt.js",
  30116. "./ro": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ro.js",
  30117. "./ro.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ro.js",
  30118. "./ru": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ru.js",
  30119. "./ru.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ru.js",
  30120. "./sd": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sd.js",
  30121. "./sd.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sd.js",
  30122. "./se": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/se.js",
  30123. "./se.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/se.js",
  30124. "./si": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/si.js",
  30125. "./si.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/si.js",
  30126. "./sk": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sk.js",
  30127. "./sk.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sk.js",
  30128. "./sl": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sl.js",
  30129. "./sl.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sl.js",
  30130. "./sq": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sq.js",
  30131. "./sq.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sq.js",
  30132. "./sr": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr.js",
  30133. "./sr-cyrl": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr-cyrl.js",
  30134. "./sr-cyrl.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr-cyrl.js",
  30135. "./sr.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr.js",
  30136. "./ss": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ss.js",
  30137. "./ss.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ss.js",
  30138. "./sv": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sv.js",
  30139. "./sv.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sv.js",
  30140. "./sw": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sw.js",
  30141. "./sw.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sw.js",
  30142. "./ta": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ta.js",
  30143. "./ta.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ta.js",
  30144. "./te": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/te.js",
  30145. "./te.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/te.js",
  30146. "./tet": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tet.js",
  30147. "./tet.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tet.js",
  30148. "./tg": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tg.js",
  30149. "./tg.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tg.js",
  30150. "./th": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/th.js",
  30151. "./th.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/th.js",
  30152. "./tk": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tk.js",
  30153. "./tk.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tk.js",
  30154. "./tl-ph": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tl-ph.js",
  30155. "./tl-ph.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tl-ph.js",
  30156. "./tlh": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tlh.js",
  30157. "./tlh.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tlh.js",
  30158. "./tr": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tr.js",
  30159. "./tr.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tr.js",
  30160. "./tzl": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzl.js",
  30161. "./tzl.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzl.js",
  30162. "./tzm": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm.js",
  30163. "./tzm-latn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm-latn.js",
  30164. "./tzm-latn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm-latn.js",
  30165. "./tzm.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm.js",
  30166. "./ug-cn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ug-cn.js",
  30167. "./ug-cn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ug-cn.js",
  30168. "./uk": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uk.js",
  30169. "./uk.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uk.js",
  30170. "./ur": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ur.js",
  30171. "./ur.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ur.js",
  30172. "./uz": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz.js",
  30173. "./uz-latn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz-latn.js",
  30174. "./uz-latn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz-latn.js",
  30175. "./uz.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz.js",
  30176. "./vi": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/vi.js",
  30177. "./vi.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/vi.js",
  30178. "./x-pseudo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/x-pseudo.js",
  30179. "./x-pseudo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/x-pseudo.js",
  30180. "./yo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/yo.js",
  30181. "./yo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/yo.js",
  30182. "./zh-cn": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-cn.js",
  30183. "./zh-cn.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-cn.js",
  30184. "./zh-hk": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-hk.js",
  30185. "./zh-hk.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-hk.js",
  30186. "./zh-mo": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-mo.js",
  30187. "./zh-mo.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-mo.js",
  30188. "./zh-tw": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-tw.js",
  30189. "./zh-tw.js": "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-tw.js"
  30190. };
  30191. function webpackContext(req) {
  30192. var id = webpackContextResolve(req);
  30193. return __webpack_require__(id);
  30194. }
  30195. function webpackContextResolve(req) {
  30196. if(!__webpack_require__.o(map, req)) {
  30197. var e = new Error("Cannot find module '" + req + "'");
  30198. e.code = 'MODULE_NOT_FOUND';
  30199. throw e;
  30200. }
  30201. return map[req];
  30202. }
  30203. webpackContext.keys = function webpackContextKeys() {
  30204. return Object.keys(map);
  30205. };
  30206. webpackContext.resolve = webpackContextResolve;
  30207. module.exports = webpackContext;
  30208. webpackContext.id = "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale sync recursive ^\\.\\/.*$";
  30209. /***/ }),
  30210. /***/ "./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js":
  30211. /*!************************************************************************!*\
  30212. !*** ./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js ***!
  30213. \************************************************************************/
  30214. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30215. /* module decorator */ module = __webpack_require__.nmd(module);
  30216. //! moment.js
  30217. //! version : 2.29.4
  30218. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  30219. //! license : MIT
  30220. //! momentjs.com
  30221. ;(function (global, factory) {
  30222. true ? module.exports = factory() :
  30223. 0
  30224. }(this, (function () { 'use strict';
  30225. var hookCallback;
  30226. function hooks() {
  30227. return hookCallback.apply(null, arguments);
  30228. }
  30229. // This is done to register the method called with moment()
  30230. // without creating circular dependencies.
  30231. function setHookCallback(callback) {
  30232. hookCallback = callback;
  30233. }
  30234. function isArray(input) {
  30235. return (
  30236. input instanceof Array ||
  30237. Object.prototype.toString.call(input) === '[object Array]'
  30238. );
  30239. }
  30240. function isObject(input) {
  30241. // IE8 will treat undefined and null as object if it wasn't for
  30242. // input != null
  30243. return (
  30244. input != null &&
  30245. Object.prototype.toString.call(input) === '[object Object]'
  30246. );
  30247. }
  30248. function hasOwnProp(a, b) {
  30249. return Object.prototype.hasOwnProperty.call(a, b);
  30250. }
  30251. function isObjectEmpty(obj) {
  30252. if (Object.getOwnPropertyNames) {
  30253. return Object.getOwnPropertyNames(obj).length === 0;
  30254. } else {
  30255. var k;
  30256. for (k in obj) {
  30257. if (hasOwnProp(obj, k)) {
  30258. return false;
  30259. }
  30260. }
  30261. return true;
  30262. }
  30263. }
  30264. function isUndefined(input) {
  30265. return input === void 0;
  30266. }
  30267. function isNumber(input) {
  30268. return (
  30269. typeof input === 'number' ||
  30270. Object.prototype.toString.call(input) === '[object Number]'
  30271. );
  30272. }
  30273. function isDate(input) {
  30274. return (
  30275. input instanceof Date ||
  30276. Object.prototype.toString.call(input) === '[object Date]'
  30277. );
  30278. }
  30279. function map(arr, fn) {
  30280. var res = [],
  30281. i,
  30282. arrLen = arr.length;
  30283. for (i = 0; i < arrLen; ++i) {
  30284. res.push(fn(arr[i], i));
  30285. }
  30286. return res;
  30287. }
  30288. function extend(a, b) {
  30289. for (var i in b) {
  30290. if (hasOwnProp(b, i)) {
  30291. a[i] = b[i];
  30292. }
  30293. }
  30294. if (hasOwnProp(b, 'toString')) {
  30295. a.toString = b.toString;
  30296. }
  30297. if (hasOwnProp(b, 'valueOf')) {
  30298. a.valueOf = b.valueOf;
  30299. }
  30300. return a;
  30301. }
  30302. function createUTC(input, format, locale, strict) {
  30303. return createLocalOrUTC(input, format, locale, strict, true).utc();
  30304. }
  30305. function defaultParsingFlags() {
  30306. // We need to deep clone this object.
  30307. return {
  30308. empty: false,
  30309. unusedTokens: [],
  30310. unusedInput: [],
  30311. overflow: -2,
  30312. charsLeftOver: 0,
  30313. nullInput: false,
  30314. invalidEra: null,
  30315. invalidMonth: null,
  30316. invalidFormat: false,
  30317. userInvalidated: false,
  30318. iso: false,
  30319. parsedDateParts: [],
  30320. era: null,
  30321. meridiem: null,
  30322. rfc2822: false,
  30323. weekdayMismatch: false,
  30324. };
  30325. }
  30326. function getParsingFlags(m) {
  30327. if (m._pf == null) {
  30328. m._pf = defaultParsingFlags();
  30329. }
  30330. return m._pf;
  30331. }
  30332. var some;
  30333. if (Array.prototype.some) {
  30334. some = Array.prototype.some;
  30335. } else {
  30336. some = function (fun) {
  30337. var t = Object(this),
  30338. len = t.length >>> 0,
  30339. i;
  30340. for (i = 0; i < len; i++) {
  30341. if (i in t && fun.call(this, t[i], i, t)) {
  30342. return true;
  30343. }
  30344. }
  30345. return false;
  30346. };
  30347. }
  30348. function isValid(m) {
  30349. if (m._isValid == null) {
  30350. var flags = getParsingFlags(m),
  30351. parsedParts = some.call(flags.parsedDateParts, function (i) {
  30352. return i != null;
  30353. }),
  30354. isNowValid =
  30355. !isNaN(m._d.getTime()) &&
  30356. flags.overflow < 0 &&
  30357. !flags.empty &&
  30358. !flags.invalidEra &&
  30359. !flags.invalidMonth &&
  30360. !flags.invalidWeekday &&
  30361. !flags.weekdayMismatch &&
  30362. !flags.nullInput &&
  30363. !flags.invalidFormat &&
  30364. !flags.userInvalidated &&
  30365. (!flags.meridiem || (flags.meridiem && parsedParts));
  30366. if (m._strict) {
  30367. isNowValid =
  30368. isNowValid &&
  30369. flags.charsLeftOver === 0 &&
  30370. flags.unusedTokens.length === 0 &&
  30371. flags.bigHour === undefined;
  30372. }
  30373. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  30374. m._isValid = isNowValid;
  30375. } else {
  30376. return isNowValid;
  30377. }
  30378. }
  30379. return m._isValid;
  30380. }
  30381. function createInvalid(flags) {
  30382. var m = createUTC(NaN);
  30383. if (flags != null) {
  30384. extend(getParsingFlags(m), flags);
  30385. } else {
  30386. getParsingFlags(m).userInvalidated = true;
  30387. }
  30388. return m;
  30389. }
  30390. // Plugins that add properties should also add the key here (null value),
  30391. // so we can properly clone ourselves.
  30392. var momentProperties = (hooks.momentProperties = []),
  30393. updateInProgress = false;
  30394. function copyConfig(to, from) {
  30395. var i,
  30396. prop,
  30397. val,
  30398. momentPropertiesLen = momentProperties.length;
  30399. if (!isUndefined(from._isAMomentObject)) {
  30400. to._isAMomentObject = from._isAMomentObject;
  30401. }
  30402. if (!isUndefined(from._i)) {
  30403. to._i = from._i;
  30404. }
  30405. if (!isUndefined(from._f)) {
  30406. to._f = from._f;
  30407. }
  30408. if (!isUndefined(from._l)) {
  30409. to._l = from._l;
  30410. }
  30411. if (!isUndefined(from._strict)) {
  30412. to._strict = from._strict;
  30413. }
  30414. if (!isUndefined(from._tzm)) {
  30415. to._tzm = from._tzm;
  30416. }
  30417. if (!isUndefined(from._isUTC)) {
  30418. to._isUTC = from._isUTC;
  30419. }
  30420. if (!isUndefined(from._offset)) {
  30421. to._offset = from._offset;
  30422. }
  30423. if (!isUndefined(from._pf)) {
  30424. to._pf = getParsingFlags(from);
  30425. }
  30426. if (!isUndefined(from._locale)) {
  30427. to._locale = from._locale;
  30428. }
  30429. if (momentPropertiesLen > 0) {
  30430. for (i = 0; i < momentPropertiesLen; i++) {
  30431. prop = momentProperties[i];
  30432. val = from[prop];
  30433. if (!isUndefined(val)) {
  30434. to[prop] = val;
  30435. }
  30436. }
  30437. }
  30438. return to;
  30439. }
  30440. // Moment prototype object
  30441. function Moment(config) {
  30442. copyConfig(this, config);
  30443. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  30444. if (!this.isValid()) {
  30445. this._d = new Date(NaN);
  30446. }
  30447. // Prevent infinite loop in case updateOffset creates new moment
  30448. // objects.
  30449. if (updateInProgress === false) {
  30450. updateInProgress = true;
  30451. hooks.updateOffset(this);
  30452. updateInProgress = false;
  30453. }
  30454. }
  30455. function isMoment(obj) {
  30456. return (
  30457. obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
  30458. );
  30459. }
  30460. function warn(msg) {
  30461. if (
  30462. hooks.suppressDeprecationWarnings === false &&
  30463. typeof console !== 'undefined' &&
  30464. console.warn
  30465. ) {
  30466. console.warn('Deprecation warning: ' + msg);
  30467. }
  30468. }
  30469. function deprecate(msg, fn) {
  30470. var firstTime = true;
  30471. return extend(function () {
  30472. if (hooks.deprecationHandler != null) {
  30473. hooks.deprecationHandler(null, msg);
  30474. }
  30475. if (firstTime) {
  30476. var args = [],
  30477. arg,
  30478. i,
  30479. key,
  30480. argLen = arguments.length;
  30481. for (i = 0; i < argLen; i++) {
  30482. arg = '';
  30483. if (typeof arguments[i] === 'object') {
  30484. arg += '\n[' + i + '] ';
  30485. for (key in arguments[0]) {
  30486. if (hasOwnProp(arguments[0], key)) {
  30487. arg += key + ': ' + arguments[0][key] + ', ';
  30488. }
  30489. }
  30490. arg = arg.slice(0, -2); // Remove trailing comma and space
  30491. } else {
  30492. arg = arguments[i];
  30493. }
  30494. args.push(arg);
  30495. }
  30496. warn(
  30497. msg +
  30498. '\nArguments: ' +
  30499. Array.prototype.slice.call(args).join('') +
  30500. '\n' +
  30501. new Error().stack
  30502. );
  30503. firstTime = false;
  30504. }
  30505. return fn.apply(this, arguments);
  30506. }, fn);
  30507. }
  30508. var deprecations = {};
  30509. function deprecateSimple(name, msg) {
  30510. if (hooks.deprecationHandler != null) {
  30511. hooks.deprecationHandler(name, msg);
  30512. }
  30513. if (!deprecations[name]) {
  30514. warn(msg);
  30515. deprecations[name] = true;
  30516. }
  30517. }
  30518. hooks.suppressDeprecationWarnings = false;
  30519. hooks.deprecationHandler = null;
  30520. function isFunction(input) {
  30521. return (
  30522. (typeof Function !== 'undefined' && input instanceof Function) ||
  30523. Object.prototype.toString.call(input) === '[object Function]'
  30524. );
  30525. }
  30526. function set(config) {
  30527. var prop, i;
  30528. for (i in config) {
  30529. if (hasOwnProp(config, i)) {
  30530. prop = config[i];
  30531. if (isFunction(prop)) {
  30532. this[i] = prop;
  30533. } else {
  30534. this['_' + i] = prop;
  30535. }
  30536. }
  30537. }
  30538. this._config = config;
  30539. // Lenient ordinal parsing accepts just a number in addition to
  30540. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  30541. // TODO: Remove "ordinalParse" fallback in next major release.
  30542. this._dayOfMonthOrdinalParseLenient = new RegExp(
  30543. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  30544. '|' +
  30545. /\d{1,2}/.source
  30546. );
  30547. }
  30548. function mergeConfigs(parentConfig, childConfig) {
  30549. var res = extend({}, parentConfig),
  30550. prop;
  30551. for (prop in childConfig) {
  30552. if (hasOwnProp(childConfig, prop)) {
  30553. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  30554. res[prop] = {};
  30555. extend(res[prop], parentConfig[prop]);
  30556. extend(res[prop], childConfig[prop]);
  30557. } else if (childConfig[prop] != null) {
  30558. res[prop] = childConfig[prop];
  30559. } else {
  30560. delete res[prop];
  30561. }
  30562. }
  30563. }
  30564. for (prop in parentConfig) {
  30565. if (
  30566. hasOwnProp(parentConfig, prop) &&
  30567. !hasOwnProp(childConfig, prop) &&
  30568. isObject(parentConfig[prop])
  30569. ) {
  30570. // make sure changes to properties don't modify parent config
  30571. res[prop] = extend({}, res[prop]);
  30572. }
  30573. }
  30574. return res;
  30575. }
  30576. function Locale(config) {
  30577. if (config != null) {
  30578. this.set(config);
  30579. }
  30580. }
  30581. var keys;
  30582. if (Object.keys) {
  30583. keys = Object.keys;
  30584. } else {
  30585. keys = function (obj) {
  30586. var i,
  30587. res = [];
  30588. for (i in obj) {
  30589. if (hasOwnProp(obj, i)) {
  30590. res.push(i);
  30591. }
  30592. }
  30593. return res;
  30594. };
  30595. }
  30596. var defaultCalendar = {
  30597. sameDay: '[Today at] LT',
  30598. nextDay: '[Tomorrow at] LT',
  30599. nextWeek: 'dddd [at] LT',
  30600. lastDay: '[Yesterday at] LT',
  30601. lastWeek: '[Last] dddd [at] LT',
  30602. sameElse: 'L',
  30603. };
  30604. function calendar(key, mom, now) {
  30605. var output = this._calendar[key] || this._calendar['sameElse'];
  30606. return isFunction(output) ? output.call(mom, now) : output;
  30607. }
  30608. function zeroFill(number, targetLength, forceSign) {
  30609. var absNumber = '' + Math.abs(number),
  30610. zerosToFill = targetLength - absNumber.length,
  30611. sign = number >= 0;
  30612. return (
  30613. (sign ? (forceSign ? '+' : '') : '-') +
  30614. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
  30615. absNumber
  30616. );
  30617. }
  30618. var formattingTokens =
  30619. /(\[[^\[]*\])|(\\)?([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,
  30620. localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
  30621. formatFunctions = {},
  30622. formatTokenFunctions = {};
  30623. // token: 'M'
  30624. // padded: ['MM', 2]
  30625. // ordinal: 'Mo'
  30626. // callback: function () { this.month() + 1 }
  30627. function addFormatToken(token, padded, ordinal, callback) {
  30628. var func = callback;
  30629. if (typeof callback === 'string') {
  30630. func = function () {
  30631. return this[callback]();
  30632. };
  30633. }
  30634. if (token) {
  30635. formatTokenFunctions[token] = func;
  30636. }
  30637. if (padded) {
  30638. formatTokenFunctions[padded[0]] = function () {
  30639. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  30640. };
  30641. }
  30642. if (ordinal) {
  30643. formatTokenFunctions[ordinal] = function () {
  30644. return this.localeData().ordinal(
  30645. func.apply(this, arguments),
  30646. token
  30647. );
  30648. };
  30649. }
  30650. }
  30651. function removeFormattingTokens(input) {
  30652. if (input.match(/\[[\s\S]/)) {
  30653. return input.replace(/^\[|\]$/g, '');
  30654. }
  30655. return input.replace(/\\/g, '');
  30656. }
  30657. function makeFormatFunction(format) {
  30658. var array = format.match(formattingTokens),
  30659. i,
  30660. length;
  30661. for (i = 0, length = array.length; i < length; i++) {
  30662. if (formatTokenFunctions[array[i]]) {
  30663. array[i] = formatTokenFunctions[array[i]];
  30664. } else {
  30665. array[i] = removeFormattingTokens(array[i]);
  30666. }
  30667. }
  30668. return function (mom) {
  30669. var output = '',
  30670. i;
  30671. for (i = 0; i < length; i++) {
  30672. output += isFunction(array[i])
  30673. ? array[i].call(mom, format)
  30674. : array[i];
  30675. }
  30676. return output;
  30677. };
  30678. }
  30679. // format date using native date object
  30680. function formatMoment(m, format) {
  30681. if (!m.isValid()) {
  30682. return m.localeData().invalidDate();
  30683. }
  30684. format = expandFormat(format, m.localeData());
  30685. formatFunctions[format] =
  30686. formatFunctions[format] || makeFormatFunction(format);
  30687. return formatFunctions[format](m);
  30688. }
  30689. function expandFormat(format, locale) {
  30690. var i = 5;
  30691. function replaceLongDateFormatTokens(input) {
  30692. return locale.longDateFormat(input) || input;
  30693. }
  30694. localFormattingTokens.lastIndex = 0;
  30695. while (i >= 0 && localFormattingTokens.test(format)) {
  30696. format = format.replace(
  30697. localFormattingTokens,
  30698. replaceLongDateFormatTokens
  30699. );
  30700. localFormattingTokens.lastIndex = 0;
  30701. i -= 1;
  30702. }
  30703. return format;
  30704. }
  30705. var defaultLongDateFormat = {
  30706. LTS: 'h:mm:ss A',
  30707. LT: 'h:mm A',
  30708. L: 'MM/DD/YYYY',
  30709. LL: 'MMMM D, YYYY',
  30710. LLL: 'MMMM D, YYYY h:mm A',
  30711. LLLL: 'dddd, MMMM D, YYYY h:mm A',
  30712. };
  30713. function longDateFormat(key) {
  30714. var format = this._longDateFormat[key],
  30715. formatUpper = this._longDateFormat[key.toUpperCase()];
  30716. if (format || !formatUpper) {
  30717. return format;
  30718. }
  30719. this._longDateFormat[key] = formatUpper
  30720. .match(formattingTokens)
  30721. .map(function (tok) {
  30722. if (
  30723. tok === 'MMMM' ||
  30724. tok === 'MM' ||
  30725. tok === 'DD' ||
  30726. tok === 'dddd'
  30727. ) {
  30728. return tok.slice(1);
  30729. }
  30730. return tok;
  30731. })
  30732. .join('');
  30733. return this._longDateFormat[key];
  30734. }
  30735. var defaultInvalidDate = 'Invalid date';
  30736. function invalidDate() {
  30737. return this._invalidDate;
  30738. }
  30739. var defaultOrdinal = '%d',
  30740. defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  30741. function ordinal(number) {
  30742. return this._ordinal.replace('%d', number);
  30743. }
  30744. var defaultRelativeTime = {
  30745. future: 'in %s',
  30746. past: '%s ago',
  30747. s: 'a few seconds',
  30748. ss: '%d seconds',
  30749. m: 'a minute',
  30750. mm: '%d minutes',
  30751. h: 'an hour',
  30752. hh: '%d hours',
  30753. d: 'a day',
  30754. dd: '%d days',
  30755. w: 'a week',
  30756. ww: '%d weeks',
  30757. M: 'a month',
  30758. MM: '%d months',
  30759. y: 'a year',
  30760. yy: '%d years',
  30761. };
  30762. function relativeTime(number, withoutSuffix, string, isFuture) {
  30763. var output = this._relativeTime[string];
  30764. return isFunction(output)
  30765. ? output(number, withoutSuffix, string, isFuture)
  30766. : output.replace(/%d/i, number);
  30767. }
  30768. function pastFuture(diff, output) {
  30769. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  30770. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  30771. }
  30772. var aliases = {};
  30773. function addUnitAlias(unit, shorthand) {
  30774. var lowerCase = unit.toLowerCase();
  30775. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  30776. }
  30777. function normalizeUnits(units) {
  30778. return typeof units === 'string'
  30779. ? aliases[units] || aliases[units.toLowerCase()]
  30780. : undefined;
  30781. }
  30782. function normalizeObjectUnits(inputObject) {
  30783. var normalizedInput = {},
  30784. normalizedProp,
  30785. prop;
  30786. for (prop in inputObject) {
  30787. if (hasOwnProp(inputObject, prop)) {
  30788. normalizedProp = normalizeUnits(prop);
  30789. if (normalizedProp) {
  30790. normalizedInput[normalizedProp] = inputObject[prop];
  30791. }
  30792. }
  30793. }
  30794. return normalizedInput;
  30795. }
  30796. var priorities = {};
  30797. function addUnitPriority(unit, priority) {
  30798. priorities[unit] = priority;
  30799. }
  30800. function getPrioritizedUnits(unitsObj) {
  30801. var units = [],
  30802. u;
  30803. for (u in unitsObj) {
  30804. if (hasOwnProp(unitsObj, u)) {
  30805. units.push({ unit: u, priority: priorities[u] });
  30806. }
  30807. }
  30808. units.sort(function (a, b) {
  30809. return a.priority - b.priority;
  30810. });
  30811. return units;
  30812. }
  30813. function isLeapYear(year) {
  30814. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  30815. }
  30816. function absFloor(number) {
  30817. if (number < 0) {
  30818. // -0 -> 0
  30819. return Math.ceil(number) || 0;
  30820. } else {
  30821. return Math.floor(number);
  30822. }
  30823. }
  30824. function toInt(argumentForCoercion) {
  30825. var coercedNumber = +argumentForCoercion,
  30826. value = 0;
  30827. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  30828. value = absFloor(coercedNumber);
  30829. }
  30830. return value;
  30831. }
  30832. function makeGetSet(unit, keepTime) {
  30833. return function (value) {
  30834. if (value != null) {
  30835. set$1(this, unit, value);
  30836. hooks.updateOffset(this, keepTime);
  30837. return this;
  30838. } else {
  30839. return get(this, unit);
  30840. }
  30841. };
  30842. }
  30843. function get(mom, unit) {
  30844. return mom.isValid()
  30845. ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
  30846. : NaN;
  30847. }
  30848. function set$1(mom, unit, value) {
  30849. if (mom.isValid() && !isNaN(value)) {
  30850. if (
  30851. unit === 'FullYear' &&
  30852. isLeapYear(mom.year()) &&
  30853. mom.month() === 1 &&
  30854. mom.date() === 29
  30855. ) {
  30856. value = toInt(value);
  30857. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
  30858. value,
  30859. mom.month(),
  30860. daysInMonth(value, mom.month())
  30861. );
  30862. } else {
  30863. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  30864. }
  30865. }
  30866. }
  30867. // MOMENTS
  30868. function stringGet(units) {
  30869. units = normalizeUnits(units);
  30870. if (isFunction(this[units])) {
  30871. return this[units]();
  30872. }
  30873. return this;
  30874. }
  30875. function stringSet(units, value) {
  30876. if (typeof units === 'object') {
  30877. units = normalizeObjectUnits(units);
  30878. var prioritized = getPrioritizedUnits(units),
  30879. i,
  30880. prioritizedLen = prioritized.length;
  30881. for (i = 0; i < prioritizedLen; i++) {
  30882. this[prioritized[i].unit](units[prioritized[i].unit]);
  30883. }
  30884. } else {
  30885. units = normalizeUnits(units);
  30886. if (isFunction(this[units])) {
  30887. return this[units](value);
  30888. }
  30889. }
  30890. return this;
  30891. }
  30892. var match1 = /\d/, // 0 - 9
  30893. match2 = /\d\d/, // 00 - 99
  30894. match3 = /\d{3}/, // 000 - 999
  30895. match4 = /\d{4}/, // 0000 - 9999
  30896. match6 = /[+-]?\d{6}/, // -999999 - 999999
  30897. match1to2 = /\d\d?/, // 0 - 99
  30898. match3to4 = /\d\d\d\d?/, // 999 - 9999
  30899. match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
  30900. match1to3 = /\d{1,3}/, // 0 - 999
  30901. match1to4 = /\d{1,4}/, // 0 - 9999
  30902. match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
  30903. matchUnsigned = /\d+/, // 0 - inf
  30904. matchSigned = /[+-]?\d+/, // -inf - inf
  30905. matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
  30906. matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  30907. matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
  30908. // any word (or two) characters or numbers including two/three word month in arabic.
  30909. // includes scottish gaelic two word and hyphenated months
  30910. matchWord =
  30911. /[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,
  30912. regexes;
  30913. regexes = {};
  30914. function addRegexToken(token, regex, strictRegex) {
  30915. regexes[token] = isFunction(regex)
  30916. ? regex
  30917. : function (isStrict, localeData) {
  30918. return isStrict && strictRegex ? strictRegex : regex;
  30919. };
  30920. }
  30921. function getParseRegexForToken(token, config) {
  30922. if (!hasOwnProp(regexes, token)) {
  30923. return new RegExp(unescapeFormat(token));
  30924. }
  30925. return regexes[token](config._strict, config._locale);
  30926. }
  30927. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  30928. function unescapeFormat(s) {
  30929. return regexEscape(
  30930. s
  30931. .replace('\\', '')
  30932. .replace(
  30933. /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
  30934. function (matched, p1, p2, p3, p4) {
  30935. return p1 || p2 || p3 || p4;
  30936. }
  30937. )
  30938. );
  30939. }
  30940. function regexEscape(s) {
  30941. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  30942. }
  30943. var tokens = {};
  30944. function addParseToken(token, callback) {
  30945. var i,
  30946. func = callback,
  30947. tokenLen;
  30948. if (typeof token === 'string') {
  30949. token = [token];
  30950. }
  30951. if (isNumber(callback)) {
  30952. func = function (input, array) {
  30953. array[callback] = toInt(input);
  30954. };
  30955. }
  30956. tokenLen = token.length;
  30957. for (i = 0; i < tokenLen; i++) {
  30958. tokens[token[i]] = func;
  30959. }
  30960. }
  30961. function addWeekParseToken(token, callback) {
  30962. addParseToken(token, function (input, array, config, token) {
  30963. config._w = config._w || {};
  30964. callback(input, config._w, config, token);
  30965. });
  30966. }
  30967. function addTimeToArrayFromToken(token, input, config) {
  30968. if (input != null && hasOwnProp(tokens, token)) {
  30969. tokens[token](input, config._a, config, token);
  30970. }
  30971. }
  30972. var YEAR = 0,
  30973. MONTH = 1,
  30974. DATE = 2,
  30975. HOUR = 3,
  30976. MINUTE = 4,
  30977. SECOND = 5,
  30978. MILLISECOND = 6,
  30979. WEEK = 7,
  30980. WEEKDAY = 8;
  30981. function mod(n, x) {
  30982. return ((n % x) + x) % x;
  30983. }
  30984. var indexOf;
  30985. if (Array.prototype.indexOf) {
  30986. indexOf = Array.prototype.indexOf;
  30987. } else {
  30988. indexOf = function (o) {
  30989. // I know
  30990. var i;
  30991. for (i = 0; i < this.length; ++i) {
  30992. if (this[i] === o) {
  30993. return i;
  30994. }
  30995. }
  30996. return -1;
  30997. };
  30998. }
  30999. function daysInMonth(year, month) {
  31000. if (isNaN(year) || isNaN(month)) {
  31001. return NaN;
  31002. }
  31003. var modMonth = mod(month, 12);
  31004. year += (month - modMonth) / 12;
  31005. return modMonth === 1
  31006. ? isLeapYear(year)
  31007. ? 29
  31008. : 28
  31009. : 31 - ((modMonth % 7) % 2);
  31010. }
  31011. // FORMATTING
  31012. addFormatToken('M', ['MM', 2], 'Mo', function () {
  31013. return this.month() + 1;
  31014. });
  31015. addFormatToken('MMM', 0, 0, function (format) {
  31016. return this.localeData().monthsShort(this, format);
  31017. });
  31018. addFormatToken('MMMM', 0, 0, function (format) {
  31019. return this.localeData().months(this, format);
  31020. });
  31021. // ALIASES
  31022. addUnitAlias('month', 'M');
  31023. // PRIORITY
  31024. addUnitPriority('month', 8);
  31025. // PARSING
  31026. addRegexToken('M', match1to2);
  31027. addRegexToken('MM', match1to2, match2);
  31028. addRegexToken('MMM', function (isStrict, locale) {
  31029. return locale.monthsShortRegex(isStrict);
  31030. });
  31031. addRegexToken('MMMM', function (isStrict, locale) {
  31032. return locale.monthsRegex(isStrict);
  31033. });
  31034. addParseToken(['M', 'MM'], function (input, array) {
  31035. array[MONTH] = toInt(input) - 1;
  31036. });
  31037. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  31038. var month = config._locale.monthsParse(input, token, config._strict);
  31039. // if we didn't find a month name, mark the date as invalid.
  31040. if (month != null) {
  31041. array[MONTH] = month;
  31042. } else {
  31043. getParsingFlags(config).invalidMonth = input;
  31044. }
  31045. });
  31046. // LOCALES
  31047. var defaultLocaleMonths =
  31048. 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  31049. '_'
  31050. ),
  31051. defaultLocaleMonthsShort =
  31052. 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  31053. MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
  31054. defaultMonthsShortRegex = matchWord,
  31055. defaultMonthsRegex = matchWord;
  31056. function localeMonths(m, format) {
  31057. if (!m) {
  31058. return isArray(this._months)
  31059. ? this._months
  31060. : this._months['standalone'];
  31061. }
  31062. return isArray(this._months)
  31063. ? this._months[m.month()]
  31064. : this._months[
  31065. (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
  31066. ? 'format'
  31067. : 'standalone'
  31068. ][m.month()];
  31069. }
  31070. function localeMonthsShort(m, format) {
  31071. if (!m) {
  31072. return isArray(this._monthsShort)
  31073. ? this._monthsShort
  31074. : this._monthsShort['standalone'];
  31075. }
  31076. return isArray(this._monthsShort)
  31077. ? this._monthsShort[m.month()]
  31078. : this._monthsShort[
  31079. MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
  31080. ][m.month()];
  31081. }
  31082. function handleStrictParse(monthName, format, strict) {
  31083. var i,
  31084. ii,
  31085. mom,
  31086. llc = monthName.toLocaleLowerCase();
  31087. if (!this._monthsParse) {
  31088. // this is not used
  31089. this._monthsParse = [];
  31090. this._longMonthsParse = [];
  31091. this._shortMonthsParse = [];
  31092. for (i = 0; i < 12; ++i) {
  31093. mom = createUTC([2000, i]);
  31094. this._shortMonthsParse[i] = this.monthsShort(
  31095. mom,
  31096. ''
  31097. ).toLocaleLowerCase();
  31098. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  31099. }
  31100. }
  31101. if (strict) {
  31102. if (format === 'MMM') {
  31103. ii = indexOf.call(this._shortMonthsParse, llc);
  31104. return ii !== -1 ? ii : null;
  31105. } else {
  31106. ii = indexOf.call(this._longMonthsParse, llc);
  31107. return ii !== -1 ? ii : null;
  31108. }
  31109. } else {
  31110. if (format === 'MMM') {
  31111. ii = indexOf.call(this._shortMonthsParse, llc);
  31112. if (ii !== -1) {
  31113. return ii;
  31114. }
  31115. ii = indexOf.call(this._longMonthsParse, llc);
  31116. return ii !== -1 ? ii : null;
  31117. } else {
  31118. ii = indexOf.call(this._longMonthsParse, llc);
  31119. if (ii !== -1) {
  31120. return ii;
  31121. }
  31122. ii = indexOf.call(this._shortMonthsParse, llc);
  31123. return ii !== -1 ? ii : null;
  31124. }
  31125. }
  31126. }
  31127. function localeMonthsParse(monthName, format, strict) {
  31128. var i, mom, regex;
  31129. if (this._monthsParseExact) {
  31130. return handleStrictParse.call(this, monthName, format, strict);
  31131. }
  31132. if (!this._monthsParse) {
  31133. this._monthsParse = [];
  31134. this._longMonthsParse = [];
  31135. this._shortMonthsParse = [];
  31136. }
  31137. // TODO: add sorting
  31138. // Sorting makes sure if one month (or abbr) is a prefix of another
  31139. // see sorting in computeMonthsParse
  31140. for (i = 0; i < 12; i++) {
  31141. // make the regex if we don't have it already
  31142. mom = createUTC([2000, i]);
  31143. if (strict && !this._longMonthsParse[i]) {
  31144. this._longMonthsParse[i] = new RegExp(
  31145. '^' + this.months(mom, '').replace('.', '') + '$',
  31146. 'i'
  31147. );
  31148. this._shortMonthsParse[i] = new RegExp(
  31149. '^' + this.monthsShort(mom, '').replace('.', '') + '$',
  31150. 'i'
  31151. );
  31152. }
  31153. if (!strict && !this._monthsParse[i]) {
  31154. regex =
  31155. '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  31156. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  31157. }
  31158. // test the regex
  31159. if (
  31160. strict &&
  31161. format === 'MMMM' &&
  31162. this._longMonthsParse[i].test(monthName)
  31163. ) {
  31164. return i;
  31165. } else if (
  31166. strict &&
  31167. format === 'MMM' &&
  31168. this._shortMonthsParse[i].test(monthName)
  31169. ) {
  31170. return i;
  31171. } else if (!strict && this._monthsParse[i].test(monthName)) {
  31172. return i;
  31173. }
  31174. }
  31175. }
  31176. // MOMENTS
  31177. function setMonth(mom, value) {
  31178. var dayOfMonth;
  31179. if (!mom.isValid()) {
  31180. // No op
  31181. return mom;
  31182. }
  31183. if (typeof value === 'string') {
  31184. if (/^\d+$/.test(value)) {
  31185. value = toInt(value);
  31186. } else {
  31187. value = mom.localeData().monthsParse(value);
  31188. // TODO: Another silent failure?
  31189. if (!isNumber(value)) {
  31190. return mom;
  31191. }
  31192. }
  31193. }
  31194. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  31195. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  31196. return mom;
  31197. }
  31198. function getSetMonth(value) {
  31199. if (value != null) {
  31200. setMonth(this, value);
  31201. hooks.updateOffset(this, true);
  31202. return this;
  31203. } else {
  31204. return get(this, 'Month');
  31205. }
  31206. }
  31207. function getDaysInMonth() {
  31208. return daysInMonth(this.year(), this.month());
  31209. }
  31210. function monthsShortRegex(isStrict) {
  31211. if (this._monthsParseExact) {
  31212. if (!hasOwnProp(this, '_monthsRegex')) {
  31213. computeMonthsParse.call(this);
  31214. }
  31215. if (isStrict) {
  31216. return this._monthsShortStrictRegex;
  31217. } else {
  31218. return this._monthsShortRegex;
  31219. }
  31220. } else {
  31221. if (!hasOwnProp(this, '_monthsShortRegex')) {
  31222. this._monthsShortRegex = defaultMonthsShortRegex;
  31223. }
  31224. return this._monthsShortStrictRegex && isStrict
  31225. ? this._monthsShortStrictRegex
  31226. : this._monthsShortRegex;
  31227. }
  31228. }
  31229. function monthsRegex(isStrict) {
  31230. if (this._monthsParseExact) {
  31231. if (!hasOwnProp(this, '_monthsRegex')) {
  31232. computeMonthsParse.call(this);
  31233. }
  31234. if (isStrict) {
  31235. return this._monthsStrictRegex;
  31236. } else {
  31237. return this._monthsRegex;
  31238. }
  31239. } else {
  31240. if (!hasOwnProp(this, '_monthsRegex')) {
  31241. this._monthsRegex = defaultMonthsRegex;
  31242. }
  31243. return this._monthsStrictRegex && isStrict
  31244. ? this._monthsStrictRegex
  31245. : this._monthsRegex;
  31246. }
  31247. }
  31248. function computeMonthsParse() {
  31249. function cmpLenRev(a, b) {
  31250. return b.length - a.length;
  31251. }
  31252. var shortPieces = [],
  31253. longPieces = [],
  31254. mixedPieces = [],
  31255. i,
  31256. mom;
  31257. for (i = 0; i < 12; i++) {
  31258. // make the regex if we don't have it already
  31259. mom = createUTC([2000, i]);
  31260. shortPieces.push(this.monthsShort(mom, ''));
  31261. longPieces.push(this.months(mom, ''));
  31262. mixedPieces.push(this.months(mom, ''));
  31263. mixedPieces.push(this.monthsShort(mom, ''));
  31264. }
  31265. // Sorting makes sure if one month (or abbr) is a prefix of another it
  31266. // will match the longer piece.
  31267. shortPieces.sort(cmpLenRev);
  31268. longPieces.sort(cmpLenRev);
  31269. mixedPieces.sort(cmpLenRev);
  31270. for (i = 0; i < 12; i++) {
  31271. shortPieces[i] = regexEscape(shortPieces[i]);
  31272. longPieces[i] = regexEscape(longPieces[i]);
  31273. }
  31274. for (i = 0; i < 24; i++) {
  31275. mixedPieces[i] = regexEscape(mixedPieces[i]);
  31276. }
  31277. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  31278. this._monthsShortRegex = this._monthsRegex;
  31279. this._monthsStrictRegex = new RegExp(
  31280. '^(' + longPieces.join('|') + ')',
  31281. 'i'
  31282. );
  31283. this._monthsShortStrictRegex = new RegExp(
  31284. '^(' + shortPieces.join('|') + ')',
  31285. 'i'
  31286. );
  31287. }
  31288. // FORMATTING
  31289. addFormatToken('Y', 0, 0, function () {
  31290. var y = this.year();
  31291. return y <= 9999 ? zeroFill(y, 4) : '+' + y;
  31292. });
  31293. addFormatToken(0, ['YY', 2], 0, function () {
  31294. return this.year() % 100;
  31295. });
  31296. addFormatToken(0, ['YYYY', 4], 0, 'year');
  31297. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  31298. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  31299. // ALIASES
  31300. addUnitAlias('year', 'y');
  31301. // PRIORITIES
  31302. addUnitPriority('year', 1);
  31303. // PARSING
  31304. addRegexToken('Y', matchSigned);
  31305. addRegexToken('YY', match1to2, match2);
  31306. addRegexToken('YYYY', match1to4, match4);
  31307. addRegexToken('YYYYY', match1to6, match6);
  31308. addRegexToken('YYYYYY', match1to6, match6);
  31309. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  31310. addParseToken('YYYY', function (input, array) {
  31311. array[YEAR] =
  31312. input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  31313. });
  31314. addParseToken('YY', function (input, array) {
  31315. array[YEAR] = hooks.parseTwoDigitYear(input);
  31316. });
  31317. addParseToken('Y', function (input, array) {
  31318. array[YEAR] = parseInt(input, 10);
  31319. });
  31320. // HELPERS
  31321. function daysInYear(year) {
  31322. return isLeapYear(year) ? 366 : 365;
  31323. }
  31324. // HOOKS
  31325. hooks.parseTwoDigitYear = function (input) {
  31326. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  31327. };
  31328. // MOMENTS
  31329. var getSetYear = makeGetSet('FullYear', true);
  31330. function getIsLeapYear() {
  31331. return isLeapYear(this.year());
  31332. }
  31333. function createDate(y, m, d, h, M, s, ms) {
  31334. // can't just apply() to create a date:
  31335. // https://stackoverflow.com/q/181348
  31336. var date;
  31337. // the date constructor remaps years 0-99 to 1900-1999
  31338. if (y < 100 && y >= 0) {
  31339. // preserve leap years using a full 400 year cycle, then reset
  31340. date = new Date(y + 400, m, d, h, M, s, ms);
  31341. if (isFinite(date.getFullYear())) {
  31342. date.setFullYear(y);
  31343. }
  31344. } else {
  31345. date = new Date(y, m, d, h, M, s, ms);
  31346. }
  31347. return date;
  31348. }
  31349. function createUTCDate(y) {
  31350. var date, args;
  31351. // the Date.UTC function remaps years 0-99 to 1900-1999
  31352. if (y < 100 && y >= 0) {
  31353. args = Array.prototype.slice.call(arguments);
  31354. // preserve leap years using a full 400 year cycle, then reset
  31355. args[0] = y + 400;
  31356. date = new Date(Date.UTC.apply(null, args));
  31357. if (isFinite(date.getUTCFullYear())) {
  31358. date.setUTCFullYear(y);
  31359. }
  31360. } else {
  31361. date = new Date(Date.UTC.apply(null, arguments));
  31362. }
  31363. return date;
  31364. }
  31365. // start-of-first-week - start-of-year
  31366. function firstWeekOffset(year, dow, doy) {
  31367. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  31368. fwd = 7 + dow - doy,
  31369. // first-week day local weekday -- which local weekday is fwd
  31370. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  31371. return -fwdlw + fwd - 1;
  31372. }
  31373. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  31374. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  31375. var localWeekday = (7 + weekday - dow) % 7,
  31376. weekOffset = firstWeekOffset(year, dow, doy),
  31377. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  31378. resYear,
  31379. resDayOfYear;
  31380. if (dayOfYear <= 0) {
  31381. resYear = year - 1;
  31382. resDayOfYear = daysInYear(resYear) + dayOfYear;
  31383. } else if (dayOfYear > daysInYear(year)) {
  31384. resYear = year + 1;
  31385. resDayOfYear = dayOfYear - daysInYear(year);
  31386. } else {
  31387. resYear = year;
  31388. resDayOfYear = dayOfYear;
  31389. }
  31390. return {
  31391. year: resYear,
  31392. dayOfYear: resDayOfYear,
  31393. };
  31394. }
  31395. function weekOfYear(mom, dow, doy) {
  31396. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  31397. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  31398. resWeek,
  31399. resYear;
  31400. if (week < 1) {
  31401. resYear = mom.year() - 1;
  31402. resWeek = week + weeksInYear(resYear, dow, doy);
  31403. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  31404. resWeek = week - weeksInYear(mom.year(), dow, doy);
  31405. resYear = mom.year() + 1;
  31406. } else {
  31407. resYear = mom.year();
  31408. resWeek = week;
  31409. }
  31410. return {
  31411. week: resWeek,
  31412. year: resYear,
  31413. };
  31414. }
  31415. function weeksInYear(year, dow, doy) {
  31416. var weekOffset = firstWeekOffset(year, dow, doy),
  31417. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  31418. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  31419. }
  31420. // FORMATTING
  31421. addFormatToken('w', ['ww', 2], 'wo', 'week');
  31422. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  31423. // ALIASES
  31424. addUnitAlias('week', 'w');
  31425. addUnitAlias('isoWeek', 'W');
  31426. // PRIORITIES
  31427. addUnitPriority('week', 5);
  31428. addUnitPriority('isoWeek', 5);
  31429. // PARSING
  31430. addRegexToken('w', match1to2);
  31431. addRegexToken('ww', match1to2, match2);
  31432. addRegexToken('W', match1to2);
  31433. addRegexToken('WW', match1to2, match2);
  31434. addWeekParseToken(
  31435. ['w', 'ww', 'W', 'WW'],
  31436. function (input, week, config, token) {
  31437. week[token.substr(0, 1)] = toInt(input);
  31438. }
  31439. );
  31440. // HELPERS
  31441. // LOCALES
  31442. function localeWeek(mom) {
  31443. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  31444. }
  31445. var defaultLocaleWeek = {
  31446. dow: 0, // Sunday is the first day of the week.
  31447. doy: 6, // The week that contains Jan 6th is the first week of the year.
  31448. };
  31449. function localeFirstDayOfWeek() {
  31450. return this._week.dow;
  31451. }
  31452. function localeFirstDayOfYear() {
  31453. return this._week.doy;
  31454. }
  31455. // MOMENTS
  31456. function getSetWeek(input) {
  31457. var week = this.localeData().week(this);
  31458. return input == null ? week : this.add((input - week) * 7, 'd');
  31459. }
  31460. function getSetISOWeek(input) {
  31461. var week = weekOfYear(this, 1, 4).week;
  31462. return input == null ? week : this.add((input - week) * 7, 'd');
  31463. }
  31464. // FORMATTING
  31465. addFormatToken('d', 0, 'do', 'day');
  31466. addFormatToken('dd', 0, 0, function (format) {
  31467. return this.localeData().weekdaysMin(this, format);
  31468. });
  31469. addFormatToken('ddd', 0, 0, function (format) {
  31470. return this.localeData().weekdaysShort(this, format);
  31471. });
  31472. addFormatToken('dddd', 0, 0, function (format) {
  31473. return this.localeData().weekdays(this, format);
  31474. });
  31475. addFormatToken('e', 0, 0, 'weekday');
  31476. addFormatToken('E', 0, 0, 'isoWeekday');
  31477. // ALIASES
  31478. addUnitAlias('day', 'd');
  31479. addUnitAlias('weekday', 'e');
  31480. addUnitAlias('isoWeekday', 'E');
  31481. // PRIORITY
  31482. addUnitPriority('day', 11);
  31483. addUnitPriority('weekday', 11);
  31484. addUnitPriority('isoWeekday', 11);
  31485. // PARSING
  31486. addRegexToken('d', match1to2);
  31487. addRegexToken('e', match1to2);
  31488. addRegexToken('E', match1to2);
  31489. addRegexToken('dd', function (isStrict, locale) {
  31490. return locale.weekdaysMinRegex(isStrict);
  31491. });
  31492. addRegexToken('ddd', function (isStrict, locale) {
  31493. return locale.weekdaysShortRegex(isStrict);
  31494. });
  31495. addRegexToken('dddd', function (isStrict, locale) {
  31496. return locale.weekdaysRegex(isStrict);
  31497. });
  31498. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  31499. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  31500. // if we didn't get a weekday name, mark the date as invalid
  31501. if (weekday != null) {
  31502. week.d = weekday;
  31503. } else {
  31504. getParsingFlags(config).invalidWeekday = input;
  31505. }
  31506. });
  31507. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  31508. week[token] = toInt(input);
  31509. });
  31510. // HELPERS
  31511. function parseWeekday(input, locale) {
  31512. if (typeof input !== 'string') {
  31513. return input;
  31514. }
  31515. if (!isNaN(input)) {
  31516. return parseInt(input, 10);
  31517. }
  31518. input = locale.weekdaysParse(input);
  31519. if (typeof input === 'number') {
  31520. return input;
  31521. }
  31522. return null;
  31523. }
  31524. function parseIsoWeekday(input, locale) {
  31525. if (typeof input === 'string') {
  31526. return locale.weekdaysParse(input) % 7 || 7;
  31527. }
  31528. return isNaN(input) ? null : input;
  31529. }
  31530. // LOCALES
  31531. function shiftWeekdays(ws, n) {
  31532. return ws.slice(n, 7).concat(ws.slice(0, n));
  31533. }
  31534. var defaultLocaleWeekdays =
  31535. 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  31536. defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  31537. defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  31538. defaultWeekdaysRegex = matchWord,
  31539. defaultWeekdaysShortRegex = matchWord,
  31540. defaultWeekdaysMinRegex = matchWord;
  31541. function localeWeekdays(m, format) {
  31542. var weekdays = isArray(this._weekdays)
  31543. ? this._weekdays
  31544. : this._weekdays[
  31545. m && m !== true && this._weekdays.isFormat.test(format)
  31546. ? 'format'
  31547. : 'standalone'
  31548. ];
  31549. return m === true
  31550. ? shiftWeekdays(weekdays, this._week.dow)
  31551. : m
  31552. ? weekdays[m.day()]
  31553. : weekdays;
  31554. }
  31555. function localeWeekdaysShort(m) {
  31556. return m === true
  31557. ? shiftWeekdays(this._weekdaysShort, this._week.dow)
  31558. : m
  31559. ? this._weekdaysShort[m.day()]
  31560. : this._weekdaysShort;
  31561. }
  31562. function localeWeekdaysMin(m) {
  31563. return m === true
  31564. ? shiftWeekdays(this._weekdaysMin, this._week.dow)
  31565. : m
  31566. ? this._weekdaysMin[m.day()]
  31567. : this._weekdaysMin;
  31568. }
  31569. function handleStrictParse$1(weekdayName, format, strict) {
  31570. var i,
  31571. ii,
  31572. mom,
  31573. llc = weekdayName.toLocaleLowerCase();
  31574. if (!this._weekdaysParse) {
  31575. this._weekdaysParse = [];
  31576. this._shortWeekdaysParse = [];
  31577. this._minWeekdaysParse = [];
  31578. for (i = 0; i < 7; ++i) {
  31579. mom = createUTC([2000, 1]).day(i);
  31580. this._minWeekdaysParse[i] = this.weekdaysMin(
  31581. mom,
  31582. ''
  31583. ).toLocaleLowerCase();
  31584. this._shortWeekdaysParse[i] = this.weekdaysShort(
  31585. mom,
  31586. ''
  31587. ).toLocaleLowerCase();
  31588. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  31589. }
  31590. }
  31591. if (strict) {
  31592. if (format === 'dddd') {
  31593. ii = indexOf.call(this._weekdaysParse, llc);
  31594. return ii !== -1 ? ii : null;
  31595. } else if (format === 'ddd') {
  31596. ii = indexOf.call(this._shortWeekdaysParse, llc);
  31597. return ii !== -1 ? ii : null;
  31598. } else {
  31599. ii = indexOf.call(this._minWeekdaysParse, llc);
  31600. return ii !== -1 ? ii : null;
  31601. }
  31602. } else {
  31603. if (format === 'dddd') {
  31604. ii = indexOf.call(this._weekdaysParse, llc);
  31605. if (ii !== -1) {
  31606. return ii;
  31607. }
  31608. ii = indexOf.call(this._shortWeekdaysParse, llc);
  31609. if (ii !== -1) {
  31610. return ii;
  31611. }
  31612. ii = indexOf.call(this._minWeekdaysParse, llc);
  31613. return ii !== -1 ? ii : null;
  31614. } else if (format === 'ddd') {
  31615. ii = indexOf.call(this._shortWeekdaysParse, llc);
  31616. if (ii !== -1) {
  31617. return ii;
  31618. }
  31619. ii = indexOf.call(this._weekdaysParse, llc);
  31620. if (ii !== -1) {
  31621. return ii;
  31622. }
  31623. ii = indexOf.call(this._minWeekdaysParse, llc);
  31624. return ii !== -1 ? ii : null;
  31625. } else {
  31626. ii = indexOf.call(this._minWeekdaysParse, llc);
  31627. if (ii !== -1) {
  31628. return ii;
  31629. }
  31630. ii = indexOf.call(this._weekdaysParse, llc);
  31631. if (ii !== -1) {
  31632. return ii;
  31633. }
  31634. ii = indexOf.call(this._shortWeekdaysParse, llc);
  31635. return ii !== -1 ? ii : null;
  31636. }
  31637. }
  31638. }
  31639. function localeWeekdaysParse(weekdayName, format, strict) {
  31640. var i, mom, regex;
  31641. if (this._weekdaysParseExact) {
  31642. return handleStrictParse$1.call(this, weekdayName, format, strict);
  31643. }
  31644. if (!this._weekdaysParse) {
  31645. this._weekdaysParse = [];
  31646. this._minWeekdaysParse = [];
  31647. this._shortWeekdaysParse = [];
  31648. this._fullWeekdaysParse = [];
  31649. }
  31650. for (i = 0; i < 7; i++) {
  31651. // make the regex if we don't have it already
  31652. mom = createUTC([2000, 1]).day(i);
  31653. if (strict && !this._fullWeekdaysParse[i]) {
  31654. this._fullWeekdaysParse[i] = new RegExp(
  31655. '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
  31656. 'i'
  31657. );
  31658. this._shortWeekdaysParse[i] = new RegExp(
  31659. '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
  31660. 'i'
  31661. );
  31662. this._minWeekdaysParse[i] = new RegExp(
  31663. '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
  31664. 'i'
  31665. );
  31666. }
  31667. if (!this._weekdaysParse[i]) {
  31668. regex =
  31669. '^' +
  31670. this.weekdays(mom, '') +
  31671. '|^' +
  31672. this.weekdaysShort(mom, '') +
  31673. '|^' +
  31674. this.weekdaysMin(mom, '');
  31675. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  31676. }
  31677. // test the regex
  31678. if (
  31679. strict &&
  31680. format === 'dddd' &&
  31681. this._fullWeekdaysParse[i].test(weekdayName)
  31682. ) {
  31683. return i;
  31684. } else if (
  31685. strict &&
  31686. format === 'ddd' &&
  31687. this._shortWeekdaysParse[i].test(weekdayName)
  31688. ) {
  31689. return i;
  31690. } else if (
  31691. strict &&
  31692. format === 'dd' &&
  31693. this._minWeekdaysParse[i].test(weekdayName)
  31694. ) {
  31695. return i;
  31696. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  31697. return i;
  31698. }
  31699. }
  31700. }
  31701. // MOMENTS
  31702. function getSetDayOfWeek(input) {
  31703. if (!this.isValid()) {
  31704. return input != null ? this : NaN;
  31705. }
  31706. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  31707. if (input != null) {
  31708. input = parseWeekday(input, this.localeData());
  31709. return this.add(input - day, 'd');
  31710. } else {
  31711. return day;
  31712. }
  31713. }
  31714. function getSetLocaleDayOfWeek(input) {
  31715. if (!this.isValid()) {
  31716. return input != null ? this : NaN;
  31717. }
  31718. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  31719. return input == null ? weekday : this.add(input - weekday, 'd');
  31720. }
  31721. function getSetISODayOfWeek(input) {
  31722. if (!this.isValid()) {
  31723. return input != null ? this : NaN;
  31724. }
  31725. // behaves the same as moment#day except
  31726. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  31727. // as a setter, sunday should belong to the previous week.
  31728. if (input != null) {
  31729. var weekday = parseIsoWeekday(input, this.localeData());
  31730. return this.day(this.day() % 7 ? weekday : weekday - 7);
  31731. } else {
  31732. return this.day() || 7;
  31733. }
  31734. }
  31735. function weekdaysRegex(isStrict) {
  31736. if (this._weekdaysParseExact) {
  31737. if (!hasOwnProp(this, '_weekdaysRegex')) {
  31738. computeWeekdaysParse.call(this);
  31739. }
  31740. if (isStrict) {
  31741. return this._weekdaysStrictRegex;
  31742. } else {
  31743. return this._weekdaysRegex;
  31744. }
  31745. } else {
  31746. if (!hasOwnProp(this, '_weekdaysRegex')) {
  31747. this._weekdaysRegex = defaultWeekdaysRegex;
  31748. }
  31749. return this._weekdaysStrictRegex && isStrict
  31750. ? this._weekdaysStrictRegex
  31751. : this._weekdaysRegex;
  31752. }
  31753. }
  31754. function weekdaysShortRegex(isStrict) {
  31755. if (this._weekdaysParseExact) {
  31756. if (!hasOwnProp(this, '_weekdaysRegex')) {
  31757. computeWeekdaysParse.call(this);
  31758. }
  31759. if (isStrict) {
  31760. return this._weekdaysShortStrictRegex;
  31761. } else {
  31762. return this._weekdaysShortRegex;
  31763. }
  31764. } else {
  31765. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  31766. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  31767. }
  31768. return this._weekdaysShortStrictRegex && isStrict
  31769. ? this._weekdaysShortStrictRegex
  31770. : this._weekdaysShortRegex;
  31771. }
  31772. }
  31773. function weekdaysMinRegex(isStrict) {
  31774. if (this._weekdaysParseExact) {
  31775. if (!hasOwnProp(this, '_weekdaysRegex')) {
  31776. computeWeekdaysParse.call(this);
  31777. }
  31778. if (isStrict) {
  31779. return this._weekdaysMinStrictRegex;
  31780. } else {
  31781. return this._weekdaysMinRegex;
  31782. }
  31783. } else {
  31784. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  31785. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  31786. }
  31787. return this._weekdaysMinStrictRegex && isStrict
  31788. ? this._weekdaysMinStrictRegex
  31789. : this._weekdaysMinRegex;
  31790. }
  31791. }
  31792. function computeWeekdaysParse() {
  31793. function cmpLenRev(a, b) {
  31794. return b.length - a.length;
  31795. }
  31796. var minPieces = [],
  31797. shortPieces = [],
  31798. longPieces = [],
  31799. mixedPieces = [],
  31800. i,
  31801. mom,
  31802. minp,
  31803. shortp,
  31804. longp;
  31805. for (i = 0; i < 7; i++) {
  31806. // make the regex if we don't have it already
  31807. mom = createUTC([2000, 1]).day(i);
  31808. minp = regexEscape(this.weekdaysMin(mom, ''));
  31809. shortp = regexEscape(this.weekdaysShort(mom, ''));
  31810. longp = regexEscape(this.weekdays(mom, ''));
  31811. minPieces.push(minp);
  31812. shortPieces.push(shortp);
  31813. longPieces.push(longp);
  31814. mixedPieces.push(minp);
  31815. mixedPieces.push(shortp);
  31816. mixedPieces.push(longp);
  31817. }
  31818. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  31819. // will match the longer piece.
  31820. minPieces.sort(cmpLenRev);
  31821. shortPieces.sort(cmpLenRev);
  31822. longPieces.sort(cmpLenRev);
  31823. mixedPieces.sort(cmpLenRev);
  31824. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  31825. this._weekdaysShortRegex = this._weekdaysRegex;
  31826. this._weekdaysMinRegex = this._weekdaysRegex;
  31827. this._weekdaysStrictRegex = new RegExp(
  31828. '^(' + longPieces.join('|') + ')',
  31829. 'i'
  31830. );
  31831. this._weekdaysShortStrictRegex = new RegExp(
  31832. '^(' + shortPieces.join('|') + ')',
  31833. 'i'
  31834. );
  31835. this._weekdaysMinStrictRegex = new RegExp(
  31836. '^(' + minPieces.join('|') + ')',
  31837. 'i'
  31838. );
  31839. }
  31840. // FORMATTING
  31841. function hFormat() {
  31842. return this.hours() % 12 || 12;
  31843. }
  31844. function kFormat() {
  31845. return this.hours() || 24;
  31846. }
  31847. addFormatToken('H', ['HH', 2], 0, 'hour');
  31848. addFormatToken('h', ['hh', 2], 0, hFormat);
  31849. addFormatToken('k', ['kk', 2], 0, kFormat);
  31850. addFormatToken('hmm', 0, 0, function () {
  31851. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  31852. });
  31853. addFormatToken('hmmss', 0, 0, function () {
  31854. return (
  31855. '' +
  31856. hFormat.apply(this) +
  31857. zeroFill(this.minutes(), 2) +
  31858. zeroFill(this.seconds(), 2)
  31859. );
  31860. });
  31861. addFormatToken('Hmm', 0, 0, function () {
  31862. return '' + this.hours() + zeroFill(this.minutes(), 2);
  31863. });
  31864. addFormatToken('Hmmss', 0, 0, function () {
  31865. return (
  31866. '' +
  31867. this.hours() +
  31868. zeroFill(this.minutes(), 2) +
  31869. zeroFill(this.seconds(), 2)
  31870. );
  31871. });
  31872. function meridiem(token, lowercase) {
  31873. addFormatToken(token, 0, 0, function () {
  31874. return this.localeData().meridiem(
  31875. this.hours(),
  31876. this.minutes(),
  31877. lowercase
  31878. );
  31879. });
  31880. }
  31881. meridiem('a', true);
  31882. meridiem('A', false);
  31883. // ALIASES
  31884. addUnitAlias('hour', 'h');
  31885. // PRIORITY
  31886. addUnitPriority('hour', 13);
  31887. // PARSING
  31888. function matchMeridiem(isStrict, locale) {
  31889. return locale._meridiemParse;
  31890. }
  31891. addRegexToken('a', matchMeridiem);
  31892. addRegexToken('A', matchMeridiem);
  31893. addRegexToken('H', match1to2);
  31894. addRegexToken('h', match1to2);
  31895. addRegexToken('k', match1to2);
  31896. addRegexToken('HH', match1to2, match2);
  31897. addRegexToken('hh', match1to2, match2);
  31898. addRegexToken('kk', match1to2, match2);
  31899. addRegexToken('hmm', match3to4);
  31900. addRegexToken('hmmss', match5to6);
  31901. addRegexToken('Hmm', match3to4);
  31902. addRegexToken('Hmmss', match5to6);
  31903. addParseToken(['H', 'HH'], HOUR);
  31904. addParseToken(['k', 'kk'], function (input, array, config) {
  31905. var kInput = toInt(input);
  31906. array[HOUR] = kInput === 24 ? 0 : kInput;
  31907. });
  31908. addParseToken(['a', 'A'], function (input, array, config) {
  31909. config._isPm = config._locale.isPM(input);
  31910. config._meridiem = input;
  31911. });
  31912. addParseToken(['h', 'hh'], function (input, array, config) {
  31913. array[HOUR] = toInt(input);
  31914. getParsingFlags(config).bigHour = true;
  31915. });
  31916. addParseToken('hmm', function (input, array, config) {
  31917. var pos = input.length - 2;
  31918. array[HOUR] = toInt(input.substr(0, pos));
  31919. array[MINUTE] = toInt(input.substr(pos));
  31920. getParsingFlags(config).bigHour = true;
  31921. });
  31922. addParseToken('hmmss', function (input, array, config) {
  31923. var pos1 = input.length - 4,
  31924. pos2 = input.length - 2;
  31925. array[HOUR] = toInt(input.substr(0, pos1));
  31926. array[MINUTE] = toInt(input.substr(pos1, 2));
  31927. array[SECOND] = toInt(input.substr(pos2));
  31928. getParsingFlags(config).bigHour = true;
  31929. });
  31930. addParseToken('Hmm', function (input, array, config) {
  31931. var pos = input.length - 2;
  31932. array[HOUR] = toInt(input.substr(0, pos));
  31933. array[MINUTE] = toInt(input.substr(pos));
  31934. });
  31935. addParseToken('Hmmss', function (input, array, config) {
  31936. var pos1 = input.length - 4,
  31937. pos2 = input.length - 2;
  31938. array[HOUR] = toInt(input.substr(0, pos1));
  31939. array[MINUTE] = toInt(input.substr(pos1, 2));
  31940. array[SECOND] = toInt(input.substr(pos2));
  31941. });
  31942. // LOCALES
  31943. function localeIsPM(input) {
  31944. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  31945. // Using charAt should be more compatible.
  31946. return (input + '').toLowerCase().charAt(0) === 'p';
  31947. }
  31948. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
  31949. // Setting the hour should keep the time, because the user explicitly
  31950. // specified which hour they want. So trying to maintain the same hour (in
  31951. // a new timezone) makes sense. Adding/subtracting hours does not follow
  31952. // this rule.
  31953. getSetHour = makeGetSet('Hours', true);
  31954. function localeMeridiem(hours, minutes, isLower) {
  31955. if (hours > 11) {
  31956. return isLower ? 'pm' : 'PM';
  31957. } else {
  31958. return isLower ? 'am' : 'AM';
  31959. }
  31960. }
  31961. var baseConfig = {
  31962. calendar: defaultCalendar,
  31963. longDateFormat: defaultLongDateFormat,
  31964. invalidDate: defaultInvalidDate,
  31965. ordinal: defaultOrdinal,
  31966. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  31967. relativeTime: defaultRelativeTime,
  31968. months: defaultLocaleMonths,
  31969. monthsShort: defaultLocaleMonthsShort,
  31970. week: defaultLocaleWeek,
  31971. weekdays: defaultLocaleWeekdays,
  31972. weekdaysMin: defaultLocaleWeekdaysMin,
  31973. weekdaysShort: defaultLocaleWeekdaysShort,
  31974. meridiemParse: defaultLocaleMeridiemParse,
  31975. };
  31976. // internal storage for locale config files
  31977. var locales = {},
  31978. localeFamilies = {},
  31979. globalLocale;
  31980. function commonPrefix(arr1, arr2) {
  31981. var i,
  31982. minl = Math.min(arr1.length, arr2.length);
  31983. for (i = 0; i < minl; i += 1) {
  31984. if (arr1[i] !== arr2[i]) {
  31985. return i;
  31986. }
  31987. }
  31988. return minl;
  31989. }
  31990. function normalizeLocale(key) {
  31991. return key ? key.toLowerCase().replace('_', '-') : key;
  31992. }
  31993. // pick the locale from the array
  31994. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  31995. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  31996. function chooseLocale(names) {
  31997. var i = 0,
  31998. j,
  31999. next,
  32000. locale,
  32001. split;
  32002. while (i < names.length) {
  32003. split = normalizeLocale(names[i]).split('-');
  32004. j = split.length;
  32005. next = normalizeLocale(names[i + 1]);
  32006. next = next ? next.split('-') : null;
  32007. while (j > 0) {
  32008. locale = loadLocale(split.slice(0, j).join('-'));
  32009. if (locale) {
  32010. return locale;
  32011. }
  32012. if (
  32013. next &&
  32014. next.length >= j &&
  32015. commonPrefix(split, next) >= j - 1
  32016. ) {
  32017. //the next array item is better than a shallower substring of this one
  32018. break;
  32019. }
  32020. j--;
  32021. }
  32022. i++;
  32023. }
  32024. return globalLocale;
  32025. }
  32026. function isLocaleNameSane(name) {
  32027. // Prevent names that look like filesystem paths, i.e contain '/' or '\'
  32028. return name.match('^[^/\\\\]*$') != null;
  32029. }
  32030. function loadLocale(name) {
  32031. var oldLocale = null,
  32032. aliasedRequire;
  32033. // TODO: Find a better way to register and load all the locales in Node
  32034. if (
  32035. locales[name] === undefined &&
  32036. "object" !== 'undefined' &&
  32037. module &&
  32038. module.exports &&
  32039. isLocaleNameSane(name)
  32040. ) {
  32041. try {
  32042. oldLocale = globalLocale._abbr;
  32043. aliasedRequire = undefined;
  32044. __webpack_require__("./node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale sync recursive ^\\.\\/.*$")("./" + name);
  32045. getSetGlobalLocale(oldLocale);
  32046. } catch (e) {
  32047. // mark as not found to avoid repeating expensive file require call causing high CPU
  32048. // when trying to find en-US, en_US, en-us for every format call
  32049. locales[name] = null; // null means not found
  32050. }
  32051. }
  32052. return locales[name];
  32053. }
  32054. // This function will load locale and then set the global locale. If
  32055. // no arguments are passed in, it will simply return the current global
  32056. // locale key.
  32057. function getSetGlobalLocale(key, values) {
  32058. var data;
  32059. if (key) {
  32060. if (isUndefined(values)) {
  32061. data = getLocale(key);
  32062. } else {
  32063. data = defineLocale(key, values);
  32064. }
  32065. if (data) {
  32066. // moment.duration._locale = moment._locale = data;
  32067. globalLocale = data;
  32068. } else {
  32069. if (typeof console !== 'undefined' && console.warn) {
  32070. //warn user if arguments are passed but the locale could not be set
  32071. console.warn(
  32072. 'Locale ' + key + ' not found. Did you forget to load it?'
  32073. );
  32074. }
  32075. }
  32076. }
  32077. return globalLocale._abbr;
  32078. }
  32079. function defineLocale(name, config) {
  32080. if (config !== null) {
  32081. var locale,
  32082. parentConfig = baseConfig;
  32083. config.abbr = name;
  32084. if (locales[name] != null) {
  32085. deprecateSimple(
  32086. 'defineLocaleOverride',
  32087. 'use moment.updateLocale(localeName, config) to change ' +
  32088. 'an existing locale. moment.defineLocale(localeName, ' +
  32089. 'config) should only be used for creating a new locale ' +
  32090. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
  32091. );
  32092. parentConfig = locales[name]._config;
  32093. } else if (config.parentLocale != null) {
  32094. if (locales[config.parentLocale] != null) {
  32095. parentConfig = locales[config.parentLocale]._config;
  32096. } else {
  32097. locale = loadLocale(config.parentLocale);
  32098. if (locale != null) {
  32099. parentConfig = locale._config;
  32100. } else {
  32101. if (!localeFamilies[config.parentLocale]) {
  32102. localeFamilies[config.parentLocale] = [];
  32103. }
  32104. localeFamilies[config.parentLocale].push({
  32105. name: name,
  32106. config: config,
  32107. });
  32108. return null;
  32109. }
  32110. }
  32111. }
  32112. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  32113. if (localeFamilies[name]) {
  32114. localeFamilies[name].forEach(function (x) {
  32115. defineLocale(x.name, x.config);
  32116. });
  32117. }
  32118. // backwards compat for now: also set the locale
  32119. // make sure we set the locale AFTER all child locales have been
  32120. // created, so we won't end up with the child locale set.
  32121. getSetGlobalLocale(name);
  32122. return locales[name];
  32123. } else {
  32124. // useful for testing
  32125. delete locales[name];
  32126. return null;
  32127. }
  32128. }
  32129. function updateLocale(name, config) {
  32130. if (config != null) {
  32131. var locale,
  32132. tmpLocale,
  32133. parentConfig = baseConfig;
  32134. if (locales[name] != null && locales[name].parentLocale != null) {
  32135. // Update existing child locale in-place to avoid memory-leaks
  32136. locales[name].set(mergeConfigs(locales[name]._config, config));
  32137. } else {
  32138. // MERGE
  32139. tmpLocale = loadLocale(name);
  32140. if (tmpLocale != null) {
  32141. parentConfig = tmpLocale._config;
  32142. }
  32143. config = mergeConfigs(parentConfig, config);
  32144. if (tmpLocale == null) {
  32145. // updateLocale is called for creating a new locale
  32146. // Set abbr so it will have a name (getters return
  32147. // undefined otherwise).
  32148. config.abbr = name;
  32149. }
  32150. locale = new Locale(config);
  32151. locale.parentLocale = locales[name];
  32152. locales[name] = locale;
  32153. }
  32154. // backwards compat for now: also set the locale
  32155. getSetGlobalLocale(name);
  32156. } else {
  32157. // pass null for config to unupdate, useful for tests
  32158. if (locales[name] != null) {
  32159. if (locales[name].parentLocale != null) {
  32160. locales[name] = locales[name].parentLocale;
  32161. if (name === getSetGlobalLocale()) {
  32162. getSetGlobalLocale(name);
  32163. }
  32164. } else if (locales[name] != null) {
  32165. delete locales[name];
  32166. }
  32167. }
  32168. }
  32169. return locales[name];
  32170. }
  32171. // returns locale data
  32172. function getLocale(key) {
  32173. var locale;
  32174. if (key && key._locale && key._locale._abbr) {
  32175. key = key._locale._abbr;
  32176. }
  32177. if (!key) {
  32178. return globalLocale;
  32179. }
  32180. if (!isArray(key)) {
  32181. //short-circuit everything else
  32182. locale = loadLocale(key);
  32183. if (locale) {
  32184. return locale;
  32185. }
  32186. key = [key];
  32187. }
  32188. return chooseLocale(key);
  32189. }
  32190. function listLocales() {
  32191. return keys(locales);
  32192. }
  32193. function checkOverflow(m) {
  32194. var overflow,
  32195. a = m._a;
  32196. if (a && getParsingFlags(m).overflow === -2) {
  32197. overflow =
  32198. a[MONTH] < 0 || a[MONTH] > 11
  32199. ? MONTH
  32200. : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
  32201. ? DATE
  32202. : a[HOUR] < 0 ||
  32203. a[HOUR] > 24 ||
  32204. (a[HOUR] === 24 &&
  32205. (a[MINUTE] !== 0 ||
  32206. a[SECOND] !== 0 ||
  32207. a[MILLISECOND] !== 0))
  32208. ? HOUR
  32209. : a[MINUTE] < 0 || a[MINUTE] > 59
  32210. ? MINUTE
  32211. : a[SECOND] < 0 || a[SECOND] > 59
  32212. ? SECOND
  32213. : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
  32214. ? MILLISECOND
  32215. : -1;
  32216. if (
  32217. getParsingFlags(m)._overflowDayOfYear &&
  32218. (overflow < YEAR || overflow > DATE)
  32219. ) {
  32220. overflow = DATE;
  32221. }
  32222. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  32223. overflow = WEEK;
  32224. }
  32225. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  32226. overflow = WEEKDAY;
  32227. }
  32228. getParsingFlags(m).overflow = overflow;
  32229. }
  32230. return m;
  32231. }
  32232. // iso 8601 regex
  32233. // 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)
  32234. var extendedIsoRegex =
  32235. /^\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)?)?$/,
  32236. basicIsoRegex =
  32237. /^\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)?)?$/,
  32238. tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
  32239. isoDates = [
  32240. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  32241. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  32242. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  32243. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  32244. ['YYYY-DDD', /\d{4}-\d{3}/],
  32245. ['YYYY-MM', /\d{4}-\d\d/, false],
  32246. ['YYYYYYMMDD', /[+-]\d{10}/],
  32247. ['YYYYMMDD', /\d{8}/],
  32248. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  32249. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  32250. ['YYYYDDD', /\d{7}/],
  32251. ['YYYYMM', /\d{6}/, false],
  32252. ['YYYY', /\d{4}/, false],
  32253. ],
  32254. // iso time formats and regexes
  32255. isoTimes = [
  32256. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  32257. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  32258. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  32259. ['HH:mm', /\d\d:\d\d/],
  32260. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  32261. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  32262. ['HHmmss', /\d\d\d\d\d\d/],
  32263. ['HHmm', /\d\d\d\d/],
  32264. ['HH', /\d\d/],
  32265. ],
  32266. aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
  32267. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  32268. rfc2822 =
  32269. /^(?:(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}))$/,
  32270. obsOffsets = {
  32271. UT: 0,
  32272. GMT: 0,
  32273. EDT: -4 * 60,
  32274. EST: -5 * 60,
  32275. CDT: -5 * 60,
  32276. CST: -6 * 60,
  32277. MDT: -6 * 60,
  32278. MST: -7 * 60,
  32279. PDT: -7 * 60,
  32280. PST: -8 * 60,
  32281. };
  32282. // date from iso format
  32283. function configFromISO(config) {
  32284. var i,
  32285. l,
  32286. string = config._i,
  32287. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  32288. allowTime,
  32289. dateFormat,
  32290. timeFormat,
  32291. tzFormat,
  32292. isoDatesLen = isoDates.length,
  32293. isoTimesLen = isoTimes.length;
  32294. if (match) {
  32295. getParsingFlags(config).iso = true;
  32296. for (i = 0, l = isoDatesLen; i < l; i++) {
  32297. if (isoDates[i][1].exec(match[1])) {
  32298. dateFormat = isoDates[i][0];
  32299. allowTime = isoDates[i][2] !== false;
  32300. break;
  32301. }
  32302. }
  32303. if (dateFormat == null) {
  32304. config._isValid = false;
  32305. return;
  32306. }
  32307. if (match[3]) {
  32308. for (i = 0, l = isoTimesLen; i < l; i++) {
  32309. if (isoTimes[i][1].exec(match[3])) {
  32310. // match[2] should be 'T' or space
  32311. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  32312. break;
  32313. }
  32314. }
  32315. if (timeFormat == null) {
  32316. config._isValid = false;
  32317. return;
  32318. }
  32319. }
  32320. if (!allowTime && timeFormat != null) {
  32321. config._isValid = false;
  32322. return;
  32323. }
  32324. if (match[4]) {
  32325. if (tzRegex.exec(match[4])) {
  32326. tzFormat = 'Z';
  32327. } else {
  32328. config._isValid = false;
  32329. return;
  32330. }
  32331. }
  32332. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  32333. configFromStringAndFormat(config);
  32334. } else {
  32335. config._isValid = false;
  32336. }
  32337. }
  32338. function extractFromRFC2822Strings(
  32339. yearStr,
  32340. monthStr,
  32341. dayStr,
  32342. hourStr,
  32343. minuteStr,
  32344. secondStr
  32345. ) {
  32346. var result = [
  32347. untruncateYear(yearStr),
  32348. defaultLocaleMonthsShort.indexOf(monthStr),
  32349. parseInt(dayStr, 10),
  32350. parseInt(hourStr, 10),
  32351. parseInt(minuteStr, 10),
  32352. ];
  32353. if (secondStr) {
  32354. result.push(parseInt(secondStr, 10));
  32355. }
  32356. return result;
  32357. }
  32358. function untruncateYear(yearStr) {
  32359. var year = parseInt(yearStr, 10);
  32360. if (year <= 49) {
  32361. return 2000 + year;
  32362. } else if (year <= 999) {
  32363. return 1900 + year;
  32364. }
  32365. return year;
  32366. }
  32367. function preprocessRFC2822(s) {
  32368. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  32369. return s
  32370. .replace(/\([^()]*\)|[\n\t]/g, ' ')
  32371. .replace(/(\s\s+)/g, ' ')
  32372. .replace(/^\s\s*/, '')
  32373. .replace(/\s\s*$/, '');
  32374. }
  32375. function checkWeekday(weekdayStr, parsedInput, config) {
  32376. if (weekdayStr) {
  32377. // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
  32378. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  32379. weekdayActual = new Date(
  32380. parsedInput[0],
  32381. parsedInput[1],
  32382. parsedInput[2]
  32383. ).getDay();
  32384. if (weekdayProvided !== weekdayActual) {
  32385. getParsingFlags(config).weekdayMismatch = true;
  32386. config._isValid = false;
  32387. return false;
  32388. }
  32389. }
  32390. return true;
  32391. }
  32392. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  32393. if (obsOffset) {
  32394. return obsOffsets[obsOffset];
  32395. } else if (militaryOffset) {
  32396. // the only allowed military tz is Z
  32397. return 0;
  32398. } else {
  32399. var hm = parseInt(numOffset, 10),
  32400. m = hm % 100,
  32401. h = (hm - m) / 100;
  32402. return h * 60 + m;
  32403. }
  32404. }
  32405. // date and time from ref 2822 format
  32406. function configFromRFC2822(config) {
  32407. var match = rfc2822.exec(preprocessRFC2822(config._i)),
  32408. parsedArray;
  32409. if (match) {
  32410. parsedArray = extractFromRFC2822Strings(
  32411. match[4],
  32412. match[3],
  32413. match[2],
  32414. match[5],
  32415. match[6],
  32416. match[7]
  32417. );
  32418. if (!checkWeekday(match[1], parsedArray, config)) {
  32419. return;
  32420. }
  32421. config._a = parsedArray;
  32422. config._tzm = calculateOffset(match[8], match[9], match[10]);
  32423. config._d = createUTCDate.apply(null, config._a);
  32424. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  32425. getParsingFlags(config).rfc2822 = true;
  32426. } else {
  32427. config._isValid = false;
  32428. }
  32429. }
  32430. // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
  32431. function configFromString(config) {
  32432. var matched = aspNetJsonRegex.exec(config._i);
  32433. if (matched !== null) {
  32434. config._d = new Date(+matched[1]);
  32435. return;
  32436. }
  32437. configFromISO(config);
  32438. if (config._isValid === false) {
  32439. delete config._isValid;
  32440. } else {
  32441. return;
  32442. }
  32443. configFromRFC2822(config);
  32444. if (config._isValid === false) {
  32445. delete config._isValid;
  32446. } else {
  32447. return;
  32448. }
  32449. if (config._strict) {
  32450. config._isValid = false;
  32451. } else {
  32452. // Final attempt, use Input Fallback
  32453. hooks.createFromInputFallback(config);
  32454. }
  32455. }
  32456. hooks.createFromInputFallback = deprecate(
  32457. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  32458. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  32459. 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  32460. function (config) {
  32461. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  32462. }
  32463. );
  32464. // Pick the first defined of two or three arguments.
  32465. function defaults(a, b, c) {
  32466. if (a != null) {
  32467. return a;
  32468. }
  32469. if (b != null) {
  32470. return b;
  32471. }
  32472. return c;
  32473. }
  32474. function currentDateArray(config) {
  32475. // hooks is actually the exported moment object
  32476. var nowValue = new Date(hooks.now());
  32477. if (config._useUTC) {
  32478. return [
  32479. nowValue.getUTCFullYear(),
  32480. nowValue.getUTCMonth(),
  32481. nowValue.getUTCDate(),
  32482. ];
  32483. }
  32484. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  32485. }
  32486. // convert an array to a date.
  32487. // the array should mirror the parameters below
  32488. // note: all values past the year are optional and will default to the lowest possible value.
  32489. // [year, month, day , hour, minute, second, millisecond]
  32490. function configFromArray(config) {
  32491. var i,
  32492. date,
  32493. input = [],
  32494. currentDate,
  32495. expectedWeekday,
  32496. yearToUse;
  32497. if (config._d) {
  32498. return;
  32499. }
  32500. currentDate = currentDateArray(config);
  32501. //compute day of the year from weeks and weekdays
  32502. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  32503. dayOfYearFromWeekInfo(config);
  32504. }
  32505. //if the day of the year is set, figure out what it is
  32506. if (config._dayOfYear != null) {
  32507. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  32508. if (
  32509. config._dayOfYear > daysInYear(yearToUse) ||
  32510. config._dayOfYear === 0
  32511. ) {
  32512. getParsingFlags(config)._overflowDayOfYear = true;
  32513. }
  32514. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  32515. config._a[MONTH] = date.getUTCMonth();
  32516. config._a[DATE] = date.getUTCDate();
  32517. }
  32518. // Default to current date.
  32519. // * if no year, month, day of month are given, default to today
  32520. // * if day of month is given, default month and year
  32521. // * if month is given, default only year
  32522. // * if year is given, don't default anything
  32523. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  32524. config._a[i] = input[i] = currentDate[i];
  32525. }
  32526. // Zero out whatever was not defaulted, including time
  32527. for (; i < 7; i++) {
  32528. config._a[i] = input[i] =
  32529. config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
  32530. }
  32531. // Check for 24:00:00.000
  32532. if (
  32533. config._a[HOUR] === 24 &&
  32534. config._a[MINUTE] === 0 &&
  32535. config._a[SECOND] === 0 &&
  32536. config._a[MILLISECOND] === 0
  32537. ) {
  32538. config._nextDay = true;
  32539. config._a[HOUR] = 0;
  32540. }
  32541. config._d = (config._useUTC ? createUTCDate : createDate).apply(
  32542. null,
  32543. input
  32544. );
  32545. expectedWeekday = config._useUTC
  32546. ? config._d.getUTCDay()
  32547. : config._d.getDay();
  32548. // Apply timezone offset from input. The actual utcOffset can be changed
  32549. // with parseZone.
  32550. if (config._tzm != null) {
  32551. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  32552. }
  32553. if (config._nextDay) {
  32554. config._a[HOUR] = 24;
  32555. }
  32556. // check for mismatching day of week
  32557. if (
  32558. config._w &&
  32559. typeof config._w.d !== 'undefined' &&
  32560. config._w.d !== expectedWeekday
  32561. ) {
  32562. getParsingFlags(config).weekdayMismatch = true;
  32563. }
  32564. }
  32565. function dayOfYearFromWeekInfo(config) {
  32566. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
  32567. w = config._w;
  32568. if (w.GG != null || w.W != null || w.E != null) {
  32569. dow = 1;
  32570. doy = 4;
  32571. // TODO: We need to take the current isoWeekYear, but that depends on
  32572. // how we interpret now (local, utc, fixed offset). So create
  32573. // a now version of current config (take local/utc/offset flags, and
  32574. // create now).
  32575. weekYear = defaults(
  32576. w.GG,
  32577. config._a[YEAR],
  32578. weekOfYear(createLocal(), 1, 4).year
  32579. );
  32580. week = defaults(w.W, 1);
  32581. weekday = defaults(w.E, 1);
  32582. if (weekday < 1 || weekday > 7) {
  32583. weekdayOverflow = true;
  32584. }
  32585. } else {
  32586. dow = config._locale._week.dow;
  32587. doy = config._locale._week.doy;
  32588. curWeek = weekOfYear(createLocal(), dow, doy);
  32589. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  32590. // Default to current week.
  32591. week = defaults(w.w, curWeek.week);
  32592. if (w.d != null) {
  32593. // weekday -- low day numbers are considered next week
  32594. weekday = w.d;
  32595. if (weekday < 0 || weekday > 6) {
  32596. weekdayOverflow = true;
  32597. }
  32598. } else if (w.e != null) {
  32599. // local weekday -- counting starts from beginning of week
  32600. weekday = w.e + dow;
  32601. if (w.e < 0 || w.e > 6) {
  32602. weekdayOverflow = true;
  32603. }
  32604. } else {
  32605. // default to beginning of week
  32606. weekday = dow;
  32607. }
  32608. }
  32609. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  32610. getParsingFlags(config)._overflowWeeks = true;
  32611. } else if (weekdayOverflow != null) {
  32612. getParsingFlags(config)._overflowWeekday = true;
  32613. } else {
  32614. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  32615. config._a[YEAR] = temp.year;
  32616. config._dayOfYear = temp.dayOfYear;
  32617. }
  32618. }
  32619. // constant that refers to the ISO standard
  32620. hooks.ISO_8601 = function () {};
  32621. // constant that refers to the RFC 2822 form
  32622. hooks.RFC_2822 = function () {};
  32623. // date from string and format string
  32624. function configFromStringAndFormat(config) {
  32625. // TODO: Move this to another part of the creation flow to prevent circular deps
  32626. if (config._f === hooks.ISO_8601) {
  32627. configFromISO(config);
  32628. return;
  32629. }
  32630. if (config._f === hooks.RFC_2822) {
  32631. configFromRFC2822(config);
  32632. return;
  32633. }
  32634. config._a = [];
  32635. getParsingFlags(config).empty = true;
  32636. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  32637. var string = '' + config._i,
  32638. i,
  32639. parsedInput,
  32640. tokens,
  32641. token,
  32642. skipped,
  32643. stringLength = string.length,
  32644. totalParsedInputLength = 0,
  32645. era,
  32646. tokenLen;
  32647. tokens =
  32648. expandFormat(config._f, config._locale).match(formattingTokens) || [];
  32649. tokenLen = tokens.length;
  32650. for (i = 0; i < tokenLen; i++) {
  32651. token = tokens[i];
  32652. parsedInput = (string.match(getParseRegexForToken(token, config)) ||
  32653. [])[0];
  32654. if (parsedInput) {
  32655. skipped = string.substr(0, string.indexOf(parsedInput));
  32656. if (skipped.length > 0) {
  32657. getParsingFlags(config).unusedInput.push(skipped);
  32658. }
  32659. string = string.slice(
  32660. string.indexOf(parsedInput) + parsedInput.length
  32661. );
  32662. totalParsedInputLength += parsedInput.length;
  32663. }
  32664. // don't parse if it's not a known token
  32665. if (formatTokenFunctions[token]) {
  32666. if (parsedInput) {
  32667. getParsingFlags(config).empty = false;
  32668. } else {
  32669. getParsingFlags(config).unusedTokens.push(token);
  32670. }
  32671. addTimeToArrayFromToken(token, parsedInput, config);
  32672. } else if (config._strict && !parsedInput) {
  32673. getParsingFlags(config).unusedTokens.push(token);
  32674. }
  32675. }
  32676. // add remaining unparsed input length to the string
  32677. getParsingFlags(config).charsLeftOver =
  32678. stringLength - totalParsedInputLength;
  32679. if (string.length > 0) {
  32680. getParsingFlags(config).unusedInput.push(string);
  32681. }
  32682. // clear _12h flag if hour is <= 12
  32683. if (
  32684. config._a[HOUR] <= 12 &&
  32685. getParsingFlags(config).bigHour === true &&
  32686. config._a[HOUR] > 0
  32687. ) {
  32688. getParsingFlags(config).bigHour = undefined;
  32689. }
  32690. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  32691. getParsingFlags(config).meridiem = config._meridiem;
  32692. // handle meridiem
  32693. config._a[HOUR] = meridiemFixWrap(
  32694. config._locale,
  32695. config._a[HOUR],
  32696. config._meridiem
  32697. );
  32698. // handle era
  32699. era = getParsingFlags(config).era;
  32700. if (era !== null) {
  32701. config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
  32702. }
  32703. configFromArray(config);
  32704. checkOverflow(config);
  32705. }
  32706. function meridiemFixWrap(locale, hour, meridiem) {
  32707. var isPm;
  32708. if (meridiem == null) {
  32709. // nothing to do
  32710. return hour;
  32711. }
  32712. if (locale.meridiemHour != null) {
  32713. return locale.meridiemHour(hour, meridiem);
  32714. } else if (locale.isPM != null) {
  32715. // Fallback
  32716. isPm = locale.isPM(meridiem);
  32717. if (isPm && hour < 12) {
  32718. hour += 12;
  32719. }
  32720. if (!isPm && hour === 12) {
  32721. hour = 0;
  32722. }
  32723. return hour;
  32724. } else {
  32725. // this is not supposed to happen
  32726. return hour;
  32727. }
  32728. }
  32729. // date from string and array of format strings
  32730. function configFromStringAndArray(config) {
  32731. var tempConfig,
  32732. bestMoment,
  32733. scoreToBeat,
  32734. i,
  32735. currentScore,
  32736. validFormatFound,
  32737. bestFormatIsValid = false,
  32738. configfLen = config._f.length;
  32739. if (configfLen === 0) {
  32740. getParsingFlags(config).invalidFormat = true;
  32741. config._d = new Date(NaN);
  32742. return;
  32743. }
  32744. for (i = 0; i < configfLen; i++) {
  32745. currentScore = 0;
  32746. validFormatFound = false;
  32747. tempConfig = copyConfig({}, config);
  32748. if (config._useUTC != null) {
  32749. tempConfig._useUTC = config._useUTC;
  32750. }
  32751. tempConfig._f = config._f[i];
  32752. configFromStringAndFormat(tempConfig);
  32753. if (isValid(tempConfig)) {
  32754. validFormatFound = true;
  32755. }
  32756. // if there is any input that was not parsed add a penalty for that format
  32757. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  32758. //or tokens
  32759. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  32760. getParsingFlags(tempConfig).score = currentScore;
  32761. if (!bestFormatIsValid) {
  32762. if (
  32763. scoreToBeat == null ||
  32764. currentScore < scoreToBeat ||
  32765. validFormatFound
  32766. ) {
  32767. scoreToBeat = currentScore;
  32768. bestMoment = tempConfig;
  32769. if (validFormatFound) {
  32770. bestFormatIsValid = true;
  32771. }
  32772. }
  32773. } else {
  32774. if (currentScore < scoreToBeat) {
  32775. scoreToBeat = currentScore;
  32776. bestMoment = tempConfig;
  32777. }
  32778. }
  32779. }
  32780. extend(config, bestMoment || tempConfig);
  32781. }
  32782. function configFromObject(config) {
  32783. if (config._d) {
  32784. return;
  32785. }
  32786. var i = normalizeObjectUnits(config._i),
  32787. dayOrDate = i.day === undefined ? i.date : i.day;
  32788. config._a = map(
  32789. [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
  32790. function (obj) {
  32791. return obj && parseInt(obj, 10);
  32792. }
  32793. );
  32794. configFromArray(config);
  32795. }
  32796. function createFromConfig(config) {
  32797. var res = new Moment(checkOverflow(prepareConfig(config)));
  32798. if (res._nextDay) {
  32799. // Adding is smart enough around DST
  32800. res.add(1, 'd');
  32801. res._nextDay = undefined;
  32802. }
  32803. return res;
  32804. }
  32805. function prepareConfig(config) {
  32806. var input = config._i,
  32807. format = config._f;
  32808. config._locale = config._locale || getLocale(config._l);
  32809. if (input === null || (format === undefined && input === '')) {
  32810. return createInvalid({ nullInput: true });
  32811. }
  32812. if (typeof input === 'string') {
  32813. config._i = input = config._locale.preparse(input);
  32814. }
  32815. if (isMoment(input)) {
  32816. return new Moment(checkOverflow(input));
  32817. } else if (isDate(input)) {
  32818. config._d = input;
  32819. } else if (isArray(format)) {
  32820. configFromStringAndArray(config);
  32821. } else if (format) {
  32822. configFromStringAndFormat(config);
  32823. } else {
  32824. configFromInput(config);
  32825. }
  32826. if (!isValid(config)) {
  32827. config._d = null;
  32828. }
  32829. return config;
  32830. }
  32831. function configFromInput(config) {
  32832. var input = config._i;
  32833. if (isUndefined(input)) {
  32834. config._d = new Date(hooks.now());
  32835. } else if (isDate(input)) {
  32836. config._d = new Date(input.valueOf());
  32837. } else if (typeof input === 'string') {
  32838. configFromString(config);
  32839. } else if (isArray(input)) {
  32840. config._a = map(input.slice(0), function (obj) {
  32841. return parseInt(obj, 10);
  32842. });
  32843. configFromArray(config);
  32844. } else if (isObject(input)) {
  32845. configFromObject(config);
  32846. } else if (isNumber(input)) {
  32847. // from milliseconds
  32848. config._d = new Date(input);
  32849. } else {
  32850. hooks.createFromInputFallback(config);
  32851. }
  32852. }
  32853. function createLocalOrUTC(input, format, locale, strict, isUTC) {
  32854. var c = {};
  32855. if (format === true || format === false) {
  32856. strict = format;
  32857. format = undefined;
  32858. }
  32859. if (locale === true || locale === false) {
  32860. strict = locale;
  32861. locale = undefined;
  32862. }
  32863. if (
  32864. (isObject(input) && isObjectEmpty(input)) ||
  32865. (isArray(input) && input.length === 0)
  32866. ) {
  32867. input = undefined;
  32868. }
  32869. // object construction must be done this way.
  32870. // https://github.com/moment/moment/issues/1423
  32871. c._isAMomentObject = true;
  32872. c._useUTC = c._isUTC = isUTC;
  32873. c._l = locale;
  32874. c._i = input;
  32875. c._f = format;
  32876. c._strict = strict;
  32877. return createFromConfig(c);
  32878. }
  32879. function createLocal(input, format, locale, strict) {
  32880. return createLocalOrUTC(input, format, locale, strict, false);
  32881. }
  32882. var prototypeMin = deprecate(
  32883. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  32884. function () {
  32885. var other = createLocal.apply(null, arguments);
  32886. if (this.isValid() && other.isValid()) {
  32887. return other < this ? this : other;
  32888. } else {
  32889. return createInvalid();
  32890. }
  32891. }
  32892. ),
  32893. prototypeMax = deprecate(
  32894. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  32895. function () {
  32896. var other = createLocal.apply(null, arguments);
  32897. if (this.isValid() && other.isValid()) {
  32898. return other > this ? this : other;
  32899. } else {
  32900. return createInvalid();
  32901. }
  32902. }
  32903. );
  32904. // Pick a moment m from moments so that m[fn](other) is true for all
  32905. // other. This relies on the function fn to be transitive.
  32906. //
  32907. // moments should either be an array of moment objects or an array, whose
  32908. // first element is an array of moment objects.
  32909. function pickBy(fn, moments) {
  32910. var res, i;
  32911. if (moments.length === 1 && isArray(moments[0])) {
  32912. moments = moments[0];
  32913. }
  32914. if (!moments.length) {
  32915. return createLocal();
  32916. }
  32917. res = moments[0];
  32918. for (i = 1; i < moments.length; ++i) {
  32919. if (!moments[i].isValid() || moments[i][fn](res)) {
  32920. res = moments[i];
  32921. }
  32922. }
  32923. return res;
  32924. }
  32925. // TODO: Use [].sort instead?
  32926. function min() {
  32927. var args = [].slice.call(arguments, 0);
  32928. return pickBy('isBefore', args);
  32929. }
  32930. function max() {
  32931. var args = [].slice.call(arguments, 0);
  32932. return pickBy('isAfter', args);
  32933. }
  32934. var now = function () {
  32935. return Date.now ? Date.now() : +new Date();
  32936. };
  32937. var ordering = [
  32938. 'year',
  32939. 'quarter',
  32940. 'month',
  32941. 'week',
  32942. 'day',
  32943. 'hour',
  32944. 'minute',
  32945. 'second',
  32946. 'millisecond',
  32947. ];
  32948. function isDurationValid(m) {
  32949. var key,
  32950. unitHasDecimal = false,
  32951. i,
  32952. orderLen = ordering.length;
  32953. for (key in m) {
  32954. if (
  32955. hasOwnProp(m, key) &&
  32956. !(
  32957. indexOf.call(ordering, key) !== -1 &&
  32958. (m[key] == null || !isNaN(m[key]))
  32959. )
  32960. ) {
  32961. return false;
  32962. }
  32963. }
  32964. for (i = 0; i < orderLen; ++i) {
  32965. if (m[ordering[i]]) {
  32966. if (unitHasDecimal) {
  32967. return false; // only allow non-integers for smallest unit
  32968. }
  32969. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  32970. unitHasDecimal = true;
  32971. }
  32972. }
  32973. }
  32974. return true;
  32975. }
  32976. function isValid$1() {
  32977. return this._isValid;
  32978. }
  32979. function createInvalid$1() {
  32980. return createDuration(NaN);
  32981. }
  32982. function Duration(duration) {
  32983. var normalizedInput = normalizeObjectUnits(duration),
  32984. years = normalizedInput.year || 0,
  32985. quarters = normalizedInput.quarter || 0,
  32986. months = normalizedInput.month || 0,
  32987. weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
  32988. days = normalizedInput.day || 0,
  32989. hours = normalizedInput.hour || 0,
  32990. minutes = normalizedInput.minute || 0,
  32991. seconds = normalizedInput.second || 0,
  32992. milliseconds = normalizedInput.millisecond || 0;
  32993. this._isValid = isDurationValid(normalizedInput);
  32994. // representation for dateAddRemove
  32995. this._milliseconds =
  32996. +milliseconds +
  32997. seconds * 1e3 + // 1000
  32998. minutes * 6e4 + // 1000 * 60
  32999. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  33000. // Because of dateAddRemove treats 24 hours as different from a
  33001. // day when working around DST, we need to store them separately
  33002. this._days = +days + weeks * 7;
  33003. // It is impossible to translate months into days without knowing
  33004. // which months you are are talking about, so we have to store
  33005. // it separately.
  33006. this._months = +months + quarters * 3 + years * 12;
  33007. this._data = {};
  33008. this._locale = getLocale();
  33009. this._bubble();
  33010. }
  33011. function isDuration(obj) {
  33012. return obj instanceof Duration;
  33013. }
  33014. function absRound(number) {
  33015. if (number < 0) {
  33016. return Math.round(-1 * number) * -1;
  33017. } else {
  33018. return Math.round(number);
  33019. }
  33020. }
  33021. // compare two arrays, return the number of differences
  33022. function compareArrays(array1, array2, dontConvert) {
  33023. var len = Math.min(array1.length, array2.length),
  33024. lengthDiff = Math.abs(array1.length - array2.length),
  33025. diffs = 0,
  33026. i;
  33027. for (i = 0; i < len; i++) {
  33028. if (
  33029. (dontConvert && array1[i] !== array2[i]) ||
  33030. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
  33031. ) {
  33032. diffs++;
  33033. }
  33034. }
  33035. return diffs + lengthDiff;
  33036. }
  33037. // FORMATTING
  33038. function offset(token, separator) {
  33039. addFormatToken(token, 0, 0, function () {
  33040. var offset = this.utcOffset(),
  33041. sign = '+';
  33042. if (offset < 0) {
  33043. offset = -offset;
  33044. sign = '-';
  33045. }
  33046. return (
  33047. sign +
  33048. zeroFill(~~(offset / 60), 2) +
  33049. separator +
  33050. zeroFill(~~offset % 60, 2)
  33051. );
  33052. });
  33053. }
  33054. offset('Z', ':');
  33055. offset('ZZ', '');
  33056. // PARSING
  33057. addRegexToken('Z', matchShortOffset);
  33058. addRegexToken('ZZ', matchShortOffset);
  33059. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  33060. config._useUTC = true;
  33061. config._tzm = offsetFromString(matchShortOffset, input);
  33062. });
  33063. // HELPERS
  33064. // timezone chunker
  33065. // '+10:00' > ['10', '00']
  33066. // '-1530' > ['-15', '30']
  33067. var chunkOffset = /([\+\-]|\d\d)/gi;
  33068. function offsetFromString(matcher, string) {
  33069. var matches = (string || '').match(matcher),
  33070. chunk,
  33071. parts,
  33072. minutes;
  33073. if (matches === null) {
  33074. return null;
  33075. }
  33076. chunk = matches[matches.length - 1] || [];
  33077. parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  33078. minutes = +(parts[1] * 60) + toInt(parts[2]);
  33079. return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
  33080. }
  33081. // Return a moment from input, that is local/utc/zone equivalent to model.
  33082. function cloneWithOffset(input, model) {
  33083. var res, diff;
  33084. if (model._isUTC) {
  33085. res = model.clone();
  33086. diff =
  33087. (isMoment(input) || isDate(input)
  33088. ? input.valueOf()
  33089. : createLocal(input).valueOf()) - res.valueOf();
  33090. // Use low-level api, because this fn is low-level api.
  33091. res._d.setTime(res._d.valueOf() + diff);
  33092. hooks.updateOffset(res, false);
  33093. return res;
  33094. } else {
  33095. return createLocal(input).local();
  33096. }
  33097. }
  33098. function getDateOffset(m) {
  33099. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  33100. // https://github.com/moment/moment/pull/1871
  33101. return -Math.round(m._d.getTimezoneOffset());
  33102. }
  33103. // HOOKS
  33104. // This function will be called whenever a moment is mutated.
  33105. // It is intended to keep the offset in sync with the timezone.
  33106. hooks.updateOffset = function () {};
  33107. // MOMENTS
  33108. // keepLocalTime = true means only change the timezone, without
  33109. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  33110. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  33111. // +0200, so we adjust the time as needed, to be valid.
  33112. //
  33113. // Keeping the time actually adds/subtracts (one hour)
  33114. // from the actual represented time. That is why we call updateOffset
  33115. // a second time. In case it wants us to change the offset again
  33116. // _changeInProgress == true case, then we have to adjust, because
  33117. // there is no such time in the given timezone.
  33118. function getSetOffset(input, keepLocalTime, keepMinutes) {
  33119. var offset = this._offset || 0,
  33120. localAdjust;
  33121. if (!this.isValid()) {
  33122. return input != null ? this : NaN;
  33123. }
  33124. if (input != null) {
  33125. if (typeof input === 'string') {
  33126. input = offsetFromString(matchShortOffset, input);
  33127. if (input === null) {
  33128. return this;
  33129. }
  33130. } else if (Math.abs(input) < 16 && !keepMinutes) {
  33131. input = input * 60;
  33132. }
  33133. if (!this._isUTC && keepLocalTime) {
  33134. localAdjust = getDateOffset(this);
  33135. }
  33136. this._offset = input;
  33137. this._isUTC = true;
  33138. if (localAdjust != null) {
  33139. this.add(localAdjust, 'm');
  33140. }
  33141. if (offset !== input) {
  33142. if (!keepLocalTime || this._changeInProgress) {
  33143. addSubtract(
  33144. this,
  33145. createDuration(input - offset, 'm'),
  33146. 1,
  33147. false
  33148. );
  33149. } else if (!this._changeInProgress) {
  33150. this._changeInProgress = true;
  33151. hooks.updateOffset(this, true);
  33152. this._changeInProgress = null;
  33153. }
  33154. }
  33155. return this;
  33156. } else {
  33157. return this._isUTC ? offset : getDateOffset(this);
  33158. }
  33159. }
  33160. function getSetZone(input, keepLocalTime) {
  33161. if (input != null) {
  33162. if (typeof input !== 'string') {
  33163. input = -input;
  33164. }
  33165. this.utcOffset(input, keepLocalTime);
  33166. return this;
  33167. } else {
  33168. return -this.utcOffset();
  33169. }
  33170. }
  33171. function setOffsetToUTC(keepLocalTime) {
  33172. return this.utcOffset(0, keepLocalTime);
  33173. }
  33174. function setOffsetToLocal(keepLocalTime) {
  33175. if (this._isUTC) {
  33176. this.utcOffset(0, keepLocalTime);
  33177. this._isUTC = false;
  33178. if (keepLocalTime) {
  33179. this.subtract(getDateOffset(this), 'm');
  33180. }
  33181. }
  33182. return this;
  33183. }
  33184. function setOffsetToParsedOffset() {
  33185. if (this._tzm != null) {
  33186. this.utcOffset(this._tzm, false, true);
  33187. } else if (typeof this._i === 'string') {
  33188. var tZone = offsetFromString(matchOffset, this._i);
  33189. if (tZone != null) {
  33190. this.utcOffset(tZone);
  33191. } else {
  33192. this.utcOffset(0, true);
  33193. }
  33194. }
  33195. return this;
  33196. }
  33197. function hasAlignedHourOffset(input) {
  33198. if (!this.isValid()) {
  33199. return false;
  33200. }
  33201. input = input ? createLocal(input).utcOffset() : 0;
  33202. return (this.utcOffset() - input) % 60 === 0;
  33203. }
  33204. function isDaylightSavingTime() {
  33205. return (
  33206. this.utcOffset() > this.clone().month(0).utcOffset() ||
  33207. this.utcOffset() > this.clone().month(5).utcOffset()
  33208. );
  33209. }
  33210. function isDaylightSavingTimeShifted() {
  33211. if (!isUndefined(this._isDSTShifted)) {
  33212. return this._isDSTShifted;
  33213. }
  33214. var c = {},
  33215. other;
  33216. copyConfig(c, this);
  33217. c = prepareConfig(c);
  33218. if (c._a) {
  33219. other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  33220. this._isDSTShifted =
  33221. this.isValid() && compareArrays(c._a, other.toArray()) > 0;
  33222. } else {
  33223. this._isDSTShifted = false;
  33224. }
  33225. return this._isDSTShifted;
  33226. }
  33227. function isLocal() {
  33228. return this.isValid() ? !this._isUTC : false;
  33229. }
  33230. function isUtcOffset() {
  33231. return this.isValid() ? this._isUTC : false;
  33232. }
  33233. function isUtc() {
  33234. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  33235. }
  33236. // ASP.NET json date format regex
  33237. var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
  33238. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  33239. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  33240. // and further modified to allow for strings containing both week and day
  33241. isoRegex =
  33242. /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  33243. function createDuration(input, key) {
  33244. var duration = input,
  33245. // matching against regexp is expensive, do it on demand
  33246. match = null,
  33247. sign,
  33248. ret,
  33249. diffRes;
  33250. if (isDuration(input)) {
  33251. duration = {
  33252. ms: input._milliseconds,
  33253. d: input._days,
  33254. M: input._months,
  33255. };
  33256. } else if (isNumber(input) || !isNaN(+input)) {
  33257. duration = {};
  33258. if (key) {
  33259. duration[key] = +input;
  33260. } else {
  33261. duration.milliseconds = +input;
  33262. }
  33263. } else if ((match = aspNetRegex.exec(input))) {
  33264. sign = match[1] === '-' ? -1 : 1;
  33265. duration = {
  33266. y: 0,
  33267. d: toInt(match[DATE]) * sign,
  33268. h: toInt(match[HOUR]) * sign,
  33269. m: toInt(match[MINUTE]) * sign,
  33270. s: toInt(match[SECOND]) * sign,
  33271. ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
  33272. };
  33273. } else if ((match = isoRegex.exec(input))) {
  33274. sign = match[1] === '-' ? -1 : 1;
  33275. duration = {
  33276. y: parseIso(match[2], sign),
  33277. M: parseIso(match[3], sign),
  33278. w: parseIso(match[4], sign),
  33279. d: parseIso(match[5], sign),
  33280. h: parseIso(match[6], sign),
  33281. m: parseIso(match[7], sign),
  33282. s: parseIso(match[8], sign),
  33283. };
  33284. } else if (duration == null) {
  33285. // checks for null or undefined
  33286. duration = {};
  33287. } else if (
  33288. typeof duration === 'object' &&
  33289. ('from' in duration || 'to' in duration)
  33290. ) {
  33291. diffRes = momentsDifference(
  33292. createLocal(duration.from),
  33293. createLocal(duration.to)
  33294. );
  33295. duration = {};
  33296. duration.ms = diffRes.milliseconds;
  33297. duration.M = diffRes.months;
  33298. }
  33299. ret = new Duration(duration);
  33300. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  33301. ret._locale = input._locale;
  33302. }
  33303. if (isDuration(input) && hasOwnProp(input, '_isValid')) {
  33304. ret._isValid = input._isValid;
  33305. }
  33306. return ret;
  33307. }
  33308. createDuration.fn = Duration.prototype;
  33309. createDuration.invalid = createInvalid$1;
  33310. function parseIso(inp, sign) {
  33311. // We'd normally use ~~inp for this, but unfortunately it also
  33312. // converts floats to ints.
  33313. // inp may be undefined, so careful calling replace on it.
  33314. var res = inp && parseFloat(inp.replace(',', '.'));
  33315. // apply sign while we're at it
  33316. return (isNaN(res) ? 0 : res) * sign;
  33317. }
  33318. function positiveMomentsDifference(base, other) {
  33319. var res = {};
  33320. res.months =
  33321. other.month() - base.month() + (other.year() - base.year()) * 12;
  33322. if (base.clone().add(res.months, 'M').isAfter(other)) {
  33323. --res.months;
  33324. }
  33325. res.milliseconds = +other - +base.clone().add(res.months, 'M');
  33326. return res;
  33327. }
  33328. function momentsDifference(base, other) {
  33329. var res;
  33330. if (!(base.isValid() && other.isValid())) {
  33331. return { milliseconds: 0, months: 0 };
  33332. }
  33333. other = cloneWithOffset(other, base);
  33334. if (base.isBefore(other)) {
  33335. res = positiveMomentsDifference(base, other);
  33336. } else {
  33337. res = positiveMomentsDifference(other, base);
  33338. res.milliseconds = -res.milliseconds;
  33339. res.months = -res.months;
  33340. }
  33341. return res;
  33342. }
  33343. // TODO: remove 'name' arg after deprecation is removed
  33344. function createAdder(direction, name) {
  33345. return function (val, period) {
  33346. var dur, tmp;
  33347. //invert the arguments, but complain about it
  33348. if (period !== null && !isNaN(+period)) {
  33349. deprecateSimple(
  33350. name,
  33351. 'moment().' +
  33352. name +
  33353. '(period, number) is deprecated. Please use moment().' +
  33354. name +
  33355. '(number, period). ' +
  33356. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
  33357. );
  33358. tmp = val;
  33359. val = period;
  33360. period = tmp;
  33361. }
  33362. dur = createDuration(val, period);
  33363. addSubtract(this, dur, direction);
  33364. return this;
  33365. };
  33366. }
  33367. function addSubtract(mom, duration, isAdding, updateOffset) {
  33368. var milliseconds = duration._milliseconds,
  33369. days = absRound(duration._days),
  33370. months = absRound(duration._months);
  33371. if (!mom.isValid()) {
  33372. // No op
  33373. return;
  33374. }
  33375. updateOffset = updateOffset == null ? true : updateOffset;
  33376. if (months) {
  33377. setMonth(mom, get(mom, 'Month') + months * isAdding);
  33378. }
  33379. if (days) {
  33380. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  33381. }
  33382. if (milliseconds) {
  33383. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  33384. }
  33385. if (updateOffset) {
  33386. hooks.updateOffset(mom, days || months);
  33387. }
  33388. }
  33389. var add = createAdder(1, 'add'),
  33390. subtract = createAdder(-1, 'subtract');
  33391. function isString(input) {
  33392. return typeof input === 'string' || input instanceof String;
  33393. }
  33394. // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
  33395. function isMomentInput(input) {
  33396. return (
  33397. isMoment(input) ||
  33398. isDate(input) ||
  33399. isString(input) ||
  33400. isNumber(input) ||
  33401. isNumberOrStringArray(input) ||
  33402. isMomentInputObject(input) ||
  33403. input === null ||
  33404. input === undefined
  33405. );
  33406. }
  33407. function isMomentInputObject(input) {
  33408. var objectTest = isObject(input) && !isObjectEmpty(input),
  33409. propertyTest = false,
  33410. properties = [
  33411. 'years',
  33412. 'year',
  33413. 'y',
  33414. 'months',
  33415. 'month',
  33416. 'M',
  33417. 'days',
  33418. 'day',
  33419. 'd',
  33420. 'dates',
  33421. 'date',
  33422. 'D',
  33423. 'hours',
  33424. 'hour',
  33425. 'h',
  33426. 'minutes',
  33427. 'minute',
  33428. 'm',
  33429. 'seconds',
  33430. 'second',
  33431. 's',
  33432. 'milliseconds',
  33433. 'millisecond',
  33434. 'ms',
  33435. ],
  33436. i,
  33437. property,
  33438. propertyLen = properties.length;
  33439. for (i = 0; i < propertyLen; i += 1) {
  33440. property = properties[i];
  33441. propertyTest = propertyTest || hasOwnProp(input, property);
  33442. }
  33443. return objectTest && propertyTest;
  33444. }
  33445. function isNumberOrStringArray(input) {
  33446. var arrayTest = isArray(input),
  33447. dataTypeTest = false;
  33448. if (arrayTest) {
  33449. dataTypeTest =
  33450. input.filter(function (item) {
  33451. return !isNumber(item) && isString(input);
  33452. }).length === 0;
  33453. }
  33454. return arrayTest && dataTypeTest;
  33455. }
  33456. function isCalendarSpec(input) {
  33457. var objectTest = isObject(input) && !isObjectEmpty(input),
  33458. propertyTest = false,
  33459. properties = [
  33460. 'sameDay',
  33461. 'nextDay',
  33462. 'lastDay',
  33463. 'nextWeek',
  33464. 'lastWeek',
  33465. 'sameElse',
  33466. ],
  33467. i,
  33468. property;
  33469. for (i = 0; i < properties.length; i += 1) {
  33470. property = properties[i];
  33471. propertyTest = propertyTest || hasOwnProp(input, property);
  33472. }
  33473. return objectTest && propertyTest;
  33474. }
  33475. function getCalendarFormat(myMoment, now) {
  33476. var diff = myMoment.diff(now, 'days', true);
  33477. return diff < -6
  33478. ? 'sameElse'
  33479. : diff < -1
  33480. ? 'lastWeek'
  33481. : diff < 0
  33482. ? 'lastDay'
  33483. : diff < 1
  33484. ? 'sameDay'
  33485. : diff < 2
  33486. ? 'nextDay'
  33487. : diff < 7
  33488. ? 'nextWeek'
  33489. : 'sameElse';
  33490. }
  33491. function calendar$1(time, formats) {
  33492. // Support for single parameter, formats only overload to the calendar function
  33493. if (arguments.length === 1) {
  33494. if (!arguments[0]) {
  33495. time = undefined;
  33496. formats = undefined;
  33497. } else if (isMomentInput(arguments[0])) {
  33498. time = arguments[0];
  33499. formats = undefined;
  33500. } else if (isCalendarSpec(arguments[0])) {
  33501. formats = arguments[0];
  33502. time = undefined;
  33503. }
  33504. }
  33505. // We want to compare the start of today, vs this.
  33506. // Getting start-of-today depends on whether we're local/utc/offset or not.
  33507. var now = time || createLocal(),
  33508. sod = cloneWithOffset(now, this).startOf('day'),
  33509. format = hooks.calendarFormat(this, sod) || 'sameElse',
  33510. output =
  33511. formats &&
  33512. (isFunction(formats[format])
  33513. ? formats[format].call(this, now)
  33514. : formats[format]);
  33515. return this.format(
  33516. output || this.localeData().calendar(format, this, createLocal(now))
  33517. );
  33518. }
  33519. function clone() {
  33520. return new Moment(this);
  33521. }
  33522. function isAfter(input, units) {
  33523. var localInput = isMoment(input) ? input : createLocal(input);
  33524. if (!(this.isValid() && localInput.isValid())) {
  33525. return false;
  33526. }
  33527. units = normalizeUnits(units) || 'millisecond';
  33528. if (units === 'millisecond') {
  33529. return this.valueOf() > localInput.valueOf();
  33530. } else {
  33531. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  33532. }
  33533. }
  33534. function isBefore(input, units) {
  33535. var localInput = isMoment(input) ? input : createLocal(input);
  33536. if (!(this.isValid() && localInput.isValid())) {
  33537. return false;
  33538. }
  33539. units = normalizeUnits(units) || 'millisecond';
  33540. if (units === 'millisecond') {
  33541. return this.valueOf() < localInput.valueOf();
  33542. } else {
  33543. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  33544. }
  33545. }
  33546. function isBetween(from, to, units, inclusivity) {
  33547. var localFrom = isMoment(from) ? from : createLocal(from),
  33548. localTo = isMoment(to) ? to : createLocal(to);
  33549. if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
  33550. return false;
  33551. }
  33552. inclusivity = inclusivity || '()';
  33553. return (
  33554. (inclusivity[0] === '('
  33555. ? this.isAfter(localFrom, units)
  33556. : !this.isBefore(localFrom, units)) &&
  33557. (inclusivity[1] === ')'
  33558. ? this.isBefore(localTo, units)
  33559. : !this.isAfter(localTo, units))
  33560. );
  33561. }
  33562. function isSame(input, units) {
  33563. var localInput = isMoment(input) ? input : createLocal(input),
  33564. inputMs;
  33565. if (!(this.isValid() && localInput.isValid())) {
  33566. return false;
  33567. }
  33568. units = normalizeUnits(units) || 'millisecond';
  33569. if (units === 'millisecond') {
  33570. return this.valueOf() === localInput.valueOf();
  33571. } else {
  33572. inputMs = localInput.valueOf();
  33573. return (
  33574. this.clone().startOf(units).valueOf() <= inputMs &&
  33575. inputMs <= this.clone().endOf(units).valueOf()
  33576. );
  33577. }
  33578. }
  33579. function isSameOrAfter(input, units) {
  33580. return this.isSame(input, units) || this.isAfter(input, units);
  33581. }
  33582. function isSameOrBefore(input, units) {
  33583. return this.isSame(input, units) || this.isBefore(input, units);
  33584. }
  33585. function diff(input, units, asFloat) {
  33586. var that, zoneDelta, output;
  33587. if (!this.isValid()) {
  33588. return NaN;
  33589. }
  33590. that = cloneWithOffset(input, this);
  33591. if (!that.isValid()) {
  33592. return NaN;
  33593. }
  33594. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  33595. units = normalizeUnits(units);
  33596. switch (units) {
  33597. case 'year':
  33598. output = monthDiff(this, that) / 12;
  33599. break;
  33600. case 'month':
  33601. output = monthDiff(this, that);
  33602. break;
  33603. case 'quarter':
  33604. output = monthDiff(this, that) / 3;
  33605. break;
  33606. case 'second':
  33607. output = (this - that) / 1e3;
  33608. break; // 1000
  33609. case 'minute':
  33610. output = (this - that) / 6e4;
  33611. break; // 1000 * 60
  33612. case 'hour':
  33613. output = (this - that) / 36e5;
  33614. break; // 1000 * 60 * 60
  33615. case 'day':
  33616. output = (this - that - zoneDelta) / 864e5;
  33617. break; // 1000 * 60 * 60 * 24, negate dst
  33618. case 'week':
  33619. output = (this - that - zoneDelta) / 6048e5;
  33620. break; // 1000 * 60 * 60 * 24 * 7, negate dst
  33621. default:
  33622. output = this - that;
  33623. }
  33624. return asFloat ? output : absFloor(output);
  33625. }
  33626. function monthDiff(a, b) {
  33627. if (a.date() < b.date()) {
  33628. // end-of-month calculations work correct when the start month has more
  33629. // days than the end month.
  33630. return -monthDiff(b, a);
  33631. }
  33632. // difference in months
  33633. var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
  33634. // b is in (anchor - 1 month, anchor + 1 month)
  33635. anchor = a.clone().add(wholeMonthDiff, 'months'),
  33636. anchor2,
  33637. adjust;
  33638. if (b - anchor < 0) {
  33639. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  33640. // linear across the month
  33641. adjust = (b - anchor) / (anchor - anchor2);
  33642. } else {
  33643. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  33644. // linear across the month
  33645. adjust = (b - anchor) / (anchor2 - anchor);
  33646. }
  33647. //check for negative zero, return zero if negative zero
  33648. return -(wholeMonthDiff + adjust) || 0;
  33649. }
  33650. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  33651. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  33652. function toString() {
  33653. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  33654. }
  33655. function toISOString(keepOffset) {
  33656. if (!this.isValid()) {
  33657. return null;
  33658. }
  33659. var utc = keepOffset !== true,
  33660. m = utc ? this.clone().utc() : this;
  33661. if (m.year() < 0 || m.year() > 9999) {
  33662. return formatMoment(
  33663. m,
  33664. utc
  33665. ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
  33666. : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
  33667. );
  33668. }
  33669. if (isFunction(Date.prototype.toISOString)) {
  33670. // native implementation is ~50x faster, use it when we can
  33671. if (utc) {
  33672. return this.toDate().toISOString();
  33673. } else {
  33674. return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
  33675. .toISOString()
  33676. .replace('Z', formatMoment(m, 'Z'));
  33677. }
  33678. }
  33679. return formatMoment(
  33680. m,
  33681. utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
  33682. );
  33683. }
  33684. /**
  33685. * Return a human readable representation of a moment that can
  33686. * also be evaluated to get a new moment which is the same
  33687. *
  33688. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  33689. */
  33690. function inspect() {
  33691. if (!this.isValid()) {
  33692. return 'moment.invalid(/* ' + this._i + ' */)';
  33693. }
  33694. var func = 'moment',
  33695. zone = '',
  33696. prefix,
  33697. year,
  33698. datetime,
  33699. suffix;
  33700. if (!this.isLocal()) {
  33701. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  33702. zone = 'Z';
  33703. }
  33704. prefix = '[' + func + '("]';
  33705. year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
  33706. datetime = '-MM-DD[T]HH:mm:ss.SSS';
  33707. suffix = zone + '[")]';
  33708. return this.format(prefix + year + datetime + suffix);
  33709. }
  33710. function format(inputString) {
  33711. if (!inputString) {
  33712. inputString = this.isUtc()
  33713. ? hooks.defaultFormatUtc
  33714. : hooks.defaultFormat;
  33715. }
  33716. var output = formatMoment(this, inputString);
  33717. return this.localeData().postformat(output);
  33718. }
  33719. function from(time, withoutSuffix) {
  33720. if (
  33721. this.isValid() &&
  33722. ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
  33723. ) {
  33724. return createDuration({ to: this, from: time })
  33725. .locale(this.locale())
  33726. .humanize(!withoutSuffix);
  33727. } else {
  33728. return this.localeData().invalidDate();
  33729. }
  33730. }
  33731. function fromNow(withoutSuffix) {
  33732. return this.from(createLocal(), withoutSuffix);
  33733. }
  33734. function to(time, withoutSuffix) {
  33735. if (
  33736. this.isValid() &&
  33737. ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
  33738. ) {
  33739. return createDuration({ from: this, to: time })
  33740. .locale(this.locale())
  33741. .humanize(!withoutSuffix);
  33742. } else {
  33743. return this.localeData().invalidDate();
  33744. }
  33745. }
  33746. function toNow(withoutSuffix) {
  33747. return this.to(createLocal(), withoutSuffix);
  33748. }
  33749. // If passed a locale key, it will set the locale for this
  33750. // instance. Otherwise, it will return the locale configuration
  33751. // variables for this instance.
  33752. function locale(key) {
  33753. var newLocaleData;
  33754. if (key === undefined) {
  33755. return this._locale._abbr;
  33756. } else {
  33757. newLocaleData = getLocale(key);
  33758. if (newLocaleData != null) {
  33759. this._locale = newLocaleData;
  33760. }
  33761. return this;
  33762. }
  33763. }
  33764. var lang = deprecate(
  33765. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  33766. function (key) {
  33767. if (key === undefined) {
  33768. return this.localeData();
  33769. } else {
  33770. return this.locale(key);
  33771. }
  33772. }
  33773. );
  33774. function localeData() {
  33775. return this._locale;
  33776. }
  33777. var MS_PER_SECOND = 1000,
  33778. MS_PER_MINUTE = 60 * MS_PER_SECOND,
  33779. MS_PER_HOUR = 60 * MS_PER_MINUTE,
  33780. MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
  33781. // actual modulo - handles negative numbers (for dates before 1970):
  33782. function mod$1(dividend, divisor) {
  33783. return ((dividend % divisor) + divisor) % divisor;
  33784. }
  33785. function localStartOfDate(y, m, d) {
  33786. // the date constructor remaps years 0-99 to 1900-1999
  33787. if (y < 100 && y >= 0) {
  33788. // preserve leap years using a full 400 year cycle, then reset
  33789. return new Date(y + 400, m, d) - MS_PER_400_YEARS;
  33790. } else {
  33791. return new Date(y, m, d).valueOf();
  33792. }
  33793. }
  33794. function utcStartOfDate(y, m, d) {
  33795. // Date.UTC remaps years 0-99 to 1900-1999
  33796. if (y < 100 && y >= 0) {
  33797. // preserve leap years using a full 400 year cycle, then reset
  33798. return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
  33799. } else {
  33800. return Date.UTC(y, m, d);
  33801. }
  33802. }
  33803. function startOf(units) {
  33804. var time, startOfDate;
  33805. units = normalizeUnits(units);
  33806. if (units === undefined || units === 'millisecond' || !this.isValid()) {
  33807. return this;
  33808. }
  33809. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  33810. switch (units) {
  33811. case 'year':
  33812. time = startOfDate(this.year(), 0, 1);
  33813. break;
  33814. case 'quarter':
  33815. time = startOfDate(
  33816. this.year(),
  33817. this.month() - (this.month() % 3),
  33818. 1
  33819. );
  33820. break;
  33821. case 'month':
  33822. time = startOfDate(this.year(), this.month(), 1);
  33823. break;
  33824. case 'week':
  33825. time = startOfDate(
  33826. this.year(),
  33827. this.month(),
  33828. this.date() - this.weekday()
  33829. );
  33830. break;
  33831. case 'isoWeek':
  33832. time = startOfDate(
  33833. this.year(),
  33834. this.month(),
  33835. this.date() - (this.isoWeekday() - 1)
  33836. );
  33837. break;
  33838. case 'day':
  33839. case 'date':
  33840. time = startOfDate(this.year(), this.month(), this.date());
  33841. break;
  33842. case 'hour':
  33843. time = this._d.valueOf();
  33844. time -= mod$1(
  33845. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  33846. MS_PER_HOUR
  33847. );
  33848. break;
  33849. case 'minute':
  33850. time = this._d.valueOf();
  33851. time -= mod$1(time, MS_PER_MINUTE);
  33852. break;
  33853. case 'second':
  33854. time = this._d.valueOf();
  33855. time -= mod$1(time, MS_PER_SECOND);
  33856. break;
  33857. }
  33858. this._d.setTime(time);
  33859. hooks.updateOffset(this, true);
  33860. return this;
  33861. }
  33862. function endOf(units) {
  33863. var time, startOfDate;
  33864. units = normalizeUnits(units);
  33865. if (units === undefined || units === 'millisecond' || !this.isValid()) {
  33866. return this;
  33867. }
  33868. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  33869. switch (units) {
  33870. case 'year':
  33871. time = startOfDate(this.year() + 1, 0, 1) - 1;
  33872. break;
  33873. case 'quarter':
  33874. time =
  33875. startOfDate(
  33876. this.year(),
  33877. this.month() - (this.month() % 3) + 3,
  33878. 1
  33879. ) - 1;
  33880. break;
  33881. case 'month':
  33882. time = startOfDate(this.year(), this.month() + 1, 1) - 1;
  33883. break;
  33884. case 'week':
  33885. time =
  33886. startOfDate(
  33887. this.year(),
  33888. this.month(),
  33889. this.date() - this.weekday() + 7
  33890. ) - 1;
  33891. break;
  33892. case 'isoWeek':
  33893. time =
  33894. startOfDate(
  33895. this.year(),
  33896. this.month(),
  33897. this.date() - (this.isoWeekday() - 1) + 7
  33898. ) - 1;
  33899. break;
  33900. case 'day':
  33901. case 'date':
  33902. time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
  33903. break;
  33904. case 'hour':
  33905. time = this._d.valueOf();
  33906. time +=
  33907. MS_PER_HOUR -
  33908. mod$1(
  33909. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  33910. MS_PER_HOUR
  33911. ) -
  33912. 1;
  33913. break;
  33914. case 'minute':
  33915. time = this._d.valueOf();
  33916. time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
  33917. break;
  33918. case 'second':
  33919. time = this._d.valueOf();
  33920. time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
  33921. break;
  33922. }
  33923. this._d.setTime(time);
  33924. hooks.updateOffset(this, true);
  33925. return this;
  33926. }
  33927. function valueOf() {
  33928. return this._d.valueOf() - (this._offset || 0) * 60000;
  33929. }
  33930. function unix() {
  33931. return Math.floor(this.valueOf() / 1000);
  33932. }
  33933. function toDate() {
  33934. return new Date(this.valueOf());
  33935. }
  33936. function toArray() {
  33937. var m = this;
  33938. return [
  33939. m.year(),
  33940. m.month(),
  33941. m.date(),
  33942. m.hour(),
  33943. m.minute(),
  33944. m.second(),
  33945. m.millisecond(),
  33946. ];
  33947. }
  33948. function toObject() {
  33949. var m = this;
  33950. return {
  33951. years: m.year(),
  33952. months: m.month(),
  33953. date: m.date(),
  33954. hours: m.hours(),
  33955. minutes: m.minutes(),
  33956. seconds: m.seconds(),
  33957. milliseconds: m.milliseconds(),
  33958. };
  33959. }
  33960. function toJSON() {
  33961. // new Date(NaN).toJSON() === null
  33962. return this.isValid() ? this.toISOString() : null;
  33963. }
  33964. function isValid$2() {
  33965. return isValid(this);
  33966. }
  33967. function parsingFlags() {
  33968. return extend({}, getParsingFlags(this));
  33969. }
  33970. function invalidAt() {
  33971. return getParsingFlags(this).overflow;
  33972. }
  33973. function creationData() {
  33974. return {
  33975. input: this._i,
  33976. format: this._f,
  33977. locale: this._locale,
  33978. isUTC: this._isUTC,
  33979. strict: this._strict,
  33980. };
  33981. }
  33982. addFormatToken('N', 0, 0, 'eraAbbr');
  33983. addFormatToken('NN', 0, 0, 'eraAbbr');
  33984. addFormatToken('NNN', 0, 0, 'eraAbbr');
  33985. addFormatToken('NNNN', 0, 0, 'eraName');
  33986. addFormatToken('NNNNN', 0, 0, 'eraNarrow');
  33987. addFormatToken('y', ['y', 1], 'yo', 'eraYear');
  33988. addFormatToken('y', ['yy', 2], 0, 'eraYear');
  33989. addFormatToken('y', ['yyy', 3], 0, 'eraYear');
  33990. addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
  33991. addRegexToken('N', matchEraAbbr);
  33992. addRegexToken('NN', matchEraAbbr);
  33993. addRegexToken('NNN', matchEraAbbr);
  33994. addRegexToken('NNNN', matchEraName);
  33995. addRegexToken('NNNNN', matchEraNarrow);
  33996. addParseToken(
  33997. ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
  33998. function (input, array, config, token) {
  33999. var era = config._locale.erasParse(input, token, config._strict);
  34000. if (era) {
  34001. getParsingFlags(config).era = era;
  34002. } else {
  34003. getParsingFlags(config).invalidEra = input;
  34004. }
  34005. }
  34006. );
  34007. addRegexToken('y', matchUnsigned);
  34008. addRegexToken('yy', matchUnsigned);
  34009. addRegexToken('yyy', matchUnsigned);
  34010. addRegexToken('yyyy', matchUnsigned);
  34011. addRegexToken('yo', matchEraYearOrdinal);
  34012. addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
  34013. addParseToken(['yo'], function (input, array, config, token) {
  34014. var match;
  34015. if (config._locale._eraYearOrdinalRegex) {
  34016. match = input.match(config._locale._eraYearOrdinalRegex);
  34017. }
  34018. if (config._locale.eraYearOrdinalParse) {
  34019. array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
  34020. } else {
  34021. array[YEAR] = parseInt(input, 10);
  34022. }
  34023. });
  34024. function localeEras(m, format) {
  34025. var i,
  34026. l,
  34027. date,
  34028. eras = this._eras || getLocale('en')._eras;
  34029. for (i = 0, l = eras.length; i < l; ++i) {
  34030. switch (typeof eras[i].since) {
  34031. case 'string':
  34032. // truncate time
  34033. date = hooks(eras[i].since).startOf('day');
  34034. eras[i].since = date.valueOf();
  34035. break;
  34036. }
  34037. switch (typeof eras[i].until) {
  34038. case 'undefined':
  34039. eras[i].until = +Infinity;
  34040. break;
  34041. case 'string':
  34042. // truncate time
  34043. date = hooks(eras[i].until).startOf('day').valueOf();
  34044. eras[i].until = date.valueOf();
  34045. break;
  34046. }
  34047. }
  34048. return eras;
  34049. }
  34050. function localeErasParse(eraName, format, strict) {
  34051. var i,
  34052. l,
  34053. eras = this.eras(),
  34054. name,
  34055. abbr,
  34056. narrow;
  34057. eraName = eraName.toUpperCase();
  34058. for (i = 0, l = eras.length; i < l; ++i) {
  34059. name = eras[i].name.toUpperCase();
  34060. abbr = eras[i].abbr.toUpperCase();
  34061. narrow = eras[i].narrow.toUpperCase();
  34062. if (strict) {
  34063. switch (format) {
  34064. case 'N':
  34065. case 'NN':
  34066. case 'NNN':
  34067. if (abbr === eraName) {
  34068. return eras[i];
  34069. }
  34070. break;
  34071. case 'NNNN':
  34072. if (name === eraName) {
  34073. return eras[i];
  34074. }
  34075. break;
  34076. case 'NNNNN':
  34077. if (narrow === eraName) {
  34078. return eras[i];
  34079. }
  34080. break;
  34081. }
  34082. } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
  34083. return eras[i];
  34084. }
  34085. }
  34086. }
  34087. function localeErasConvertYear(era, year) {
  34088. var dir = era.since <= era.until ? +1 : -1;
  34089. if (year === undefined) {
  34090. return hooks(era.since).year();
  34091. } else {
  34092. return hooks(era.since).year() + (year - era.offset) * dir;
  34093. }
  34094. }
  34095. function getEraName() {
  34096. var i,
  34097. l,
  34098. val,
  34099. eras = this.localeData().eras();
  34100. for (i = 0, l = eras.length; i < l; ++i) {
  34101. // truncate time
  34102. val = this.clone().startOf('day').valueOf();
  34103. if (eras[i].since <= val && val <= eras[i].until) {
  34104. return eras[i].name;
  34105. }
  34106. if (eras[i].until <= val && val <= eras[i].since) {
  34107. return eras[i].name;
  34108. }
  34109. }
  34110. return '';
  34111. }
  34112. function getEraNarrow() {
  34113. var i,
  34114. l,
  34115. val,
  34116. eras = this.localeData().eras();
  34117. for (i = 0, l = eras.length; i < l; ++i) {
  34118. // truncate time
  34119. val = this.clone().startOf('day').valueOf();
  34120. if (eras[i].since <= val && val <= eras[i].until) {
  34121. return eras[i].narrow;
  34122. }
  34123. if (eras[i].until <= val && val <= eras[i].since) {
  34124. return eras[i].narrow;
  34125. }
  34126. }
  34127. return '';
  34128. }
  34129. function getEraAbbr() {
  34130. var i,
  34131. l,
  34132. val,
  34133. eras = this.localeData().eras();
  34134. for (i = 0, l = eras.length; i < l; ++i) {
  34135. // truncate time
  34136. val = this.clone().startOf('day').valueOf();
  34137. if (eras[i].since <= val && val <= eras[i].until) {
  34138. return eras[i].abbr;
  34139. }
  34140. if (eras[i].until <= val && val <= eras[i].since) {
  34141. return eras[i].abbr;
  34142. }
  34143. }
  34144. return '';
  34145. }
  34146. function getEraYear() {
  34147. var i,
  34148. l,
  34149. dir,
  34150. val,
  34151. eras = this.localeData().eras();
  34152. for (i = 0, l = eras.length; i < l; ++i) {
  34153. dir = eras[i].since <= eras[i].until ? +1 : -1;
  34154. // truncate time
  34155. val = this.clone().startOf('day').valueOf();
  34156. if (
  34157. (eras[i].since <= val && val <= eras[i].until) ||
  34158. (eras[i].until <= val && val <= eras[i].since)
  34159. ) {
  34160. return (
  34161. (this.year() - hooks(eras[i].since).year()) * dir +
  34162. eras[i].offset
  34163. );
  34164. }
  34165. }
  34166. return this.year();
  34167. }
  34168. function erasNameRegex(isStrict) {
  34169. if (!hasOwnProp(this, '_erasNameRegex')) {
  34170. computeErasParse.call(this);
  34171. }
  34172. return isStrict ? this._erasNameRegex : this._erasRegex;
  34173. }
  34174. function erasAbbrRegex(isStrict) {
  34175. if (!hasOwnProp(this, '_erasAbbrRegex')) {
  34176. computeErasParse.call(this);
  34177. }
  34178. return isStrict ? this._erasAbbrRegex : this._erasRegex;
  34179. }
  34180. function erasNarrowRegex(isStrict) {
  34181. if (!hasOwnProp(this, '_erasNarrowRegex')) {
  34182. computeErasParse.call(this);
  34183. }
  34184. return isStrict ? this._erasNarrowRegex : this._erasRegex;
  34185. }
  34186. function matchEraAbbr(isStrict, locale) {
  34187. return locale.erasAbbrRegex(isStrict);
  34188. }
  34189. function matchEraName(isStrict, locale) {
  34190. return locale.erasNameRegex(isStrict);
  34191. }
  34192. function matchEraNarrow(isStrict, locale) {
  34193. return locale.erasNarrowRegex(isStrict);
  34194. }
  34195. function matchEraYearOrdinal(isStrict, locale) {
  34196. return locale._eraYearOrdinalRegex || matchUnsigned;
  34197. }
  34198. function computeErasParse() {
  34199. var abbrPieces = [],
  34200. namePieces = [],
  34201. narrowPieces = [],
  34202. mixedPieces = [],
  34203. i,
  34204. l,
  34205. eras = this.eras();
  34206. for (i = 0, l = eras.length; i < l; ++i) {
  34207. namePieces.push(regexEscape(eras[i].name));
  34208. abbrPieces.push(regexEscape(eras[i].abbr));
  34209. narrowPieces.push(regexEscape(eras[i].narrow));
  34210. mixedPieces.push(regexEscape(eras[i].name));
  34211. mixedPieces.push(regexEscape(eras[i].abbr));
  34212. mixedPieces.push(regexEscape(eras[i].narrow));
  34213. }
  34214. this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  34215. this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
  34216. this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
  34217. this._erasNarrowRegex = new RegExp(
  34218. '^(' + narrowPieces.join('|') + ')',
  34219. 'i'
  34220. );
  34221. }
  34222. // FORMATTING
  34223. addFormatToken(0, ['gg', 2], 0, function () {
  34224. return this.weekYear() % 100;
  34225. });
  34226. addFormatToken(0, ['GG', 2], 0, function () {
  34227. return this.isoWeekYear() % 100;
  34228. });
  34229. function addWeekYearFormatToken(token, getter) {
  34230. addFormatToken(0, [token, token.length], 0, getter);
  34231. }
  34232. addWeekYearFormatToken('gggg', 'weekYear');
  34233. addWeekYearFormatToken('ggggg', 'weekYear');
  34234. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  34235. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  34236. // ALIASES
  34237. addUnitAlias('weekYear', 'gg');
  34238. addUnitAlias('isoWeekYear', 'GG');
  34239. // PRIORITY
  34240. addUnitPriority('weekYear', 1);
  34241. addUnitPriority('isoWeekYear', 1);
  34242. // PARSING
  34243. addRegexToken('G', matchSigned);
  34244. addRegexToken('g', matchSigned);
  34245. addRegexToken('GG', match1to2, match2);
  34246. addRegexToken('gg', match1to2, match2);
  34247. addRegexToken('GGGG', match1to4, match4);
  34248. addRegexToken('gggg', match1to4, match4);
  34249. addRegexToken('GGGGG', match1to6, match6);
  34250. addRegexToken('ggggg', match1to6, match6);
  34251. addWeekParseToken(
  34252. ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
  34253. function (input, week, config, token) {
  34254. week[token.substr(0, 2)] = toInt(input);
  34255. }
  34256. );
  34257. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  34258. week[token] = hooks.parseTwoDigitYear(input);
  34259. });
  34260. // MOMENTS
  34261. function getSetWeekYear(input) {
  34262. return getSetWeekYearHelper.call(
  34263. this,
  34264. input,
  34265. this.week(),
  34266. this.weekday(),
  34267. this.localeData()._week.dow,
  34268. this.localeData()._week.doy
  34269. );
  34270. }
  34271. function getSetISOWeekYear(input) {
  34272. return getSetWeekYearHelper.call(
  34273. this,
  34274. input,
  34275. this.isoWeek(),
  34276. this.isoWeekday(),
  34277. 1,
  34278. 4
  34279. );
  34280. }
  34281. function getISOWeeksInYear() {
  34282. return weeksInYear(this.year(), 1, 4);
  34283. }
  34284. function getISOWeeksInISOWeekYear() {
  34285. return weeksInYear(this.isoWeekYear(), 1, 4);
  34286. }
  34287. function getWeeksInYear() {
  34288. var weekInfo = this.localeData()._week;
  34289. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  34290. }
  34291. function getWeeksInWeekYear() {
  34292. var weekInfo = this.localeData()._week;
  34293. return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
  34294. }
  34295. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  34296. var weeksTarget;
  34297. if (input == null) {
  34298. return weekOfYear(this, dow, doy).year;
  34299. } else {
  34300. weeksTarget = weeksInYear(input, dow, doy);
  34301. if (week > weeksTarget) {
  34302. week = weeksTarget;
  34303. }
  34304. return setWeekAll.call(this, input, week, weekday, dow, doy);
  34305. }
  34306. }
  34307. function setWeekAll(weekYear, week, weekday, dow, doy) {
  34308. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  34309. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  34310. this.year(date.getUTCFullYear());
  34311. this.month(date.getUTCMonth());
  34312. this.date(date.getUTCDate());
  34313. return this;
  34314. }
  34315. // FORMATTING
  34316. addFormatToken('Q', 0, 'Qo', 'quarter');
  34317. // ALIASES
  34318. addUnitAlias('quarter', 'Q');
  34319. // PRIORITY
  34320. addUnitPriority('quarter', 7);
  34321. // PARSING
  34322. addRegexToken('Q', match1);
  34323. addParseToken('Q', function (input, array) {
  34324. array[MONTH] = (toInt(input) - 1) * 3;
  34325. });
  34326. // MOMENTS
  34327. function getSetQuarter(input) {
  34328. return input == null
  34329. ? Math.ceil((this.month() + 1) / 3)
  34330. : this.month((input - 1) * 3 + (this.month() % 3));
  34331. }
  34332. // FORMATTING
  34333. addFormatToken('D', ['DD', 2], 'Do', 'date');
  34334. // ALIASES
  34335. addUnitAlias('date', 'D');
  34336. // PRIORITY
  34337. addUnitPriority('date', 9);
  34338. // PARSING
  34339. addRegexToken('D', match1to2);
  34340. addRegexToken('DD', match1to2, match2);
  34341. addRegexToken('Do', function (isStrict, locale) {
  34342. // TODO: Remove "ordinalParse" fallback in next major release.
  34343. return isStrict
  34344. ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
  34345. : locale._dayOfMonthOrdinalParseLenient;
  34346. });
  34347. addParseToken(['D', 'DD'], DATE);
  34348. addParseToken('Do', function (input, array) {
  34349. array[DATE] = toInt(input.match(match1to2)[0]);
  34350. });
  34351. // MOMENTS
  34352. var getSetDayOfMonth = makeGetSet('Date', true);
  34353. // FORMATTING
  34354. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  34355. // ALIASES
  34356. addUnitAlias('dayOfYear', 'DDD');
  34357. // PRIORITY
  34358. addUnitPriority('dayOfYear', 4);
  34359. // PARSING
  34360. addRegexToken('DDD', match1to3);
  34361. addRegexToken('DDDD', match3);
  34362. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  34363. config._dayOfYear = toInt(input);
  34364. });
  34365. // HELPERS
  34366. // MOMENTS
  34367. function getSetDayOfYear(input) {
  34368. var dayOfYear =
  34369. Math.round(
  34370. (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
  34371. ) + 1;
  34372. return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
  34373. }
  34374. // FORMATTING
  34375. addFormatToken('m', ['mm', 2], 0, 'minute');
  34376. // ALIASES
  34377. addUnitAlias('minute', 'm');
  34378. // PRIORITY
  34379. addUnitPriority('minute', 14);
  34380. // PARSING
  34381. addRegexToken('m', match1to2);
  34382. addRegexToken('mm', match1to2, match2);
  34383. addParseToken(['m', 'mm'], MINUTE);
  34384. // MOMENTS
  34385. var getSetMinute = makeGetSet('Minutes', false);
  34386. // FORMATTING
  34387. addFormatToken('s', ['ss', 2], 0, 'second');
  34388. // ALIASES
  34389. addUnitAlias('second', 's');
  34390. // PRIORITY
  34391. addUnitPriority('second', 15);
  34392. // PARSING
  34393. addRegexToken('s', match1to2);
  34394. addRegexToken('ss', match1to2, match2);
  34395. addParseToken(['s', 'ss'], SECOND);
  34396. // MOMENTS
  34397. var getSetSecond = makeGetSet('Seconds', false);
  34398. // FORMATTING
  34399. addFormatToken('S', 0, 0, function () {
  34400. return ~~(this.millisecond() / 100);
  34401. });
  34402. addFormatToken(0, ['SS', 2], 0, function () {
  34403. return ~~(this.millisecond() / 10);
  34404. });
  34405. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  34406. addFormatToken(0, ['SSSS', 4], 0, function () {
  34407. return this.millisecond() * 10;
  34408. });
  34409. addFormatToken(0, ['SSSSS', 5], 0, function () {
  34410. return this.millisecond() * 100;
  34411. });
  34412. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  34413. return this.millisecond() * 1000;
  34414. });
  34415. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  34416. return this.millisecond() * 10000;
  34417. });
  34418. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  34419. return this.millisecond() * 100000;
  34420. });
  34421. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  34422. return this.millisecond() * 1000000;
  34423. });
  34424. // ALIASES
  34425. addUnitAlias('millisecond', 'ms');
  34426. // PRIORITY
  34427. addUnitPriority('millisecond', 16);
  34428. // PARSING
  34429. addRegexToken('S', match1to3, match1);
  34430. addRegexToken('SS', match1to3, match2);
  34431. addRegexToken('SSS', match1to3, match3);
  34432. var token, getSetMillisecond;
  34433. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  34434. addRegexToken(token, matchUnsigned);
  34435. }
  34436. function parseMs(input, array) {
  34437. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  34438. }
  34439. for (token = 'S'; token.length <= 9; token += 'S') {
  34440. addParseToken(token, parseMs);
  34441. }
  34442. getSetMillisecond = makeGetSet('Milliseconds', false);
  34443. // FORMATTING
  34444. addFormatToken('z', 0, 0, 'zoneAbbr');
  34445. addFormatToken('zz', 0, 0, 'zoneName');
  34446. // MOMENTS
  34447. function getZoneAbbr() {
  34448. return this._isUTC ? 'UTC' : '';
  34449. }
  34450. function getZoneName() {
  34451. return this._isUTC ? 'Coordinated Universal Time' : '';
  34452. }
  34453. var proto = Moment.prototype;
  34454. proto.add = add;
  34455. proto.calendar = calendar$1;
  34456. proto.clone = clone;
  34457. proto.diff = diff;
  34458. proto.endOf = endOf;
  34459. proto.format = format;
  34460. proto.from = from;
  34461. proto.fromNow = fromNow;
  34462. proto.to = to;
  34463. proto.toNow = toNow;
  34464. proto.get = stringGet;
  34465. proto.invalidAt = invalidAt;
  34466. proto.isAfter = isAfter;
  34467. proto.isBefore = isBefore;
  34468. proto.isBetween = isBetween;
  34469. proto.isSame = isSame;
  34470. proto.isSameOrAfter = isSameOrAfter;
  34471. proto.isSameOrBefore = isSameOrBefore;
  34472. proto.isValid = isValid$2;
  34473. proto.lang = lang;
  34474. proto.locale = locale;
  34475. proto.localeData = localeData;
  34476. proto.max = prototypeMax;
  34477. proto.min = prototypeMin;
  34478. proto.parsingFlags = parsingFlags;
  34479. proto.set = stringSet;
  34480. proto.startOf = startOf;
  34481. proto.subtract = subtract;
  34482. proto.toArray = toArray;
  34483. proto.toObject = toObject;
  34484. proto.toDate = toDate;
  34485. proto.toISOString = toISOString;
  34486. proto.inspect = inspect;
  34487. if (typeof Symbol !== 'undefined' && Symbol.for != null) {
  34488. proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
  34489. return 'Moment<' + this.format() + '>';
  34490. };
  34491. }
  34492. proto.toJSON = toJSON;
  34493. proto.toString = toString;
  34494. proto.unix = unix;
  34495. proto.valueOf = valueOf;
  34496. proto.creationData = creationData;
  34497. proto.eraName = getEraName;
  34498. proto.eraNarrow = getEraNarrow;
  34499. proto.eraAbbr = getEraAbbr;
  34500. proto.eraYear = getEraYear;
  34501. proto.year = getSetYear;
  34502. proto.isLeapYear = getIsLeapYear;
  34503. proto.weekYear = getSetWeekYear;
  34504. proto.isoWeekYear = getSetISOWeekYear;
  34505. proto.quarter = proto.quarters = getSetQuarter;
  34506. proto.month = getSetMonth;
  34507. proto.daysInMonth = getDaysInMonth;
  34508. proto.week = proto.weeks = getSetWeek;
  34509. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  34510. proto.weeksInYear = getWeeksInYear;
  34511. proto.weeksInWeekYear = getWeeksInWeekYear;
  34512. proto.isoWeeksInYear = getISOWeeksInYear;
  34513. proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
  34514. proto.date = getSetDayOfMonth;
  34515. proto.day = proto.days = getSetDayOfWeek;
  34516. proto.weekday = getSetLocaleDayOfWeek;
  34517. proto.isoWeekday = getSetISODayOfWeek;
  34518. proto.dayOfYear = getSetDayOfYear;
  34519. proto.hour = proto.hours = getSetHour;
  34520. proto.minute = proto.minutes = getSetMinute;
  34521. proto.second = proto.seconds = getSetSecond;
  34522. proto.millisecond = proto.milliseconds = getSetMillisecond;
  34523. proto.utcOffset = getSetOffset;
  34524. proto.utc = setOffsetToUTC;
  34525. proto.local = setOffsetToLocal;
  34526. proto.parseZone = setOffsetToParsedOffset;
  34527. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  34528. proto.isDST = isDaylightSavingTime;
  34529. proto.isLocal = isLocal;
  34530. proto.isUtcOffset = isUtcOffset;
  34531. proto.isUtc = isUtc;
  34532. proto.isUTC = isUtc;
  34533. proto.zoneAbbr = getZoneAbbr;
  34534. proto.zoneName = getZoneName;
  34535. proto.dates = deprecate(
  34536. 'dates accessor is deprecated. Use date instead.',
  34537. getSetDayOfMonth
  34538. );
  34539. proto.months = deprecate(
  34540. 'months accessor is deprecated. Use month instead',
  34541. getSetMonth
  34542. );
  34543. proto.years = deprecate(
  34544. 'years accessor is deprecated. Use year instead',
  34545. getSetYear
  34546. );
  34547. proto.zone = deprecate(
  34548. 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
  34549. getSetZone
  34550. );
  34551. proto.isDSTShifted = deprecate(
  34552. 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
  34553. isDaylightSavingTimeShifted
  34554. );
  34555. function createUnix(input) {
  34556. return createLocal(input * 1000);
  34557. }
  34558. function createInZone() {
  34559. return createLocal.apply(null, arguments).parseZone();
  34560. }
  34561. function preParsePostFormat(string) {
  34562. return string;
  34563. }
  34564. var proto$1 = Locale.prototype;
  34565. proto$1.calendar = calendar;
  34566. proto$1.longDateFormat = longDateFormat;
  34567. proto$1.invalidDate = invalidDate;
  34568. proto$1.ordinal = ordinal;
  34569. proto$1.preparse = preParsePostFormat;
  34570. proto$1.postformat = preParsePostFormat;
  34571. proto$1.relativeTime = relativeTime;
  34572. proto$1.pastFuture = pastFuture;
  34573. proto$1.set = set;
  34574. proto$1.eras = localeEras;
  34575. proto$1.erasParse = localeErasParse;
  34576. proto$1.erasConvertYear = localeErasConvertYear;
  34577. proto$1.erasAbbrRegex = erasAbbrRegex;
  34578. proto$1.erasNameRegex = erasNameRegex;
  34579. proto$1.erasNarrowRegex = erasNarrowRegex;
  34580. proto$1.months = localeMonths;
  34581. proto$1.monthsShort = localeMonthsShort;
  34582. proto$1.monthsParse = localeMonthsParse;
  34583. proto$1.monthsRegex = monthsRegex;
  34584. proto$1.monthsShortRegex = monthsShortRegex;
  34585. proto$1.week = localeWeek;
  34586. proto$1.firstDayOfYear = localeFirstDayOfYear;
  34587. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  34588. proto$1.weekdays = localeWeekdays;
  34589. proto$1.weekdaysMin = localeWeekdaysMin;
  34590. proto$1.weekdaysShort = localeWeekdaysShort;
  34591. proto$1.weekdaysParse = localeWeekdaysParse;
  34592. proto$1.weekdaysRegex = weekdaysRegex;
  34593. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  34594. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  34595. proto$1.isPM = localeIsPM;
  34596. proto$1.meridiem = localeMeridiem;
  34597. function get$1(format, index, field, setter) {
  34598. var locale = getLocale(),
  34599. utc = createUTC().set(setter, index);
  34600. return locale[field](utc, format);
  34601. }
  34602. function listMonthsImpl(format, index, field) {
  34603. if (isNumber(format)) {
  34604. index = format;
  34605. format = undefined;
  34606. }
  34607. format = format || '';
  34608. if (index != null) {
  34609. return get$1(format, index, field, 'month');
  34610. }
  34611. var i,
  34612. out = [];
  34613. for (i = 0; i < 12; i++) {
  34614. out[i] = get$1(format, i, field, 'month');
  34615. }
  34616. return out;
  34617. }
  34618. // ()
  34619. // (5)
  34620. // (fmt, 5)
  34621. // (fmt)
  34622. // (true)
  34623. // (true, 5)
  34624. // (true, fmt, 5)
  34625. // (true, fmt)
  34626. function listWeekdaysImpl(localeSorted, format, index, field) {
  34627. if (typeof localeSorted === 'boolean') {
  34628. if (isNumber(format)) {
  34629. index = format;
  34630. format = undefined;
  34631. }
  34632. format = format || '';
  34633. } else {
  34634. format = localeSorted;
  34635. index = format;
  34636. localeSorted = false;
  34637. if (isNumber(format)) {
  34638. index = format;
  34639. format = undefined;
  34640. }
  34641. format = format || '';
  34642. }
  34643. var locale = getLocale(),
  34644. shift = localeSorted ? locale._week.dow : 0,
  34645. i,
  34646. out = [];
  34647. if (index != null) {
  34648. return get$1(format, (index + shift) % 7, field, 'day');
  34649. }
  34650. for (i = 0; i < 7; i++) {
  34651. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  34652. }
  34653. return out;
  34654. }
  34655. function listMonths(format, index) {
  34656. return listMonthsImpl(format, index, 'months');
  34657. }
  34658. function listMonthsShort(format, index) {
  34659. return listMonthsImpl(format, index, 'monthsShort');
  34660. }
  34661. function listWeekdays(localeSorted, format, index) {
  34662. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  34663. }
  34664. function listWeekdaysShort(localeSorted, format, index) {
  34665. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  34666. }
  34667. function listWeekdaysMin(localeSorted, format, index) {
  34668. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  34669. }
  34670. getSetGlobalLocale('en', {
  34671. eras: [
  34672. {
  34673. since: '0001-01-01',
  34674. until: +Infinity,
  34675. offset: 1,
  34676. name: 'Anno Domini',
  34677. narrow: 'AD',
  34678. abbr: 'AD',
  34679. },
  34680. {
  34681. since: '0000-12-31',
  34682. until: -Infinity,
  34683. offset: 1,
  34684. name: 'Before Christ',
  34685. narrow: 'BC',
  34686. abbr: 'BC',
  34687. },
  34688. ],
  34689. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  34690. ordinal: function (number) {
  34691. var b = number % 10,
  34692. output =
  34693. toInt((number % 100) / 10) === 1
  34694. ? 'th'
  34695. : b === 1
  34696. ? 'st'
  34697. : b === 2
  34698. ? 'nd'
  34699. : b === 3
  34700. ? 'rd'
  34701. : 'th';
  34702. return number + output;
  34703. },
  34704. });
  34705. // Side effect imports
  34706. hooks.lang = deprecate(
  34707. 'moment.lang is deprecated. Use moment.locale instead.',
  34708. getSetGlobalLocale
  34709. );
  34710. hooks.langData = deprecate(
  34711. 'moment.langData is deprecated. Use moment.localeData instead.',
  34712. getLocale
  34713. );
  34714. var mathAbs = Math.abs;
  34715. function abs() {
  34716. var data = this._data;
  34717. this._milliseconds = mathAbs(this._milliseconds);
  34718. this._days = mathAbs(this._days);
  34719. this._months = mathAbs(this._months);
  34720. data.milliseconds = mathAbs(data.milliseconds);
  34721. data.seconds = mathAbs(data.seconds);
  34722. data.minutes = mathAbs(data.minutes);
  34723. data.hours = mathAbs(data.hours);
  34724. data.months = mathAbs(data.months);
  34725. data.years = mathAbs(data.years);
  34726. return this;
  34727. }
  34728. function addSubtract$1(duration, input, value, direction) {
  34729. var other = createDuration(input, value);
  34730. duration._milliseconds += direction * other._milliseconds;
  34731. duration._days += direction * other._days;
  34732. duration._months += direction * other._months;
  34733. return duration._bubble();
  34734. }
  34735. // supports only 2.0-style add(1, 's') or add(duration)
  34736. function add$1(input, value) {
  34737. return addSubtract$1(this, input, value, 1);
  34738. }
  34739. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  34740. function subtract$1(input, value) {
  34741. return addSubtract$1(this, input, value, -1);
  34742. }
  34743. function absCeil(number) {
  34744. if (number < 0) {
  34745. return Math.floor(number);
  34746. } else {
  34747. return Math.ceil(number);
  34748. }
  34749. }
  34750. function bubble() {
  34751. var milliseconds = this._milliseconds,
  34752. days = this._days,
  34753. months = this._months,
  34754. data = this._data,
  34755. seconds,
  34756. minutes,
  34757. hours,
  34758. years,
  34759. monthsFromDays;
  34760. // if we have a mix of positive and negative values, bubble down first
  34761. // check: https://github.com/moment/moment/issues/2166
  34762. if (
  34763. !(
  34764. (milliseconds >= 0 && days >= 0 && months >= 0) ||
  34765. (milliseconds <= 0 && days <= 0 && months <= 0)
  34766. )
  34767. ) {
  34768. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  34769. days = 0;
  34770. months = 0;
  34771. }
  34772. // The following code bubbles up values, see the tests for
  34773. // examples of what that means.
  34774. data.milliseconds = milliseconds % 1000;
  34775. seconds = absFloor(milliseconds / 1000);
  34776. data.seconds = seconds % 60;
  34777. minutes = absFloor(seconds / 60);
  34778. data.minutes = minutes % 60;
  34779. hours = absFloor(minutes / 60);
  34780. data.hours = hours % 24;
  34781. days += absFloor(hours / 24);
  34782. // convert days to months
  34783. monthsFromDays = absFloor(daysToMonths(days));
  34784. months += monthsFromDays;
  34785. days -= absCeil(monthsToDays(monthsFromDays));
  34786. // 12 months -> 1 year
  34787. years = absFloor(months / 12);
  34788. months %= 12;
  34789. data.days = days;
  34790. data.months = months;
  34791. data.years = years;
  34792. return this;
  34793. }
  34794. function daysToMonths(days) {
  34795. // 400 years have 146097 days (taking into account leap year rules)
  34796. // 400 years have 12 months === 4800
  34797. return (days * 4800) / 146097;
  34798. }
  34799. function monthsToDays(months) {
  34800. // the reverse of daysToMonths
  34801. return (months * 146097) / 4800;
  34802. }
  34803. function as(units) {
  34804. if (!this.isValid()) {
  34805. return NaN;
  34806. }
  34807. var days,
  34808. months,
  34809. milliseconds = this._milliseconds;
  34810. units = normalizeUnits(units);
  34811. if (units === 'month' || units === 'quarter' || units === 'year') {
  34812. days = this._days + milliseconds / 864e5;
  34813. months = this._months + daysToMonths(days);
  34814. switch (units) {
  34815. case 'month':
  34816. return months;
  34817. case 'quarter':
  34818. return months / 3;
  34819. case 'year':
  34820. return months / 12;
  34821. }
  34822. } else {
  34823. // handle milliseconds separately because of floating point math errors (issue #1867)
  34824. days = this._days + Math.round(monthsToDays(this._months));
  34825. switch (units) {
  34826. case 'week':
  34827. return days / 7 + milliseconds / 6048e5;
  34828. case 'day':
  34829. return days + milliseconds / 864e5;
  34830. case 'hour':
  34831. return days * 24 + milliseconds / 36e5;
  34832. case 'minute':
  34833. return days * 1440 + milliseconds / 6e4;
  34834. case 'second':
  34835. return days * 86400 + milliseconds / 1000;
  34836. // Math.floor prevents floating point math errors here
  34837. case 'millisecond':
  34838. return Math.floor(days * 864e5) + milliseconds;
  34839. default:
  34840. throw new Error('Unknown unit ' + units);
  34841. }
  34842. }
  34843. }
  34844. // TODO: Use this.as('ms')?
  34845. function valueOf$1() {
  34846. if (!this.isValid()) {
  34847. return NaN;
  34848. }
  34849. return (
  34850. this._milliseconds +
  34851. this._days * 864e5 +
  34852. (this._months % 12) * 2592e6 +
  34853. toInt(this._months / 12) * 31536e6
  34854. );
  34855. }
  34856. function makeAs(alias) {
  34857. return function () {
  34858. return this.as(alias);
  34859. };
  34860. }
  34861. var asMilliseconds = makeAs('ms'),
  34862. asSeconds = makeAs('s'),
  34863. asMinutes = makeAs('m'),
  34864. asHours = makeAs('h'),
  34865. asDays = makeAs('d'),
  34866. asWeeks = makeAs('w'),
  34867. asMonths = makeAs('M'),
  34868. asQuarters = makeAs('Q'),
  34869. asYears = makeAs('y');
  34870. function clone$1() {
  34871. return createDuration(this);
  34872. }
  34873. function get$2(units) {
  34874. units = normalizeUnits(units);
  34875. return this.isValid() ? this[units + 's']() : NaN;
  34876. }
  34877. function makeGetter(name) {
  34878. return function () {
  34879. return this.isValid() ? this._data[name] : NaN;
  34880. };
  34881. }
  34882. var milliseconds = makeGetter('milliseconds'),
  34883. seconds = makeGetter('seconds'),
  34884. minutes = makeGetter('minutes'),
  34885. hours = makeGetter('hours'),
  34886. days = makeGetter('days'),
  34887. months = makeGetter('months'),
  34888. years = makeGetter('years');
  34889. function weeks() {
  34890. return absFloor(this.days() / 7);
  34891. }
  34892. var round = Math.round,
  34893. thresholds = {
  34894. ss: 44, // a few seconds to seconds
  34895. s: 45, // seconds to minute
  34896. m: 45, // minutes to hour
  34897. h: 22, // hours to day
  34898. d: 26, // days to month/week
  34899. w: null, // weeks to month
  34900. M: 11, // months to year
  34901. };
  34902. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  34903. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  34904. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  34905. }
  34906. function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
  34907. var duration = createDuration(posNegDuration).abs(),
  34908. seconds = round(duration.as('s')),
  34909. minutes = round(duration.as('m')),
  34910. hours = round(duration.as('h')),
  34911. days = round(duration.as('d')),
  34912. months = round(duration.as('M')),
  34913. weeks = round(duration.as('w')),
  34914. years = round(duration.as('y')),
  34915. a =
  34916. (seconds <= thresholds.ss && ['s', seconds]) ||
  34917. (seconds < thresholds.s && ['ss', seconds]) ||
  34918. (minutes <= 1 && ['m']) ||
  34919. (minutes < thresholds.m && ['mm', minutes]) ||
  34920. (hours <= 1 && ['h']) ||
  34921. (hours < thresholds.h && ['hh', hours]) ||
  34922. (days <= 1 && ['d']) ||
  34923. (days < thresholds.d && ['dd', days]);
  34924. if (thresholds.w != null) {
  34925. a =
  34926. a ||
  34927. (weeks <= 1 && ['w']) ||
  34928. (weeks < thresholds.w && ['ww', weeks]);
  34929. }
  34930. a = a ||
  34931. (months <= 1 && ['M']) ||
  34932. (months < thresholds.M && ['MM', months]) ||
  34933. (years <= 1 && ['y']) || ['yy', years];
  34934. a[2] = withoutSuffix;
  34935. a[3] = +posNegDuration > 0;
  34936. a[4] = locale;
  34937. return substituteTimeAgo.apply(null, a);
  34938. }
  34939. // This function allows you to set the rounding function for relative time strings
  34940. function getSetRelativeTimeRounding(roundingFunction) {
  34941. if (roundingFunction === undefined) {
  34942. return round;
  34943. }
  34944. if (typeof roundingFunction === 'function') {
  34945. round = roundingFunction;
  34946. return true;
  34947. }
  34948. return false;
  34949. }
  34950. // This function allows you to set a threshold for relative time strings
  34951. function getSetRelativeTimeThreshold(threshold, limit) {
  34952. if (thresholds[threshold] === undefined) {
  34953. return false;
  34954. }
  34955. if (limit === undefined) {
  34956. return thresholds[threshold];
  34957. }
  34958. thresholds[threshold] = limit;
  34959. if (threshold === 's') {
  34960. thresholds.ss = limit - 1;
  34961. }
  34962. return true;
  34963. }
  34964. function humanize(argWithSuffix, argThresholds) {
  34965. if (!this.isValid()) {
  34966. return this.localeData().invalidDate();
  34967. }
  34968. var withSuffix = false,
  34969. th = thresholds,
  34970. locale,
  34971. output;
  34972. if (typeof argWithSuffix === 'object') {
  34973. argThresholds = argWithSuffix;
  34974. argWithSuffix = false;
  34975. }
  34976. if (typeof argWithSuffix === 'boolean') {
  34977. withSuffix = argWithSuffix;
  34978. }
  34979. if (typeof argThresholds === 'object') {
  34980. th = Object.assign({}, thresholds, argThresholds);
  34981. if (argThresholds.s != null && argThresholds.ss == null) {
  34982. th.ss = argThresholds.s - 1;
  34983. }
  34984. }
  34985. locale = this.localeData();
  34986. output = relativeTime$1(this, !withSuffix, th, locale);
  34987. if (withSuffix) {
  34988. output = locale.pastFuture(+this, output);
  34989. }
  34990. return locale.postformat(output);
  34991. }
  34992. var abs$1 = Math.abs;
  34993. function sign(x) {
  34994. return (x > 0) - (x < 0) || +x;
  34995. }
  34996. function toISOString$1() {
  34997. // for ISO strings we do not use the normal bubbling rules:
  34998. // * milliseconds bubble up until they become hours
  34999. // * days do not bubble at all
  35000. // * months bubble up until they become years
  35001. // This is because there is no context-free conversion between hours and days
  35002. // (think of clock changes)
  35003. // and also not between days and months (28-31 days per month)
  35004. if (!this.isValid()) {
  35005. return this.localeData().invalidDate();
  35006. }
  35007. var seconds = abs$1(this._milliseconds) / 1000,
  35008. days = abs$1(this._days),
  35009. months = abs$1(this._months),
  35010. minutes,
  35011. hours,
  35012. years,
  35013. s,
  35014. total = this.asSeconds(),
  35015. totalSign,
  35016. ymSign,
  35017. daysSign,
  35018. hmsSign;
  35019. if (!total) {
  35020. // this is the same as C#'s (Noda) and python (isodate)...
  35021. // but not other JS (goog.date)
  35022. return 'P0D';
  35023. }
  35024. // 3600 seconds -> 60 minutes -> 1 hour
  35025. minutes = absFloor(seconds / 60);
  35026. hours = absFloor(minutes / 60);
  35027. seconds %= 60;
  35028. minutes %= 60;
  35029. // 12 months -> 1 year
  35030. years = absFloor(months / 12);
  35031. months %= 12;
  35032. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  35033. s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  35034. totalSign = total < 0 ? '-' : '';
  35035. ymSign = sign(this._months) !== sign(total) ? '-' : '';
  35036. daysSign = sign(this._days) !== sign(total) ? '-' : '';
  35037. hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  35038. return (
  35039. totalSign +
  35040. 'P' +
  35041. (years ? ymSign + years + 'Y' : '') +
  35042. (months ? ymSign + months + 'M' : '') +
  35043. (days ? daysSign + days + 'D' : '') +
  35044. (hours || minutes || seconds ? 'T' : '') +
  35045. (hours ? hmsSign + hours + 'H' : '') +
  35046. (minutes ? hmsSign + minutes + 'M' : '') +
  35047. (seconds ? hmsSign + s + 'S' : '')
  35048. );
  35049. }
  35050. var proto$2 = Duration.prototype;
  35051. proto$2.isValid = isValid$1;
  35052. proto$2.abs = abs;
  35053. proto$2.add = add$1;
  35054. proto$2.subtract = subtract$1;
  35055. proto$2.as = as;
  35056. proto$2.asMilliseconds = asMilliseconds;
  35057. proto$2.asSeconds = asSeconds;
  35058. proto$2.asMinutes = asMinutes;
  35059. proto$2.asHours = asHours;
  35060. proto$2.asDays = asDays;
  35061. proto$2.asWeeks = asWeeks;
  35062. proto$2.asMonths = asMonths;
  35063. proto$2.asQuarters = asQuarters;
  35064. proto$2.asYears = asYears;
  35065. proto$2.valueOf = valueOf$1;
  35066. proto$2._bubble = bubble;
  35067. proto$2.clone = clone$1;
  35068. proto$2.get = get$2;
  35069. proto$2.milliseconds = milliseconds;
  35070. proto$2.seconds = seconds;
  35071. proto$2.minutes = minutes;
  35072. proto$2.hours = hours;
  35073. proto$2.days = days;
  35074. proto$2.weeks = weeks;
  35075. proto$2.months = months;
  35076. proto$2.years = years;
  35077. proto$2.humanize = humanize;
  35078. proto$2.toISOString = toISOString$1;
  35079. proto$2.toString = toISOString$1;
  35080. proto$2.toJSON = toISOString$1;
  35081. proto$2.locale = locale;
  35082. proto$2.localeData = localeData;
  35083. proto$2.toIsoString = deprecate(
  35084. 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
  35085. toISOString$1
  35086. );
  35087. proto$2.lang = lang;
  35088. // FORMATTING
  35089. addFormatToken('X', 0, 0, 'unix');
  35090. addFormatToken('x', 0, 0, 'valueOf');
  35091. // PARSING
  35092. addRegexToken('x', matchSigned);
  35093. addRegexToken('X', matchTimestamp);
  35094. addParseToken('X', function (input, array, config) {
  35095. config._d = new Date(parseFloat(input) * 1000);
  35096. });
  35097. addParseToken('x', function (input, array, config) {
  35098. config._d = new Date(toInt(input));
  35099. });
  35100. //! moment.js
  35101. hooks.version = '2.29.4';
  35102. setHookCallback(createLocal);
  35103. hooks.fn = proto;
  35104. hooks.min = min;
  35105. hooks.max = max;
  35106. hooks.now = now;
  35107. hooks.utc = createUTC;
  35108. hooks.unix = createUnix;
  35109. hooks.months = listMonths;
  35110. hooks.isDate = isDate;
  35111. hooks.locale = getSetGlobalLocale;
  35112. hooks.invalid = createInvalid;
  35113. hooks.duration = createDuration;
  35114. hooks.isMoment = isMoment;
  35115. hooks.weekdays = listWeekdays;
  35116. hooks.parseZone = createInZone;
  35117. hooks.localeData = getLocale;
  35118. hooks.isDuration = isDuration;
  35119. hooks.monthsShort = listMonthsShort;
  35120. hooks.weekdaysMin = listWeekdaysMin;
  35121. hooks.defineLocale = defineLocale;
  35122. hooks.updateLocale = updateLocale;
  35123. hooks.locales = listLocales;
  35124. hooks.weekdaysShort = listWeekdaysShort;
  35125. hooks.normalizeUnits = normalizeUnits;
  35126. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  35127. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  35128. hooks.calendarFormat = getCalendarFormat;
  35129. hooks.prototype = proto;
  35130. // currently HTML5 input type only supports 24-hour formats
  35131. hooks.HTML5_FMT = {
  35132. DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
  35133. DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
  35134. DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
  35135. DATE: 'YYYY-MM-DD', // <input type="date" />
  35136. TIME: 'HH:mm', // <input type="time" />
  35137. TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
  35138. TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
  35139. WEEK: 'GGGG-[W]WW', // <input type="week" />
  35140. MONTH: 'YYYY-MM', // <input type="month" />
  35141. };
  35142. return hooks;
  35143. })));
  35144. /***/ }),
  35145. /***/ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/allSettled.js":
  35146. /*!***************************************************************************************************!*\
  35147. !*** ./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/allSettled.js ***!
  35148. \***************************************************************************************************/
  35149. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  35150. "use strict";
  35151. __webpack_require__.r(__webpack_exports__);
  35152. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  35153. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  35154. /* harmony export */ });
  35155. function allSettled(arr) {
  35156. var P = this;
  35157. return new P(function(resolve, reject) {
  35158. if (!(arr && typeof arr.length !== 'undefined')) {
  35159. return reject(
  35160. new TypeError(
  35161. typeof arr +
  35162. ' ' +
  35163. arr +
  35164. ' is not iterable(cannot read property Symbol(Symbol.iterator))'
  35165. )
  35166. );
  35167. }
  35168. var args = Array.prototype.slice.call(arr);
  35169. if (args.length === 0) return resolve([]);
  35170. var remaining = args.length;
  35171. function res(i, val) {
  35172. if (val && (typeof val === 'object' || typeof val === 'function')) {
  35173. var then = val.then;
  35174. if (typeof then === 'function') {
  35175. then.call(
  35176. val,
  35177. function(val) {
  35178. res(i, val);
  35179. },
  35180. function(e) {
  35181. args[i] = { status: 'rejected', reason: e };
  35182. if (--remaining === 0) {
  35183. resolve(args);
  35184. }
  35185. }
  35186. );
  35187. return;
  35188. }
  35189. }
  35190. args[i] = { status: 'fulfilled', value: val };
  35191. if (--remaining === 0) {
  35192. resolve(args);
  35193. }
  35194. }
  35195. for (var i = 0; i < args.length; i++) {
  35196. res(i, args[i]);
  35197. }
  35198. });
  35199. }
  35200. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (allSettled);
  35201. /***/ }),
  35202. /***/ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/finally.js":
  35203. /*!************************************************************************************************!*\
  35204. !*** ./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/finally.js ***!
  35205. \************************************************************************************************/
  35206. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  35207. "use strict";
  35208. __webpack_require__.r(__webpack_exports__);
  35209. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  35210. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  35211. /* harmony export */ });
  35212. /**
  35213. * @this {Promise}
  35214. */
  35215. function finallyConstructor(callback) {
  35216. var constructor = this.constructor;
  35217. return this.then(
  35218. function(value) {
  35219. // @ts-ignore
  35220. return constructor.resolve(callback()).then(function() {
  35221. return value;
  35222. });
  35223. },
  35224. function(reason) {
  35225. // @ts-ignore
  35226. return constructor.resolve(callback()).then(function() {
  35227. // @ts-ignore
  35228. return constructor.reject(reason);
  35229. });
  35230. }
  35231. );
  35232. }
  35233. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (finallyConstructor);
  35234. /***/ }),
  35235. /***/ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/index.js":
  35236. /*!**********************************************************************************************!*\
  35237. !*** ./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/index.js ***!
  35238. \**********************************************************************************************/
  35239. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  35240. "use strict";
  35241. __webpack_require__.r(__webpack_exports__);
  35242. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  35243. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  35244. /* harmony export */ });
  35245. /* harmony import */ var _finally__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./finally */ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/finally.js");
  35246. /* harmony import */ var _allSettled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./allSettled */ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/allSettled.js");
  35247. // Store setTimeout reference so promise-polyfill will be unaffected by
  35248. // other code modifying setTimeout (like sinon.useFakeTimers())
  35249. var setTimeoutFunc = setTimeout;
  35250. function isArray(x) {
  35251. return Boolean(x && typeof x.length !== 'undefined');
  35252. }
  35253. function noop() {}
  35254. // Polyfill for Function.prototype.bind
  35255. function bind(fn, thisArg) {
  35256. return function() {
  35257. fn.apply(thisArg, arguments);
  35258. };
  35259. }
  35260. /**
  35261. * @constructor
  35262. * @param {Function} fn
  35263. */
  35264. function Promise(fn) {
  35265. if (!(this instanceof Promise))
  35266. throw new TypeError('Promises must be constructed via new');
  35267. if (typeof fn !== 'function') throw new TypeError('not a function');
  35268. /** @type {!number} */
  35269. this._state = 0;
  35270. /** @type {!boolean} */
  35271. this._handled = false;
  35272. /** @type {Promise|undefined} */
  35273. this._value = undefined;
  35274. /** @type {!Array<!Function>} */
  35275. this._deferreds = [];
  35276. doResolve(fn, this);
  35277. }
  35278. function handle(self, deferred) {
  35279. while (self._state === 3) {
  35280. self = self._value;
  35281. }
  35282. if (self._state === 0) {
  35283. self._deferreds.push(deferred);
  35284. return;
  35285. }
  35286. self._handled = true;
  35287. Promise._immediateFn(function() {
  35288. var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
  35289. if (cb === null) {
  35290. (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
  35291. return;
  35292. }
  35293. var ret;
  35294. try {
  35295. ret = cb(self._value);
  35296. } catch (e) {
  35297. reject(deferred.promise, e);
  35298. return;
  35299. }
  35300. resolve(deferred.promise, ret);
  35301. });
  35302. }
  35303. function resolve(self, newValue) {
  35304. try {
  35305. // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
  35306. if (newValue === self)
  35307. throw new TypeError('A promise cannot be resolved with itself.');
  35308. if (
  35309. newValue &&
  35310. (typeof newValue === 'object' || typeof newValue === 'function')
  35311. ) {
  35312. var then = newValue.then;
  35313. if (newValue instanceof Promise) {
  35314. self._state = 3;
  35315. self._value = newValue;
  35316. finale(self);
  35317. return;
  35318. } else if (typeof then === 'function') {
  35319. doResolve(bind(then, newValue), self);
  35320. return;
  35321. }
  35322. }
  35323. self._state = 1;
  35324. self._value = newValue;
  35325. finale(self);
  35326. } catch (e) {
  35327. reject(self, e);
  35328. }
  35329. }
  35330. function reject(self, newValue) {
  35331. self._state = 2;
  35332. self._value = newValue;
  35333. finale(self);
  35334. }
  35335. function finale(self) {
  35336. if (self._state === 2 && self._deferreds.length === 0) {
  35337. Promise._immediateFn(function() {
  35338. if (!self._handled) {
  35339. Promise._unhandledRejectionFn(self._value);
  35340. }
  35341. });
  35342. }
  35343. for (var i = 0, len = self._deferreds.length; i < len; i++) {
  35344. handle(self, self._deferreds[i]);
  35345. }
  35346. self._deferreds = null;
  35347. }
  35348. /**
  35349. * @constructor
  35350. */
  35351. function Handler(onFulfilled, onRejected, promise) {
  35352. this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
  35353. this.onRejected = typeof onRejected === 'function' ? onRejected : null;
  35354. this.promise = promise;
  35355. }
  35356. /**
  35357. * Take a potentially misbehaving resolver function and make sure
  35358. * onFulfilled and onRejected are only called once.
  35359. *
  35360. * Makes no guarantees about asynchrony.
  35361. */
  35362. function doResolve(fn, self) {
  35363. var done = false;
  35364. try {
  35365. fn(
  35366. function(value) {
  35367. if (done) return;
  35368. done = true;
  35369. resolve(self, value);
  35370. },
  35371. function(reason) {
  35372. if (done) return;
  35373. done = true;
  35374. reject(self, reason);
  35375. }
  35376. );
  35377. } catch (ex) {
  35378. if (done) return;
  35379. done = true;
  35380. reject(self, ex);
  35381. }
  35382. }
  35383. Promise.prototype['catch'] = function(onRejected) {
  35384. return this.then(null, onRejected);
  35385. };
  35386. Promise.prototype.then = function(onFulfilled, onRejected) {
  35387. // @ts-ignore
  35388. var prom = new this.constructor(noop);
  35389. handle(this, new Handler(onFulfilled, onRejected, prom));
  35390. return prom;
  35391. };
  35392. Promise.prototype['finally'] = _finally__WEBPACK_IMPORTED_MODULE_0__["default"];
  35393. Promise.all = function(arr) {
  35394. return new Promise(function(resolve, reject) {
  35395. if (!isArray(arr)) {
  35396. return reject(new TypeError('Promise.all accepts an array'));
  35397. }
  35398. var args = Array.prototype.slice.call(arr);
  35399. if (args.length === 0) return resolve([]);
  35400. var remaining = args.length;
  35401. function res(i, val) {
  35402. try {
  35403. if (val && (typeof val === 'object' || typeof val === 'function')) {
  35404. var then = val.then;
  35405. if (typeof then === 'function') {
  35406. then.call(
  35407. val,
  35408. function(val) {
  35409. res(i, val);
  35410. },
  35411. reject
  35412. );
  35413. return;
  35414. }
  35415. }
  35416. args[i] = val;
  35417. if (--remaining === 0) {
  35418. resolve(args);
  35419. }
  35420. } catch (ex) {
  35421. reject(ex);
  35422. }
  35423. }
  35424. for (var i = 0; i < args.length; i++) {
  35425. res(i, args[i]);
  35426. }
  35427. });
  35428. };
  35429. Promise.allSettled = _allSettled__WEBPACK_IMPORTED_MODULE_1__["default"];
  35430. Promise.resolve = function(value) {
  35431. if (value && typeof value === 'object' && value.constructor === Promise) {
  35432. return value;
  35433. }
  35434. return new Promise(function(resolve) {
  35435. resolve(value);
  35436. });
  35437. };
  35438. Promise.reject = function(value) {
  35439. return new Promise(function(resolve, reject) {
  35440. reject(value);
  35441. });
  35442. };
  35443. Promise.race = function(arr) {
  35444. return new Promise(function(resolve, reject) {
  35445. if (!isArray(arr)) {
  35446. return reject(new TypeError('Promise.race accepts an array'));
  35447. }
  35448. for (var i = 0, len = arr.length; i < len; i++) {
  35449. Promise.resolve(arr[i]).then(resolve, reject);
  35450. }
  35451. });
  35452. };
  35453. // Use polyfill for setImmediate for performance gains
  35454. Promise._immediateFn =
  35455. // @ts-ignore
  35456. (typeof setImmediate === 'function' &&
  35457. function(fn) {
  35458. // @ts-ignore
  35459. setImmediate(fn);
  35460. }) ||
  35461. function(fn) {
  35462. setTimeoutFunc(fn, 0);
  35463. };
  35464. Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
  35465. if (typeof console !== 'undefined' && console) {
  35466. console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
  35467. }
  35468. };
  35469. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Promise);
  35470. /***/ }),
  35471. /***/ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/polyfill.js":
  35472. /*!*************************************************************************************************!*\
  35473. !*** ./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/polyfill.js ***!
  35474. \*************************************************************************************************/
  35475. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  35476. "use strict";
  35477. __webpack_require__.r(__webpack_exports__);
  35478. /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/index.js");
  35479. /* harmony import */ var _finally__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./finally */ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/finally.js");
  35480. /* harmony import */ var _allSettled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./allSettled */ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/allSettled.js");
  35481. /** @suppress {undefinedVars} */
  35482. var globalNS = (function() {
  35483. // the only reliable means to get the global object is
  35484. // `Function('return this')()`
  35485. // However, this causes CSP violations in Chrome apps.
  35486. if (typeof self !== 'undefined') {
  35487. return self;
  35488. }
  35489. if (typeof window !== 'undefined') {
  35490. return window;
  35491. }
  35492. if (typeof __webpack_require__.g !== 'undefined') {
  35493. return __webpack_require__.g;
  35494. }
  35495. throw new Error('unable to locate global object');
  35496. })();
  35497. // Expose the polyfill if Promise is undefined or set to a
  35498. // non-function value. The latter can be due to a named HTMLElement
  35499. // being exposed by browsers for legacy reasons.
  35500. // https://github.com/taylorhakes/promise-polyfill/issues/114
  35501. if (typeof globalNS['Promise'] !== 'function') {
  35502. globalNS['Promise'] = _index__WEBPACK_IMPORTED_MODULE_0__["default"];
  35503. } else {
  35504. if (!globalNS.Promise.prototype['finally']) {
  35505. globalNS.Promise.prototype['finally'] = _finally__WEBPACK_IMPORTED_MODULE_1__["default"];
  35506. }
  35507. if (!globalNS.Promise.allSettled) {
  35508. globalNS.Promise.allSettled = _allSettled__WEBPACK_IMPORTED_MODULE_2__["default"];
  35509. }
  35510. }
  35511. /***/ })
  35512. /******/ });
  35513. /************************************************************************/
  35514. /******/ // The module cache
  35515. /******/ var __webpack_module_cache__ = {};
  35516. /******/
  35517. /******/ // The require function
  35518. /******/ function __webpack_require__(moduleId) {
  35519. /******/ // Check if module is in cache
  35520. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  35521. /******/ if (cachedModule !== undefined) {
  35522. /******/ return cachedModule.exports;
  35523. /******/ }
  35524. /******/ // Create a new module (and put it into the cache)
  35525. /******/ var module = __webpack_module_cache__[moduleId] = {
  35526. /******/ id: moduleId,
  35527. /******/ loaded: false,
  35528. /******/ exports: {}
  35529. /******/ };
  35530. /******/
  35531. /******/ // Execute the module function
  35532. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  35533. /******/
  35534. /******/ // Flag the module as loaded
  35535. /******/ module.loaded = true;
  35536. /******/
  35537. /******/ // Return the exports of the module
  35538. /******/ return module.exports;
  35539. /******/ }
  35540. /******/
  35541. /************************************************************************/
  35542. /******/ /* webpack/runtime/amd define */
  35543. /******/ (() => {
  35544. /******/ __webpack_require__.amdD = function () {
  35545. /******/ throw new Error('define cannot be used indirect');
  35546. /******/ };
  35547. /******/ })();
  35548. /******/
  35549. /******/ /* webpack/runtime/compat get default export */
  35550. /******/ (() => {
  35551. /******/ // getDefaultExport function for compatibility with non-harmony modules
  35552. /******/ __webpack_require__.n = (module) => {
  35553. /******/ var getter = module && module.__esModule ?
  35554. /******/ () => (module['default']) :
  35555. /******/ () => (module);
  35556. /******/ __webpack_require__.d(getter, { a: getter });
  35557. /******/ return getter;
  35558. /******/ };
  35559. /******/ })();
  35560. /******/
  35561. /******/ /* webpack/runtime/define property getters */
  35562. /******/ (() => {
  35563. /******/ // define getter functions for harmony exports
  35564. /******/ __webpack_require__.d = (exports, definition) => {
  35565. /******/ for(var key in definition) {
  35566. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  35567. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  35568. /******/ }
  35569. /******/ }
  35570. /******/ };
  35571. /******/ })();
  35572. /******/
  35573. /******/ /* webpack/runtime/global */
  35574. /******/ (() => {
  35575. /******/ __webpack_require__.g = (function() {
  35576. /******/ if (typeof globalThis === 'object') return globalThis;
  35577. /******/ try {
  35578. /******/ return this || new Function('return this')();
  35579. /******/ } catch (e) {
  35580. /******/ if (typeof window === 'object') return window;
  35581. /******/ }
  35582. /******/ })();
  35583. /******/ })();
  35584. /******/
  35585. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  35586. /******/ (() => {
  35587. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  35588. /******/ })();
  35589. /******/
  35590. /******/ /* webpack/runtime/make namespace object */
  35591. /******/ (() => {
  35592. /******/ // define __esModule on exports
  35593. /******/ __webpack_require__.r = (exports) => {
  35594. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  35595. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  35596. /******/ }
  35597. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  35598. /******/ };
  35599. /******/ })();
  35600. /******/
  35601. /******/ /* webpack/runtime/node module decorator */
  35602. /******/ (() => {
  35603. /******/ __webpack_require__.nmd = (module) => {
  35604. /******/ module.paths = [];
  35605. /******/ if (!module.children) module.children = [];
  35606. /******/ return module;
  35607. /******/ };
  35608. /******/ })();
  35609. /******/
  35610. /************************************************************************/
  35611. var __webpack_exports__ = {};
  35612. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  35613. (() => {
  35614. "use strict";
  35615. /*!**********************!*\
  35616. !*** ./demo/main.js ***!
  35617. \**********************/
  35618. __webpack_require__.r(__webpack_exports__);
  35619. /* harmony import */ var jsonpack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jsonpack */ "./node_modules/.pnpm/jsonpack@1.1.5/node_modules/jsonpack/main.js");
  35620. /* harmony import */ var jsonpack__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jsonpack__WEBPACK_IMPORTED_MODULE_0__);
  35621. /* harmony import */ var promise_polyfill_src_polyfill__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! promise-polyfill/src/polyfill */ "./node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/polyfill.js");
  35622. /* harmony import */ var _demo_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./demo-utils */ "./demo/demo-utils.js");
  35623. /* harmony import */ var _chart_timeline_chart__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chart/timeline-chart */ "./demo/chart/timeline-chart.ts");
  35624. /* global $, Hls, __NETLIFY__ */
  35625. /* eslint camelcase: 0 */
  35626. var NETLIFY = {}; // replaced in build
  35627. var STORAGE_KEYS = {
  35628. Editor_Persistence: 'hlsjs:config-editor-persist',
  35629. Hls_Config: 'hlsjs:config',
  35630. volume: 'hlsjs:volume',
  35631. demo_tabs: 'hlsjs:demo-tabs'
  35632. };
  35633. var testStreams = __webpack_require__(/*! ../tests/test-streams */ "./tests/test-streams.js");
  35634. var defaultTestStreamUrl = testStreams[Object.keys(testStreams)[0]].url;
  35635. var sourceURL = decodeURIComponent(getURLParam('src', defaultTestStreamUrl));
  35636. var demoConfig = getURLParam('demoConfig', null);
  35637. if (demoConfig) {
  35638. demoConfig = JSON.parse(atob(demoConfig));
  35639. } else {
  35640. demoConfig = {};
  35641. }
  35642. var hlsjsDefaults = {
  35643. debug: true,
  35644. enableWorker: true,
  35645. lowLatencyMode: true,
  35646. backBufferLength: 60 * 1.5
  35647. };
  35648. var enableStreaming = getDemoConfigPropOrDefault('enableStreaming', true);
  35649. var autoRecoverError = getDemoConfigPropOrDefault('autoRecoverError', true);
  35650. var levelCapping = getDemoConfigPropOrDefault('levelCapping', -1);
  35651. var limitMetrics = getDemoConfigPropOrDefault('limitMetrics', -1);
  35652. var dumpfMP4 = getDemoConfigPropOrDefault('dumpfMP4', false);
  35653. var stopOnStall = getDemoConfigPropOrDefault('stopOnStall', false);
  35654. var bufferingIdx = -1;
  35655. var selectedTestStream = null;
  35656. var video = document.querySelector('#video');
  35657. var startTime = Date.now();
  35658. var lastSeekingIdx;
  35659. var lastStartPosition;
  35660. var lastDuration;
  35661. var lastAudioTrackSwitchingIdx;
  35662. var hls;
  35663. var url;
  35664. var events;
  35665. var stats;
  35666. var tracks;
  35667. var fmp4Data;
  35668. var configPersistenceEnabled = false;
  35669. var configEditor = null;
  35670. var chart;
  35671. var resizeAsyncCallbackId = -1;
  35672. var requestAnimationFrame = self.requestAnimationFrame || self.setTimeout;
  35673. var cancelAnimationFrame = self.cancelAnimationFrame || self.clearTimeout;
  35674. var resizeHandlers = [];
  35675. var resize = function resize() {
  35676. cancelAnimationFrame(resizeAsyncCallbackId);
  35677. resizeAsyncCallbackId = requestAnimationFrame(function () {
  35678. resizeHandlers.forEach(function (handler) {
  35679. handler();
  35680. });
  35681. });
  35682. };
  35683. self.onresize = resize;
  35684. if (self.screen && self.screen.orientation) {
  35685. self.screen.orientation.onchange = resize;
  35686. }
  35687. var playerResize = function playerResize() {
  35688. var bounds = video.getBoundingClientRect();
  35689. $('#currentSize').html(Math.round(bounds.width * 10) / 10 + " x " + Math.round(bounds.height * 10) / 10);
  35690. if (video.videoWidth && video.videoHeight) {
  35691. $('#currentResolution').html(video.videoWidth + " x " + video.videoHeight);
  35692. }
  35693. };
  35694. resizeHandlers.push(playerResize);
  35695. $(document).ready(function () {
  35696. setupConfigEditor();
  35697. chart = setupTimelineChart();
  35698. Object.keys(testStreams).forEach(function (key, index) {
  35699. var stream = testStreams[key];
  35700. var option = new Option(stream.description, key);
  35701. $('#streamSelect').append(option);
  35702. if (stream.url === sourceURL) {
  35703. document.querySelector('#streamSelect').selectedIndex = index + 1;
  35704. }
  35705. });
  35706. var videoWidth = video.style.width;
  35707. if (videoWidth) {
  35708. $('#videoSize option').each(function (i, option) {
  35709. if (option.value === videoWidth) {
  35710. document.querySelector('#videoSize').selectedIndex = i;
  35711. $('#bufferedCanvas').width(videoWidth);
  35712. resize();
  35713. return false;
  35714. }
  35715. });
  35716. }
  35717. $('#streamSelect').change(function () {
  35718. var key = $('#streamSelect').val() || Object.keys(testStreams)[0];
  35719. selectedTestStream = testStreams[key];
  35720. var streamUrl = selectedTestStream.url;
  35721. $('#streamURL').val(streamUrl);
  35722. loadSelectedStream();
  35723. });
  35724. $('#streamURL').change(function () {
  35725. selectedTestStream = null;
  35726. loadSelectedStream();
  35727. });
  35728. $('#videoSize').change(function () {
  35729. $('#video').width($('#videoSize').val());
  35730. $('#bufferedCanvas').width($('#videoSize').val());
  35731. checkBuffer();
  35732. resize();
  35733. });
  35734. $('#enableStreaming').click(function () {
  35735. enableStreaming = this.checked;
  35736. loadSelectedStream();
  35737. });
  35738. $('#autoRecoverError').click(function () {
  35739. autoRecoverError = this.checked;
  35740. onDemoConfigChanged();
  35741. });
  35742. $('#stopOnStall').click(function () {
  35743. stopOnStall = this.checked;
  35744. onDemoConfigChanged();
  35745. });
  35746. $('#dumpfMP4').click(function () {
  35747. dumpfMP4 = this.checked;
  35748. $('.btn-dump').toggle(dumpfMP4);
  35749. onDemoConfigChanged();
  35750. });
  35751. $('#limitMetrics').change(function () {
  35752. limitMetrics = this.value;
  35753. onDemoConfigChanged();
  35754. });
  35755. $('#levelCapping').change(function () {
  35756. levelCapping = this.value;
  35757. onDemoConfigChanged();
  35758. });
  35759. $('#limitMetrics').val(limitMetrics);
  35760. $('#enableStreaming').prop('checked', enableStreaming);
  35761. $('#autoRecoverError').prop('checked', autoRecoverError);
  35762. $('#stopOnStall').prop('checked', stopOnStall);
  35763. $('#dumpfMP4').prop('checked', dumpfMP4);
  35764. $('#levelCapping').val(levelCapping);
  35765. // link to version on npm if canary
  35766. // github branch for a branch version
  35767. // github tag for a normal tag
  35768. // github PR for a pr
  35769. function getVersionLink(version) {
  35770. var alphaRegex = /[-.]0\.alpha\./;
  35771. if (alphaRegex.test(version)) {
  35772. return "https://www.npmjs.com/package/hls.js/v/" + encodeURIComponent(version);
  35773. } else if (NETLIFY.reviewID) {
  35774. return "https://github.com/video-dev/hls.js/pull/" + NETLIFY.reviewID;
  35775. } else if (NETLIFY.branch) {
  35776. return "https://github.com/video-dev/hls.js/tree/" + encodeURIComponent(NETLIFY.branch);
  35777. }
  35778. return "https://github.com/video-dev/hls.js/releases/tag/v" + encodeURIComponent(version);
  35779. }
  35780. var version = Hls.version;
  35781. if (version) {
  35782. var $a = $('<a />').attr('target', '_blank').attr('rel', 'noopener noreferrer').attr('href', getVersionLink(version)).text('v' + version);
  35783. $('.title').append(' ').append($a);
  35784. }
  35785. $('#streamURL').val(sourceURL);
  35786. var volumeSettings = JSON.parse(localStorage.getItem(STORAGE_KEYS.volume)) || {
  35787. volume: 0.05,
  35788. muted: false
  35789. };
  35790. video.volume = volumeSettings.volume;
  35791. video.muted = volumeSettings.muted;
  35792. $('.btn-dump').toggle(dumpfMP4);
  35793. $('#toggleButtons').show();
  35794. $('#metricsButtonWindow').toggle(self.windowSliding);
  35795. $('#metricsButtonFixed').toggle(!self.windowSliding);
  35796. loadSelectedStream();
  35797. var tabIndexesCSV = localStorage.getItem(STORAGE_KEYS.demo_tabs);
  35798. if (tabIndexesCSV === null) {
  35799. tabIndexesCSV = '0,1,2';
  35800. }
  35801. if (tabIndexesCSV) {
  35802. tabIndexesCSV.split(',').forEach(function (indexString) {
  35803. toggleTab($('.demo-tab-btn')[parseInt(indexString) || 0], true);
  35804. });
  35805. }
  35806. $(window).on('popstate', function () {
  35807. window.location.reload();
  35808. });
  35809. });
  35810. function setupGlobals() {
  35811. self.events = events = {
  35812. url: url,
  35813. t0: self.performance.now(),
  35814. load: [],
  35815. buffer: [],
  35816. video: [],
  35817. level: [],
  35818. bitrate: []
  35819. };
  35820. lastAudioTrackSwitchingIdx = undefined;
  35821. lastSeekingIdx = undefined;
  35822. bufferingIdx = -1;
  35823. // actual values, only on window
  35824. self.recoverDecodingErrorDate = null;
  35825. self.recoverSwapAudioCodecDate = null;
  35826. self.fmp4Data = fmp4Data = {
  35827. audio: [],
  35828. video: []
  35829. };
  35830. self.onClickBufferedRange = onClickBufferedRange;
  35831. self.updateLevelInfo = updateLevelInfo;
  35832. self.onDemoConfigChanged = onDemoConfigChanged;
  35833. self.createfMP4 = createfMP4;
  35834. self.goToMetricsPermaLink = goToMetricsPermaLink;
  35835. self.toggleTab = toggleTab;
  35836. self.toggleTabClick = toggleTabClick;
  35837. self.applyConfigEditorValue = applyConfigEditorValue;
  35838. }
  35839. function trimArray(target, limit) {
  35840. if (limit < 0) {
  35841. return;
  35842. }
  35843. while (target.length > limit) {
  35844. target.shift();
  35845. }
  35846. }
  35847. function trimEventHistory() {
  35848. var x = limitMetrics;
  35849. if (x < 0) {
  35850. return;
  35851. }
  35852. trimArray(events.load, x);
  35853. trimArray(events.buffer, x);
  35854. trimArray(events.video, x);
  35855. trimArray(events.level, x);
  35856. trimArray(events.bitrate, x);
  35857. }
  35858. function loadSelectedStream() {
  35859. $('#statusOut,#errorOut').empty();
  35860. if (!Hls.isSupported()) {
  35861. handleUnsupported();
  35862. return;
  35863. }
  35864. url = $('#streamURL').val();
  35865. setupGlobals();
  35866. hideCanvas();
  35867. if (hls) {
  35868. hls.destroy();
  35869. clearInterval(hls.bufferTimer);
  35870. hls = null;
  35871. }
  35872. if (!enableStreaming) {
  35873. logStatus('Streaming disabled');
  35874. return;
  35875. }
  35876. logStatus('Loading ' + url);
  35877. // Extending both a demo-specific config and the user config which can override all
  35878. var hlsConfig = $.extend({}, hlsjsDefaults, getEditorValue({
  35879. parse: true
  35880. }));
  35881. if (selectedTestStream && selectedTestStream.config) {
  35882. console.info('[loadSelectedStream] extending hls config with stream-specific config: ', selectedTestStream.config);
  35883. $.extend(hlsConfig, selectedTestStream.config);
  35884. updateConfigEditorValue(hlsConfig);
  35885. }
  35886. onDemoConfigChanged(true);
  35887. console.log('Using Hls.js config:', hlsConfig);
  35888. self.hls = hls = new Hls(hlsConfig);
  35889. logStatus('Loading manifest and attaching video element...');
  35890. var expiredTracks = [].filter.call(video.textTracks, function (track) {
  35891. return track.kind !== 'metadata';
  35892. });
  35893. if (expiredTracks.length) {
  35894. var kinds = expiredTracks.map(function (track) {
  35895. return track.kind;
  35896. }).filter(function (kind, index, self) {
  35897. return self.indexOf(kind) === index;
  35898. });
  35899. logStatus("Replacing video element to remove " + kinds.join(' and ') + " text tracks");
  35900. var videoWithExpiredTextTracks = video;
  35901. video = videoWithExpiredTextTracks.cloneNode(false);
  35902. video.removeAttribute('src');
  35903. video.volume = videoWithExpiredTextTracks.volume;
  35904. video.muted = videoWithExpiredTextTracks.muted;
  35905. videoWithExpiredTextTracks.parentNode.insertBefore(video, videoWithExpiredTextTracks);
  35906. videoWithExpiredTextTracks.parentNode.removeChild(videoWithExpiredTextTracks);
  35907. }
  35908. addChartEventListeners(hls);
  35909. addVideoEventListeners(video);
  35910. hls.loadSource(url);
  35911. hls.autoLevelCapping = levelCapping;
  35912. hls.attachMedia(video);
  35913. hls.on(Hls.Events.MEDIA_ATTACHED, function () {
  35914. logStatus('Media element attached');
  35915. bufferingIdx = -1;
  35916. events.video.push({
  35917. time: self.performance.now() - events.t0,
  35918. type: 'Media attached'
  35919. });
  35920. trimEventHistory();
  35921. });
  35922. hls.on(Hls.Events.MEDIA_DETACHED, function () {
  35923. logStatus('Media element detached');
  35924. clearInterval(hls.bufferTimer);
  35925. bufferingIdx = -1;
  35926. tracks = [];
  35927. events.video.push({
  35928. time: self.performance.now() - events.t0,
  35929. type: 'Media detached'
  35930. });
  35931. trimEventHistory();
  35932. });
  35933. hls.on(Hls.Events.DESTROYING, function () {
  35934. clearInterval(hls.bufferTimer);
  35935. });
  35936. hls.on(Hls.Events.BUFFER_RESET, function () {
  35937. clearInterval(hls.bufferTimer);
  35938. });
  35939. hls.on(Hls.Events.FRAG_PARSING_INIT_SEGMENT, function (eventName, data) {
  35940. showCanvas();
  35941. events.video.push({
  35942. time: self.performance.now() - events.t0,
  35943. type: data.id + ' init segment'
  35944. });
  35945. trimEventHistory();
  35946. });
  35947. hls.on(Hls.Events.FRAG_PARSING_METADATA, function (eventName, data) {
  35948. // console.log("Id3 samples ", data.samples);
  35949. });
  35950. hls.on(Hls.Events.LEVEL_SWITCHING, function (eventName, data) {
  35951. events.level.push({
  35952. time: self.performance.now() - events.t0,
  35953. id: data.level,
  35954. bitrate: Math.round(hls.levels[data.level].bitrate / 1000)
  35955. });
  35956. trimEventHistory();
  35957. updateLevelInfo();
  35958. });
  35959. hls.on(Hls.Events.MANIFEST_PARSED, function (eventName, data) {
  35960. events.load.push({
  35961. type: 'manifest',
  35962. name: '',
  35963. start: 0,
  35964. end: data.levels.length,
  35965. time: data.stats.loading.start - events.t0,
  35966. latency: data.stats.loading.first - data.stats.loading.start,
  35967. load: data.stats.loading.end - data.stats.loading.first,
  35968. duration: data.stats.loading.end - data.stats.loading.first
  35969. });
  35970. trimEventHistory();
  35971. self.refreshCanvas();
  35972. });
  35973. hls.on(Hls.Events.MANIFEST_PARSED, function (eventName, data) {
  35974. logStatus(hls.levels.length + " quality levels found");
  35975. logStatus('Manifest successfully loaded');
  35976. stats = {
  35977. levelNb: data.levels.length,
  35978. levelParsed: 0
  35979. };
  35980. trimEventHistory();
  35981. updateLevelInfo();
  35982. });
  35983. hls.on(Hls.Events.AUDIO_TRACKS_UPDATED, function (eventName, data) {
  35984. logStatus('No of audio tracks found: ' + data.audioTracks.length);
  35985. updateAudioTrackInfo();
  35986. });
  35987. hls.on(Hls.Events.AUDIO_TRACK_SWITCHING, function (eventName, data) {
  35988. logStatus('Audio track switching...');
  35989. updateAudioTrackInfo();
  35990. events.video.push({
  35991. time: self.performance.now() - events.t0,
  35992. type: 'audio switching',
  35993. name: '@' + data.id
  35994. });
  35995. trimEventHistory();
  35996. lastAudioTrackSwitchingIdx = events.video.length - 1;
  35997. });
  35998. hls.on(Hls.Events.AUDIO_TRACK_SWITCHED, function (eventName, data) {
  35999. logStatus('Audio track switched');
  36000. updateAudioTrackInfo();
  36001. var event = {
  36002. time: self.performance.now() - events.t0,
  36003. type: 'audio switched',
  36004. name: '@' + data.id
  36005. };
  36006. if (lastAudioTrackSwitchingIdx !== undefined) {
  36007. events.video[lastAudioTrackSwitchingIdx].duration = event.time - events.video[lastAudioTrackSwitchingIdx].time;
  36008. lastAudioTrackSwitchingIdx = undefined;
  36009. }
  36010. events.video.push(event);
  36011. trimEventHistory();
  36012. });
  36013. hls.on(Hls.Events.LEVEL_LOADED, function (eventName, data) {
  36014. events.isLive = data.details.live;
  36015. var event = {
  36016. type: 'level',
  36017. id: data.level,
  36018. start: data.details.startSN,
  36019. end: data.details.endSN,
  36020. time: data.stats.loading.start - events.t0,
  36021. latency: data.stats.loading.first - data.stats.loading.start,
  36022. load: data.stats.loading.end - data.stats.loading.first,
  36023. parsing: data.stats.parsing.end - data.stats.loading.end,
  36024. duration: data.stats.loading.end - data.stats.loading.first
  36025. };
  36026. var parsingDuration = data.stats.parsing.end - data.stats.loading.end;
  36027. if (stats.levelParsed) {
  36028. this.sumLevelParsingMs += parsingDuration;
  36029. } else {
  36030. this.sumLevelParsingMs = parsingDuration;
  36031. }
  36032. stats.levelParsed++;
  36033. stats.levelParsingUs = Math.round(1000 * this.sumLevelParsingMs / stats.levelParsed);
  36034. // console.log('parsing level duration :' + stats.levelParsingUs + 'us,count:' + stats.levelParsed);
  36035. events.load.push(event);
  36036. trimEventHistory();
  36037. self.refreshCanvas();
  36038. });
  36039. hls.on(Hls.Events.AUDIO_TRACK_LOADED, function (eventName, data) {
  36040. events.isLive = data.details.live;
  36041. var event = {
  36042. type: 'audio track',
  36043. id: data.id,
  36044. start: data.details.startSN,
  36045. end: data.details.endSN,
  36046. time: data.stats.loading.start - events.t0,
  36047. latency: data.stats.loading.first - data.stats.loading.start,
  36048. load: data.stats.loading.end - data.stats.loading.first,
  36049. parsing: data.stats.parsing.end - data.stats.loading.end,
  36050. duration: data.stats.loading.end - data.stats.loading.first
  36051. };
  36052. events.load.push(event);
  36053. trimEventHistory();
  36054. self.refreshCanvas();
  36055. });
  36056. hls.on(Hls.Events.FRAG_BUFFERED, function (eventName, data) {
  36057. var event = {
  36058. type: data.frag.type + (data.part ? ' part' : ' fragment'),
  36059. id: data.frag.level,
  36060. id2: data.frag.sn,
  36061. id3: data.part ? data.part.index : undefined,
  36062. time: data.stats.loading.start - events.t0,
  36063. latency: data.stats.loading.first - data.stats.loading.start,
  36064. load: data.stats.loading.end - data.stats.loading.first,
  36065. parsing: data.stats.parsing.end - data.stats.loading.end,
  36066. buffer: data.stats.buffering.end - data.stats.parsing.end,
  36067. duration: data.stats.buffering.end - data.stats.loading.first,
  36068. bw: Math.round(8 * data.stats.total / (data.stats.buffering.end - data.stats.loading.start)),
  36069. size: data.stats.total
  36070. };
  36071. events.load.push(event);
  36072. events.bitrate.push({
  36073. time: self.performance.now() - events.t0,
  36074. bitrate: event.bw,
  36075. duration: data.frag.duration,
  36076. level: event.id
  36077. });
  36078. if (events.buffer.length === 0) {
  36079. events.buffer.push({
  36080. time: 0,
  36081. buffer: 0,
  36082. pos: 0
  36083. });
  36084. }
  36085. clearInterval(hls.bufferTimer);
  36086. hls.bufferTimer = self.setInterval(checkBuffer, 100);
  36087. trimEventHistory();
  36088. self.refreshCanvas();
  36089. updateLevelInfo();
  36090. var latency = data.stats.loading.first - data.stats.loading.start;
  36091. var parsing = data.stats.parsing.end - data.stats.loading.end;
  36092. var process = data.stats.buffering.end - data.stats.loading.start;
  36093. var bitrate = Math.round(8 * data.stats.total / (data.stats.buffering.end - data.stats.loading.first));
  36094. if (stats.fragBuffered) {
  36095. stats.fragMinLatency = Math.min(stats.fragMinLatency, latency);
  36096. stats.fragMaxLatency = Math.max(stats.fragMaxLatency, latency);
  36097. stats.fragMinProcess = Math.min(stats.fragMinProcess, process);
  36098. stats.fragMaxProcess = Math.max(stats.fragMaxProcess, process);
  36099. stats.fragMinKbps = Math.min(stats.fragMinKbps, bitrate);
  36100. stats.fragMaxKbps = Math.max(stats.fragMaxKbps, bitrate);
  36101. stats.autoLevelCappingMin = Math.min(stats.autoLevelCappingMin, hls.autoLevelCapping);
  36102. stats.autoLevelCappingMax = Math.max(stats.autoLevelCappingMax, hls.autoLevelCapping);
  36103. stats.fragBuffered++;
  36104. } else {
  36105. stats.fragMinLatency = stats.fragMaxLatency = latency;
  36106. stats.fragMinProcess = stats.fragMaxProcess = process;
  36107. stats.fragMinKbps = stats.fragMaxKbps = bitrate;
  36108. stats.fragBuffered = 1;
  36109. stats.fragBufferedBytes = 0;
  36110. stats.autoLevelCappingMin = stats.autoLevelCappingMax = hls.autoLevelCapping;
  36111. this.sumLatency = 0;
  36112. this.sumKbps = 0;
  36113. this.sumProcess = 0;
  36114. this.sumParsing = 0;
  36115. }
  36116. stats.fraglastLatency = latency;
  36117. this.sumLatency += latency;
  36118. stats.fragAvgLatency = Math.round(this.sumLatency / stats.fragBuffered);
  36119. stats.fragLastProcess = process;
  36120. this.sumProcess += process;
  36121. this.sumParsing += parsing;
  36122. stats.fragAvgProcess = Math.round(this.sumProcess / stats.fragBuffered);
  36123. stats.fragLastKbps = bitrate;
  36124. this.sumKbps += bitrate;
  36125. stats.fragAvgKbps = Math.round(this.sumKbps / stats.fragBuffered);
  36126. stats.fragBufferedBytes += data.stats.total;
  36127. stats.fragparsingKbps = Math.round(8 * stats.fragBufferedBytes / this.sumParsing);
  36128. stats.fragparsingMs = Math.round(this.sumParsing);
  36129. stats.autoLevelCappingLast = hls.autoLevelCapping;
  36130. });
  36131. hls.on(Hls.Events.LEVEL_SWITCHED, function (eventName, data) {
  36132. var event = {
  36133. time: self.performance.now() - events.t0,
  36134. type: 'level switched',
  36135. name: data.level
  36136. };
  36137. events.video.push(event);
  36138. trimEventHistory();
  36139. self.refreshCanvas();
  36140. updateLevelInfo();
  36141. });
  36142. hls.on(Hls.Events.FRAG_CHANGED, function (eventName, data) {
  36143. var event = {
  36144. time: self.performance.now() - events.t0,
  36145. type: 'frag changed',
  36146. name: data.frag.sn + ' @ ' + data.frag.level
  36147. };
  36148. events.video.push(event);
  36149. trimEventHistory();
  36150. self.refreshCanvas();
  36151. updateLevelInfo();
  36152. stats.tagList = data.frag.tagList;
  36153. var level = data.frag.level;
  36154. var autoLevel = hls.autoLevelEnabled;
  36155. if (stats.levelStart === undefined) {
  36156. stats.levelStart = level;
  36157. }
  36158. stats.fragProgramDateTime = data.frag.programDateTime;
  36159. stats.fragStart = data.frag.start;
  36160. if (autoLevel) {
  36161. if (stats.fragChangedAuto) {
  36162. stats.autoLevelMin = Math.min(stats.autoLevelMin, level);
  36163. stats.autoLevelMax = Math.max(stats.autoLevelMax, level);
  36164. stats.fragChangedAuto++;
  36165. if (this.levelLastAuto && level !== stats.autoLevelLast) {
  36166. stats.autoLevelSwitch++;
  36167. }
  36168. } else {
  36169. stats.autoLevelMin = stats.autoLevelMax = level;
  36170. stats.autoLevelSwitch = 0;
  36171. stats.fragChangedAuto = 1;
  36172. this.sumAutoLevel = 0;
  36173. }
  36174. this.sumAutoLevel += level;
  36175. stats.autoLevelAvg = Math.round(1000 * this.sumAutoLevel / stats.fragChangedAuto) / 1000;
  36176. stats.autoLevelLast = level;
  36177. } else {
  36178. if (stats.fragChangedManual) {
  36179. stats.manualLevelMin = Math.min(stats.manualLevelMin, level);
  36180. stats.manualLevelMax = Math.max(stats.manualLevelMax, level);
  36181. stats.fragChangedManual++;
  36182. if (!this.levelLastAuto && level !== stats.manualLevelLast) {
  36183. stats.manualLevelSwitch++;
  36184. }
  36185. } else {
  36186. stats.manualLevelMin = stats.manualLevelMax = level;
  36187. stats.manualLevelSwitch = 0;
  36188. stats.fragChangedManual = 1;
  36189. }
  36190. stats.manualLevelLast = level;
  36191. }
  36192. this.levelLastAuto = autoLevel;
  36193. });
  36194. hls.on(Hls.Events.FRAG_LOAD_EMERGENCY_ABORTED, function (eventName, data) {
  36195. if (stats) {
  36196. if (stats.fragLoadEmergencyAborted === undefined) {
  36197. stats.fragLoadEmergencyAborted = 1;
  36198. } else {
  36199. stats.fragLoadEmergencyAborted++;
  36200. }
  36201. }
  36202. });
  36203. hls.on(Hls.Events.FRAG_DECRYPTED, function (eventName, data) {
  36204. if (!stats.fragDecrypted) {
  36205. stats.fragDecrypted = 0;
  36206. this.totalDecryptTime = 0;
  36207. stats.fragAvgDecryptTime = 0;
  36208. }
  36209. stats.fragDecrypted++;
  36210. this.totalDecryptTime += data.stats.tdecrypt - data.stats.tstart;
  36211. stats.fragAvgDecryptTime = this.totalDecryptTime / stats.fragDecrypted;
  36212. });
  36213. hls.on(Hls.Events.ERROR, function (eventName, data) {
  36214. console.warn('Error event:', data);
  36215. switch (data.details) {
  36216. case Hls.ErrorDetails.MANIFEST_LOAD_ERROR:
  36217. try {
  36218. $('#errorOut').html('Cannot load <a href="' + data.context.url + '">' + url + '</a><br>HTTP response code:' + data.response.code + ' <br>' + data.response.text);
  36219. if (data.response.code === 0) {
  36220. $('#errorOut').append('This might be a CORS issue, consider installing <a href="https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi">Allow-Control-Allow-Origin</a> Chrome Extension');
  36221. }
  36222. } catch (err) {
  36223. $('#errorOut').html('Cannot load <a href="' + data.context.url + '">' + url + '</a><br>Response body: ' + data.response.text);
  36224. }
  36225. break;
  36226. case Hls.ErrorDetails.MANIFEST_LOAD_TIMEOUT:
  36227. logError('Timeout while loading manifest');
  36228. break;
  36229. case Hls.ErrorDetails.MANIFEST_PARSING_ERROR:
  36230. logError('Error while parsing manifest:' + data.reason);
  36231. break;
  36232. case Hls.ErrorDetails.LEVEL_EMPTY_ERROR:
  36233. logError('Loaded level contains no fragments ' + data.level + ' ' + data.url);
  36234. // handleLevelError demonstrates how to remove a level that errors followed by a downswitch
  36235. // handleLevelError(data);
  36236. break;
  36237. case Hls.ErrorDetails.LEVEL_LOAD_ERROR:
  36238. logError('Error while loading level playlist ' + data.context.level + ' ' + data.url);
  36239. // handleLevelError demonstrates how to remove a level that errors followed by a downswitch
  36240. // handleLevelError(data);
  36241. break;
  36242. case Hls.ErrorDetails.LEVEL_LOAD_TIMEOUT:
  36243. logError('Timeout while loading level playlist ' + data.context.level + ' ' + data.url);
  36244. // handleLevelError demonstrates how to remove a level that errors followed by a downswitch
  36245. // handleLevelError(data);
  36246. break;
  36247. case Hls.ErrorDetails.LEVEL_SWITCH_ERROR:
  36248. logError('Error while trying to switch to level ' + data.level);
  36249. break;
  36250. case Hls.ErrorDetails.FRAG_LOAD_ERROR:
  36251. logError('Error while loading fragment ' + data.frag.url);
  36252. break;
  36253. case Hls.ErrorDetails.FRAG_LOAD_TIMEOUT:
  36254. logError('Timeout while loading fragment ' + data.frag.url);
  36255. break;
  36256. case Hls.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
  36257. logError('Fragment-loop loading error');
  36258. break;
  36259. case Hls.ErrorDetails.FRAG_DECRYPT_ERROR:
  36260. logError('Decrypting error:' + data.reason);
  36261. break;
  36262. case Hls.ErrorDetails.FRAG_PARSING_ERROR:
  36263. logError('Parsing error:' + data.reason);
  36264. break;
  36265. case Hls.ErrorDetails.KEY_LOAD_ERROR:
  36266. logError('Error while loading key ' + data.frag.decryptdata.uri);
  36267. break;
  36268. case Hls.ErrorDetails.KEY_LOAD_TIMEOUT:
  36269. logError('Timeout while loading key ' + data.frag.decryptdata.uri);
  36270. break;
  36271. case Hls.ErrorDetails.BUFFER_APPEND_ERROR:
  36272. logError('Buffer append error');
  36273. break;
  36274. case Hls.ErrorDetails.BUFFER_ADD_CODEC_ERROR:
  36275. logError('Buffer add codec error for ' + data.mimeType + ':' + data.error.message);
  36276. break;
  36277. case Hls.ErrorDetails.BUFFER_APPENDING_ERROR:
  36278. logError('Buffer appending error');
  36279. break;
  36280. case Hls.ErrorDetails.BUFFER_STALLED_ERROR:
  36281. logError('Buffer stalled error');
  36282. if (stopOnStall) {
  36283. hls.stopLoad();
  36284. video.pause();
  36285. }
  36286. break;
  36287. default:
  36288. break;
  36289. }
  36290. if (data.fatal) {
  36291. console.error("Fatal error : " + data.details);
  36292. switch (data.type) {
  36293. case Hls.ErrorTypes.MEDIA_ERROR:
  36294. logError("A media error occurred: " + data.details);
  36295. handleMediaError();
  36296. break;
  36297. case Hls.ErrorTypes.NETWORK_ERROR:
  36298. logError("A network error occurred: " + data.details);
  36299. break;
  36300. default:
  36301. logError("An unrecoverable error occurred: " + data.details);
  36302. hls.destroy();
  36303. break;
  36304. }
  36305. }
  36306. if (!stats) {
  36307. stats = {};
  36308. }
  36309. // track all errors independently
  36310. if (stats[data.details] === undefined) {
  36311. stats[data.details] = 1;
  36312. } else {
  36313. stats[data.details] += 1;
  36314. }
  36315. // track fatal error
  36316. if (data.fatal) {
  36317. if (stats.fatalError === undefined) {
  36318. stats.fatalError = 1;
  36319. } else {
  36320. stats.fatalError += 1;
  36321. }
  36322. }
  36323. $('#statisticsOut').text(JSON.stringify((0,_demo_utils__WEBPACK_IMPORTED_MODULE_2__.sortObject)(stats), null, '\t'));
  36324. });
  36325. hls.on(Hls.Events.BUFFER_CREATED, function (eventName, data) {
  36326. tracks = data.tracks;
  36327. });
  36328. hls.on(Hls.Events.BUFFER_APPENDING, function (eventName, data) {
  36329. if (dumpfMP4) {
  36330. fmp4Data[data.type].push(data.data);
  36331. }
  36332. });
  36333. hls.on(Hls.Events.FPS_DROP, function (eventName, data) {
  36334. var event = {
  36335. time: self.performance.now() - events.t0,
  36336. type: 'frame drop',
  36337. name: data.currentDropped + '/' + data.currentDecoded
  36338. };
  36339. events.video.push(event);
  36340. trimEventHistory();
  36341. if (stats) {
  36342. if (stats.fpsDropEvent === undefined) {
  36343. stats.fpsDropEvent = 1;
  36344. } else {
  36345. stats.fpsDropEvent++;
  36346. }
  36347. stats.fpsTotalDroppedFrames = data.totalDroppedFrames;
  36348. }
  36349. });
  36350. }
  36351. function addVideoEventListeners(video) {
  36352. video.removeEventListener('resize', handleVideoEvent);
  36353. video.removeEventListener('seeking', handleVideoEvent);
  36354. video.removeEventListener('seeked', handleVideoEvent);
  36355. video.removeEventListener('pause', handleVideoEvent);
  36356. video.removeEventListener('play', handleVideoEvent);
  36357. video.removeEventListener('canplay', handleVideoEvent);
  36358. video.removeEventListener('canplaythrough', handleVideoEvent);
  36359. video.removeEventListener('ended', handleVideoEvent);
  36360. video.removeEventListener('playing', handleVideoEvent);
  36361. video.removeEventListener('error', handleVideoEvent);
  36362. video.removeEventListener('loadedmetadata', handleVideoEvent);
  36363. video.removeEventListener('loadeddata', handleVideoEvent);
  36364. video.removeEventListener('durationchange', handleVideoEvent);
  36365. video.removeEventListener('volumechange', handleVolumeEvent);
  36366. video.addEventListener('resize', handleVideoEvent);
  36367. video.addEventListener('seeking', handleVideoEvent);
  36368. video.addEventListener('seeked', handleVideoEvent);
  36369. video.addEventListener('pause', handleVideoEvent);
  36370. video.addEventListener('play', handleVideoEvent);
  36371. video.addEventListener('canplay', handleVideoEvent);
  36372. video.addEventListener('canplaythrough', handleVideoEvent);
  36373. video.addEventListener('ended', handleVideoEvent);
  36374. video.addEventListener('playing', handleVideoEvent);
  36375. video.addEventListener('error', handleVideoEvent);
  36376. video.addEventListener('loadedmetadata', handleVideoEvent);
  36377. video.addEventListener('loadeddata', handleVideoEvent);
  36378. video.addEventListener('durationchange', handleVideoEvent);
  36379. video.addEventListener('volumechange', handleVolumeEvent);
  36380. }
  36381. function handleUnsupported() {
  36382. if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1) {
  36383. logStatus('You are using Firefox, it looks like MediaSource is not enabled,<br>please ensure the following keys are set appropriately in <b>about:config</b><br>media.mediasource.enabled=true<br>media.mediasource.mp4.enabled=true<br><b>media.mediasource.whitelist=false</b>');
  36384. } else {
  36385. logStatus('Your Browser does not support MediaSourceExtension / MP4 mediasource');
  36386. }
  36387. }
  36388. function handleVideoEvent(evt) {
  36389. var data = '';
  36390. switch (evt.type) {
  36391. case 'durationchange':
  36392. if (evt.target.duration - lastDuration <= 0.5) {
  36393. // some browsers report several duration change events with almost the same value ... avoid spamming video events
  36394. return;
  36395. }
  36396. lastDuration = evt.target.duration;
  36397. data = Math.round(evt.target.duration * 1000);
  36398. break;
  36399. case 'resize':
  36400. data = evt.target.videoWidth + '/' + evt.target.videoHeight;
  36401. playerResize();
  36402. break;
  36403. case 'loadedmetadata':
  36404. case 'loadeddata':
  36405. case 'canplay':
  36406. case 'canplaythrough':
  36407. case 'ended':
  36408. case 'seeking':
  36409. case 'seeked':
  36410. case 'play':
  36411. case 'playing':
  36412. lastStartPosition = evt.target.currentTime;
  36413. case 'pause':
  36414. case 'waiting':
  36415. case 'stalled':
  36416. case 'error':
  36417. data = Math.round(evt.target.currentTime * 1000);
  36418. if (evt.type === 'error') {
  36419. var errorTxt;
  36420. var mediaError = evt.currentTarget.error;
  36421. switch (mediaError.code) {
  36422. case mediaError.MEDIA_ERR_ABORTED:
  36423. errorTxt = 'You aborted the video playback';
  36424. break;
  36425. case mediaError.MEDIA_ERR_DECODE:
  36426. errorTxt = 'The video playback was aborted due to a corruption problem or because the video used features your browser did not support';
  36427. handleMediaError();
  36428. break;
  36429. case mediaError.MEDIA_ERR_NETWORK:
  36430. errorTxt = 'A network error caused the video download to fail part-way';
  36431. break;
  36432. case mediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:
  36433. errorTxt = 'The video could not be loaded, either because the server or network failed or because the format is not supported';
  36434. break;
  36435. }
  36436. if (mediaError.message) {
  36437. errorTxt += ' - ' + mediaError.message;
  36438. }
  36439. logStatus(errorTxt);
  36440. console.error(errorTxt);
  36441. }
  36442. break;
  36443. default:
  36444. break;
  36445. }
  36446. var event = {
  36447. time: self.performance.now() - events.t0,
  36448. type: evt.type,
  36449. name: data
  36450. };
  36451. events.video.push(event);
  36452. if (evt.type === 'seeking') {
  36453. lastSeekingIdx = events.video.length - 1;
  36454. }
  36455. if (evt.type === 'seeked') {
  36456. events.video[lastSeekingIdx].duration = event.time - events.video[lastSeekingIdx].time;
  36457. }
  36458. trimEventHistory();
  36459. }
  36460. function handleVolumeEvent() {
  36461. localStorage.setItem(STORAGE_KEYS.volume, JSON.stringify({
  36462. muted: video.muted,
  36463. volume: video.volume
  36464. }));
  36465. }
  36466. function handleLevelError(data) {
  36467. var levelObj = data.context || data;
  36468. hls.removeLevel(levelObj.level, levelObj.urlId || 0);
  36469. if (!hls.levels.length) {
  36470. logError('All levels have been removed');
  36471. hls.destroy();
  36472. return;
  36473. }
  36474. // Trigger an immediate downswitch to the first level
  36475. // This is to handle the case where we start at an empty level, where switching to auto causes hlsjs to stall
  36476. hls.currentLevel = 0;
  36477. // Set the quality back to auto so that we return to optimal quality
  36478. hls.currentLevel = -1;
  36479. }
  36480. function handleMediaError() {
  36481. if (autoRecoverError) {
  36482. var now = self.performance.now();
  36483. if (!self.recoverDecodingErrorDate || now - self.recoverDecodingErrorDate > 3000) {
  36484. self.recoverDecodingErrorDate = self.performance.now();
  36485. $('#statusOut').append(', trying to recover media error.');
  36486. hls.recoverMediaError();
  36487. } else {
  36488. if (!self.recoverSwapAudioCodecDate || now - self.recoverSwapAudioCodecDate > 3000) {
  36489. self.recoverSwapAudioCodecDate = self.performance.now();
  36490. $('#statusOut').append(', trying to swap audio codec and recover media error.');
  36491. hls.swapAudioCodec();
  36492. hls.recoverMediaError();
  36493. } else {
  36494. $('#statusOut').append(', cannot recover. Last media error recovery failed.');
  36495. }
  36496. }
  36497. }
  36498. }
  36499. function timeRangesToString(r) {
  36500. var log = '';
  36501. for (var i = 0; i < r.length; i++) {
  36502. log += '[' + r.start(i) + ', ' + r.end(i) + ']';
  36503. log += ' ';
  36504. }
  36505. return log;
  36506. }
  36507. function checkBuffer() {
  36508. var canvas = document.querySelector('#bufferedCanvas');
  36509. var ctx = canvas.getContext('2d');
  36510. var r = video.buffered;
  36511. var seekableEnd = getSeekableEnd();
  36512. var bufferingDuration;
  36513. if (r) {
  36514. ctx.fillStyle = 'black';
  36515. if (!canvas.width || canvas.width !== video.clientWidth) {
  36516. canvas.width = video.clientWidth;
  36517. }
  36518. ctx.fillRect(0, 0, canvas.width, canvas.height);
  36519. var pos = video.currentTime;
  36520. var bufferLen = 0;
  36521. ctx.fillStyle = 'gray';
  36522. for (var i = 0; i < r.length; i++) {
  36523. var start = r.start(i) / seekableEnd * canvas.width;
  36524. var end = r.end(i) / seekableEnd * canvas.width;
  36525. ctx.fillRect(start, 2, Math.max(2, end - start), 11);
  36526. if (pos >= r.start(i) && pos < r.end(i)) {
  36527. // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length
  36528. bufferLen = r.end(i) - pos;
  36529. }
  36530. }
  36531. // check if we are in buffering / or playback ended state
  36532. if (bufferLen <= 0.1 && video.paused === false && pos - lastStartPosition > 0.5) {
  36533. if (lastDuration - pos <= 0.5 && events.isLive === false) {
  36534. // don't create buffering event if we are at the end of the playlist, don't report ended for live playlist
  36535. } else {
  36536. // we are not at the end of the playlist ... real buffering
  36537. if (bufferingIdx !== -1) {
  36538. bufferingDuration = self.performance.now() - events.t0 - events.video[bufferingIdx].time;
  36539. events.video[bufferingIdx].duration = bufferingDuration;
  36540. events.video[bufferingIdx].name = bufferingDuration;
  36541. } else {
  36542. events.video.push({
  36543. type: 'buffering',
  36544. time: self.performance.now() - events.t0
  36545. });
  36546. trimEventHistory();
  36547. // we are in buffering state
  36548. bufferingIdx = events.video.length - 1;
  36549. }
  36550. }
  36551. }
  36552. if (bufferLen > 0.1 && bufferingIdx !== -1) {
  36553. bufferingDuration = self.performance.now() - events.t0 - events.video[bufferingIdx].time;
  36554. events.video[bufferingIdx].duration = bufferingDuration;
  36555. events.video[bufferingIdx].name = bufferingDuration;
  36556. // we are out of buffering state
  36557. bufferingIdx = -1;
  36558. }
  36559. // update buffer/position for current Time
  36560. var event = {
  36561. time: self.performance.now() - events.t0,
  36562. buffer: Math.round(bufferLen * 1000),
  36563. pos: Math.round(pos * 1000)
  36564. };
  36565. var bufEvents = events.buffer;
  36566. var bufEventLen = bufEvents.length;
  36567. if (bufEventLen > 1) {
  36568. var event0 = bufEvents[bufEventLen - 2];
  36569. var event1 = bufEvents[bufEventLen - 1];
  36570. var slopeBuf0 = (event0.buffer - event1.buffer) / (event0.time - event1.time);
  36571. var slopeBuf1 = (event1.buffer - event.buffer) / (event1.time - event.time);
  36572. var slopePos0 = (event0.pos - event1.pos) / (event0.time - event1.time);
  36573. var slopePos1 = (event1.pos - event.pos) / (event1.time - event.time);
  36574. // compute slopes. if less than 30% difference, remove event1
  36575. if ((slopeBuf0 === slopeBuf1 || Math.abs(slopeBuf0 / slopeBuf1 - 1) <= 0.3) && (slopePos0 === slopePos1 || Math.abs(slopePos0 / slopePos1 - 1) <= 0.3)) {
  36576. bufEvents.pop();
  36577. }
  36578. }
  36579. events.buffer.push(event);
  36580. trimEventHistory();
  36581. self.refreshCanvas();
  36582. if ($('#statsDisplayTab').is(':visible')) {
  36583. var log = "Duration: " + video.duration + "\nBuffered: " + timeRangesToString(video.buffered) + "\nSeekable: " + timeRangesToString(video.seekable) + "\nPlayed: " + timeRangesToString(video.played) + "\n";
  36584. if (hls.media) {
  36585. for (var type in tracks) {
  36586. log += "Buffer for " + type + " contains:" + timeRangesToString(tracks[type].buffer.buffered) + "\n";
  36587. }
  36588. var videoPlaybackQuality = video.getVideoPlaybackQuality;
  36589. if (videoPlaybackQuality && typeof videoPlaybackQuality === typeof Function) {
  36590. log += "Dropped frames: " + video.getVideoPlaybackQuality().droppedVideoFrames + "\n";
  36591. log += "Corrupted frames: " + video.getVideoPlaybackQuality().corruptedVideoFrames + "\n";
  36592. } else if (video.webkitDroppedFrameCount) {
  36593. log += "Dropped frames: " + video.webkitDroppedFrameCount + "\n";
  36594. }
  36595. }
  36596. log += "Bandwidth Estimate: " + hls.bandwidthEstimate.toFixed(3) + "\n";
  36597. if (events.isLive) {
  36598. log += 'Live Stats:\n' + (" Max Latency: " + hls.maxLatency + "\n") + (" Target Latency: " + hls.targetLatency.toFixed(3) + "\n") + (" Latency: " + hls.latency.toFixed(3) + "\n") + (" Drift: " + hls.drift.toFixed(3) + " (edge advance rate)\n") + (" Edge Stall: " + hls.latencyController.edgeStalled.toFixed(3) + " (playlist refresh over target duration/part)\n") + (" Playback rate: " + video.playbackRate.toFixed(2) + "\n");
  36599. if (stats.fragProgramDateTime) {
  36600. var currentPDT = stats.fragProgramDateTime + (video.currentTime - stats.fragStart) * 1000;
  36601. log += " Program Date Time: " + new Date(currentPDT).toISOString();
  36602. var pdtLatency = (Date.now() - currentPDT) / 1000;
  36603. if (pdtLatency > 0) {
  36604. log += " (" + pdtLatency.toFixed(3) + " seconds ago)";
  36605. }
  36606. }
  36607. }
  36608. $('#bufferedOut').text(log);
  36609. $('#statisticsOut').text(JSON.stringify((0,_demo_utils__WEBPACK_IMPORTED_MODULE_2__.sortObject)(stats), null, '\t'));
  36610. }
  36611. ctx.fillStyle = 'blue';
  36612. var x = video.currentTime / seekableEnd * canvas.width;
  36613. ctx.fillRect(x, 0, 2, 15);
  36614. } else if (ctx.fillStyle !== 'black') {
  36615. ctx.fillStyle = 'black';
  36616. ctx.fillRect(0, 0, canvas.width, canvas.height);
  36617. }
  36618. }
  36619. function showCanvas() {
  36620. self.showMetrics();
  36621. $('#bufferedOut').show();
  36622. $('#bufferedCanvas').show();
  36623. }
  36624. function hideCanvas() {
  36625. self.hideMetrics();
  36626. $('#bufferedOut').hide();
  36627. $('#bufferedCanvas').hide();
  36628. }
  36629. function getMetrics() {
  36630. var json = JSON.stringify(events);
  36631. var jsonpacked = (0,jsonpack__WEBPACK_IMPORTED_MODULE_0__.pack)(json);
  36632. // console.log('packing JSON from ' + json.length + ' to ' + jsonpacked.length + ' bytes');
  36633. return btoa(jsonpacked);
  36634. }
  36635. self.copyMetricsToClipBoard = function () {
  36636. (0,_demo_utils__WEBPACK_IMPORTED_MODULE_2__.copyTextToClipboard)(getMetrics());
  36637. };
  36638. self.goToMetrics = function () {
  36639. var url = document.URL;
  36640. url = url.slice(0, url.lastIndexOf('/') + 1) + 'metrics.html';
  36641. self.open(url, '_blank');
  36642. };
  36643. function goToMetricsPermaLink() {
  36644. var url = document.URL;
  36645. var b64 = getMetrics();
  36646. url = url.slice(0, url.lastIndexOf('/') + 1) + 'metrics.html#data=' + b64;
  36647. self.open(url, '_blank');
  36648. }
  36649. function onClickBufferedRange(event) {
  36650. var canvas = document.querySelector('#bufferedCanvas');
  36651. var target = (event.clientX - canvas.offsetLeft) / canvas.width * getSeekableEnd();
  36652. video.currentTime = target;
  36653. }
  36654. function getSeekableEnd() {
  36655. if (isFinite(video.duration)) {
  36656. return video.duration;
  36657. }
  36658. if (video.seekable.length) {
  36659. return video.seekable.end(video.seekable.length - 1);
  36660. }
  36661. return 0;
  36662. }
  36663. function getLevelButtonHtml(key, levels, onclickReplace, autoEnabled) {
  36664. var onclickAuto = (key + "=-1").replace(/^(\w+)=([^=]+)$/, onclickReplace);
  36665. var codecs = levels.reduce(function (uniqueCodecs, level) {
  36666. var levelCodecs = codecs2label(level.attrs.CODECS);
  36667. if (levelCodecs && uniqueCodecs.indexOf(levelCodecs) === -1) {
  36668. uniqueCodecs.push(levelCodecs);
  36669. }
  36670. return uniqueCodecs;
  36671. }, []);
  36672. return "<button type=\"button\" class=\"btn btn-sm " + (autoEnabled ? 'btn-primary' : 'btn-success') + "\" onclick=\"" + onclickAuto + "\">auto</button>" + levels.map(function (level, i) {
  36673. var enabled = hls[key] === i;
  36674. var onclick = (key + "=" + i).replace(/^(\w+)=(\w+)$/, onclickReplace);
  36675. var label = level2label(levels[i], i, codecs);
  36676. return "<button type=\"button\" class=\"btn btn-sm " + (enabled ? 'btn-primary' : 'btn-success') + "\" onclick=\"" + onclick + "\">" + label + "</button>";
  36677. }).join('');
  36678. }
  36679. function updateLevelInfo() {
  36680. var levels = hls.levels;
  36681. if (!levels) {
  36682. return;
  36683. }
  36684. var htmlCurrentLevel = getLevelButtonHtml('currentLevel', levels, 'hls.$1=$2', hls.autoLevelEnabled);
  36685. var htmlNextLevel = getLevelButtonHtml('nextLevel', levels, 'hls.$1=$2', hls.autoLevelEnabled);
  36686. var htmlLoadLevel = getLevelButtonHtml('loadLevel', levels, 'hls.$1=$2', hls.autoLevelEnabled);
  36687. var htmlCapLevel = getLevelButtonHtml('autoLevelCapping', levels, 'levelCapping=hls.$1=$2;updateLevelInfo();onDemoConfigChanged();', hls.autoLevelCapping === -1);
  36688. if ($('#currentLevelControl').html() !== htmlCurrentLevel) {
  36689. $('#currentLevelControl').html(htmlCurrentLevel);
  36690. }
  36691. if ($('#nextLevelControl').html() !== htmlNextLevel) {
  36692. $('#nextLevelControl').html(htmlNextLevel);
  36693. }
  36694. if ($('#loadLevelControl').html() !== htmlLoadLevel) {
  36695. $('#loadLevelControl').html(htmlLoadLevel);
  36696. }
  36697. if ($('#levelCappingControl').html() !== htmlCapLevel) {
  36698. $('#levelCappingControl').html(htmlCapLevel);
  36699. }
  36700. }
  36701. function updateAudioTrackInfo() {
  36702. var buttonTemplate = '<button type="button" class="btn btn-sm ';
  36703. var buttonEnabled = 'btn-primary" ';
  36704. var buttonDisabled = 'btn-success" ';
  36705. var html1 = '';
  36706. var audioTrackId = hls.audioTrack;
  36707. var len = hls.audioTracks.length;
  36708. var track = hls.audioTracks[audioTrackId];
  36709. for (var i = 0; i < len; i++) {
  36710. html1 += buttonTemplate;
  36711. if (audioTrackId === i) {
  36712. html1 += buttonEnabled;
  36713. } else {
  36714. html1 += buttonDisabled;
  36715. }
  36716. html1 += 'onclick="hls.audioTrack=' + i + '">' + hls.audioTracks[i].name + '</button>';
  36717. }
  36718. $('#audioTrackLabel').text(track ? track.lang || track.name : 'None selected');
  36719. $('#audioTrackControl').html(html1);
  36720. }
  36721. function codecs2label(levelCodecs) {
  36722. if (levelCodecs) {
  36723. return levelCodecs.replace(/([ah]vc.)[^,;]+/, '$1').replace('mp4a.40.2', 'mp4a');
  36724. }
  36725. return '';
  36726. }
  36727. function level2label(level, i, manifestCodecs) {
  36728. var levelCodecs = codecs2label(level.attrs.CODECS);
  36729. var levelNameInfo = level.name ? "\"" + level.name + "\": " : '';
  36730. var codecInfo = levelCodecs && manifestCodecs.length > 1 ? " / " + levelCodecs : '';
  36731. if (level.height) {
  36732. return i + " (" + levelNameInfo + level.height + "p / " + Math.round(level.bitrate / 1024) + "kb" + codecInfo + ")";
  36733. }
  36734. if (level.bitrate) {
  36735. return i + " (" + levelNameInfo + Math.round(level.bitrate / 1024) + "kb" + codecInfo + ")";
  36736. }
  36737. if (codecInfo) {
  36738. return i + " (" + levelNameInfo + levelCodecs + ")";
  36739. }
  36740. if (level.name) {
  36741. return i + " (" + level.name + ")";
  36742. }
  36743. return "" + i;
  36744. }
  36745. function getDemoConfigPropOrDefault(propName, defaultVal) {
  36746. return typeof demoConfig[propName] !== 'undefined' ? demoConfig[propName] : defaultVal;
  36747. }
  36748. function getURLParam(sParam, defaultValue) {
  36749. var sPageURL = self.location.search.substring(1);
  36750. var sURLVariables = sPageURL.split('&');
  36751. for (var i = 0; i < sURLVariables.length; i++) {
  36752. var sParameterName = sURLVariables[i].split('=');
  36753. if (sParameterName[0] === sParam) {
  36754. return sParameterName[1] === 'undefined' ? undefined : sParameterName[1] === 'false' ? false : sParameterName[1];
  36755. }
  36756. }
  36757. return defaultValue;
  36758. }
  36759. function onDemoConfigChanged(firstLoad) {
  36760. demoConfig = {
  36761. enableStreaming: enableStreaming,
  36762. autoRecoverError: autoRecoverError,
  36763. stopOnStall: stopOnStall,
  36764. dumpfMP4: dumpfMP4,
  36765. levelCapping: levelCapping,
  36766. limitMetrics: limitMetrics
  36767. };
  36768. if (configPersistenceEnabled) {
  36769. persistEditorValue();
  36770. }
  36771. var serializedDemoConfig = btoa(JSON.stringify(demoConfig));
  36772. var baseURL = document.URL.split('?')[0];
  36773. var streamURL = $('#streamURL').val();
  36774. var permalinkURL = baseURL + "?src=" + encodeURIComponent(streamURL) + "&demoConfig=" + serializedDemoConfig;
  36775. $('#StreamPermalink').html("<a href=\"" + permalinkURL + "\">" + permalinkURL + "</a>");
  36776. if (!firstLoad && window.location.href !== permalinkURL) {
  36777. window.history.pushState(null, null, permalinkURL);
  36778. }
  36779. }
  36780. function onConfigPersistenceChanged(event) {
  36781. configPersistenceEnabled = event.target.checked;
  36782. localStorage.setItem(STORAGE_KEYS.Editor_Persistence, JSON.stringify(configPersistenceEnabled));
  36783. if (configPersistenceEnabled) {
  36784. persistEditorValue();
  36785. } else {
  36786. localStorage.removeItem(STORAGE_KEYS.Hls_Config);
  36787. }
  36788. }
  36789. function getEditorValue(options) {
  36790. options = $.extend({
  36791. parse: false
  36792. }, options || {});
  36793. var value = configEditor.session.getValue();
  36794. if (options.parse) {
  36795. try {
  36796. value = JSON.parse(value);
  36797. } catch (e) {
  36798. console.warn('[getEditorValue] could not parse editor value', e);
  36799. value = {};
  36800. }
  36801. }
  36802. return value;
  36803. }
  36804. function getPersistedHlsConfig() {
  36805. var value = localStorage.getItem(STORAGE_KEYS.Hls_Config);
  36806. if (value === null) {
  36807. return value;
  36808. }
  36809. try {
  36810. value = JSON.parse(value);
  36811. } catch (e) {
  36812. console.warn('[getPersistedHlsConfig] could not hls config json', e);
  36813. value = {};
  36814. }
  36815. return value;
  36816. }
  36817. function persistEditorValue() {
  36818. localStorage.setItem(STORAGE_KEYS.Hls_Config, getEditorValue());
  36819. }
  36820. function setupConfigEditor() {
  36821. configEditor = self.ace.edit('config-editor');
  36822. configEditor.setTheme('ace/theme/github');
  36823. configEditor.session.setMode('ace/mode/json');
  36824. var contents = hlsjsDefaults;
  36825. var shouldRestorePersisted = JSON.parse(localStorage.getItem(STORAGE_KEYS.Editor_Persistence)) === true;
  36826. if (shouldRestorePersisted) {
  36827. $.extend(contents, getPersistedHlsConfig());
  36828. }
  36829. var elPersistence = document.querySelector('#config-persistence');
  36830. elPersistence.addEventListener('change', onConfigPersistenceChanged);
  36831. elPersistence.checked = shouldRestorePersisted;
  36832. configPersistenceEnabled = shouldRestorePersisted;
  36833. updateConfigEditorValue(contents);
  36834. }
  36835. function setupTimelineChart() {
  36836. var canvas = document.querySelector('#timeline-chart');
  36837. var chart = new _chart_timeline_chart__WEBPACK_IMPORTED_MODULE_3__.TimelineChart(canvas, {
  36838. responsive: false
  36839. });
  36840. resizeHandlers.push(function () {
  36841. chart.resize();
  36842. });
  36843. chart.resize();
  36844. return chart;
  36845. }
  36846. function addChartEventListeners(hls) {
  36847. var updateLevelOrTrack = function updateLevelOrTrack(eventName, data) {
  36848. chart.updateLevelOrTrack(data.details);
  36849. };
  36850. var updateFragment = function updateFragment(eventName, data) {
  36851. if (data.stats) {
  36852. // Convert 0.x stats to partial v1 stats
  36853. var _data$stats = data.stats,
  36854. retry = _data$stats.retry,
  36855. loaded = _data$stats.loaded,
  36856. total = _data$stats.total,
  36857. trequest = _data$stats.trequest,
  36858. tfirst = _data$stats.tfirst,
  36859. tload = _data$stats.tload;
  36860. if (trequest && tload) {
  36861. data.frag.stats = {
  36862. loaded: loaded,
  36863. retry: retry,
  36864. total: total,
  36865. loading: {
  36866. start: trequest,
  36867. first: tfirst,
  36868. end: tload
  36869. }
  36870. };
  36871. }
  36872. }
  36873. chart.updateFragment(data);
  36874. };
  36875. var updateChart = function updateChart() {
  36876. chart.update();
  36877. };
  36878. hls.on(Hls.Events.MANIFEST_LOADING, function () {
  36879. chart.reset();
  36880. }, chart);
  36881. hls.on(Hls.Events.MANIFEST_PARSED, function (eventName, data) {
  36882. var levels = data.levels;
  36883. chart.removeType('level');
  36884. chart.removeType('audioTrack');
  36885. chart.removeType('subtitleTrack');
  36886. chart.updateLevels(levels);
  36887. }, chart);
  36888. hls.on(Hls.Events.BUFFER_CREATED, function (eventName, _ref) {
  36889. var tracks = _ref.tracks;
  36890. chart.updateSourceBuffers(tracks, hls.media);
  36891. }, chart);
  36892. hls.on(Hls.Events.BUFFER_RESET, function () {
  36893. chart.removeSourceBuffers();
  36894. }, chart);
  36895. hls.on(Hls.Events.LEVELS_UPDATED, function (eventName, _ref2) {
  36896. var levels = _ref2.levels;
  36897. chart.removeType('level');
  36898. chart.updateLevels(levels);
  36899. });
  36900. hls.on(Hls.Events.LEVEL_SWITCHED, function (eventName, _ref3) {
  36901. var level = _ref3.level;
  36902. chart.removeType('level');
  36903. chart.updateLevels(hls.levels, level);
  36904. }, chart);
  36905. hls.on(Hls.Events.LEVEL_LOADING, function () {
  36906. // TODO: mutate level datasets
  36907. // Update loadLevel
  36908. chart.removeType('level');
  36909. chart.updateLevels(hls.levels);
  36910. }, chart);
  36911. hls.on(Hls.Events.LEVEL_UPDATED, function (eventName, _ref4) {
  36912. var details = _ref4.details;
  36913. chart.updateLevelOrTrack(details);
  36914. }, chart);
  36915. hls.on(Hls.Events.AUDIO_TRACKS_UPDATED, function (eventName, _ref5) {
  36916. var audioTracks = _ref5.audioTracks;
  36917. chart.removeType('audioTrack');
  36918. chart.updateAudioTracks(audioTracks);
  36919. }, chart);
  36920. hls.on(Hls.Events.SUBTITLE_TRACKS_UPDATED, function (eventName, _ref6) {
  36921. var subtitleTracks = _ref6.subtitleTracks;
  36922. chart.removeType('subtitleTrack');
  36923. chart.updateSubtitleTracks(subtitleTracks);
  36924. }, chart);
  36925. hls.on(Hls.Events.AUDIO_TRACK_SWITCHED, function (eventName) {
  36926. // TODO: mutate level datasets
  36927. chart.removeType('audioTrack');
  36928. chart.updateAudioTracks(hls.audioTracks);
  36929. }, chart);
  36930. hls.on(Hls.Events.SUBTITLE_TRACK_SWITCH, function (eventName) {
  36931. // TODO: mutate level datasets
  36932. chart.removeType('subtitleTrack');
  36933. chart.updateSubtitleTracks(hls.subtitleTracks);
  36934. }, chart);
  36935. hls.on(Hls.Events.AUDIO_TRACK_LOADED, updateLevelOrTrack, chart);
  36936. hls.on(Hls.Events.SUBTITLE_TRACK_LOADED, updateLevelOrTrack, chart);
  36937. hls.on(Hls.Events.LEVEL_PTS_UPDATED, updateLevelOrTrack, chart);
  36938. hls.on(Hls.Events.FRAG_LOADED, updateFragment, chart);
  36939. hls.on(Hls.Events.FRAG_PARSED, updateFragment, chart);
  36940. hls.on(Hls.Events.FRAG_CHANGED, updateFragment, chart);
  36941. hls.on(Hls.Events.BUFFER_APPENDING, updateChart, chart);
  36942. hls.on(Hls.Events.BUFFER_APPENDED, updateChart, chart);
  36943. hls.on(Hls.Events.BUFFER_FLUSHED, updateChart, chart);
  36944. }
  36945. function updateConfigEditorValue(obj) {
  36946. var json = JSON.stringify(obj, null, 2);
  36947. configEditor.session.setValue(json);
  36948. }
  36949. function applyConfigEditorValue() {
  36950. onDemoConfigChanged();
  36951. loadSelectedStream();
  36952. }
  36953. function createfMP4(type) {
  36954. if (fmp4Data[type].length) {
  36955. var blob = new Blob([arrayConcat(fmp4Data[type])], {
  36956. type: 'application/octet-stream'
  36957. });
  36958. var filename = type + '-' + new Date().toISOString() + '.mp4';
  36959. self.saveAs(blob, filename);
  36960. // $('body').append('<a download="hlsjs-' + filename + '" href="' + self.URL.createObjectURL(blob) + '">Download ' + filename + ' track</a><br>');
  36961. } else if (!dumpfMP4) {
  36962. console.error('Check "Dump transmuxed fMP4 data" first to make appended media available for saving.');
  36963. }
  36964. }
  36965. function arrayConcat(inputArray) {
  36966. var totalLength = inputArray.reduce(function (prev, cur) {
  36967. return prev + cur.length;
  36968. }, 0);
  36969. var result = new Uint8Array(totalLength);
  36970. var offset = 0;
  36971. inputArray.forEach(function (element) {
  36972. result.set(element, offset);
  36973. offset += element.length;
  36974. });
  36975. return result;
  36976. }
  36977. function hideAllTabs() {
  36978. $('.demo-tab-btn').css('background-color', '');
  36979. $('.demo-tab').hide();
  36980. }
  36981. function toggleTabClick(btn) {
  36982. toggleTab(btn);
  36983. var tabIndexes = $('.demo-tab-btn').toArray().map(function (el, i) {
  36984. return $('#' + $(el).data('tab')).is(':visible') ? i : null;
  36985. }).filter(function (i) {
  36986. return i !== null;
  36987. });
  36988. localStorage.setItem(STORAGE_KEYS.demo_tabs, tabIndexes.join(','));
  36989. }
  36990. function toggleTab(btn, dontHideOpenTabs) {
  36991. var tabElId = $(btn).data('tab');
  36992. // eslint-disable-next-line no-restricted-globals
  36993. var modifierPressed = dontHideOpenTabs || self.event && (self.event.metaKey || self.event.shiftKey);
  36994. if (!modifierPressed) {
  36995. hideAllTabs();
  36996. }
  36997. if (modifierPressed) {
  36998. $("#" + tabElId).toggle();
  36999. } else {
  37000. $("#" + tabElId).show();
  37001. }
  37002. $(btn).css('background-color', $("#" + tabElId).is(':visible') ? 'orange' : '');
  37003. if (!$('#statsDisplayTab').is(':visible')) {
  37004. self.hideMetrics();
  37005. }
  37006. if (hls) {
  37007. if ($('#timelineTab').is(':visible')) {
  37008. chart.show();
  37009. chart.resize(chart.chart.data ? chart.chart.data.datasets : null);
  37010. } else {
  37011. chart.hide();
  37012. }
  37013. }
  37014. }
  37015. function appendLog(textElId, message) {
  37016. var el = $('#' + textElId);
  37017. var logText = el.text();
  37018. if (logText.length) {
  37019. logText += '\n';
  37020. }
  37021. var timestamp = (Date.now() - startTime) / 1000;
  37022. var newMessage = timestamp + ' | ' + message;
  37023. logText += newMessage;
  37024. // update
  37025. el.text(logText);
  37026. var element = el[0];
  37027. element.scrollTop = element.scrollHeight - element.clientHeight;
  37028. }
  37029. function logStatus(message) {
  37030. appendLog('statusOut', message);
  37031. }
  37032. function logError(message) {
  37033. appendLog('errorOut', message);
  37034. }
  37035. })();
  37036. __webpack_exports__ = __webpack_exports__["default"];
  37037. /******/ return __webpack_exports__;
  37038. /******/ })()
  37039. ;
  37040. });
  37041. //# sourceMappingURL=hls-demo.js.map